:root,
.theme-dark {
  --bg: #0f172a;
  --card: #0b1224;
  --panel: #0d162b;
  --border: #1f2a44;
  --accent: #46b2ff;
  --accent2: #9ee2ff;
  --text: #e6edf7;
  --muted: #95a3c2;
  --page-width: 1200px;
  --table-stripe: #0e172b;
  --card-grad: linear-gradient(150deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  --bg-overlay-1: #1a2c52;
  --bg-overlay-2: #16395a;
  --bg-overlay-3: #0d2b45;
}
.theme-light {
  --bg: #f3f6fb;
  --card: #ffffff;
  --panel: #f7faff;
  --border: #dce3f3;
  --accent: #3f8bff;
  --accent2: #2563eb;
  --text: #111827;
  --muted: #4b5563;
  --table-stripe: #f8fbff;
  --card-grad: linear-gradient(150deg, rgba(255,255,255,0.9), rgba(246,250,255,0.96));
  --bg-overlay-1: rgba(63,139,255,0.10);
  --bg-overlay-2: rgba(99,102,241,0.08);
  --bg-overlay-3: rgba(59,130,246,0.07);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at 12% 20%, var(--bg-overlay-1), transparent 25%),
              radial-gradient(circle at 92% 12%, var(--bg-overlay-2), transparent 20%),
              radial-gradient(circle at 60% 82%, var(--bg-overlay-3), transparent 25%),
              var(--bg);
  color: var(--text);
  font-family: "Inter", "Noto Sans KR", system-ui, -apple-system, sans-serif;
}
a { color: inherit; }
.page { width: min(1200px, calc(100vw - 24px)); margin: 0 auto; padding: 24px 18px 28px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
h1 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.muted { color: var(--muted); margin-top: 4px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
a.pill {
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  background: linear-gradient(120deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  font-weight: 700;
}
a.pill.primary {
  background: linear-gradient(120deg, var(--accent), #6ad8ff);
  border: none;
  color: #061322;
  box-shadow: 0 12px 32px rgba(70,178,255,0.25);
}
a.pill,
.btn,
.ghost-btn {
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}
a.pill:hover,
.btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}
.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: var(--card-grad);
  box-shadow: 0 16px 40px rgba(0,0,0,0.32);
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-top: 14px; }
.btn {
  padding: 11px 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(120deg, var(--accent), #6ad8ff);
  color: #061322;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(70,178,255,0.25);
}
.btn.danger {
  background: linear-gradient(120deg, #fb7185, #fb7185);
  color: #0b1224;
  box-shadow: 0 12px 30px rgba(251,113,133,0.25);
}
.ghost-btn {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}
.ghost-btn.danger { border-color: rgba(251,113,133,0.5); color: #fecdd3; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.stat {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 12px 28px rgba(0,0,0,0.28);
}
.stat-label { color: var(--accent2); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { margin-top: 6px; font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.table-card { margin-top: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); box-shadow: 0 16px 40px rgba(0,0,0,0.32); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: top; }
th { text-align: left; color: var(--accent2); background: var(--panel); position: sticky; top: 0; }
tr:nth-child(even) { background: var(--table-stripe); }
