@font-face {
    font-family: "Geist";
    src: url("fonts/GeistVariable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Geist Mono";
    src: url("fonts/GeistMonoVariable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Admin panel design, "Polar Night": near-black blue ground, flat surfaces with hairline borders,
   ice cyan accent with a violet second color, Geist type with Geist Mono for labels and numbers.
   Tokens first; the sign-in/settings pages (static, no MudBlazor interactivity) use them directly,
   the panel itself gets the same values through the MudBlazor theme (Layout/AdminTheme.cs). */

:root {
    --ink: #0d1424;
    --muted: #556079;
    --faint: #8a93a8;
    --bg: #f4f6fa;
    --surface: #ffffff;
    --surface-2: #f6f8fb;
    --line: #e2e7ef;
    --night: #0a0d14;
    --night-2: #0c1222;
    --accent: #0a8db3;
    --accent-strong: #08779a;
    --accent-ink: #ffffff;
    --accent-soft: #e2f6fb;
    --violet: #6b5cf0;
    --ok: #12a36b;
    --ok-soft: #e4f6ee;
    --danger: #e5484d;
    --danger-soft: #fdecec;
    --warn: #c27a00;
    --warn-soft: #fff6dc;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(13, 20, 36, .05), 0 8px 24px rgba(13, 20, 36, .05);
    --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #e7ecf5;
        --muted: #8a94a8;
        --faint: #5b6478;
        --bg: #0a0d14;
        --surface: #11151f;
        --surface-2: #0d111a;
        --line: #1f2636;
        --accent: #4ce0ff;
        --accent-strong: #7fe9ff;
        --accent-ink: #06121a;
        --accent-soft: #0f2a33;
        --violet: #8b7bff;
        --ok: #39d98a;
        --ok-soft: #0f2c22;
        --danger: #ff6b7a;
        --danger-soft: #3a1518;
        --warn: #ffb547;
        --warn-soft: #33290a;
        --shadow: none;
    }
}

html, body {
    margin: 0;
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

/* The panel's colors come from the MudBlazor theme; the static pages paint their own. */
.auth {
    color: var(--ink);
    background: var(--bg);
}

h1:focus {
    outline: none;
}

code, kbd, .mono {
    font-family: var(--mono);
    font-size: .92em;
}

/* ---------- Sign-in and account settings (static pages) ---------- */

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 44%) 1fr;
}

.auth-brand {
    position: relative;
    overflow: hidden;
    color: #e7ecf5;
    padding: 36px 44px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-right: 1px solid #1c2230;
    /* Always night here, whatever the theme: the heroes stand in a cyan pool of light. */
    background:
        radial-gradient(60% 40% at 50% 78%, rgba(76, 224, 255, .22), transparent 70%),
        radial-gradient(45% 40% at 20% 25%, rgba(139, 123, 255, .26), transparent 70%),
        linear-gradient(180deg, var(--night-2), var(--night));
}

/* A soft snowfall of dots. */
.auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, .35), transparent),
        radial-gradient(1.5px 1.5px at 90px 120px, rgba(255, 255, 255, .25), transparent),
        radial-gradient(1px 1px at 150px 60px, rgba(255, 255, 255, .3), transparent),
        radial-gradient(2px 2px at 200px 180px, rgba(255, 255, 255, .2), transparent);
    background-size: 240px 220px;
    opacity: .7;
    pointer-events: none;
}

.auth-brand > * {
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: #0a0d14;
    background: #4ce0ff;
    flex: none;
}

.brand-mark svg {
    width: 24px;
    height: 24px;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.brand-sub {
    font-size: 12px;
    font-family: var(--mono);
    color: #8a94a8;
    margin-top: 2px;
}

/* Two heroes on the snow: the one in front a little bigger and lower. */
.auth-stage {
    flex: 1;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.auth-stage::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: -4px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(50% 50% at 50% 50%, rgba(76, 224, 255, .3), transparent);
}

/* Sized by width and height both so the pair always fits the column. */
.auth-stage img {
    position: relative;
    z-index: 1;
    width: 50%;
    max-height: min(60vh, 500px);
    object-fit: contain;
    object-position: bottom;
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .5));
}

