:root {
  --forest: #0e3b2e;
  --forest-deep: #08261d;
  --gold: #c6a15a;
  --cream: #f6f1e6;
  --paper: #fffdf8;
  --ink: #1a2e26;
  --muted: #5e6d66;
  --line: #e6dcc8;
  --danger: #8d2d2d;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--cream); }
a { color: var(--forest); }
button, input, select, textarea { font: inherit; }
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: var(--forest-deep); color: #f6edd8; padding: 22px 16px; display: flex; flex-direction: column; gap: 18px; }
.sidebar a { color: #f6edd8; text-decoration: none; }
.side-brand { display: flex; gap: 10px; align-items: center; }
.side-brand svg { width: 42px; height: 42px; }
.side-brand strong { display: block; font-family: var(--serif); font-size: 1.4rem; letter-spacing: .06em; }
.side-brand small { color: rgba(255,255,255,.7); }
.side-nav { display: grid; gap: 4px; }
.side-nav a { padding: 9px 12px; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; }
.side-nav a.is-active, .side-nav a:hover { background: rgba(230, 204, 138, .16); }
.badge { background: var(--gold); color: #2a2108; border-radius: 999px; padding: 0 7px; font-size: .75rem; font-weight: 700; }
.side-foot { margin-top: auto; display: grid; gap: 8px; }
.side-foot button, .btn, .btn-line, .btn-danger {
  border-radius: 999px;
  padding: 10px 14px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.side-foot button { background: transparent; color: #f6edd8; border: 1px solid rgba(230, 204, 138, .4); }
.admin-main { padding: 28px; }
.admin-top { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 18px; }
.admin-top h1, .panel h1, .login-card h1 { font-family: var(--serif); margin: 0; color: var(--forest); }
.muted { color: var(--muted); }
.stat-grid, .split { display: grid; gap: 14px; }
.stat-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; }
.split { grid-template-columns: 1.2fr .8fr; }
.stat, .panel { background: var(--paper); border-radius: 16px; padding: 16px 18px; box-shadow: 0 10px 30px rgba(16,40,30,.06); }
.stat span { color: var(--muted); font-size: .85rem; }
.stat strong { display: block; font-family: var(--serif); font-size: 2rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.status { display: inline-block; border-radius: 999px; padding: 2px 8px; background: #f4ead2; font-size: .8rem; }
.filters, .stack-form, .form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.stack-form { display: grid; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field input, .field select, .field textarea { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: white; font-weight: 400; }
.field textarea { min-height: 140px; resize: vertical; }
.check { flex-direction: row; align-items: center; font-weight: 500; }
.field-error { color: var(--danger); font-weight: 500; font-size: .82rem; }
.btn { background: linear-gradient(180deg, #e4c98a, #b8923e); color: #2a2108; }
.btn-line { background: white; border: 1px solid var(--line); color: var(--forest); }
.btn-danger { background: white; color: var(--danger); border: 1px solid #eccfcf; }
.flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.flash.ok { background: #e7f4ec; }
.flash.bad { background: #fdecec; color: var(--danger); }
.pager { display: flex; gap: 8px; margin-top: 14px; }
.login-body { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 70% 20%, rgba(230,204,138,.25), transparent 30%), linear-gradient(160deg, #08261d, #14543f); }
.login-card { width: min(440px, calc(100% - 32px)); background: var(--paper); border-radius: 20px; padding: 28px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.login-card .brand { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.login-card .field { margin: 12px 0; }
.login-card .btn { margin-top: 8px; }
.login-card .brand svg { width: 48px; height: 48px; }
.help { color: var(--muted); font-size: .9rem; }
@media (max-width: 980px) {
  .admin-shell, .stat-grid, .split { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
