:root {
    --bg-top: #050b1a;
    --bg-mid: #071833;
    --bg-bottom: #030611;
    --accent-a: #00d0ff;
    --accent-b: #7071ff;
    --accent-c: #d700ff;
    --text: #f6fbff;
    --muted: #9db4cf;
    --panel: rgba(8, 18, 42, 0.72);
    --panel-soft: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.14);
    --radius: 28px;
    --density-gap: 18px;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: "Segoe UI", "Manrope", system-ui, sans-serif;
    background:
        radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--accent-a) 34%, transparent), transparent 34%),
        radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--accent-c) 24%, transparent), transparent 30%),
        linear-gradient(145deg, var(--bg-top), var(--bg-mid) 46%, var(--bg-bottom));
    overflow-x: hidden;
}

.dashboard-page {
    min-height: 100svh;
    overflow: hidden;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(circle at center, black, transparent 74%);
}

a {
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0 56px;
}

.dashboard-page .shell {
    display: grid;
    width: min(1920px, calc(100vw - clamp(28px, 4vw, 76px)));
    min-height: 100svh;
    grid-template-rows: auto auto minmax(0, 1fr);
    padding: clamp(22px, 3vh, 46px) 0;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
    padding: 30px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 10px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045));
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(24px);
}

.dashboard-page .hero {
    gap: clamp(18px, 2vw, 38px);
    align-items: center;
    padding: clamp(22px, 2.7vw, 46px);
    margin-bottom: clamp(14px, 2vh, 26px);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent-a);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 880px;
    margin-bottom: 14px;
    font-size: clamp(2.4rem, 7vw, 5.4rem);
    line-height: 0.95;
    letter-spacing: -0.035em;
}

.dashboard-page h1 {
    max-width: min(1180px, 78vw);
    font-size: clamp(3.2rem, 6.8vw, 8.8rem);
}

.gradient-text {
    display: inline-block;
    padding-right: 0.08em;
    background: linear-gradient(90deg, var(--accent-a), var(--accent-b) 55%, var(--accent-c));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-copy {
    max-width: 720px;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.75;
}

.dashboard-page .hero-copy {
    max-width: min(820px, 60vw);
    font-size: clamp(1rem, 1.15vw, 1.45rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    background: var(--panel-soft);
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent-a) 60%, white);
    background: rgba(255, 255, 255, 0.14);
}

.button-primary {
    border: 0;
    background: linear-gradient(90deg, var(--accent-a), var(--accent-b), var(--accent-c));
    color: #02101f;
    font-weight: 900;
}

.status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    color: var(--muted);
}

.dashboard-page .status-row {
    margin-bottom: clamp(14px, 1.8vh, 24px);
    font-size: clamp(0.86rem, 0.92vw, 1.08rem);
}

.live-pill {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #4cffb0;
    box-shadow: 0 0 20px #4cffb0;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: var(--density-gap);
}

.dashboard-page .account-grid {
    min-height: 0;
    grid-template-columns: repeat(auto-fit, minmax(clamp(240px, 16vw, 380px), 1fr));
    grid-auto-rows: auto;
    align-items: stretch;
}

.account-card {
    position: relative;
    display: grid;
    min-height: 245px;
    grid-template-rows: auto auto auto;
    align-content: start;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent),
        var(--panel);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(22px);
}

.dashboard-page .account-card {
    min-height: clamp(190px, 18vh, 260px);
    padding: clamp(20px, 2vw, 38px);
}

.platform-head {
    display: grid;
    min-height: 92px;
    gap: 8px;
    align-items: start;
    margin-bottom: 24px;
}

.dashboard-page .platform-head {
    min-height: clamp(96px, 8.2vw, 142px);
    gap: clamp(8px, 0.9vw, 16px);
    margin-bottom: clamp(12px, 1.6vh, 24px);
}

.platform-logo-wide {
    display: flex;
    width: min(100%, 230px);
    height: 58px;
    align-items: center;
    color: var(--text);
    overflow: visible;
}

.dashboard-page .platform-logo-wide {
    width: min(100%, clamp(190px, 15vw, 330px));
    height: clamp(58px, 4.4vw, 88px);
}

.platform-logo-wide svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    overflow: visible;
}

.platform-logo-wide .logo-word {
    font-family: "Segoe UI", "Manrope", system-ui, sans-serif;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.platform-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 850;
}

.dashboard-page .platform-title {
    font-size: clamp(1.18rem, 1.45vw, 2.05rem);
}

