:root {
    --dash-navy-950: #051836;
    --dash-navy-900: #082451;
    --dash-blue-600: #0866aa;
    --dash-ink: #112746;
    --dash-muted: #60718a;
    --dash-line: #dbe4ef;
    --dash-surface: rgba(255, 255, 255, 0.96);
    --dash-focus: #0a74b8;
}

* {
    box-sizing: border-box;
}

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

.dash-login-body {
    min-height: 100vh;
    min-height: 100svh;
    color: var(--dash-ink);
    background: var(--dash-navy-950);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.dash-login-body button,
.dash-login-body input {
    font: inherit;
}

.dash-login-page {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(420px, 0.72fr);
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
}

.dash-login-backdrop {
    position: absolute;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(circle at 18% 8%, rgba(26, 149, 209, 0.38), transparent 33%),
        radial-gradient(circle at 63% 78%, rgba(13, 102, 170, 0.36), transparent 38%),
        linear-gradient(135deg, #061a3b 0%, #0a3971 54%, #061c41 100%);
}

.dash-login-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(110deg, transparent 0 54%, rgba(2, 18, 43, 0.32) 72% 100%),
        radial-gradient(circle at 50% 50%, transparent 20%, rgba(1, 12, 31, 0.25) 100%);
}

.dash-login-pattern {
    position: absolute;
    inset: 0 35% 0 0;
    z-index: -2;
    pointer-events: none;
}

.dash-login-pattern-item {
    position: absolute;
    display: grid;
    gap: 12px;
    place-items: center;
    color: rgba(255, 255, 255, 0.56);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: clamp(0.55rem, 0.65vw, 0.72rem);
    font-weight: 700;
    opacity: var(--opacity, 0.22);
    transform: rotate(var(--rotate, 0deg));
}

.dash-login-pattern-item img {
    display: block;
    width: var(--size, 170px);
    max-width: 19vw;
    height: auto;
    filter: drop-shadow(0 12px 30px rgba(2, 15, 37, 0.22));
}

.dash-login-pattern-item:nth-child(1) { left: -3%; top: 2%; --size: 202px; --opacity: .18; --rotate: -8deg; }
.dash-login-pattern-item:nth-child(2) { left: 28%; top: 5%; --size: 172px; --opacity: .31; --rotate: 5deg; }
.dash-login-pattern-item:nth-child(3) { left: 62%; top: -7%; --size: 215px; --opacity: .16; --rotate: -4deg; }
.dash-login-pattern-item:nth-child(4) { left: 2%; top: 38%; --size: 165px; --opacity: .27; --rotate: 7deg; }
.dash-login-pattern-item:nth-child(5) { left: 36%; top: 35%; --size: 228px; --opacity: .20; --rotate: -5deg; }
.dash-login-pattern-item:nth-child(6) { left: 74%; top: 31%; --size: 180px; --opacity: .29; --rotate: 6deg; }
.dash-login-pattern-item:nth-child(7) { left: -4%; top: 73%; --size: 198px; --opacity: .16; --rotate: -5deg; }
.dash-login-pattern-item:nth-child(8) { left: 31%; top: 72%; --size: 175px; --opacity: .27; --rotate: 4deg; }
.dash-login-pattern-item:nth-child(9) { left: 69%; top: 72%; --size: 190px; --opacity: .17; --rotate: -3deg; }

.dash-login-intro {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 0;
    padding: clamp(40px, 6vw, 96px);
    color: white;
}

.dash-login-intro-copy {
    width: min(620px, 80%);
    padding: 30px 34px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    background: rgba(5, 27, 61, 0.48);
    box-shadow: 0 24px 80px rgba(0, 10, 31, 0.23);
    backdrop-filter: blur(15px);
}

.dash-login-eyebrow {
    margin: 0 0 12px;
    color: #8dd9f4;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.19em;
    text-transform: uppercase;
}

.dash-login-intro h1 {
    margin: 0;
    max-width: 520px;
    font-size: clamp(2.15rem, 4.1vw, 4.65rem);
    font-weight: 650;
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.dash-login-intro p:last-child {
    margin: 20px 0 0;
    max-width: 490px;
    color: rgba(255, 255, 255, 0.76);
    font-size: clamp(0.96rem, 1.25vw, 1.1rem);
    line-height: 1.65;
}

.dash-login-region {
    display: grid;
    min-width: 0;
    place-items: center;
    padding: clamp(24px, 5vw, 78px);
    background: var(--dash-surface);
    box-shadow: -30px 0 90px rgba(1, 14, 36, 0.22);
}

.dash-login-card {
    width: min(100%, 440px);
}

.dash-login-brand {
    display: inline-block;
    width: 200px;
    max-width: 58%;
    height: auto;
    margin-bottom: clamp(44px, 7vh, 78px);
}

.dash-login-card h2 {
    margin: 0;
    color: var(--dash-ink);
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.04em;
}

.dash-login-welcome {
    margin: 12px 0 34px;
    color: var(--dash-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.dash-login-field {
    position: relative;
    margin-top: 22px;
}

.dash-login-field label {
    display: block;
    margin: 0 0 9px;
    color: #40536e;
    font-size: 0.82rem;
    font-weight: 700;
}

.dash-login-input-wrap {
    position: relative;
}

.dash-login-input-wrap > svg {
    position: absolute;
    top: 50%;
    left: 17px;
    width: 20px;
    height: 20px;
    color: #7e8ea5;
    transform: translateY(-50%);
    pointer-events: none;
}

.dash-login-field input {
    width: 100%;
    height: 58px;
    padding: 0 48px;
    border: 1px solid var(--dash-line);
    border-radius: 13px;
    outline: none;
    color: var(--dash-ink);
    background: #f8fafc;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.dash-login-field input:hover {
    border-color: #b8c7d9;
    background: white;
}

.dash-login-field input:focus {
    border-color: var(--dash-focus);
    background: white;
    box-shadow: 0 0 0 4px rgba(10, 116, 184, 0.13);
}

.dash-login-password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    place-items: center;
    color: #64758d;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.dash-login-password-toggle:hover {
    color: var(--dash-blue-600);
    background: #eaf2f9;
}

.dash-login-password-toggle svg {
    position: static;
    width: 20px;
    height: 20px;
    transform: none;
}

.dash-login-submit {
    position: relative;
    display: inline-flex;
    width: 100%;
    height: 58px;
    margin-top: 34px;
    border: 0;
    border-radius: 13px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: white;
    background: linear-gradient(120deg, #123c80, #087eb9);
    box-shadow: 0 15px 35px rgba(9, 86, 147, 0.25);
    font-size: 1rem;
    font-weight: 750;
    cursor: pointer;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s, filter .2s;
}

.dash-login-submit::after {
    content: "";
    position: absolute;
    top: -40%;
    left: -34%;
    width: 22%;
    height: 180%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.88), transparent);
    filter: blur(0.5px);
    opacity: 0;
    pointer-events: none;
    transform: skewX(-18deg);
    animation: dash-login-button-sweep 17s ease-in-out infinite;
}

.dash-login-submit > * {
    position: relative;
    z-index: 1;
}

@keyframes dash-login-button-sweep {
    0% { left: -34%; opacity: 0; }
    4% { opacity: 1; }
    55% { left: 122%; opacity: 1; }
    59%, 100% { left: 122%; opacity: 0; }
}

.dash-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 19px 40px rgba(9, 86, 147, 0.31);
    filter: brightness(1.05);
}

.dash-login-submit:active {
    transform: translateY(0);
}

.dash-login-submit svg {
    width: 19px;
    height: 19px;
}

.dash-login-support {
    margin: 24px 0 0;
    color: #7a899e;
    font-size: 0.82rem;
    text-align: center;
}

.dash-login-support span {
    color: var(--dash-blue-600);
    font-weight: 700;
}

.dash-login-build-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 11px;
    margin: 12px 0 0;
    color: #8a97a9;
    font-size: 0.72rem;
    line-height: 1.5;
    text-align: center;
}

