/* HoloCentral (WOW Service): painel de operação dos ventiladores holográficos.
   Layout: barra superior com a marca e o estado da central, navegação lateral e área de trabalho;
   a tela de Ventiladores é uma tabela com painel de detalhe. No celular: barra superior + navegação inferior.
   Cor: neutros frios, verde WOW (#07C655) como marca e ação; verde também quer dizer "ligado/tocando",
   âmbar para pendências e vermelho para falhas. Cantos quase retos; tipografia IBM Plex. */
:root {
  --bg: #f2f3f5;
  --surface: #ffffff;
  --surface-2: #f6f7f8;
  --surface-3: #e8ebee;
  --line: #dde1e5;
  --line-soft: #edf0f2;
  --fg: #1c2024;
  --muted: #5b646d;
  --faint: #868f98;
  --brand: #07c655;           /* verde da logo: marca, indicador de seleção */
  --brand-gray: #666666;      /* cinza da logo */
  --accent: #068a3d;          /* verde escurecido: botões e links com texto branco legível */
  --accent-strong: #056f31;
  --accent-ink: #ffffff;
  --accent-soft: rgba(7, 198, 85, .11);
  --live: #0b8a43;
  --live-soft: rgba(11, 138, 67, .10);
  --warn: #9a5f00;
  --warn-soft: #fcf2df;
  --danger: #bf3a30;
  --danger-soft: #fbe9e7;
  --topbar: #ffffff;
  --row-sel: #eef8f2;
  --disc: #000;
  --shadow: 0 10px 30px rgba(20, 28, 36, .14);
  --font-display: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r-sm: 3px;
  --r-md: 4px;
  --r-lg: 6px;
  --logo-light: block;
  --logo-dark: none;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111315; --surface: #191c1f; --surface-2: #1f2326; --surface-3: #2a2f33; --line: #2f3539; --line-soft: #252a2e;
    --fg: #e4e7ea; --muted: #9aa3ab; --faint: #6f7880;
    --accent: #2ccf6e; --accent-strong: #52dc8a; --accent-ink: #08170e; --accent-soft: rgba(44, 207, 110, .13);
    --live: #36c873; --live-soft: rgba(54, 200, 115, .13);
    --warn: #e2a645; --warn-soft: rgba(226, 166, 69, .13);
    --danger: #ef6d61; --danger-soft: rgba(239, 109, 97, .13);
    --topbar: #15181b; --row-sel: #1d2a22; --shadow: 0 10px 30px rgba(0, 0, 0, .45);
    --logo-light: none; --logo-dark: block;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111315; --surface: #191c1f; --surface-2: #1f2326; --surface-3: #2a2f33; --line: #2f3539; --line-soft: #252a2e;
  --fg: #e4e7ea; --muted: #9aa3ab; --faint: #6f7880;
  --accent: #2ccf6e; --accent-strong: #52dc8a; --accent-ink: #08170e; --accent-soft: rgba(44, 207, 110, .13);
  --live: #36c873; --live-soft: rgba(54, 200, 115, .13);
  --warn: #e2a645; --warn-soft: rgba(226, 166, 69, .13);
  --danger: #ef6d61; --danger-soft: rgba(239, 109, 97, .13);
  --topbar: #15181b; --row-sel: #1d2a22; --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --logo-light: none; --logo-dark: block;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 14px/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
h1 { font-size: 1.35rem; font-weight: 600; }
h2 { font-size: 1.05rem; font-weight: 600; }
h3 { font-size: .98rem; font-weight: 600; }
.mono { font-family: var(--font-data); font-size: .86em; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* ---------- barra superior ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 25;
  display: flex; align-items: center; gap: 18px; height: 52px; padding: 0 18px;
  background: var(--topbar); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { height: 24px; width: auto; display: var(--logo-light); }
.brand-logo.dark { display: var(--logo-dark); }
.brand-sep { width: 1px; height: 22px; background: var(--line); }
.brand-name { font-weight: 600; font-size: .98rem; color: var(--fg); letter-spacing: .01em; }
.store-sel { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-md); font-size: .84rem; color: var(--muted); }
.store-sel b, .brand-store { color: var(--fg); font-weight: 500; }
.top-status { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.top-status .hub-status { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); white-space: nowrap; }
.top-status .hub-status > div { display: flex; align-items: baseline; gap: 8px; }
.top-status .hub-status b { font-weight: 500; color: var(--fg); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }
.dot.demo { background: var(--warn); }

/* ---------- casca ---------- */
.app { display: grid; grid-template-columns: 212px minmax(0, 1fr); min-height: calc(100% - 52px); }
.side {
  position: sticky; top: calc(52px + env(safe-area-inset-top, 0px)); height: calc(100dvh - 52px);
  display: flex; flex-direction: column; gap: 16px; padding: 12px 8px;
  border-right: 1px solid var(--line); background: var(--surface);
}
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav button {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: var(--r-md); background: none;
  color: var(--muted); font-weight: 500; cursor: pointer; text-align: left;
}
.nav button svg { width: 17px; height: 17px; flex: none; }
.nav button:hover { background: var(--surface-2); color: var(--fg); }
.nav button[aria-current="page"] { background: var(--accent-soft); color: var(--fg); font-weight: 600; }
.nav button[aria-current="page"]::before { content: ""; position: absolute; left: -8px; top: 6px; bottom: 6px; width: 3px; background: var(--brand); }
.nav button[aria-current="page"] svg { color: var(--accent); }
.nav .count { margin-left: auto; font-family: var(--font-data); font-size: .74rem; color: var(--faint); }
.side-foot { margin-top: auto; padding: 8px 10px; font-size: .76rem; color: var(--faint); }

.main { min-width: 0; padding: 20px 24px 100px; }
.view { display: flex; flex-direction: column; gap: 16px; max-width: 1480px; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.view-head .sub { margin-top: 2px; color: var(--muted); font-size: .88rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tabbar { display: none; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 34px; padding: 0 12px; border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--surface); font-weight: 500; font-size: .86rem; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--surface-2); border-color: #c9cfd5; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--fg); }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.sm { min-height: 28px; padding: 0 9px; font-size: .8rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-md);
  border: 0; background: none; color: var(--muted); cursor: pointer;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--surface-2); color: var(--fg); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; background: none; }
