:root {
    --login-night: #061521;
    --login-deep: #0a2434;
    --login-panel: #f5f7f9;
    --login-cyan: #45d4e8;
    --login-cyan-soft: #a5f3fc;
    --login-gold: #c99a45;
    --login-ink: #122130;
    --login-muted: #647483;
}

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    background: var(--login-night);
    color: var(--login-ink);
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(25rem, .85fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.data-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    isolation: isolate;
    overflow: hidden;
    min-width: 0;
    padding: clamp(2rem, 4vw, 4.5rem);
    color: #eefcff;
    background:
        radial-gradient(circle at 76% 24%, rgba(69, 212, 232, .17), transparent 29%),
        radial-gradient(circle at 12% 82%, rgba(201, 154, 69, .13), transparent 25%),
        linear-gradient(145deg, var(--login-night), var(--login-deep) 58%, #071a29);
}

.data-stage::before {
    position: absolute;
    z-index: -2;
    inset: 0;
    content: "";
    opacity: .2;
    background-image:
        linear-gradient(rgba(146, 220, 230, .16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(146, 220, 230, .16) 1px, transparent 1px);
    background-size: 3.5rem 3.5rem;
    mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

.data-stage::after {
    position: absolute;
    z-index: -1;
    top: -18%;
    right: -14%;
    width: 35rem;
    height: 35rem;
    border: 1px solid rgba(69, 212, 232, .14);
    border-radius: 50%;
    content: "";
    box-shadow:
        0 0 0 5rem rgba(69, 212, 232, .025),
        0 0 0 10rem rgba(69, 212, 232, .018);
}

.stage-header,
.stage-copy,
.stage-footer {
    position: relative;
    z-index: 5;
}

.stage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.stage-brand {
    display: inline-flex;
    align-items: center;
    width: min(15rem, 55%);
    min-height: 3.75rem;
    padding: .5rem .75rem;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 1.25rem 4rem rgba(0, 0, 0, .16);
}

.stage-brand img {
    display: block;
    width: 100%;
    height: auto;
}

.live-status {
    display: inline-flex;
    align-items: center;
    gap: .625rem;
    color: #c8f7fb;
    font-size: .75rem;
    font-weight: 700;
}

.live-dot {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: var(--login-cyan);
    box-shadow: 0 0 0 .3rem rgba(69, 212, 232, .12), 0 0 1.25rem var(--login-cyan);
}

.stage-copy {
    width: min(34rem, 58%);
    margin-block: auto;
    padding-block: clamp(4rem, 11vh, 8rem);
}

.stage-kicker,
.access-kicker {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0 0 1.25rem;
    color: var(--login-gold);
    font-size: .75rem;
    font-weight: 800;
}

.stage-kicker::before,
.access-kicker::before {
    width: 2rem;
    height: 2px;
    content: "";
    background: currentColor;
}

.stage-title {
    margin: 0;
    color: #f8feff;
    font-size: clamp(2.75rem, 4.25vw, 4.65rem);
    font-weight: 900;
    line-height: 1.28;
    letter-spacing: 0;
}

.stage-title-line {
    display: block;
    text-wrap: balance;
}

.stage-title-line--accent {
    margin-top: .05em;
    color: var(--login-cyan-soft);
    font-size: .88em;
    font-weight: 700;
}

.stage-lead {
    max-width: 32rem;
    margin: 1.35rem 0 0;
    color: #abc6d1;
    font-size: clamp(.95rem, 1.2vw, 1.12rem);
    line-height: 1.75;
}

.stage-topics {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1.4rem;
}

.stage-topics span {
    padding: .35rem .7rem;
    border: 1px solid rgba(165, 243, 252, .2);
    border-radius: 999px;
    background: rgba(8, 35, 51, .72);
    color: #c4e8ed;
    font-size: .73rem;
    font-weight: 700;
}

.analytics-canvas {
    position: absolute;
    z-index: 1;
    right: -5%;
    bottom: 2%;
    width: min(50vw, 49rem);
    aspect-ratio: 8 / 5;
    opacity: .86;
    pointer-events: none;
}

.analytics-canvas svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.chart-grid line { stroke: rgba(143, 211, 223, .12); stroke-width: 1; }
.chart-axis { stroke: rgba(165, 243, 252, .26); stroke-width: 1.5; }
.chart-area { fill: url(#areaGradient); opacity: .7; }
.chart-line { fill: none; stroke: var(--login-cyan); stroke-width: 3; filter: url(#cyanGlow); }
.chart-line-ghost { fill: none; stroke: rgba(201, 154, 69, .55); stroke-width: 1.5; stroke-dasharray: 4 10; }
.data-node { fill: #071a29; stroke: var(--login-cyan-soft); stroke-width: 2; }
.data-node-core { fill: #fff; }
.chart-bar { fill: url(#barGradient); transform-box: fill-box; transform-origin: center bottom; }
.orbit-ring { fill: none; stroke: rgba(165, 243, 252, .22); stroke-width: 1; stroke-dasharray: 2 8; }
.orbit-dot { fill: var(--login-gold); filter: url(#goldGlow); }

.metric-card {
    position: absolute;
    z-index: 4;
    min-width: 10rem;
    padding: .85rem 1rem;
    border: 1px solid rgba(165, 243, 252, .17);
    background: rgba(5, 25, 38, .72);
    color: #dffcff;
    box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, .2);
    backdrop-filter: blur(12px);
}

.metric-card--quality { top: 22%; right: 7%; }
.metric-card--coverage { right: 30%; bottom: 12%; }
.metric-card--signal { right: 5%; bottom: 31%; }
.metric-label { display: block; color: #a9cddb; font-size: .75rem; font-weight: 700; }
.metric-value { display: block; margin-top: .25rem; color: #f4feff; font-size: 1.4rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.metric-value small { color: var(--login-cyan); font-size: .75rem; font-weight: 700; }

.stage-footer {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #7799a6;
    font-size: .78rem;
}

.stage-footer::before {
    width: 2.5rem;
    height: 1px;
    content: "";
    background: var(--login-gold);
}

.access-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: clamp(2rem, 5vw, 5rem);
    background:
        radial-gradient(circle at 100% 0, rgba(69, 212, 232, .1), transparent 32%),
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(241, 245, 247, .98)),
        var(--login-panel);
}

.access-panel::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    content: "";
    background: linear-gradient(transparent, rgba(69, 212, 232, .65), transparent);
}

.login-card {
    position: relative;
    width: min(100%, 31rem);
    padding: clamp(1.75rem, 3vw, 2.5rem);
    overflow: hidden;
    border: 1px solid #e0e7eb;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 1.75rem 5rem rgba(19, 48, 65, .1);
    backdrop-filter: blur(16px);
}

.login-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: .25rem;
    content: "";
    background: linear-gradient(90deg, var(--login-gold), var(--login-cyan));
}
.mobile-brand { display: none; }

.access-title {
    margin: 0;
    color: var(--login-ink);
    font-size: clamp(2rem, 2.6vw, 2.75rem);
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: 0;
    text-wrap: balance;
}

.access-description {
    margin: 1rem 0 2rem;
    color: var(--login-muted);
    font-size: .96rem;
    line-height: 1.75;
}

.sso-button,
.public-button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 3.5rem;
    border: 1px solid transparent;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}

.sso-button {
    justify-content: center;
    padding: .8rem 1rem;
    border-color: #8c8c8c;
    background: #fff;
    color: #1f1f1f;
    box-shadow: 0 .75rem 2rem rgba(10, 36, 52, .12);
}

.button-copy { display: flex; align-items: center; gap: .85rem; font-size: .9rem; font-weight: 800; }
.microsoft-logo { display: block; width: 1.3rem; height: 1.3rem; flex: 0 0 auto; }

.public-button {
    justify-content: center;
    gap: .65rem;
    margin-top: .75rem;
    padding: .75rem 1rem;
    border-color: #d8e1e7;
    background: rgba(255, 255, 255, .7);
    color: #315365;
    font-size: .86rem;
    font-weight: 800;
}

.sso-button:hover { transform: translateY(-2px); border-color: #555; background: #fff; box-shadow: 0 1.2rem 3rem rgba(10, 36, 52, .18); }
.public-button:hover { transform: translateY(-2px); border-color: #9acbd4; background: #fff; }
.sso-button:focus-visible,
.public-button:focus-visible,
.support-link:focus-visible { outline: 3px solid rgba(23, 142, 161, .38); outline-offset: 3px; }

.access-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 1.5rem;
    padding-block: 1.25rem;
    border-block: 1px solid #dfe6eb;
}

.meta-item { display: flex; align-items: center; gap: .65rem; color: #5f7280; font-size: .76rem; font-weight: 700; }
.meta-icon { display: grid; place-items: center; width: 2rem; height: 2rem; flex: 0 0 auto; background: #e7f5f6; color: #14788a; }

.support-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.35rem;
    color: #788894;
    font-size: .76rem;
    line-height: 1.6;
}

.support-row strong { display: block; color: #344b5b; }
.support-link { color: #176f81; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.access-footer { position: absolute; right: 2rem; bottom: 1.5rem; color: #5c6b76; font-size: .75rem; }

.data-flow-path {
    stroke-dasharray: 16 10;
    animation: data-flow 5s linear infinite;
}

.chart-bar { animation: bar-rise 1.2s cubic-bezier(.2, .8, .2, 1) both; }
.chart-bar:nth-of-type(2) { animation-delay: .12s; }
.chart-bar:nth-of-type(3) { animation-delay: .24s; }
.chart-bar:nth-of-type(4) { animation-delay: .36s; }
.chart-bar:nth-of-type(5) { animation-delay: .48s; }
.chart-bar:nth-of-type(6) { animation-delay: .6s; }
.data-node-core { animation: node-pulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.orbit-system { animation: orbit-spin 22s linear infinite; transform-origin: 615px 170px; }
.live-dot { animation: live-pulse 2s ease-out infinite; }
.metric-card { animation: metric-float 5s ease-in-out infinite; }
.metric-card--coverage { animation-delay: -1.7s; }
.metric-card--signal { animation-delay: -3.1s; }

.analytics-canvas::after {
    position: absolute;
    inset: 8% 4%;
    content: "";
    background: linear-gradient(to bottom, transparent 44%, rgba(69, 212, 232, .12) 50%, transparent 56%);
    transform: translateY(-55%);
    animation: stage-scan 7s ease-in-out infinite;
}

@keyframes data-flow {
    to { stroke-dashoffset: -104; }
}

@keyframes metric-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-.65rem); }
}

@keyframes bar-rise {
    from { transform: scaleY(.04); opacity: .15; }
    to { transform: scaleY(1); opacity: 1; }
}

@keyframes node-pulse {
    0%, 100% { transform: scale(.75); opacity: .6; }
    50% { transform: scale(1.35); opacity: 1; }
}

@keyframes live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(69, 212, 232, .45), 0 0 1.25rem var(--login-cyan); }
    75%, 100% { box-shadow: 0 0 0 .55rem rgba(69, 212, 232, 0), 0 0 1.25rem var(--login-cyan); }
}

@keyframes orbit-spin {
    to { transform: rotate(360deg); }
}

@keyframes stage-scan {
    0%, 15% { transform: translateY(-55%); opacity: 0; }
    35%, 70% { opacity: 1; }
    85%, 100% { transform: translateY(55%); opacity: 0; }
}

@media (max-width: 1279px) {
    .login-shell { grid-template-columns: minmax(0, 1.25fr) minmax(23rem, .75fr); }
    .stage-copy { width: min(32rem, 62%); }
    .metric-card--coverage { right: 25%; }
}

@media (max-width: 1023px) {
    .login-shell { display: block; }
    .data-stage { min-height: 31rem; padding: 2rem clamp(1.5rem, 6vw, 4rem); }
    .stage-copy { width: min(32rem, 68%); padding-block: 3.5rem 6.5rem; }
    .stage-title { font-size: clamp(2.6rem, 7vw, 4rem); }
    .analytics-canvas { right: -7%; bottom: -4%; width: min(75vw, 42rem); }
    .metric-card--quality { top: 25%; right: 4%; }
    .metric-card--signal { right: 4%; bottom: 17%; }
    .metric-card--coverage { right: 31%; bottom: 5%; }
    .access-panel { min-height: 39rem; padding: 4.5rem clamp(1.5rem, 8vw, 5rem) 6rem; }
    .access-panel::before { width: 100%; height: 1px; background: linear-gradient(90deg, transparent, rgba(69, 212, 232, .65), transparent); }
    .access-footer { right: 50%; transform: translateX(50%); white-space: nowrap; }
}

@media (max-width: 639px) {
    .data-stage { min-height: 28rem; padding: 1.25rem; }
    .stage-brand { width: 11rem; min-height: 3rem; }
    .live-status { font-size: .75rem; }
    .stage-copy { width: 100%; padding-block: 3.5rem 8rem; }
    .stage-kicker { margin-bottom: 1rem; font-size: .75rem; }
    .stage-title { font-size: clamp(2.25rem, 10.5vw, 3.25rem); line-height: 1.3; }
    .stage-lead { max-width: 28rem; margin-top: 1.25rem; font-size: .9rem; line-height: 1.65; }
    .analytics-canvas { right: -28%; bottom: -3%; width: 135vw; opacity: .58; }
    .metric-card { min-width: 8rem; padding: .65rem .75rem; }
    .metric-card--quality { top: auto; right: 1.25rem; bottom: 1.75rem; }
    .metric-card--coverage,
    .metric-card--signal { display: none; }
    .metric-value { font-size: 1.1rem; }
    .stage-footer { display: none; }
    .access-panel { min-height: 37rem; padding: 3.5rem 1.25rem 5rem; }
    .login-card { padding: 1.5rem; border-radius: 1rem; }
    .access-title { font-size: 2rem; line-height: 1.4; }
    .access-meta { grid-template-columns: 1fr; }
    .support-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .data-flow-path,
    .chart-bar,
    .data-node-core,
    .orbit-system,
    .live-dot,
    .metric-card,
    .analytics-canvas::after {
        animation: none !important;
    }

    .sso-button,
    .public-button {
        transition-duration: .01ms;
    }
}