.auth-stage .back {
    width: 46%;
    max-height: min(54vh, 450px);
    margin-right: -4%;
    margin-bottom: 26px;
    z-index: 0;
    animation: bob 6s ease-in-out infinite;
}

@keyframes bob { 50% { transform: translateY(-8px); } }

@media (prefers-reduced-motion: reduce) {
    .auth-stage .back { animation: none; }
}

.auth-hero .eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #4ce0ff;
    margin-bottom: 8px;
}

.auth-hero h2 {
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -.03em;
    margin: 0;
    font-weight: 700;
    max-width: 440px;
}

.env-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .85);
    width: fit-content;
}

.env-chip::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ok);
}

.env-chip.is-prod::before {
    background: var(--danger);
}

.auth-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-card.wide,
.auth-card:has(.settings-tabs) {
    max-width: 640px;
}

.auth-card h1 {
    font-size: 26px;
    letter-spacing: -.015em;
    font-weight: 750;
    margin: 0 0 6px;
}

.auth-card .lead {
    color: var(--muted);
    margin: 0 0 28px;
    line-height: 1.55;
}

.auth-note {
    margin-top: 28px;
    font-size: 12px;
    color: var(--faint);
    text-align: center;
}

.auth-mobile-brand {
    display: none;
    margin-bottom: 28px;
}

.auth-mobile-brand .brand-name {
    color: var(--ink);
}

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

    .auth-brand {
        display: none;
    }

    .auth-mobile-brand {
        display: flex;
    }
}

/* Form controls */

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 7px;
}

.input {
    box-sizing: border-box;
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.input.code {
    font-family: var(--mono);
    font-size: 22px;
    letter-spacing: .35em;
    text-align: center;
    height: 56px;
}

.input[disabled] {
    background: var(--surface-2);
    color: var(--muted);
}

.check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--muted);
    margin: 4px 0 22px;
    cursor: pointer;
}

.check input {
    width: 17px;
    height: 17px;
    accent-color: var(--accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 20px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, transform .05s, box-shadow .15s;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    color: var(--accent-ink);
    background: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-strong);
    color: var(--accent-ink);
}

.btn-ghost {
    color: var(--ink);
    background: var(--surface);
    border-color: var(--line);
}

.btn-ghost:hover {
    background: var(--surface-2);
}

.btn-danger {
    color: #fff;
    background: var(--danger);
}

.btn-block {
    width: 100%;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.link {
    color: var(--accent-strong);
    text-decoration: none;
    font-weight: 600;
}

.link:hover {
    text-decoration: underline;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 13px;
}

.alert {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert p {
    margin: 4px 0 0;
}

.alert-danger {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: rgba(229, 72, 77, .25);
}

.alert-success {
    background: var(--ok-soft);
    color: var(--ok);
    border-color: rgba(31, 169, 113, .25);
}

.alert-warning {
    background: var(--warn-soft);
    color: var(--warn);
    border-color: rgba(201, 138, 6, .25);
}

.validation-message, .validation-errors {
    color: var(--danger);
    font-size: 13px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.input.invalid {
    border-color: var(--danger);
}

.divider {
    height: 1px;
    background: var(--line);
    margin: 24px 0;
}

/* Settings (signed in, static pages) */

.settings-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    margin-bottom: 28px;
    overflow-x: auto;
}

.settings-tabs a {
    flex: 1;
    text-align: center;
    white-space: nowrap;
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    border-radius: 9px;
}

.settings-tabs a.active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow);
}

.settings-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    margin-bottom: 18px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}

.panel h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.panel h3 + p {
    margin: 0 0 20px;
}

.steps {
    list-style: none;
    counter-reset: step;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 22px;
}

