:root {
    --navy-950: #061727;
    --navy-900: #0a2136;
    --navy-800: #123a57;
    --blue-600: #1479c9;
    --blue-500: #1e91e6;
    --blue-100: #e7f4ff;
    --slate-900: #142333;
    --slate-600: #5d6b79;
    --slate-400: #94a0ab;
    --slate-200: #dce3e9;
    --slate-100: #eef2f5;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
}

body {
    background: #f4f7f9;
    color: var(--slate-900);
    font-family: "DM Sans", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(440px, 1.08fr) minmax(460px, 0.92fr);
    min-height: 100vh;
}

.login-visual {
    isolation: isolate;
    overflow: hidden;
    padding: 52px 64px;
    position: relative;
    background:
        linear-gradient(110deg, rgba(4, 23, 39, 0.92) 0%, rgba(5, 35, 57, 0.78) 48%, rgba(6, 37, 60, 0.42) 100%),
        url("/static/images/login_background.jpeg") center / cover no-repeat;
}

.login-visual::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 44px 44px;
    content: "";
    inset: 0;
    mask-image: linear-gradient(to bottom, black, transparent 75%);
    position: absolute;
    z-index: -1;
}

.visual-overlay {
    background: radial-gradient(circle at 74% 44%, rgba(34, 164, 238, 0.18), transparent 32%);
    inset: 0;
    position: absolute;
    z-index: -1;
}

.brand,
.mobile-brand {
    align-items: center;
    display: flex;
    font-family: "Manrope", sans-serif;
    font-size: 20px;
    font-weight: 800;
    gap: 12px;
    letter-spacing: -0.4px;
}

.brand {
    color: var(--white);
}

.brand-mark {
    align-items: center;
    background: var(--blue-500);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(4, 21, 35, 0.28);
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.brand-mark svg {
    fill: none;
    height: 25px;
    stroke: var(--white);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
    width: 25px;
}

.visual-copy {
    left: 64px;
    max-width: 590px;
    position: absolute;
    top: 50%;
    transform: translateY(-45%);
}

.eyebrow,
.portal-label {
    color: #66c5ff;
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.8px;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.visual-copy h1 {
    color: var(--white);
    font-family: "Manrope", sans-serif;
    font-size: clamp(44px, 4.5vw, 68px);
    font-weight: 700;
    letter-spacing: -2.8px;
    line-height: 1.05;
    max-width: 620px;
}

.visual-copy > p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 17px;
    line-height: 1.7;
    margin-top: 24px;
    max-width: 520px;
}

.mode-list {
    display: flex;
    gap: 28px;
    margin-top: 40px;
}

.mode-list span {
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    font-size: 13px;
    font-weight: 600;
    gap: 9px;
}

.mode-list svg {
    fill: none;
    height: 21px;
    stroke: #66c5ff;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
    width: 21px;
}

.route-line {
    align-items: center;
    bottom: 64px;
    display: flex;
    left: 64px;
    position: absolute;
    right: 64px;
}

.route-path {
    border-top: 1px dashed rgba(255, 255, 255, 0.3);
    flex: 1;
    margin: 0 8px;
}

.route-dot {
    background: var(--white);
    border: 4px solid rgba(30, 145, 230, 0.45);
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(30, 145, 230, 0.12);
    height: 12px;
    width: 12px;
}

.route-dot-end {
    background: #66c5ff;
}

.login-panel {
    align-items: center;
    background:
        radial-gradient(circle at 100% 0, rgba(30, 145, 230, 0.08), transparent 30%),
        var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px clamp(48px, 7vw, 112px) 36px;
    position: relative;
}

.mobile-brand {
    color: var(--navy-900);
    display: none;
}

.login-card {
    max-width: 440px;
    width: 100%;
}

.card-heading {
    margin-bottom: 38px;
}

.portal-label {
    color: var(--blue-600);
    margin-bottom: 13px;
}

.card-heading h2 {
    color: var(--navy-950);
    font-family: "Manrope", sans-serif;
    font-size: 38px;
    letter-spacing: -1.4px;
    line-height: 1.2;
}

.card-heading p {
    color: var(--slate-600);
    font-size: 15px;
    margin-top: 10px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    color: #314252;
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 9px;
}

.input-wrap {
    position: relative;
}

.input-wrap > svg {
    fill: none;
    height: 19px;
    left: 17px;
    stroke: var(--slate-400);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
    top: 50%;
    transform: translateY(-50%);
    width: 19px;
    position: absolute;
    z-index: 1;
}

.input-wrap input {
    background: #fbfcfd;
    border: 1px solid var(--slate-200);
    border-radius: 9px;
    color: var(--slate-900);
    font-size: 14px;
    height: 54px;
    outline: none;
    padding: 0 48px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
    width: 100%;
}

.input-wrap input::placeholder {
    color: #a0aab4;
}

.input-wrap input:hover {
    border-color: #b9c5cf;
}

.input-wrap input:focus {
    background: var(--white);
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px rgba(30, 145, 230, 0.11);
}

.input-wrap:focus-within > svg {
    stroke: var(--blue-600);
}

.password-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    height: 34px;
    justify-content: center;
    position: absolute;
    right: 10px;
    top: 10px;
    width: 34px;
}

