:root {
  --ink: #1c2430;
  --muted: #5d6b7a;
  --line: #e4e1d8;
  --paper: #f6f4ee;
  --card: #fffdf8;
  --brand: #0f6e6b;
  --brand-dark: #0b4f4d;
  --warn: #9a4d12;
  --danger: #8d2f2f;
  --ok: #1d6b3a;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); }
a { color: var(--brand-dark); }
.shell { display: flex; min-height: 100vh; }
.side { width: 240px; background: #16302e; color: #f3f1ea; padding: 22px 16px; }
.side a { color: #f3f1ea; text-decoration: none; display: block; padding: 8px 10px; border-radius: 8px; }
.side a:hover, .side a.active { background: rgba(255,255,255,.08); }
.brand { font-weight: 700; letter-spacing: .04em; margin-bottom: 18px; }
.main { flex: 1; padding: 28px; }
.top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.card, .panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stat { font-size: 1.4rem; font-weight: 700; }
.muted { color: var(--muted); }
label { display: block; font-size: .85rem; margin-bottom: 4px; }
input, select, textarea { width: 100%; padding: 9px 10px; border: 1px solid #d9d3c7; border-radius: 8px; background: #fff; margin-bottom: 10px; }
button, .btn { background: var(--brand); color: white; border: 0; border-radius: 8px; padding: 9px 14px; text-decoration: none; display: inline-block; cursor: pointer; }
.btn.secondary { background: #ece7dc; color: var(--ink); }
.btn.danger { background: var(--danger); }
.alert { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.alert.success { background: #e5f4ea; color: var(--ok); }
.alert.error { background: #fdeCEC; color: var(--danger); }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters input, .filters select { width: auto; margin: 0; }
.pager { display: flex; gap: 8px; margin-top: 12px; }
.auth { max-width: 460px; margin: 8vh auto; }
.split { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
.badge { border-radius: 999px; padding: 2px 8px; background: #ece7dc; font-size: .8rem; }
.badge.warn { background: #f8e6d4; color: var(--warn); }
@media (max-width: 800px) {
  .shell { display: block; }
  .side { width: auto; }
  .split { grid-template-columns: 1fr; }
  .main { padding: 16px; }
}
@media print {
  .side, .no-print { display: none !important; }
  body { background: white; }
}
