/* ACH — Anticheat Hellas web panel
   Palette: near-black surfaces, one blue accent, severity colours only where
   they carry meaning. No decorative colour. */

:root {
    --bg: #0b0d11;
    --surface: #12151b;
    --surface-2: #171b22;
    --line: #232a34;
    --text: #e8edf4;
    --muted: #8b96a8;
    --accent: #4b8bf5;
    --low: #7c8794;
    --medium: #e0b341;
    --high: #f08a3c;
    --critical: #e5484d;
    --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', 'Segoe UI', Roboto, system-ui, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ login */
.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 32px;
}
.login-card .mark {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4b8bf5, #7c3aed);
    display: grid; place-items: center;
    font-weight: 800; font-size: 14px; letter-spacing: 0.5px;
    margin-bottom: 18px;
}
.login-card h1 { font-size: 18px; margin: 0 0 4px; }
.login-card p { color: var(--muted); margin: 0 0 24px; font-size: 13px; }

label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }

input[type=text], input[type=password], input[type=search], select {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    font-size: 14px;
    margin-bottom: 16px;
}
input:focus, select:focus { outline: none; border-color: var(--accent); }

button, .btn {
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}
button:hover, .btn:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover { background: #3d78d8; }
button.danger { border-color: rgba(229, 72, 77, 0.45); color: #ff9496; }
button.warn { border-color: rgba(240, 138, 60, 0.45); color: #ffb98a; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: 216px 1fr; min-height: 100vh; }

aside {
    background: var(--surface);
    border-right: 1px solid var(--line);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
aside .brand {
    display: flex; align-items: center; gap: 10px;
    padding: 0 8px 20px;
}
aside .brand .mark {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, #4b8bf5, #7c3aed);
    display: grid; place-items: center;
    font-weight: 800; font-size: 11px;
}
aside .brand b { font-size: 14px; display: block; }
aside .brand span { font-size: 11px; color: var(--muted); }

aside nav a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
}
aside nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
aside nav a.active { background: rgba(75, 139, 245, 0.14); color: #a9c6ff; }

aside .foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

main { padding: 24px 28px 48px; max-width: 1400px; }
header.page { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
header.page h1 { font-size: 20px; margin: 0; font-weight: 600; }
header.page .spacer { flex: 1; }

/* ------------------------------------------------------------------ cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 22px; }
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
}
.card .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--muted); }
.card .value { font-size: 26px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.card .value.warn { color: var(--high); }
.card .value.bad { color: var(--critical); }

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 18px;
    overflow: hidden;
}
.panel h2 {
    font-size: 13px; text-transform: uppercase; letter-spacing: 0.7px;
    color: var(--muted); margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--line);
    font-weight: 600;
}
.panel .body { padding: 16px 18px; }

/* ------------------------------------------------------------------ table */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
    text-align: left; font-weight: 500; font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.6px; color: var(--muted); padding: 10px 18px;
    border-bottom: 1px solid var(--line); background: var(--surface);
    position: sticky; top: 0;
}
td { padding: 10px 18px; border-bottom: 1px solid rgba(35, 42, 52, 0.7); }
tbody tr:hover { background: rgba(75, 139, 245, 0.05); }
tbody tr.clickable { cursor: pointer; }
.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 12px; color: var(--muted); }
.nowrap { white-space: nowrap; }

.badge { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; text-transform: capitalize; }
.badge.low { background: rgba(124, 135, 148, 0.16); color: var(--low); }
.badge.medium { background: rgba(224, 179, 65, 0.15); color: var(--medium); }
.badge.high { background: rgba(240, 138, 60, 0.15); color: var(--high); }
.badge.critical { background: rgba(229, 72, 77, 0.17); color: var(--critical); }
.badge.ok { background: rgba(46, 160, 67, 0.15); color: #57c46a; }

.score { font-variant-numeric: tabular-nums; font-weight: 600; }
.score.s0 { color: var(--muted); }
.score.s1 { color: var(--medium); }
.score.s2 { color: var(--high); }
.score.s3 { color: var(--critical); }

.empty { color: var(--muted); text-align: center; padding: 36px 0; font-size: 13px; }

/* ------------------------------------------------------------------ charts */
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.bar-row > span:first-child { flex: 0 0 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bar { flex: 1 1 auto; min-width: 60px; }
.bar-row .n { flex: 0 0 46px; }
.bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; display: block; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.bar-row .n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.spark { display: flex; align-items: flex-end; gap: 2px; height: 60px; }
.spark i { flex: 1; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 3px; opacity: 0.8; }

/* ------------------------------------------------------------------ detail */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } .shell { grid-template-columns: 1fr; } aside { flex-direction: row; overflow-x: auto; } }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.shots img { width: 100%; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.toast {
    position: fixed; bottom: 22px; right: 22px;
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: 8px; padding: 12px 18px; font-size: 13px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    opacity: 0; transform: translateY(8px); transition: all 0.18s ease;
    pointer-events: none; max-width: 340px; word-break: break-word;
}
.toast.show { opacity: 1; transform: none; }


/* ------------------------------------------------------------------ live */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #57c46a; display: inline-block;
    box-shadow: 0 0 0 0 rgba(87,196,106,0.6); animation: pulse 2s infinite; }
.live-dot.off { background: var(--critical); animation: none; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(87,196,106,0.5); }
    70% { box-shadow: 0 0 0 8px rgba(87,196,106,0); }
    100% { box-shadow: 0 0 0 0 rgba(87,196,106,0); }
}

.map-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
@media (max-width: 1100px) { .map-wrap { grid-template-columns: 1fr; } }

.ach-map { width: 100%; height: auto; display: block; border-radius: var(--radius);
    border: 1px solid var(--line); background: #0a0d12; }
.map-player { cursor: pointer; }
.map-player:hover circle { opacity: 1; }

.map-side { display: flex; flex-direction: column; gap: 12px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--muted); }
.map-legend span { display: flex; align-items: center; gap: 5px; }
.map-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.feed { display: flex; flex-direction: column; gap: 6px; max-height: 520px; overflow: auto; }
.feed-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
    background: var(--surface-2); font-size: 12px; cursor: pointer; }
.feed-row:hover { background: #1d222b; }
.feed-row .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-row .meta { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

.banner { background: rgba(229,72,77,0.12); border: 1px solid rgba(229,72,77,0.4);
    color: #ffb3b5; border-radius: var(--radius); padding: 12px 16px; font-size: 13px; margin-bottom: 16px; }
.banner.warn { background: rgba(224,179,65,0.1); border-color: rgba(224,179,65,0.35); color: #f0d08a; }

.key { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 13px;
    letter-spacing: 0.5px; color: #a9c6ff; }
.key.copy { cursor: pointer; }
.key.copy:hover { text-decoration: underline; }

.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: grid; place-items: center; z-index: 50; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    padding: 24px; width: 100%; max-width: 440px; }
.modal h3 { margin: 0 0 16px; font-size: 16px; }
.modal label { margin-top: 12px; }
.modal .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

/* ------------------------------------------------------- activation page */
.activate-card {
    width: 100%;
    max-width: 520px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 32px;
}
.activate-card .mark {
    width: 48px; height: 48px; border-radius: 12px;
    background: linear-gradient(135deg, #4b8bf5, #7c3aed);
    display: grid; place-items: center;
    font-weight: 800; font-size: 14px; letter-spacing: 0.5px;
    margin-bottom: 18px;
}
.activate-card h1 { font-size: 20px; margin: 0 0 6px; }
.activate-card .sub { color: var(--muted); font-size: 13px; margin: 0 0 20px; line-height: 1.5; }
.activate-card .fine { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 14px 0 0; }
.activate-card .step { margin: 0; }
.activate-card button + button { margin-top: 8px; }
.kv-card { background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
    padding: 14px 16px; margin-bottom: 18px; }
.kv-card .kv { margin: 0; }
.key-box { background: var(--bg); border: 1px dashed var(--line); border-radius: 10px;
    padding: 16px; text-align: center; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
    font-size: 16px; letter-spacing: 1px; color: #a9c6ff; margin-bottom: 10px; word-break: break-all; }
pre.cfg { background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
    padding: 12px; margin: 0 0 10px; overflow: auto; font-size: 13px; color: var(--text); }
.ok-line { color: #57c46a; font-weight: 600; margin: 0 0 14px; }
.err { color: var(--critical); font-size: 13px; margin: 16px 0 0; line-height: 1.5; }