.password-toggle:hover {
    background: var(--slate-100);
}

.password-toggle svg {
    fill: none;
    height: 19px;
    stroke: #7e8b97;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
    width: 19px;
}

.password-toggle .hide-icon {
    display: none;
}

.password-toggle[aria-pressed="true"] .show-icon {
    display: none;
}

.password-toggle[aria-pressed="true"] .hide-icon {
    display: block;
}

.login-button {
    align-items: center;
    background: linear-gradient(135deg, var(--blue-600), #0864ad);
    border: 0;
    border-radius: 9px;
    box-shadow: 0 12px 25px rgba(20, 121, 201, 0.22);
    color: var(--white);
    cursor: pointer;
    display: flex;
    font-size: 14px;
    font-weight: 700;
    height: 54px;
    justify-content: center;
    margin-top: 30px;
    position: relative;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
    width: 100%;
}

.login-button svg {
    fill: none;
    height: 18px;
    position: absolute;
    right: 20px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    transition: transform 160ms ease;
    width: 18px;
}

.login-button:hover {
    box-shadow: 0 15px 30px rgba(20, 121, 201, 0.3);
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.login-button:hover svg {
    transform: translateX(3px);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:focus-visible,
.password-toggle:focus-visible {
    outline: 3px solid rgba(30, 145, 230, 0.3);
    outline-offset: 2px;
}

.security-note {
    align-items: center;
    border-top: 1px solid var(--slate-100);
    color: #83909b;
    display: flex;
    font-size: 12px;
    gap: 8px;
    justify-content: center;
    margin-top: 34px;
    padding-top: 24px;
}

.security-note svg {
    fill: none;
    height: 16px;
    stroke: #7e9db4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 16px;
}

footer {
    align-items: center;
    bottom: 28px;
    color: #9aa4ad;
    display: flex;
    font-size: 11px;
    gap: 10px;
    position: absolute;
}

.footer-separator {
    background: #ccd3d9;
    border-radius: 50%;
    height: 3px;
    width: 3px;
}

#snackbar-container {
    font-family: "DM Sans", sans-serif;
}

@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: minmax(360px, 0.9fr) minmax(430px, 1.1fr);
    }

    .login-visual {
        padding: 44px;
    }

    .visual-copy {
        left: 44px;
        right: 44px;
    }

    .visual-copy h1 {
        font-size: 48px;
    }

    .route-line {
        left: 44px;
        right: 44px;
    }

    .login-panel {
        padding-left: 54px;
        padding-right: 54px;
    }
}

@media (max-width: 760px) {
    .login-shell {
        display: block;
    }

    .login-visual {
        display: none;
    }

    .login-panel {
        justify-content: flex-start;
        min-height: 100vh;
        padding: 42px 24px 90px;
    }

    .mobile-brand {
        align-self: flex-start;
        display: flex;
        margin-bottom: 70px;
    }

    .login-card {
        max-width: 460px;
    }
}

@media (max-width: 420px) {
    .login-panel {
        padding-top: 28px;
    }

    .mobile-brand {
        margin-bottom: 52px;
    }

    .card-heading {
        margin-bottom: 30px;
    }

    .card-heading h2 {
        font-size: 32px;
    }

    footer {
        bottom: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
