/* assets/css/main.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --primary:       #1d4ed8;
    --primary-dark:  #1e3a8a;
    --primary-light: #dbeafe;
    --secondary:     #0f172a;
    --success:       #16a34a;
    --success-light: #dcfce7;
    --danger:        #dc2626;
    --danger-light:  #fee2e2;
    --warning:       #d97706;
    --warning-light: #fef3c7;
    --info:          #0891b2;
    --info-light:    #cffafe;
    --gray-50:       #f8fafc;
    --gray-100:      #f1f5f9;
    --gray-200:      #e2e8f0;
    --gray-300:      #cbd5e1;
    --gray-400:      #94a3b8;
    --gray-500:      #64748b;
    --gray-600:      #475569;
    --gray-700:      #334155;
    --gray-800:      #1e293b;
    --gray-900:      #0f172a;
    --radius-sm:     6px;
    --radius:        10px;
    --radius-lg:     14px;
    --radius-xl:     20px;
    --shadow-sm:     0 1px 3px rgba(0,0,0,0.08);
    --shadow:        0 4px 12px rgba(0,0,0,0.10);
    --shadow-lg:     0 8px 24px rgba(0,0,0,0.12);
    --shadow-xl:     0 20px 48px rgba(0,0,0,0.15);
    --transition:    all 0.2s cubic-bezier(0.4,0,0.2,1);
    --font:          'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:     'JetBrains Mono', 'Courier New', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background:  var(--gray-100);
    color:       var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--gray-900);
}

/* ── Buttons ── */
.btn {
    display:         inline-flex;
    align-items:     center;
    gap:             8px;
    padding:         10px 20px;
    border-radius:   var(--radius);
    font-family:     var(--font);
    font-size:       14px;
    font-weight:     600;
    cursor:          pointer;
    border:          none;
    transition:      var(--transition);
    text-decoration: none;
    white-space:     nowrap;
    outline:         none;
}
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(29,78,216,0.35); }