.dash-login-build-info span + span::before {
    content: "•";
    margin-right: 11px;
    color: #b2bdca;
}

.dash-login-build-number {
    color: #579bc5;
    font-weight: 800;
    letter-spacing: 0.025em;
}

.dash-login-current-ip {
    color: #62748d;
    font-variant-numeric: tabular-nums;
}

.dash-login-card .alert {
    margin: 0 0 18px;
    border-radius: 10px;
    font-size: 0.85rem;
}

@media (max-width: 920px) {
    .dash-login-page {
        grid-template-columns: 1fr;
        align-items: center;
        padding: 24px;
    }

    .dash-login-pattern {
        inset: 0;
    }

    .dash-login-pattern-item:nth-child(n+7) {
        display: none;
    }

    .dash-login-intro {
        display: none;
    }

    .dash-login-region {
        width: min(100%, 520px);
        margin: auto;
        border: 1px solid rgba(255, 255, 255, 0.48);
        border-radius: 25px;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 30px 85px rgba(0, 12, 34, 0.35);
        backdrop-filter: blur(18px);
    }

    .dash-login-brand {
        margin-bottom: 42px;
    }
}

@media (max-width: 560px) {
    .dash-login-page {
        padding: 14px;
    }

    .dash-login-pattern-item img {
        max-width: 38vw;
    }

    .dash-login-region {
        min-height: calc(100svh - 28px);
        padding: 34px 25px;
        border-radius: 20px;
    }

    .dash-login-brand {
        width: 172px;
        margin-bottom: 42px;
    }

    .dash-login-card h2 {
        font-size: 2rem;
    }

    .dash-login-build-info {
        display: grid;
    }

    .dash-login-build-info span + span::before {
        content: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
