:root {
  --bg: #0a0a0b; --panel: #131315; --panel-2: #1b1b1e; --line: #27272b;
  --text: #f3f3f4; --muted: #9a9aa1;
  --accent: #8ab4ff; --ok: #34c759; --warn: #ffb020; --bad: #ff453a; --off: #5f5f66;
  --r: 18px; --r-sm: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.45 "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
code { font: 12px/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--text); background: var(--panel-2); padding: 2px 6px; border-radius: 6px; }

.app { display: grid; grid-template-columns: 232px minmax(0, 1fr) auto; min-height: 100vh; }

/* sidebar */
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px; background: var(--panel); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; font-size: 15px; letter-spacing: .01em; }
.brand b { font-weight: 700; }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(from 200deg, #fff 0 25%, #8ab4ff 25% 55%, #2b2b30 55% 100%); box-shadow: 0 0 0 2px #000, 0 0 0 3px #3a3a40; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { position: relative; text-align: left; border: 0; background: transparent; padding: 9px 12px 9px 26px; border-radius: var(--r-sm); color: var(--muted); cursor: pointer; }
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.is-active { background: var(--panel-2); color: var(--text); font-weight: 600; }
.nav-item::before { content: ""; position: absolute; left: 12px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--line); transform: translateY(-50%); }
.nav-item.is-active::before { background: var(--accent); }
.nav-sep { height: 1px; background: var(--line); margin: 8px 6px; }
.sidebar-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px; }
.pill { font-size: 11px; padding: 4px 9px; border-radius: 999px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.pill-warn { color: var(--warn); border-color: rgba(255, 176, 32, .35); }

/* main */
.main { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 24px 26px 14px; flex-wrap: wrap; }
.topbar h1 { font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.sub { color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search { width: 240px; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); }
.search::placeholder { color: var(--off); }
.btn { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.btn:hover:not(:disabled) { background: var(--panel-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--text); color: #0a0a0b; border-color: var(--text); font-weight: 600; }
.notice { margin: 0 26px 14px; padding: 10px 14px; border-radius: var(--r-sm); border: 1px dashed var(--line); background: var(--panel); color: var(--muted); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 0 26px 16px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* grid of phones */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 20px 14px; padding: 0 26px 34px; }
.phone-card { border: 0; background: transparent; padding: 0; text-align: left; cursor: pointer; border-radius: var(--r); }
.phone-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.phone { position: relative; aspect-ratio: 9 / 19; border-radius: 24px; background: #0b0b0d; border: 1.5px solid #303036; box-shadow: inset 0 0 0 1px #000, 0 8px 22px rgba(0, 0, 0, .55); transition: border-color .15s, box-shadow .15s; }
.phone.is-on { border-color: #4a4a52; }
.phone-card:hover .phone { border-color: #55555e; }
.phone-card.is-sel .phone { border-color: var(--accent); box-shadow: inset 0 0 0 1px #000, 0 0 0 3px rgba(138, 180, 255, .28), 0 8px 22px rgba(0, 0, 0, .55); }
/* tela: quase preta, sem papel de parede, sem barra de estado nem ilha */
.screen { position: absolute; inset: 5px; border-radius: 19px; overflow: hidden; display: flex; flex-direction: column; background: #0f0f10; }
.row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 11px 8px 0; }
.slot { display: block; aspect-ratio: 1; }
.slot .ap { width: 100%; }
.tag { margin: auto 6px 5px; padding: 3px 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: #d9d9de; font-size: 7px; line-height: 1.25; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.dock { display: flex; justify-content: center; gap: 10%; margin: 0 6px 5px; padding: 5px 6px; border-radius: 10px; background: rgba(255, 255, 255, .12); }
.dock .ap { width: 24%; }
.home { width: 34%; height: 3px; margin: 0 auto 5px; border-radius: 2px; background: rgba(255, 255, 255, .65); }
.dot { position: absolute; top: -5px; left: -5px; width: 13px; height: 13px; border-radius: 50%; background: var(--off); border: 2.5px solid var(--bg); }
.live { position: absolute; top: -5px; right: -5px; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 2.5px solid var(--bg); box-shadow: 0 0 0 2px rgba(255, 255, 255, .22); }
.dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); } .dot-bad { background: var(--bad); } .dot-off { background: var(--off); } .dot-accent { background: var(--accent); } .dot-live { background: #fff; }
.dot-inline { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
/* aparelho a dormir: mesma moldura, ícones esbatidos */
.is-off .ap { opacity: .22; filter: saturate(.5); }
.is-off .ap.is-fut { opacity: .3; }
.is-off .tag { color: var(--muted); }
.st-offline .screen { background: #000; }
.st-offline .row, .st-offline .dock, .st-offline .home { visibility: hidden; }
.st-offline .tag { color: var(--off); background: transparent; }
.st-registrando .tag { color: var(--accent); }
.st-pausado .tag { color: var(--warn); }
.label { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-top: 9px; font-size: 11.5px; }
.label b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label span { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ícones de app em CSS (sem imagem): cor cheia = ativo, esbatido = instalado sem módulo, tracejado = futuro */
.ap { position: relative; display: block; aspect-ratio: 1; border-radius: 27%; background: #444; box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.ap-whatsapp { background-color: #25d366; background-image: radial-gradient(circle, #25d366 0 11%, #fff 12% 30%, transparent 32%); }
.ap-navegador { background-color: #fff; background-image: radial-gradient(circle, #4285f4 0 24%, #fff 25% 34%, transparent 35%), conic-gradient(#ea4335 0 33%, #fbbc05 33% 66%, #34a853 66% 100%); }
.ap-instagram { background-color: #d6249f; background-image: radial-gradient(circle, transparent 0 22%, #fff 24% 34%, transparent 36%), radial-gradient(circle at 76% 24%, #fff 0 7%, transparent 9%), radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.ap-tiktok { background-color: #010101; background-image: radial-gradient(circle at 56% 44%, #fff 0 12%, transparent 14%), radial-gradient(circle at 61% 39%, #fe2c55 0 14%, transparent 16%), radial-gradient(circle at 49% 51%, #25f4ee 0 14%, transparent 16%); }
.ap-youtube { background-color: #ff0000; }
.ap-youtube::after { content: ""; position: absolute; left: 40%; top: 32%; width: 30%; height: 36%; background: #fff; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.ap.is-inst { opacity: .38; }
.ap.is-fut { background: none; box-shadow: none; border: 1.5px dashed rgba(255, 255, 255, .45); }
.ap.is-fut::after { opacity: .35; }

/* drawer */
.drawer { width: 380px; position: sticky; top: 0; height: 100vh; overflow: auto; padding: 22px 22px 30px; background: var(--panel); border-left: 1px solid var(--line); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.drawer-head b { font-size: 17px; font-weight: 600; }
.muted { color: var(--muted); }
.x { border: 1px solid var(--line); background: transparent; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; }
.x:hover { color: var(--text); background: var(--panel-2); }
.live-box { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 18px; }
.live-box .phone { width: 170px; border-radius: 30px; }
.live-box .phone .screen { border-radius: 25px; }
.live-box .tag { font-size: 9.5px; padding: 4px 8px; }
.live-note { font-size: 12px; color: var(--muted); }
.ramp { margin-bottom: 16px; }
.ramp-bar { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin-bottom: 6px; }
.ramp-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 9px 12px; margin: 0 0 18px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.drawer-h { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.apps-list { list-style: none; margin: 0 0 18px; padding: 0; }
.apps-list li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.apps-list .ap { width: 26px; margin-top: 1px; }
.apps-l1 { display: flex; justify-content: space-between; gap: 8px; }
.apps-l1 span { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.apps-txt .muted { font-size: 12.5px; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* soon + apps + arquitetura */
.soon-box { margin: 0 26px; padding: 22px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); color: var(--muted); max-width: 640px; }
.tbl-wrap { overflow-x: auto; padding: 0 26px 34px; }
.tbl-cols { min-width: 720px; }
.tbl-cols th { width: auto; white-space: nowrap; }
.tbl-cols td .ap { display: inline-block; width: 18px; vertical-align: -4px; margin-right: 7px; }
.mod { display: inline-block; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
.mod-ativo { color: var(--ok); border-color: rgba(52, 199, 89, .35); }
.mod-a_construir { color: var(--warn); border-color: rgba(255, 176, 32, .35); }
.mod-futuro { color: var(--muted); border-style: dashed; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.flow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px 18px; padding: 6px 26px 8px; }
.flow-card { position: relative; padding: 18px 16px 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.flow-card .n { position: absolute; top: -12px; left: 14px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #0a0a0b; font-size: 12px; font-weight: 700; }
.flow-card h3 { font-size: 15px; font-weight: 600; margin: 4px 0 8px; }
.flow-card p { color: var(--muted); font-size: 13px; }
.flow-card:not(:last-child)::after { content: "→"; position: absolute; right: -16px; top: 50%; transform: translateY(-50%); color: var(--off); font-size: 16px; }
.arq-body { padding: 6px 26px 40px; max-width: 900px; }
.arq-body h2 { font-size: 17px; font-weight: 600; margin: 30px 0 12px; }
.arq-body .tbl-wrap { padding: 0; }
.arq-body .tbl-cols { min-width: 640px; }
.timeline { list-style: none; padding: 0 0 0 18px; margin: 0; border-left: 2px solid var(--line); display: grid; gap: 10px; }
.timeline li { position: relative; color: var(--muted); }
.timeline li b { color: var(--text); margin-right: 6px; }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.fine { color: var(--muted); font-size: 13px; margin-top: 14px; }
.tbl { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--muted); font-weight: 500; width: 220px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card { padding: 16px 18px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.card h3 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.card ul { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 4px; }
.cinco { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 6px; }
.cinco b { color: var(--text); }

@media (max-width: 1180px) {
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flow-card:nth-child(3)::after { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-sep { display: none; }
  .sidebar-foot { margin-top: 0; }
  .drawer { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 72vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .6); }
  .search { width: 100%; }
}
@media (max-width: 640px) {
  .flow { grid-template-columns: 1fr; }
  .flow-card::after { display: none !important; }
  .two { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); padding: 0 16px 30px; }
  .topbar, .notice, .legend, .soon-box, .arq-body, .tbl-wrap { padding-left: 16px; padding-right: 16px; margin-left: 0; margin-right: 0; }
  .arq-body .tbl-wrap { padding-left: 0; padding-right: 0; }
  .tag { white-space: normal; }
}
