:root { --bg: #000; --fg: #f4f4f4; --dim: #8b8b8b; --line: rgba(255, 255, 255, .16); --line2: rgba(255, 255, 255, .34); --glow: 0 0 6px rgba(255, 255, 255, .9), 0 0 22px rgba(255, 255, 255, .45); --red: #ff3b5c; --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, Menlo, monospace; color-scheme: dark; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--fg); }
body { font-family: var(--mono); font-size: 13.5px; line-height: 1.45; padding-bottom: env(safe-area-inset-bottom); overflow-x: hidden; }
h1, h2, h3, p { margin: 0; } button, input { font: inherit; color: inherit; } button { cursor: pointer; } .hide { display: none !important; }
.grid-bg { position: fixed; inset: 0; z-index: -2; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 44px 44px; opacity: .28; mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 75%); }
.scan { position: fixed; inset: 0; z-index: 200; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px); }
.scan::after { content: ""; position: absolute; left: 0; right: 0; height: 120px; top: -120px; background: linear-gradient(transparent, rgba(255, 255, 255, .05), transparent); animation: sweep 7s linear infinite; }
@keyframes sweep { to { transform: translateY(calc(100vh + 240px)); } }

/* boot */
#boot { position: fixed; inset: 0; z-index: 150; background: #000; display: grid; place-items: center; transition: opacity .5s, visibility .5s; }
#boot.out { opacity: 0; visibility: hidden; }
.bx { text-align: center; width: min(340px, 86vw); }
.glyph { font-size: 92px; font-weight: 800; line-height: 1; text-shadow: var(--glow); animation: glitch 2.4s infinite; }
@keyframes glitch { 0%, 88%, 100% { transform: none; clip-path: none; } 90% { transform: translate(-3px, 1px); text-shadow: 3px 0 #fff, -3px 0 #777; } 93% { transform: translate(3px, -1px); clip-path: inset(30% 0 30% 0); } 96% { transform: translate(-2px, 0); } }
.bt { letter-spacing: .32em; font-size: 11px; margin-top: 14px; color: var(--dim); }
.bl { margin-top: 18px; height: 18px; color: var(--fg); font-size: 12px; }
.bar { height: 2px; background: var(--line); margin-top: 10px; } .bar i { display: block; height: 100%; width: 0; background: #fff; box-shadow: var(--glow); transition: width .35s; }

/* estrutura */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: rgba(0, 0, 0, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.logo { font-weight: 800; letter-spacing: .18em; font-size: 13px; margin-right: auto; text-shadow: 0 0 10px rgba(255, 255, 255, .6); } .logo i { font-style: normal; color: var(--dim); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: var(--glow); animation: blink 2s infinite; display: inline-block; margin-right: 6px; }
@keyframes blink { 50% { opacity: .25; } }
.btn { border: 1px solid var(--line2); background: transparent; padding: 0 14px; height: 38px; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; font-weight: 700; transition: .18s; position: relative; }
.btn:hover, .btn:active { background: #fff; color: #000; box-shadow: var(--glow); }
.btn.solid { background: #fff; color: #000; box-shadow: 0 0 14px rgba(255, 255, 255, .35); } .btn.solid:hover { box-shadow: var(--glow); }
.btn.red { border-color: var(--red); color: var(--red); } .btn.red:hover { background: var(--red); color: #000; box-shadow: 0 0 18px var(--red); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 11px; } .btn:disabled { opacity: .4; pointer-events: none; }
.tabs { display: flex; gap: 0; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; padding: 0 8px; position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 25; background: rgba(0, 0, 0, .9); }
.tabs button { background: none; border: 0; padding: 13px 12px; letter-spacing: .12em; font-size: 11.5px; color: var(--dim); position: relative; white-space: nowrap; font-weight: 700; }
.tabs button.on { color: #fff; text-shadow: 0 0 8px rgba(255, 255, 255, .8); }
.tabs button.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: #fff; box-shadow: var(--glow); }
.tabs .badge { margin-left: 6px; background: #fff; color: #000; padding: 1px 6px; font-size: 10.5px; animation: blink 1.2s infinite; }
main { max-width: 1040px; margin: 0 auto; padding: 16px 14px 70px; }
.center { min-height: calc(100dvh - 60px); display: grid; place-items: center; padding: 20px 14px; }
.box { border: 1px solid var(--line2); background: rgba(0, 0, 0, .7); position: relative; padding: 22px 18px; }
.box::before, .box::after { content: ""; position: absolute; width: 12px; height: 12px; border: 2px solid #fff; box-shadow: 0 0 8px rgba(255, 255, 255, .5); }
.box::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; } .box::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.login { width: min(400px, 100%); } .login h2 { font-size: 15px; letter-spacing: .22em; margin-bottom: 4px; } .login .sub { color: var(--dim); font-size: 12px; }
label.f { display: block; margin-top: 16px; font-size: 10.5px; letter-spacing: .2em; color: var(--dim); text-transform: uppercase; }
.input { width: 100%; height: 46px; margin-top: 6px; background: #000; border: 1px solid var(--line2); padding: 0 12px; outline: none; font-size: 16px; transition: .18s; }
.input:focus { border-color: #fff; box-shadow: 0 0 12px rgba(255, 255, 255, .35); }
.err { color: var(--red); min-height: 20px; margin-top: 12px; font-size: 12.5px; }
.login .btn { width: 100%; height: 48px; margin-top: 16px; }
.wait { text-align: center; width: min(420px, 100%); } .wait h2 { letter-spacing: .2em; font-size: 14px; margin: 14px 0 8px; } .wait p { color: var(--dim); }
.spin { width: 54px; height: 54px; margin: 0 auto; border: 2px solid var(--line); border-top-color: #fff; border-radius: 50%; animation: rot 1s linear infinite; box-shadow: 0 0 14px rgba(255, 255, 255, .25); } @keyframes rot { to { transform: rotate(360deg); } }

/* painel */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.stat { border: 1px solid var(--line); padding: 14px; position: relative; background: rgba(255, 255, 255, .02); }
.stat small { display: block; font-size: 10.5px; letter-spacing: .2em; color: var(--dim); text-transform: uppercase; }
.stat b { display: block; font-size: 30px; margin: 4px 0 6px; font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: 0 0 12px rgba(255, 255, 255, .35); }
.stat b span { font-size: 15px; color: var(--dim); text-shadow: none; }
.meter { height: 4px; background: var(--line); } .meter i { display: block; height: 100%; background: #fff; box-shadow: var(--glow); transition: width .6s; }
.stat.alert { border-color: #fff; box-shadow: 0 0 22px rgba(255, 255, 255, .25), inset 0 0 22px rgba(255, 255, 255, .06); animation: pulseb 1.6s infinite; } @keyframes pulseb { 50% { box-shadow: 0 0 6px rgba(255, 255, 255, .1); } }
h3.sec { margin: 26px 0 10px; font-size: 11.5px; letter-spacing: .26em; color: var(--dim); display: flex; align-items: center; gap: 10px; } h3.sec::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 110px; border: 1px solid var(--line); padding: 10px 10px 4px; }
.chart div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; font-size: 9.5px; color: var(--dim); gap: 3px; }
.chart i { width: 100%; max-width: 30px; background: #fff; box-shadow: 0 0 8px rgba(255, 255, 255, .5); min-height: 2px; }
.empty { color: var(--dim); padding: 22px; text-align: center; border: 1px dashed var(--line); }

/* dispositivos */
.devs { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 12px; }
.dev { border: 1px solid var(--line); padding: 14px; background: rgba(255, 255, 255, .02); position: relative; }
.dev.pending { border-color: #fff; box-shadow: 0 0 20px rgba(255, 255, 255, .22); animation: pulseb 1.8s infinite; }
.dev.revoked, .dev.denied { opacity: .55; }
.dev .h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.kind { font-size: 15px; font-weight: 800; letter-spacing: .1em; padding: 5px 10px; border: 1px solid #fff; text-shadow: 0 0 8px rgba(255, 255, 255, .7); }
.kind.bad { border-color: var(--red); color: var(--red); text-shadow: none; }
.who { color: var(--dim); font-size: 11px; letter-spacing: .15em; margin-left: auto; text-transform: uppercase; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag { font-size: 10.5px; padding: 2px 7px; border: 1px solid var(--line2); letter-spacing: .08em; text-transform: uppercase; }
.tag.warn { border-color: var(--red); color: var(--red); } .tag.on { background: #fff; color: #000; }
.kv { display: grid; grid-template-columns: 82px 1fr; gap: 3px 10px; font-size: 12px; } .kv span { color: var(--dim); } .kv b { font-weight: 500; overflow-wrap: anywhere; }
.acts { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; } .acts .btn { flex: 1; min-width: 90px; }

table { width: 100%; border-collapse: collapse; font-size: 12.5px; } th { text-align: left; font-size: 10.5px; letter-spacing: .18em; color: var(--dim); font-weight: 600; padding: 8px 8px; border-bottom: 1px solid var(--line2); text-transform: uppercase; }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; } .tw { overflow-x: auto; border: 1px solid var(--line); }
.set { display: grid; gap: 14px; max-width: 520px; } .row { display: flex; gap: 8px; align-items: end; } .row .input { margin-top: 6px; } .row .btn { height: 46px; }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 24px); z-index: 300; background: #000; border: 1px solid #fff; box-shadow: var(--glow); padding: 11px 16px; opacity: 0; transition: .3s; max-width: 90vw; } .toast.on { opacity: 1; transform: translate(-50%, 0); }
.modal { position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, .8); display: grid; place-items: center; padding: 20px; } .modal .box { width: min(400px, 100%); background: #000; }
.modal ol { color: var(--dim); padding-left: 18px; } .modal h2 { margin-bottom: 8px; letter-spacing: .15em; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
