:root {
  --bg: #eef3f8;
  --panel: #ffffff;
  --line: #d6e0ed;
  --ink: #17324d;
  --muted: #66788d;
  --accent: #1769ff;
  --accent-soft: #e8f1ff;
  --danger: #d93025;
  --ok: #0f9d58;
  --warn: #b26a00;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(23, 105, 255, 0.08), transparent 28%),
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%);
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px 1fr;
}
.sidebar {
  padding: 28px 20px;
  background: #18344e;
  color: #fff;
}
.brand {
  display: block;
  margin-bottom: 28px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
}
.nav { display: grid; gap: 10px; }
.nav a {
  padding: 12px 14px;
  border-radius: 14px;
  color: #d6e4f5;
  text-decoration: none;
  font-weight: 700;
}
.nav a:hover { background: rgba(255,255,255,0.1); }
.content { padding: 28px; }
.hero-card, .panel, .stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(23, 50, 77, 0.05);
}
.hero-card.compact { max-width: 680px; }
.hero-row { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 18px; }
.stat-card span { display: block; color: var(--muted); font-size: 13px; }
.stat-card strong { display: block; margin-top: 8px; font-size: 34px; }
.form-grid { display: grid; gap: 14px; margin-top: 14px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
input, textarea, select, button {
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  font: inherit;
}
input, textarea, select { background: #f7fbff; }
textarea { resize: vertical; min-height: 96px; }
button {
  cursor: pointer;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
button:hover { filter: brightness(0.95); }
.table-wrap { overflow: auto; margin-top: 12px; }
.table-wrap.tall { max-height: 68vh; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 12px 10px;
  border-bottom: 1px solid #edf2f8;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.flash-stack { display: grid; gap: 10px; margin-bottom: 18px; }
.flash, .inline-error {
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 600;
}
.flash.success { background: #edf9f1; color: var(--ok); }
.flash.error, .inline-error { background: #fff1ef; color: var(--danger); }
.flash.warn { background: #fff7e8; color: var(--warn); }
.muted, .tiny { color: var(--muted); }
.tiny { font-size: 12px; margin-top: 4px; }
.empty-cell { color: var(--muted); text-align: center; }
.status-pill {
  padding: 12px 14px;
  border-radius: 16px;
  font-weight: 700;
  display: grid;
  gap: 4px;
}
.status-pill.ok { background: #edf9f1; color: var(--ok); }
.status-pill.warn { background: #fff7e8; color: var(--warn); }
.mini-form { display: grid; gap: 8px; margin-bottom: 8px; }
.mini-form input { min-width: 120px; }
.mini-form.secondary button { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.compact-panel { align-self: start; }
code { font-family: Consolas, monospace; font-size: 13px; }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { padding-bottom: 12px; }
  .split-grid, .stats-grid { grid-template-columns: 1fr; }
  .hero-row { flex-direction: column; align-items: flex-start; }
}