.steps > li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 14px;
}

.steps > li::before {
    content: counter(step);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.steps h4 {
    margin: 4px 0 6px;
    font-size: 15px;
}

.qr {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.qr-box {
    width: 168px;
    height: 168px;
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--line);
    flex: none;
}

.qr-box svg {
    width: 100%;
    height: 100%;
    display: block;
}

.secret {
    font-family: var(--mono);
    font-size: 15px;
    letter-spacing: .08em;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px dashed var(--line);
    word-break: break-all;
}

.codes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 14px 0 6px;
}

.codes code {
    padding: 10px;
    text-align: center;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: 15px;
}

.kv {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px 16px;
    font-size: 14px;
}

.kv dt {
    color: var(--muted);
}

.kv dd {
    margin: 0;
    font-weight: 600;
}

/* ---------- Panel (interactive, MudBlazor) ----------
   "Polar Night": flat surfaces on a near-black blue ground with hairline borders (Linear/Vercel),
   one ice cyan accent and a violet second color, Geist Mono for labels and numbers. The light
   theme keeps the same structure on white with a deeper cyan. */

.shell {
    --hair: #e2e7ef;
    --hair-strong: #cfd6e2;
    --glass: #ffffff;
    --glass-strong: #ffffff;
    --glass-hover: rgba(13, 20, 36, .04);
    --raised: #eef1f6;
    --ink: #0d1424;
    --ink-2: #4b556b;
    --ink-3: #8a93a8;
    --accent: #0a8db3;
    --accent-2: #39b8d8;
    --accent-ink: #ffffff;
    --ice: #6b5cf0;
    --glow: rgba(10, 141, 179, .16);
    --card-shadow: 0 1px 2px rgba(13, 20, 36, .04);
    min-height: 100vh;
    position: relative;
    isolation: isolate;
}

.shell.dark {
    --hair: #1f2636;
    --hair-strong: #2a3344;
    --glass: #11151f;
    --glass-strong: #161b27;
    --glass-hover: rgba(255, 255, 255, .035);
    --raised: #1d2433;
    --ink: #e7ecf5;
    --ink-2: #aab3c5;
    --ink-3: #6f7a90;
    --accent: #4ce0ff;
    --accent-2: #8af0ff;
    --accent-ink: #06121a;
    --ice: #8b7bff;
    --glow: rgba(76, 224, 255, .18);
    --card-shadow: none;
}

.shell::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--mud-palette-background);
}

.shell .mud-layout,
.shell .mud-main-content {
    background: transparent !important;
}

.mud-layout, .mud-popover, .mud-dialog {
    font-feature-settings: "cv11", "ss01", "ss03";
}

.num, .mud-table-cell, .stat .value, .big-number {
    font-variant-numeric: tabular-nums;
}

/* Side bar */

.side.mud-drawer {
    background: var(--mud-palette-drawer-background) !important;
    border-right: 1px solid var(--hair) !important;
    box-shadow: none !important;
}

.side-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.side-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 16px 16px 10px;
}

.side-brand .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--accent);
    color: var(--accent-ink);
}

.side-brand .brand-mark svg {
    width: 20px;
    height: 20px;
}

.side-brand .text {
    min-width: 0;
    line-height: 1.2;
}

.side-brand .name {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -.02em;
    color: var(--ink);
    white-space: nowrap;
}

.side-brand .env {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--mud-palette-success);
    margin-top: 2px;
}

.side-brand .env::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mud-palette-success);
    box-shadow: 0 0 8px var(--mud-palette-success);
}

.side-brand .env.prod {
    color: var(--mud-palette-error);
}

.side-brand .env.prod::before {
    background: var(--mud-palette-error);
    box-shadow: 0 0 8px var(--mud-palette-error);
}

.side .nav-group {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-3);
    padding: 20px 22px 6px;
}

