/* ==============================================================================
   Federal College of Education, Eha-Amufu — Fee Portal Stylesheet
   Unified with Portal Login Navigation, Royal Blue Palette, and Clean Card UI
   ============================================================================== */

:root {
    --portal-navy: #0d3b66;
    --portal-blue: #1d4ed8;
    --portal-blue-hover: #1e40af;
    --portal-blue-soft: #eff6ff;
    --portal-blue-border: #bfdbfe;
    --portal-gradient: linear-gradient(135deg, #0d3b66 0%, #1d4ed8 100%);
    --portal-gradient-hover: linear-gradient(135deg, #0a2d4e 0%, #1e40af 100%);
    --slate-950: #0b1a30;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --success: #15803d;
    --success-bg: #f0fdf4;
    --success-border: #bbf7d0;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.login-body {
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    background:
        linear-gradient(105deg, rgba(244, 248, 255, 0.96) 0%, rgba(236, 244, 255, 0.92) 52%, rgba(241, 246, 253, 0.94) 100%),
        url('../images/login_hero.jpg') center center / cover no-repeat fixed;
    background-color: var(--slate-100);
    font-family: 'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--slate-800);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    left: 16px;
    top: 16px;
    z-index: 2000;
    background: #ffffff;
    color: var(--slate-900);
    padding: 10px 16px;
    border-radius: 10px;
    border: 2px solid var(--portal-blue);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
}

.visually-hidden {
    position: absolute;
    clip-path: inset(50%);
    overflow: hidden;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    white-space: nowrap;
}

[hidden] {
    display: none !important;
}

/* ==========================================================================
   Portal Entrance Top Navigation Bar (Identical to Login Page)
   ========================================================================== */
.portal-entrance-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    display: flex;
    align-items: center;
}

.portal-nav-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--slate-950);
}

.portal-nav-logo {
    height: 40px;
    width: auto;
    max-width: 44px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.15));
}

.portal-nav-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.portal-nav-inst {
    font-weight: 800;
    font-size: 1.02rem;
    color: var(--slate-950);
    letter-spacing: -0.01em;
}

.portal-nav-portal-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portal-nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-nav-icon {
    display: inline-flex;
    align-items: center;
}

.portal-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--slate-700);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
    border: 1px solid transparent;
}

.portal-nav-link:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--portal-blue);
    transform: translateY(-1px);
}

.portal-nav-link.active {
    background: var(--portal-blue);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.3);
}

.portal-nav-link.active:hover {
    background: var(--portal-blue-hover);
    color: #ffffff;
}

.portal-nav-link-ext {
    color: var(--slate-500);
}

.portal-nav-ext-icon {
    opacity: 0.7;
}

/* ==========================================================================
   Main Centered Stage & Card
   ========================================================================== */
.fce-fee-stage {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 96px 20px 52px;
}

.fce-fee-shell {
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
}

.fce-fee-card,
.card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 36px;
    box-shadow: 0 24px 64px -20px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(203, 213, 225, 0.72);
}

.fce-card-header {
    margin-bottom: 24px;
}

.fce-card-title,
.card h1,
.card h2 {
    font-size: 1.52rem;
    font-weight: 700;
    color: var(--slate-950);
    margin: 0 0 6px;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.fce-card-subtitle {
    font-size: 0.89rem;
    font-weight: 400;
    color: var(--slate-500);
    margin: 0;
    line-height: 1.5;
}

/* ==========================================================================
   Form Layout, Labels & Controls
   ========================================================================== */
.fce-fee-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fce-field-row {
    display: grid;
    grid-template-columns: 1.3fr 0.95fr;
    gap: 14px;
}

.fce-field {
    min-width: 0;
}

.fce-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.fce-field label,
label {
    display: block;
    font-size: 0.825rem;
    font-weight: 500;
    color: var(--slate-700);
    margin-bottom: 6px;
}

.fce-label-row label {
    margin-bottom: 0;
}

.fce-label-hint {
    font-size: 0.75rem;
    color: var(--slate-500);
}

.fce-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.fce-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-400);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 2;
}

.fce-input-wrapper:focus-within .fce-input-icon {
    color: var(--portal-blue);
}