.platform-url {
    display: block;
    max-width: 170px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-page .platform-url {
    max-width: clamp(150px, 14vw, 270px);
    font-size: clamp(0.78rem, 0.82vw, 1rem);
}

.metric-value {
    margin-bottom: 4px;
    font-size: clamp(2.1rem, 4vw, 3.6rem);
    font-weight: 950;
    letter-spacing: -0.06em;
}

.dashboard-page .metric-value {
    font-size: clamp(3rem, 5.2vw, 7.6rem);
    line-height: 0.92;
}

.metric-label {
    color: var(--muted);
    font-weight: 800;
    margin-top: clamp(2px, 0.4vh, 6px);
}

.dashboard-page .metric-label {
    font-size: clamp(0.98rem, 1vw, 1.35rem);
}

.history-list {
    display: grid;
    gap: 6px;
    margin-top: clamp(10px, 1.2vh, 18px);
    color: var(--muted);
    font-size: clamp(0.78rem, 0.78vw, 0.98rem);
}

.history-list[hidden] {
    display: none;
}

.history-row {
    display: grid;
    grid-template-columns: minmax(88px, 1fr) auto auto;
    gap: 8px;
    align-items: baseline;
    padding-top: 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.history-row strong {
    color: var(--text);
    font-size: 1.05em;
}

.history-change {
    color: #4cffb0;
    font-weight: 850;
}

.metric-meta {
    margin-top: 18px;
    color: color-mix(in srgb, var(--muted) 78%, white);
    font-size: 0.82rem;
}

.admin-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 18px;
}

.panel,
.login-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(22px);
}

.login-card {
    width: min(440px, calc(100% - 32px));
    margin: 12vh auto;
}

.form-grid {
    display: grid;
    gap: 14px;
}

.form-grid h3 {
    margin: 12px 0 0;
    color: var(--text);
    font-size: 1.05rem;
}

.field {
    display: grid;
    gap: 7px;
}

.field span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 750;
}

.field input,
.field select {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.field input:focus,
.field select:focus {
    border-color: color-mix(in srgb, var(--accent-a) 70%, white);
}

.account-admin-row {
    display: grid;
    grid-template-columns: 62px 1fr 1.3fr 88px;
    gap: 10px;
    align-items: end;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.checkbox-field {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-weight: 750;
}

.flash {
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid color-mix(in srgb, #4cffb0 55%, white);
    border-radius: 14px;
    color: #dffff0;
    background: rgba(76, 255, 176, 0.12);
}

.error {
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid color-mix(in srgb, #ff4c7a 55%, white);
    border-radius: 14px;
    color: #ffe3eb;
    background: rgba(255, 76, 122, 0.12);
}

.display-page {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--accent-a) 34%, transparent), transparent 42%),
        radial-gradient(circle at 50% 78%, color-mix(in srgb, var(--accent-c) 24%, transparent), transparent 48%),
        linear-gradient(145deg, var(--bg-top), var(--bg-bottom));
}

.display-page::before {
    opacity: 0.42;
    mask-image: radial-gradient(circle at center, black 0 47%, transparent 72%);
}

.display-stage {
    display: grid;
    width: 100vw;
    height: 100vh;
    place-items: center;
}

.display-orb {
    position: relative;
    display: grid;
    width: min(100vw, 100vh, 480px);
    height: min(100vw, 100vh, 480px);
    isolation: isolate;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.16), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
}

.display-ring {
    position: absolute;
    inset: 24px;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: inherit;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 58%),
        conic-gradient(from 180deg, var(--accent-a), var(--accent-b), var(--accent-c), var(--accent-a));
    filter: drop-shadow(0 0 32px rgba(0, 208, 255, 0.24));
    opacity: 0.38;
    animation: display-rotate 18s linear infinite;
}

.display-slides {
    position: relative;
    width: 70%;
    height: 70%;
    perspective: 900px;
}

.display-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transition: opacity 520ms ease, transform 520ms ease;
    will-change: opacity, transform;
}

.display-slide.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.display-animation-slide .display-slide {
    transform: translateX(44px) scale(0.96);
}

.display-animation-slide .display-slide.is-leaving {
    opacity: 0;
    transform: translateX(-44px) scale(0.96);
}