.side .mud-nav-link {
    position: relative;
    margin: 1px 10px;
    width: calc(100% - 20px);
    min-height: 34px;
    border-radius: 9px;
    padding: 6px 10px !important;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink-2) !important;
    transition: background .15s, color .15s;
}

.side .mud-nav-link .mud-nav-link-icon {
    font-size: 18px;
    color: var(--ink-3) !important;
    transition: color .15s;
}

.side .mud-nav-link:hover {
    background: var(--glass-hover) !important;
    color: var(--ink) !important;
}

.side .mud-nav-link.active {
    background: var(--raised) !important;
    color: var(--ink) !important;
    font-weight: 600;
}

.side .mud-nav-link.active::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--accent);
}

.side .mud-nav-link.active .mud-nav-link-icon {
    color: var(--accent) !important;
}

.nav-live {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: 8px;
    border-radius: 50%;
    background: var(--mud-palette-success);
    color: var(--mud-palette-success);
    vertical-align: middle;
    animation: pulse 1.8s infinite;
}

.side.collapsed .nav-group,
.side.collapsed .mud-nav-link-text,
.side.collapsed .side-brand .text,
.side.collapsed .side-user .who {
    display: none;
}

.side-user {
    margin: auto 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--hair);
}

.side-user .who {
    min-width: 0;
    flex: 1;
    line-height: 1.25;
    text-decoration: none;
}

.side-user .who .email {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-user .who .role {
    font-size: 11.5px;
    color: var(--ink-3);
}

.initials {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: 11.5px;
    font-weight: 700;
    color: #0a0d14;
    flex: none;
    box-shadow: 0 0 0 2px var(--mud-palette-background);
}

/* Top bar */

.topbar.mud-appbar {
    background: color-mix(in srgb, var(--mud-palette-background) 88%, transparent) !important;
    color: var(--ink) !important;
    border-bottom: 1px solid var(--hair);
    box-shadow: none !important;
    backdrop-filter: blur(12px);
}

.topbar .mud-toolbar {
    gap: 10px;
}

.search-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(460px, 50vw);
    height: 36px;
    padding: 0 8px 0 12px;
    font: inherit;
    font-size: 13.5px;
    color: var(--ink-3);
    background: var(--glass);
    border: 1px solid var(--hair);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, color .15s;
}

.search-trigger:hover {
    color: var(--ink-2);
    border-color: var(--hair-strong);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

.search-trigger .grow {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

kbd.key {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid var(--hair-strong);
    background: transparent;
    color: var(--ink-2);
}

/* Page */

.page {
    max-width: 1480px;
    margin: 0 auto;
    padding: 30px 40px 56px;
    animation: page-in .22s ease-out;
}

@media (max-width: 700px) {
    .page {
        padding: 20px 16px 40px;
    }
}

@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }

.page-head {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.page-head .titles {
    flex: 1;
    min-width: 260px;
}

.page-head .eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}

.page-head h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--ink);
}

.page-head p {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--ink-2);
    max-width: 760px;
    line-height: 1.5;
}

/* Cards */

.card.mud-paper {
    background: var(--glass) !important;
    border: 1px solid var(--hair);
    border-radius: 16px !important;
    box-shadow: var(--card-shadow) !important;
}

.card.interactive {
    transition: transform .15s, border-color .15s, box-shadow .15s;
}

.card.interactive:hover {
    transform: translateY(-2px);
    border-color: var(--hair-strong);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: -.01em;
    color: var(--ink);
}

.card-sub {
    font-size: 12.5px;
    color: var(--ink-3);
    margin-top: 2px;
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 0;
}

/* Bento overview */

.bento {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
}