.btn-primary   { background: var(--primary);   color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-secondary { background: var(--gray-800);  color: #fff; }
.btn-secondary:hover { background: var(--gray-900); transform: translateY(-1px); }

.btn-success   { background: var(--success);   color: #fff; }
.btn-success:hover { background: #15803d; transform: translateY(-1px); }

.btn-danger    { background: var(--danger);    color: #fff; }
.btn-danger:hover { background: #b91c1c; transform: translateY(-1px); }

.btn-warning   { background: var(--warning);   color: #fff; }
.btn-warning:hover { background: #b45309; }

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--gray-300);
    color: var(--gray-700);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-icon { padding: 9px; }
.btn-full { width: 100%; justify-content: center; }

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Form Elements ── */
.form-group { margin-bottom: 20px; }

.form-label {
    display:     block;
    font-size:   13px;
    font-weight: 600;
    color:       var(--gray-700);
    margin-bottom: 7px;
    letter-spacing: 0.01em;
}

.form-control {
    width:         100%;
    padding:       11px 14px;
    border:        1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-family:   var(--font);
    font-size:     14px;
    color:         var(--gray-800);
    background:    #fff;
    transition:    var(--transition);
    outline:       none;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow:   0 0 0 3px rgba(29,78,216,0.12);
}
.form-control::placeholder { color: var(--gray-400); }
.form-control.error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220,38,38,0.12); }

.input-group {
    position: relative;
    display:  flex;
    align-items: center;
}
.input-group .input-icon {
    position: absolute;
    left: 12px;
    color: var(--gray-400);
    pointer-events: none;
    display: flex;
    align-items: center;
}
.input-group .form-control { padding-left: 40px; }
.input-group .input-icon-right {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: var(--gray-400);
    background: none;
    border: none;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}
.input-group .input-icon-right:hover { color: var(--gray-700); }

/* ── Cards ── */
.card {
    background:    #fff;
    border-radius: var(--radius-lg);
    box-shadow:    var(--shadow-sm);
    border:        1px solid var(--gray-200);
    overflow:      hidden;
}
.card-header {
    padding:        20px 24px;
    border-bottom:  1px solid var(--gray-100);
    display:        flex;
    align-items:    center;
    justify-content: space-between;
    gap: 12px;
}
.card-body   { padding: 24px; }
.card-footer {
    padding:     16px 24px;
    border-top:  1px solid var(--gray-100);
    background:  var(--gray-50);
}

/* ── Alerts ── */
.alert {
    padding:       14px 18px;
    border-radius: var(--radius);
    font-size:     14px;
    display:       flex;
    align-items:   flex-start;
    gap:           10px;
    border:        1px solid transparent;
}
.alert-icon { flex-shrink: 0; margin-top: 1px; }
.alert-danger  { background: var(--danger-light);  border-color: #fca5a5; color: #991b1b; }
.alert-success { background: var(--success-light); border-color: #86efac; color: #166534; }
.alert-warning { background: var(--warning-light); border-color: #fcd34d; color: #92400e; }
.alert-info    { background: var(--info-light);    border-color: #67e8f9; color: #164e63; }

/* ── Badge ── */
.badge {
    display:       inline-flex;
    align-items:   center;
    gap:           4px;
    padding:       3px 10px;
    border-radius: 999px;
    font-size:     12px;
    font-weight:   600;
    border:        1px solid transparent;
}
.badge-success { background: var(--success-light); color: #166534; border-color: #86efac; }
.badge-danger  { background: var(--danger-light);  color: #991b1b; border-color: #fca5a5; }
.badge-warning { background: var(--warning-light); color: #92400e; border-color: #fcd34d; }
.badge-info    { background: var(--info-light);    color: #164e63; border-color: #67e8f9; }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); border-color: #93c5fd; }
.badge-gray    { background: var(--gray-100);      color: var(--gray-600);     border-color: var(--gray-300); }

/* ── Navbar ── */
.navbar {
    background:  var(--gray-900);
    color:       #fff;
    padding:     0 24px;
    height:      62px;
    display:     flex;
    align-items: center;
    justify-content: space-between;
    position:    sticky;
    top:         0;
    z-index:     100;
    box-shadow:  0 2px 8px rgba(0,0,0,0.25);
}
.navbar-brand {
    display:     flex;
    align-items: center;
    gap:         12px;
    text-decoration: none;
    color: #fff;
}
.navbar-brand-icon {
    width:           36px;
    height:          36px;
    background:      var(--primary);
    border-radius:   var(--radius);
    display:         flex;
    align-items:     center;
    justify-content: center;
    flex-shrink:     0;
}
.navbar-brand-text { font-size: 16px; font-weight: 700; line-height: 1.2; }
.navbar-brand-sub  { font-size: 11px; color: var(--gray-400); font-weight: 400; }
.navbar-nav { display: flex; align-items: center; gap: 8px; }
.nav-info {
    font-size:   13px;
    color:       var(--gray-400);
    padding:     6px 14px;
    background:  rgba(255,255,255,0.06);
    border-radius: var(--radius);
    border:      1px solid rgba(255,255,255,0.08);
}
.nav-info strong { color: #fff; }

/* ── Sub-header bar ── */
.subheader {
    background:  #fff;
    border-bottom: 1px solid var(--gray-200);
    padding:     10px 24px;
    display:     flex;
    align-items: center;
    gap:         20px;
    font-size:   13px;
    color:       var(--gray-500);
    flex-wrap:   wrap;
}
.subheader-item {
    display:     flex;
    align-items: center;
    gap:         6px;
}
.subheader-item svg { color: var(--gray-400); }

/* ── Spinner ── */
.spinner {
    width:  18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
    flex-shrink: 0;
}
.spinner-dark {
    border-color: rgba(0,0,0,0.12);
    border-top-color: var(--primary);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.toast-container {
    position:   fixed;
    top:        72px;
    right:      20px;
    z-index:    9999;
    display:    flex;
    flex-direction: column;
    gap:        10px;
    max-width:  360px;
    width:      100%;
}
.toast {
    background:    var(--gray-900);
    color:         #fff;
    padding:       14px 18px;
    border-radius: var(--radius-lg);
    box-shadow:    var(--shadow-xl);
    display:       flex;
    align-items:   center;
    gap:           12px;
    font-size:     14px;
    font-weight:   500;
    animation:     slideIn 0.3s cubic-bezier(0.4,0,0.2,1);
    border-left:   4px solid transparent;
}
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error   { border-left-color: var(--danger);  }
.toast.toast-warning { border-left-color: var(--warning); }
.toast.toast-info    { border-left-color: var(--info);    }
.toast-icon { flex-shrink: 0; }
.toast-msg  { flex: 1; line-height: 1.4; }
.toast-close {
    flex-shrink: 0;
    background:  none;
    border:      none;
    color:       var(--gray-400);
    cursor:      pointer;
    padding:     2px;
    transition:  var(--transition);
}
.toast-close:hover { color: #fff; }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(20px); }
}

/* ── Toggle Switch ── */
.toggle-wrap { display: inline-flex; align-items: center; gap: 10px; }
.toggle {
    position: relative;
    width:    50px;
    height:   26px;
    flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
    position:      absolute;
    inset:         0;
    background:    var(--gray-300);
    border-radius: 999px;
    cursor:        pointer;
    transition:    var(--transition);
}
.toggle-thumb {
    position:      absolute;
    top:           3px;
    left:          3px;
    width:         20px;
    height:        20px;
    background:    #fff;
    border-radius: 50%;
    transition:    var(--transition);
    box-shadow:    0 1px 4px rgba(0,0,0,0.25);
}
.toggle input:checked ~ .toggle-track { background: var(--success); }
.toggle input:checked ~ .toggle-thumb { transform: translateX(24px); }

/* ── Table ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
    background:  var(--gray-50);
    color:       var(--gray-600);
    font-weight: 600;
    font-size:   12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding:     11px 16px;
    text-align:  left;
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}
.data-table td {
    padding:     13px 16px;
    border-bottom: 1px solid var(--gray-100);
    color:       var(--gray-700);
    vertical-align: middle;
}
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover td { background: var(--gray-50); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ── Utility ── */
.text-muted    { color: var(--gray-500); font-size: 13px; }
.text-sm       { font-size: 13px; }
.text-xs       { font-size: 12px; }
.font-mono     { font-family: var(--font-mono); }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.d-flex        { display: flex; }
.align-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2         { gap: 8px; }
.gap-3         { gap: 12px; }
.gap-4         { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .navbar { padding: 0 16px; }
    .navbar-brand-sub { display: none; }
    .nav-info { display: none; }
}
@media (max-width: 480px) {
    .btn { padding: 9px 16px; font-size: 13px; }
}

/* ── Auth page ── */
.auth-page {
    min-height:      100vh;
    display:         flex;
    align-items:     center;
    justify-content: center;
    background:      linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #1d4ed8 100%);
    padding:         24px;
}
.auth-card {
    width:         100%;
    max-width:     440px;
    background:    #fff;
    border-radius: var(--radius-xl);
    box-shadow:    var(--shadow-xl);
    overflow:      hidden;
}
.auth-header {
    background:  var(--gray-900);
    padding:     32px 32px 28px;
    text-align:  center;
    color:       #fff;
}
.auth-header-icon {
    width:           56px;
    height:          56px;
    background:      var(--primary);
    border-radius:   var(--radius-lg);
    display:         flex;
    align-items:     center;
    justify-content: center;
    margin:          0 auto 16px;
}
.auth-header h1 { color: #fff; font-size: 22px; margin-bottom: 4px; }
.auth-header p  { color: var(--gray-400); font-size: 13px; }
.auth-body      { padding: 32px; }
.auth-footer    { padding: 16px 32px; background: var(--gray-50); border-top: 1px solid var(--gray-100); text-align: center; }

/* ── Step indicator ── */
.steps {
    display:   flex;
    padding:   0;
    border-bottom: 1px solid var(--gray-100);
}
.step-item {
    flex:       1;
    padding:    12px 8px;
    text-align: center;
    font-size:  12px;
    font-weight: 600;
    color:      var(--gray-400);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}
.step-item.active   { color: var(--primary); border-bottom-color: var(--primary); }
.step-item.done     { color: var(--success); }

/* Print */
@media print {
    .navbar, .subheader, .btn, .toast-container { display: none !important; }
}

/* ================================================================
   HCC EXAMINATION MARK ENTRY PORTAL
   PREMIUM SPLIT-SCREEN LOGIN
   Presentation layer only — backend/PHP logic is untouched.
   ================================================================ */

/* ---------- Login-specific design tokens ---------- */
:root {
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: Georgia, "Times New Roman", serif;

    --login-blue: #1B4FD8;
    --login-blue-dark: #1239A8;
    --login-blue-hover: #1745C2;
    --login-blue-soft: #EFF6FF;

    --login-green: #059669;
    --login-green-dark: #047857;
    --login-green-hover: #05845D;
    --login-green-soft: #ECFDF5;

    --login-ink: #0F172A;
    --login-text: #334155;
    --login-muted: #64748B;
    --login-soft: #94A3B8;
    --login-border: #E2E8F0;
    --login-bg: #F4F7FB;
}

/* ---------- Page ---------- */
.login-page-body {
    min-height: 100vh;
    background: var(--login-bg);
}

.login-page {
    position: relative;
    width: 100%;
    min-height: calc(100svh - 88px);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 32px 24px 40px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 7% 7%,
            rgba(27, 79, 216, .065),
            transparent 29%
        ),
        radial-gradient(
            circle at 94% 91%,
            rgba(5, 150, 105, .045),
            transparent 25%
        ),
        #F4F7FB;
}

/* Very subtle page texture */
.login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .24;

    background-image:
        linear-gradient(rgba(255,255,255,.55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.55) 1px, transparent 1px);

    background-size: 44px 44px;
}

/* ---------- Main shell ---------- */
.login-shell {
    position: relative;
    z-index: 1;

    width: min(1180px, calc(100vw - 48px));

    /*
     * Viewport-aware height prevents the card from becoming
     * vertically clipped on 1366x768 / 1440x900 displays.
     */
    height: min(700px, calc(100svh - 64px));
    min-height: 600px;

    display: grid;

    overflow: hidden;

    border: 1px solid rgba(15, 23, 42, .07);
    border-radius: 24px;

    background: #fff;

    box-shadow:
        0 30px 80px rgba(15, 23, 42, .13),
        0 8px 24px rgba(15, 23, 42, .055);

    animation: portalShellIn .45s cubic-bezier(.2,.7,.2,1) both;
}

.login-shell.is-department {
    grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
}

.login-shell.is-common {
    grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr);
}

/* Keep Common Paper form left / image right */
.login-shell.is-common .login-visual {
    order: 2;
}

.login-shell.is-common .login-panel {
    order: 1;
}

@keyframes portalShellIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.992);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Image panel ---------- */
.login-visual {
    position: relative;
    min-width: 0;
    min-height: 0;

    overflow: hidden;
    isolation: isolate;

    background: #0B1D4A;
}

/*
 * IMPORTANT:
 * The supplied HCC photographs are 16:9. The login panel is
 * intentionally portrait-ish, so COVER is used to fill the
 * complete panel without white/empty bands.
 *
 * The background-position is adjusted separately for the
 * two photographs because their important architecture sits
 * in different areas.
 */
.login-visual-image {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    background-image: url("../hccimage-left.webp");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 56% center;

    transform: scale(1.005);

    transition: transform 900ms cubic-bezier(.2,.7,.2,1);
}

/* Department / Library photograph */
.login-shell.is-department .login-visual-image {
    background-image: url("../hccimage-left.webp");
    background-position: 58% center;
}

/* Common Paper / Main entrance photograph */
.login-shell.is-common .login-visual-image {
    background-image: url("../hccimage-right.webp");
    background-position: 52% center;
}

/*
 * Do not enlarge aggressively on hover.
 * A large zoom was making the architectural photograph look
 * unnecessarily cropped.
 */
.login-shell:hover .login-visual-image {
    transform: scale(1.012);
}

/* ---------- Image overlay ---------- */
.login-visual-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;

    pointer-events: none;

    background:
        linear-gradient(
            180deg,
            rgba(6, 25, 61, .48) 0%,
            rgba(6, 25, 61, .08) 38%,
            rgba(4, 17, 43, .18) 58%,
            rgba(4, 17, 39, .88) 100%
        ),
        linear-gradient(
            90deg,
            rgba(5, 23, 57, .42) 0%,
            rgba(5, 23, 57, .06) 58%,
            transparent 100%
        );
}

/* Common entrance needs slightly stronger left contrast */
.login-shell.is-common .login-visual-overlay {
    background:
        linear-gradient(
            180deg,
            rgba(6, 25, 61, .42) 0%,
            rgba(6, 25, 61, .08) 40%,
            rgba(4, 17, 43, .16) 58%,
            rgba(4, 17, 39, .87) 100%
        ),
        linear-gradient(
            90deg,
            rgba(5, 23, 57, .30) 0%,
            rgba(5, 23, 57, .04) 62%,
            transparent 100%
        );
}

.login-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;

    pointer-events: none;

    border: 1px solid rgba(255,255,255,.08);
}

/* ---------- Logos on image ---------- */
.visual-top {
    position: absolute;
    z-index: 3;

    top: 24px;
    left: 26px;
    right: 26px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;

    pointer-events: none;
}

.visual-brand,
.visual-academic-mark {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.23);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow: 0 8px 22px rgba(0,0,0,.10);
}

.visual-brand {
    width: 56px;
    height: 56px;
    padding: 7px;
    border-radius: 13px;
}

.visual-academic-mark {
    width: 52px;
    height: 52px;
    padding: 5px;
    border-radius: 12px;
}

.visual-brand img,
.visual-academic-mark img {
    display: block;
    width: 100%;
    height: 100%;

    object-fit: contain;

    filter: drop-shadow(0 3px 8px rgba(0,0,0,.28));
}

/* ---------- Image text ---------- */
.visual-content {
    position: absolute;
    z-index: 3;

    left: 38px;
    right: 38px;
    bottom: 74px;

    color: #fff;
}

.visual-kicker {
    display: flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 13px;

    color: rgba(255,255,255,.82);

    font-size: 9px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.kicker-line {
    width: 24px;
    height: 1px;
    flex: 0 0 auto;

    border-radius: 2px;

    background: rgba(207,225,255,.90);
}

.visual-content h1 {
    max-width: 520px;

    margin: 0;

    color: #fff;

    font-family: var(--font-display);
    font-size: clamp(32px, 3.05vw, 46px);
    line-height: .99;
    font-weight: 700;
    letter-spacing: -.035em;

    text-shadow: 0 4px 20px rgba(0,0,0,.28);
}

.visual-content h1 span {
    color: #D4E3FF;
}

.visual-content p {
    max-width: 470px;

    margin: 15px 0 0;

    color: rgba(255,255,255,.80);

    font-size: 12px;
    line-height: 1.62;
}

.visual-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 13px;

    margin-top: 17px;

    color: rgba(255,255,255,.78);

    font-size: 9px;
    line-height: 1.3;
    font-weight: 600;
}

.visual-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.visual-meta svg {
    width: 12px;
    height: 12px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.meta-dot {
    width: 3px;
    height: 3px;
    flex: 0 0 auto;

    border-radius: 50%;

    background: rgba(255,255,255,.40);
}

.visual-footer {
    position: absolute;
    z-index: 3;

    left: 26px;
    right: 26px;
    bottom: 21px;

    display: flex;
    align-items: center;
    gap: 9px;

    color: rgba(255,255,255,.52);

    font-size: 7px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.visual-footer-rule {
    width: 25px;
    height: 1px;
    flex: 0 0 auto;

    background: rgba(255,255,255,.26);
}

/* ---------- Form panel ---------- */
.login-panel {
    min-width: 0;
    min-height: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff;
}

.login-panel-inner {
    width: min(100%, 390px);

    padding: 32px 40px 28px;
}

/* ---------- Login mode tabs ---------- */
.login-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;

    width: 100%;

    margin-bottom: 27px;
    padding: 3px;

    border: 1px solid #DCE4EF;
    border-radius: 10px;

    background: #F8FAFC;
}

.mode-option {
    min-width: 0;
    min-height: 37px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 0 8px;

    border-radius: 7px;

    color: #64748B;
    background: transparent;

    font-size: 9px;
    line-height: 1;
    font-weight: 800;

    text-decoration: none;

    transition:
        color .18s ease,
        background-color .18s ease,
        box-shadow .18s ease;
}

.mode-option:hover {
    color: #1E293B;
    background: #fff;
}

.mode-option.active {
    color: #1239A8;
    background: #fff;

    box-shadow:
        0 2px 7px rgba(15,23,42,.08),
        0 1px 2px rgba(15,23,42,.04);
}

.mode-option.common.active {
    color: #047857;
}

.mode-icon {
    width: 14px;
    height: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;
}

.mode-icon svg {
    width: 14px;
    height: 14px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Heading ---------- */
.login-heading {
    margin-bottom: 22px;
}

.heading-eyebrow {
    display: inline-flex;
    align-items: center;

    min-height: 20px;

    padding: 4px 8px;

    border: 1px solid #DBEAFE;
    border-radius: 999px;

    color: #1D4ED8;
    background: #EFF6FF;

    font-size: 7px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.heading-eyebrow.common {
    color: #047857;
    background: #ECFDF5;
    border-color: #D1FAE5;
}

.login-heading h2 {
    margin: 10px 0 5px;

    color: #0F172A;

    font-family: var(--font-body);
    font-size: clamp(25px, 2.3vw, 29px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -.04em;
}

.login-heading p {
    max-width: 340px;

    margin: 0;

    color: #64748B;

    font-size: 10px;
    line-height: 1.55;
}

/* ---------- Alerts ---------- */
.portal-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;

    margin-bottom: 15px;
    padding: 9px 10px;

    border: 1px solid transparent;
    border-radius: 8px;

    font-size: 9px;
    line-height: 1.45;
}

.portal-alert-info {
    color: #1E40AF;
    background: #EFF6FF;
    border-color: #BFDBFE;
}

.portal-alert-danger {
    color: #991B1B;
    background: #FEF2F2;
    border-color: #FECACA;
}

.portal-alert-warning {
    color: #92400E;
    background: #FFFBEB;
    border-color: #FDE68A;
}

.portal-alert-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-alert-icon svg {
    width: 14px;
    height: 14px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Form ---------- */
.portal-form {
    width: 100%;
}

.portal-field {
    margin-bottom: 14px;
}

.portal-field label {
    display: block;

    margin-bottom: 6px;

    color: #1E293B;

    font-size: 8px;
    line-height: 1.2;
    font-weight: 800;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-bottom: 6px;
}

.field-label-row label {
    margin-bottom: 0;
}

.field-hint {
    color: #94A3B8;

    font-size: 7px;
    line-height: 1.2;
    font-weight: 600;
}

/* ---------- Inputs ---------- */
.portal-input-wrap {
    position: relative;

    display: flex;
    align-items: center;
}

.portal-input-icon {
    position: absolute;
    z-index: 2;
    left: 11px;

    width: 14px;
    height: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #94A3B8;

    pointer-events: none;

    transition: color .18s ease;
}

.portal-input-icon svg {
    width: 14px;
    height: 14px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portal-input-wrap:focus-within .portal-input-icon {
    color: var(--login-blue);
}

.portal-input {
    width: 100%;
    height: 40px;

    padding: 0 12px 0 34px;

    border: 1px solid #D7E0EC;
    border-radius: 8px;

    outline: none;

    color: #0F172A;
    background: #F8FAFC;

    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 500;

    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background-color .18s ease;
}

.portal-input::placeholder {
    color: #A3AFBF;
}

.portal-input:hover {
    border-color: #C7D2E0;
}

.portal-input:focus {
    border-color: var(--login-blue);
    background: #fff;

    box-shadow: 0 0 0 3px rgba(29,78,216,.09);
}

.login-shell.is-common .portal-input-wrap:focus-within .portal-input-icon {
    color: var(--login-green);
}

.login-shell.is-common .portal-input:focus {
    border-color: var(--login-green);

    box-shadow: 0 0 0 3px rgba(5,150,105,.09);
}

.portal-input-wrap.has-toggle .portal-input {
    padding-right: 43px;
}

/* ---------- Password toggle ---------- */
.password-toggle {
    position: absolute;
    z-index: 3;
    right: 6px;

    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 6px;

    color: #94A3B8;
    background: transparent;

    cursor: pointer;

    transition:
        color .15s ease,
        background-color .15s ease;
}

.password-toggle:hover {
    color: #334155;
    background: #EEF2F7;
}

.password-toggle:focus-visible {
    outline: 2px solid rgba(29,78,216,.32);
    outline-offset: 1px;
}

.password-toggle svg {
    width: 14px;
    height: 14px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Select ---------- */
.portal-select {
    appearance: none;
    -webkit-appearance: none;

    padding-right: 38px;

    cursor: pointer;
}

.select-chevron {
    position: absolute;
    z-index: 2;
    right: 10px;

    width: 14px;
    height: 14px;

    display: flex;

    pointer-events: none;

    color: #64748B;
}

.select-chevron svg {
    width: 14px;
    height: 14px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Submit ---------- */
.portal-submit {
    width: 100%;
    min-height: 40px;

    margin-top: 2px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 0 15px;

    border: 0;
    border-radius: 8px;

    color: #fff;
    background: var(--login-blue);

    box-shadow: 0 7px 16px rgba(27,79,216,.20);

    cursor: pointer;

    font-size: 9px;
    line-height: 1;
    font-weight: 800;

    transition:
        background-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

.portal-submit:hover {
    background: var(--login-blue-dark);

    box-shadow: 0 10px 21px rgba(27,79,216,.24);

    transform: translateY(-1px);
}

.portal-submit:active {
    transform: translateY(0);
}

.portal-submit:focus-visible {
    outline: 2px solid rgba(27,79,216,.28);
    outline-offset: 2px;
}

.portal-submit svg {
    width: 13px;
    height: 13px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition: transform .18s ease;
}

.portal-submit:hover svg {
    transform: translateX(2px);
}

.common-submit {
    background: var(--login-green);
    box-shadow: 0 7px 16px rgba(5,150,105,.18);
}

.common-submit:hover {
    background: var(--login-green-dark);
    box-shadow: 0 10px 21px rgba(5,150,105,.22);
}

/* ---------- Department steps ---------- */
.department-steps {
    display: flex;
    align-items: center;

    margin-bottom: 20px;
}

.department-step {
    display: flex;
    align-items: center;
    gap: 6px;

    min-width: 0;

    color: #94A3B8;

    white-space: nowrap;
}

.department-step-number {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #E2E8F0;
    border-radius: 50%;

    color: #94A3B8;
    background: #F8FAFC;

    font-size: 7px;
    font-weight: 800;
}

.department-step strong {
    display: block;

    color: #94A3B8;

    font-size: 7px;
    line-height: 1.15;
    font-weight: 800;
}

.department-step small {
    display: block;

    margin-top: 1px;

    color: #CBD5E1;

    font-size: 6px;
    line-height: 1.15;
}

.department-step.current .department-step-number {
    color: #fff;
    background: var(--login-blue);
    border-color: var(--login-blue);

    box-shadow: 0 3px 8px rgba(27,79,216,.18);
}

.department-step.current strong {
    color: var(--login-blue-dark);
}

.department-step.current small {
    color: #64748B;
}

.department-step.complete .department-step-number {
    color: #fff;
    background: #15803D;
    border-color: #15803D;
}

.department-step.complete strong {
    color: #166534;
}

.department-step.complete small {
    color: #64748B;
}

.department-step-line {
    flex: 1;

    height: 1px;

    margin: 0 8px;

    background: #E2E8F0;
}

.department-step-line.complete {
    background: #86EFAC;
}

/* ---------- Verified context ---------- */
.verified-context {
    display: flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 15px;
    padding: 9px 10px;

    border: 1px solid #BBF7D0;
    border-radius: 8px;

    background: #F0FDF4;
}

.verified-context-icon {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #fff;
    background: #16A34A;
}

.verified-context-icon svg {
    width: 13px;
    height: 13px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.verified-context-copy {
    min-width: 0;
    flex: 1;
}

.verified-context-copy span {
    display: block;

    color: #166534;

    font-size: 7px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.verified-context-copy strong {
    display: block;

    margin-top: 2px;

    overflow: hidden;

    color: #14532D;

    font-size: 9px;
    line-height: 1.2;
    font-weight: 800;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.verified-badge {
    flex: 0 0 auto;

    padding: 3px 6px;

    border-radius: 999px;

    color: #166534;
    background: #DCFCE7;

    font-size: 6px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .07em;
}

/* ---------- Start over ---------- */
.start-over {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    margin-top: 11px;

    color: #64748B;

    font-size: 8px;
    line-height: 1.2;
    font-weight: 700;

    text-decoration: none;
}

.start-over:hover {
    color: var(--login-blue);
}

.start-over svg {
    width: 12px;
    height: 12px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Security note ---------- */
.secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    margin-top: 13px;

    color: #94A3B8;

    font-size: 6.5px;
    line-height: 1.35;
    font-weight: 600;

    text-align: center;
}

.secure-note svg {
    width: 11px;
    height: 11px;
    flex: 0 0 11px;

    fill: none;
    stroke: #94A3B8;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Form footer ---------- */
.login-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-top: 18px;
    padding-top: 12px;

    border-top: 1px solid #EEF2F6;

    color: #A0AEC0;

    font-size: 6.5px;
    line-height: 1.3;
    font-weight: 700;
}

.login-panel-footer a {
    color: #64748B;
    text-decoration: none;
}

.login-panel-footer a:hover {
    color: var(--login-blue);
}

/* ---------- Accessible focus ---------- */
.login-mode-switch a:focus-visible,
.login-panel a:focus-visible,
.login-panel button:focus-visible,
.login-panel input:focus-visible,
.login-panel select:focus-visible {
    outline: 2px solid rgba(29,78,216,.34);
    outline-offset: 2px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Short desktop screens */
@media (min-width: 981px) and (max-height: 760px) {
    .login-page {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .login-shell {
        height: calc(100svh - 32px);
        min-height: 560px;
        max-height: 680px;
    }

    .login-panel-inner {
        padding-top: 24px;
        padding-bottom: 22px;
    }

    .login-mode-switch {
        margin-bottom: 21px;
    }

    .login-heading {
        margin-bottom: 18px;
    }

    .portal-field {
        margin-bottom: 11px;
    }

    .department-steps {
        margin-bottom: 16px;
    }

    .secure-note {
        margin-top: 10px;
    }

    .login-panel-footer {
        margin-top: 13px;
        padding-top: 10px;
    }

    .visual-content {
        bottom: 65px;
    }
}

/* Normal desktop / medium laptop */
@media (max-width: 1120px) and (min-width: 981px) {
    .login-shell {
        width: min(1060px, calc(100vw - 40px));
    }

    .login-panel-inner {
        padding-left: 32px;
        padding-right: 32px;
    }

    .visual-content {
        left: 32px;
        right: 32px;
    }

    .visual-content h1 {
        font-size: 36px;
    }
}

/* Tablet: stacked layout */
@media (max-width: 980px) {
    .login-page {
        min-height: 100svh;
        padding: 24px 16px;
        align-items: center;
    }

    .login-shell,
    .login-shell.is-department,
    .login-shell.is-common {
        width: min(700px, calc(100vw - 32px));
        height: auto;
        min-height: 0;

        grid-template-columns: 1fr;

        border-radius: 20px;
    }

    /*
     * On mobile/tablet the image is intentionally first for
     * both login modes. The desktop left/right inversion is
     * retained only where there is enough horizontal space.
     */
    .login-shell .login-visual,
    .login-shell.is-common .login-visual {
        order: 1;

        min-height: 245px;
        height: 245px;
    }

    .login-shell .login-panel,
    .login-shell.is-common .login-panel {
        order: 2;

        min-height: 0;
    }

    .login-visual-image,
    .login-shell.is-department .login-visual-image,
    .login-shell.is-common .login-visual-image {
        background-position: center 45%;
    }

    .login-shell.is-common .login-visual-image {
        background-position: 52% 44%;
    }

    .login-visual-overlay {
        background:
            linear-gradient(
                180deg,
                rgba(6,25,61,.30) 0%,
                rgba(4,17,43,.84) 100%
            );
    }

    .visual-top {
        top: 18px;
        left: 20px;
        right: 20px;
    }

    .visual-brand {
        width: 48px;
        height: 48px;
        padding: 6px;
        border-radius: 11px;
    }

    .visual-academic-mark {
        width: 45px;
        height: 45px;
        padding: 5px;
        border-radius: 10px;
    }

    .visual-content {
        left: 25px;
        right: 25px;
        bottom: 27px;
    }

    .visual-kicker {
        margin-bottom: 8px;
        font-size: 8px;
    }

    .visual-content h1 {
        max-width: 560px;
        font-size: 31px;
    }

    .visual-content p {
        display: none;
    }

    .visual-meta {
        margin-top: 10px;
        font-size: 8px;
    }

    .visual-footer {
        display: none;
    }

    .login-panel-inner {
        width: min(430px, 100%);
        padding: 30px 32px 28px;
    }

    .login-mode-switch {
        margin-bottom: 25px;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .login-page {
        padding: 10px;
        align-items: flex-start;
    }

    .login-shell,
    .login-shell.is-department,
    .login-shell.is-common {
        width: 100%;
        margin: 0 auto;

        border-radius: 17px;

        box-shadow:
            0 22px 48px rgba(15,23,42,.12),
            0 5px 16px rgba(15,23,42,.05);
    }

    .login-shell .login-visual,
    .login-shell.is-common .login-visual {
        height: 205px;
        min-height: 205px;
    }

    .login-visual-image {
        transform: none !important;
        background-position: center center !important;
    }

    .login-visual-overlay {
        background:
            linear-gradient(
                180deg,
                rgba(6,25,61,.22) 0%,
                rgba(4,17,43,.86) 100%
            );
    }

    .visual-top {
        top: 13px;
        left: 14px;
        right: 14px;
    }

    .visual-brand {
        width: 40px;
        height: 40px;
        padding: 5px;
        border-radius: 9px;
    }

    .visual-academic-mark {
        width: 38px;
        height: 38px;
        padding: 4px;
        border-radius: 9px;
    }

    .visual-content {
        left: 19px;
        right: 19px;
        bottom: 19px;
    }

    .visual-kicker {
        margin-bottom: 6px;
        font-size: 6.5px;
        letter-spacing: .12em;
    }

    .kicker-line {
        width: 15px;
    }

    .visual-content h1 {
        max-width: 360px;
        font-size: 25px;
        line-height: .98;
    }

    .visual-meta {
        display: none;
    }

    .login-panel-inner {
        width: 100%;
        padding: 23px 19px 20px;
    }

    .login-mode-switch {
        margin-bottom: 21px;
        padding: 3px;
        border-radius: 9px;
    }

    .mode-option {
        min-height: 35px;
        font-size: 8px;
    }

    .mode-icon {
        width: 13px;
        height: 13px;
    }

    .mode-icon svg {
        width: 13px;
        height: 13px;
    }

    .login-heading {
        margin-bottom: 20px;
    }

    .heading-eyebrow {
        min-height: 19px;
        padding: 4px 7px;
        font-size: 6.5px;
    }

    .login-heading h2 {
        margin-top: 9px;
        font-size: 25px;
    }

    .login-heading p {
        font-size: 9px;
    }

    .department-steps {
        margin-bottom: 18px;
    }

    .department-step-number {
        width: 23px;
        height: 23px;
        flex-basis: 23px;
    }

    .department-step strong {
        font-size: 6.5px;
    }

    .department-step small {
        font-size: 5.5px;
    }

    .department-step-line {
        margin: 0 6px;
    }

    .portal-field {
        margin-bottom: 13px;
    }

    .portal-field label,
    .field-label-row label {
        font-size: 8px;
    }

    .field-hint {
        font-size: 6.5px;
    }

    .portal-input {
        height: 42px;
        font-size: 9.5px;
    }

    .portal-submit {
        min-height: 42px;
    }

    .secure-note {
        margin-top: 11px;
        font-size: 6.5px;
    }

    .login-panel-footer {
        margin-top: 15px;
        padding-top: 10px;
        font-size: 6.5px;
    }
}

/* Very small phones */
@media (max-width: 390px) {
    .login-page {
        padding: 7px;
    }

    .login-shell,
    .login-shell.is-department,
    .login-shell.is-common {
        border-radius: 14px;
    }

    .login-shell .login-visual,
    .login-shell.is-common .login-visual {
        height: 180px;
        min-height: 180px;
    }

    .visual-content {
        left: 17px;
        right: 17px;
        bottom: 17px;
    }

    .visual-content h1 {
        font-size: 22px;
    }

    .login-panel-inner {
        padding: 20px 16px 17px;
    }

    .login-mode-switch {
        margin-bottom: 19px;
    }

    .mode-option {
        font-size: 7.5px;
    }

    .login-heading h2 {
        font-size: 23px;
    }

    .login-heading p {
        font-size: 8.5px;
    }

    .department-step strong,
    .department-step small {
        display: none;
    }

    .department-step-number {
        width: 25px;
        height: 25px;
        flex-basis: 25px;
    }

    .department-step-line {
        margin: 0 7px;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .login-shell,
    .login-visual-image,
    .portal-submit,
    .mode-option {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- Print safety ---------- */
@media print {
    .login-page {
        display: none !important;
    }
}


/* ================================================================
   FINAL LOGIN FIX — DESKTOP FORM BRAND
   The HCC logo shown inside the form panel is a mobile-only
   element. On desktop it must NOT consume vertical space.
   ================================================================ */

.login-mobile-brand {
    display: none !important;
}

/* Desktop / laptop: keep the form compact and vertically centered */
@media (min-width: 981px) {
    .login-panel {
        overflow: hidden;
    }

    .login-panel-inner {
        max-height: 100%;
        overflow: hidden;
    }

    .login-mobile-brand {
        display: none !important;
    }

    .login-mode-switch {
        margin-top: 0;
    }
}

/* Tablet / mobile: show the small institutional brand */
@media (max-width: 980px) {
    .login-mobile-brand {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 10px;

        margin: 0 auto 20px;
        text-align: left;
    }

    .login-mobile-brand img {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
        object-fit: contain;
    }

    .login-mobile-brand strong,
    .login-mobile-brand span {
        display: block;
    }

    .login-mobile-brand strong {
        color: #0F172A;
        font-size: 12px;
        line-height: 1.2;
        font-weight: 800;
    }

    .login-mobile-brand span {
        margin-top: 2px;
        color: #64748B;
        font-size: 8px;
        line-height: 1.25;
        font-weight: 500;
    }
}

/* Small phones */
@media (max-width: 640px) {
    .login-mobile-brand {
        margin-bottom: 16px;
    }

    .login-mobile-brand img {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .login-mobile-brand strong {
        font-size: 10px;
    }

    .login-mobile-brand span {
        font-size: 7px;
    }
}


/* ================================================================
   FINAL VISIBILITY / READABILITY PASS
   The previous compact pass made the login typography too small.
   These values restore a clear institutional desktop UI while
   keeping the split-screen proportions.
   ================================================================ */

/* Main form column */
@media (min-width: 981px) {
    .login-panel-inner {
        width: min(100%, 430px);
        padding: 38px 42px 30px;
    }

    .login-mode-switch {
        margin-bottom: 30px;
    }

    .mode-option {
        min-height: 42px;
        gap: 8px;
        padding: 0 10px;
        font-size: 11px;
    }

    .mode-icon,
    .mode-icon svg {
        width: 16px;
        height: 16px;
    }

    .login-heading {
        margin-bottom: 25px;
    }

    .heading-eyebrow {
        min-height: 23px;
        padding: 5px 9px;
        font-size: 8px;
    }

    .login-heading h2 {
        margin: 12px 0 7px;
        font-size: 30px;
        line-height: 1.08;
    }

    .login-heading p {
        max-width: 390px;
        font-size: 12px;
        line-height: 1.55;
    }

    .portal-field {
        margin-bottom: 18px;
    }

    .portal-field label,
    .field-label-row label {
        margin-bottom: 7px;
        font-size: 10px;
    }

    .field-label-row {
        margin-bottom: 7px;
    }

    .field-hint {
        font-size: 8px;
    }

    .portal-input {
        height: 48px;
        padding-left: 42px;
        padding-right: 14px;
        border-radius: 9px;
        font-size: 12px;
    }

    .portal-input-icon {
        left: 13px;
        width: 17px;
        height: 17px;
    }

    .portal-input-icon svg {
        width: 17px;
        height: 17px;
    }

    .portal-input-wrap.has-toggle .portal-input {
        padding-right: 48px;
    }

    .password-toggle {
        right: 7px;
        width: 34px;
        height: 34px;
    }

    .password-toggle svg {
        width: 17px;
        height: 17px;
    }

    .select-chevron,
    .select-chevron svg {
        width: 17px;
        height: 17px;
    }

    .select-chevron {
        right: 12px;
    }

    .portal-select {
        padding-right: 43px;
    }

    .portal-submit {
        min-height: 48px;
        margin-top: 3px;
        border-radius: 9px;
        font-size: 12px;
    }

    .portal-submit svg {
        width: 16px;
        height: 16px;
    }

    .department-steps {
        margin-bottom: 24px;
    }

    .department-step {
        gap: 8px;
    }

    .department-step-number {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        font-size: 9px;
    }

    .department-step strong {
        font-size: 9px;
    }

    .department-step small {
        font-size: 8px;
    }

    .department-step-line {
        margin: 0 10px;
    }

    .verified-context {
        margin-bottom: 18px;
        padding: 11px 12px;
    }

    .verified-context-icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .verified-context-copy span {
        font-size: 8px;
    }

    .verified-context-copy strong {
        font-size: 11px;
    }

    .verified-badge {
        padding: 4px 7px;
        font-size: 7px;
    }

    .start-over {
        margin-top: 14px;
        font-size: 10px;
    }

    .secure-note {
        margin-top: 17px;
        font-size: 8px;
    }

    .login-panel-footer {
        margin-top: 21px;
        padding-top: 14px;
        font-size: 8px;
    }
}

/* Correct the short-height desktop override as well */
@media (min-width: 981px) and (max-height: 760px) {
    .login-panel-inner {
        padding-top: 27px;
        padding-bottom: 24px;
    }

    .login-mode-switch {
        margin-bottom: 24px;
    }

    .login-heading {
        margin-bottom: 20px;
    }

    .login-heading h2 {
        font-size: 28px;
    }

    .portal-field {
        margin-bottom: 14px;
    }

    .portal-input {
        height: 45px;
    }

    .portal-submit {
        min-height: 45px;
    }

    .department-steps {
        margin-bottom: 19px;
    }

    .secure-note {
        margin-top: 11px;
    }

    .login-panel-footer {
        margin-top: 14px;
        padding-top: 10px;
    }
}

/* Tablet */
@media (max-width: 980px) {
    .login-panel-inner {
        width: min(100%, 440px);
        padding: 32px 34px 30px;
    }

    .mode-option {
        min-height: 42px;
        font-size: 11px;
    }

    .login-heading h2 {
        font-size: 29px;
    }

    .login-heading p {
        font-size: 11px;
    }

    .portal-field {
        margin-bottom: 17px;
    }

    .portal-field label,
    .field-label-row label {
        font-size: 10px;
    }

    .field-hint {
        font-size: 8px;
    }

    .portal-input {
        height: 47px;
        font-size: 12px;
    }

    .portal-submit {
        min-height: 47px;
        font-size: 12px;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .login-panel-inner {
        width: 100%;
        padding: 25px 20px 22px;
    }

    .mode-option {
        min-height: 40px;
        font-size: 10px;
    }

    .login-heading h2 {
        font-size: 26px;
    }

    .login-heading p {
        font-size: 10px;
    }

    .portal-field {
        margin-bottom: 15px;
    }

    .portal-field label,
    .field-label-row label {
        font-size: 9px;
    }

    .portal-input {
        height: 45px;
        font-size: 11px;
    }

    .portal-submit {
        min-height: 45px;
        font-size: 11px;
    }

    .department-step-number {
        width: 27px;
        height: 27px;
        flex-basis: 27px;
        font-size: 8px;
    }

    .department-step strong {
        font-size: 8px;
    }

    .department-step small {
        font-size: 7px;
    }
}

/* Native select options should remain readable */
.portal-select,
.portal-select option {
    font-size: 13px;
}

.portal-select option {
    padding: 7px 10px;
}

/* Prevent browser validation tooltip from being confused with
   the design; native validation remains enabled for functionality. */
.portal-input:invalid:not(:placeholder-shown) {
    border-color: #D7E0EC;
    box-shadow: none;
}
