:root {
    --text: #ffffff;
    --silver: rgba(255, 255, 255, .78);
    --muted: rgba(255, 255, 255, .55);
    --faint: rgba(255, 255, 255, .32);

    --glass: rgba(255, 255, 255, .085);
    --glass-2: rgba(255, 255, 255, .13);
    --glass-3: rgba(255, 255, 255, .2);
    --glass-dark: rgba(8, 6, 14, .32);
    --glass-deep: rgba(14, 10, 22, .72);
    --edge: rgba(255, 255, 255, .14);
    --edge-2: rgba(255, 255, 255, .24);
    --line: rgba(255, 255, 255, .1);
    --line-2: rgba(255, 255, 255, .18);
    --blur: blur(26px) saturate(150%);
    --shine: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .02);
    --drop: 0 24px 60px -24px rgba(0, 0, 0, .65);

    --mag: #ff3ec8;
    --mag-2: #d42aa6;
    --vio: #9a6bff;
    --vio-2: #6a3df0;
    --ok: #4ee6a6;
    --warn: #ffc15c;
    --bad: #ff5d79;
    --info: #6cc3ff;
    --gold: #f2c45a;

    --radius: 24px;
    --radius-m: 18px;
    --radius-s: 12px;
    --head: 'Poppins', 'Segoe UI', sans-serif;
    --body: 'Poppins', 'Segoe UI', sans-serif;
    --mono: 'IBM Plex Mono', Consolas, monospace;
    --ease: cubic-bezier(.2, .8, .2, 1);

    --dim: .35;
    --bg-img: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    color: var(--text);
    font: 14.5px/1.5 var(--body);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    background-color: #0b0814;
}
body::before {
    content: '';
    position: fixed;
    inset: -40px;
    z-index: 0;
    pointer-events: none;
    background-image:
        var(--bg-img),
        radial-gradient(900px 620px at 78% 8%, rgba(255, 62, 200, .38), transparent 60%),
        radial-gradient(800px 600px at 8% 92%, rgba(106, 61, 240, .42), transparent 62%),
        radial-gradient(700px 500px at 45% 55%, rgba(255, 140, 90, .14), transparent 65%),
        linear-gradient(160deg, #1d1030 0%, #0d0a1c 45%, #160b22 100%);
    background-size: cover, auto, auto, auto, auto;
    background-position: center;
    transform: scale(1.02);
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(5, 3, 10, calc(var(--dim) * .6)) 0%, rgba(5, 3, 10, var(--dim)) 100%),
        radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, .45) 100%);
}
a { color: #ff8ee0; text-decoration: none; }
a:hover { color: #fff; }
code, pre, .mono { font-family: var(--mono); }
code { background: var(--glass-dark); border: 1px solid var(--line); border-radius: 7px; padding: 1px 6px; font-size: .86em; }
h1, h2, h3, h4 { font-family: var(--head); margin: 0; font-weight: 600; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.silver { color: var(--silver); }
.hidden { display: none !important; }

.glass {
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border: 1px solid var(--edge);
    box-shadow: var(--shine), var(--drop);
}

.app { position: relative; z-index: 1; min-height: 100vh; }

.app-top {
    position: sticky; top: 0; z-index: 40;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
    padding: 16px 26px;
}
.app-top .left, .app-top .right { display: flex; align-items: center; gap: 10px; }
.app-top .right { justify-content: flex-end; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; padding-right: 6px; }
.brand:hover { color: #fff; }
.brand img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(255, 62, 200, .55)); }
.brand b { display: block; font-weight: 600; font-size: 15px; letter-spacing: .02em; line-height: 1.15; }
.brand small { display: block; font-size: 11px; color: var(--muted); }
.crest {
    width: 40px; height: 40px; flex: none;
    display: grid; place-items: center;
    font-family: var(--head); font-weight: 700; font-size: 20px; color: #fff;
    clip-path: polygon(50% 0, 100% 18%, 92% 72%, 50% 100%, 8% 72%, 0 18%);
    background: linear-gradient(160deg, var(--mag), var(--vio-2));
    text-shadow: 0 0 12px rgba(255, 255, 255, .6);
}

.nav-pills { display: flex; gap: 8px; padding: 0; }
.nav-pills a {
    display: inline-flex; align-items: center; gap: 8px;
    height: 40px; padding: 0 17px; border-radius: 999px;
    color: #fff; font-weight: 500; font-size: 13.5px; white-space: nowrap;
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--edge);
    box-shadow: var(--shine);
    transition: background .2s, transform .2s var(--ease), border-color .2s;
}
.nav-pills a:hover { background: var(--glass-2); transform: translateY(-1px); color: #fff; }
.nav-pills a.active { background: rgba(10, 8, 16, .55); border-color: rgba(255, 255, 255, .2); }
.nav-pills a.active svg { stroke: var(--mag); }
.nav-pills svg, .dock svg, .round svg, .btn svg, .menu svg {
    width: 17px; height: 17px; flex: none;
    stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.round {
    position: relative;
    width: 40px; height: 40px; border-radius: 50%; flex: none;
    display: grid; place-items: center;
    color: #fff; cursor: pointer;
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--edge);
    box-shadow: var(--shine);
    transition: background .2s, transform .2s var(--ease);
    font: inherit;
}
.round:hover { background: var(--glass-2); transform: translateY(-1px); color: #fff; }
.round .dot {
    position: absolute; top: -3px; right: -3px;
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--bad); color: #fff; font: 600 10.5px/18px var(--body); text-align: center;
    box-shadow: 0 0 0 2px rgba(20, 12, 28, .9);
}
.me { position: relative; }
.me-btn {
    width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; position: relative;
    background: linear-gradient(140deg, var(--mag), var(--vio-2));
    color: #fff; font: 600 14px var(--body);
    box-shadow: 0 6px 18px -6px rgba(255, 62, 200, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.me-btn::after { content: ''; position: absolute; right: 0; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px #1b1226; }
.menu {
    position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; padding: 8px;
    border-radius: var(--radius-m);
    background: var(--glass-deep);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--edge-2);
    box-shadow: var(--shine), 0 30px 60px -20px rgba(0, 0, 0, .8);
    opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
    transition: opacity .18s, transform .18s var(--ease);
}
.me.open .menu { opacity: 1; transform: none; pointer-events: auto; }
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu .who b { display: block; font-weight: 600; }
.menu .who small { color: var(--muted); }
.menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--silver); font-size: 13.5px; }
.menu a:hover { background: var(--glass-2); color: #fff; }

.dock {
    position: fixed; left: 22px; top: 50%; transform: translateY(-50%); z-index: 35;
    display: flex; flex-direction: column; gap: 8px; padding: 9px;
    border-radius: 999px;
    background: rgba(12, 9, 20, .42);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--edge);
    box-shadow: var(--shine), var(--drop);
}
.dock a, .dock button {
    position: relative;
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center;
    color: rgba(255, 255, 255, .75); background: transparent; border: 0; cursor: pointer;
    transition: background .2s, color .2s, transform .2s var(--ease);
}
.dock a:hover, .dock button:hover { background: var(--glass-2); color: #fff; }
.dock a.active { background: #fff; color: #120c1c; box-shadow: 0 6px 18px -6px rgba(255, 255, 255, .6); }
.dock .sep { height: 1px; margin: 2px 8px; background: var(--line-2); }
.dock [data-tip]::after {
    content: attr(data-tip);
    position: absolute; left: calc(100% + 14px); top: 50%; transform: translate(-4px, -50%);
    padding: 6px 10px; border-radius: 9px; white-space: nowrap;
    background: rgba(14, 10, 22, .85); border: 1px solid var(--edge);
    color: #fff; font: 500 12.5px var(--body);
    opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
}
.dock [data-tip]:hover::after { opacity: 1; transform: translate(0, -50%); }

.main { width: min(1340px, 100%); margin: 0 auto; padding: 14px 40px 70px 112px; min-width: 0; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 10px 0 24px; flex-wrap: wrap; }
.topbar h1 { font-size: 30px; line-height: 1.15; font-weight: 600; }
.topbar .sub { color: var(--silver); font-size: 13.5px; margin-top: 4px; }
.topbar .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.grid { display: grid; gap: 18px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); }
.span-2 { grid-column: span 2; }
.mt { margin-top: 18px; }

.card {
    position: relative; min-width: 0;
    border-radius: var(--radius);
    padding: 20px 22px;
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--edge);
    box-shadow: var(--shine), var(--drop);
    transition: transform .35s var(--ease), background .3s, border-color .3s;
}
.card.lift:hover { transform: translateY(-5px); background: var(--glass-2); border-color: var(--edge-2); }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.card-h h3 { font-size: 16px; font-weight: 600; }
.card-h .h-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card-h .tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.reveal { opacity: 0; transform: translateY(14px); animation: rise .6s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

.kpi { display: flex; flex-direction: column; min-height: 150px; }
.kpi .k-top { display: flex; justify-content: space-between; align-items: flex-start; }
.k-ico {
    width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
    background: color-mix(in srgb, var(--accent, var(--mag)) 22%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent, var(--mag)) 35%, transparent);
    color: var(--accent, var(--mag));
}
.k-ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.k-arrow { color: var(--silver); font-size: 15px; line-height: 1; padding: 4px; border-radius: 8px; transition: color .2s, background .2s; }
a.k-arrow:hover { color: #fff; background: var(--glass-2); }
.kpi .k-label { font-size: 12.5px; color: var(--silver); margin-top: 14px; }
.kpi .k-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 2px; }
.kpi .k-val { font-size: 28px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .k-val small { font-size: 14px; color: var(--muted); font-weight: 500; }
.kpi .k-foot { margin-top: auto; padding-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.spark { width: 92px; height: 34px; flex: none; overflow: visible; }
.spark path { fill: none; stroke: var(--accent, var(--mag)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--accent, var(--mag)) 60%, transparent)); }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge.ok { color: #7ff5c2; background: rgba(78, 230, 166, .16); border: 1px solid rgba(78, 230, 166, .3); }
.badge.bad { color: #ff9aad; background: rgba(255, 93, 121, .16); border: 1px solid rgba(255, 93, 121, .32); }
.badge.warn { color: #ffd68e; background: rgba(255, 193, 92, .14); border: 1px solid rgba(255, 193, 92, .3); }
.badge.mag { color: #ffa3e6; background: rgba(255, 62, 200, .16); border: 1px solid rgba(255, 62, 200, .32); }
.badge.plain { color: var(--silver); background: var(--glass); border: 1px solid var(--edge); }

.state { font-size: 26px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.state i { width: 11px; height: 11px; border-radius: 50%; background: var(--muted); }
.state.on { color: #fff; }
.state.on i { background: var(--ok); box-shadow: 0 0 0 4px rgba(78, 230, 166, .2), 0 0 16px var(--ok); animation: pulse 2.2s infinite; }
.state.off i { background: var(--bad); box-shadow: 0 0 0 4px rgba(255, 93, 121, .2); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(78, 230, 166, .2), 0 0 16px var(--ok); } 50% { box-shadow: 0 0 0 8px rgba(78, 230, 166, .05), 0 0 10px var(--ok); } }

.status-chip {
    display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 16px; border-radius: 999px;
    background: var(--glass); border: 1px solid var(--edge);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    box-shadow: var(--shine); font-size: 13px; font-weight: 500; white-space: nowrap;
}
.status-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status-chip.on i { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.status-chip.off i { background: var(--bad); box-shadow: 0 0 10px var(--bad); }

.segmented {
    display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px;
    background: var(--glass-dark); border: 1px solid var(--edge);
}
.segmented button {
    height: 30px; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer;
    background: transparent; color: var(--silver); font: 500 12.5px var(--body);
    transition: background .2s, color .2s;
}
.segmented button:hover { color: #fff; }
.segmented button.on { background: #fff; color: #140d1f; box-shadow: 0 4px 14px -4px rgba(255, 255, 255, .5); }

.barchart { position: relative; height: 270px; display: flex; flex-direction: column; }
.bc-plot { position: relative; flex: 1; display: flex; align-items: flex-end; gap: var(--gap, 10px); padding-left: 34px; }
.bc-grid { position: absolute; inset: 0 0 0 34px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.bc-grid span { position: relative; border-top: 1px dashed rgba(255, 255, 255, .09); height: 0; }
.bc-grid span::before { content: attr(data-v); position: absolute; left: -34px; top: -8px; width: 26px; text-align: right; font-size: 10.5px; color: var(--faint); }
.bc-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; min-width: 0; }
.bc-bar {
    width: min(100%, 46px); min-height: 4px; border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .12));
    border: 1px solid rgba(255, 255, 255, .22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
    transform-origin: bottom; transform: scaleY(0);
    animation: grow .8s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 25ms);
    transition: filter .2s, background .2s;
}
.bc-bar.empty { background: rgba(255, 255, 255, .05); border-style: dashed; }
.bc-bar.hl {
    background: linear-gradient(180deg, #ff7ad9, var(--mag) 45%, var(--vio-2));
    border-color: rgba(255, 160, 230, .6);
    box-shadow: 0 0 26px -2px rgba(255, 62, 200, .65), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.bc-col:hover .bc-bar { filter: brightness(1.25); }
.bc-tip {
    position: absolute; bottom: calc(var(--h) + 10px); left: 50%; transform: translate(-50%, 4px);
    padding: 4px 9px; border-radius: 8px; white-space: nowrap;
    background: rgba(14, 10, 22, .9); border: 1px solid var(--edge-2);
    font-size: 11.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 2;
}
.bc-col:hover .bc-tip, .bc-col.hlc .bc-tip { opacity: 1; transform: translate(-50%, 0); }
.bc-labels { display: flex; gap: var(--gap, 10px); padding-left: 34px; margin-top: 10px; }
.bc-labels span { flex: 1; min-width: 0; text-align: center; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: visible; }
@keyframes grow { to { transform: scaleY(1); } }

.timeline { display: flex; flex-direction: column; gap: 10px; }
.tl-item {
    position: relative; padding: 11px 13px 11px 15px; border-radius: 14px;
    background: var(--glass-dark); border: 1px solid var(--line);
    transition: background .2s, transform .25s var(--ease);
}
.tl-item:hover { background: rgba(255, 255, 255, .06); transform: translateX(2px); }
.tl-item::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--c, var(--mag)); box-shadow: 0 0 10px var(--c, var(--mag)); }
.tl-item b { display: block; font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-item small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tl-item .tl-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; font-size: 11.5px; color: var(--faint); }
.tl-item.error { --c: var(--bad); }
.tl-item.warn { --c: var(--warn); }
.tl-item.txadmin { --c: var(--vio); }
.tl-item.info { --c: var(--info); }

.people { display: flex; flex-direction: column; }
.person { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.p-av {
    width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
    font-weight: 600; font-size: 13px; color: #fff;
    background: linear-gradient(140deg, hsl(var(--hue, 310) 80% 62%), hsl(calc(var(--hue, 310) + 40) 70% 45%));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.person .grow { flex: 1; min-width: 0; }
.person .grow b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .grow small { color: var(--muted); font-size: 12px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 18px; border-radius: 999px;
    background: var(--glass); color: #fff;
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--edge);
    box-shadow: var(--shine);
    font: 500 13.5px/1 var(--body); cursor: pointer; white-space: nowrap;
    transition: background .2s, transform .2s var(--ease), border-color .2s, filter .2s;
}
.btn:hover { background: var(--glass-2); color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(135deg, var(--mag), var(--vio-2)); border-color: rgba(255, 160, 230, .45); box-shadow: 0 10px 28px -10px rgba(255, 62, 200, .8), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: #ffb1c0; background: rgba(255, 93, 121, .12); border-color: rgba(255, 93, 121, .35); }
.btn.danger:hover { background: rgba(255, 93, 121, .24); }
.btn.ghost { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.btn.ghost:hover { background: var(--glass); }
.btn.sm { height: 32px; padding: 0 13px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.discord { background: #5865f2; border-color: rgba(255, 255, 255, .25); height: 48px; font-size: 15px; padding: 0 24px; box-shadow: 0 12px 30px -10px rgba(88, 101, 242, .9); }
.btn.discord:hover { background: #6a76f5; }

.icon-btn {
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    background: var(--glass); border: 1px solid var(--edge); color: #fff; cursor: pointer;
}
.icon-btn:hover { background: var(--glass-2); }
.icon-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.input, select.input, textarea.input {
    width: 100%; height: 42px; padding: 0 16px;
    background: var(--glass-dark); color: #fff;
    border: 1px solid var(--edge); border-radius: 999px;
    font: 13.5px var(--body); outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
select.input { padding-right: 34px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
select.input option { background: #1a1226; }
textarea.input { height: auto; padding: 12px 14px; resize: vertical; border-radius: var(--radius-s); }
.input::placeholder { color: var(--faint); }
.input:focus { border-color: rgba(255, 62, 200, .6); box-shadow: 0 0 0 4px rgba(255, 62, 200, .14); background: rgba(8, 6, 14, .45); }
label { display: block; font-size: 13px; color: var(--silver); font-weight: 500; }
label .input { margin-top: 7px; }
input[type=checkbox] { accent-color: var(--mag); width: 16px; height: 16px; }
input[type=range] { accent-color: var(--mag); width: 100%; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 160px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--glass); border: 1px solid var(--edge); color: var(--silver); white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { color: #7ff5c2; border-color: rgba(78, 230, 166, .32); background: rgba(78, 230, 166, .13); }
.pill.bad, .pill.error { color: #ff9aad; border-color: rgba(255, 93, 121, .34); background: rgba(255, 93, 121, .13); }
.pill.warn { color: #ffd68e; border-color: rgba(255, 193, 92, .32); background: rgba(255, 193, 92, .12); }
.pill.info { color: #a6dbff; border-color: rgba(108, 195, 255, .32); background: rgba(108, 195, 255, .12); }
.pill.txadmin { color: #c9b2ff; border-color: rgba(154, 107, 255, .38); background: rgba(154, 107, 255, .15); }
.pill.mag { color: #ffa3e6; border-color: rgba(255, 62, 200, .34); background: rgba(255, 62, 200, .14); }

.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.t td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background .15s; }
table.t tbody tr:hover td { background: rgba(255, 255, 255, .045); }
table.t .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .grow small { color: var(--muted); font-size: 12px; }
.idbox { min-width: 32px; height: 26px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; background: var(--glass-dark); border: 1px solid var(--edge); font: 600 11.5px var(--mono); color: var(--silver); }
.ping { font: 500 12px var(--mono); color: var(--muted); }
.ping.good { color: var(--ok); }
.ping.mid { color: var(--warn); }
.ping.badp { color: var(--bad); }
.scroll-y { max-height: 340px; overflow-y: auto; padding-right: 4px; }

.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 112px 1fr 44px; gap: 12px; align-items: center; font-size: 13px; }
.bar-row span:first-child { color: var(--silver); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 10px; border-radius: 999px; background: var(--glass-dark); overflow: hidden; border: 1px solid var(--line); }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--vio), var(--mag)); box-shadow: 0 0 12px rgba(255, 62, 200, .45); transform-origin: left; animation: growx .9s var(--ease) both; }
@keyframes growx { from { transform: scaleX(0); } }
.bar-row b { text-align: right; font: 600 12.5px var(--mono); }

.empty { padding: 26px 10px; text-align: center; color: var(--muted); font-size: 13.5px; }
.empty b { display: block; color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 3px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 12px var(--mono); padding: 4px 10px; border-radius: 999px; background: var(--glass-dark); border: 1px solid var(--edge); color: var(--silver); }

.log {
    border-radius: var(--radius-m); margin-bottom: 12px; overflow: hidden; position: relative;
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--edge); box-shadow: var(--shine);
}
.log::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, var(--mag)); box-shadow: 0 0 12px var(--c, var(--mag)); }
.log-h { display: flex; align-items: center; gap: 10px; padding: 11px 14px 11px 18px; flex-wrap: wrap; }
.log-h .res { font: 600 13px var(--mono); color: #fff; }
.log-h .meta { margin-left: auto; display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.log pre { margin: 0; padding: 12px 14px 14px 18px; font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; color: #f0eaf8; border-top: 1px solid var(--line); background: rgba(6, 4, 12, .45); max-height: 280px; overflow: auto; }
.log.error { --c: var(--bad); }
.log.warn { --c: var(--warn); }
.log.txadmin { --c: var(--vio); }
.log.info { --c: var(--info); }
.log.resolved { opacity: .5; }
.hits { font: 600 12px var(--mono); color: #ff8ee0; }

.drop {
    border: 1.5px dashed rgba(255, 255, 255, .3); border-radius: var(--radius);
    padding: 34px 20px; text-align: center; color: var(--silver);
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    transition: border-color .2s, background .2s, transform .25s var(--ease);
    cursor: pointer;
}
.drop b { display: block; font-size: 17px; color: #fff; font-weight: 600; margin-bottom: 4px; }
.drop small { color: var(--muted); }
.drop.over { border-color: var(--mag); background: rgba(255, 62, 200, .14); transform: scale(1.005); }
.drop svg { width: 34px; height: 34px; stroke: #ff8ee0; fill: none; stroke-width: 1.6; margin-bottom: 8px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; }
.media {
    border-radius: var(--radius-m); overflow: hidden; display: flex; flex-direction: column;
    background: var(--glass-dark); border: 1px solid var(--edge);
    transition: transform .3s var(--ease), border-color .2s, background .2s;
}
.media:hover { transform: translateY(-4px); border-color: var(--edge-2); background: rgba(255, 255, 255, .06); }
.media .thumb {
    aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; margin: 8px 8px 0; border-radius: 12px;
    background-color: rgba(0, 0, 0, .35);
    background-image: linear-gradient(45deg, rgba(255, 255, 255, .04) 25%, transparent 25%), linear-gradient(-45deg, rgba(255, 255, 255, .04) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, .04) 75%), linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, .04) 75%);
    background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.media .thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.media .info { padding: 9px 12px; font-size: 11.5px; color: var(--muted); }
.media .info b { display: block; color: #fff; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.media .linkbox { padding: 0 10px 8px; }
.media .linkbox .input { height: 30px; font: 400 11.5px/1 var(--mono); padding: 0 9px; color: var(--silver); cursor: pointer; }
.media .linkbox .input:focus { color: #fff; border-color: var(--mag); }
.media .acts { display: flex; gap: 6px; padding: 0 10px 10px; }
.media .acts .btn { flex: 1; }
.media.pick { cursor: pointer; }
.media.pick:hover { border-color: var(--mag); }

.modal-bg { position: fixed; inset: 0; background: rgba(6, 3, 12, .45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); z-index: 70; display: grid; place-items: center; padding: 20px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal {
    width: min(920px, 100%); max-height: 88vh; display: flex; flex-direction: column;
    background: rgba(24, 16, 36, .78);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--edge-2); border-radius: var(--radius);
    box-shadow: var(--shine), 0 40px 90px -20px rgba(0, 0, 0, .85);
    animation: pop .25s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal.sm { width: min(470px, 100%); }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-h h3 { font-size: 17px; }
.modal-b { padding: 20px 22px; overflow-y: auto; }
.modal-f { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast {
    min-width: 240px; max-width: 380px; padding: 12px 16px; border-radius: 16px; font-size: 13.5px;
    background: rgba(24, 16, 36, .82); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--edge-2); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8);
    display: flex; gap: 10px; align-items: flex-start; animation: pop .25s var(--ease);
}
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.toast.bad::before { background: var(--bad); box-shadow: 0 0 10px var(--bad); }

.note { padding: 12px 16px; border-radius: 16px; font-size: 13.5px; border: 1px solid var(--edge); background: var(--glass); }
.note.ok { border-color: rgba(78, 230, 166, .38); background: rgba(78, 230, 166, .12); }
.note.bad { border-color: rgba(255, 93, 121, .4); background: rgba(255, 93, 121, .13); }
.note.warn { border-color: rgba(255, 193, 92, .38); background: rgba(255, 193, 92, .12); }
.note + .note { margin-top: 8px; }

.check { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 6px 0; color: var(--silver); }
.check i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 8px var(--ok); }
.check.warn i { background: var(--warn); box-shadow: 0 0 8px var(--warn); }

.auth-page { display: grid; place-items: center; padding: 30px 16px; }
.auth-card {
    position: relative; z-index: 1; width: min(410px, 100%);
    background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--edge-2); border-radius: 28px; padding: 32px 30px;
    box-shadow: var(--shine), 0 40px 90px -30px rgba(0, 0, 0, .8);
    animation: pop .4s var(--ease);
}
.auth-card.wide { width: min(530px, 100%); }
.auth-card h2 { font-size: 18px; margin-bottom: 4px; }
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.auth-brand img { width: 50px; height: 50px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(255, 62, 200, .55)); }
.auth-brand b { display: block; font-size: 19px; font-weight: 600; }
.auth-brand small { color: var(--muted); font-size: 12.5px; }

.editor-shell { display: grid; grid-template-rows: auto 1fr; height: calc(100vh - 190px); min-height: 520px; gap: 12px; }
.ed-bar {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--radius-m);
    background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border: 1px solid var(--edge); box-shadow: var(--shine);
}
.ed-bar .sep { width: 1px; height: 24px; background: var(--line-2); margin: 0 4px; }
.ed-sel { font: 12px var(--mono); color: var(--silver); padding: 0 8px; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-stage { position: relative; border: 1px solid var(--edge-2); border-radius: var(--radius-m); overflow: hidden; background: #fff; box-shadow: var(--drop); }
.ed-stage iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.ed-stage textarea { width: 100%; height: 100%; border: 0; resize: none; padding: 16px; background: #0c0815; color: #ece6f7; font: 13px/1.6 var(--mono); outline: none; tab-size: 2; white-space: pre; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--glass-dark); border: 1px solid var(--edge); }
.seg button { height: 28px; padding: 0 13px; border-radius: 999px; background: transparent; color: var(--silver); border: 0; font: 500 12.5px var(--body); cursor: pointer; }
.seg button.on { background: #fff; color: #140d1f; }
.ed-hint { font-size: 12.5px; color: var(--muted); }
.dirty-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 8px var(--warn); display: none; }
.dirty .dirty-dot { display: inline-block; }

.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.page-card { display: flex; flex-direction: column; gap: 12px; }
.page-card .pn { font-size: 16px; font-weight: 600; }
.page-card .pm { font-size: 12px; color: var(--muted); }
.page-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(140deg, rgba(255, 62, 200, .35), rgba(106, 61, 240, .35)); border: 1px solid rgba(255, 255, 255, .2); }
.page-ico svg { width: 19px; height: 19px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.seg-tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--glass-dark); border: 1px solid var(--edge); flex-wrap: wrap; }
.seg-tabs button { height: 32px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; color: var(--silver); font: 500 12.5px var(--body); cursor: pointer; }
.seg-tabs button:hover { color: #fff; }
.seg-tabs button.on { background: #fff; color: #140d1f; }

.char-detail { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.char-detail div { background: var(--glass-dark); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.char-detail small { display: block; font-size: 11px; color: var(--muted); }
.char-detail b { font-weight: 600; font-variant-numeric: tabular-nums; }

.bg-preview { height: 150px; border-radius: 16px; border: 1px solid var(--edge); background-size: cover; background-position: center; background-color: rgba(0, 0, 0, .3); position: relative; overflow: hidden; }
.bg-preview span { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }

.spin { width: 16px; height: 16px; border: 2px solid var(--line-2); border-top-color: var(--mag); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1240px) {
    .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g-main { grid-template-columns: 1fr; }
    .g-3 { grid-template-columns: 1fr 1fr; }
    .nav-pills a span { display: none; }
    .nav-pills a { padding: 0 13px; }
}
@media (max-width: 900px) {
    .app-top { grid-template-columns: 1fr auto; padding: 12px 16px; }
    .nav-pills { display: none; }
    .brand small { display: none; }
    .dock {
        top: auto; bottom: 14px; left: 50%; transform: translateX(-50%);
        flex-direction: row; padding: 7px; max-width: calc(100vw - 24px); overflow-x: auto;
    }
    .dock .sep { width: 1px; height: auto; margin: 8px 2px; }
    .dock [data-tip]::after { display: none; }
    .main { padding: 6px 16px 110px; }
    .g-3, .g-2 { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .topbar h1 { font-size: 24px; }
    .editor-shell { height: calc(100vh - 210px); }
    .toasts { bottom: 90px; right: 12px; left: 12px; }
    .barchart { height: 220px; }
    .bc-plot, .bc-labels { --gap: 4px !important; }
}
@media (max-width: 560px) {
    .g-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
    .kpi { min-height: 0; padding: 16px; }
    .kpi .k-val { font-size: 21px; }
    .spark { display: none; }
    .card { padding: 17px 16px; border-radius: 20px; }
    .table-wrap { margin: 0 -16px; padding: 0 16px; }
    .app-top .right .round.opt { display: none; }
    .state { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
    .bc-bar { transform: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .card, .nav-pills a, .round, .btn, .log, .drop, .ed-bar, .auth-card { background: rgba(28, 20, 40, .9); }
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 9px; }
::-webkit-scrollbar-track { background: transparent; }
.tl-item { display: block; color: inherit; }

.bc-col.tip-r .bc-tip { left: auto; right: 0; transform: translate(0, 4px); }
.bc-col.tip-l .bc-tip { left: 0; transform: translate(0, 4px); }
.bc-col.tip-r:hover .bc-tip, .bc-col.tip-r.hlc .bc-tip, .bc-col.tip-l:hover .bc-tip, .bc-col.tip-l.hlc .bc-tip { transform: none; }
.badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   Liquid Glass
   ============================================================ */

:root {
    --glass: rgba(255, 255, 255, .105);
    --glass-2: rgba(255, 255, 255, .16);
    --glass-3: rgba(255, 255, 255, .23);
    --glass-dark: rgba(10, 7, 20, .3);
    --glass-deep: rgba(16, 10, 30, .66);
    --edge: rgba(255, 255, 255, .2);
    --edge-2: rgba(255, 255, 255, .34);
    --blur: blur(22px) saturate(185%) brightness(1.06);
    --shine:
        inset 0 1px 0 rgba(255, 255, 255, .5),
        inset 0 -1px 0 rgba(255, 255, 255, .1),
        inset 1px 0 0 rgba(255, 255, 255, .14),
        inset -1px 0 0 rgba(255, 255, 255, .14);
    --drop: 0 28px 70px -30px rgba(0, 0, 0, .9), 0 2px 10px -4px rgba(0, 0, 0, .55);
    --head: 'Archivo', 'Segoe UI', sans-serif;
    --body: 'Archivo', 'Segoe UI', sans-serif;
    --ring: linear-gradient(145deg, rgba(255, 255, 255, .85), rgba(255, 122, 217, .4) 28%, rgba(255, 255, 255, .04) 52%, rgba(200, 166, 255, .55));
}

body { font-variation-settings: "wdth" 100; }

h1, h2, h3, .brand b, .kpi b { letter-spacing: -.022em; }
h1 { font-variation-settings: "wdth" 110; }

.card, .glass, .media, .auth-card, .kpi, .modal-box, .drop {
    position: relative;
    isolation: isolate;
}
.dock { isolation: isolate; }

.card::after, .glass::after, .media::after, .auth-card::after, .kpi::after,
.modal-box::after, .drop::after, .dock::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.3px;
    pointer-events: none;
    background: var(--ring);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
}

.card::before, .auth-card::before, .kpi::before, .modal-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(120% 80% at 18% 0%, rgba(255, 255, 255, .26), transparent 48%),
        radial-gradient(90% 70% at 100% 100%, rgba(255, 62, 200, .14), transparent 55%);
}

.card, .glass, .auth-card, .kpi, .modal-box, .media {
    border-color: transparent;
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
}

.app-top, .dock {
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
}

.btn {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 14px 34px -20px rgba(0, 0, 0, .9);
    transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s cubic-bezier(.22, 1, .36, 1), filter .3s, background .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn.primary {
    background: linear-gradient(140deg, var(--mag), var(--vio-2) 92%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 16px 38px -16px rgba(255, 62, 200, .9);
}
.btn.primary:hover {
    filter: brightness(1.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 22px 46px -16px rgba(255, 62, 200, 1);
}

.input, select.input, textarea.input {
    background: rgba(255, 255, 255, .07);
    border-color: transparent;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), inset 0 0 0 1px rgba(255, 255, 255, .1);
    -webkit-backdrop-filter: blur(13px) saturate(165%);
    backdrop-filter: blur(13px) saturate(165%);
}
.input:focus, select.input:focus, textarea.input:focus {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 2px rgba(255, 62, 200, .55);
}

@supports (backdrop-filter: url(#liquid)) {
    .app-top, .dock, .auth-card {
        -webkit-backdrop-filter: blur(13px) saturate(185%) url(#liquid);
        backdrop-filter: blur(13px) saturate(185%) url(#liquid);
    }
}