.bento > * { min-width: 0; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

@media (max-width: 1200px) {
    .span-3 { grid-column: span 6; }
    .span-4, .span-5, .span-7, .span-8 { grid-column: span 12; }
}

@media (max-width: 700px) {
    .span-6 { grid-column: span 12; }
    /* Small stat cards sit two by two on a phone. */
    .span-3 { grid-column: span 6; }
    .span-3.stat .value, .span-3 .stat .value { font-size: 24px; }
}

.hero-card {
    position: relative;
    overflow: hidden;
    padding: 22px 24px 8px;
    height: 100%;
    box-sizing: border-box;
}

.hero-card::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -140px;
    top: -220px;
    background: radial-gradient(circle, var(--glow), transparent 65%);
    pointer-events: none;
}

.big-number {
    font-size: 60px;
    font-weight: 700;
    letter-spacing: -.05em;
    line-height: 1;
    color: var(--ink);
    margin: 10px 0 6px;
}

.live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--mud-palette-success);
}

.live::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 0 currentColor;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); }
    70% { box-shadow: 0 0 0 8px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* Stat cards */

.stat {
    padding: 18px 20px;
    height: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.stat .label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 550;
    color: var(--ink-2);
}

.stat .label .mud-icon-root {
    font-size: 16px;
    color: var(--ink-3);
}

.stat .value {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.03em;
    margin-top: 10px;
    line-height: 1.05;
    color: var(--ink);
}

.stat .hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--ink-3);
    margin-top: 8px;
}

.stat .spark {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 104px;
    height: 38px;
}

.delta {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11.5px;
    font-weight: 650;
    padding: 2px 7px;
    border-radius: 999px;
}

.delta.up { color: var(--mud-palette-success); background: color-mix(in srgb, var(--mud-palette-success) 14%, transparent); }
.delta.down { color: var(--mud-palette-error); background: color-mix(in srgb, var(--mud-palette-error) 14%, transparent); }
.delta.flat { color: var(--ink-3); background: var(--glass-hover); }

/* Charts (SVG) */

.chart {
    width: 100%;
    display: block;
    overflow: visible;
}

.chart .grid {
    stroke: var(--hair);
    stroke-width: 1;
    stroke-dasharray: 2 4;
}

.chart .axis {
    fill: var(--ink-3);
    font-size: 11px;
}

.chart .line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.4;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.chart .line.second {
    stroke: var(--ice);
    stroke-width: 2;
    stroke-dasharray: 5 5;
}

.chart .dot {
    fill: var(--mud-palette-surface);
    stroke: var(--accent);
    stroke-width: 2;
    opacity: 0;
    transition: opacity .1s;
}

.chart .hit:hover + .dot {
    opacity: 1;
}

.legend {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--ink-3);
}

.legend span::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    background: var(--accent);
}

.legend span.second::before {
    background: var(--ice);
}

/* Lists inside cards (feeds, mini leaderboards) */

.feed {
    list-style: none;
    margin: 0;
    padding: 6px 8px 10px;
}

.feed li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    color: var(--ink);
}

.feed li:hover {
    background: var(--glass-hover);
}

.feed .meta {
    margin-left: auto;
    font-size: 12px;
    color: var(--ink-3);
    white-space: nowrap;
}

.feed .sub {
    font-size: 12px;
    color: var(--ink-3);
}

.feed a {
    color: inherit;
    text-decoration: none;
}

/* Podium */

.podium {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    gap: 16px;
    align-items: end;
    margin-bottom: 16px;
}

@media (max-width: 800px) {
    .podium { grid-template-columns: 1fr; }
}

.podium-card {
    position: relative;
    text-align: center;
    padding: 26px 18px 22px;
    overflow: hidden;
}

.podium-card.first {
    padding-top: 34px;
    padding-bottom: 30px;
}

.podium-card::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -120px;
    width: 300px;
    height: 240px;
    transform: translateX(-50%);
    background: radial-gradient(circle, var(--medal-glow), transparent 65%);
    pointer-events: none;
}

