/* Swift Cloud: built on the SwiftCore theme tokens (swiftcore-theme.css), without the pixel faces. */
:root {
  --bg: #0d1020;
  --bg-deep: #080a16;
  --surface: #131830;
  --surface-2: #182042;
  --surface-3: #1e2750;
  --border: #222a48;
  --border-soft: #1a2140;
  --text: #eceef6;
  --muted: #8e94b0;
  --faint: #5c6384;
  --accent: #fc6d00;
  --accent-bright: #ff9a3d;
  --accent-light: #ffbe7a;
  --gold: #ffc83d;
  --green: #4ade80;
  --red: #ff5c5c;
  --amber: #f5c542;
  --radius: 14px;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(1200px 600px at 85% -10%, rgba(252, 109, 0, .10), transparent 60%), var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-bright); text-decoration: none; }
a:hover { color: var(--accent-light); }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 600; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-size: 13px; }
.error { color: var(--red); min-height: 1.5em; margin: 0; }
[hidden] { display: none !important; }

/* buttons and inputs */
.btn {
  appearance: none; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 10px; padding: 9px 16px; font: 600 14px var(--body); cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface-3); border-color: #2c365f; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.btn.primary { background: linear-gradient(180deg, var(--accent-bright), var(--accent)); border-color: var(--accent); color: #1a0b00; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { background: rgba(255, 92, 92, .12); border-color: rgba(255, 92, 92, .45); color: #ffb3b3; }
.btn.good { background: rgba(74, 222, 128, .10); border-color: rgba(74, 222, 128, .4); color: #b6f5cc; }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 12px; font-size: 13px; }
input, select {
  width: 100%; background: var(--bg-deep); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; font: 15px var(--body);
}
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: min(380px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 32px 28px; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.login-card label, .login-card input { text-align: left; }
.login-card .btn { width: 100%; margin-top: 18px; padding: 12px; }
.login-logo { width: 120px; height: 120px; margin: -8px auto 4px; display: block; }
.login-card h1 span, .brand em { color: var(--accent-bright); font-style: normal; }

/* shell */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px;
  padding: 20px 14px; background: rgba(8, 10, 22, .7); border-right: 1px solid var(--border-soft);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 19px; padding: 0 6px; }
.brand img { width: 44px; height: 44px; }
#nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
#nav a {
  display: flex; align-items: center; justify-content: space-between; color: var(--muted); padding: 9px 12px;
  border-radius: 10px; font-weight: 500;
}
#nav a:hover { color: var(--text); background: var(--surface); }
#nav a.active { color: var(--text); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.dot.on { background: var(--green); box-shadow: 0 0 0 4px rgba(74, 222, 128, .15); }
.view { padding: 28px 32px 60px; min-width: 0; outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }

/* cards and grids */
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 16px; }
.two { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; min-width: 0; }
.card h2 { margin-bottom: 12px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .value.hot { color: var(--accent-bright); }
.stat .value.bad { color: var(--red); }

/* chart */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 8px; }
.bars div {
  flex: 1; min-height: 2px; border-radius: 4px 4px 1px 1px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent)); opacity: .9; position: relative;
}
.bars div:hover { opacity: 1; filter: brightness(1.15); }
.axis { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; margin-top: 6px; }
.meter { height: 8px; border-radius: 99px; background: var(--bg-deep); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }

/* tables and lists */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--faint); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 0 10px 10px; }
td { padding: 10px; border-top: 1px solid var(--border-soft); vertical-align: middle; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
.who { display: flex; align-items: center; gap: 10px; font-weight: 600; white-space: nowrap; }
.who img { width: 26px; height: 26px; border-radius: 6px; image-rendering: pixelated; background: var(--surface-3); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; font-size: 12px;
  font-weight: 600; border: 1px solid var(--border); color: var(--muted); white-space: nowrap;
}
.pill.cheater, .pill.BLATANT { color: #ffb3b3; border-color: rgba(255, 92, 92, .5); background: rgba(255, 92, 92, .12); }
.pill.suspect, .pill.HIGH { color: #ffd59a; border-color: rgba(255, 154, 61, .5); background: rgba(255, 154, 61, .12); }
.pill.watch, .pill.MEDIUM { color: #ffe7a3; border-color: rgba(245, 197, 66, .4); background: rgba(245, 197, 66, .08); }
.pill.clean, .pill.legit, .pill.LOW { color: #b6f5cc; border-color: rgba(74, 222, 128, .35); background: rgba(74, 222, 128, .07); }
.prob { font-variant-numeric: tabular-nums; font-weight: 700; }
.feed { display: flex; flex-direction: column; gap: 8px; max-height: 70vh; overflow-y: auto; }
.event {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px;
  background: var(--bg-deep); border: 1px solid var(--border-soft); border-radius: 12px; animation: pop .25s ease-out;
}
.event .details { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event.ban { border-color: rgba(255, 92, 92, .45); }
.event.verdict { border-color: rgba(255, 154, 61, .45); }
@keyframes pop { from { transform: translateY(-4px); opacity: 0; } }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input { max-width: 320px; }
.toolbar select { width: auto; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.feature-row { display: grid; grid-template-columns: 130px 1fr 54px; gap: 10px; align-items: center; font-size: 13px; margin: 6px 0; }
.empty { color: var(--faint); padding: 26px 0; text-align: center; }
.secret { font-family: var(--mono); background: var(--bg-deep); border: 1px dashed var(--accent); border-radius: 10px; padding: 12px; word-break: break-all; }

.toast {
  position: fixed; right: 20px; bottom: 20px; max-width: min(420px, calc(100vw - 40px)); background: var(--surface-3);
  border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 12px; padding: 12px 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4); opacity: 0; transform: translateY(8px); transition: .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; }
  #nav { flex-direction: row; flex-wrap: wrap; order: 3; width: 100%; }
  #nav a { padding: 7px 10px; }
  .two { grid-template-columns: 1fr; }
  .view { padding: 20px 16px 48px; }
  .event { grid-template-columns: 1fr; }
}
