:root,
.theme-dark {
  --bg: #0f172a;
  --card: #0b1224;
  --panel: #0d162b;
  --border: #1f2a44;
  --accent: #46b2ff;
  --accent2: #9ee2ff;
  --text: #e6edf7;
  --muted: #95a3c2;
  --page-width: 1660px;
  --table-stripe: #0e172b;
  --card-grad: linear-gradient(150deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  --bg-overlay-1: rgba(70,178,255,0.18);
  --bg-overlay-2: rgba(99,102,241,0.16);
  --bg-overlay-3: rgba(14,165,233,0.14);
}

.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;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 14%, var(--bg-overlay-1), transparent 24%),
    radial-gradient(circle at 86% 10%, var(--bg-overlay-2), transparent 20%),
    radial-gradient(circle at 54% 84%, var(--bg-overlay-3), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

a { color: inherit; }

.admin-shell {
  width: min(var(--page-width), calc(100vw - 72px));
  margin: 0 auto;
  padding: 24px 0 32px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: calc(100vh - 56px);
  padding: 18px 16px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  box-shadow: 0 18px 42px rgba(0,0,0,0.26);
  backdrop-filter: blur(14px);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(70,178,255,0.16), rgba(255,255,255,0.03));
  border: 1px solid rgba(70,178,255,0.2);
}

.admin-brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #061322;
  background: linear-gradient(135deg, #46b2ff, #9ee2ff);
  box-shadow: 0 12px 28px rgba(70,178,255,0.25);
}

.admin-brand-copy strong {
  display: block;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.admin-brand-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.admin-menu {
  display: grid;
  gap: 8px;
}

.admin-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  background: rgba(255,255,255,0.02);
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.admin-menu-link:hover {
  transform: translateX(2px);
  border-color: rgba(70,178,255,0.28);
  background: rgba(70,178,255,0.08);
}

.admin-menu-link.active {
  background: linear-gradient(135deg, rgba(70,178,255,0.92), rgba(106,216,255,0.95));
  color: #061322;
  box-shadow: 0 14px 28px rgba(70,178,255,0.22);
}

.admin-menu-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.09);
  flex-shrink: 0;
}

.admin-menu-link.active .admin-menu-icon {
  background: rgba(6, 17, 34, 0.12);
}

.admin-menu-copy {
  line-height: 1.1;
}

.admin-sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.admin-sidebar-footer .theme-toggle,
.admin-sidebar-footer .admin-logout {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(120deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

.admin-sidebar-footer .theme-toggle:hover,
.admin-sidebar-footer .admin-logout:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.admin-content {
  min-width: 0;
  padding: 2px 4px 0 0;
}

.page {
  width: 100%;
  margin: 0;
  padding: 0;
}

.admin-content .page {
  max-width: calc(100% - 24px);
  margin: 0 auto;
  padding: 18px 18px 22px;
}

.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);
}

.theme-light .admin-sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,249,255,0.98));
  border-color: #dce3f3;
  box-shadow: 0 18px 38px rgba(15,23,42,0.12);
}

.theme-light .admin-brand {
  background: linear-gradient(135deg, rgba(63,139,255,0.1), rgba(255,255,255,0.92));
  border-color: #dbe7f7;
}

.theme-light .admin-brand-copy strong,
.theme-light .admin-menu-copy {
  color: #0f172a;
}

.theme-light .admin-menu-link {
  background: #f8fbff;
  border-color: #e5e7eb;
  color: #111827;
}

.theme-light .admin-menu-link.active {
  background: linear-gradient(135deg, #3f8bff, #63b2ff);
  color: #ffffff;
}

.theme-light .admin-menu-link.active .admin-menu-icon {
  background: rgba(255,255,255,0.18);
}

.theme-light .admin-sidebar-footer .theme-toggle,
.theme-light .admin-sidebar-footer .admin-logout {
  background: linear-gradient(120deg, #ecf1f9, #f7faff);
  border-color: #dce3f3;
  color: #111827;
}

.theme-light .card,
.theme-light .stat,
.theme-light .table-card {
  background: #ffffff;
  border-color: #dce3f3;
  box-shadow: 0 12px 28px rgba(15,23,42,0.10);
}

.theme-light h1,
.theme-light h2,
.theme-light h3,
.theme-light h4 {
  color: #0f172a;
}

.theme-light .empty {
  border-color: #e5e7eb;
  color: #6b7280;
}

.is-mobile .admin-shell {
  width: min(100vw - 16px, 100%);
  grid-template-columns: 1fr;
  padding-top: 12px;
}

.is-mobile .admin-sidebar {
  position: relative;
  top: 0;
  min-height: auto;
}

.is-mobile .admin-menu {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.is-mobile .admin-menu-link {
  justify-content: center;
  text-align: center;
  flex-direction: column;
  padding: 14px 10px;
}

.is-mobile .admin-menu-icon {
  width: 34px;
  height: 34px;
}

.is-mobile .admin-sidebar-footer {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.is-mobile .admin-sidebar-footer .theme-toggle,
.is-mobile .admin-sidebar-footer .admin-logout {
  width: 100%;
}