.podium-card.gold { --medal-a: #ffe08a; --medal-b: #e8a21a; --medal-glow: rgba(240, 180, 40, .32); }
.podium-card.silver { --medal-a: #eef2f8; --medal-b: #9aa6b8; --medal-glow: rgba(160, 175, 200, .26); }
.podium-card.bronze { --medal-a: #f4c19a; --medal-b: #b8672f; --medal-glow: rgba(200, 120, 60, .26); }

.podium-card .avatar-ring {
    display: inline-grid;
    place-items: center;
    padding: 3px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--medal-a), var(--medal-b));
    box-shadow: 0 8px 26px var(--medal-glow);
}

.podium-card .medal {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 14px;
    color: #3b2a07;
    background: linear-gradient(145deg, var(--medal-a), var(--medal-b));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--medal-b) 25%, transparent);
}

.podium-card .who {
    margin-top: 12px;
    font-size: 15px;
    font-weight: 650;
    color: var(--ink);
}

.podium-card .score {
    margin-top: 6px;
    font-size: 28px;
    font-weight: 750;
    letter-spacing: -.03em;
    color: var(--ink);
}

.podium-card .unit {
    font-size: 12px;
    color: var(--ink-3);
}

.track {
    height: 6px;
    border-radius: 999px;
    background: var(--glass-hover);
    overflow: hidden;
    min-width: 80px;
}

.track .fill {
    height: 100%;
    border-radius: 999px;
    background: var(--accent);
}

/* Segmented control and filter pills */

.segmented {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    border-radius: 11px;
    background: var(--glass-hover);
    border: 1px solid var(--hair);
}

.segmented button {
    font: inherit;
    font-size: 13px;
    font-weight: 550;
    padding: 6px 14px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-2);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .15s, color .15s;
}

.segmented button:hover {
    color: var(--ink);
}

.segmented button.on {
    background: var(--raised);
    color: var(--ink);
}

.segmented .count {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink-3);
    padding: 0 6px;
    border-radius: 999px;
    background: var(--glass-hover);
}

/* Tables */

.mud-table-root .mud-table-head .mud-table-cell {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-3);
    background: transparent;
    border-bottom: 1px solid var(--hair);
    white-space: nowrap;
}

.mud-table-root .mud-table-body .mud-table-cell {
    font-size: 13.5px;
    color: var(--ink);
    border-bottom: 1px solid var(--hair);
}

.mud-table-root .mud-table-body .mud-table-row:last-child .mud-table-cell {
    border-bottom: 0;
}

.mud-table-root .mud-table-body .mud-table-row:hover {
    background: var(--glass-hover) !important;
}

.card .mud-table, .card .mud-table-container, .card .mud-table-pagination {
    background: transparent !important;
}

.card .mud-table-pagination {
    border-top: 1px solid var(--hair);
}

.clickable-rows .mud-table-row {
    cursor: pointer;
}

.row-chevron {
    opacity: 0;
    color: var(--ink-3);
    transition: opacity .15s, transform .15s;
}

.mud-table-row:hover .row-chevron {
    opacity: 1;
    transform: translateX(2px);
}

.who-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.who-cell .name {
    font-weight: 600;
    color: var(--ink);
}

.who-cell .sub {
    font-size: 12px;
    color: var(--ink-3);
}

.id-cell {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--ink-3);
}

.flag {
    font-size: 15px;
    line-height: 1;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 550;
    white-space: nowrap;
}

.status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.status.ok { color: var(--mud-palette-success); }
.status.bad { color: var(--mud-palette-error); }
.status.warn { color: var(--mud-palette-warning); }
.status.info { color: var(--mud-palette-info); }
.status.muted { color: var(--ink-3); }
.status.muted::before { box-shadow: none; }

.status span {
    color: var(--ink);
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--hair);
    flex-wrap: wrap;
}

.filter {
    width: 220px;
}

/* Logs: the opened line's message and attributes. */
.log-detail {
    padding: 12px 16px 16px !important;
    background: var(--raised);
}

.log-detail pre {
    margin: 0 0 10px;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: "Geist Mono", ui-monospace, monospace;
    font-size: 12.5px;
}

