:root { --brand:#f97316; --brand-dark:#c2410c; --bg:#fff7ed; --card:#fff; --text:#1f2937; --muted:#6b7280; --line:#e5e7eb; --ok:#16a34a; --bad:#dc2626; }
* { box-sizing: border-box; }
body { margin:0; font:15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; background:var(--bg); color:var(--text); }
[hidden] { display:none !important; }
header { display:flex; gap:16px; align-items:center; flex-wrap:wrap; padding:12px 16px; background:var(--card); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:2; }
nav { display:flex; gap:4px; flex-wrap:wrap; flex:1; }
nav button { background:none; color:var(--text); border:0; padding:6px 10px; border-radius:8px; }
nav button.active { background:var(--bg); color:var(--brand-dark); font-weight:600; }
main { padding:16px; max-width:1200px; margin:0 auto; }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px; margin-bottom:16px; }
.narrow { max-width:360px; margin:12vh auto; display:grid; gap:12px; }
.login h1 { font-size:20px; margin:0 0 4px; }
label { display:grid; gap:4px; font-size:13px; color:var(--muted); }
input, select, textarea { font:inherit; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--text); width:100%; }
textarea { min-height:110px; }
button { font:inherit; background:var(--brand); color:#fff; border:0; border-radius:8px; padding:8px 14px; cursor:pointer; }
button:hover { background:var(--brand-dark); }
button.ghost { background:none; color:var(--brand-dark); border:1px solid var(--line); }
button.small { padding:4px 10px; font-size:13px; }
button.danger { background:none; color:var(--bad); border:1px solid #fecaca; }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:12px; }
.row h2 { margin:0; font-size:18px; flex:1; }
.stats { display:grid; grid-template-columns:repeat(auto-fill, minmax(170px, 1fr)); gap:12px; }
.stat b { display:block; font-size:26px; }
.stat span { color:var(--muted); font-size:13px; }
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; background:var(--card); }
th, td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); vertical-align:top; }
th { font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
td img { width:48px; height:48px; object-fit:cover; border-radius:8px; }
.pill { display:inline-block; padding:2px 8px; border-radius:99px; font-size:12px; background:#f3f4f6; }
.pill.on { background:#dcfce7; color:var(--ok); } .pill.off { background:#fee2e2; color:var(--bad); }
.muted { color:var(--muted); font-size:13px; }
.error { color:var(--bad); min-height:1em; margin:0; }
dialog { border:0; border-radius:14px; padding:0; width:min(560px, 94vw); }
dialog form { padding:18px; display:grid; gap:12px; }
dialog h3 { margin:0; }
.checks { display:grid; gap:4px; max-height:200px; overflow:auto; border:1px solid var(--line); border-radius:8px; padding:8px; }
.checks label { display:flex; gap:8px; color:var(--text); font-size:14px; align-items:center; }
.checks input { width:auto; }
#toast { position:fixed; bottom:16px; left:50%; transform:translateX(-50%); background:#111827; color:#fff; padding:10px 16px; border-radius:10px; opacity:0; transition:opacity .2s; pointer-events:none; }
#toast.show { opacity:1; }
@media (max-width:640px) { header { gap:8px; } main { padding:12px; } }
