:root {
  --bg: #0c0d12;
  --bg2: #13151d;
  --panel: #181b25;
  --panel2: #1f2330;
  --line: #2a2f3e;
  --text: #e9ebf2;
  --muted: #8a90a3;
  --accent: #ff4f6d;
  --accent2: #ffb84d;
  --ok: #3ddc97;
  --bad: #ff5d5d;
  --radius: 14px;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 79, 109, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(84, 120, 255, .10), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
body::after { /* faint scanlines */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.018) 0 1px, transparent 1px 3px);
}
button, input, select { font: inherit; color: inherit; }
code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--panel2); padding: 1px 6px; border-radius: 6px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.warn { color: var(--accent2); }
.ico { width: 18px; height: 18px; fill: currentColor; flex: none; }

:focus { outline: none; }
:focus-visible, [data-nav]:focus {
  outline: 3px solid var(--accent2);
  outline-offset: 2px;
}

/* ---------- header ---------- */
.top {
  height: 68px; display: flex; align-items: center; gap: 22px;
  padding: 0 22px; border-bottom: 1px solid var(--line);
  background: rgba(12, 13, 18, .8); backdrop-filter: blur(10px);
  position: relative; z-index: 5;
}
.logo { font-family: var(--pixel); font-size: 15px; letter-spacing: 1px; white-space: nowrap; user-select: none; }
.logo-r { color: var(--accent); text-shadow: 0 0 18px rgba(255, 79, 109, .55); }
.logo-s { color: var(--text); margin-left: 4px; }
.search-wrap {
  flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; height: 42px;
}
.search-wrap .ico { color: var(--muted); }
.search-wrap input[type=search] { flex: 1; background: none; border: 0; height: 100%; outline: none; padding: 0; border-radius: 0; }
.search-wrap:focus-within { border-color: var(--accent2); }
.search-wrap input:focus { outline: none; }
.top-actions { margin-left: auto; display: flex; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer;
  font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--panel2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #ff6a84; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--panel); }
.btn.danger { background: rgba(255, 93, 93, .12); border-color: rgba(255, 93, 93, .4); color: #ff8b8b; }
.btn.danger:hover { background: rgba(255, 93, 93, .22); }
#btn-pad.live { color: var(--ok); border-color: rgba(61, 220, 151, .4); }
.pad-count { font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 250px 1fr; height: calc(100vh - 68px); }
body.has-pad .layout { height: calc(100vh - 68px - 40px); }
body.np-open .layout { padding-bottom: 92px; }
.sidebar { border-right: 1px solid var(--line); padding: 16px 12px; overflow-y: auto; }
.side-sep { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 18px 10px 8px; }
.side-item {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 9px 10px; border-radius: 10px; border: 0; background: none; cursor: pointer; margin-bottom: 2px;
}
.side-item:hover { background: var(--panel); }
.side-item.on { background: var(--panel2); box-shadow: inset 3px 0 0 var(--c); }
.side-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.side-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.side-ico { width: 34px; text-align: center; color: var(--accent2); }
.side-badge {
  min-width: 34px; text-align: center; font: 8px/1 var(--pixel); padding: 5px 4px; border-radius: 5px;
  background: var(--c); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.35);
}

main { overflow-y: auto; padding: 26px 30px 60px; scroll-padding: 30px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 20px; }
.section-head h1 { margin: 0; font-size: 26px; letter-spacing: -.01em; }
.section-head p { margin: 4px 0 0; }
.seg { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; cursor: pointer; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--panel2); color: var(--text); }

