/* =====================================================================
   shell.css — login, shell (sidebar / topbar / navegação inferior),
   paleta de comandos, cabeçalho de página e painéis de TV.
   Usa os tokens de styles.css (com fallback). Carregado depois de
   styles.css e motion.css.
   ===================================================================== */
:root {
  --sh-ease: var(--ease-out, cubic-bezier(.2, .8, .2, 1));
  --sh-d1: var(--dur-1, 150ms);
  --sh-d2: var(--dur-2, 240ms);
  --sh-topbar: 56px;
  --sh-bnav: 64px;
  --sh-safe-b: env(safe-area-inset-bottom, 0px);
  --sh-glass: color-mix(in srgb, var(--ground, var(--paper, #EFF3F9)) 80%, transparent);
  --sh-deep: #0A0660;
  --sh-night: #070B1F;
}

/* ============================== LOGIN ============================== */
.login-split { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr; background: var(--ground, var(--paper)); }
.login-hero {
  position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background:
    radial-gradient(70% 60% at 85% 10%, rgba(0, 194, 245, .28), transparent 60%),
    radial-gradient(80% 70% at 0% 100%, rgba(61, 47, 212, .55), transparent 65%),
    linear-gradient(160deg, var(--blue-dark, #140A8C) 0%, var(--sh-deep) 55%, #05033A 100%);
}
.lh-scene { position: absolute; inset: 0; z-index: 0; }
.lh-copy { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; padding: 22px 20px 26px; }
.lh-logo { height: 30px; width: auto; align-self: flex-start; filter: brightness(0) invert(1); opacity: .95; }
.lh-title { font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; line-height: 1.08;
  font-size: clamp(22px, 6vw, 30px); max-width: 18ch; color: #fff; text-wrap: balance; }
.lh-sub, .lh-facts { display: none; }
.lh-sub { font-size: clamp(15px, 1.2vw, 17px); line-height: 1.6; color: rgba(255, 255, 255, .78); max-width: 44ch; }
.lh-facts { list-style: none; padding: 0; margin: 10px 0 0; flex-direction: column; gap: 12px; }
.lh-facts li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: rgba(255, 255, 255, .78); }
.lh-facts li b { color: #fff; font-weight: 700; }
.lh-facts svg { width: 20px; height: 20px; flex: none; color: var(--cyan, #00C2F5); stroke-width: 1.8; }

.login-split .login-wrap.login-pane { min-height: 0; background: var(--ground, var(--paper)); align-items: flex-start; padding: 20px 16px 32px; }
.login-split .login-card { margin: 0 auto; }
.login-split .login-logo { display: none; }   /* a marca já está no herói */

@media (min-width: 900px) {
  .login-split { grid-template-columns: minmax(0, 1.15fr) minmax(400px, .85fr); }
  .lh-copy { justify-content: center; min-height: 100vh; min-height: 100dvh; padding: clamp(40px, 6vw, 96px); gap: 20px; }
  .lh-logo { height: 40px; position: absolute; top: clamp(28px, 4vw, 48px); left: clamp(40px, 6vw, 96px); }
  .lh-title { font-size: clamp(36px, 3.8vw, 60px); max-width: 15ch; }
  .lh-sub { display: block; }
  .lh-facts { display: flex; }
  .login-split .login-wrap.login-pane { min-height: 100vh; min-height: 100dvh; align-items: center; padding: 40px clamp(24px, 4vw, 64px); }
  .login-split .login-card { box-shadow: none; border-color: transparent; background: transparent; }
}
/* CSS puro (sem 3D): um brilho lento no herói. */
.login-hero::after { content: ''; position: absolute; inset: -20%; z-index: 0; pointer-events: none;
  background: radial-gradient(40% 30% at 30% 40%, rgba(0, 194, 245, .14), transparent 70%);
  animation: lhDrift 18s ease-in-out infinite alternate; }
.login-hero:has(.scene3d-canvas)::after { display: none; }
@keyframes lhDrift { to { transform: translate3d(12%, 8%, 0); } }

.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 52px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px;
  display: grid; place-items: center; border-radius: var(--r-xs, 8px); background: transparent; color: var(--muted, #6B7280); }
.pw-toggle svg { width: 20px; height: 20px; }
.pw-toggle:hover, .pw-toggle.on { color: var(--blue); }
.login-err { margin: 2px 0 12px; padding: 10px 12px; border-radius: var(--r-sm, 10px); font-size: 13.5px; font-weight: 600;
  color: var(--danger, #C62828); background: color-mix(in srgb, var(--danger, #C62828) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger, #C62828) 25%, transparent); }
.login-err[hidden] { display: none; }
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff; animation: shSpin .7s linear infinite; }
@keyframes shSpin { to { transform: rotate(1turn); } }
.shake { animation: shShake .38s var(--sh-ease); }
@keyframes shShake { 15%, 55% { transform: translateX(-8px); } 35%, 75% { transform: translateX(8px); } 90% { transform: translateX(-2px); } }

/* ============================== SHELL ============================== */
.content { overflow: visible; overflow-x: clip; min-width: 0; }   /* deixa o cabeçalho "grudar" (sticky) */

/* Busca / paleta na barra lateral */
.sb-search { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 14px; padding: 9px 10px 9px 12px; min-height: 40px;
  border-radius: var(--r-sm, 10px); border: 1px solid var(--line, #E5E7EB); background: var(--surface-2, #F3F4F6);
  color: var(--muted, #6B7280); font-size: 13px; font-weight: 600; text-align: left;
  transition: border-color var(--sh-d1), background var(--sh-d1), color var(--sh-d1); }
.sb-search:hover { border-color: var(--blue-200, #B7AFE3); color: var(--ink, #111827); }
.sb-search svg { width: 16px; height: 16px; flex: none; }
.sb-search .sbs-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
kbd { font-family: var(--mono); font-size: 10.5px; font-weight: 600; padding: 2px 6px; border-radius: 5px; line-height: 1.4;
  border: 1px solid var(--line, #E5E7EB); background: var(--surface, #fff); color: var(--muted, #6B7280); box-shadow: 0 1px 0 var(--line, #E5E7EB); }

/* Indicador do item ativo (barra ciano) — migra de item em item na View Transition */
.nav a { position: relative; }
.nav a.active { box-shadow: none; }
.nav-ind { display: none; }
.nav a.active .nav-ind { display: block; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 3px;
  background: var(--cyan, #00C2F5); view-transition-name: nav-ind; }
.nav a:focus-visible { box-shadow: var(--ring); }
.nav-group-h[aria-expanded] { cursor: pointer; }
.side-foot .row-foot .icon-btn { flex: none; width: 42px; height: 42px; }
.side-foot .row-foot .icon-btn svg { width: 18px; height: 18px; }
.sb-grip, .sb-scrim { display: none; }

/* Desktop: recolher = trilho de ícones (não some de vez) */
@media (min-width: 821px) {
  .shell { transition: grid-template-columns var(--sh-d2) var(--sh-ease); }
  body.sb-collapsed .shell { grid-template-columns: 76px 1fr; }
  body.sb-collapsed #sb { display: flex; padding: 14px 10px; overflow-x: hidden; }
  body.sb-collapsed .sb-show { display: none; }
  body.sb-collapsed .content > .page-head { padding-left: 0; }
  body.sb-collapsed #sb .sb-top { justify-content: center; }
  body.sb-collapsed #sb .brand, body.sb-collapsed #sb .client-card, body.sb-collapsed #sb .mod-switch,
  body.sb-collapsed #sb .nav-group-h, body.sb-collapsed #sb .side-foot .u, body.sb-collapsed #sb .sf-mail,
  body.sb-collapsed #sb .sbs-t, body.sb-collapsed #sb .sb-search kbd, body.sb-collapsed #sb #logout span,
  body.sb-collapsed #sb .nav a span { display: none; }
  body.sb-collapsed #sb .nav-group-items { display: flex; }
  body.sb-collapsed #sb .nav-group + .nav-group { border-top: 1px solid var(--line, #E5E7EB); padding-top: 6px; margin-top: 4px; }
  body.sb-collapsed #sb .nav a { justify-content: center; padding: 11px 0; }
  body.sb-collapsed #sb .nav a::after { display: none; }
  body.sb-collapsed #sb .sb-search { justify-content: center; padding: 9px 0; }
  body.sb-collapsed #sb .row-foot { flex-direction: column; align-items: center; }
  body.sb-collapsed #sb #logout { width: 42px; height: 42px; padding: 0; justify-content: center; flex: none !important; }
}

/* Barra superior (celular) */
.topbar-mobile { align-items: center; gap: 8px; padding: 0 6px; height: var(--sh-topbar);
  background: var(--sh-glass); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line, #E5E7EB); z-index: 70; }
.topbar-mobile > button { width: 44px; height: 44px; border-radius: var(--r-sm, 10px); flex: none; color: var(--ink, #111827); }
.topbar-mobile > button svg { width: 22px; height: 22px; }
.topbar-mobile > button:active { background: var(--surface-2, #F3F4F6); }
.topbar-mobile .topbar-logo { height: 22px; width: auto; flex: none; }
.tb-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.tb-title b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title small { font-size: 11.5px; color: var(--muted, #6B7280); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Navegação inferior (celular) */
.bottom-nav { display: none; }
@media (max-width: 820px) {
  .bottom-nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 85;
    height: calc(var(--sh-bnav) + var(--sh-safe-b)); padding: 4px 4px var(--sh-safe-b);
    background: var(--sh-glass); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
    border-top: 1px solid var(--line, #E5E7EB); }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-width: 0; min-height: 56px; background: none; border: 0; color: var(--muted, #6B7280); text-decoration: none;
    font-size: 11px; font-weight: 700; letter-spacing: .01em; -webkit-tap-highlight-color: transparent; }
  .bottom-nav .bn-ic { position: relative; display: grid; place-items: center; width: 56px; height: 30px; }
  .bottom-nav .bn-ic svg { position: relative; z-index: 1; width: 22px; height: 22px; stroke-width: 1.8; }
  .bottom-nav .bn-t { max-width: 100%; padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bottom-nav .bn-ind { display: none; }
  .bottom-nav .active { color: var(--blue); }
  .bottom-nav .active .bn-ind { display: block; position: absolute; inset: 0; border-radius: 15px;
    background: var(--accent-soft, var(--blue-50, #ECEAF7)); view-transition-name: bn-ind; }
  .bottom-nav .bn-more.active .bn-ind { view-transition-name: none; }
  .bottom-nav [aria-expanded="true"] { color: var(--blue); }
  .content { padding-bottom: calc(var(--sh-bnav) + var(--sh-safe-b) + 24px); }

  /* Menu completo = folha que sobe de baixo (☰ ou "Mais") */
  .sidebar { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: auto;
    max-height: 86vh; max-height: 86dvh; z-index: 96; border-radius: 22px 22px 0 0; border-right: 0;
    padding: 6px 16px calc(18px + var(--sh-safe-b)); transform: translateY(105%);
    transition: transform var(--sh-d2) var(--sh-ease), visibility 0s linear var(--sh-d2); visibility: hidden; }
  .sidebar.open { transform: none; visibility: visible; transition: transform var(--sh-d2) var(--sh-ease); }
  .sb-grip { display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong, #D1D5DB); margin: 6px auto 10px; flex: none; }
  .sidebar .sb-top, .sidebar .brand { display: none; }
  .sb-scrim { display: block; position: fixed; inset: 0; z-index: 95; background: rgba(8, 10, 30, .45);
    opacity: 0; pointer-events: none; transition: opacity var(--sh-d2) var(--sh-ease); }
  .sheet-open .sb-scrim { opacity: 1; pointer-events: auto; }
  .sidebar .nav a { min-height: 48px; }
  .sidebar .sb-search { display: none; }    /* no celular a busca fica na barra superior */
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .sidebar.open, .sb-scrim, .shell { transition: none !important; }
  .login-hero::after, .shake, .btn.is-loading::before { animation: none !important; }
}

/* ======================= CABEÇALHO DA PÁGINA ======================= */
/* Fundo SÓLIDO (sem backdrop-filter): o vidro desfocado sobre a cena 3D animada deixava
   "fantasmas" do subtítulo e dos botões pintados ao rolar em algumas GPUs (Chrome/Windows
   com escala alta). isolation + contain mantêm a pintura do cabeçalho numa camada só. */
.page-head { position: sticky; top: 0; z-index: 30; isolation: isolate; }
.page-head::before { content: ''; position: absolute; z-index: -1; inset: -12px -32px -12px; pointer-events: none; opacity: 0;
  background: var(--paper, #EEF2F8); contain: paint;
  border-bottom: 1px solid var(--line, #E5E7EB); transition: opacity var(--sh-d2) var(--sh-ease); }
body.is-scrolled .page-head::before { opacity: 1; }
.page-head .ph-text { min-width: 0; }
.ph-actions { position: relative; display: flex; align-items: center; gap: 8px; }
.ph-more { display: none; }
@media (max-width: 820px) {
  .page-head { top: var(--sh-topbar); }
  .page-head::before { inset: -10px -16px -10px; }
}
@media (max-width: 600px) {
  .page-head:not(.ph-many) .ph-actions { width: 100%; }
  .page-head.ph-many { flex-direction: row; align-items: flex-end; flex-wrap: nowrap; }
  .page-head.ph-many .ph-text { flex: 1; }
  .page-head.ph-many .ph-more { display: inline-grid; width: 44px; height: 44px; }
  .page-head.ph-many .ph-more svg { width: 20px; height: 20px; }
  .page-head.ph-many .ph-actions > .row { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
    width: min(280px, calc(100vw - 32px)); flex-direction: column; align-items: stretch; gap: 6px; padding: 8px;
    background: var(--surface, #fff); border: 1px solid var(--line, #E5E7EB); border-radius: var(--r, 14px); box-shadow: var(--shadow-lg); }
  .page-head.ph-many .ph-actions.open > .row { display: flex; animation: shPop var(--sh-d1) var(--sh-ease); }
  .page-head.ph-many .ph-actions > .row > * { width: 100%; justify-content: flex-start; min-height: 46px; }
}
@media print { .page-head { position: static; } .bottom-nav, .topbar-mobile, .cmdk-bg { display: none !important; } }
@keyframes shPop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* ========================= PALETA DE COMANDOS ========================= */
.cmdk-bg { position: fixed; inset: 0; z-index: 300; background: rgba(8, 10, 30, .42); display: flex; justify-content: center;
  align-items: flex-start; padding: 12vh 12px 12px; animation: shFade var(--sh-d1) var(--sh-ease); }
.cmdk { width: min(640px, 100%); max-height: min(560px, 76vh); display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface, #fff); color: var(--ink, #111827); border: 1px solid var(--line, #E5E7EB); border-radius: var(--r-lg, 20px);
  box-shadow: 0 30px 80px -20px rgba(8, 10, 40, .45); animation: shPop var(--sh-d2) var(--sh-ease); }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-bottom: 1px solid var(--line, #E5E7EB); }
.cmdk-in svg { width: 19px; height: 19px; flex: none; color: var(--muted, #6B7280); }
.cmdk-in input { flex: 1; min-width: 0; min-height: 50px; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; font-size: 16px; }
.cmdk-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; overscroll-behavior: contain; }
.cmdk-g { padding: 10px 10px 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #6B7280); }
.cmdk-o { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 10px; border-radius: var(--r-sm, 10px); cursor: pointer; }
.cmdk-o[aria-selected="true"] { background: var(--accent-soft, var(--blue-50, #ECEAF7)); color: var(--blue); }
.cmdk-o .co-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: var(--surface-2, #F3F4F6); color: var(--muted, #6B7280); }
.cmdk-o[aria-selected="true"] .co-ic { background: var(--surface, #fff); color: var(--blue); }
.cmdk-o .co-ic svg { width: 17px; height: 17px; }
.cmdk-o .co-t { flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-o .co-h { font-size: 12px; color: var(--muted, #6B7280); white-space: nowrap; }
.cmdk-o.current .co-h { color: var(--cyan-deep, #0092C7); font-weight: 700; }
.cmdk-empty { padding: 26px 12px; text-align: center; color: var(--muted, #6B7280); font-size: 14px; }
.cmdk-foot { display: flex; gap: 16px; padding: 9px 14px; border-top: 1px solid var(--line, #E5E7EB); font-size: 12px; color: var(--muted, #6B7280); }
.cmdk-foot kbd { margin-right: 3px; }
@media (max-width: 600px) { .cmdk-bg { padding-top: 8px; } .cmdk { max-height: 82vh; } .cmdk-foot { display: none; } }
@keyframes shFade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cmdk-bg, .cmdk, .page-head.ph-many .ph-actions.open > .row { animation: none; } }

/* ======================= DASHBOARD / INDICADORES ======================= */
.dash .stat .v .kpi-num { font-variant-numeric: tabular-nums; }
.dash .stat[role="button"] { cursor: pointer; }
.dash .stat[role="button"]:focus-visible { box-shadow: var(--ring); }
.dash .coverage .cov-pct { font-variant-numeric: tabular-nums; }
.dash [aria-busy="true"], .dash[aria-busy="true"] { cursor: progress; }
.dash .bar i { transition: width .8s var(--sh-ease); }

/* ============================ PAINÉIS DE TV ============================ */
/* No tema escuro, remapeia os tokens só dentro do painel; no claro ele segue o sistema. */
@property --pct { syntax: '<number>'; inherits: true; initial-value: 0; }
[data-theme="dark"] .tv-panel {
  --white: #0E1430; --gray-50: rgba(255, 255, 255, .045); --gray-100: rgba(255, 255, 255, .08); --gray-150: rgba(255, 255, 255, .1);
  --gray-200: rgba(255, 255, 255, .12); --gray-300: #353E63; --gray-400: #7E88AE; --gray-500: #A3ACCB; --gray-600: #BCC3DC;
  --gray-700: #D3D8EA; --gray-900: #E9ECF8; --gray-950: #FFFFFF;
  color: #E9ECF8; border-color: rgba(255, 255, 255, .08);
  background:
    radial-gradient(90% 70% at 0% 0%, rgba(27, 13, 174, .38), transparent 60%),
    radial-gradient(80% 60% at 100% 100%, rgba(0, 194, 245, .12), transparent 60%),
    var(--sh-night);
}
.tv-panel .wall-overall, .tv-panel .wt-card { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tv-panel .wall-overall .wall-logo { background: #fff; }
.tv-panel .wo-ring, .tv-panel .wt-ring { transition: --pct 1s var(--sh-ease); }
.tv-panel .wo-bar i { transition: width .9s var(--sh-ease), background-color .6s; }
/* Mudou o status → a cor desliza (sem re-piscar a tela inteira) */
.tv-panel .wall-cell, .tv-panel .wc-cell { transition: background-color .7s var(--sh-ease), color .4s, box-shadow .4s; }
[data-theme="dark"] .tv-panel .wall-cell { text-shadow: 0 1px 2px rgba(0, 0, 0, .28); }
[data-theme="dark"] .tv-panel .wall-setor .ws-count { background: rgba(255, 255, 255, .1); }
[data-theme="dark"] .tv-panel .ws-chamado { background: rgba(232, 89, 12, .2); color: #FF9A5C; }
[data-theme="dark"] .tv-panel .wall-setor.has-chamado h4 { color: #FF9A5C; }
[data-theme="dark"] .tv-panel .wall-updated:not(.stale) { color: rgba(233, 236, 248, .6); background: transparent; }
/* Legível a 5 m: quiosque/tela cheia aumentam rótulos e legenda */
.tv-panel:fullscreen .wall-legend, .tv-panel.kiosk .wall-legend { font-size: 20px; gap: 28px; }
.tv-panel:fullscreen .wall-legend .wl i, .tv-panel.kiosk .wall-legend .wl i { width: 20px; height: 20px; }
.tv-panel:fullscreen .wall-setor h4, .tv-panel.kiosk .wall-setor h4 { font-size: 18px; }
[data-theme="dark"] .tv-panel:fullscreen .wall-setor h4, [data-theme="dark"] .tv-panel.kiosk .wall-setor h4 { color: #fff; }
.tv-panel:fullscreen .wo-lbl, .tv-panel.kiosk .wo-lbl { font-size: 20px; }
.tv-panel:fullscreen .wo-sub, .tv-panel.kiosk .wo-sub { font-size: 20px; }
.tv-panel:fullscreen .wash-legend .wl, .tv-panel.kiosk .wash-legend .wl { font-size: 16px; }
/* Relógio do painel */
.wall-clock { position: absolute; left: 16px; bottom: 6px; z-index: 2; font-family: var(--mono); font-weight: 600; font-size: 13px;
  letter-spacing: .02em; color: var(--muted); font-variant-numeric: tabular-nums; pointer-events: none; }
[data-theme="dark"] .wall-clock { color: rgba(233, 236, 248, .7); }
.tv-panel:fullscreen .wall-clock, .tv-panel.kiosk .wall-clock { font-size: 22px; bottom: 8px; }
.tv-panel .wall-updated { z-index: 2; }
@media (prefers-reduced-motion: reduce) {
  .tv-panel .wall-cell, .tv-panel .wc-cell, .tv-panel .wo-ring, .tv-panel .wt-ring, .tv-panel .wo-bar i, .dash .bar i { transition: none; }
}

/* Ações do cabeçalho: no desktop ficam lado a lado (o flex:0 antigo as empilhava). */
.ph-actions > .row { flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; }
/* Código do leito/local não quebra no meio ("Q022-" / "A") nas tabelas do celular. */
.table-wrap td:first-child, .table-wrap th:first-child { white-space: nowrap; }
/* Coluna de ações com vários ícones: ficam em linha (rolagem horizontal da tabela), sem empilhar. */
.table-wrap td:has(> .icon-btn), .table-wrap td:has(> .btn.sm) { white-space: nowrap; }
/* Painel sem nenhum local no recorte (estação recém-criada). */
.wall-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: clamp(32px, 8vh, 96px) 16px;
  color: var(--muted); text-align: center; font-size: clamp(16px, 1.4vw, 28px); }
.wall-empty svg { width: 2.4em; height: 2.4em; opacity: .6; }
.wall-empty b { color: var(--ink); }

/* ============================== ACESSO DA COLABORADORA (fase 3 · access) ==============================
   Login lembrado no aparelho, crachá com QR, 1º acesso guiado, conta no app de campo e a
   comemoração do sucesso. Alvos de toque ≥56px (luvas, pressa). */
.op-login .login-brand { margin-bottom: 18px; }
.known-grid { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.known-item { position: relative; transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.known-item.kn-out { opacity: 0; transform: scale(.92); }
.known-tile { width: 100%; min-height: 132px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 16px 10px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); cursor: pointer; text-align: center; box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), transform var(--dur-1) var(--ease-out); }
.known-tile:hover { border-color: var(--blue-200); box-shadow: var(--shadow-md); }
.known-tile:active { transform: scale(.97); }
.known-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.kn-av { --kn-h: 240; width: 56px; height: 56px; border-radius: 50%; flex: none; display: inline-grid; place-items: center;
  font: 600 24px/1 var(--serif); color: #fff; letter-spacing: -.02em;
  background: radial-gradient(120% 120% at 30% 20%, hsl(var(--kn-h) 80% 62%), hsl(var(--kn-h) 78% 38%));
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14), 0 4px 12px -4px hsl(var(--kn-h) 80% 35% / .55); }
.kn-av.big { width: 64px; height: 64px; font-size: 28px; }
.kn-av svg { width: 24px; height: 24px; }
.kn-plus { background: var(--surface-2); color: var(--blue); box-shadow: inset 0 0 0 2px var(--line); }
.kn-nm { font-weight: 700; font-size: 17px; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kn-re { font: 500 12.5px/1.2 var(--mono); color: var(--muted); }
.kn-other .kn-re { font-family: var(--sans); }
.kn-del { position: absolute; top: -6px; right: -6px; width: 36px; height: 36px; border-radius: 50%; display: none; place-items: center;
  background: var(--danger-solid); color: #fff; border: 2px solid var(--surface); box-shadow: var(--shadow-sm); cursor: pointer; }
.kn-del svg { width: 16px; height: 16px; }
.known-grid.managing .kn-del { display: grid; animation: knPop var(--dur-2) var(--ease-out); }
.known-grid.managing .known-tile[data-id] { border-style: dashed; }
.known-grid.managing .kn-other { opacity: .4; pointer-events: none; }
@keyframes knPop { from { transform: scale(.4); opacity: 0; } }
.op-login .btn.big { min-height: 56px; font-size: 16.5px; }
.badge-cta svg { width: 22px; height: 22px; }
.op-login .link-btn, .acct-sheet .link-btn { display: block; margin: 14px auto 0; min-height: 44px; padding: 8px 12px; background: none; border: 0;
  color: var(--muted); font: 600 13.5px var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.op-login .link-btn:hover, .acct-sheet .link-btn:hover { color: var(--blue); }
.or-sep { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--faint); font-size: 12.5px; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.op-hint { margin-top: 16px; text-align: center; line-height: 1.5; }
.who-card { display: flex; align-items: center; gap: 14px; margin: 6px 0 20px; }
.who-hi { font: 600 clamp(22px, 1.2rem + .6vw, 27px)/1.15 var(--serif); color: var(--ink); letter-spacing: -.02em; margin: 0; }
.who-re { margin-top: 3px; color: var(--muted); font-size: var(--fs-sm); }
.kbd-toggle { margin-top: 6px; min-height: 40px; padding: 6px 2px; background: none; border: 0; color: var(--blue); font: 500 13px var(--sans); cursor: pointer; }
.kbd-toggle b { font-family: var(--mono); font-weight: 600; }
.login-err.is-inactive { color: var(--warning-strong); background: var(--warning-bg); border-color: var(--warning-border); }
.login-err.is-blocked .num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 1.1em; }
/* crachá: câmera */
.badge-scanbox { margin: 0 0 12px; aspect-ratio: 1 / 1; max-height: 56vh; }
.badge-scanbox .qr-scan { width: 100%; height: 100%; max-height: none; }
.badge-scanbox .fx-scan-frame { inset: 16%; }
.scan-status { min-height: 1.4em; margin: 0 0 12px; text-align: center; color: var(--muted); font-size: 14px; }
.op-scan .btn { margin-top: 8px; }
.op-scan.is-busy .badge-scanbox { opacity: .55; transition: opacity var(--dur-2) var(--ease-out); }
/* 1º acesso guiado */
.fa-steps { list-style: none; display: flex; gap: 6px; margin: 0 0 18px; padding: 0; }
.fa-steps li { flex: 1; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--r-pill); background: var(--surface-2);
  color: var(--muted); font-size: 12.5px; font-weight: 600; transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }
.fa-steps li span { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface); font: 600 11px var(--mono); }
.fa-steps li.on { background: var(--blue-50); color: var(--blue); }
.fa-steps li.on span { background: var(--brand-solid); color: #fff; }
.pw-meter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 8px; }
.pw-meter i { height: 5px; border-radius: 3px; background: var(--gray-150); transition: background var(--dur-2) var(--ease-out); }
.pw-meter[data-lvl="1"] i:nth-child(-n+1) { background: var(--warning-solid); }
.pw-meter[data-lvl="2"] i:nth-child(-n+2) { background: var(--cyan-deep); }
.pw-meter[data-lvl="3"] i { background: var(--success-solid); }
.pw-meter.bad i:first-child { background: var(--danger-solid); }
.pw-tip { margin: 6px 0 0; min-height: 1.3em; font-size: 13px; color: var(--muted); }
.pw-tip.bad { color: var(--danger); font-weight: 600; }
.pw-match { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: transparent; transition: background var(--dur-2) var(--ease-out); }
.pw-match.ok { background: var(--success-solid); }
.pw-match svg { width: 15px; height: 15px; }
.first-access .btn.ghost.block { margin-top: 8px; }
/* app de campo: conta (trocar de colaboradora / sair) */
.op-head .op-account { display: flex !important; align-items: center; gap: 8px; min-height: 48px; padding: 4px 10px 4px 4px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-align: left;
  transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.op-head .op-account:hover { border-color: var(--blue-200); box-shadow: var(--shadow-sm); }
.op-head .op-account:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.op-account .kn-av, .op-account .avatar { width: 38px; height: 38px; font-size: 17px; }
.op-account .oa-txt { display: flex; flex-direction: column; min-width: 0; }
.op-account .onm, .op-account .ocg { display: block !important; }
.op-account .ocg { color: var(--blue); font-weight: 600; }
.op-account .oa-chev { display: grid; color: var(--muted); transform: rotate(90deg); }
.op-account .oa-chev svg { width: 16px; height: 16px; }
@media (max-width: 520px) { .op-account .oa-txt, .op-account .oa-chev { display: none !important; } .op-head .op-account { padding: 4px; } }
.modal-acct .who-card { margin-top: 0; }
.modal-acct h3.who-hi { font-size: var(--fs-lg); }
.modal-acct .avatar.big { width: 64px; height: 64px; }
.acct-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; padding: 12px; border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--ink); font-size: 13.5px; line-height: 1.45; }
.acct-note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--blue); }
.acct-note.warn { background: var(--warning-bg); color: var(--warning-strong); }
.acct-note.warn svg { color: var(--warning); }
.acct-acts { display: grid; gap: 8px; }
.acct-opt { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 12px 14px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer;
  transition: border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out); }
.acct-opt:hover { border-color: var(--blue-200); background: var(--blue-50); }
.acct-opt > svg { width: 22px; height: 22px; flex: none; color: var(--blue); }
.acct-opt span { display: flex; flex-direction: column; gap: 2px; }
.acct-opt b { font-size: 15.5px; }
.acct-opt small { color: var(--muted); font-size: 12.5px; }
.acct-opt.is-loading { opacity: .6; pointer-events: none; }
/* sucesso do campo: palco da comemoração 3D (Scene3D 'success') atrás do check */
.fx-done-mark { position: relative; isolation: isolate; }
.fx-done-burst { position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; transform: translate(-50%, -50%); z-index: -1; pointer-events: none; }
.fx-done-burst canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
@media (prefers-reduced-motion: reduce) {
  .known-tile, .known-item, .fa-steps li, .pw-meter i, .pw-match { transition: none; }
  .known-grid.managing .kn-del { animation: none; }
}
.modal-acct h3.who-hi { margin: 0; }
