:root {
  --bg: #080610;
  --panel: #12101a;
  --panel-2: #191523;
  --line: rgba(168, 85, 247, 0.24);
  --text: #f8f4ff;
  --muted: #a9a0b8;
  --accent: #a855f7;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 0%, rgba(168, 85, 247, 0.18), transparent 360px),
    linear-gradient(180deg, #080610, #0d0915);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: #d8b4fe; }
.shell { width: min(1380px, calc(100vw - 32px)); margin: 0 auto; padding: 28px 0 46px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 26px; }
.brand { font-weight: 900; font-size: 22px; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.card {
  border: 1px solid var(--line);
  background: rgba(18, 16, 26, 0.94);
  border-radius: 8px;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.28);
}
.card-header { padding: 16px 18px; border-bottom: 1px solid var(--line); font-weight: 900; }
.card-body { padding: 18px; }
.stat strong { display: block; font-size: 26px; margin-top: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.btn, button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  padding: 9px 12px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}
.btn.primary, button.primary { background: var(--accent); border-color: var(--accent); }
.btn.danger, button.danger { background: rgba(239, 68, 68, 0.16); border-color: rgba(239, 68, 68, 0.5); color: #fecaca; }
.btn.success, button.success { background: rgba(34, 197, 94, 0.18); border-color: rgba(34, 197, 94, 0.55); color: #dcfce7; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090811;
  color: var(--text);
  padding: 10px 12px;
}
textarea { min-height: 52px; resize: vertical; }
label { display: block; color: var(--muted); font-size: 12px; font-weight: 800; margin-bottom: 6px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
code { background: #080711; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; color: #f0abfc; }
.pill { display: inline-flex; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 900; }
.pill.pending { background: rgba(245, 158, 11, .16); color: #fde68a; }
.pill.approved { background: rgba(34, 197, 94, .16); color: #bbf7d0; }
.pill.rejected { background: rgba(239, 68, 68, .16); color: #fecaca; }
.chart { display: grid; grid-template-columns: repeat(14, minmax(18px, 1fr)); gap: 8px; min-height: 180px; align-items: end; }
.bar { min-height: 8px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #c084fc, #7e22ce); }
.bar-label { color: var(--muted); font-size: 11px; text-align: center; margin-top: 6px; }
.login { width: min(420px, calc(100vw - 32px)); margin: 10vh auto; }
.alert { border: 1px solid rgba(239, 68, 68, .42); background: rgba(127, 29, 29, .25); color: #fecaca; padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; }
.ok { border-color: rgba(34, 197, 94, .42); background: rgba(20, 83, 45, .25); color: #dcfce7; }
details summary { color: #d8b4fe; cursor: pointer; font-weight: 800; }
.actions { display: grid; gap: 8px; min-width: 250px; }

@media (max-width: 980px) {
  .stats, .layout { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  table { min-width: 920px; }
  .table-wrap { overflow-x: auto; }
}
