/* ============================================================
   iGaming Tech — Core Design System
   Main color: #121212 | Accent: Macau Green #00843D
   ============================================================ */

:root {
  --bg: #020202;
  --bg-deep: #000000;
  --panel: #050505;
  --panel-2: #070707;
  --card: #090909;
  --card-2: #0d0d0d;
  --line: #0f0f0f;
  --line-2: #141414;
  --text: #f4f4f6;
  --muted: #6a6a72;
  --faint: #3d3d44;
  --dim: #2c2c30;

  --ac: #00843D;
  --ac-bright: #00c95e;
  --ac-soft: #4db87f;
  --ac-deep: #005c2a;
  --ac-dim: rgba(0, 132, 61, 0.14);
  --ac-metallic: linear-gradient(135deg, #005c2a 0%, #00843D 25%, #00c95e 50%, #00843D 75%, #005c2a 100%);

  --green: #4ade80;
  --green-dim: rgba(74, 222, 128, 0.14);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.14);
  --yellow: #facc15;
  --yellow-dim: rgba(250, 204, 21, 0.14);
  --blue: #60a5fa;
  --blue-dim: rgba(96, 165, 250, 0.14);

  --r-lg: 16px;
  --r: 12px;
  --r-sm: 8px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--text); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- top bar ---------- */

.topbar {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  display: flex; align-items: center; gap: 22px;
  max-width: 1240px; margin: 0 auto; padding: 14px 20px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.brand-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--ac-metallic); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}
.brand span { color: var(--ac); }
.brand-logo { height: 32px; width: auto; display: block; }
.brand-logo.sm { height: 26px; }

.pills { display: flex; gap: 4px; }
.pill {
  padding: 8px 14px; border-radius: 6px; border: none;
  background: transparent; color: var(--muted);
  font-size: 13.5px; font-weight: 500;
  transition: color .15s, background .15s;
}
.pill:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.pill.active { color: var(--text); background: var(--card); }

.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ac-metallic); color: #fff; border: none;
  border-radius: var(--r-sm); padding: 10px 20px;
  font-size: 14px; font-weight: 600;
  transition: all .2s;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.btn:hover { transform: scale(1.02); filter: brightness(1.15); }
.btn:active { transform: scale(0.95); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn.ghost:hover { transform: scale(1.02); border-color: #3d3d3d; background: rgba(255,255,255,0.08); }
.btn.ghost:active { transform: scale(0.95); }
.btn.white { background: #fff; color: var(--bg); }
.btn.white:hover { transform: scale(1.02); background: #ffffff; filter: brightness(1.1); }
.btn.danger { background: var(--red-dim); color: var(--red); }
.btn.small { padding: 7px 14px; font-size: 13px; border-radius: 6px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- cards ---------- */

.card {
  background: var(--card);
  border: none; border-radius: var(--r);
  padding: 22px;
}

/* ---------- badges ---------- */

.badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  background: var(--card-2); color: var(--muted);
}
.badge.ok { background: var(--green-dim); color: var(--green); }
.badge.warn { background: var(--yellow-dim); color: var(--yellow); }
.badge.off { background: var(--card-2); color: var(--faint); }
.badge.accent { background: var(--ac-dim); color: var(--ac-bright); }
.badge.red { background: var(--red-dim); color: var(--red); }
.badge.blue { background: var(--blue-dim); color: var(--blue); }

/* ---------- tables ---------- */

.table-card {
  background: var(--card); border-radius: var(--r);
  overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: 12px 18px;
  font-size: 11px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--faint);
  border-bottom: 1px solid var(--line);
}
td { padding: 12px 18px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
td.mono { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

/* ---------- forms ---------- */

.input, select.input {
  width: 100%;
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); padding: 10px 14px;
  color: var(--text); font-size: 14px; font-family: inherit;
}
.input:focus { outline: none; border-color: var(--ac); }
select.input { width: auto; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }

.form-error {
  background: var(--red-dim); color: var(--red);
  border-radius: var(--r-sm); padding: 10px 14px;
  font-size: 13px; margin-bottom: 14px; display: none;
}

/* ---------- code ---------- */

pre.code {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 16px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
  overflow-x: auto; color: #d6d6dc;
}

/* ---------- auth pages ---------- */

.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg-deep); }
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--card);
  border-radius: var(--r-lg); padding: 36px;
  border: 1px solid var(--line);
}
.auth-card .brand { margin-bottom: 26px; }
.auth-card h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.auth-card .alt { margin-top: 18px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-card .alt a { color: var(--ac-bright); }

/* ---------- misc ---------- */

.hidden { display: none !important; }
.spinner { color: var(--faint); padding: 40px !important; text-align: center; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

.kv { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.kv:first-of-type { border-top: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .input { width: auto; }
.toolbar .grow { flex: 1; min-width: 160px; }

.empty-note { color: var(--dim); font-size: 12px; padding: 16px 0; text-align: center; }

/* ---------- SVG icons ---------- */

svg.icon {
  width: 16px; height: 16px; flex: none;
  stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -2px;
}
svg.icon.sm { width: 13px; height: 13px; stroke-width: 2; }
svg.icon.lg { width: 20px; height: 20px; }
svg.icon.xl { width: 24px; height: 24px; }

/* icon inside sidebar menu items */
.mi .ic { width: 18px; text-align: center; display: inline-flex; align-items: center; justify-content: center; }
.mi .ic svg.icon { width: 16px; height: 16px; }

/* icon inside date chip, buttons, etc */
.date-chip svg.icon { width: 14px; height: 14px; }
.icon-btn svg.icon { width: 16px; height: 16px; }

/* bento cell icons */
.bcell h3 .ic { display: inline-flex; align-items: center; }
.bcell h3 .ic svg.icon { width: 18px; height: 18px; color: var(--ac); }

/* section head icons */
.bhead h3 .ic { display: inline-flex; align-items: center; }
.bhead h3 .ic svg.icon { width: 14px; height: 14px; }

/* trust bar icons */
.trust-item .ticon {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--card); display: flex; align-items: center; justify-content: center;
}
.trust-item .ticon svg.icon { width: 14px; height: 14px; color: var(--ac-bright); }

/* alert row icons */
.alert-row .ic { flex: none; display: flex; align-items: center; }
.alert-row .ic svg.icon { width: 18px; height: 18px; }
.alert-row.critical .ic svg.icon { color: var(--red); }
.alert-row.warn .ic svg.icon { color: var(--yellow); }
.alert-row.info .ic svg.icon { color: var(--ac-bright); }

/* chart title icons */
.bigchart .t svg.icon { width: 12px; height: 12px; color: var(--ac); }

@media (max-width: 760px) {
  .topbar-in { padding: 12px 16px; gap: 12px; }
  .pills { display: none; }
}
