:root { --plum:#461A35; --terra:#C25F40; --gold:#DFAE62; --ivory:#FFF9EF; --card:#fff; --line:#EADFD2; --soft:#F6EEE3;
         --muted:#7A6470; --bad:#A8322A; --bad-soft:#F9E3DE; --ok:#2f6b57; --ok-soft:#E1EEE8; --warn:#9a5d1c; --warn-soft:#F8EAD6; }
* { box-sizing:border-box; }
body { margin:0; background:var(--ivory); color:var(--plum); font:15px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; }
h1 { font-size:1.6rem; margin:0 0 6px; } h2 { font-size:1.2rem; margin:0 0 10px; } h3 { font-size:1rem; margin:16px 0 6px; }
.hidden { display:none !important; } .muted { color:var(--muted); } .small { font-size:.85rem; }
.card { background:var(--card); border:1px solid var(--line); border-radius:16px; padding:18px; margin-bottom:14px; }
.narrow { max-width:420px; margin:60px auto; }
label { display:block; font-weight:600; font-size:.88rem; margin:12px 0 4px; }
input, select, textarea { font:inherit; padding:9px 11px; border:1px solid var(--line); border-radius:10px; background:var(--ivory); color:var(--plum); width:100%; }
input[type=checkbox] { width:auto; }
textarea { min-height:70px; resize:vertical; }
input:focus, select:focus, textarea:focus { outline:2px solid var(--terra); outline-offset:1px; }
button { font:inherit; padding:7px 13px; border-radius:10px; border:1px solid var(--line); background:var(--card); color:var(--plum); cursor:pointer; }
button:hover { border-color:var(--plum); }
button.primary { background:var(--plum); border-color:var(--plum); color:var(--ivory); font-weight:600; }
button.danger { color:var(--bad); border-color:var(--bad); }
button.ghost { background:transparent; }
button.wide { width:100%; margin-top:16px; padding:12px; }
button:disabled { opacity:.5; cursor:default; }
.err { color:var(--bad); font-weight:600; margin-top:10px; min-height:1em; }
.top { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; padding:12px 20px; background:var(--card); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; }
.brand { font-size:1.25rem; display:flex; align-items:center; gap:6px; } .brand .dot { width:14px; height:14px; border-radius:50%; background:var(--terra); box-shadow:6px 0 0 var(--gold); margin-right:8px; }
nav { display:flex; gap:4px; flex-wrap:wrap; } nav button { border:0; background:transparent; } nav button.on { background:var(--plum); color:var(--ivory); }
.badge { display:inline-block; min-width:18px; padding:0 6px; border-radius:9px; background:var(--terra); color:#fff; font-size:.75rem; }
main { max-width:1200px; margin:0 auto; padding:18px 20px 80px; }
#setup { max-width:1200px; margin:0 auto; padding:0 20px; }
.banner { border-radius:10px; padding:10px 14px; margin-top:14px; background:var(--warn-soft); color:var(--warn); }
.bar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:14px; } .bar input { max-width:320px; }
.stats { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.stat { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:10px 14px; min-width:120px; } .stat b { display:block; font-size:1.4rem; }
table { width:100%; border-collapse:collapse; } th, td { text-align:left; padding:7px 8px; border-bottom:1px solid var(--line); vertical-align:top; }
th { font-size:.78rem; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); font-weight:600; }
td .acts { display:flex; gap:6px; flex-wrap:wrap; } td select { width:auto; padding:5px 8px; }
.chip { display:inline-block; font-size:.75rem; padding:2px 9px; border-radius:999px; background:var(--soft); color:var(--muted); margin:0 4px 3px 0; white-space:nowrap; }
.chip.ok { background:var(--ok-soft); color:var(--ok); } .chip.bad { background:var(--bad-soft); color:var(--bad); } .chip.warn { background:var(--warn-soft); color:var(--warn); }
.chip.owner { background:var(--plum); color:var(--ivory); }
.fam-head { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; align-items:flex-start; }
.fam-head h2 { margin:0; } .fam-acts { display:flex; gap:6px; flex-wrap:wrap; }
.scroll { overflow-x:auto; }
dialog { border:0; border-radius:16px; padding:22px; max-width:520px; width:calc(100% - 32px); color:var(--plum); }
dialog::backdrop { background:rgba(70,26,53,.35); }
.actions { display:flex; justify-content:flex-end; gap:8px; margin-top:16px; }
.secret { font-family:ui-monospace,Menlo,monospace; background:var(--soft); padding:10px 12px; border-radius:10px; word-break:break-all; user-select:all; margin:8px 0; }
.check { display:flex; gap:8px; align-items:center; margin-top:12px; font-weight:400; }
.toast { position:fixed; bottom:20px; left:50%; transform:translateX(-50%); background:var(--plum); color:var(--ivory); padding:10px 18px; border-radius:12px; z-index:20; }
.empty { color:var(--muted); padding:14px 0; }
@media (max-width:700px) { .top { padding:10px 12px; } main { padding:14px 12px 60px; } th:nth-child(n+4), td:nth-child(n+4) { display:none; } td:last-child, th:last-child { display:table-cell; } }
