:root {
    --midnight: #0D182A;
    --midnight-2: #13233A;
    --midnight-3: #172B45;
    --ink: #102033;
    --muted: #64748B;
    --muted-2: #94A3B8;
    --line: #E2E8F0;
    --line-2: #EEF2F7;
    --panel: #FFFFFF;
    --soft: #F8FAFC;
    --orange: #FF8C00;
    --orange-2: #F97316;
    --orange-soft: rgba(255, 140, 0, 0.14);
    --blue: #00AEEF;
    --blue-2: #0284C7;
    --blue-soft: rgba(0, 174, 239, 0.13);
    --green: #16A34A;
    --red: #DC2626;
    --shadow: 0 26px 80px rgba(0, 0, 0, 0.30);
    --radius-lg: 30px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 18%, rgba(0, 174, 239, 0.22), transparent 28%),
        radial-gradient(circle at 86% 72%, rgba(255, 140, 0, 0.22), transparent 26%),
        linear-gradient(135deg, #071120 0%, var(--midnight) 46%, #142844 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.055) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-shell {
    width: min(1180px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 430px;
    gap: 22px;
    align-items: stretch;
}

.auth-brand,
.auth-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.auth-brand {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    padding: 38px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(13, 24, 42, 0.97) 0%, rgba(19, 35, 58, 0.94) 48%, rgba(13, 24, 42, 0.98) 100%);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-brand::before,
.auth-brand::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(1px);
    pointer-events: none;
}

.auth-brand::before {
    width: 420px;
    height: 420px;
    right: -160px;
    top: -120px;
    background: radial-gradient(circle, rgba(0,174,239,0.36), transparent 64%);
}

.auth-brand::after {
    width: 360px;
    height: 360px;
    left: -140px;
    bottom: -130px;
    background: radial-gradient(circle, rgba(255,140,0,0.32), transparent 63%);
}

.brand-topline,
.brand-copy,
.brand-highlights,
.brand-footer {
    position: relative;
    z-index: 1;
}

.brand-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.brand-pill,
.brand-version {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    color: #DDF5FF;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-version {
    color: #FFE6C7;
    background: rgba(255,140,0,0.12);
}

.brand-copy {
    max-width: 720px;
    margin: 44px 0 28px;
}

.brand-copy h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 0.96;
    letter-spacing: -2.8px;
}

.brand-copy p {
    max-width: 670px;
    margin: 20px 0 0;
    color: #D5E1EA;
    font-size: 16px;
    line-height: 1.68;
}

.brand-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: auto;
}

.highlight-card {
    min-height: 132px;
    padding: 17px;
    border-radius: 20px;
    background: rgba(255,255,255,0.075);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(14px);
}

.highlight-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    margin-bottom: 12px;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    background: linear-gradient(135deg, rgba(0,174,239,0.82), rgba(255,140,0,0.82));
    box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}

.highlight-card strong {
    display: block;
    color: #fff;
    font-size: 14px;
    letter-spacing: -0.15px;
}

.highlight-card small {
    display: block;
    margin-top: 6px;
    color: #C8D3DE;
    font-size: 12.5px;
    line-height: 1.45;
}

.brand-footer {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.brand-footer span {
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(0,174,239,0.10);
    color: #DDF5FF;
    border: 1px solid rgba(0,174,239,0.22);
    font-size: 12px;
    font-weight: 800;
}

.auth-card {
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(255,255,255,0.58);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 680px;
}

.auth-logo-wrap {
    width: min(250px, 100%);
    min-height: 92px;
    margin: 0 auto 24px;
    padding: 11px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.auth-logo-wrap img {
    display: block;
    max-width: 205px;
    width: 100%;
    height: auto;
}

.auth-heading {
    text-align: left;
    margin-bottom: 18px;
}

.eyebrow {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: #0369A1;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-heading h2 {
    margin: 12px 0 0;
    color: var(--midnight);
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: -1px;
}

.auth-heading p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0 0 14px;
    padding: 12px 13px;
    border-radius: 15px;
    font-size: 13px;
    line-height: 1.45;
}

.alert-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-top: 5px;
    border-radius: 999px;
}