.display-animation-slide .display-slide.is-active {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.display-animation-rise .display-slide {
    transform: translateY(54px) scale(0.94);
}

.display-animation-rise .display-slide.is-leaving {
    opacity: 0;
    transform: translateY(-34px) scale(0.98);
}

.display-animation-rise .display-slide.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.display-animation-zoom .display-slide {
    transform: scale(0.78);
}

.display-animation-zoom .display-slide.is-leaving {
    opacity: 0;
    transform: scale(1.12);
}

.display-animation-zoom .display-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.display-animation-flip .display-slide {
    transform: rotateY(-72deg) scale(0.9);
    transform-origin: center;
}

.display-animation-flip .display-slide.is-leaving {
    opacity: 0;
    transform: rotateY(72deg) scale(0.9);
}

.display-animation-flip .display-slide.is-active {
    opacity: 1;
    transform: rotateY(0) scale(1);
}

.display-animation-orbit .display-slide {
    transform: rotate(-18deg) translateY(34px) scale(0.9);
}

.display-animation-orbit .display-slide.is-leaving {
    opacity: 0;
    transform: rotate(18deg) translateY(-34px) scale(0.92);
}

.display-animation-orbit .display-slide.is-active {
    opacity: 1;
    transform: rotate(0) translateY(0) scale(1);
}

.display-logo {
    display: grid;
    width: calc(min(250px, 68vw) * var(--display-logo-scale, 1));
    height: calc(86px * var(--display-logo-scale, 1));
    margin-bottom: 28px;
    place-items: center;
    filter: drop-shadow(0 12px 22px color-mix(in srgb, var(--platform-color) 24%, transparent));
}

.display-logo svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    overflow: visible;
}

.display-logo .logo-word {
    font-family: "Segoe UI", "Manrope", system-ui, sans-serif;
    font-size: 28px;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.display-value {
    margin-bottom: 16px;
    color: #f8fbff;
    font-size: calc(clamp(4rem, 18vw, 6.6rem) * var(--display-value-scale, 1));
    font-weight: 950;
    letter-spacing: -0.08em;
    line-height: 0.84;
    text-align: center;
    text-shadow: 0 18px 34px rgba(0, 0, 0, 0.36);
}

.display-change {
    display: inline-flex;
    min-width: 114px;
    justify-content: center;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #d8e8ff;
    background: rgba(255, 255, 255, 0.08);
    font-size: 1.3rem;
    font-weight: 900;
}

.display-change.is-positive {
    color: #74ffc4;
    background: rgba(76, 255, 176, 0.12);
}

.display-change.is-negative {
    color: #ff8aa4;
    background: rgba(255, 76, 122, 0.13);
}

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

@media (max-width: 480px), (max-height: 480px) {
    .display-orb {
        width: min(100vw, 100vh);
        height: min(100vw, 100vh);
    }

    .display-ring {
        inset: 18px;
    }

    .display-slides {
        width: 66%;
        height: 66%;
    }

    .display-logo {
        width: calc(216px * var(--display-logo-scale, 1));
        height: calc(74px * var(--display-logo-scale, 1));
        margin-bottom: 22px;
    }

    .display-value {
        font-size: calc(clamp(3.5rem, 18vw, 5.6rem) * var(--display-value-scale, 1));
    }

    .display-change {
        font-size: 1.12rem;
    }
}

@media (max-width: 820px) {
    .dashboard-page {
        overflow: auto;
    }

    .dashboard-page .shell {
        width: min(100% - 24px, 720px);
        min-height: auto;
        grid-template-rows: auto;
        padding: 18px 0 32px;
    }

    .hero,
    .admin-layout,
    .account-admin-row {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        justify-content: flex-start;
    }

    .dashboard-page .hero-copy {
        max-width: none;
    }

    .dashboard-page .account-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
}

@media (min-width: 2200px) {
    .dashboard-page .shell {
        width: min(2360px, calc(100vw - 96px));
    }

    .dashboard-page .account-grid {
        grid-template-columns: repeat(auto-fit, minmax(410px, 1fr));
    }
}

@media (max-height: 760px) and (min-width: 900px) {
    .dashboard-page .shell {
        padding-block: 16px;
    }

    .dashboard-page .hero {
        padding: 20px 26px;
        margin-bottom: 12px;
    }

    .dashboard-page h1 {
        font-size: clamp(2.7rem, 5vw, 5.8rem);
        margin-bottom: 8px;
    }

    .dashboard-page .hero-copy {
        display: none;
    }

    .dashboard-page .metric-value {
        font-size: clamp(2.8rem, 4.3vw, 5.8rem);
    }

    .dashboard-page .account-card {
        min-height: 168px;
    }

    .dashboard-page .platform-head {
        min-height: 72px;
        margin-bottom: 8px;
    }
}
