* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f5f7fb 0%, #eef2f7 100%);
  color: #172033;
}
a { color: inherit; }
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px;
  background: #0f172a;
  color: #dbe4ff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.brand-kicker { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #9fb2ff; }
.brand-title { font-size: 28px; font-weight: 800; margin-top: 4px; }
.brand-sub { font-size: 13px; color: rgba(219,228,255,.7); margin-top: 6px; }
.nav { display: flex; flex-direction: column; gap: 8px; }
.nav a {
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 12px;
  color: rgba(219,228,255,.84);
  transition: 0.15s ease;
}
.nav a:hover, .nav a.active { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-footer { margin-top: auto; font-size: 12px; color: rgba(219,228,255,.58); line-height: 1.6; }
.main { flex: 1; padding: 28px; }
.hero, .card, .page-head { background: rgba(255,255,255,.78); backdrop-filter: blur(12px); border: 1px solid rgba(17,24,39,.06); box-shadow: 0 18px 40px rgba(15,23,42,.08); border-radius: 22px; }
.hero { padding: 28px; display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 18px; }
.hero h1, .page-head h1 { margin: 0; font-size: 34px; line-height: 1.05; letter-spacing: -0.03em; }
.hero p, .page-head p { margin: 10px 0 0; color: #4b5563; max-width: 70ch; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .18em; color: #6b7280; margin-bottom: 10px; }
.hero-stats { display: grid; grid-template-columns: repeat(2, minmax(110px, 1fr)); gap: 12px; min-width: 280px; }
.hero-stats div { background: #fff; border: 1px solid rgba(17,24,39,.05); border-radius: 18px; padding: 16px; }
.hero-stats strong { display: block; font-size: 26px; }
.hero-stats span { font-size: 12px; color: #6b7280; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.card, .page-head { padding: 20px; margin-bottom: 18px; }
.card h2 { margin: 0 0 14px; font-size: 18px; }
.card-num { font-size: 34px; font-weight: 800; color: #173a8f; }
.card-label { color: #6b7280; margin-top: 6px; font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { padding: 11px 12px; border-bottom: 1px solid #edf0f5; font-size: 13px; text-align: left; vertical-align: top; }
th { color: #475569; background: #f8fafc; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
tbody tr:hover td { background: #fbfcfe; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.filters label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #475569; }
.filters input, .filters select {
  border: 1px solid #d7deea;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 14px;
  background: #fff;
}
.actions, .form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; padding: 11px 15px; border: 1px solid transparent;
  font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn-primary { background: #173a8f; color: #fff; }
.btn-ghost { background: #fff; color: #172033; border-color: #d7deea; }
.notice {
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.notice-success { background: #ecfdf5; color: #166534; border-color: #bbf7d0; }
.notice-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.pill {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.pill-yes { background: #ecfdf5; color: #166534; }
.pill-no { background: #fee2e2; color: #991b1b; }
.pager { display: flex; justify-content: space-between; padding-top: 14px; font-size: 13px; }
code { background: #eef2ff; padding: 2px 6px; border-radius: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #475569; }
.form-grid input, .form-grid textarea {
  border: 1px solid #d7deea;
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 14px;
  background: #fff;
}
@media (max-width: 920px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; }
  .hero { flex-direction: column; align-items: stretch; }
  .hero-stats { min-width: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .main { padding: 14px; }
  .hero h1, .page-head h1 { font-size: 28px; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