.fce-control,
input[type="text"],
input[type="email"],
input[type="password"],
select {
    width: 100%;
    min-height: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1.5px solid var(--slate-300);
    padding: 0 14px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 400;
    color: var(--slate-900);
    background-color: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fce-input-wrapper > .fce-control.fce-control-icon {
    /* Keep typed text and placeholders clear of the 18px leading icon.
       The extra specificity prevents input[type="..."] above from
       resetting this padding to the generic 14px value. */
    padding-left: 48px;
}

.fce-input-wrapper > .fce-control.fce-control-password {
    padding-left: 48px;
    padding-right: 44px;
}

.fce-control::placeholder,
input::placeholder {
    color: var(--slate-400);
}

select.fce-control,
select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 16px;
    cursor: pointer;
    text-overflow: ellipsis;
}

.fce-control:focus,
input:focus,
select:focus {
    outline: none;
    border-color: var(--portal-blue);
    box-shadow: 0 0 0 3.5px rgba(29, 78, 216, 0.16);
}

.fce-control[readonly],
input[readonly],
select[disabled] {
    background-color: var(--slate-50);
    color: var(--slate-500);
    border-color: var(--slate-200);
    cursor: not-allowed;
}

/* Deferred post-interaction validation (:user-invalid + fallback) */
.fce-control:user-invalid,
.fce-control.user-invalid-fallback,
input[aria-invalid="true"],
select[aria-invalid="true"] {
    border-color: var(--danger);
    background-color: #fffafa;
}

.fce-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    min-height: 36px;
    width: 36px;
    color: var(--slate-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: none;
    transition: color 0.15s ease, background-color 0.15s ease;
    z-index: 2;
}

.fce-password-toggle:hover {
    color: var(--slate-900);
    background: rgba(15, 23, 42, 0.06);
    transform: translateY(-50%);
    box-shadow: none;
}

.fce-field-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    font-size: 0.79rem;
    color: var(--slate-500);
    line-height: 1.4;
}

.fce-amount-pill {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--portal-blue);
    white-space: nowrap;
}

/* ==========================================================================
   Portal Info Callout & Notices
   ========================================================================== */
.fce-access-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--portal-blue-soft);
    border: 1px solid var(--portal-blue-border);
    color: var(--slate-700);
    font-size: 0.81rem;
    line-height: 1.48;
}

.fce-access-hint svg {
    flex: 0 0 auto;
    margin-top: 2px;
    color: #2563eb;
}

.fce-access-hint .hint-lead {
    font-weight: 600;
    color: var(--slate-900);
}

.notice {
    padding: 13px 15px;
    border-radius: 12px;
    border: 1px solid var(--portal-blue-border);
    background: var(--portal-blue-soft);
    color: #1e40af;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 18px;
    overflow-wrap: anywhere;
}

.notice p {
    margin: 4px 0 0;
}

.notice ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.notice-title {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}

.notice.error {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: #991b1b;
}

.notice.success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success);
}

/* ==========================================================================
   Buttons & Footer Links
   ========================================================================== */
.fce-btn-submit,
.actions button:not(.secondary),
.button:not(.secondary) {
    width: 100%;
    min-height: 50px;
    border-radius: 12px;
    background: var(--portal-gradient);
    color: #ffffff;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.96rem;
    border: none;
    padding: 12px 22px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 6px 18px rgba(13, 59, 102, 0.32);
}

.fce-btn-submit:hover,
.actions button:not(.secondary):hover,
.button:not(.secondary):hover {
    background: var(--portal-gradient-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.40);
    color: #ffffff;
}

.fce-btn-submit:disabled {
    opacity: 0.68;
    cursor: wait;
    transform: none;
}

.fce-btn-secondary,
.button.secondary,
button.secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 11px 20px;
    border-radius: 12px;
    background: #ffffff;
    color: var(--slate-700);
    border: 1.5px solid var(--slate-300);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fce-btn-secondary:hover,
.button.secondary:hover,
button.secondary:hover {
    background: var(--slate-50);
    border-color: var(--slate-400);
    color: var(--slate-900);
}

.fce-actions-row,
.actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.fce-actions-row .fce-btn-secondary {
    flex: 0 0 auto;
}

.fce-actions-row .fce-btn-submit {
    flex: 1;
}

