/*
 * Pixel Provider — o painel do provedor e a tela de entrada.
 *
 * Na família do Pixel Food, do Pixel Barber e do Pixel Jury: cartão branco
 * sobre o fundo do provedor, trilha funda de ícones, item ativo na cor de ação
 * da casa com letra branca. A tela que abre é o painel do dia (escolha 1 A, do
 * Kayo, em 20/10/2026) e a ficha do assinante é a linha do tempo (escolha 2 B)
 * — as duas desenhadas na proposta.
 *
 * A marca do Pixel Provider (o laranja da Pixel Tech) aparece só na entrada,
 * onde ainda não se sabe de que provedor é a pessoa. Os tons --pp-* são os
 * mesmos do public/brand/theme.json, e o teste do tema confere
 * (tests/theme.test.ts).
 *
 * Vermelho, verde e âmbar são estado: offline, em dia, esperando. Cheios, com
 * letra branca; nunca viram cor de provedor. Nada tem cara de navegador:
 * confirmação, lista, calendário, sugestões, área de soltar a foto e olho da
 * senha são do produto (panel.js).
 */

@font-face { font-family: "Manrope"; src: url("fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  /* A marca do Pixel Provider (theme.json): o laranja da Pixel Tech. */
  --pp-orange: #fc7a00;
  /* Letra branca no laranja, sempre (pedido do Kayo, 19/10/2026). */
  --pp-on-orange: #ffffff;
  --pp-ink: #1b2230;
  --pp-soft: #5d6676;
  --pp-subtle: #f2f3f5;
  --pp-card: #ffffff;

  /* Estado. */
  --ok: #2b8a3e;
  --bad: #e03131;
  --bad-deep: #c92a2a;
  --bill: #b86400;

  /* Neutros do painel. */
  --ink: #1d2739;
  --soft: #6d7789;
  --line: #e9edf2;
  --sunken: #f4f6f9;
  --side: #f6f7f8;
  --card: #ffffff;

  /* Sem provedor (entrada), a paleta Maré. */
  --t-primary: #0f5e63; --t-deep: #0b2e33; --t-action: #0d7c80; --t-hi: #f2c14e; --t-hi-ink: #2b1d00;
  --t-bg: #ffffff; --t-sand: #eef3f3; --t-ink: #172427; --t-soft: #5b6a6d; --t-line: #dfe8e8; --t-panel: #e1e8e8;
  --t-tint: #e8f4f3; --t-logo-bg: #f2c14e; --t-logo-fg: #0b2e33;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: "Manrope", "Segoe UI", system-ui, sans-serif; color: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h6, p { margin: 0; }
/* Sem o sublinhado do navegador (pedido do Kayo no Pixel Wash, 20/10/2026): na
   lista a linha inteira acende; o link solto no texto vai na cor do provedor,
   em negrito. */
a { color: inherit; text-decoration: none; }
p a, .field-hint a, .p-soft a, .p-note a { color: var(--t-action); font-weight: 800; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--t-action); outline-offset: 2px; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tnum { font-variant-numeric: tabular-nums; }

/* Aviso cheio, letra branca. */
.notice { border-radius: 12px; padding: 11px 14px; font-size: 13.5px; font-weight: 700; color: #fff; }
.notice-ok { background: var(--ok); }
.notice-error { background: var(--bad); }

/* ------------------------------------------------------------ entrada */

.e-page { min-height: 100vh; background: #e8eaed; display: grid; place-items: center; padding: 24px 16px; }
/* O fundo branco é do lado do formulário, e não da moldura, para não vazar no
   canto da arte escura. */
.e-frame { width: min(980px, 100%); min-height: 600px; background: transparent; border-radius: 30px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; box-shadow: 0 1px 2px rgb(22 32 50 / 5%), 0 18px 50px rgb(22 32 50 / 12%); }
.e-side { padding: 44px 48px; display: flex; flex-direction: column; gap: 16px; background: var(--pp-card); }
.e-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; color: var(--pp-ink); }
.e-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--pp-orange); display: grid; place-items: center; }
.e-mark svg { width: 24px; height: 24px; fill: #fff; }
.e-title { font-size: 30px; line-height: 1.12; font-weight: 500; color: var(--pp-ink); margin-top: 28px; text-wrap: balance; }
.e-title b { font-weight: 800; }
.e-lead { color: var(--pp-soft); font-size: 15px; line-height: 1.5; }
.e-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.e-button { display: block; width: 100%; text-align: center; text-decoration: none; border: 0; border-radius: 14px; padding: 14px 18px; font-weight: 800; font-size: 15px; background: var(--pp-orange); color: var(--pp-on-orange); margin-top: 4px; }
.e-button.e-flat { background: var(--pp-subtle); color: var(--pp-ink); }
.e-side form + form, .e-side a + form { margin-top: 0; }
.e-foot { margin-top: auto; padding-top: 24px; font-size: 12.5px; color: var(--pp-soft); line-height: 1.6; }
.e-foot b { color: var(--pp-ink); }
.e-art { position: relative; background: #1b1f24; overflow: hidden; }
.e-p { position: absolute; width: 520px; height: 470px; right: -120px; bottom: -80px; fill: var(--pp-orange); opacity: .95; }
.e-card { position: absolute; background: #fff; border-radius: 18px; padding: 14px 16px; width: 260px; box-shadow: 0 18px 40px rgb(0 0 0 / .3); display: flex; flex-direction: column; gap: 4px; }
.e-card small { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #c55a00; }
.e-card b { font-size: 14.5px; line-height: 1.35; color: var(--pp-ink); }
.e-card-1 { left: 36px; top: 54px; }
.e-card-2 { left: 70px; top: 170px; }
.e-card-3 { left: 30px; top: 286px; }
@media (max-width: 820px) {
  .e-frame { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .e-art { display: none; }
  .e-side { padding: 32px 24px; }
}

/* O rótulo mora dentro do campo e sobe quando se digita. */
.field-float { position: relative; }
.field-float input { width: 100%; height: 58px; border: 1.5px solid #dfe3e9; border-radius: 14px; padding: 22px 16px 6px; font-size: 15.5px; background: #fff; outline: 0; }
.field-float input:focus { border-color: var(--pp-orange); }
.field-float label { position: absolute; left: 17px; top: 19px; font-size: 15px; color: var(--pp-soft); pointer-events: none; transition: top .12s ease, font-size .12s ease; }
.field-float input:focus + label, .field-float input:not(:placeholder-shown) + label { top: 8px; font-size: 11.5px; font-weight: 700; }
.field-float .eye { position: absolute; right: 8px; top: 9px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--pp-soft); display: grid; place-items: center; }
.field-float input[type="password"]::-ms-reveal { display: none; }
.field-hint { font-size: 12.5px; color: var(--soft); }
.field-hint a { font-weight: 700; }
.field-error { font-size: 12.5px; color: var(--bad); font-weight: 700; }

/* ------------------------------------------------------------- painel */

.p-page { background: var(--t-panel); min-height: 100vh; }
.p { padding: 14px; height: 100vh; display: flex; }
/* O cartão não pinta fundo: cada parte pinta o seu. Branco atrás da trilha escura
   vazava no canto arredondado como um fio claro (visto no programa de mesa). */
.p-card { flex: 1; min-width: 0; background: transparent; border-radius: 26px; display: flex; overflow: hidden; position: relative; box-shadow: 0 1px 2px rgb(22 32 50 / 5%), 0 10px 30px rgb(22 32 50 / 7%); }
.p-rail { width: 92px; background: var(--t-deep); color: rgb(255 255 255 / .74); display: flex; flex-direction: column; align-items: center; padding: 16px 0; gap: 3px; flex: none; overflow-y: auto; scrollbar-width: none; }
.p-rail::-webkit-scrollbar { display: none; }
.logo { width: 48px; height: 48px; border-radius: 50%; background: var(--t-logo-bg); color: var(--t-logo-fg); display: grid; place-items: center; flex: none; overflow: hidden; }
.logo b { font: 900 15px/1 "Figtree", sans-serif; letter-spacing: .02em; }
.logo.has-img { background: #fff; }
.logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-rail > .logo { margin-bottom: 12px; box-shadow: 0 0 0 3px rgb(255 255 255 / .14); }
.p-nav { border: 0; background: transparent; color: inherit; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 700 10.5px "Manrope", sans-serif; padding: 9px 2px; width: 76px; border-radius: 15px; position: relative; flex: none; text-align: center; }
.p-nav:hover { color: #fff; background: rgb(255 255 255 / .08); }
.p-nav.on { background: var(--t-action); color: #fff; }
/* No item selecionado o aviso inverte: bola branca, número na cor da casa. */
.p-nav.on .count { background: #fff; color: var(--t-action); }
.p-nav .count { position: absolute; top: 4px; right: 10px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--bad); color: #fff; font: 800 10.5px/18px "Manrope", sans-serif; padding: 0 5px; }
.p-rail .spacer { flex: 1; min-height: 8px; }
.p-out { margin: 0; }
.p-made { display: flex; flex-direction: column; align-items: center; gap: 4px; font: 700 9px "Manrope", sans-serif; color: rgb(255 255 255 / .55); letter-spacing: .04em; margin-top: 6px; }
.p-made svg { width: 18px; height: 18px; fill: var(--pp-orange); }
.p-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--card); }
/* A aba no meio da borda da trilha, na cor do próprio menu (o jeito que o Kayo
   escolheu no Pixel Food): recolhe o menu para só os ícones e expande de volta.
   Com mouse, só aparece com ele em cima; em tela de toque fica sempre. */
.p-rail-toggle { position: absolute; top: 50%; left: 92px; z-index: 5; transform: translateY(-50%); width: 14px; height: 44px; padding: 0; border: 0; border-radius: 0 9px 9px 0; background: var(--t-deep); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: left .32s cubic-bezier(.4, 0, .2, 1), transform .2s ease, opacity .2s ease, background-color .15s; }
.p-rail-toggle:hover { background: var(--t-primary); }
.p-rail-toggle svg.i { width: 14px; height: 14px; stroke-width: 2.6; transform: rotate(-90deg); }
@media (hover: hover) {
  .p-rail-toggle { opacity: 0; transform: translate(-6px, -50%); }
  .p-rail:hover ~ .p-rail-toggle, .p-rail-toggle:hover, .p-rail-toggle:focus-visible { opacity: 1; transform: translateY(-50%); }
}
.p-rail, .p-nav, .p-rail > .logo, .p-rail-toggle svg.i, .p-nav .count { transition: width .32s cubic-bezier(.4, 0, .2, 1), height .32s cubic-bezier(.4, 0, .2, 1), gap .32s cubic-bezier(.4, 0, .2, 1), left .32s cubic-bezier(.4, 0, .2, 1), right .32s cubic-bezier(.4, 0, .2, 1), transform .32s cubic-bezier(.4, 0, .2, 1), background-color .15s; }
.p-nav .lbl, .p-made .lbl { display: block; max-width: 100%; max-height: 16px; overflow: hidden; white-space: nowrap; transition: opacity .2s ease .14s, max-height .32s cubic-bezier(.4, 0, .2, 1); }
@media (min-width: 861px) {
  .rail-closed .p-rail { width: 64px; }
  .rail-closed .p-nav { width: 48px; gap: 0; }
  .rail-closed .p-nav .lbl, .rail-closed .p-made .lbl { opacity: 0; max-height: 0; transition: opacity .12s ease, max-height .32s cubic-bezier(.4, 0, .2, 1); }
  .rail-closed .p-nav .count { right: 1px; top: 1px; }
  .rail-closed .p-rail > .logo { width: 40px; height: 40px; }
  .rail-closed .p-rail-toggle { left: 64px; }
  .rail-closed .p-rail-toggle svg.i { transform: rotate(90deg); }
}
.p-band { background: var(--bill); color: #fff; font-weight: 700; font-size: 13.5px; padding: 10px 22px; }
.p-band a { color: #fff; font-weight: 800; }
.p-head { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; flex: none; }
.p-head-title { min-width: 0; }
.p-head h1 { font-size: 20px; font-weight: 800; }
.p-head p { font-size: 12.5px; color: var(--soft); margin-top: 2px; }
.p-head form { margin: 0; }
.p-head .stats { display: flex; gap: 8px; margin-left: auto; }
.p-head .stats + form, .p-head .stats + .btn-act { margin-left: 0; }
.p-user { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.p-head .stats ~ .p-user, .p-head .btn-act ~ .p-user, .p-head .p-btn ~ .p-user, .p-head form ~ .p-user, .p-head .push ~ .p-user { margin-left: 4px; }
.p-user small { display: block; font-weight: 500; color: var(--soft); font-size: 11.5px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--t-deep); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; flex: none; }
.p-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; position: relative; }
.p-body > .notice { margin: 14px 22px 0; }
.p-body.flush { display: flex; flex-direction: column; }
.p-body.flush > .p-region { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.p-body.flush > .notice { margin: 10px 22px; }
.p-pad { padding: 16px 22px 26px; display: flex; flex-direction: column; gap: 14px; }
.p-pad.narrow { max-width: 920px; }
.push { margin-left: auto; }

.stats .st { background: var(--sunken); border-radius: 12px; padding: 5px 11px; }
.stats .st span { display: block; font-size: 10.5px; font-weight: 600; color: var(--soft); white-space: nowrap; }
.stats .st b { font-size: 14.5px; font-weight: 800; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; }
.stats .st b svg.i { width: 16px; height: 16px; }
.stats .st.red { background: var(--bad); color: #fff; }
.stats .st.red span { color: #fff; }
/* A busca do cabeçalho do painel do dia. */
.head-search { flex: 0 1 300px; }
.head-search label { max-width: none; background: var(--sunken); border-color: var(--sunken); }
.head-search input { background: transparent; font-size: 13px; padding: 8px 0; }

/* Botões */
.p-btn { border: 0; border-radius: 10px; padding: 8px 12px; font: 800 12.5px "Manrope", sans-serif; background: var(--t-primary); color: #fff; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.p-btn svg.i { width: 16px; height: 16px; }
.p-btn.ghost { background: var(--sunken); color: var(--ink); }
.p-btn.big { padding: 11px 16px; font-size: 13.5px; border-radius: 12px; }
.p-btn.wide { width: 100%; padding-block: 14px; font-size: 14.5px; }
.p-btn.danger { background: var(--bad); color: #fff; }
.p-btn.danger-text { color: var(--bad-deep); }
.p-btn.act, .btn-act { background: var(--t-action); color: #fff; }
.p-btn:disabled { opacity: .6; cursor: default; }
.btn-act { border: 0; border-radius: 11px; padding: 9px 13px; font: 800 12.5px "Manrope", sans-serif; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; text-decoration: none; cursor: pointer; }
.btn-act svg.i { width: 16px; height: 16px; stroke-width: 2.4; }
.b-sm { border: 0; border-radius: 9px; padding: 6px 10px; font: 800 12px "Manrope", sans-serif; background: var(--sunken); color: var(--ink); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; cursor: pointer; }
.b-sm svg.i { width: 14px; height: 14px; }
.b-sm.go { background: var(--t-primary); color: #fff; }
.b-sm.act { background: var(--t-action); color: #fff; }
.b-sm.danger-text { color: var(--bad-deep); }
.b-sm:disabled { opacity: .6; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--sunken); color: var(--ink); display: inline-grid; place-items: center; text-decoration: none; flex: none; }
.icon-btn svg.i { width: 17px; height: 17px; }
.btnrow { display: flex; gap: 6px; align-items: center; }
.btnrow.wrap { flex-wrap: wrap; }
.btnrow form { margin: 0; }

.p-title { font-size: 14px; font-weight: 800; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.p-title small { font-size: 11.5px; font-weight: 600; color: var(--soft); }
.p-soft { color: var(--soft); font-size: 12.5px; }
.p-note { background: var(--sunken); border-radius: 14px; padding: 11px 14px; font-size: 13px; line-height: 1.5; color: #3b4556; display: flex; gap: 8px; align-items: flex-start; }
.p-note svg.i { width: 17px; height: 17px; color: var(--bill); margin-top: 1px; }
.p-empty { background: #fff; border: 1px dashed #d8dee6; border-radius: 16px; padding: 16px; text-align: center; font-size: 13px; color: var(--soft); font-weight: 600; }
.p-empty a { font-weight: 800; color: var(--t-action); }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800; border-radius: 6px; padding: 2px 7px; background: var(--t-primary); color: #fff; vertical-align: 2px; margin-left: 4px; }
.pill.soft { background: var(--sunken); color: var(--soft); }
.pill.wait { background: var(--bill); color: #fff; }
.pill.done, .pill.ok { background: var(--ok); color: #fff; }
.pill.bad { background: var(--bad); color: #fff; }
.p-box { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.p-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.p-col-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.p-created { background: var(--ok); color: #fff; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.p-created code { background: #fff; color: var(--ink); border-radius: 8px; padding: 3px 8px; font-size: 15px; font-weight: 800; letter-spacing: .04em; }
.p-created .p-btn { vertical-align: middle; }
.copy-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-line input { flex: 1 1 260px; width: auto; background: var(--sunken); border: 1.5px solid #dfe3e9; border-radius: 12px; padding: 10px 12px; font-size: 13.5px; outline: 0; }
.p-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #ffd8d8; background: #fff8f8; border-radius: 16px; padding: 14px 16px; margin: 6px 0 0; }
.p-danger-zone.flat { margin: 0; }
.p-danger-zone b { display: block; font-size: 13.5px; }
.p-danger-zone span { font-size: 12.5px; color: var(--soft); }
.fd-h { font: 800 11.5px "Manrope", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.fd-h small { letter-spacing: 0; text-transform: none; font-weight: 700; font-size: 12px; background: var(--sunken); border-radius: 8px; padding: 1px 7px; }
.fd-h .chips { margin-left: auto; letter-spacing: 0; text-transform: none; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; font-weight: 600; color: var(--soft); text-decoration: none; }
.kv b { color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; display: inline-flex; align-items: center; gap: 4px; font-weight: 800; min-width: 0; overflow-wrap: anywhere; }
.kv b a { color: var(--t-action); }
.kv b svg.i { width: 14px; height: 14px; color: var(--soft); }
.kv.link:hover b { color: var(--t-action); }
.bar { height: 7px; border-radius: 99px; background: #eef1f5; overflow: hidden; display: block; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--ok); }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; font: 700 12.5px "Manrope", sans-serif; text-decoration: none; color: var(--ink); background: #fff; }
.chip.plain { padding: 6px 13px; }
.chip.on { background: var(--t-primary); border-color: var(--t-primary); color: #fff; }
.chip b { font-weight: 800; font-size: 11.5px; opacity: .7; }
.mg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* As abas de uma seção (Financeiro, Rede, Notas, Relatórios, Ajustes). */
.tabs { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--line); background: #fff; overflow-x: auto; scrollbar-width: none; position: sticky; top: 0; z-index: 4; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 12px 12px 11px; font: 800 13px "Manrope", sans-serif; color: var(--soft); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--ink); }
.tab i { font-style: normal; font: 800 10.5px "Manrope", sans-serif; background: var(--bad); color: #fff; border-radius: 7px; padding: 1px 6px; }
.tab.on { color: var(--ink); border-bottom-color: var(--t-action); }

/* A tabela simples (Anatel, registros de conexão, o que a equipe fez). */
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; background: #fff; }
.tbl th { text-align: left; font: 800 10.5px "Manrope", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); padding: 0 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-weight: 600; }
.tbl td small { display: block; color: var(--soft); font-weight: 600; font-size: 11.5px; }
.tbl td a { color: var(--t-action); font-weight: 800; }
.tbl .right { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }

/* Formulários */
.p-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field-label-static { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.field input, .field textarea, .field select, .p-inline input, .p-inline select, .p-search input {
  width: 100%; border: 1.5px solid #dfe3e9; border-radius: 12px; padding: 10px 12px; font-size: 14px; background: #fff; outline: 0;
}
.field input:focus, .field textarea:focus, .p-inline input:focus, .p-search input:focus { border-color: var(--t-primary); }
.field textarea { resize: vertical; min-height: 64px; line-height: 1.45; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-actions form { margin: 0; }
.form-actions.sticky { position: sticky; bottom: 0; background: #fff; padding: 12px 0; border-top: 1px solid var(--line); }
.p-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--sunken); border-radius: 16px; padding: 10px; margin: 0; }
.p-inline input, .p-inline select { flex: 1 1 140px; width: auto; padding: 9px 12px; font-size: 13.5px; }
.p-inline .sel, .p-inline .date-wrap { flex: 0 1 190px; }
.p-search { margin: 0; flex: 1 1 320px; }
.p-search label { display: flex; align-items: center; gap: 8px; max-width: 440px; border: 1.5px solid #dfe3e9; border-radius: 12px; padding: 0 12px; background: #fff; color: var(--soft); }
.p-search label svg.i { width: 18px; height: 18px; }
.p-search input { border: 0; padding: 10px 0; }
.p-search input::-webkit-search-cancel-button { display: none; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; }
.check-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; position: relative; font-size: 12.5px; color: var(--soft); cursor: pointer; }
.check-row b { display: block; color: var(--ink); font-size: 13px; }
.check-row input { position: absolute; left: 0; top: 0; width: 22px; height: 22px; opacity: 0; margin: 0; cursor: pointer; }
.check-row i { width: 22px; height: 22px; border-radius: 7px; border: 2px solid #d5dbe4; display: grid; place-items: center; color: #fff; }
.check-row i svg { width: 14px; height: 14px; stroke-width: 3; opacity: 0; }
.check-row input:checked + i { background: var(--t-primary); border-color: var(--t-primary); }
.check-row input:checked + i svg { opacity: 1; }
.check-row input:focus-visible + i { outline: 3px solid var(--t-action); outline-offset: 2px; }
.check-row.slim { align-items: center; margin-top: 4px; }

/* Área de soltar a foto ou o certificado: o campo de arquivo de verdade fica
   por cima, transparente, e é ele que o formulário envia. */
.drop { position: relative; display: flex; align-items: center; gap: 14px; border: 2px dashed #d5dbe4; border-radius: 16px; padding: 14px; background: #fafbfc; cursor: pointer; min-height: 72px; }
.drop.over { border-color: var(--t-primary); background: #f3f6f9; }
.drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop-current { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }
.drop-text { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--soft); }
.drop-text b { color: var(--ink); font-size: 14px; }
.drop-text svg.i { color: var(--t-primary); }
.drop .logo { width: 56px; height: 56px; }

/* Escolher a cara do provedor */
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick-card { display: flex; flex-direction: column; gap: 8px; border: 2px solid var(--line); border-radius: 16px; padding: 12px; height: 100%; background: #fff; }
.pick input:checked + .pick-card { border-color: var(--t-action); box-shadow: 0 0 0 2px var(--t-action) inset; }
.pick input:focus-visible + .pick-card { outline: 3px solid var(--t-action); outline-offset: 2px; }
.pick-card b { font-size: 13px; }
.swatches { display: flex; gap: 4px; }
.swatches i { width: 24px; height: 24px; border-radius: 8px; display: block; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06); }
.pick-button { color: #fff; font-weight: 800; font-size: 12px; border-radius: 9px; padding: 7px 10px; text-align: center; }

/* Lista que substitui a do <select> (panel.js). */
.sel { position: relative; }
.sel-button { width: 100%; text-align: left; border: 1.5px solid #dfe3e9; border-radius: 12px; padding: 10px 36px 10px 12px; font-size: 14px; background: #fff; position: relative; min-height: 44px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-inline .sel-button { padding: 9px 34px 9px 12px; font-size: 13.5px; min-height: 0; }
.sel-button::after { content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--soft); border-bottom: 2px solid var(--soft); transform: rotate(45deg); }
/* As caixas que abrem por cima (lista, sugestões, calendário) ficam em 200: acima
   da caixa de confirmação (100), abaixo da dica (300). */
.sel-list, .sug-list { position: fixed; z-index: 200; background: #fff; border: 1px solid #dfe3e9; border-radius: 12px; box-shadow: 0 14px 34px rgb(20 26 36 / .18); padding: 5px; max-height: 280px; overflow-y: auto; }
.sel-list button, .sug-list button { display: block; width: 100%; text-align: left; border: 0; background: none; border-radius: 8px; padding: 9px 11px; font-size: 14px; }
.sel-list button:hover, .sug-list button:hover { background: var(--sunken); }
.sel-list button[aria-selected="true"] { font-weight: 800; color: var(--t-primary); }

/* Confirmação do produto (nunca o confirm do navegador). */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgb(20 26 36 / .45); display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 20px; padding: 22px; max-width: 420px; width: 100%; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 50px rgb(0 0 0 / .25); }
.modal p { font-size: 15px; line-height: 1.5; font-weight: 600; }
.modal div { display: flex; gap: 10px; justify-content: flex-end; }

/* O calendário do produto, no lugar do do navegador (panel.js). */
.date-wrap { position: relative; }
.date-wrap input { padding-right: 42px; }
.date-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--soft); display: grid; place-items: center; }
.date-btn svg.i { width: 18px; height: 18px; }
.cal-pop { position: fixed; z-index: 200; width: 292px; background: #fff; border: 1px solid #dfe3e9; border-radius: 16px; box-shadow: 0 14px 34px rgb(20 26 36 / .18); padding: 10px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 8px; }
.cal-head b { font-size: 14px; font-weight: 800; }
.cal-head button { width: 32px; height: 32px; border: 0; border-radius: 9px; background: var(--sunken); display: grid; place-items: center; }
.cal-head svg.i { width: 16px; height: 16px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-grid span { font-size: 10.5px; font-weight: 800; color: var(--soft); text-align: center; padding: 4px 0; }
.cal-grid button { height: 36px; border: 0; border-radius: 9px; background: none; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-grid button:hover { background: var(--sunken); }
.cal-grid button[data-other] { color: #b4bcc8; }
.cal-grid button[data-today] { box-shadow: inset 0 0 0 1.5px var(--t-action); }
.cal-grid button[aria-pressed="true"] { background: var(--t-primary); color: #fff; }
.cal-quick { display: flex; gap: 6px; padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--line); }
.cal-quick button { flex: 1; border: 0; border-radius: 9px; background: var(--sunken); padding: 7px 4px; font-size: 12px; font-weight: 800; }

/* Os sinais: ícone pequeno no lugar do selo colorido, com a dica do painel. */
.mk { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; vertical-align: -2px; color: var(--soft); position: relative; z-index: 1; }
.mk svg.i { width: 15px; height: 15px; stroke-width: 2; }
.mk.wait { color: var(--bill); }
.mk.ok { color: var(--ok); }

/* A dica: a do painel, e não o balão do navegador. */
.p-tip { position: fixed; z-index: 300; padding: 6px 10px; border-radius: 8px; background: var(--t-deep); color: #fff; font: 700 12px "Manrope", sans-serif; white-space: nowrap; pointer-events: none; box-shadow: 0 8px 22px rgb(20 26 36 / .22); opacity: 0; transform: translateY(3px); transition: opacity .11s ease, transform .11s ease; }
.p-tip[data-open] { opacity: 1; transform: none; }
.p-tip[hidden] { display: none; }

/* Os círculos da equipe. */
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font: 800 11.5px "Manrope", sans-serif; flex: none; background: var(--t-primary); }
.av.sm { width: 26px; height: 26px; font-size: 10px; }

/* O estado: bolinha e texto (online, offline, bloqueado, em dia). */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--soft); }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--bad); }
.dot.grey { background: #9aa3b2; }
.dot.amber { background: var(--bill); }
.state { display: inline-flex; align-items: center; gap: 6px; font: 800 12.5px "Manrope", sans-serif; white-space: nowrap; }
.state svg.i { width: 15px; height: 15px; stroke-width: 2.2; }
.state.late { color: var(--bill); }
.st-paid { color: var(--ok); font-weight: 800; }
.st-late { color: var(--bill); font-weight: 800; }
.st-bad { color: var(--bad-deep); font-weight: 800; }
.st-open { color: var(--ink); font-weight: 800; }
.st-soft { color: var(--soft); font-weight: 700; }

/* O fundo do provedor atrás dos cartões das listas (escolha "misto" do
   Kayo, 20/10/2026: "tá parecendo muito Excel"). */
.p-body.sand { background: var(--t-sand); }
.p-body.sand .tabs { background: var(--t-sand); }
.p-body.sand .kpi { border-color: var(--t-line); }

/* As linhas das listas: lista com respiro. Cada linha é um cartão branco
   próprio, mais alto, com o dia num quadradinho ou as iniciais do assinante na
   frente. Colunas de largura fixa: com "auto" cada linha andava conforme os
   botões dela (pedido do Kayo no Pixel Barber). */
.rows { display: flex; flex-direction: column; gap: 8px; }
.r { display: grid; grid-template-columns: 52px minmax(0, 1fr) 170px 210px; gap: 16px; align-items: center; padding: 12px 18px 12px 12px; background: #fff; border: 1.5px solid var(--t-line); border-radius: 18px; text-decoration: none; color: var(--ink); min-height: 76px; position: relative; }
.r .cl { min-width: 0; text-decoration: none; color: inherit; }
.r .cl b { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.r .cl small { font-size: 12.5px; font-weight: 600; color: var(--soft); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.r .cl small.subj { font-size: 13px; color: var(--ink); margin-top: 3px; }
.r .num, .r .money { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; min-width: 0; }
.r .num small, .r .money small { font-size: 11.5px; font-weight: 600; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r .ra { display: flex; gap: 6px; justify-content: flex-end; align-items: center; position: relative; z-index: 1; }
.r .ra form { margin: 0; }
/* Passar o mouse acende a linha inteira, e o clique em qualquer lugar dela
   abre (o jeito que o Kayo escolheu no Pixel Barber): o link se estica por cima
   da linha, e os botões ficam acima dele. */
.r > a.cl::after { content: ""; position: absolute; inset: 0; }
.r > a.cl:focus-visible { outline: none; }
.r:has(> a.cl):hover, .r:has(> a.cl:focus-visible), a.r:hover, a.r:focus-visible { border-color: var(--t-action); outline: none; }
.r.late .money { color: var(--bad-deep); }
/* O assinante: nome e login, plano, situação. */
.r.cust { grid-template-columns: 52px minmax(0, 1fr) 190px 210px; }
/* A fatura, a nota e a despesa: o dia, quem, situação, valor e os botões. */
.r.inv { grid-template-columns: 52px minmax(0, 1fr) 190px 110px 130px; }
.r.inv .money { text-align: right; align-items: flex-end; }
/* A ordem: o dia, o que é, situação, e o técnico com dia e período. */
.r.order { grid-template-columns: 52px minmax(0, 1fr) 150px 430px; }
.r.order.going { border-color: var(--t-action); box-shadow: inset 4px 0 0 var(--t-action); }
.assign { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .9fr); gap: 6px; margin: 0; width: 100%; }
.assign .sel-button, .assign .date-wrap input { min-height: 0; padding-top: 7px; padding-bottom: 7px; font-size: 12.5px; border-radius: 10px; }
.assign .date-wrap input, .assign select { width: 100%; border: 1.5px solid #dfe3e9; background: #fff; padding-left: 10px; outline: 0; }

/* Os cadastros em linha (concentrador, plano, caixa, aparelho, pessoa, conta):
   o ícone, o nome com o detalhe, e as ações à direita. */
.mi { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 8px 12px 8px 8px; }
.mi + .mi { margin-top: 8px; }
.mi-ph { width: 48px; height: 48px; border-radius: 12px; background: var(--t-tint); display: grid; place-items: center; color: var(--t-primary); font: 800 14px "Manrope", sans-serif; }
.mi-ph svg.i { width: 22px; height: 22px; }
.mi-ph.avatar-ph { border-radius: 50%; background: var(--t-sand); color: var(--t-deep); }
.mi-text { min-width: 0; }
.mi-text b { font-size: 14px; display: block; }
.mi-text > span { font-size: 12px; font-weight: 600; color: var(--soft); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-text > span b { display: inline; font-size: 12px; }
.mi.archived { background: var(--sunken); }
.mi-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.mi-actions form { margin: 0; }
.mi-actions details.tool > .p-form { left: auto; right: 0; }

/* O quadradinho do dia: o número grande e o mês embaixo. Vermelho cheio,
   letra branca, quando venceu. */
.dt { width: 50px; height: 54px; border-radius: 14px; background: var(--sunken); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; flex: none; }
.dt b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dt small { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); margin-top: 4px; }
.dt.hot { background: var(--bad); color: #fff; }
.dt.hot small { color: #fff; }
.dt.none { color: var(--soft); }
.dt.none svg.i { width: 20px; height: 20px; }
/* As iniciais do assinante, na cor do provedor. */
.ini { width: 52px; height: 52px; border-radius: 15px; background: var(--t-tint); color: var(--t-primary); font: 800 15px "Manrope", sans-serif; display: grid; place-items: center; flex: none; }
/* O ícone num quadradinho (lista de Rede, de Notas, o "precisa de você"). */
.ic { width: 26px; height: 26px; border-radius: 8px; background: var(--sunken); display: grid; place-items: center; color: var(--soft); flex: none; }
.ic svg.i { width: 15px; height: 15px; stroke-width: 2.2; }
.ic.bad { color: var(--bad); }
.ic.amber { color: var(--bill); }
.ic.ok { color: var(--ok); }

/* As caixas que abrem por cima: gerar mensalidade, carnê, abrir ordem, cancelar. */
details.tool { position: relative; }
details.tool > summary { list-style: none; cursor: pointer; }
details.tool > summary::-webkit-details-marker { display: none; }
details.tool[open] > summary { background: var(--t-primary); color: #fff; }
details.tool > .p-form { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(440px, 80vw); background: #fff; border: 1px solid #dfe3e9; border-radius: 16px; padding: 14px; box-shadow: 0 14px 34px rgb(20 26 36 / .18); }
.fhead-actions details.tool > .p-form, .mg-head details.tool > .p-form { left: auto; right: 0; }
/* A do fim da coluna da ficha abre para cima: embaixo não há espaço. */
details.tool.up > .p-form { top: auto; bottom: calc(100% + 6px); }

/* As caixas da coluna (a ficha, o painel do dia, o mapa, a ordem). */
.box { background: #fff; border-radius: 14px; padding: 11px 12px; box-shadow: 0 1px 2px rgb(22 32 50 / 6%); display: flex; flex-direction: column; gap: 7px; }
.box h6 { margin: 0; font: 800 10.5px "Manrope", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.box h6 em { font-style: normal; letter-spacing: 0; text-transform: none; background: var(--bad); color: #fff; border-radius: 7px; padding: 0 6px; font-size: 11px; }
.box h6 .h6-link { letter-spacing: 0; text-transform: none; color: var(--t-action); font-size: 11.5px; }
.box .b-sm { align-self: flex-start; }
/* A caixa que é um formulário inteiro (o fechamento da ordem): mais ar entre os campos. */
.box.roomy { gap: 14px; padding: 14px; }
.side { background: var(--side); border-left: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; overflow-y: auto; scrollbar-width: thin; }

/* ------------------------------------------------ o painel do dia (1 A) */

.dash { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 330px; }
.dash-main { padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; overflow-y: auto; scrollbar-width: thin; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { border: 1px solid var(--line); border-radius: 16px; padding: 12px 15px 13px; display: flex; flex-direction: column; gap: 3px; min-width: 0; background: #fff; }
.kpi span { font-size: 12px; font-weight: 700; color: var(--soft); white-space: nowrap; }
.kpi b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi small { font-size: 12px; font-weight: 600; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .bar { margin-top: 5px; }
.kpi.alert b { color: var(--bad); }
.card { border: 1px solid var(--line); border-radius: 16px; padding: 12px 15px 14px; display: flex; flex-direction: column; gap: 9px; min-width: 0; background: #fff; }
.card h6 { font: 800 10.5px "Manrope", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.legend { display: flex; gap: 12px; letter-spacing: 0; text-transform: none; font: 700 11.5px "Manrope", sans-serif; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.lg-pix { background: var(--t-action); }
.lg-other { background: color-mix(in srgb, var(--t-action) 42%, #fff); }
.chart { display: grid; grid-template-columns: 46px minmax(0, 1fr); grid-template-rows: 180px auto; column-gap: 6px; }
.yax { position: relative; font: 700 10.5px "Manrope", sans-serif; color: var(--soft); font-variant-numeric: tabular-nums; }
.yax span { position: absolute; right: 0; transform: translateY(50%); white-space: nowrap; }
.plot { position: relative; border-bottom: 1.5px solid #cfd6df; }
.plot .gl { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); }
.bars { position: absolute; inset: 0; display: grid; gap: 4px; align-items: end; }
.bars i { display: flex; flex-direction: column; justify-content: flex-end; height: calc(var(--h, 0) * 1%); background: color-mix(in srgb, var(--t-action) 42%, #fff); border-radius: 4px 4px 0 0; overflow: hidden; }
.bars i u { display: block; background: var(--t-action); }
.bars i.today { outline: 2px solid var(--t-deep); outline-offset: 1px; }
.bars i.fut { height: 3px; background: var(--line); border-radius: 2px; }
.xax { grid-column: 2; display: grid; gap: 4px; font: 700 10.5px "Manrope", sans-serif; color: var(--soft); padding-top: 4px; font-variant-numeric: tabular-nums; }
.xax span { text-align: center; white-space: nowrap; }
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.vrow { display: grid; grid-template-columns: 54px minmax(0, 1fr) 54px 86px; gap: 8px; align-items: center; font: 600 12.5px "Manrope", sans-serif; color: var(--soft); }
.vrow b { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.vrow .right { text-align: right; font-variant-numeric: tabular-nums; }
.vrow .bar i { background: var(--t-primary); }
.conc { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 9px; align-items: center; }
.conc + .conc { border-top: 1px solid var(--line); padding-top: 8px; }
.conc b { display: block; font-size: 13px; font-weight: 800; }
.conc small { display: block; font-size: 11.5px; font-weight: 600; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conc .cpu { font: 800 11.5px "Manrope", sans-serif; color: var(--soft); font-variant-numeric: tabular-nums; }
.need { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 9px; align-items: start; padding: 4px 0; color: var(--ink); }
.need + .need { border-top: 1px solid var(--line); padding-top: 8px; }
.need b { display: block; font-size: 13px; font-weight: 800; }
.need small { display: block; font-size: 11.5px; font-weight: 600; color: var(--soft); }
.need:hover b { color: var(--t-action); }
.os { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 3px 0; color: var(--ink); }
.os + .os { border-top: 1px solid var(--line); padding-top: 7px; }
.os .t { font: 800 11.5px "Manrope", sans-serif; color: var(--soft); text-transform: uppercase; letter-spacing: .04em; }
.os b { display: block; font-size: 12.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os small { display: block; font-size: 11.5px; font-weight: 600; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os .who { font: 800 11.5px "Manrope", sans-serif; color: var(--soft); white-space: nowrap; }
.os.done { opacity: .55; }
.os:hover b { color: var(--t-action); }

/* ------------------------------------------------------------ o mapa */

.mapv { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.mapv .side { border-left: 0; border-right: 1px solid var(--line); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-f { border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 12px; font: 800 12px "Manrope", sans-serif; background: #fff; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.pill-f b { font-variant-numeric: tabular-nums; opacity: .75; }
.pill-f.on { background: var(--t-primary); border-color: var(--t-primary); color: #fff; }
.fall { border-left: 3px solid var(--bad); padding: 2px 0 2px 10px; display: flex; flex-direction: column; gap: 3px; }
.fall.soft { border-left-color: #cfd6df; }
.fall b { font-size: 13px; font-weight: 800; }
.fall small { font-size: 11.5px; font-weight: 600; color: var(--soft); }
.fall form { margin: 4px 0 0; }
.off-row { display: flex; justify-content: space-between; gap: 8px; font: 600 12px "Manrope", sans-serif; color: var(--soft); padding: 2px 0; }
.off-row b { color: var(--ink); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.off-row span { white-space: nowrap; }
.off-row:hover b { color: var(--t-action); }
.map-wrap { position: relative; min-width: 0; min-height: 0; }
.map { position: absolute; inset: 0; background: #edf0e9; }
.map-empty { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); z-index: 500; background: #fff; border-radius: 12px; padding: 9px 14px; font-size: 12.5px; font-weight: 700; color: var(--soft); box-shadow: 0 1px 3px rgb(22 32 50 / 16%); max-width: 80%; text-align: center; }
/* Os controles do mapa são do produto: os do Leaflet ficam desligados (map.js). */
.mctl { position: absolute; top: 12px; right: 12px; z-index: 500; display: flex; flex-direction: column; background: #fff; border-radius: 11px; box-shadow: 0 1px 3px rgb(22 32 50 / 16%); overflow: hidden; }
.mctl button { width: 34px; height: 34px; border: 0; background: #fff; display: grid; place-items: center; color: var(--ink); }
.mctl button + button { border-top: 1px solid var(--line); }
.mctl button:hover { background: var(--sunken); }
.mctl svg.i { width: 16px; height: 16px; stroke-width: 2.4; }
.mleg { position: absolute; left: 12px; bottom: 12px; z-index: 500; background: #fff; border-radius: 11px; padding: 7px 11px; display: flex; gap: 12px; font: 700 11.5px "Manrope", sans-serif; box-shadow: 0 1px 3px rgb(22 32 50 / 16%); }
.mleg span { display: inline-flex; align-items: center; gap: 6px; }
.mattr { position: absolute; right: 8px; bottom: 6px; z-index: 500; font: 600 10px "Manrope", sans-serif; color: #6f7872; background: rgb(255 255 255 / .8); padding: 1px 6px; border-radius: 4px; }
.mpop .leaflet-popup-content-wrapper { border-radius: 14px; padding: 0; box-shadow: 0 2px 4px rgb(22 32 50 / 10%), 0 8px 22px rgb(22 32 50 / 14%); }
.mpop .leaflet-popup-content { margin: 10px 12px 11px; width: 200px !important; display: flex; flex-direction: column; gap: 4px; font-family: "Manrope", sans-serif; line-height: 1.35; }
.mpop .leaflet-popup-content b { font-size: 13px; font-weight: 800; }
.mpop .leaflet-popup-content small { font-size: 11.5px; font-weight: 600; color: var(--soft); }
.mpop .state { font-size: 11.5px; }
.mpop .go { font: 800 12px "Manrope", sans-serif; color: var(--t-action); margin-top: 2px; }
.mpop .leaflet-popup-tip { box-shadow: none; }

/* ------------------------------------------- a ficha do assinante (2 B) */

.fhead { display: flex; align-items: center; gap: 14px; padding: 12px 22px; border-bottom: 1px solid var(--line); flex: none; flex-wrap: wrap; }
.fhead .ini { width: 44px; height: 44px; border-radius: 13px; font-size: 14px; }
.fhead-title { min-width: 0; }
.fhead-title h2 { font-size: 18px; font-weight: 800; }
.fhead-title p { font-size: 12.5px; font-weight: 600; color: var(--soft); margin-top: 1px; }
.fhead-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fhead-actions form { margin: 0; }
.tlv { flex: 1; min-height: 0; display: grid; grid-template-columns: 310px minmax(0, 1fr); }
.tlv .side { border-left: 0; border-right: 1px solid var(--line); }
.tlmain { padding: 12px 22px 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; overflow-y: auto; scrollbar-width: thin; }
.tlhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tlhead p { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--soft); white-space: nowrap; }
.tlhead p b { color: var(--ink); }
.tl { display: flex; flex-direction: column; }
.tl-i { display: grid; grid-template-columns: 54px 28px minmax(0, 1fr); gap: 10px; position: relative; padding-bottom: 10px; }
.tl-i::before { content: ""; position: absolute; left: 77px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.tl-i:last-child::before { display: none; }
.tl-d { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; padding-top: 5px; text-align: right; }
.tl-d small { display: block; font-size: 10px; font-weight: 600; color: var(--soft); }
.tl-o { width: 28px; height: 28px; border-radius: 50%; background: var(--sunken); display: grid; place-items: center; color: var(--soft); position: relative; z-index: 1; }
.tl-o svg.i { width: 15px; height: 15px; stroke-width: 2.1; }
.tl-o.ok { background: var(--ok); color: #fff; }
.tl-o.bad { background: var(--bad); color: #fff; }
.tl-o.amber { background: var(--bill); color: #fff; }
.tl-c { min-width: 0; padding-top: 1px; }
.tl-c .src { font: 800 9.5px "Manrope", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.tl-c p { font-size: 13px; line-height: 1.45; color: var(--ink); font-weight: 600; white-space: pre-line; }
.tl-c p b { font-weight: 800; }
.tl-c p q { color: var(--soft); quotes: "“" "”"; }
.inv-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); }
.inv-line b { display: block; font-size: 12.5px; font-weight: 800; }
.inv-line small { display: block; font-size: 11.5px; font-weight: 600; color: var(--soft); }
.inv-line form { margin: 0; }
.inv-line .icon-btn { width: 30px; height: 30px; }

/* --------------------------------------------- a ordem, no celular do técnico */

.ord { max-width: 760px; }
.ord-head { display: flex; align-items: flex-start; gap: 12px; }
.eyebrow { font: 800 11px "Manrope", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
.ord-head h2 { font-size: 22px; font-weight: 800; margin-top: 2px; }
.ord-head p { font-size: 13px; font-weight: 600; color: var(--soft); margin-top: 2px; }
.ord-photo { width: 100%; max-height: 360px; object-fit: cover; border-radius: 12px; }
.ord-sign { width: 100%; max-width: 360px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.gps { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sign { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
/* touch-action: sem isso, o dedo assinando rola a página. */
.sign canvas { width: 100%; max-width: 600px; aspect-ratio: 3 / 1; height: auto; background: #fff; border: 1.5px dashed #d5dbe4; border-radius: 12px; touch-action: none; cursor: crosshair; }

/* O roteiro de preparo do MikroTik, para copiar e colar no terminal. */
.script { margin: 0; background: #12181b; color: #e6edf0; border-radius: 12px; padding: 12px 14px; font: 600 12.5px/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
/* A régua de cobrança em Ajustes: um passo por cartão. */
.rule { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }

/* WhatsApp e pagamento em Ajustes */
.wa-card { border-radius: 16px; padding: 13px 15px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.wa-card b { font-size: 14.5px; }
.wa-card form { margin: 4px 0 0; }
.wa-card.ok { background: var(--ok); color: #fff; }
.wa-card.ok .p-btn.ghost { background: #fff; color: var(--ok); }
.wa-card.bad { background: var(--bad); color: #fff; }
.wa-card.wait { background: var(--sunken); }
.wa-card.off { background: var(--sunken); color: var(--soft); }
.wa-card.off b { color: var(--ink); }
.qr-box { width: 240px; height: 240px; border-radius: 16px; background: #fff; display: grid; place-items: center; margin-top: 6px; }
.qr-box img { width: 220px; height: 220px; image-rendering: pixelated; }
.msgs { display: flex; flex-direction: column; gap: 2px; }
details.msg-row { display: block; padding: 8px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
details.msg-row summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
details.msg-row summary::-webkit-details-marker { display: none; }
details.msg-row summary small { color: var(--soft); width: 100%; }
details.msg-row .pill { margin: 0; }
details.msg-row pre { white-space: pre-wrap; font: 500 13px/1.5 "Manrope", sans-serif; background: var(--sunken); border-radius: 12px; padding: 10px 12px; margin: 8px 0 2px; }

/* Painel estreito: o celular do técnico na rua. */
@media (max-width: 1180px) {
  .dash { grid-template-columns: minmax(0, 1fr) 290px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r.order { grid-template-columns: 52px minmax(0, 1fr) 130px 340px; }
}
@media (max-width: 860px) {
  .p { padding: 0; height: 100dvh; }
  .p-card { border-radius: 0; flex-direction: column; }
  .p-rail { width: 100%; flex-direction: row; padding: 8px 10px; gap: 4px; overflow-x: auto; overflow-y: hidden; }
  .p-rail > .logo { width: 38px; height: 38px; margin: 0 6px 0 0; }
  .p-rail .spacer, .p-made { display: none; }
  .p-rail-toggle { display: none; }
  .p-nav { width: auto; padding: 8px 11px; }
  .p-head { padding: 12px 16px; gap: 10px; }
  .p-head .stats { order: 3; width: 100%; margin-left: 0; }
  .head-search { flex: 1 1 100%; order: 3; }
  .p-user { display: none; }
  .p-pad { padding: 14px 14px 20px; }
  .p-body.flush { overflow-y: auto; }
  .p-body.flush > .p-region { display: block; }
  .dash, .mapv, .tlv { display: flex; flex-direction: column; }
  .dash-main, .tlmain { overflow: visible; padding: 14px; }
  .side, .mapv .side, .tlv .side { border: 0; border-top: 1px solid var(--line); overflow: visible; }
  .tlv .side { order: 2; }
  .mapv .map-wrap { height: 62vh; order: -1; }
  .duo, .p-two, .field-row, .field-row.three { grid-template-columns: minmax(0, 1fr); }
  .fhead { padding: 12px 14px; }
  .fhead-actions { margin-left: 0; width: 100%; }
  .tlhead p { margin-left: 0; white-space: normal; }
  .r, .r.cust, .r.inv, .r.order { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; }
  .r > :nth-child(3):not(.ra) { display: none; }
  .r.inv > .money { display: none; }
  .r.order .ra { grid-column: 1 / -1; }
  .r .ra { flex-wrap: wrap; }
  .mi { grid-template-columns: 48px minmax(0, 1fr); }
  .mi-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .assign { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .field-float label, .p-rail, .p-nav, .p-nav .lbl, .p-made .lbl, .p-rail > .logo, .p-rail-toggle, .p-rail-toggle svg.i, .p-nav .count { transition: none !important; } }
