/* Thunder Suite: same black look as the rest of the site (see style.css and the old admin panel). */
:root {
    --bg: #000;
    --panel: #0a0a0a;
    --panel-2: #111;
    --line: rgba(255, 255, 255, 0.1);
    --line-2: rgba(255, 255, 255, 0.2);
    --text: #fff;
    --muted: #cccccc;
    --faint: #7d7d7d;
    --accent: #8e44ad;
    --accent-hi: #9b59b6;
    --good: #2ecc71;
    --warn: #f1c40f;
    --bad: #ff4757;
    --font-heading: 'Cinzel', serif;
    --font: 'Outfit', sans-serif;
    --mono: 'Consolas', 'Monaco', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); }
body { color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.6; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-hi); }
code { font-family: var(--mono); font-size: .85em; background: var(--panel-2); padding: 1px 6px; border-radius: 4px; }
.hidden { display: none !important; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; letter-spacing: 1px; }

/* gate */
.gate { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.gate-card { width: min(420px, 100%); text-align: center; padding: 36px 30px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.gate-card h1 { color: var(--accent); font-size: 1.5rem; margin-bottom: 8px; letter-spacing: 2px; }
.gate-card p { color: var(--muted); margin-bottom: 22px; }

/* shell */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg); border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 2px; }
.brand { padding: 0 10px 18px; }
.brand b { display: block; font-family: var(--font-heading); color: var(--accent); font-size: 1.15rem; letter-spacing: 2px; }
.brand span { font-size: .75rem; color: var(--faint); }
.nav-group { margin: 16px 10px 4px; font-size: .7rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--faint); }
.nav a { display: flex; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; }
.nav a:hover { color: #fff; background: var(--panel-2); }
.nav a.on { color: #fff; background: rgba(142, 68, 173, .15); border-left-color: var(--accent); }
.nav a .dot { margin-left: auto; min-width: 20px; padding: 0 6px; text-align: center; font-size: .72rem; border-radius: 10px; background: var(--accent); color: #fff; }
.side-foot { margin-top: auto; padding: 14px 10px 0; font-size: .8rem; color: var(--faint); border-top: 1px solid var(--line); }
.side-foot a { color: var(--muted); }

.main { min-width: 0; padding-bottom: 60px; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: var(--bg); border-bottom: 1px solid var(--line); }
.top h2 { font-size: 1.15rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .sp { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.pill.good i { background: var(--good); }
.pill.bad i { background: var(--bad); }
.btn.menu-btn { display: none; }
.page { padding: 26px 28px; max-width: 1280px; }
.lede { color: var(--muted); margin-bottom: 22px; max-width: 70ch; }

/* blocks */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; min-width: 0; }
.card h3 { font-size: 1rem; color: #fff; margin-bottom: 4px; }
.card .sub { color: var(--faint); font-size: .88rem; margin-bottom: 16px; }
.card.danger { border-color: rgba(255, 71, 87, .4); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 160px; }
.tile .k { font-size: .72rem; letter-spacing: 1.3px; text-transform: uppercase; color: var(--faint); }
.tile .v { font-size: 1.7rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile .s { font-size: .82rem; color: var(--faint); }

label.f { display: flex; flex-direction: column; gap: 5px; font-size: .8rem; color: var(--muted); }
input[type=text], input[type=number], input[type=date], input[type=time], select, textarea {
    width: 100%; padding: 10px 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 10px; outline: none; color: #fff;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: rgba(142, 68, 173, .05); }
textarea { resize: vertical; min-height: 92px; }
textarea.mono { font-family: var(--mono); font-size: .85rem; min-height: 240px; background: var(--panel); color: #00ff00; line-height: 1.4; }
select option, select optgroup { background: #111; color: #fff; }
input[type=checkbox] { accent-color: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; padding: 9px 18px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: #fff; font-weight: 600; transition: .2s; text-decoration: none; }
.btn:hover { border-color: #fff; }
.btn[disabled] { opacity: .45; cursor: not-allowed; border-color: var(--line-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn.bad { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn.bad:hover { background: rgba(255, 71, 87, .12); }
.btn.sm { padding: 5px 12px; font-size: .84rem; }
.btn.ghost { background: transparent; }

.tag { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .75rem; border: 1px solid var(--line-2); color: var(--muted); }
.tag.good { color: var(--good); border-color: rgba(46, 204, 113, .5); }
.tag.warn { color: var(--warn); border-color: rgba(241, 196, 15, .5); }
.tag.bad { color: var(--bad); border-color: rgba(255, 71, 87, .5); }

.who { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 10px; min-height: 58px; }
.who img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.who small { display: block; color: var(--faint); font-family: var(--mono); font-size: .75rem; }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: .72rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px 10px; border-bottom: 1px solid rgba(255, 255, 255, .06); vertical-align: middle; }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; width: 90px; }
.bar { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; min-width: 80px; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.list { display: flex; flex-direction: column; }
.list .li { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.list .li:last-child { border-bottom: none; }
.empty { padding: 30px 10px; text-align: center; color: var(--faint); }

details.entry { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
details.entry + details.entry { margin-top: 8px; }
details.entry summary { cursor: pointer; padding: 11px 14px; display: flex; gap: 10px; align-items: center; list-style: none; }
details.entry summary::-webkit-details-marker { display: none; }
details.entry .body { padding: 0 16px 14px; color: var(--muted); font-size: .9rem; }
details.entry .body b { color: #fff; }
details.entry .body ul { margin: 4px 0 10px; padding-left: 18px; }

.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .85); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; padding: 24px; }
.modal h3 { margin-bottom: 8px; }
.modal p { margin-bottom: 20px; color: var(--muted); white-space: pre-line; }
.modal .row { justify-content: flex-end; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { padding: 11px 16px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line-2); max-width: 360px; }
.toast.good { border-color: var(--good); }
.toast.bad { border-color: var(--bad); }
.skeleton { color: var(--faint); padding: 40px 0; text-align: center; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; }
    .side { position: fixed; z-index: 40; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
    .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .7); }
    .btn.menu-btn { display: inline-flex; }
    .top { gap: 10px; }
    #bot-pill span { display: none; }
    #bot-pill { padding: 4px 8px; }
    .top, .page { padding-left: 16px; padding-right: 16px; }
    .g2, .g3, .g4 { grid-template-columns: 1fr; }
}

/* Macro hunter */
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: rgba(255, 255, 255, .03); }
.heat { display: grid; grid-template-columns: 34px repeat(24, 1fr); gap: 2px; margin-top: 6px; }
.heat .hl { font-size: .7rem; color: var(--faint); line-height: 14px; }
.heat i { display: block; height: 14px; border-radius: 2px; background: var(--accent-hi); }
.hist { display: flex; align-items: flex-end; gap: 2px; height: 120px; margin-top: 6px; border-bottom: 1px solid var(--line); }
.hist i { flex: 1; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 1px; }
details summary { cursor: pointer; color: var(--muted); }
.mh-scroll { overflow-x: auto; max-width: 100%; }
.heat { min-width: 0; }
.heat i { min-width: 0; }
.mh-scroll .tbl { min-width: 640px; }