.log-attr {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 12px;
    padding: 4px 0;
    border-top: 1px solid var(--hair);
    font-size: 12.5px;
}

.log-attr > span {
    color: var(--ink-3);
}

.log-attr pre {
    margin: 0;
}

.log-attr code {
    word-break: break-all;
}

.empty {
    padding: 52px 16px;
    text-align: center;
    color: var(--ink-3);
    font-size: 13.5px;
}

.empty .mud-icon-root {
    font-size: 34px;
    opacity: .45;
    display: block;
    margin: 0 auto 10px;
}

.empty-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 40px;
    padding: 28px 48px 0;
    border-radius: inherit;
    background: radial-gradient(50% 70% at 22% 100%, var(--glow), transparent 70%);
}

.empty-hero img {
    height: 260px;
    align-self: flex-end;
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .35));
}

.empty-hero .copy {
    flex: 1 1 300px;
    padding-bottom: 28px;
}

.empty-hero .eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ice);
    margin-bottom: 10px;
}

.empty-hero h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--ink);
}

.empty-hero p {
    margin: 0 0 18px;
    max-width: 460px;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--ink-2);
}

@media (max-width: 700px) {
    .empty-hero { padding: 20px 20px 0; justify-content: center; text-align: center; }
    .empty-hero img { height: 180px; order: 2; }
    .empty-hero .copy { padding-bottom: 0; }
    .empty-hero p { margin-left: auto; margin-right: auto; }
    .empty-hero .btn-row { justify-content: center; }
}

.mud-tab {
    text-transform: none !important;
    font-weight: 550 !important;
    min-width: 0 !important;
    font-size: 13.5px !important;
    color: var(--ink-2) !important;
}

.mud-tab.mud-tab-active {
    color: var(--ink) !important;
}

.mud-tabs-tabbar {
    background: transparent !important;
    border-bottom: 1px solid var(--hair);
}

/* Buttons, inputs, dialogs */

.mud-button-root {
    border-radius: 9px !important;
    box-shadow: none !important;
}

.mud-button-filled-primary {
    background: var(--accent) !important;
    color: var(--accent-ink) !important;
    font-weight: 650 !important;
}

.mud-button-filled-primary:hover {
    background: var(--accent-2) !important;
}

.mud-button-outlined {
    background: var(--glass) !important;
    border-color: var(--hair-strong) !important;
}

.mud-input-outlined-border {
    border-radius: 10px !important;
    border-color: var(--hair-strong) !important;
}

.mud-input.mud-input-outlined {
    background: var(--glass);
    border-radius: 10px;
}

.mud-dialog {
    border-radius: 18px !important;
    border: 1px solid var(--hair);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45) !important;
}

.mud-dialog .mud-dialog-title {
    font-weight: 700;
    letter-spacing: -.02em;
}

.mud-popover {
    border-radius: 12px !important;
    border: 1px solid var(--hair);
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .35) !important;
}

/* Command palette */

.palette-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(6, 8, 12, .45);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 12vh;
    animation: fade .12s ease-out;
}

.palette {
    width: min(660px, calc(100vw - 32px));
    background: var(--glass-strong);
    border: 1px solid var(--hair-strong);
    border-radius: 18px;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .04) inset;
    overflow: hidden;
    animation: rise .16s cubic-bezier(.2, .9, .3, 1.2);
}

.palette input {
    width: 100%;
    box-sizing: border-box;
    border: 0;
    outline: none;
    padding: 20px 22px;
    font: inherit;
    font-size: 16px;
    background: transparent;
    color: var(--ink);
    border-bottom: 1px solid var(--hair);
}

.palette .results {
    max-height: 400px;
    overflow-y: auto;
    padding: 6px;
}

.palette .section {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-3);
    padding: 12px 12px 4px;
}

.palette .item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--ink);
}

.palette .item .sub {
    margin-left: auto;
    font-size: 12px;
    color: var(--ink-3);
}

