:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #1a2332;
  --muted: #5b6b7c;
  --line: #d9e0e7;
  --accent: #0f6e56;
  --accent-ink: #fff;
  --warn: #9a3412;
  --danger: #b91c1c;
  --ok: #166534;
  --shadow: 0 10px 30px rgba(26, 35, 50, 0.06);
  --font: "IBM Plex Sans", "PingFang SC", "Noto Sans SC", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: linear-gradient(160deg, #eef3f7, #f8faf8 45%, #f3efe8); color: var(--ink); font-family: var(--font); }
a { color: var(--accent); text-decoration: none; }
button, input, select { font: inherit; }
.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: #102033; color: #e8eef5; padding: 28px 18px; }
.side .brand { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.02em; margin-bottom: 28px; }
.side a { display: block; color: #c9d5e2; padding: 10px 12px; border-radius: 10px; margin-bottom: 4px; }
.side a.active, .side a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.main { padding: 28px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 12px; }
.section-title h1, .section-title h2 { margin: 0; }
.eyebrow { display: block; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.08em; margin-bottom: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 16px; align-items: center; }
.filters input, .filters select, .field input, .field select { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; min-width: 180px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
td small { display: block; color: var(--muted); margin-top: 4px; }
.btn { border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer; background: #e8eef3; color: var(--ink); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.danger { background: #fee2e2; color: var(--danger); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.badge { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 0.78rem; background: #e8f5ef; color: var(--ok); }
.badge.warn { background: #ffedd5; color: var(--warn); }
.badge.muted { background: #eef2f6; color: var(--muted); }
.auth { max-width: 420px; margin: 10vh auto; }
.auth h1 { margin-top: 0; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { color: var(--muted); font-size: 0.9rem; }
.toast { position: fixed; right: 18px; bottom: 18px; background: #102033; color: #fff; padding: 12px 16px; border-radius: 12px; max-width: 360px; display: none; z-index: 50; }
.toast.show { display: block; }
.muted { color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: flex; gap: 8px; overflow-x: auto; }
  .grid2 { grid-template-columns: 1fr; }
}