.alert-error {
    color: #7F1D1D;
    background: #FEF2F2;
    border: 1px solid #FECACA;
}

.alert-error .alert-dot {
    background: var(--red);
}

.alert-success {
    color: #14532D;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
}

.alert-success .alert-dot {
    background: var(--green);
}

.login-form {
    margin-top: 2px;
}

.form-group {
    margin-bottom: 15px;
}

label,
.label-row a {
    font-size: 12px;
    font-weight: 900;
}

label {
    display: block;
    margin-bottom: 7px;
    color: var(--midnight);
}

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

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

.label-row a {
    color: var(--blue-2);
    text-decoration: none;
}

.label-row a:hover {
    text-decoration: underline;
}

.input-shell {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--muted-2);
    font-size: 13px;
    font-weight: 900;
    pointer-events: none;
}

input {
    width: 100%;
    height: 50px;
    border: 1px solid #CBD5E1;
    border-radius: 16px;
    padding: 0 14px 0 40px;
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder {
    color: #A0AEC0;
}

input:focus {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 5px var(--blue-soft);
}

.password-toggle {
    position: absolute;
    right: 7px;
    height: 36px;
    min-width: 58px;
    border: 0;
    border-radius: 12px;
    background: var(--soft);
    color: var(--midnight-2);
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.password-toggle:hover {
    background: #EAF0F6;
}

input[type="password"],
input[type="text"] {
    padding-right: 76px;
}

.btn-primary {
    width: 100%;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 2px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--orange), var(--orange-2));
    color: #fff;
    font-size: 14px;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.28);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    filter: saturate(1.04);
    box-shadow: 0 18px 38px rgba(249, 115, 22, 0.34);
}

.btn-primary:active {
    transform: translateY(0);
}

.security-note {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin-top: 18px;
    padding: 13px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #F8FAFC, #FFFFFF);
    border: 1px solid var(--line);
}

.security-note strong {
    color: var(--midnight);
    font-size: 12px;
    font-weight: 950;
}

.security-note span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.demo-box {
    margin-top: 14px;
    padding: 13px 14px;
    border-radius: 16px;
    background: #FFF7ED;
    border: 1px solid #FED7AA;
    color: #7C2D12;
}

.demo-box summary {
    cursor: pointer;
    font-size: 12px;
    font-weight: 950;
}

.demo-box p {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.45;
}

.auth-footnote {
    margin: 18px 0 0;
    color: var(--muted-2);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 1040px) {
    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 720px;
    }

    .auth-brand,
    .auth-card {
        min-height: auto;
    }

    .auth-brand {
        padding: 30px;
    }

    .brand-copy {
        margin: 34px 0 24px;
    }
}

@media (max-width: 640px) {
    .auth-page {
        padding: 14px;
    }

    .auth-brand,
    .auth-card {
        border-radius: 22px;
        padding: 22px;
    }

    .brand-topline {
        align-items: flex-start;
        flex-direction: column;
    }

    .brand-copy h1 {
        font-size: 34px;
        letter-spacing: -1.4px;
    }

    .brand-copy p {
        font-size: 14px;
    }

    .brand-highlights {
        grid-template-columns: 1fr;
    }

    .highlight-card {
        min-height: auto;
    }

    .auth-heading h2 {
        font-size: 26px;
    }

    .auth-logo-wrap {
        max-width: 220px;
        min-height: 82px;
    }
}

@media (max-height: 760px) and (min-width: 1041px) {
    .auth-page {
        padding: 16px;
    }

    .auth-brand,
    .auth-card {
        min-height: calc(100vh - 32px);
    }

    .auth-brand {
        padding: 28px;
    }

    .brand-copy {
        margin: 28px 0 18px;
    }

    .brand-copy h1 {
        font-size: 44px;
    }

    .highlight-card {
        min-height: 112px;
        padding: 14px;
    }

    .auth-card {
        padding: 24px;
    }

    .auth-logo-wrap {
        margin-bottom: 16px;
    }

    .auth-heading h2 {
        font-size: 26px;
    }
}