.badge-num { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 2px; background: rgba(255,255,255,.22); color: inherit; font-size: .74rem; font-family: var(--font-data); }

/* ---------- estados (tags) ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 7px;
  border-radius: var(--r-sm); font-size: .76rem; font-weight: 500; white-space: nowrap;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 1px; background: currentColor; flex: none; }
.pill.plain::before { display: none; }
.pill.live { background: var(--live-soft); color: var(--live); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.pill.off { color: var(--muted); }
.pill.off::before { background: var(--faint); }
.pill.model { font-family: var(--font-data); font-size: .72rem; }

/* faixa de indicadores: uma linha só, separada por divisórias */
.summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
}
.summary .stat {
  display: flex; flex-direction: column-reverse; gap: 0; padding: 10px 14px;
  background: var(--surface); font-size: .78rem; color: var(--muted);
}
.summary .stat b { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; color: var(--fg); font-variant-numeric: tabular-nums; line-height: 1.2; }
.summary .stat.live b { color: var(--live); }
.summary .stat.warn b { color: var(--warn); }
.summary .stat.danger b { color: var(--danger); }

.demo-note {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r-md);
  background: var(--warn-soft); color: var(--fg); font-size: .86rem; border: 1px solid transparent;
}
.demo-note svg { width: 16px; height: 16px; color: var(--warn); flex: none; margin-top: 2px; }

