:root { --bg:#0f1a1f; --panel:#17262c; --line:#24363d; --text:#d9e4e7; --dim:#7d949c; --teal:#1f97a2; --green:#59d68e; --red:#ff7a59; }
* { box-sizing:border-box; margin:0; }
html, body { height:100%; }
body { background:var(--bg); color:var(--text); font-family:Archivo, system-ui, sans-serif; }
button { font:inherit; cursor:pointer; }
.mono { font-family:"JetBrains Mono", monospace; }

/* login */
.login { min-height:100%; display:grid; place-items:center; padding:24px 16px; background:radial-gradient(circle at 30% 20%, #16343a, var(--bg) 60%); }
.login form { width:100%; max-width:360px; display:grid; gap:12px; }
.login img { height:56px; margin:0 auto 18px; }
.login h1 { text-align:center; font-size:15px; font-weight:600; color:var(--dim); margin:-10px 0 10px; letter-spacing:.04em; }
.login input { background:var(--panel); border:1px solid var(--line); color:var(--text); border-radius:10px; padding:13px 14px; font:inherit; font-size:15px; outline:none; }
.login input:focus { border-color:var(--teal); }
.login button { background:var(--teal); color:#04161a; border:0; border-radius:10px; padding:13px; font-weight:800; font-size:15px; }
.login button:disabled { opacity:.6; }
.err { color:var(--red); font-size:13px; text-align:center; min-height:18px; }

/* top bar */
.top { height:54px; display:flex; align-items:center; gap:14px; padding:0 18px; border-bottom:1px solid #1e2e34; }
.top img { height:30px; }
.top .sp { flex:1; }
.top .who { color:var(--dim); font-size:13px; }
.top .back { background:none; border:0; color:var(--text); font-weight:700; font-size:14px; padding:6px 0; }
.top .title { font-weight:700; font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ghost { background:none; border:1px solid var(--line); color:var(--dim); border-radius:8px; padding:6px 12px; font-size:13px; }

.pill { display:inline-flex; align-items:center; gap:6px; border-radius:999px; padding:4px 10px; font-weight:700; font-size:12px; white-space:nowrap; }
.pill .dot { width:7px; height:7px; border-radius:50%; background:currentColor; }
.on { background:#123d2a; color:var(--green); } .off { background:var(--line); color:var(--dim); }
.on .dot { animation:pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity:.3; } }

/* kiosk grid */
.wrap { padding:20px 18px 40px; max-width:1400px; margin:0 auto; }
.count { color:var(--dim); font-size:13px; margin-bottom:14px; }
.grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(340px, 1fr)); gap:16px; }
.tile { background:var(--panel); border:1px solid var(--line); border-radius:14px; overflow:hidden; text-align:left; color:inherit; padding:0; transition:border-color .15s, transform .15s; }
.tile:hover { border-color:var(--teal); transform:translateY(-2px); }
.tile .pic { aspect-ratio:16/10; background:#0b1417; display:grid; place-items:center; color:var(--dim); font-size:13px; overflow:hidden; }
.tile .pic img { width:100%; height:100%; object-fit:cover; display:block; }
.tile.offline .pic img { filter:grayscale(1) brightness(.35); }
.tile .meta { padding:12px 14px; display:flex; justify-content:space-between; align-items:center; gap:10px; }
.tile b { display:block; font-size:15px; }
.tile small { color:var(--dim); font-size:12px; }

/* live view */
.live { position:fixed; inset:54px 0 32px 0; display:grid; place-items:center; padding:12px; }
.live canvas, .live img { max-width:100%; max-height:calc(100vh - 110px); width:auto; height:auto; object-fit:contain; border-radius:6px; outline:2px solid var(--teal); background:#000; display:block; }
.live .msg { color:var(--dim); text-align:center; font-size:15px; line-height:1.6; }
.bar { position:fixed; left:0; right:0; bottom:0; height:30px; display:flex; align-items:center; justify-content:space-between; padding:0 18px; color:var(--dim); font-size:12px; border-top:1px solid #1e2e34; }
.offline-note .live img { filter:grayscale(1) brightness(.4); outline-color:var(--line); }
@media (max-width:600px) { .top .who { display:none; } .grid { grid-template-columns:1fr; } }