.fce-card-helper {
    margin: 18px 0 0;
    text-align: center;
    font-size: 0.81rem;
    color: var(--slate-500);
    line-height: 1.55;
}

.fce-card-helper a {
    color: var(--portal-blue);
    font-weight: 600;
    text-decoration: none;
}

.fce-card-helper a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Review, Status & Receipt Summary Lists
   ========================================================================== */
.fce-summary-list,
dl {
    margin: 0 0 18px;
    padding: 16px 18px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fce-summary-list div,
dl div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    font-size: 0.86rem;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--slate-200);
}

.fce-summary-list div:last-child,
dl div:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.fce-summary-list dt,
dt {
    color: var(--slate-500);
    font-weight: 400;
    flex-shrink: 0;
}

.fce-summary-list dd,
dd {
    margin: 0;
    color: var(--slate-900);
    font-weight: 500;
    text-align: right;
    overflow-wrap: anywhere;
}

.fce-total-bar,
.total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: 14px;
    background: var(--portal-blue-soft);
    border: 1px solid var(--portal-blue-border);
    margin-bottom: 16px;
}

.fce-total-bar span:first-child,
.total span:first-child {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--slate-700);
}

.fce-total-amount,
.total-figure {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--portal-blue);
    letter-spacing: -0.02em;
}

.fce-confirm-check,
.check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.84rem;
    font-weight: 400;
    color: var(--slate-700);
    margin: 14px 0 18px;
    cursor: pointer;
    line-height: 1.45;
}

.fce-confirm-check input[type="checkbox"],
.check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin-top: 2px;
    accent-color: var(--portal-blue);
    flex-shrink: 0;
}

.reference {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
    background: var(--slate-100);
    color: var(--slate-800);
    padding: 10px 14px;
    border-radius: 10px;
    margin: 0 0 16px;
    overflow-wrap: anywhere;
}

hr {
    border: 0;
    border-top: 1px solid var(--slate-200);
    margin: 20px 0;
}

/* ==========================================================================
   Institutional Footer Beneath Card (Matches Portal Sign-In Screenshot)
   ========================================================================== */
.fce-inst-footer {
    text-align: center;
    margin-top: 30px;
    padding: 0 12px;
}

.fce-inst-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--slate-950);
    letter-spacing: 0.01em;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.fce-inst-sub {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--portal-blue);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.fce-inst-meta {
    font-size: 0.79rem;
    font-weight: 500;
    color: var(--slate-600);
    margin: 0;
}

/* Keyboard Focus Visibility */
.portal-nav-link:focus-visible,
.portal-nav-brand:focus-visible,
.fce-password-toggle:focus-visible,
.fce-btn-submit:focus-visible,
.fce-btn-secondary:focus-visible,
a:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

/* ==========================================================================
   Responsive & Print Breakpoints
   ========================================================================== */
@media (max-width: 768px) {
    .portal-entrance-nav {
        position: static;
        height: 60px;
    }

    .portal-nav-container {
        padding: 0 14px;
        gap: 10px;
    }

    .portal-nav-logo {
        height: 34px;
    }

    .portal-nav-portal-title,
    .portal-nav-icon,
    .portal-nav-link-ext {
        display: none;
    }

    .portal-nav-inst {
        font-size: 0.9rem;
    }

    .portal-nav-menu {
        gap: 4px;
        margin-left: auto;
    }

    .portal-nav-link {
        min-height: 38px;
        padding: 6px 10px;
        font-size: 0.78rem;
    }

    .fce-fee-stage {
        padding: 22px 14px 36px;
    }

    .fce-fee-card,
    .card {
        padding: 26px 20px;
        border-radius: 18px;
    }

    .fce-field-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .fce-actions-row,
    .actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .fce-actions-row .fce-btn-secondary,
    .fce-actions-row .fce-btn-submit,
    .actions > * {
        width: 100%;
    }
}

@media (max-width: 390px) {
    .portal-nav-brand-text {
        display: none;
    }
}

@media print {
    .portal-entrance-nav,
    .no-print,
    .fce-card-helper {
        display: none !important;
    }
    body.login-body {
        background: #ffffff !important;
    }
    .fce-fee-stage {
        padding: 0;
    }
    .fce-fee-card,
    .card {
        box-shadow: none;
        border: 1px solid #cbd5e1;
    }
}