.palette .item.selected {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.palette .foot {
    display: flex;
    gap: 16px;
    padding: 10px 16px;
    font-size: 12px;
    color: var(--ink-3);
    border-top: 1px solid var(--hair);
}

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.97); } }

/* Phones and small tablets */

@media (max-width: 959px) {
    .hide-sm { display: none !important; }

    /* The drawer slides over the page here: it needs its own solid ground. */
    .side.mud-drawer {
        background: var(--mud-palette-background) !important;
        backdrop-filter: none;
    }

    .who-cell .id-cell { display: none; }
    .who-cell .name { white-space: nowrap; }

    .page { padding: 18px 14px 40px; }
    .page-head { margin-bottom: 18px; gap: 12px; }
    .page-head h1 { font-size: 24px; }
    .page-head p { font-size: 13.5px; }
    .page-head > :not(.titles) { width: 100%; }

    .search-trigger { width: auto; flex: 1; max-width: 420px; }
    .search-trigger kbd { display: none; }

    .big-number { font-size: 44px; }
    .hero-card { padding: 18px 18px 6px; }
    .stat .value { font-size: 28px; }
    .stat .spark { width: 84px; height: 30px; }

    .toolbar { padding: 12px; }
    .toolbar > .mud-input-control { width: 100% !important; }
    .segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
    .segmented button { white-space: nowrap; padding: 6px 11px; }

    .mud-table-container { overflow-x: auto; }
    .mud-table-root .mud-table-cell { padding-left: 10px !important; padding-right: 10px !important; }

    .timeline li { padding: 10px 12px; gap: 10px; }
    .timeline li::before { left: 28px; }
    .timeline .when { font-size: 11px; }

    .podium-card .score { font-size: 24px; }
    .mud-tabs-tabbar .empty-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 40px;
    padding: 28px 48px 0;
    border-radius: inherit;
    background: radial-gradient(50% 70% at 22% 100%, var(--glow), transparent 70%);
}

.empty-hero img {
    height: 260px;
    align-self: flex-end;
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .35));
}

.empty-hero .copy {
    flex: 1 1 300px;
    padding-bottom: 28px;
}

.empty-hero .eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ice);
    margin-bottom: 10px;
}

.empty-hero h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--ink);
}

.empty-hero p {
    margin: 0 0 18px;
    max-width: 460px;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--ink-2);
}

@media (max-width: 700px) {
    .empty-hero { padding: 20px 20px 0; justify-content: center; text-align: center; }
    .empty-hero img { height: 180px; order: 2; }
    .empty-hero .copy { padding-bottom: 0; }
    .empty-hero p { margin-left: auto; margin-right: auto; }
    .empty-hero .btn-row { justify-content: center; }
}

.mud-tab { padding: 6px 10px !important; }
}

/* Timeline (player page) */

.timeline {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.timeline li {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 14px;
    padding: 11px 20px;
    position: relative;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: 36px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--hair);
}

.timeline li:first-child::before { top: 24px; }
.timeline li:last-child::before { bottom: calc(100% - 24px); }

.timeline .ico {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    position: relative;
    z-index: 1;
    border: 1px solid var(--hair);
    background: var(--glass);
}

.timeline .what {
    font-size: 13.5px;
    color: var(--ink);
    line-height: 1.45;
}

.timeline .what small {
    display: block;
    font-size: 12.5px;
    color: var(--ink-3);
}

.timeline .when {
    font-size: 12px;
    color: var(--ink-3);
    white-space: nowrap;
    padding-top: 3px;
}

.tone-accent { color: var(--accent); }
.tone-blue { color: var(--ice); }
.tone-ok { color: var(--mud-palette-success); }
.tone-danger { color: var(--mud-palette-error); }
.tone-muted { color: var(--ink-3); }

/* ---------- Blazor ---------- */

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 1.2rem;
    color: white;
    border-radius: 10px;
}

.blazor-error-boundary::after {
    content: "Bir hata oluştu.";
}