/* ---------- disco (prévia redonda do ventilador) ---------- */
.disc {
  --size: 112px;
  position: relative; width: var(--size); height: var(--size); flex: none; border-radius: 50%;
  background: var(--disc); overflow: hidden; isolation: isolate;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 0 0 1px var(--line);
}
.disc img, .disc canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.disc .blades {
  position: absolute; inset: 0; border-radius: 50%; z-index: 2; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.08) 0deg 1deg, transparent 1deg 90deg);
  mix-blend-mode: screen; opacity: 0;
}
.disc .hub { position: absolute; inset: 45%; border-radius: 50%; background: #111; z-index: 3; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.disc.playing .blades { opacity: .8; animation: spin 1.6s linear infinite; }
.disc.off img, .disc.off canvas { opacity: .25; filter: grayscale(1); }
.disc.offline { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--surface-3) 6px 12px); }
.disc.offline img, .disc.offline canvas { opacity: .12; filter: grayscale(1); }
.disc.empty::after { content: "Sem vídeo"; position: absolute; inset: 0; display: grid; place-items: center; font-size: .68rem; color: #777; z-index: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- tabela de ventiladores + painel de detalhe ---------- */
.ops { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.tbl-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: inherit; }
.tbl th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: .76rem; padding: 8px 10px;
  border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap;
}
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr.row { cursor: pointer; }
.tbl tbody tr.row:hover td { background: var(--surface-2); }
.tbl tbody tr.row.sel td { background: var(--row-sel); }
.tbl tbody tr.row.sel td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.tbl .disc { --size: 38px; }
.tbl .nm b { font-weight: 600; }
.tbl .nm .loc { color: var(--muted); font-size: .8rem; }
.tbl .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.tbl .tags .pill { height: 19px; font-size: .7rem; padding: 0 5px; }
.tbl .sub { color: var(--muted); font-size: .78rem; }
.tbl .now-t { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .ctl { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.tbl .add-row td { padding: 0; }
.tbl .add-row button { width: 100%; border: 0; background: none; color: var(--muted); padding: 11px 14px; text-align: left; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.tbl .add-row button:hover { background: var(--surface-2); color: var(--fg); }
.tbl .add-row svg { width: 15px; height: 15px; }
.detail { position: sticky; top: calc(72px + env(safe-area-inset-top, 0px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.detail .disc { --size: 120px; }
.detail .hd { display: flex; gap: 14px; align-items: center; min-width: 0; }
.detail .hd > div:not(.disc):not(.fan-menu) { min-width: 0; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.detail .hd .fan-menu { align-self: flex-start; }
/* no topo do painel o menu abre para baixo */
.detail .hd .fan-menu [role="menu"] { bottom: auto !important; top: calc(100% + 4px); }
.detail h2 { overflow-wrap: anywhere; }
.detail .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.detail .acts .grow { flex: 1; }

/* ---------- cartões (playlists, agendamentos, grupos) ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.fan {
  display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); min-width: 0;
}
.fan-top { display: flex; gap: 16px; align-items: center; min-width: 0; }
.fan-id { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.fan-id h3 { overflow-wrap: anywhere; }
.fan-loc { color: var(--muted); font-size: .82rem; margin-top: -4px; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.now {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 3px 10px; align-items: center;
  padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line-soft);
}
.now .label { grid-column: 1 / -1; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.now .title { grid-column: 1 / 3; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now .pos { color: var(--muted); font-size: .78rem; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.eq i { width: 3px; background: var(--live); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%,100% { height: 3px; } 50% { height: 12px; } }
.fan-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.seen { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.fan-actions { display: flex; align-items: center; gap: 8px; }

.bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 13px; }
.bars i { width: 3px; background: var(--surface-3); }
.bars i:nth-child(1) { height: 4px; } .bars i:nth-child(2) { height: 7px; } .bars i:nth-child(3) { height: 10px; } .bars i:nth-child(4) { height: 13px; }
.bars i.on { background: var(--fg); }

.switch { position: relative; width: 36px; height: 20px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + span { opacity: .45; }

.add-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 200px;
  border: 1px dashed var(--line); border-radius: var(--r-md); background: none; color: var(--muted);
  cursor: pointer; font-weight: 500; padding: 20px; text-align: center;
}
.add-card svg { width: 22px; height: 22px; }
.add-card small { font-weight: 400; max-width: 30ch; }
.add-card:hover { border-color: var(--accent); color: var(--fg); background: var(--accent-soft); }

/* ---------- vídeos ---------- */
.drop {
  display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: var(--r-md);
  border: 1px dashed #c4cbd2; background: var(--surface); transition: border-color .12s, background .12s;
}
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-icon { width: 38px; height: 38px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.drop-icon svg { width: 18px; height: 18px; }
.drop-text { flex: 1; min-width: 0; }
.drop-text b { display: block; font-weight: 600; }
.drop-text span { color: var(--muted); font-size: .84rem; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.video { display: flex; flex-direction: column; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); overflow: hidden; min-width: 0; }
.video-art { position: relative; aspect-ratio: 1; max-width: 100%; background: #000; display: grid; place-items: center; }
.video-art .disc { --size: 80%; box-shadow: none; }
.video-art .dur { position: absolute; right: 8px; bottom: 8px; padding: 1px 6px; border-radius: 2px; background: rgba(0,0,0,.75); color: #fff; font-family: var(--font-data); font-size: .72rem; }
.video-art .conv { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.62); color: #fff; z-index: 4; text-align: center; font-size: .8rem; gap: 6px; align-content: center; }
.ring { width: 50px; height: 50px; }
.ring circle { fill: none; stroke-width: 4; }
.ring .track { stroke: rgba(255,255,255,.2); }
.ring .val { stroke: var(--brand); transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .3s; }
.video-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.video-body .name { font-weight: 600; overflow-wrap: anywhere; }
.video-body .meta { color: var(--muted); }
.video-body .use { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; font-size: .78rem; color: var(--muted); }

/* ---------- atividade ---------- */
.log { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.log-day { padding: 8px 16px; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.log-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 16px; border-top: 1px solid var(--line-soft); }
.log-day + .log-row { border-top: 0; }
.log-row .ico { width: 18px; height: 18px; border-radius: 2px; display: grid; place-items: center; margin-top: 1px; }
.log-row .ico svg { width: 12px; height: 12px; }
.log-row .ico.ok { background: var(--live-soft); color: var(--live); }
.log-row .ico.info { background: var(--surface-3); color: var(--muted); }
.log-row .ico.warn { background: var(--warn-soft); color: var(--warn); }
.log-row .ico.err { background: var(--danger-soft); color: var(--danger); }
.log-row .txt { min-width: 0; }
.log-row .txt small { display: block; color: var(--muted); font-size: .8rem; }
.log-row time { color: var(--faint); }

/* ---------- ajustes ---------- */
.panel { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.panel-sec { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 24px; padding: 18px 20px; border-top: 1px solid var(--line); }
.panel-sec:first-child { border-top: 0; }
.panel-sec p { margin: 4px 0 0; color: var(--muted); font-size: .84rem; max-width: 46ch; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: .8rem; font-weight: 500; color: var(--muted); }
.input, .select {
  width: 100%; min-height: 36px; padding: 0 10px; border-radius: var(--r-md); border: 1px solid #ccd2d8;
  background: var(--surface); color: var(--fg); outline: none;
}
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.big { font-size: 1.1rem; font-weight: 600; min-height: 42px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); cursor: pointer; min-width: 150px; flex: 1; }
.seg input { position: absolute; opacity: 0; }
.seg label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg b { font-family: var(--font-data); font-size: .86rem; font-weight: 500; }
.seg small { color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: .86rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- gaveta ---------- */
.scrim { position: fixed; inset: 0; background: rgba(15, 20, 25, .42); z-index: 40; animation: fade .15s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(540px, 100%);
  display: flex; flex-direction: column; background: var(--bg); border-left: 1px solid var(--line);
  box-shadow: var(--shadow); animation: slide .2s ease-out;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 22px; }
.drawer-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface); }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.ident { display: flex; gap: 16px; align-items: center; }
.ident .fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sec-title .muted { font-size: .8rem; }
.plist { display: flex; flex-direction: column; gap: 6px; }
.pitem {
  display: grid; grid-template-columns: 22px 44px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 6px 6px 6px 10px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
}
.pitem .n { font-family: var(--font-data); color: var(--faint); font-size: .78rem; }
.pitem .disc { --size: 44px; }
.pitem .t { min-width: 0; }
.pitem .t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pitem .t span { color: var(--muted); font-size: .78rem; }
.pitem .ops { display: flex; }
.empty-list { padding: 18px; border-radius: var(--r-md); border: 1px dashed #c4cbd2; text-align: center; color: var(--muted); font-size: .88rem; background: var(--surface); }
.picker { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding: 6px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.pick { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 5px 7px; border-radius: var(--r-sm); border: 0; background: none; text-align: left; cursor: pointer; }
.pick:hover { background: var(--surface); }
.pick .disc { --size: 38px; }
.pick b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick span { color: var(--muted); font-size: .76rem; }
.pick .plus { color: var(--accent); font-weight: 600; font-size: .8rem; }
.confirm { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r-md); background: var(--danger-soft); font-size: .86rem; }

/* ---------- modal ---------- */
.modal {
  position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(620px, calc(100% - 32px)); max-height: calc(100% - 48px); display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); animation: fade .15s;
}
.modal .drawer-head { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.modal-body { overflow-y: auto; padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.radar { position: relative; width: 104px; height: 104px; margin: 14px auto 4px; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--brand); opacity: 0; animation: ping 2.1s ease-out infinite; }
.radar i:nth-child(2) { animation-delay: .7s; } .radar i:nth-child(3) { animation-delay: 1.4s; }
.radar b { position: absolute; inset: 43%; border-radius: 50%; background: var(--brand); }
@keyframes ping { 0% { transform: scale(.25); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
.scan-msg { text-align: center; color: var(--muted); }
.found { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.found-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.found-top .ssid { font-weight: 600; }
.found-top .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.found-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; }

/* ---------- painel de envio ---------- */
.job {
  position: fixed; right: 20px; bottom: 20px; z-index: 30; width: min(390px, calc(100% - 32px));
  border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: fade .15s; overflow: hidden;
}
.job-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-top: 3px solid var(--brand); }
.job-head small { display: block; color: var(--muted); font-size: .78rem; }
.job-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); max-height: 320px; overflow-y: auto; }
.job-item { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 10px 14px; }
.job-item + .job-item { border-top: 1px solid var(--line-soft); }
.job-item .st { width: 20px; height: 20px; border-radius: 2px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.job-item .st svg { width: 12px; height: 12px; }
.job-item.run .st { background: var(--accent-soft); color: var(--accent); }
.job-item.run .st svg { animation: spin 1s linear infinite; }
.job-item.ok .st { background: var(--live-soft); color: var(--live); }
.job-item.err .st { background: var(--danger-soft); color: var(--danger); }
.job-item b { font-weight: 600; font-size: .88rem; }
.job-item .step { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.prog { height: 3px; border-radius: 2px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.prog i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.job-item.ok .prog i { background: var(--live); }
.job-note { padding: 8px 14px 12px; color: var(--faint); font-size: .74rem; border-top: 1px solid var(--line-soft); }

.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { padding: 9px 14px; border-radius: var(--r-md); background: #1c2024; color: #f2f4f5; font-weight: 500; font-size: .86rem; box-shadow: var(--shadow); animation: fade .15s; }
.toast.err { background: var(--danger); color: #fff; }

/* ---------- servidor: barra superior, seletor de loja, menu da pessoa ---------- */
.small { font-size: .8rem; }
.grow { flex: 1; }
.tenant-name { font-size: .84rem; font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; }
.store-sel { position: relative; }
.srv .store-sel { padding: 0; border: 0; }
.store-sel > .store-lbl, .store-btn .store-lbl { color: var(--muted); }
.srv .store-sel > .store-lbl:first-child { padding: 4px 0; }
.store-btn, .user-btn {
  display: flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--surface); cursor: pointer; font-size: .84rem;
}
.store-btn:hover, .user-btn:hover { background: var(--surface-2); }
.store-btn svg, .user-btn svg { width: 14px; height: 14px; color: var(--muted); }
.srv .store-sel:not(:has(.store-btn)) { padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-md); }
.cdot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; background: var(--faint); }
.cdot.on { background: var(--brand); }
.cdot.off { background: var(--danger); }
.dot.off { background: var(--danger); }
.user-menu { position: relative; flex: none; display: flex; align-items: center; gap: 4px; }
.gear[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.user-btn { border-color: transparent; background: none; padding: 0 6px; }
.user-btn .avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .76rem; }
.user-btn .who { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.user-btn .who b { font-weight: 500; font-size: .84rem; }
.user-btn .who small { color: var(--muted); font-size: .74rem; }
.pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 300px; padding: 6px;
  display: flex; flex-direction: column; gap: 1px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow);
}
.pop.right { left: auto; right: 0; }
.pop button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; text-align: left; cursor: pointer; }
.pop button:hover { background: var(--surface-2); }
.pop button small { color: var(--muted); font-size: .74rem; white-space: nowrap; }
.pop button .grow small { display: block; }
.pop button[aria-checked="true"] { background: var(--accent-soft); font-weight: 600; }
.pop-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; display: flex; flex-direction: column; }
.pop-head small { color: var(--muted); font-size: .78rem; }
.nav-group { padding: 12px 10px 4px; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-group:first-child { padding-top: 2px; }
.select.sm { min-height: 28px; padding: 0 8px; font-size: .8rem; width: auto; }

/* ---------- faixas fixas (Videosoft dentro do cliente, central fora do ar) ---------- */
.banners { position: sticky; top: calc(52px + env(safe-area-inset-top, 0px)); z-index: 24; }
.banners:empty { display: none; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 9px 18px; font-size: .86rem; border-bottom: 1px solid var(--line); }
.banner.info { background: #e9f2fb; color: #17406b; }
.banner.danger { background: var(--danger-soft); color: var(--danger); }
.banner.warn { background: var(--warn-soft); color: var(--warn); border: 0; border-radius: var(--r-md); }
.banner b { font-weight: 600; }
:root[data-theme="dark"] .banner.info { background: #16263a; color: #a9c8ea; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .banner.info { background: #16263a; color: #a9c8ea; } }

/* ---------- tela de entrada ---------- */
.gate { position: fixed; inset: 0; z-index: 50; overflow-y: auto; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.gate-box { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.gate-box > p { margin: 0; }
.gate-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.gate-brand .brand-logo { height: 30px; }
.gate-form { display: flex; flex-direction: column; gap: 12px; }
.btn.big { min-height: 42px; font-size: .95rem; }
.or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: .8rem; margin: 2px 0 10px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#pk-login .btn { width: 100%; }
#pk-login p { margin: 8px 0 0; text-align: center; }
html.gate .topbar, html.gate .app, html.gate .banners { visibility: hidden; }
.form-err { padding: 9px 12px; border-radius: var(--r-md); background: var(--danger-soft); color: var(--danger); font-size: .86rem; }

/* ---------- formulários e listas das telas de cliente e área interna ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { font-size: .8rem; font-weight: 500; color: var(--muted); padding: 0; margin-bottom: 5px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks label, .check { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; font-size: .86rem; }
.checks label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.checks input, .check input, .perm input { accent-color: var(--accent); }
.form-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; padding-top: 6px; }
.sub-acts { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); }
.code-big { padding: 16px; text-align: center; font-size: 1.8rem; letter-spacing: .12em; font-weight: 500; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-md); user-select: all; }
.modal.wide { width: min(860px, calc(100% - 32px)); }
.perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.perm { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.perm small { display: block; color: var(--muted); font-size: .78rem; }
.perm b { font-weight: 500; font-size: .8rem; }
.perm:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar .input, .toolbar .select { width: auto; min-width: 200px; }
.tbl .only-narrow { display: none; }
.tbl .agent { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* Espaço da loja no servidor, acima da biblioteca de vídeos */
.storage { margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); font-size: .86rem; }
.storage-row { display: flex; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; }
.storage b { font-weight: 600; }
.storage .prog { height: 6px; margin-top: 8px; }
.storage.warn .prog i { background: var(--warn); }
.storage.danger { border-color: var(--danger); }
.storage.danger .prog i { background: var(--danger); }
.storage.danger .muted { color: var(--danger); }
/* Funcionalidades das lojas */
.feat-default { padding: 14px 16px; margin-bottom: 22px; display: flex; flex-direction: column; gap: 8px; }
.feat-default p { margin: 0; }
.feat-list { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.feat-list .check { width: 100%; }
.feat-list .check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.feat-list:disabled { opacity: .55; }
/* Configurações: abas das telas do cliente */
.cfg-head { margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.cfg-title { font-size: .8rem; font-weight: 600; color: var(--muted); padding-bottom: 8px; }
.cfg-tabs { display: flex; gap: 2px; overflow-x: auto; margin-bottom: -1px; }
.cfg-tabs button { flex: none; padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-weight: 500; font-size: .86rem; cursor: pointer; }
.cfg-tabs button:hover { color: var(--fg); }
.cfg-tabs button[aria-current="page"] { color: var(--fg); border-bottom-color: var(--brand); }
/* Zona de perigo dos Ajustes */
.danger-zone { margin-top: 28px; }
.danger-zone h2 { margin: 0 0 10px; font-size: 1rem; font-weight: 600; color: var(--danger); }
.danger-zone .panel { border-color: var(--danger); }
.danger-zone .panel-sec { border-top: 0; }
/* Cartões de fábrica: três passos, gravação e padrão */
a.btn { color: var(--fg); text-decoration: none; }
.card-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.card-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); font-size: .86rem; }
.card-steps .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; flex: none; }
.card-steps b { display: block; font-weight: 600; }
.card-steps small { display: block; color: var(--muted); margin-top: 2px; }
.card-write { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr) auto; gap: 12px; align-items: end; padding: 14px 16px; margin-bottom: 22px; }
.card-write .btn { min-height: 36px; }
.card-std { padding: 14px 16px; margin-bottom: 22px; }
.card-std dd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-std .pw { user-select: all; padding: 2px 6px; border-radius: 4px; background: var(--surface-2); }
.card-done { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.card-done > svg { width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: var(--live-soft); color: var(--live); flex: none; }
@media (max-width: 860px) {
  .card-steps { grid-template-columns: minmax(0, 1fr); }
  .card-write { grid-template-columns: minmax(0, 1fr); }
}
/* Versões: lojas cuja atualização voltou ou falhou ficam marcadas */
.kv-line { display: flex; gap: 8px 22px; flex-wrap: wrap; margin: 0 0 18px; color: var(--muted); font-size: .86rem; }
.kv-line b { color: var(--fg); font-weight: 600; }
.tbl tbody tr.upd-falhou td { background: var(--danger-soft); }
.tbl tbody tr.upd-falhou td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.tbl tbody tr.upd-voltou td { background: var(--warn-soft); }
.tbl tbody tr.upd-voltou td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.tbl .upd-detail { margin-top: 4px; font-size: .8rem; max-width: 380px; overflow-wrap: anywhere; }
.tbl.rel .mono { white-space: nowrap; }
.tbl.rel td:first-child { min-width: 150px; }
.tbl .rel-notes { min-width: 160px; max-width: 340px; white-space: pre-line; overflow-wrap: anywhere; }
.tbl tbody tr.row-stable td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
textarea.input { min-height: 72px; padding-top: 8px; padding-bottom: 8px; resize: vertical; font-family: inherit; }
.log.audit .log-row { grid-template-columns: 46px minmax(0, 1fr) auto; }
.log.audit .t { color: var(--faint); }
.log.audit .sub { color: var(--muted); font-size: .8rem; }
.back { margin: 0 0 6px -8px; }
.back svg { transform: rotate(-90deg); }
.steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.steps li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.steps li small { display: block; color: var(--muted); }
.steps .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: .78rem; font-weight: 600; flex: none; }
.steps li.ok .n { background: var(--live-soft); color: var(--live); }
.steps li.ok .n svg { width: 13px; height: 13px; }
.steps li.ok > .grow { color: var(--muted); }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 20px; border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--surface); }
.empty-state svg { width: 28px; height: 28px; color: var(--warn); }
.empty-state p { margin: 0; color: var(--muted); max-width: 48ch; }

/* ---------- visão simples ---------- */
.attention { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); font-size: .92rem; }
.attention svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.attention.danger { background: var(--danger-soft); color: var(--danger); }
.attention.ok { background: var(--live-soft); color: var(--live); }
.scards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.scard { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.scard.danger { border-color: var(--danger); box-shadow: inset 3px 0 0 var(--danger); }
.scard .disc { --size: 104px; }
.scard-txt { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.scard-txt h2 { font-size: 1.1rem; overflow-wrap: anywhere; }
.sword { font-weight: 600; font-size: .95rem; overflow-wrap: anywhere; }
.sword.live { color: var(--live); }
.sword.danger { color: var(--danger); }
.sword.warn { color: var(--warn); }
.sword.off { color: var(--muted); }
.scard-acts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.scard-acts .btn { min-height: 40px; flex: 1; }
.picks { display: flex; flex-direction: column; gap: 4px; }
.picks .pick { grid-template-columns: auto minmax(0, 1fr); border: 1px solid var(--line); background: var(--surface); padding: 8px 10px; }
.picks .pick.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.modal-body h3 { margin-top: 6px; }
.helps { display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.help { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.help summary { cursor: pointer; padding: 12px 14px; font-weight: 600; }
.help > div { padding: 0 14px 14px; color: var(--muted); }

/* ---------- responsivo ---------- */
@media (max-width: 1180px) {
  .ops { grid-template-columns: minmax(0, 1fr); }
  .detail { position: static; }
  .tbl .col-model, .tbl .col-sched { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); min-height: 100%; }
  .side { display: none; }
  .topbar { height: 48px; padding: 0 14px; gap: 10px; }
  .brand-sep, .store-sel, .top-status .hub-status > div, .top-status .btn { display: none; }
  .brand-logo { height: 20px; }
  .brand-name { font-size: .9rem; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px 9px; border: 0; background: none; color: var(--muted); font-size: .68rem; font-weight: 500; cursor: pointer; }
  .tabbar button svg { width: 20px; height: 20px; }
  .tabbar button[aria-current="page"] { color: var(--accent); box-shadow: inset 0 2px 0 var(--brand); }
  .main { padding: 16px 16px 110px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .panel-sec { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px; }
  .job { right: 16px; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .found-form { grid-template-columns: minmax(0, 1fr); }
  .drop { flex-wrap: wrap; }
  .tbl .col-signal, .tbl .col-state-text { display: none; }
  .tbl .now-t { max-width: 140px; }
  /* pelo servidor o seletor de loja continua no celular, só com o nome */
  .srv .store-sel { display: flex; min-width: 0; }
  .srv .store-sel .store-lbl, .tenant-name, .user-btn .who { display: none; }
  .store-btn { max-width: 46vw; }
  .store-sel .brand-store { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .banners { top: calc(48px + env(safe-area-inset-top, 0px)); }
  .banner { padding: 8px 14px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .tbl .only-narrow { display: block; }
  .pop { position: fixed; left: 12px; right: 12px; top: calc(52px + env(safe-area-inset-top, 0px)); }
}
@media (max-width: 520px) {
  .tbl .col-now { display: none; }
  .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .detail .disc { --size: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition: none !important; }
}