/* ---------- cards (cartridges) ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 22px; }
.card {
  position: relative; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line);
  padding: 12px; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; outline: none;
}
.card:hover, .card:focus { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 14px 30px -14px var(--c); }
.card:focus { outline: 3px solid var(--accent2); outline-offset: 3px; }
.cart {
  position: relative; aspect-ratio: 1 / 1.02; border-radius: 10px 10px 6px 6px; overflow: hidden;
  background: linear-gradient(160deg, #3a3e4c, #262934); padding: 18px 12px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 -6px 0 rgba(0,0,0,.25);
}
.cart-grip { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 40%; height: 4px;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.35) 0 3px, transparent 3px 6px); border-radius: 2px; }
.cart-label {
  height: 100%; border-radius: 6px; background: linear-gradient(170deg, var(--c), color-mix(in srgb, var(--c) 55%, #000));
  display: flex; flex-direction: column; justify-content: space-between; padding: 10px; position: relative; overflow: hidden;
}
.cart-label::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, rgba(255,255,255,.05) 0 8px, transparent 8px 16px); }
.cart-sys { font: 8px/1 var(--pixel); color: rgba(255,255,255,.85); position: relative; }
.cart-mono { font: 30px/1 var(--pixel); color: #fff; text-shadow: 3px 3px 0 rgba(0,0,0,.3); position: relative; align-self: center; }
.cart-name { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.9); position: relative; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge { position: absolute; top: 22px; right: 16px; font-size: 11px; }
.badge.fav { color: var(--accent2); font-size: 16px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.badge.state { top: auto; bottom: 18px; right: 18px; font: 7px/1 var(--pixel); background: rgba(0,0,0,.55); padding: 4px 5px; border-radius: 4px; color: var(--ok); }
.badge.fav + .badge.state { }
.card-meta { padding: 12px 2px 2px; }
.card-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.card-sub span { flex: none; }
.card-actions {
  position: absolute; left: 12px; right: 12px; top: 12px; aspect-ratio: 1 / 1.02; display: flex; gap: 6px; align-items: flex-end;
  padding: 10px; border-radius: 10px 10px 6px 6px; background: linear-gradient(transparent 45%, rgba(0,0,0,.75));
  opacity: 0; transition: opacity .15s; pointer-events: none;
}
.card:hover .card-actions, .card:focus .card-actions, .card:focus-within .card-actions { opacity: 1; pointer-events: auto; }
.card-actions button {
  height: 32px; padding: 0 10px; border-radius: 8px; border: 0; background: rgba(12,13,18,.88); cursor: pointer;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; color: #fff;
}
.card-actions button:hover { background: #000; }
.card-actions .ca-play { flex: 1; background: var(--accent); color: #fff; }
.card-actions .ca-play:hover { background: #ff6a84; }

.empty { text-align: center; padding: 70px 20px; }
.empty h2 { margin: 18px 0 6px; }
.empty .btn { margin-top: 16px; }
.empty-cart { width: 90px; height: 96px; margin: 0 auto; border-radius: 10px 10px 6px 6px; background: var(--panel2); position: relative; border: 2px dashed var(--line); }

/* ---------- now playing ---------- */
.nowplaying {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 20;
  width: min(1200px, calc(100% - 32px)); background: rgba(24, 27, 37, .96); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 14px 12px 18px; display: flex; align-items: center; gap: 18px;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.7); backdrop-filter: blur(10px);
}
body.has-pad .nowplaying { bottom: 52px; }
.np-info { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.np-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 12px var(--ok); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.np-label { font: 8px/1 var(--pixel); color: var(--ok); margin-bottom: 5px; }
.np-title { font-weight: 700; }
.np-sub { font-size: 12px; }
.np-controls { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.np-controls .btn { height: 34px; padding: 0 11px; font-size: 13px; }

/* ---------- controller hints ---------- */
.hints {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; height: 40px; align-items: center; justify-content: center;
  gap: 26px; font-size: 13px; color: var(--muted); background: rgba(12,13,18,.92); border-top: 1px solid var(--line); z-index: 10;
}
body.has-pad .hints { display: flex; }
.pb { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; font: 700 11px var(--sans); color: #fff; margin-right: 4px; background: #444; }
.pb-a { background: #3ba55d; } .pb-b { background: #d9534f; } .pb-x { background: #3a7bd5; } .pb-y { background: #e0a526; }
.pb-sel, .pb-sh { border-radius: 6px; font-size: 9px; background: #555b6e; }

/* ---------- modals ---------- */
.modal { position: fixed; inset: 0; background: rgba(5, 6, 10, .7); z-index: 50; display: grid; place-items: center; padding: 20px; animation: fade .15s; backdrop-filter: blur(3px); }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; box-shadow: 0 30px 80px -20px #000; animation: rise .18s; }
.sheet.wide { width: min(820px, 100%); }
.sheet.narrow { width: min(440px, 100%); }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-head h2 { margin: 0; font-size: 19px; }
.sheet-foot { display: flex; justify-content: flex-end; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.x { border: 0; background: var(--panel); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; color: var(--muted); }
.x:hover { color: var(--text); }
.row { display: grid; grid-template-columns: 190px 1fr; align-items: center; gap: 14px; margin: 14px 0; }
.row.col { grid-template-columns: 1fr; gap: 6px; }
.row > label:first-child { color: var(--muted); font-size: 13.5px; }
input[type=text], input[type=search], select {
  height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); padding: 0 12px; width: 100%;
}
select { cursor: pointer; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }

.drop {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 30px 20px;
  border: 2px dashed var(--line); border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover { border-color: var(--accent); background: rgba(255, 79, 109, .05); }
.drop-art { width: 54px; height: 58px; border-radius: 8px 8px 4px 4px; background: linear-gradient(170deg, var(--accent), #a3263d); margin-bottom: 6px; position: relative; box-shadow: 0 10px 24px -8px var(--accent); }
.drop-art::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; font: 20px var(--pixel); color: #fff; }
.progress { position: relative; height: 30px; border-radius: 8px; background: var(--panel); overflow: hidden; margin-top: 12px; }
.progress div { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .2s; }
.progress span { position: relative; display: grid; place-items: center; height: 100%; font-size: 13px; font-weight: 600; }
.results { list-style: none; margin: 14px 0 0; padding: 0; max-height: 230px; overflow: auto; font-size: 13.5px; }
.results li { padding: 7px 10px; border-radius: 8px; margin-bottom: 4px; background: var(--panel); border-left: 3px solid; }
.results li.good { border-color: var(--ok); }
.results li.bad { border-color: var(--bad); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; font-size: 14px; }
.tabs button.on { color: var(--text); border-color: var(--accent); }
.tab h3 { font-size: 14px; margin: 20px 0 10px; }
.cores { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; font-size: 13px; }
.core { display: flex; gap: 10px; align-items: center; padding: 7px 9px; background: var(--panel); border-radius: 8px; }
.core.no { opacity: .6; }
.core .side-badge { flex: none; }
.log { background: #07080b; border: 1px solid var(--line); border-radius: 8px; padding: 10px; max-height: 220px; overflow: auto; font-size: 11.5px; white-space: pre-wrap; }
details summary { cursor: pointer; color: var(--muted); margin-top: 16px; }
.bios { list-style: none; padding: 0; margin: 12px 0 16px; }
.bios li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--panel); border-radius: 8px; margin-bottom: 5px; }
.bios .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; }
.bios li.ok .dot { background: var(--ok); }
.bios .link { margin-left: auto; color: var(--bad); }
.sysinfo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--panel); border-radius: 10px; padding: 12px 14px; }
.stat span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.stat b { font-weight: 600; word-break: break-word; }
.stat .hot { color: var(--bad); }
.meter { height: 6px; background: var(--panel2); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.meter div { height: 100%; background: var(--accent2); }

.pads { display: grid; gap: 12px; }
.pad { background: var(--panel); border-radius: 12px; padding: 14px; }
.pad-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--panel2); color: var(--muted); margin-left: auto; }
.tag.ok { color: var(--ok); }
.pad-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.pbtn { min-width: 40px; height: 30px; display: grid; place-items: center; padding: 0 6px; border-radius: 8px; background: var(--panel2); font-size: 12px; font-weight: 600; color: var(--muted); transition: background .05s; }
.pbtn.on { background: var(--accent); color: #fff; box-shadow: 0 0 14px var(--accent); }
.pad-axes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.axis { font-size: 11px; color: var(--muted); }
.axis div { position: relative; height: 6px; background: var(--panel2); border-radius: 3px; margin-top: 4px; }
.axis i { position: absolute; top: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent2); transform: translateX(-50%); }
.nopad { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px; background: var(--panel); border-radius: 12px; }
.nopad-art { width: 70px; height: 40px; border-radius: 20px; background: var(--panel2); margin-bottom: 8px; animation: pulse 1.8s infinite; }

.opts { display: flex; flex-direction: column; gap: 6px; }
.opt-meta { margin-bottom: 8px; word-break: break-all; }
.opt { text-align: left; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 500; }
.opt:hover { background: var(--panel2); }
.opt.danger { color: #ff8b8b; }
.btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.msg { white-space: pre-wrap; font-size: 13px; background: var(--panel); padding: 12px; border-radius: 10px; max-height: 300px; overflow: auto; margin: 0 0 14px; }

.toast {
  position: fixed; top: 82px; left: 50%; transform: translate(-50%, -20px); opacity: 0; z-index: 90;
  background: var(--panel2); border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px; font-weight: 500; font-size: 14px;
  transition: opacity .2s, transform .2s; pointer-events: none; max-width: 90vw; box-shadow: 0 10px 30px -10px #000;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-color: rgba(61, 220, 151, .5); }
.toast.err { border-color: rgba(255, 93, 93, .6); color: #ffb0b0; }
.dropveil { position: fixed; inset: 0; z-index: 80; background: rgba(255, 79, 109, .12); border: 3px dashed var(--accent); display: grid; place-items: center; pointer-events: none; }
.dropveil div { font: 16px var(--pixel); color: #fff; text-shadow: 0 0 20px var(--accent); }

@media (max-width: 760px) {
  .top { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 10px; }
  .search-wrap { order: 3; flex-basis: 100%; max-width: none; height: 38px; }
  .top-actions { gap: 6px; }
  .top-actions .btn { padding: 0 11px; }
  .layout { height: calc(100vh - 110px); }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .section-head h1 { font-size: 22px; }
  .hints { display: none !important; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; gap: 4px; }
  .side-item { width: auto; flex: none; }
  .side-sep { display: none; }
  .layout { grid-template-rows: auto 1fr; }
  .logo { font-size: 11px; }
  .btn.primary span { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
  .card-actions { gap: 4px; padding: 6px; }
  .card-actions button { padding: 0 7px; }
  .card-actions [data-act=fav] { display: none; }
  main { padding: 18px 14px 60px; }
  .row { grid-template-columns: 1fr; gap: 6px; }
  .nowplaying { flex-direction: column; align-items: stretch; }
  .np-controls { justify-content: flex-start; }
  .sysinfo { grid-template-columns: 1fr; }
}

/* ---------- roles ---------- */
body:not(.is-admin) .admin-only, body:not(.can-upload) .upload-only, body:not(.has-tv) .tv-only { display: none !important; }

.user-btn { padding: 0 12px 0 6px; }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: linear-gradient(140deg, var(--accent2), var(--accent)); color: #fff; font: 700 13px var(--sans); margin-right: 8px; vertical-align: middle; }
.avatar.big { width: 46px; height: 46px; font-size: 20px; margin-right: 14px; }
#user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.link { border: 0; background: none; color: var(--accent2); cursor: pointer; font-size: 12.5px; padding: 4px 6px; border-radius: 6px; }
.link:hover { background: var(--panel2); }
.link.bad { color: #ff8b8b; }
.btn.block { width: 100%; justify-content: center; height: 44px; }
.btns.left { justify-content: flex-start; flex-wrap: wrap; }
.form-err { color: #ff9b9b; font-size: 13.5px; min-height: 1em; margin: 4px 0; }
input[type=password] { height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); padding: 0 12px; width: 100%; }

/* account */
.acct-head { display: flex; align-items: center; margin-bottom: 18px; }
.pw-form { display: grid; gap: 8px; }
.pw-form h3 { margin: 4px 0; font-size: 14px; }
.pw-form .btn { justify-self: start; }
.pw-wrap { display: flex; gap: 6px; }
.pw-wrap input { flex: 1; font-family: ui-monospace, monospace; }

/* users */
.u-add { display: grid; grid-template-columns: 1fr 1.6fr 120px auto; gap: 8px; margin: 14px 0 6px; }
.table-wrap { overflow-x: auto; }
.users { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.users th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); }
.users td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.users tr.off td { opacity: .55; }
.users .tag { margin-left: 6px; }
.u-acts { text-align: right; white-space: nowrap; }

/* web address checklist */
.h-status { margin-top: 18px; display: grid; gap: 8px; }
.chk { display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border-radius: 10px; padding: 11px 14px; border-left: 3px solid var(--line); }
.chk b { font-weight: 600; }
.chk .muted { margin-top: 2px; line-height: 1.5; }
.chk-i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--sans); background: var(--panel2); }
.chk.ok { border-color: var(--ok); } .chk.ok .chk-i { background: var(--ok); color: #062; }
.chk.warn { border-color: var(--accent2); } .chk.warn .chk-i { background: var(--accent2); color: #432; }
.chk.bad { border-color: var(--bad); } .chk.bad .chk-i { background: var(--bad); color: #fff; }
.chk.wait .chk-i { animation: pulse 1.2s infinite; background: #4a5068; }
.chk.info .chk-i { background: #3a7bd5; color: #fff; }
.h-log { background: var(--panel); border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.h-log summary { margin: 0; }
.h-log > div { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); word-break: break-word; }
.h-open { margin: 6px 0 0; }
.h-open a { text-decoration: none; }

/* ---------- sign-in page ---------- */
body.auth-page { overflow: auto; }
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 18px; gap: 26px; }
.auth-logo { font-size: 20px; }
.auth-card { width: min(400px, 100%); background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: grid; gap: 14px;
  box-shadow: 0 30px 80px -30px #000, 0 0 0 1px rgba(255,255,255,.02); }
.auth-card h1 { margin: 0 0 4px; font-size: 22px; }
.auth-card p { margin: 0; }
.auth-card label:not(.switch) { display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
.auth-card label input:not([type=checkbox]) { color: var(--text); font-size: 15px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); padding: 0 12px; }
.auth-card input:focus { border-color: var(--accent2); outline: none; }
.auth-card .switch { font-size: 13.5px; color: var(--muted); }

@media (max-width: 760px) {
  .u-add { grid-template-columns: 1fr; }
  #user-name { display: none; }
  .user-btn { padding: 0 6px; }
  .avatar { margin-right: 0; }
  .u-acts { white-space: normal; }
}
