:root {
  --bg: #ddd9ce;
  --surface: #f7f4ed;
  --surface-2: #e7e3d9;
  --ink: #3c2415;
  --muted: #634535;
  --primary: #3c2415;
  --primary-ink: #ddd9ce;
  --primary-soft: rgba(240, 138, 130, 0.24);
  --accent: #a53830;
  --border: rgba(60, 36, 21, 0.16);
  --success: #065f46;
  --success-soft: rgba(16, 185, 129, 0.16);
  --danger: #a53830;
  --danger-soft: rgba(165, 56, 48, 0.14);
  --warn: #92400e;
  --warn-soft: rgba(245, 158, 11, 0.2);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 0; }
.admin-shell { display: flex; min-height: 100vh; }
.sidebar { width: 260px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); padding: 1.25rem; display: none; flex-direction: column; }
@media (min-width: 1024px) { .sidebar { display: flex; } }
.nav-item { display: flex; align-items: center; gap: 0.6rem; width: 100%; border: 0; background: transparent; text-align: left; padding: 0.65rem 0.85rem; border-radius: 12px; font-size: 0.84rem; font-weight: 600; color: var(--muted); transition: all 0.15s; }
.nav-item:hover { background: var(--bg); color: var(--ink); }
.nav-item.is-active { background: var(--primary); color: var(--primary-ink); }
.main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.85rem 1.25rem; background: var(--surface); border-bottom: 1px solid var(--border); overflow-x: auto; }
@media (min-width: 1024px) { .topbar { display: none; } }
.content { padding: 1.5rem; max-width: 1240px; width: 100%; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1.25rem; box-shadow: 0 8px 24px -14px rgba(60, 36, 21, 0.22); }
.grid { display: grid; gap: 1rem; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; border-radius: 999px; border: 1px solid var(--border); background: rgba(60, 36, 21, 0.06); color: var(--ink); padding: 0.5rem 0.95rem; font-size: 0.78rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink); background: var(--primary-soft); }
.btn-primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn-primary:hover { background: #543421; border-color: #543421; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-danger { color: var(--danger); border-color: rgba(165, 56, 48, 0.42); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.input, .select, .textarea { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 0.55rem 0.75rem; font-size: 0.83rem; background: #ffffff; color: var(--ink); }
.select option { background: var(--surface); color: var(--ink); }
.textarea { min-height: 84px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; background: var(--primary-soft); color: var(--ink); }
.badge-ok { background: var(--success-soft); color: var(--success); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.row-item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem; border-radius: 14px; background: var(--surface-2); font-size: 0.83rem; border: 1px solid var(--border); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(60, 36, 21, 0.55); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 50; overflow-y: auto; }
.modal-box { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 1.5rem; width: 100%; max-width: 780px; max-height: 92vh; overflow-y: auto; }
.pill-tabs { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.media-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.media-thumb { aspect-ratio: 16 / 10; background: var(--bg); position: relative; overflow: hidden; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-body { padding: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; font-size: 0.78rem; }
.preview-box { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg); aspect-ratio: 16 / 9; max-width: 320px; }
.preview-box img, .preview-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.toggle-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; font-size: 0.82rem; }
.toggle-row label { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.alert-err { background: var(--danger-soft); color: var(--danger); padding: 0.65rem 0.9rem; border-radius: 10px; font-size: 0.8rem; font-weight: 700; }
.alert-ok { background: var(--success-soft); color: var(--success); padding: 0.65rem 0.9rem; border-radius: 10px; font-size: 0.8rem; font-weight: 700; }
