:root {
  --bg: #eef2f6;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #607080;
  --line: #dce4ec;
  --sidebar: #101820;
  --accent: #1f7a8c;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
.sidebar { background: var(--sidebar); color: #fff; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.sidebar a { color: #c8d3dd; padding: 10px 12px; border-radius: 8px; }
.sidebar a:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-form { margin: auto 0 0; }
.sidebar-form button { width: 100%; color: #c8d3dd; background: transparent; border: 0; border-radius: 8px; padding: 10px 12px; text-align: left; font: inherit; cursor: pointer; }
.sidebar-form button:hover { background: rgba(255,255,255,.1); color: #fff; }
.brand { width: 42px; height: 42px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; font-weight: 800; }
.main { padding: 28px; min-width: 0; }
.page-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.page-title h2 { margin: 0; font-size: 30px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.eyebrow { color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin: 0 0 6px; }
.muted { color: var(--muted); margin: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 20px; box-shadow: 0 8px 24px rgba(16,24,32,.05); }
.section-gap { margin-top: 16px; }
.section-gap-small { margin-top: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-grid span { color: var(--muted); }
.stat-grid strong { display: block; font-size: 30px; margin-top: 8px; }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; color: var(--muted); }
code { overflow-wrap: anywhere; }
.form-grid { display: grid; gap: 14px; max-width: 640px; }
.wide-form { max-width: none; }
.auth-panel { max-width: 420px; }
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: end; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.compact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.filter-bar { display: grid; grid-template-columns: minmax(220px, 1fr) 180px auto; gap: 12px; align-items: end; margin-bottom: 16px; }
label { display: grid; gap: 6px; font-weight: 700; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
textarea { resize: vertical; min-height: 110px; }
.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: auto; }
.table-form { display: grid; grid-template-columns: minmax(120px, 1fr) auto; gap: 8px; align-items: center; }
.button { display: inline-flex; justify-content: center; align-items: center; border: 0; border-radius: 8px; background: var(--accent); color: #fff; padding: 10px 14px; font-weight: 700; cursor: pointer; }
.button.secondary { background: #44515d; }
.table-button { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.pill { display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; padding: 2px 8px; margin: 2px; font-size: 12px; font-weight: 700; background: #edf1f4; color: #44515d; }
.pill.ok { background: #e6f6ed; color: #176b3a; }
.pill.bad { background: #fdeaea; color: #a32323; }
.alert { background: #fff3cd; color: #7a4f00; border: 1px solid #ffe08a; border-radius: 8px; padding: 12px; }
@media (max-width: 900px) {
  body { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .stat-grid, .grid-two, .action-grid, .inline-form, .compact-grid, .filter-bar, .table-form { grid-template-columns: 1fr; }
}
