:root {
  --primary: #f0b400;
  /* Cor principal legível como texto (no claro, um dourado mais escuro); calculada em App.primaryVars */
  --primary-ink: #906c00;
  --primary-600: color-mix(in srgb, var(--primary) 84%, black);
  --primary-50: color-mix(in srgb, var(--primary) 9%, var(--surface));
  --primary-100: color-mix(in srgb, var(--primary) 20%, var(--surface));
  --primary-soft: color-mix(in srgb, var(--primary) 8%, transparent);
  --primary-2: color-mix(in srgb, var(--primary) 68%, white);
  --on-primary: #111827;
  /* Cores das redes sociais (iguais nos dois temas) */
  --brand-instagram: #d6297a;
  --brand-whatsapp: #1fa855;
  --brand-google: #4285f4;
  --brand-facebook: #1877f2;
  --chart-b: #eb6834;
  --chart-c: #1baf7a;
  /* Neutros frios de propósito: combinam com qualquer cor principal que o salão escolher */
  --bg: #f1f2f5;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  /* Preenchimento neutro translúcido (botões e controles secundários): funciona sobre qualquer fundo e nos dois temas */
  --fill: color-mix(in srgb, var(--text) 6%, transparent);
  --fill-hover: color-mix(in srgb, var(--text) 10%, transparent);
  --border: #e8eaf0;
  --border-strong: #d6d9e3;
  --text: #1f2333;
  --text-2: #5c6175;
  --text-3: #676c80;
  --ok: #15803d;
  --warn: #d97706;
  --danger: #e5484d;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(20, 23, 40, .06);
  --shadow: 0 10px 30px rgba(20, 23, 40, .14);
  --shadow-soft: 0 6px 22px rgba(20, 23, 40, .08);
  --ink-mix: black;
  --grid: #f0f1f5;
  --stripe-a: #eef0f4;
  --stripe-b: #e3e6ec;
  --slot-dash: #d5d8e2;
  --backdrop: rgba(20, 23, 40, .42);
  --toast-bg: #1f2333;
  --bubble: #dcf8c6;
  --teal: #0f766e;
  --pink: #be185d;
  --promo: #c2410c; /* promoções (laranja) */
  --promo-bg: color-mix(in srgb, #f97316 13%, var(--surface));
  --ok-bg: color-mix(in srgb, var(--ok) 11%, var(--surface));
  --warn-bg: color-mix(in srgb, var(--warn) 11%, var(--surface));
  --danger-bg: color-mix(in srgb, var(--danger) 10%, var(--surface));
  --teal-bg: color-mix(in srgb, #14b8a6 13%, var(--surface));
  --pink-bg: color-mix(in srgb, #ec4899 12%, var(--surface));
  --warn-line: color-mix(in srgb, var(--warn) 30%, var(--surface));
  --danger-line: color-mix(in srgb, var(--danger) 30%, var(--surface));
  --warn-ink: color-mix(in srgb, var(--warn) 72%, var(--ink-mix));
  --danger-ink: color-mix(in srgb, var(--danger) 82%, var(--ink-mix));
  /* Barra lateral: cinza chumbo (sobrescrita pela cor escolhida em Configurações > Aparência) */
  --sb-bg: #1d1f23;
  --sb-fg: #ffffff;
  --sb-fg-2: rgba(255, 255, 255, .8);
  --sb-muted: rgba(255, 255, 255, .52);
  --sb-hover: rgba(255, 255, 255, .08);
  --sb-active-bg: color-mix(in srgb, var(--primary) 16%, #1d1f23);
  --sb-active-fg: var(--primary);
  --sb-border: rgba(255, 255, 255, .1);
  --sb-brand: var(--primary);
  --sb-accent: var(--primary);
  color-scheme: light;
  --sidebar-w: 240px;
  --panel-w: 270px;
  font-family: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Títulos e números de destaque: a mesma Noto Sans (o site de vendas também usa) */
  --font-display: "Noto Sans", system-ui, sans-serif;
  color: var(--text);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --primary-ink: var(--primary);
  --bg: #0e1016;
  --surface: #161922;
  --surface-2: #1c202a;
  --border: #272c38;
  --border-strong: #363c4b;
  --text: #e9ebf2;
  --text-2: #b0b6c6;
  --text-3: #7f8698;
  --ok: #34c56c;
  --warn: #f2a93b;
  --danger: #f2646a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 12px 34px rgba(0, 0, 0, .5);
  --shadow-soft: 0 6px 22px rgba(0, 0, 0, .4);
  --ink-mix: white;
  --grid: #20242e;
  --stripe-a: #1f232d;
  --stripe-b: #272c37;
  --slot-dash: #343a48;
  --backdrop: rgba(0, 0, 0, .6);
  --toast-bg: #2b3040;
  --bubble: #1d4a33;
  --teal: #5eead4;
  --pink: #f9a8d4;
  --promo: #fdba74;
}
* { box-sizing: border-box; scrollbar-width: thin; }
/* Barras de rolagem finas, sem setas e com trilho transparente (some quando não há o que rolar) */
:root { scrollbar-color: var(--border-strong) transparent; }
html, body { height: 100%; margin: 0; }
/* Poppins é mais encorpada: o negrito padrão (strong, b, títulos, cabeçalho de tabela) fica em 600, não 700 */
b, strong, h1, h2, h3, h4, h5, h6, th { font-weight: 600; }
body { background: var(--bg); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
a { color: var(--primary-ink); }
code { background: var(--fill); border-radius: 4px; padding: 0 4px; font-size: 12px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
/* Títulos e números grandes (hoje na mesma fonte do texto; trocar --font-display muda só eles) */
.brand-name, .brand-mark, .page-head h2, .modal-head h2, .cal-title, .kpi strong, .stat strong, .goal-ring strong, .goal-nums.big strong,
.sum-total strong, .offer-price strong, .promo-off, .plan-price, .sub-price, .sub-status h3, .auth-brand, .auth-card h2 { font-family: var(--font-display); }

.muted { color: var(--text-3); }
.small { font-size: 12px; }
.center { text-align: center; }
.spacer { flex: 1; }
.ellipsis { display: inline-block; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn-ink); }
.danger-text { color: var(--danger-ink); }
.clickable { cursor: pointer; }

.app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; position: relative; }

/* ---------- Sidebar ---------- */
.sidebar { width: var(--sidebar-w); flex: none; background: var(--sb-bg); color: var(--sb-fg); transition: background .2s, width .2s ease; display: flex; flex-direction: column; padding: 16px 10px 14px; z-index: 40; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 12px; flex: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); font-weight: 600; font-size: 17px; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-name { display: block; line-height: 0; color: var(--sb-fg); }
/* Logo do Bukme (App.brand, vetores do kit): haste e nome em currentColor; o disco acompanha a cor principal do sistema (amarelo da marca por padrão). */
.bk-logo { display: block; height: 26px; width: auto; flex: none; }
.bk-disc { fill: var(--primary, #F0B400); }
.bk-sym { display: block; height: 100%; width: auto; }
.bk-mark { display: grid; place-items: center; width: 34px; height: 34px; flex: none; color: var(--text); }
.bk-mark .bk-sym { height: 30px; }
.brand-name .bk-logo { height: 25px; margin: 3px 0 5px; }
.brand .bk-mark { display: none; color: var(--sb-fg); }
.brand-text small { color: var(--sb-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0 -10px; padding: 0 10px; scrollbar-color: var(--sb-border) transparent; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-size: 12px; font-weight: 400; color: var(--sb-muted); padding: 8px 12px 4px; }
/* Grupos do menu que abrem e fecham: título com ícone, um pouco maior que os itens */
button.nav-label { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: none; font-family: inherit; text-align: left; cursor: pointer;
  padding: 8px 12px; border-radius: 9px; font-size: 14.5px; font-weight: 500; color: var(--sb-fg); transition: background .15s, color .15s; }
button.nav-label:hover { background: var(--sb-hover); }
button.nav-label > svg { width: 19px; height: 19px; flex: none; }
button.nav-label > span { flex: 1; }
.nav-chev { display: inline-grid; color: var(--sb-muted); transition: transform .2s; }
.nav-chev svg { width: 15px; height: 15px; }
.nav-group.closed .nav-chev { transform: rotate(-90deg); }
.nav-group.closed:has(.nav-item.active) > button.nav-label { color: var(--sb-active-fg); background: var(--sb-active-bg); } /* a página aberta está neste grupo */
.nav-group:not(.closed) .nav-items-in { padding: 2px 0 6px 12px; }
/* Grupo fechado com contador lá dentro (comandas abertas, fila da automação…): pontinho no título */
.nav-group.closed:has(.nav-badge:not([hidden])) > button.nav-label::after { content: ""; order: 2; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: none; }
button.nav-label .nav-chev { order: 3; }
.nav-items { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .22s ease; }
.nav-group.closed .nav-items { grid-template-rows: 0fr; }
.nav-items-in { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 1px; }
@media (prefers-reduced-motion: reduce) { .nav-items, .nav-chev { transition: none; } }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 5px 12px; border-radius: 9px; color: var(--sb-fg-2); font-weight: 400; cursor: pointer; text-decoration: none; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--sb-hover); color: var(--sb-fg); }
.nav-item.active { background: var(--sb-active-bg); color: var(--sb-active-fg); }
.nav-item span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge { font-style: normal; font-size: 11px; font-weight: 600; background: var(--primary); color: var(--on-primary); border-radius: 99px; padding: 0 7px; line-height: 18px; }
.nav-bottom { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--sb-border); /* taste-skill-ignore: marca onde a lista do menu rola por baixo */ display: flex; flex-direction: column; gap: 5px; flex: none; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 12px; background: var(--sb-hover); width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; transition: background .15s; }
.user-chip:hover { background: var(--sb-hover); }
.user-chip .user-meta { flex: 1; }
.user-chev { width: 16px; height: 16px; color: var(--sb-muted); }
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-meta strong { color: var(--sb-fg); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { color: var(--sb-muted); font-size: 12px; }
.sidebar-backdrop { display: none; }

/* Busca, tema e sincronização na barra lateral */
.nav-search { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; flex: none; padding: 0 10px 0 12px; margin: 0 0 10px; border: 1px solid var(--sb-border); border-radius: 9px; background: none; color: var(--sb-muted); cursor: pointer; font: inherit; text-align: left; transition: background .15s, color .15s; }
.nav-search:hover { background: var(--sb-hover); color: var(--sb-fg); }
.nav-search span { flex: 1; white-space: nowrap; overflow: hidden; }
.nav-search kbd { font-family: inherit; font-size: 10.5px; font-weight: 500; line-height: 1; padding: 3px 5px; border: 1px solid var(--sb-border); border-radius: 5px; color: var(--sb-muted); white-space: nowrap; }
.theme-toggle { display: flex; align-items: center; gap: 11px; width: 100%; padding: 6px 10px 6px 12px; border: 0; border-radius: 9px; background: none; color: var(--sb-fg-2); font: inherit; font-weight: 400; cursor: pointer; text-align: left; transition: background .15s, color .15s; }
.theme-toggle:hover { background: var(--sb-hover); color: var(--sb-fg); }
.theme-toggle > span { flex: 1; white-space: nowrap; overflow: hidden; }
.tswitch { position: relative; flex: none; width: 40px; height: 22px; border-radius: 99px; background: var(--border-strong); transition: background .2s; }
.tswitch-knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); display: grid; place-items: center; color: #f5a524; transition: transform .2s ease, color .2s; }
.tswitch-knob svg { width: 12px; height: 12px; stroke-width: 2.2; }
.theme-toggle[aria-checked="true"] .tswitch { background: var(--primary); }
.theme-toggle[aria-checked="true"] .tswitch-knob { transform: translateX(18px); color: var(--primary-ink); }
.theme-toggle:focus-visible, .nav-search:focus-visible, .sb-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.nav-bottom .sync-chip { width: 100%; height: 28px; flex: none; justify-content: flex-start; background: none; color: var(--sb-muted); padding: 0 12px; }
.nav-bottom .sync-chip span:not(.dot) { overflow: hidden; text-overflow: ellipsis; }

/* Botão de recolher/expandir a barra lateral (na borda dela) */
.sb-toggle { position: absolute; z-index: 41; top: 22px; left: calc(var(--sidebar-w) - 13px); width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); display: grid; place-items: center; cursor: pointer; padding: 0; box-shadow: var(--shadow-sm); transition: left .2s ease, color .15s, border-color .15s; }
.sb-toggle:hover { color: var(--primary-ink); border-color: var(--primary); }
.sb-toggle svg { width: 14px; height: 14px; stroke-width: 2.2; transition: transform .2s; }
.sb-tip { position: fixed; z-index: 140; transform: translateY(-50%); pointer-events: none; background: var(--toast-bg); color: #fff; font-size: 12.5px; font-weight: 400; padding: 5px 9px; border-radius: 7px; white-space: nowrap; box-shadow: var(--shadow); }

/* Menu recolhido: só os ícones (no celular a barra lateral é sempre a gaveta completa) */
@media (min-width: 901px) {
  .sb-collapsed { --sidebar-w: 68px; }
  .sb-collapsed .sb-toggle svg { transform: rotate(180deg); }
  .sb-collapsed .brand { justify-content: center; padding: 2px 0 14px; }
  .sb-collapsed .brand .bk-mark { display: grid; }
  .sb-collapsed .brand-text, .sb-collapsed .nav-item > span, .sb-collapsed .nav-search > span, .sb-collapsed .nav-search kbd,
  .sb-collapsed .theme-toggle > span, .sb-collapsed .theme-toggle > svg, .sb-collapsed .user-meta, .sb-collapsed .user-chev,
  .sb-collapsed .nav-bottom .sync-chip span:not(.dot) { display: none; }
  .sb-collapsed .nav-label { height: 1px; padding: 0; margin: 4px 8px; background: var(--sb-border); font-size: 0; pointer-events: none; }
  .sb-collapsed .nav-label > *, .sb-collapsed .nav-group .nav-items-in { padding-left: 0; }
  .sb-collapsed .nav-label > * { display: none; }
  .sb-collapsed .nav-group.closed .nav-items { grid-template-rows: 1fr; } /* só ícones: tudo à mostra */
  .sb-collapsed .nav-item, .sb-collapsed .nav-search, .sb-collapsed .theme-toggle, .sb-collapsed .nav-bottom .sync-chip { justify-content: center; padding-left: 0; padding-right: 0; position: relative; }
  .sb-collapsed .nav-search { border-color: transparent; }
  .sb-collapsed .nav-badge { position: absolute; top: 2px; right: 4px; min-width: 17px; padding: 0 4px; font-size: 10px; line-height: 16px; text-align: center; }
  .sb-collapsed .nav-lock { position: absolute; top: 3px; right: 6px; }
  .sb-collapsed .nav-lock svg { width: 11px; height: 11px; }
  .sb-collapsed .tswitch { width: 36px; }
  .sb-collapsed .theme-toggle[aria-checked="true"] .tswitch-knob { transform: translateX(14px); }
  .sb-collapsed .user-chip { justify-content: center; padding: 6px 0; border-color: transparent; }
}

/* Barra do topo só no celular (abre o menu); no computador cada página traz o próprio título e botões */
.mobile-bar { display: none; }
#view .dock-only { display: none; } /* botões que só existem na barra flutuante do celular ("Mais") */

/* Janela de busca (Ctrl+K) */
.palette { position: fixed; inset: 0; z-index: 95; background: var(--backdrop); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: fade .12s ease; }
.palette-box { width: min(580px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 10px; animation: pop .14s ease; }
.palette .search input { height: 44px; font-size: 15px; }
.palette-results { max-height: min(440px, 60vh); overflow-y: auto; margin-top: 6px; }
.palette-results:empty { display: none; }

/* ---------- Main ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 62px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 22px; background: var(--surface); border-bottom: 1px solid var(--border); }
.page-title { font-size: 19px; font-weight: 600; margin: 0; letter-spacing: -.01em; white-space: nowrap; }
.view { flex: 1; min-height: 0; overflow: auto; padding: 22px 24px 28px; }
.view-agenda { overflow: hidden; padding: 14px; }
body.public-mode .sidebar, body.public-mode .topbar, body.public-mode .mobile-bar, body.public-mode .sb-toggle { display: none; }
body.public-mode .view { padding: 0; background: var(--bg); }

.search { position: relative; }
.search > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search input { width: 100%; height: 38px; border: 1px solid transparent; border-radius: 99px; padding: 0 14px 0 36px; background: var(--fill); outline: none; transition: border-color .15s, box-shadow .15s; }
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); background: var(--surface); }
.search.sm input { height: 34px; }
.search.sm { min-width: 200px; }
.search.grow { flex: 1; max-width: 460px; }
.gs-sec { font-size: 12px; font-weight: 500; color: var(--text-3); padding: 10px 10px 4px; }
.gs-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.gs-item.active { background: var(--surface-2); }
.gs-item > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gs-item small { color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-small { padding: 14px; text-align: center; color: var(--text-3); }
.cash-chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 99px; border: 0; background: var(--fill); color: var(--text-2); cursor: pointer; font-size: 12.5px; font-weight: 400; white-space: nowrap; }
.cash-chip.open { color: var(--ok); background: var(--ok-bg); }
.cash-chip svg { width: 16px; height: 16px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 99px; border: 1px solid transparent; background: var(--fill); cursor: pointer; font-weight: 400; white-space: nowrap; text-decoration: none; color: var(--text); transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn:hover { background: var(--fill-hover); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:focus-visible, .icon-btn:focus-visible, .chip-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 500; }
.btn.primary:hover { background: var(--primary-600); border-color: var(--primary-600); color: var(--on-primary); }
.btn.danger { background: color-mix(in srgb, var(--danger) 80%, black); border-color: transparent; color: #fff; } /* mais escuro: texto branco legível nos dois temas */
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 70%, black); color: #fff; }
.btn.danger-ghost { border-color: transparent; color: var(--danger-ink); background: transparent; }
.btn.danger-ghost:hover { background: var(--danger-bg); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--primary-ink); padding: 0 8px; }
.btn.ghost:hover { background: var(--primary-50); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn.sm svg { width: 15px; height: 15px; }
.btn.has-filter, .btn.has-filter:hover, .icon-btn.has-filter, .icon-btn.has-filter:hover { color: var(--primary-ink); } /* filtro ligado: ícone e nome na cor do sistema */
/* Bolinha discreta no ícone de filtro quando há filtro ligado (topo e barra flutuante) */
.filter-ico { position: relative; display: inline-grid; font-style: normal; }
.has-filter .filter-ico::after { content: ''; position: absolute; top: -1px; right: -3px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 99px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--text-2); flex: none; text-decoration: none; }
.icon-btn:hover { background: var(--fill); color: var(--text); }
.icon-btn:disabled { opacity: .4; cursor: default; }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.link-btn { border: 0; background: none; color: var(--primary-ink); cursor: pointer; padding: 0; font-size: 13px; font-weight: 400; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger-ink); }
.link-btn svg { width: 14px; height: 14px; }
.chip-btn { border: 0; background: var(--fill); border-radius: 99px; padding: 3px 10px; font-size: 12px; cursor: pointer; color: var(--text-2); }
.chip-btn:hover { background: var(--fill-hover); color: var(--text); }

/* ---------- Elementos ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 99px; white-space: nowrap; background: color-mix(in srgb, var(--c) 13%, var(--surface)); color: color-mix(in srgb, var(--c) 78%, var(--ink-mix)); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c) 13%, var(--surface)); color: color-mix(in srgb, var(--c) 80%, var(--ink-mix)); font-weight: 600; font-size: 12px; }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.lg { width: 52px; height: 52px; font-size: 17px; }
.avatar svg { width: 16px; height: 16px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }
.dot.free { background: var(--surface); border: 1.5px dashed var(--border-strong); }
.dot.blocked { background: repeating-linear-gradient(-45deg, var(--stripe-b), var(--stripe-b) 2px, var(--border-strong) 2px, var(--border-strong) 4px); }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 6px; margin-top: 3px; }
.chip svg { width: 12px; height: 12px; }
.chip.ok { background: var(--teal-bg); color: var(--teal); }
.chip.pink { background: var(--pink-bg); color: var(--pink); }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; color: var(--text-3); text-align: center; }
.empty-state svg { width: 28px; height: 28px; opacity: .6; }
.empty-state p { margin: 0; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 30px; line-height: 1.1; letter-spacing: -.025em; }
.page-head p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.card { background: var(--surface); border-radius: var(--radius); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-head h3 { margin: 0; font-size: 14px; font-weight: 500; color: var(--text); }
.card-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
.card-toolbar .tabs { box-shadow: none; padding: 0; }
.card-toolbar > * { min-width: 0; max-width: 100%; } /* as abas rolam dentro do cartão em vez de alargar a página */
.card > .table-wrap, .card > [data-list] > .table-wrap { border-radius: 0 0 var(--radius) var(--radius); }
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Filtros da barra viram pílulas como a busca e os botões ao lado */
.toolbar-right select, .period select, .card-toolbar select { height: 34px; border: 0; border-radius: 99px; padding: 0 12px; background: var(--fill); outline: none; cursor: pointer; transition: background .15s; }
.toolbar-right select:hover, .period select:hover, .card-toolbar select:hover { background: var(--fill-hover); }
.period { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.period-custom { display: inline-flex; align-items: center; gap: 6px; }
.period-custom input { height: 34px; border: 1px solid var(--border-strong); border-radius: 9px; padding: 0 8px; background: var(--surface); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi-top { color: var(--text-2); font-size: 13px; font-weight: 400; }
.kpi strong { font-size: 26px; line-height: 1.15; letter-spacing: -.025em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi small { color: var(--text-3); font-size: 12px; }
.delta { font-weight: 500; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--danger-ink); }
/* Indicadores dos relatórios em linhas cheias (3 por linha; 4 quando são 4), sem um sobrando sozinho embaixo */
.report-body .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.report-body .kpis:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 560px) { .report-body .kpis, .report-body .kpis:has(> :nth-child(4):last-child) { grid-template-columns: 1fr 1fr; } }

.panel { background: var(--surface); border-radius: var(--radius); padding: 18px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
.panel-title { margin: 0 0 12px; font-size: 15px; font-weight: 500; }
.panel-head .panel-title { margin: 0; }
.grid-2, .grid-2-1, .grid-3 { display: grid; gap: 14px; margin-bottom: 14px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-2-1 { grid-template-columns: 2fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.sec-title { font-size: 13.5px; font-weight: 500; color: var(--text); margin: 20px 0 8px; }
.sec-h { margin: 0 0 12px; font-size: 16px; }
.form .sec-h { margin-top: 10px; }
.group-title { padding: 14px 16px 6px; font-weight: 500; font-size: 13px; }

/* Tabelas */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--text-3); padding: 10px 14px; background: var(--surface-2); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table .num { text-align: right; white-space: nowrap; }
.table tfoot td { background: var(--surface-2); border-top: 1px solid var(--border); }
.cell-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-user > div { display: flex; flex-direction: column; min-width: 0; }
.cell-user small { color: var(--text-3); font-size: 12px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--grid); }
.pager .muted { margin-right: auto; }

/* Abas e segmentado */
.tabs { display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; height: 34px; padding: 0 14px; border-radius: 99px; cursor: pointer; color: var(--text-2); font-weight: 400; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; flex: none; transition: background .15s, color .15s; }
.tabs button:hover { color: var(--text); background: var(--fill); }
.tabs button.active { color: var(--text); background: var(--primary-100); font-weight: 500; }
.tabs button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.tab-count { font-size: 11px; font-weight: 500; background: var(--fill); border-radius: 99px; padding: 0 7px; color: var(--text-2); }
.tabs button.active .tab-count { background: var(--surface); color: var(--text); }
.segmented { display: inline-flex; background: var(--fill); border-radius: 99px; padding: 3px; }
.segmented button { border: 0; background: none; height: 28px; padding: 0 13px; border-radius: 99px; cursor: pointer; font-weight: 400; color: var(--text-2); white-space: nowrap; }
.segmented button.active { background: var(--surface); color: var(--text); font-weight: 500; }
.segmented.sm button { height: 26px; padding: 0 10px; font-size: 13px; }

/* Gráficos */
.bchart { --h: 220px; --y-w: 66px; font-variant-numeric: tabular-nums; }
.bc-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin: -2px 0 14px; }
.bc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bc-legend i { width: 10px; height: 10px; border-radius: 3px; }
.bc-body { display: flex; height: var(--h); margin-top: 6px; }
.bc-y { position: relative; width: var(--y-w); flex: none; }
.bc-y span { position: absolute; right: 10px; transform: translateY(50%); font-size: 11px; color: var(--text-3); white-space: nowrap; line-height: 1; }
.bc-plot { position: relative; flex: 1; min-width: 0; }
.bc-grid i { position: absolute; left: 0; right: 0; height: 1px; background: var(--grid); }
.bc-grid i:first-child { background: var(--border-strong); }
.bc-cols { position: absolute; inset: 0; display: flex; }
.bc-col { flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; border-radius: 6px 6px 0 0; outline: none; transition: background .12s; }
.bc-col:hover, .bc-col:focus-visible { background: var(--primary-soft); }
.bc-col:hover i, .bc-col:focus-visible i { filter: brightness(1.08); }
.bc-stack { width: min(22px, 64%); display: flex; flex-direction: column-reverse; gap: 2px; }
.bc-stack i { display: block; flex-basis: 0; min-height: 2px; }
.bc-stack i:last-child { border-radius: 4px 4px 0 0; }
.bc-group { height: 100%; width: min(34px, 78%); display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.bc-group i { display: block; flex: 1; max-width: 14px; border-radius: 4px 4px 0 0; }
.bc-x { display: flex; margin: 8px 0 0 var(--y-w); }
.bc-x span { flex: 1; min-width: 0; text-align: center; font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: visible; }
.chart-tip { position: fixed; z-index: 300; pointer-events: none; min-width: 160px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 8px 11px; font-size: 12px; font-variant-numeric: tabular-nums; }
.tt-title { color: var(--text-3); font-weight: 400; margin-bottom: 5px; }
.tt-row { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.tt-key { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.tt-row strong { color: var(--text); font-weight: 500; }
.tt-row span { color: var(--text-3); margin-left: auto; padding-left: 12px; }
.tt-total { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 5px; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar-label { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 4px; }
.hbar-label span { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track, .progress { height: 7px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.hbar-track span, .progress span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.progress { height: 6px; margin-top: 6px; }
.use-cell { display: flex; flex-direction: column; min-width: 90px; }
.use-cell .progress { margin-top: 3px; }

/* Listas */
.rem-list { display: flex; flex-direction: column; gap: 2px; }
.rem-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 9px; }
.rem-item.clickable:hover, .rem-item:hover { background: var(--surface-2); }
.rem-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rem-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; font-size: 13.5px; }
.rem-main small { color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.time-pill { font-weight: 600; font-size: 13px; color: var(--primary-ink); background: var(--primary-50); border-radius: 8px; padding: 4px 8px; }
.team-list { display: flex; flex-direction: column; gap: 8px; }
.team-row { display: flex; align-items: center; gap: 10px; }
.team-occ { width: 120px; display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; font-weight: 500; }
.team-occ .progress { width: 100%; margin-top: 3px; }
.tx-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.tx-ico svg { width: 15px; height: 15px; }
.tx-ico.receita { background: var(--ok-bg); color: var(--ok); }
.tx-ico.despesa { background: var(--danger-bg); color: var(--danger); }
.tx-desc { display: inline-flex; align-items: center; gap: 6px; }
.tx-desc svg { width: 14px; height: 14px; }
.tx-desc.receita svg { color: var(--ok); }
.tx-desc.despesa svg { color: var(--danger); }
.sum-strip { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 4px 2px 12px; font-size: 13px; color: var(--text-2); }

.alerts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.alert-chip { display: inline-flex; align-items: center; gap: 8px; border: 0; background: var(--primary-100); color: var(--text); border-radius: 12px; padding: 8px 14px; cursor: pointer; font-size: 13px; text-align: left; transition: filter .15s; }
.alert-chip:hover { filter: brightness(.97); }
.alert-chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.alert-chip.danger { background: var(--danger-bg); color: var(--danger-ink); }
.alert-chip svg { width: 16px; height: 16px; }

.goal-ring { --p: 0; width: 150px; height: 150px; border-radius: 50%; margin: 4px auto 14px; display: grid; place-items: center; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--fill) 0); } /* taste-skill-ignore: anel de progresso (dado), não enfeite */
.goal-ring > div { width: 118px; height: 118px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.goal-ring strong { font-size: 26px; letter-spacing: -.02em; }
.goal-ring small { color: var(--text-3); }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 8px; }
.info-grid > div { background: var(--surface-2); border-radius: 10px; padding: 9px 12px; display: flex; flex-direction: column; }
.info-grid small { color: var(--text-3); font-size: 12px; }
.info-box, .link-box { display: flex; align-items: center; gap: 10px; background: var(--primary-50); color: var(--text-2); padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.info-box svg, .link-box svg { color: var(--primary-ink); }
.link-box span { flex: 1; word-break: break-all; }

.warnings { display: flex; flex-direction: column; gap: 6px; }
.warnings:empty { display: none; }
.warn { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); }
.warn svg { width: 16px; height: 16px; }
.warn.danger { background: var(--danger-bg); color: var(--danger-ink); }
.warn.ok { background: var(--teal-bg); color: var(--teal); }

/* ---------- Formulários ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 400; color: var(--text-2); }
.field em { color: var(--danger-ink); font-style: normal; }
.field input, .field select, .field textarea, .sm-input, .notes-area, .items-editor select, .items-editor input, .hours-row input, .cat-row input, .pay-config-row input, .pay-row select, .goal-form-row > input {
  height: 38px; border: 1px solid var(--border-strong); border-radius: 9px; padding: 0 11px; background: var(--surface); outline: none; width: 100%; min-width: 0; transition: border-color .15s, box-shadow .15s;
}
.field textarea, .notes-area { height: auto; padding: 8px 11px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .sm-input:focus, .notes-area:focus, input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); outline: none; }
.field input:disabled { background: var(--surface-2); color: var(--text-3); }
.field input[readonly] { background: var(--surface-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row.three { grid-template-columns: 1.2fr 1fr 1fr; }
.sm-input { height: 32px; padding: 0 8px; font-size: 13px; }
.num-input { width: 92px; text-align: right; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; color: var(--text-2); }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); } /* caixas marcadas na cor escolhida, nunca o azul do navegador */
.check input { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; }
.check svg { width: 15px; height: 15px; }
.switch-row { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; color: var(--text-2); }
/* Escondido só da vista: o interruptor continua alcançável pelo teclado (Tab + espaço) */
.switch-row input, .toggle-row input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.switch-row input:focus-visible + .switch, .toggle-row input:focus-visible + .switch { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Erro de validação embaixo do campo (ui.fieldError) e campo obrigatório deixado vazio */
.field-error { display: flex; align-items: flex-start; gap: 5px; color: var(--danger-ink); font-size: 12.5px; font-weight: 400; line-height: 1.35; animation: pop .15s ease; }
.field-error svg { width: 14px; height: 14px; margin-top: 1px; }
.field [aria-invalid="true"], .field :is(input:required, select:required, textarea:required, input[type=email]):user-invalid { border-color: var(--danger); }
.field [aria-invalid="true"]:focus, .field :is(input:required, select:required, textarea:required, input[type=email]):user-invalid:focus { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent); }
.char-count { align-self: flex-end; margin-top: -2px; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; visibility: hidden; }
textarea:focus + .char-count { visibility: visible; }
.char-count.near { color: var(--warn-ink); }
.switch { width: 34px; height: 20px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .15s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: var(--shadow-sm); }
.switch-row input:checked + .switch { background: var(--primary); }
.switch-row input:checked + .switch::after { transform: translateX(14px); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); background: var(--c); cursor: pointer; display: grid; place-items: center; color: #fff; padding: 0; }
.swatch.active { box-shadow: 0 0 0 2px var(--text); }

/* Campo de status do agendamento: lista com a cor de cada status, editar e adicionar */
.status-select { display: flex; align-items: center; gap: 9px; width: 100%; height: 38px; padding: 0 10px 0 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.status-select:hover { border-color: var(--primary); }
.status-select:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.status-select .st-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-select > svg { width: 16px; height: 16px; color: var(--text-3); }
.status-menu { padding: 6px; max-height: min(460px, calc(100vh - 24px)); overflow-y: auto; }
.st-opt { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 2px 4px 2px 10px; border-radius: 8px; cursor: pointer; }
.st-opt:hover { background: var(--surface-2); }
.st-opt.active { font-weight: 500; }
.st-opt .st-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-check { display: inline-flex; font-style: normal; color: var(--primary-ink); }
.st-check svg { width: 15px; height: 15px; }
.st-opt .icon-btn { opacity: .5; }
.st-opt:hover .icon-btn, .st-opt .icon-btn:focus-visible { opacity: 1; }
.st-add { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--primary-ink); font: inherit; font-weight: 500; cursor: pointer; text-align: left; }
.st-add:hover { background: var(--primary-50); }
.st-add svg { width: 16px; height: 16px; }
/* Prévia do bloco na agenda (mesmo estilo dos agendamentos) */
.st-demo { display: flex; flex-direction: column; gap: 1px; max-width: 240px; padding: 6px 10px; border-radius: 6px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 26%, var(--surface)); font-size: 12.5px; line-height: 1.3; }
.st-demo small { color: var(--text-2); font-size: 11px; }
.st-demo span { color: var(--text-2); }
.st-system { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; color: var(--text-2); }
.st-system > svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--text-3); }
.st-system strong { display: block; color: var(--text); font-size: 13px; margin-bottom: 2px; }
.swatch svg { width: 14px; height: 14px; stroke-width: 3; }
.row-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.row-actions.center { justify-content: center; }

/* Autocomplete */
.ac-list { position: fixed; z-index: 120; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; max-height: 280px; overflow: auto; }
.ac-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.ac-item.on, .ac-item:hover { background: var(--primary-50); }
.ac-item > div { display: flex; flex-direction: column; min-width: 0; }
.ac-item small { color: var(--text-3); font-size: 12px; }
.ac-item svg { color: var(--primary-ink); }
.ac-item.ac-create { position: sticky; bottom: -4px; margin: 4px -4px -4px; padding: 10px 14px; border-radius: 0; background: var(--surface); border-top: 1px solid var(--border); font-weight: 500; color: var(--primary-ink); }
.ac-item.ac-create :is(strong, svg) { color: var(--primary-ink); }
.ac-item.ac-create.on, .ac-item.ac-create:hover { background: var(--primary-50); }

/* ---------- Modal / drawer / menu ---------- */
.modal-backdrop { position: fixed; inset: 0; background: var(--backdrop); z-index: 90; display: grid; place-items: center; padding: 16px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.985); } }
.modal { width: min(560px, 100%); min-width: 0; max-width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); animation: pop .18s ease; }
.modal.sm { width: min(420px, 100%); }
.modal.lg { width: min(820px, 100%); }
.modal.xl { width: min(1080px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px 10px; }
.modal-head h2 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.modal-content { padding: 4px 20px 16px; overflow-y: auto; flex: 1; }
.modal-content > .tabs { margin: 0 -20px 14px; padding: 0 20px; }
.modal-foot, .foot-flex { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.modal-foot { padding: 12px 20px; background: var(--surface-2); border-radius: 0 0 16px 16px; }
.foot-flex { width: 100%; }
.modal.confirm { text-align: center; }
.modal.confirm .modal-content { padding-top: 22px; }
.modal.confirm h3 { margin: 8px 0 0; font-size: 17px; }
.modal.confirm p { margin: 6px 0 0; color: var(--text-2); }
.confirm-icon { width: 50px; height: 50px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--warn-bg); color: var(--warn); }
.confirm-icon.danger { background: var(--danger-bg); color: var(--danger); }
.confirm-icon svg { width: 26px; height: 26px; }
.drawer-backdrop { position: fixed; inset: 0; background: var(--backdrop); z-index: 85; animation: fade .15s ease; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(var(--w), 100%); background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; animation: slide .2s ease; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; }
.drawer-head h2 { margin: 0; font-size: 16px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px; }
.menu { position: fixed; z-index: 130; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; animation: pop .12s ease; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left; color: var(--text); }
.menu-item:hover { background: var(--surface-2); }
.menu-item svg { width: 16px; height: 16px; color: var(--text-2); }
.menu-item span { flex: 1; }
.menu-item small { color: var(--text-3); font-size: 11px; background: var(--fill); border-radius: 4px; padding: 0 5px; }
.menu-item.danger, .menu-item.danger svg { color: var(--danger-ink); }
.menu-item.active, .menu-item.active svg { color: var(--primary-ink); font-weight: 500; }
.menu-check { display: inline-flex; font-style: normal; }
.menu-form { display: flex; flex-direction: column; gap: 8px; padding: 6px 6px 4px; }
.menu-title { font-size: 12px; font-weight: 500; color: var(--text-3); }
.menu-sec { padding: 6px 10px 2px; }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--toast-bg); color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; display: flex; align-items: center; gap: 10px; animation: pop .18s ease; transition: opacity .25s; max-width: 90vw; }
.toast svg { width: 16px; height: 16px; color: #4ade80; }
.toast.error svg { color: #f87171; }
.toast.out { opacity: 0; }

/* ---------- Agenda ---------- */
.agenda { height: 100%; display: flex; gap: 14px; }
.mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mini-head strong { font-size: 14px; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mini-grid .dow { font-size: 11px; color: var(--text-3); font-weight: 500; padding: 4px 0; }
.mini-grid button { position: relative; border: 0; background: none; height: 30px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.mini-grid button:hover { background: var(--surface-2); }
.mini-grid button.muted { color: var(--text-3); }
.mini-grid button.today { color: var(--primary-ink); font-weight: 600; }
.mini-grid button.selected { background: var(--primary); color: var(--on-primary); font-weight: 500; }
.mini-grid button.has::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--primary); transform: translateX(-50%); }
.mini-grid button.selected.has::after { background: var(--on-primary); }
.stat { background: var(--surface-2); border-radius: 10px; padding: 9px 12px; }
.stat small { display: block; color: var(--text-3); font-size: 11.5px; }
.stat strong { font-size: 18px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat.wide { grid-column: span 2; }
.pro-list, .legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pro-list label { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 8px; cursor: pointer; }
.pro-list label:hover { background: var(--surface-2); }
.pro-list input { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; }
.pro-list .name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.pro-list .name small { color: var(--text-3); font-size: 12px; }
.legend li { display: flex; align-items: center; gap: 10px; padding: 3px 6px; font-size: 13px; color: var(--text-2); }
.agenda-dock { display: none; }
/* Troca de dia pelo arraste lateral (celular) */
@keyframes swipe-next { from { opacity: .35; transform: translateX(48px); } }
@keyframes swipe-prev { from { opacity: .35; transform: translateX(-48px); } }
.fc-view-harness.swipe-next { animation: swipe-next .22s ease-out; }
.fc-view-harness.swipe-prev { animation: swipe-prev .22s ease-out; }
.calendar-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; position: relative; }
/* Dia sem nenhuma coluna (todos de folga ou desmarcados no filtro) */
.cal-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(340px, calc(100% - 32px)); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 18px; text-align: center; background: var(--surface-2); border-radius: var(--radius); color: var(--text-2); pointer-events: none; z-index: 3; }
.cal-empty svg { width: 28px; height: 28px; color: var(--text-3); }
.cal-empty strong { color: var(--text); font-size: 15px; }
.cal-empty small { color: var(--text-3); font-size: 13px; line-height: 1.4; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.toolbar-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cal-title { margin: 0 0 0 4px; min-width: 0; font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
/* A data é um botão: clicar nela (ou no ícone) abre o calendário do mês */
.cal-title-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 99px; background: none; color: var(--text); font: inherit; cursor: pointer; transition: background .15s; }
.cal-title-btn:hover, .cal-title-btn[aria-expanded="true"] { background: var(--fill); }
.cal-title-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cal-title-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-pick { margin-left: 8px; } /* separado das setas: ‹ data › 📅 */
.cal-pick svg { color: var(--primary-ink); }
/* Cabeçalho do calendário: o nome do mês abre a escolha de mês e ano */
.mini-title { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border: 0; border-radius: 99px; background: none; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.mini-title:hover { background: var(--fill); }
.mini-title svg { width: 14px; height: 14px; color: var(--text-3); }
.mini-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px 0 2px; }
.mini-months button { height: 40px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 13.5px; cursor: pointer; }
.mini-months button:hover { background: var(--surface-2); }
.mini-months button.today { color: var(--primary-ink); font-weight: 600; }
.mini-months button.selected { background: var(--primary); color: var(--on-primary); font-weight: 500; }
.mini-cal { padding: 4px 4px 0; }
.mini-foot { display: flex; justify-content: center; padding: 6px 0 2px; border-top: 1px solid var(--border); margin-top: 6px; }
/* Menus Filtrar e Configurações da agenda */
.agenda-menu { max-height: min(72vh, 600px); overflow-y: auto; }
.menu-title-row { display: flex; align-items: center; justify-content: space-between; }
.agenda-menu .pro-list { margin: 0 -4px; }
.agenda-cfg { gap: 0; }
.cfg-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--border); }
.agenda-cfg .menu-title + .cfg-row { border-top: 0; }
.cfg-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cfg-row strong { font-size: 13.5px; font-weight: 500; }
.cfg-row small { color: var(--text-3); font-size: 12px; line-height: 1.35; }
.cfg-row select, .cfg-row .dd-btn { flex: none; width: 140px; height: 34px; border: 0; border-radius: 99px; padding: 0 12px; background: var(--fill); cursor: pointer; }
/* ui.dropdown: botão + lista própria no lugar da lista nativa do navegador */
.dd-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 12px; min-height: 34px; border: 0; border-radius: 99px; background: var(--fill); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.dd-btn:hover:not(:disabled) { background: var(--fill-hover); }
.dd-btn:disabled { opacity: .55; cursor: not-allowed; }
.dd-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn svg { width: 14px; height: 14px; flex: none; color: var(--text-3); transition: transform .15s; }
.dd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.dd-list { position: fixed; z-index: 140; max-height: min(320px, calc(100vh - 16px)); overflow-y: auto; padding: 5px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); animation: pop .12s ease; }
.dd-list button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; white-space: nowrap; }
.dd-list button:hover, .dd-list button:focus-visible { background: var(--fill-hover); outline: none; }
.dd-list button.on { color: var(--primary-ink); font-weight: 500; }
.dd-list button svg { width: 15px; height: 15px; flex: none; }
.dd-list button:disabled { opacity: .45; cursor: not-allowed; }
.cfg-row .switch-row { flex: none; }
#calendar { flex: 1; min-height: 0; }

.fc { --fc-border-color: var(--border); --fc-today-bg-color: transparent; --fc-now-indicator-color: #ef4444; --fc-non-business-color: rgba(143, 148, 168, .13); --fc-highlight-color: color-mix(in srgb, var(--primary) 14%, transparent); --fc-page-bg-color: var(--surface); --fc-neutral-bg-color: var(--surface-2); --fc-list-event-hover-bg-color: var(--surface-2); --fc-small-font-size: 12px; height: 100%; }
.fc .fc-scrollgrid { border-left: 0; border-right: 0; }
.view-agenda .toolbar { border-bottom: 0; }
.view-agenda .fc .fc-scrollgrid { border-top: 0; }
/* transparentes (e não removidas) para as colunas manterem a largura e o cabeçalho continuar alinhado à grade */
.fc .fc-resourceTimeGridDay-view .fc-col-header-cell, .fc .fc-resourceTimeGridDay-view .fc-timegrid-col,
.fc .fc-resourceTimeGridDay-view .fc-timegrid-axis, .fc .fc-resourceTimeGridDay-view .fc-timegrid-slot-label, .fc .fc-resourceTimeGridDay-view .fc-timegrid-slot-lane,
.fc .fc-resourceTimeGridDay-view .fc-scrollgrid-section > td, .fc .fc-resourceTimeGridDay-view .fc-scrollgrid-section > th { border-left-color: transparent; border-right-color: transparent; }
.fc .fc-col-header-cell-cushion { padding: 8px 4px; color: var(--text-2); font-weight: 500; text-decoration: none; text-transform: capitalize; }
.fc .fc-timegrid-slot { height: 1.9em; }
/* Linhas mais altas nos intervalos maiores (30 e 60 min ficavam apertados); 5 e 10 min continuam compactos */
#calendar[data-slot="00:15:00"] .fc-timegrid-slot { height: 2.4em; }
#calendar[data-slot="00:30:00"] .fc-timegrid-slot { height: 36px; }
#calendar[data-slot="01:00:00"] .fc-timegrid-slot { height: 3.8em; }
.fc .fc-timegrid-slot-minor { border-top-style: dashed; border-top-color: var(--grid); }
.fc .fc-timegrid-slot-label-cushion { font-size: 12px; color: var(--text-3); padding: 0 8px; }
.fc .fc-daygrid-day-number { color: var(--text-2); text-decoration: none; font-size: 13px; padding: 6px 8px; }
.fc .fc-day-today .fc-daygrid-day-number { background: var(--primary); color: var(--on-primary); border-radius: 99px; min-width: 26px; text-align: center; margin: 4px; padding: 3px 7px; }
.fc .fc-day-today .fc-col-header-cell-cushion { color: var(--primary-ink); }
.fc .fc-timegrid-now-indicator-line { border-width: 2px 0 0; }
.fc a { color: inherit; }
.fc .fc-more-link { color: var(--primary-ink); font-weight: 400; font-size: 12px; }
.fc .fc-list-day-cushion { background: var(--surface-2); }
.fc .fc-list-event td { border-color: var(--border); }
.fc .fc-list-event-dot { border-color: var(--c, var(--primary)); }
.fc .res-head { text-transform: none; }
.res-head { display: flex; align-items: center; gap: 9px; padding: 7px 6px; justify-content: center; }
.res-head .meta { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.2; }
.res-head strong { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.res-head .res-first { display: none; }
.res-head small { font-size: 11px; color: var(--text-3); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* Cabeçalho do profissional encolhe junto com a coluna ("Todos na tela"): nunca empurra a agenda para o lado */
.fc .fc-resourceTimeGridDay-view .fc-col-header-cell .fc-scrollgrid-sync-inner { container-type: inline-size; overflow: hidden; }
.fc .fc-resourceTimeGridDay-view .fc-col-header-cell-cushion { display: block; max-width: 100%; }
.res-head { min-width: 0; }
.res-head .avatar { flex: none; }
.res-head .meta { overflow: hidden; }
.res-head strong { max-width: 100%; }
@container (max-width: 130px) {
  .res-head { flex-direction: column; gap: 4px; padding: 6px 2px; }
  .res-head .meta { align-items: center; max-width: 100%; text-align: center; }
  .res-head strong { font-size: 12px; }
}
@container (max-width: 64px) { .res-head small { display: none; } }

.fc-event.appt { --c: var(--primary); background: color-mix(in srgb, var(--c) 26%, var(--surface)) !important; border: 0 !important; border-left: 4px solid var(--c) !important; border-radius: 6px !important; color: var(--text) !important; box-shadow: none; cursor: pointer; overflow: hidden; transition: background-color .15s; }
.fc-event.appt:hover { background: color-mix(in srgb, var(--c) 36%, var(--surface)) !important; z-index: 5 !important; }
.fc-event.appt .fc-event-main { color: var(--text); padding: 0; }
.fc-event.appt .ev-flag { color: var(--text-2); }
.fc-event.appt.by-status .ev-top .st { display: none; } /* a cor do bloco já é o status */
.fc-list-event.appt { background: transparent !important; border: 0 !important; color: var(--text) !important; box-shadow: none; }
/* Poppins tem acentos e hastes altos: com entrelinha menor que 1.4 o topo das letras é cortado pelo overflow */
.ev { display: flex; flex-direction: column; gap: 1px; height: 100%; overflow: hidden; font-size: 11px; line-height: 1.4; padding: 3px 6px; }
.ev > .ev-top, .ev > .ev-client { flex-shrink: 0; } /* o nome nunca é espremido; o que não cabe some embaixo */
.ev-time { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.ev-top { display: flex; align-items: center; gap: 5px; color: var(--text-2); font-size: 11px; font-weight: 400; }
.ev-top .st { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--st); flex: none; }
.ev-flag { display: inline-grid; color: var(--text-3); }
.ev-flag svg { width: 11px; height: 11px; }
.ev-client { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-service { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.compact { font-size: 11px; }
.ev.compact .ev-top { font-size: 10px; }
/* Linha do serviço + observação (ícone + texto): no bloco alto a observação fica embaixo do serviço (até 4 linhas);
   no bloco de 1 ou 2 linhas ela vai na mesma linha do serviço, cortada com reticências (texto inteiro ao passar o mouse) */
.ev-line { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ev-notes { display: flex; align-items: flex-start; gap: 4px; min-width: 0; margin-top: 1px; color: var(--text-2); font-size: 11px; line-height: 1.25; font-style: italic; }
.ev-notes svg { width: 11px; height: 11px; flex: none; margin-top: 1px; }
.ev-notes > span { min-width: 0; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.ev.compact .ev-notes { font-size: 10px; }
.ev.compact .ev-notes > span { -webkit-line-clamp: 3; line-clamp: 3; }
.fc-event.appt .ev-note-flag { color: var(--text-2); }
.ev-list { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ev-list-notes { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 12px; font-style: italic; }
.ev-list-notes svg { width: 12px; height: 12px; flex: none; }
.fc-event.appt.is-canceled .ev-client, .fc-event.appt.is-canceled .ev-service { text-decoration: line-through; color: var(--text-2); }
.fc-event.appt.is-canceled { opacity: .8; }
.fc-daygrid-event.appt { padding: 1px 4px; margin-top: 2px !important; }
.fc-daygrid-event.appt .ev { flex-direction: row; gap: 6px; align-items: center; }
.fc-daygrid-event.appt .ev-line, .fc-daygrid-event.appt .ev-top .st, .fc-daygrid-event.appt .ev-flag { display: none; }
.fc-daygrid-event.appt .ev-flag.ev-note-flag { display: inline-grid; }
/* Agendamentos curtos na grade de horários: o nome do cliente vem primeiro e nunca some;
   horário e serviço usam o espaço que sobrar (a altura do bloco é medida por container query) */
.fc-timegrid-event.appt .fc-event-main { height: 100%; container-type: size; }
@container (max-height: 64px) {
  /* Sem altura para a observação embaixo: ela vai ao lado do serviço, numa linha só */
  .ev-line { flex-direction: row; align-items: center; gap: 6px; }
  .ev-line .ev-service { flex: 0 0 auto; max-width: 60%; min-width: 0; } /* serviço inteiro (até 60% da linha); a observação usa o resto */
  .ev-line .ev-service:only-child { max-width: 100%; flex-shrink: 1; }
  .ev-notes { flex: 1 1 auto; min-width: 14px; margin-top: 0; align-items: center; }
  .ev-notes svg { margin-top: 0; }
  .ev-notes > span { display: block; white-space: nowrap; text-overflow: ellipsis; }
}
@container (max-height: 50px) {
  .ev { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr) auto; grid-template-rows: max-content; align-content: start; column-gap: 6px; row-gap: 1px; } /* 1ª linha (nome) sempre inteira */
  .ev-top { display: contents; }
  .ev-flag { display: none; }
  .ev-client { grid-area: 1 / 1; }
  .ev-time { grid-area: 1 / 2; justify-self: end; max-width: 100%; }
  .ev-top .st { grid-area: 1 / 3; align-self: center; margin-left: 0; }
  .ev-line { grid-area: 2 / 1 / 3 / 4; }
}
@container (max-height: 30px) {
  .ev { display: flex; flex-direction: row; align-items: center; gap: 6px; padding: 0 6px; }
  .ev-client { order: 0; flex: 0 0 auto; max-width: 100%; min-width: 0; }
  .ev-time { order: 1; flex: 0 1000 auto; }
  .ev-line { order: 2; flex: 1 1 auto; min-width: 0; } /* o horário encolhe antes (flex-shrink 1000) */
  .ev-top .st { order: 3; }
}
@container (max-height: 18px) {
  .ev { padding: 0 5px; font-size: 11px; line-height: 1.2; }
  .ev-client { font-size: 11.5px; }
}
/* Blocos estreitos (vários agendamentos lado a lado): nome primeiro, podendo quebrar linha */
@container (max-width: 110px) and (min-height: 51px) {
  .ev { padding: 3px 4px; }
  .ev-client { order: -1; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
}
.fc-event.block { background: repeating-linear-gradient(-45deg, var(--stripe-a), var(--stripe-a) 6px, var(--stripe-b) 6px, var(--stripe-b) 12px) !important; border: 0 !important; border-radius: 6px !important; color: var(--text-2) !important; cursor: pointer; }
.fc-event.block .fc-event-main { color: var(--text-2); padding: 3px 6px; font-size: 12px; }
.block-label { display: flex; align-items: center; gap: 6px; font-weight: 500; min-width: 0; overflow: hidden; }
.block-label > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block-label svg { flex: none; }
.block-label svg { width: 13px; height: 13px; }
/* Horário livre: caixinha tracejada do mesmo tamanho de um agendamento (sem margem extra) */
.fc-event.free-slot { background: var(--surface) !important; border: 1px dashed var(--border-strong) !important; border-radius: 6px !important; box-shadow: none !important; cursor: pointer; margin: 0; }
/* Fundo cheio: a linha dos 30 min não aparece por trás da caixinha. Agendamentos e livres com o mesmo respiro
   em cima e embaixo, para dois seguidos não encostarem um no outro (e continuarem do mesmo tamanho) */
.fc-timegrid-event.appt, .fc-timegrid-event.free-slot { margin-top: 1px !important; margin-bottom: 1px !important; }
.fc-event.free-slot .fc-event-main { color: var(--text-3); container-type: inline-size; }
.fc-event.free-slot:hover { background: var(--primary-50) !important; }
.fc-event.free-slot:hover .free-label { color: var(--primary-ink); }
/* Sempre numa linha e inteiro: a letra diminui com a largura da caixinha */
.free-label { height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; font-size: clamp(7px, 12.5cqw, 11.5px); line-height: 1.2; color: var(--text-3); white-space: nowrap; overflow: hidden; }
/* Coluna estreita ("Todos na tela" no celular): o horário quebra em duas linhas em vez de cortar */
/* Prévia da seleção em horário vazio (o arrasto de agendamentos existentes mantém o visual normal) */
.fc-event-mirror:not(.appt):not(.block) { background: var(--primary-50) !important; border: 1.5px dashed var(--primary) !important; border-radius: 6px !important; box-shadow: none !important; margin: 1px 2px; }
.free-label.new-label { color: var(--primary-ink); font-weight: 500; padding: 0 6px; }
.fc-event.flash { animation: flash 1.2s ease 2; }
@keyframes flash { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 45%, transparent); } }

.popover { position: fixed; z-index: 80; width: 340px; max-height: calc(100vh - 24px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); animation: pop .14s ease; }
.pop-head { padding: 14px 14px 6px; display: flex; gap: 12px; align-items: flex-start; }
.pop-head .who { flex: 1; min-width: 0; }
.pop-head h4 { margin: 0; font-size: 15px; }
.pop-head a { color: var(--primary-ink); font-size: 13px; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; margin-top: 2px; }
.pop-head a svg { width: 14px; height: 14px; }
.pop-body { padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.pop-row { display: flex; gap: 10px; align-items: center; color: var(--text-2); font-size: 13px; }
.pop-row svg { width: 16px; height: 16px; color: var(--text-3); }
.pop-alert { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--danger-ink); background: var(--danger-bg); border-radius: 8px; padding: 6px 9px; }
.pop-alert svg { width: 15px; height: 15px; }
.pop-services { display: flex; flex-direction: column; gap: 4px; }
.pop-svc { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 8px 10px; background: var(--surface-2); border-radius: 10px; font-size: 13px; }
.pop-svc.on { background: var(--primary-50); }
.pop-svc span { font-weight: 500; }
.pop-svc small { color: var(--text-3); grid-column: 1; }
.pop-svc strong { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.pop-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.pop-tags:empty { display: none; }
.pop-notes { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: 13px; color: var(--text-2); }
.status-pills { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 14px 12px; }
.pill { border: 1px solid transparent; background: var(--fill); border-radius: 99px; padding: 3px 9px; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.pill:hover { background: var(--fill-hover); color: var(--text); }
.pill.active { background: color-mix(in srgb, var(--c) 14%, var(--surface)); border-color: var(--c); color: var(--text); font-weight: 500; }
.pill .dot { width: 8px; height: 8px; }
.pop-foot { display: flex; gap: 6px; padding: 10px 14px; background: var(--surface-2); border-radius: 0 0 14px 14px; }
.pop-foot .btn { height: 32px; flex: 1; padding: 0 8px; font-size: 13px; }
.pop-foot .btn svg { width: 15px; height: 15px; }

/* Modal de agendamento */
.client-card { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.client-card:empty { display: none; }
.client-card > .muted { display: inline-flex; align-items: center; gap: 6px; }
.client-card > .muted svg { width: 14px; height: 14px; }
.client-card:has(.cc-main) { background: var(--surface-2); border-radius: 12px; padding: 9px 11px; }
.cc-main { display: flex; flex-direction: column; min-width: 140px; }
.cc-main small { color: var(--text-3); }
.cc-tags { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; flex: 1; }
.svc-rows { display: flex; flex-direction: column; gap: 8px; }
.svc-row { display: grid; grid-template-columns: 2.2fr 1.5fr .9fr 1fr .9fr auto; gap: 8px; align-items: end; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.svc-row .field > span { font-size: 12px; }
.svc-row .icon-btn { margin-bottom: 1px; }
.total-line { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--primary-50); color: var(--text-2); }
.total-line strong { color: var(--text); font-size: 15px; }
.rem-item .btn.sm { flex: none; }
/* Confirmações de amanhã no celular: nome em cima; status, lembrete e botão embaixo */
@media (max-width: 640px) {
  .rem-confirm .rem-item { flex-wrap: wrap; row-gap: 6px; }
  .rem-confirm .rem-main { flex: 1 1 calc(100% - 44px); }
  .rem-confirm .rem-item > .badge { margin-left: 40px; }
  .rem-confirm .rem-item > .btn { margin-left: auto; }
}

/* ---------- Comanda ---------- */
.cmd-grid { display: grid; grid-template-columns: 1fr 320px; gap: 18px; }
.cmd-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cmd-client { display: flex; flex-direction: column; gap: 8px; }
.cmd-client-ro { display: flex; align-items: center; gap: 10px; }
.cmd-client-ro > div { display: flex; flex-direction: column; }
.cmd-client-ro small { color: var(--text-3); }
.cmd-items { border-radius: 12px; overflow: hidden; }
.cmd-items td, .cmd-items th { padding: 8px 10px; }
.cmd-items select.sm-input { min-width: 130px; }
.it-name { display: flex; flex-direction: column; }
.it-name small { color: var(--text-3); font-size: 12px; }
.cmd-side { display: flex; flex-direction: column; gap: 12px; }
.sum-box, .pay-box, .meta-box { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.sum-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.sum-line > span:first-child { color: var(--text-2); }
.sum-total { display: flex; align-items: center; justify-content: space-between; padding-top: 6px; }
.sum-total strong { font-size: 26px; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.pay-head { display: flex; align-items: center; justify-content: space-between; }
.pay-head h4 { margin: 0; font-size: 14px; }
.pay-row { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.pay-row select { flex: 1; height: 32px; }
.quick-pay { display: flex; flex-wrap: wrap; gap: 5px; }
.meta-box { gap: 2px; }

/* ---------- Ficha do cliente (modal com menu de seções à esquerda) ---------- */
.modal.ficha-modal { width: min(1120px, 100%); height: min(800px, calc(100vh - 32px)); }
.ficha-modal .modal-content { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.ficha-top { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; column-gap: 14px; padding: 16px 16px 16px 24px; }
.ficha-av { border: 0; padding: 0; background: none; border-radius: 50%; cursor: pointer; }
.ficha-av:hover .avatar { filter: brightness(.97); }
.ficha-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ficha-id h3 { margin: 0; font-size: 19px; line-height: 1.3; }
.ficha-name { border: 0; padding: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.ficha-id .cc-tags { margin-top: 4px; }
.ficha-id .cc-tags:empty { display: none; }
.ficha-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.ficha-close { align-self: start; }
.ficha-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 230px 1fr; }
.ficha-nav { background: var(--surface-2); padding: 10px 0; overflow-y: auto; display: flex; flex-direction: column; }
.ficha-nav button { display: flex; align-items: center; gap: 11px; border: 0; border-right: 2px solid transparent; margin-right: -1px; background: none; padding: 12px 16px 12px 24px; color: var(--text-2); font-weight: 400; text-align: left; cursor: pointer; transition: color .15s, background .15s; }
.ficha-nav button svg { width: 17px; height: 17px; color: var(--text-3); }
.ficha-nav button span { flex: 1; }
.ficha-nav button:hover { color: var(--text); background: var(--surface-2); }
.ficha-nav button.active { color: var(--text); background: var(--primary-100); border-right-color: var(--primary); }
.ficha-nav button.active svg { color: var(--primary-ink); }
.ficha-panels { min-width: 0; overflow-y: auto; outline: none; }
.ficha-panel { padding: 20px 24px 28px; }
.ficha-panel > .sec-title.first, .ficha-panel > .sec-title:first-child { margin-top: 0; }
/* Cadastro do serviço: o mesmo modal da ficha, um pouco menor, com foto quadrada */
.modal.ficha-modal.svc-modal { width: min(980px, 100%); height: min(720px, calc(100vh - 32px)); }
.svc-top-thumb { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--fill); color: var(--text-3); }
.svc-top-thumb img { width: 100%; height: 100%; object-fit: cover; }
.svc-top-thumb svg { width: 22px; height: 22px; }

.mini-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.mini-kpis > div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.mini-kpis small { color: var(--text-3); font-size: 11.5px; }
.mini-kpis strong { font-size: 15px; }
.notes-area { width: 100%; }
/* Nome de cliente/profissional que abre o cadastro ao clicar (ui.clientName / ui.proName) */
.name-hit { cursor: pointer; }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--grid); cursor: pointer; }
.tl-item:hover { background: var(--surface-2); }
.tl-date { width: 48px; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.tl-date small { color: var(--text-3); font-size: 11px; }
.tl-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tl-main small { color: var(--text-3); font-size: 12px; }
.pkg-card { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 4px; }
.pkg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pkg-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-top: 6px; }

/* ---------- Cadastros ---------- */
.pro-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pro-card { padding: 18px; cursor: pointer; transition: background .15s; display: flex; flex-direction: column; gap: 12px; }
.pro-card:hover { background: var(--primary-50); }
.pro-card.inactive { opacity: .6; }
.pro-card-head { display: flex; gap: 12px; align-items: center; }
.pro-card-head h3 { margin: 0; font-size: 16px; }
.pro-card-head > div { flex: 1; }
.pro-card-info { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.pro-card-info > div { display: flex; gap: 8px; align-items: center; }
.pro-card-info svg { width: 15px; height: 15px; color: var(--text-3); }
.hours-table { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.hours-row { display: grid; grid-template-columns: 1.2fr repeat(4, 1fr); gap: 8px; align-items: center; }
.hours-row.head span { font-size: 12px; color: var(--text-3); font-weight: 500; }
.hours-row input { height: 34px; padding: 0 8px; }
.svc-check-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.svc-check-group .sec-title { margin: 8px 0 2px; }
.cat-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cat-row input { flex: 1; height: 34px; }
.cat-row .muted { white-space: nowrap; min-width: 74px; }
.cat-row.dragging { opacity: .45; }
.cat-row.drop-target { box-shadow: 0 -2px 0 var(--primary); }
.cat-hint { margin: 0 0 10px; }

/* ---------- Pacotes ---------- */
.items-editor { display: flex; flex-direction: column; gap: 6px; }
.ie-row { display: grid; grid-template-columns: 1fr 116px auto; gap: 6px; align-items: center; }
.ie-row input { text-align: center; }
.saving-box { background: var(--surface-2); border-radius: 10px; padding: 9px 12px; font-size: 13px; color: var(--text-2); }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; padding: 16px; }
.offer-card { border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: background .15s; background: var(--surface); }
.offer-card:hover { background: var(--primary-50); }
.offer-card.inactive { opacity: .6; }
.offer-card h3 { margin: 0; font-size: 16px; }
.offer-card p { margin: 0; }
.offer-card ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.offer-head { display: flex; justify-content: space-between; align-items: center; }
.offer-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--teal-bg); color: var(--teal); }
.offer-icon.pink { background: var(--pink-bg); color: var(--pink); }
.offer-price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.offer-price strong { font-size: 22px; letter-spacing: -.02em; }
.offer-foot { display: flex; justify-content: space-between; }
.offer-card .btn { align-self: flex-start; }

/* ---------- Financeiro ---------- */
.cash-closed { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; flex-wrap: wrap; }
.cash-closed > svg { width: 32px; height: 32px; color: var(--text-3); }
.cash-closed h3 { margin: 0; }
.cash-closed p { margin: 2px 0 0; }
.cash-closed > div { flex: 1; }
.cash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cash-head h3 { margin: 0; color: var(--ok); }

/* ---------- Tabela que vira cartões no celular (ui.table({ stack: true })) ---------- */
/* Decidido pela largura do espaço da tabela (não da tela): com ou sem o menu lateral, nada passa da borda */
.table-wrap { container-type: inline-size; }
@container (max-width: 960px) { .table .hide-md { display: none; } } /* colunas secundárias somem quando aperta */
@container (min-width: 641px) and (max-width: 820px) { .table .hide-tab { display: none; } } /* nos cartões elas voltam */
@container (max-width: 640px) { .table .hide-xs { display: none; } } /* celular: some de vez (tabelas sem cartões) */
@container (max-width: 640px) {
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; }
  .table.stack tr { padding: 12px 14px; border-bottom: 1px solid var(--grid); }
  .table.stack tbody tr:last-child { border-bottom: 0; }
  .table.stack td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; text-align: right; }
  .table.stack td::before { content: attr(data-label); color: var(--text-3); font-size: 12.5px; text-align: left; flex: none; }
  .table.stack td:first-child { display: block; text-align: left; padding-bottom: 6px; font-size: 14.5px; }
  .table.stack td:first-child::before, .table.stack td:not([data-label])::before { content: none; }
  .table.stack td:not([data-label]):not(:first-child) { justify-content: flex-end; padding-top: 8px; }
  .table.stack td:empty { display: none; }
}
/* ---------- Produtos: nível do estoque e filtro de estoque baixo ---------- */
.stock-cell { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 110px; white-space: nowrap; }
.stock-cell .progress { width: 100%; max-width: 120px; margin: 0; height: 5px; }
.stock-tag { font-style: normal; font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 99px; }
.stock-tag.danger { background: var(--danger-bg); color: var(--danger-ink); }
.stock-tag.warn { background: var(--warn-bg); color: var(--warn-ink); }
.kpi-filter { cursor: pointer; transition: background .15s, box-shadow .15s; }
.kpi-filter:hover { background: var(--primary-50); }
.kpi-filter:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.kpi-filter[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--danger); }
.filter-note { display: flex; align-items: center; gap: 8px; margin: 0 14px 10px; padding: 8px 12px; border-radius: 10px; background: var(--danger-bg); color: var(--danger-ink); font-size: 13px; }
.filter-note svg { width: 16px; height: 16px; }
.filter-note .link-btn { margin-left: auto; }

/* ---------- Assinaturas: economia do plano e uso do mês ---------- */
.offer-save { margin: -4px 0 0; font-size: 12.5px; font-weight: 400; color: var(--ok); }
.sub-usage { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.sub-usage > div { display: flex; flex-direction: column; gap: 3px; }
.sub-usage span { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.sub-usage b { color: var(--text); font-weight: 500; }
.sub-usage .progress { margin: 0; height: 5px; }
@media (max-width: 560px) { .table.stack .sub-usage { min-width: 140px; text-align: left; } }

/* ---------- Telas bem estreitas (320–380 px) ---------- */
@media (max-width: 560px) {
  .kpi strong { font-size: clamp(16px, 5.4vw, 20px); }
  .tx-list .rem-item { flex-wrap: wrap; row-gap: 6px; }
  .tx-list .rem-main { flex: 1 1 calc(100% - 44px); }
  .tx-list .rem-item > .badge { margin-left: 40px; }
  .tx-list .rem-item > strong { margin-left: auto; }
}
@media (max-width: 340px) {
  :root .kpis, :root .report-body .kpis, :root .report-body .kpis:has(> :nth-child(4):last-child) { grid-template-columns: 1fr; } /* 320 px: dois por linha cortava os valores */
}
/* ---------- Financeiro: contas vencidas e total do caixa ---------- */
.table tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.table .tx-desc { min-width: 170px; } /* a descrição não vira uma coluna estreita de 4 linhas */
@container (max-width: 640px) { .table.stack .tx-desc { min-width: 0; } }
.table tr.overdue td { background: color-mix(in srgb, var(--danger) 4%, transparent); }
.hbars + .sum-line { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); }
@container (max-width: 640px) { .table.stack tr.overdue { box-shadow: inset 3px 0 0 var(--danger); } .table.stack tr.overdue td:first-child { box-shadow: none; } }

/* ---------- Agendamento online: filtro da lista, pendentes e sinal "no ar" ---------- */
.list-filter { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.list-filter .segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.list-filter .segmented button { display: inline-flex; align-items: center; gap: 6px; }
.table tr.pending td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
@container (max-width: 640px) { .table.stack tr.pending { box-shadow: inset 3px 0 0 var(--warn); } .table.stack tr.pending td:first-child { box-shadow: none; } }
.live-dot { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--danger); vertical-align: middle; }
.live-dot.on { background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); animation: live-pulse 2s ease-out infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Comissões: no celular, um cartão por profissional (a tabela escondia "A pagar" e o botão Pagar) ---------- */
.com-cards { display: none; }
:has(> .com-cards) { container-type: inline-size; } /* troca tabela por cartões pela largura do espaço, com ou sem menu lateral */
@container (max-width: 760px) {
  .com-table { display: none; }
  .com-cards { display: flex; flex-direction: column; gap: 10px; }
  .com-card { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; align-items: center; padding: 14px; border-radius: 14px; background: var(--surface-2); cursor: pointer; }
  .com-due { display: flex; flex-direction: column; align-items: flex-end; }
  .com-due small { color: var(--text-3); font-size: 12px; }
  .com-due strong { font-family: var(--font-display); font-size: 19px; font-variant-numeric: tabular-nums; }
  .com-line { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--text-2); }
  .com-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
  .com-actions > * { flex: 1; justify-content: center; }
  .com-actions .badge { flex: 1; justify-content: center; padding: 6px; }
}

/* ---------- Relatórios ---------- */
.report-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; }
.report-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 99px; border: 0; background: var(--surface); cursor: pointer; font-weight: 400; color: var(--text-2); white-space: nowrap; }
.report-tabs button.active { background: var(--primary-100); color: var(--text); font-weight: 500; }
.report-body > .table-wrap { background: var(--surface); border-radius: var(--radius); }
.report-body > .panel { margin-bottom: 14px; }

/* ---------- Agendamento online ---------- */
.booking { max-width: 720px; margin: 0 auto; padding: 24px 16px 60px; }
.booking-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.booking-card { background: var(--surface); border-radius: 20px; padding: 24px; }
.booking-card.center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.booking-card.center > svg { width: 36px; height: 36px; color: var(--text-3); }
.booking-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.booking-brand h1 { margin: 0; font-size: 20px; }
.steps { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; }
.step { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); white-space: nowrap; padding: 6px 12px 6px 6px; border-radius: 99px; background: var(--fill); }
.step span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: 11px; font-weight: 600; }
.step span svg { width: 12px; height: 12px; stroke-width: 3; }
.step.on { color: var(--text); font-weight: 500; background: var(--primary-100); }
.step.on span { background: var(--primary); color: var(--on-primary); }
.step.done { color: var(--ok); }
.step.done span { background: var(--ok-bg); color: var(--ok); }
.choice-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.choice { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; padding: 14px 16px; border: 1px solid transparent; border-radius: 14px; background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { background: var(--primary-50); }
.choice > div:not(.cell-user) { display: flex; flex-direction: column; }
.choice small { color: var(--text-3); }
.choice > span { font-weight: 500; }
.day-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.day-btn { flex: none; width: 62px; display: flex; flex-direction: column; align-items: center; padding: 8px 0; border: 1px solid transparent; border-radius: 14px; background: var(--surface-2); cursor: pointer; }
.day-btn small { color: var(--text-3); font-size: 11px; text-transform: capitalize; }
.day-btn strong { font-size: 18px; }
.day-btn:disabled { opacity: .35; cursor: not-allowed; }
.day-btn.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.day-btn.on small { color: color-mix(in srgb, var(--on-primary) 80%, transparent); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin-bottom: 14px; }
.slot-btn { height: 42px; border: 0; border-radius: 99px; background: var(--surface-2); cursor: pointer; font-weight: 500; font-variant-numeric: tabular-nums; }
.slot-btn:hover { background: var(--primary-100); }
.booking-summary { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--primary-50); margin-bottom: 14px; }
.booking-summary > div { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.booking-summary svg { color: var(--primary-ink); }
.booking-done { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; }
.booking-done h2 { margin: 8px 0 4px; }
.done-icon { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); }
.done-icon svg { width: 30px; height: 30px; stroke-width: 2.5; }

/* ---------- Configurações ---------- */
.settings-layout { display: grid; grid-template-columns: 230px 1fr; gap: 16px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border-radius: var(--radius); padding: 6px; }
.settings-nav button { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 9px 12px; border-radius: 10px; cursor: pointer; color: var(--text-2); font-weight: 400; text-align: left; }
.settings-nav button:hover { background: var(--surface-2); }
.settings-nav button.active { background: var(--primary-100); color: var(--text); font-weight: 500; }
.pay-config { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; max-width: 620px; }
.pay-config-row { display: grid; grid-template-columns: 50px 1fr 100px 130px; gap: 10px; align-items: center; }
.pay-config-row.head span { font-size: 12px; font-weight: 500; color: var(--text-3); }
.pay-config-row input[type=number] { text-align: right; }
.pay-config-row input { height: 36px; }
.preview-msg { display: flex; flex-direction: column; gap: 6px; }
.bubble { background: var(--bubble); border-radius: 12px 12px 12px 2px; padding: 10px 12px; max-width: 460px; font-size: 13.5px; }
.data-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; max-width: 680px; }
.data-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; }
.data-action > div { display: flex; flex-direction: column; }
.data-action.danger { background: var(--danger-bg); }

/* ---------- Responsivo ---------- */
.only-mobile, .only-tablet { display: none; }
@media (max-width: 1280px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-3 > :last-child { grid-column: span 2; }
}
@media (max-width: 1180px) {
  .only-tablet { display: inline-grid; }
  .grid-2-1 { grid-template-columns: 1fr; }
  .cmd-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .only-mobile { display: inline-grid; }
  .sidebar { position: fixed; inset: 0 auto 0 0; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { box-shadow: var(--shadow); }
  .sb-toggle { display: none; }
  .mobile-bar { display: none; } /* substituída pela barra flutuante embaixo (.app-dock) */
  .mobile-bar strong { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-bar .bk-mark { width: 28px; height: 28px; }
  .mobile-bar .bk-mark .bk-sym { height: 24px; }
  .palette { padding-top: 10px; }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.open { display: block; position: fixed; inset: 0; background: var(--backdrop); z-index: 35; }
  .topbar { padding: 0 12px; gap: 8px; }
  .page-title { display: none; }
  .hide-sm, .nav-search kbd { display: none; }
  .view { padding: 16px 14px 32px; }
  .view-agenda { padding: 0; }
  .calendar-wrap { border-radius: 0; }

  /* Agenda no celular: navegação centralizada no topo e os botões numa barra fixa embaixo */
  :root { --dock-h: 58px; --dock-gap: 12px; --dock-space: calc(var(--dock-h) + var(--dock-gap) * 2 + env(safe-area-inset-bottom)); }
  body[data-route="agenda"] .mobile-bar { display: none; }
  .agenda { flex-direction: column; gap: 0; }
  .view-agenda .toolbar { justify-content: center; padding: 6px 8px; }
  .view-agenda .toolbar-left { width: auto; max-width: 100%; justify-content: center; }
  .view-agenda .cal-title { margin: 0 2px; }
  .view-agenda .cal-pick { display: none; } /* a barra de baixo já tem o botão Calendário */
  .view-agenda .cal-title { font-size: 17px; }
  .view-agenda .cal-title-btn { padding: 0 8px; gap: 6px; }
  .view-agenda .toolbar-right, .view-agenda #panelBtn { display: none; }
  /* Barra flutuante (pílula) sobre a agenda */
  .agenda-dock { display: flex; position: fixed; z-index: 32; left: var(--dock-gap); right: var(--dock-gap); bottom: calc(var(--dock-gap) + env(safe-area-inset-bottom)); height: var(--dock-h); padding: 4px 8px; border-radius: 999px;
    background: color-mix(in srgb, var(--sb-bg) 78%, transparent); -webkit-backdrop-filter: blur(5px) saturate(180%); backdrop-filter: blur(5px) saturate(180%); border: 0; box-shadow: var(--shadow); } /* mesmas cores da barra lateral */
  /* Folga no fim da rolagem: o último horário/agendamento fica acima da barra */
  .view-agenda .fc-scroller-liquid-absolute, .view-agenda .fc-scroller-liquid { padding-bottom: var(--dock-space); }
  .agenda-dock button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-radius: 999px; background: none; color: var(--sb-fg-2); font-size: 11px; font-weight: 400; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .agenda-dock button:active { background: var(--sb-hover); }
  .agenda-dock button svg { width: 21px; height: 21px; }
  .agenda-dock button span { white-space: nowrap; }
  .agenda-dock [data-dock="menu"] { flex: .85; border-radius: 999px 0 0 999px; border-right: 1px solid var(--sb-border); margin-right: 4px; }
  .agenda-dock button.has-filter { color: var(--sb-accent); }
  /* Criar: no meio, em destaque (círculo na cor do sistema) */
  .agenda-dock [data-dock="new"] { flex: 0 0 auto; padding: 0 6px; }
  .agenda-dock [data-dock="new"]:active { background: none; }
  .dock-new { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: var(--on-primary); box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 45%, transparent); transition: transform .15s; }
  .agenda-dock [data-dock="new"]:active .dock-new { transform: scale(.92); }
  .agenda-dock .dock-new svg { width: 24px; height: 24px; stroke-width: 2.4; }
  .toasts { bottom: calc(var(--dock-space) + 4px); }
  /* Barra flutuante em todas as páginas (a agenda usa a sua, com Calendário e Filtros) */
  body[data-route="agenda"] .app-dock, body.public-mode .app-dock { display: none; }
  .view:not(.view-agenda) { padding-bottom: calc(var(--dock-space) + 12px); }
  /* Os botões do topo da página vão para a barra: o principal é o botão do meio, os outros ficam em "Mais" */
  .page-head .page-actions > .btn { display: none; }
  #view [data-dock-slot], #view [data-dock-more] { display: none; } /* também vão para a barra */
  /* Canto da barra da lista sem nada visível (tudo foi para a barra flutuante): some, sem deixar espaço */
  #view .card-toolbar .toolbar-right:not(:has(> :not([data-dock-slot]):not([data-dock-more]):not(.dock-only):not([hidden]))) { display: none; }
  .view-clientes [data-list]:not(.selecting) .cl-check { display: none; } /* caixinhas só no modo seleção */
  .view-servicos [data-list]:not(.selecting) .svc-check { display: none; }
  .view-cashback [data-items]:not(.selecting) .cb-check { display: none; }
  .page-head .page-actions:not(:has(> :not(.btn))) { display: none; }

  /* No toque a pessoa já sabe que pode rolar: sem barras de rolagem */
  * { scrollbar-width: none; }
  *::-webkit-scrollbar { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-3 > :last-child { grid-column: auto; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; overflow-x: auto; }
  .settings-nav button { white-space: nowrap; }
  .svc-row { grid-template-columns: 1fr 1fr; }
  .svc-row .field:first-child { grid-column: span 2; }
  .mini-kpis { grid-template-columns: 1fr 1fr; }
  .hours-row { grid-template-columns: 1fr 1fr; }
  .hours-row.head { display: none; }
  .hours-row .check { grid-column: span 2; }
}
@media (max-width: 560px) {
  .toolbar-left { width: 100%; }
  .toolbar-right { width: 100%; justify-content: space-between; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }
  .popover { width: calc(100vw - 24px); }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; } /* número ímpar de cartões: o último ocupa a linha toda */
  .kpi { padding: 14px; }
  .kpi strong { font-size: 20px; }
  /* Botões do topo da página dividem a largura, em vez de sobrar um sozinho na linha */
  .page-head .page-actions { width: 100%; }
  .page-head .page-actions > .btn { flex: 1 1 auto; }
  .page-head .page-actions > .btn:has(> .hide-sm) { flex: none; } /* só o ícone: não estica */
  .modal-backdrop { padding: 0; place-items: end stretch; }
  .modal, .modal.lg, .modal.xl, .modal.sm { width: 100%; max-height: 94vh; max-height: 94dvh; border-radius: 16px 16px 0 0; }
  .card-toolbar { padding: 14px 14px 10px; } /* busca com respiro em volta */
  .search.sm { min-width: 0; flex: 1; }
  .toolbar-right > .search.sm { flex-basis: 100%; } /* busca na linha dela; filtros e botões na de baixo */
  .toolbar-right:has(> .icon-btn[data-f]) { flex-wrap: nowrap; justify-content: flex-start; }
  .toolbar-right:has(> .icon-btn[data-f]) > .search.sm { flex: 1 1 0; } /* filtro e busca na mesma linha */
  .page-head h2 { font-size: 22px; }
  .alert-chip { width: 100%; }
  .bc-x .alt { visibility: hidden; } /* no celular, uma data sim, outra não: não encavalam */
  .modal-foot > .btn:not(.danger-ghost) { flex: 1 1 auto; } /* nenhum botão sobra sozinho num canto da linha */
  .modal-foot > .spacer { display: none; }
}

/* ---------- Aparência ---------- */
.appearance-sec { margin-bottom: 28px; }
.appearance-sec > p { margin: -6px 0 12px; }
.theme-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 170px)); gap: 12px; }
.theme-card { display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; font-weight: 400; color: var(--text-2); text-align: left; }
.theme-card:hover { border-color: var(--border-strong); }
.theme-card.active { border-color: var(--primary); color: var(--text); }
.theme-card > span:last-child { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 2px; }
.theme-card > span:last-child svg { width: 16px; height: 16px; color: var(--primary-ink); }
.tc-prev { display: grid; grid-template-columns: 30% 1fr; height: 78px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.tc-prev i { display: block; }
.tc-prev b { display: flex; flex-direction: column; gap: 6px; padding: 9px; }
.tc-prev b::before, .tc-prev b::after { content: ""; display: block; height: 8px; border-radius: 4px; background: var(--tc-line); }
.tc-prev b::after { width: 60%; background: var(--primary); }
.tc-light { --tc-line: #e3e6ec; } .tc-light i { background: #f1f2f6; } .tc-light b { background: #ffffff; }
.tc-dark { --tc-line: #2d3240; } .tc-dark i { background: #1c202a; } .tc-dark b { background: #12141b; }
.tc-system { --tc-line: #b9bec9; } .tc-system i { background: linear-gradient(135deg, #f1f2f6 50%, #1c202a 50%); } .tc-system b { background: linear-gradient(135deg, #ffffff 50%, #12141b 50%); }
.color-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.color-picker .swatch { width: 32px; height: 32px; }
.swatch.auto-theme { background: linear-gradient(135deg, #ffffff 50%, #1c202a 50%); }
.swatch.custom { position: relative; overflow: hidden; background: conic-gradient(#ef4444, #f59e0b, #22c55e, #06b6d4, #3b82f6, #a855f7, #ef4444); }
.swatch.custom input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); opacity: 0; cursor: pointer; }
.hex-input { width: 104px; height: 34px; border: 1px solid var(--border-strong); border-radius: 9px; padding: 0 10px; background: var(--surface); font-variant-numeric: tabular-nums; font-size: 13px; text-transform: uppercase; }
.appearance-preview { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.mini-sidebar { width: 200px; border-radius: 12px; padding: 12px 10px; background: var(--sb-bg); display: flex; flex-direction: column; gap: 3px; }
.mini-sidebar .ms-brand { color: var(--sb-brand); font-weight: 600; font-size: 16px; margin: 0 8px 8px; }
.mini-sidebar .ms-label { color: var(--sb-muted); font-size: 11px; font-weight: 400; margin: 4px 8px 2px; }
.mini-sidebar .ms-item { color: var(--sb-fg-2); padding: 6px 8px; border-radius: 7px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.mini-sidebar .ms-item svg { width: 15px; height: 15px; }
.mini-sidebar .ms-item.on { background: var(--sb-active-bg); color: var(--sb-active-fg); }
.mini-content { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: var(--bg); }
.mini-content .row-actions { margin: 0; }
.appearance-sec > .contrast-note, .contrast-note { display: flex; gap: 8px; align-items: center; margin: 12px 0 0; font-size: 12.5px; color: var(--text-2); }
.contrast-note svg { width: 15px; height: 15px; color: var(--text-3); }
@media (max-width: 560px) { .theme-cards { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Avatar com foto / ícone ---------- */
.avatar .av-ico { width: 64%; height: 64%; fill: none; stroke: currentColor; stroke-width: 1.7; }
.avatar { overflow: hidden; }
.avatar.photo { background: var(--surface-2); }
.avatar.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.lg .av-ico { stroke-width: 1.5; }
.avatar.xl { width: 72px; height: 72px; }
.avatar.xl .av-ico { stroke-width: 1.4; }
.avatar.xxl { width: 120px; height: 120px; }
.avatar.xxl .av-ico { stroke-width: 1.2; }
.cell-user.is-off { opacity: .55; }

/* ---------- Foto no cadastro ---------- */
.photo-field { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 4px 0 8px; }
.photo-actions { display: flex; gap: 8px; }
.photo-actions .btn { height: 28px; padding: 0 12px; gap: 6px; }
.photo-actions .btn svg { width: 15px; height: 15px; }

/* ---------- Celular com país ---------- */
.phone-input { display: flex; gap: 6px; }
.field .phone-input select { width: 104px; flex: none; padding: 0 6px; }
.field .phone-input input { flex: 1; min-width: 0; }

/* ---------- Formulários de cadastro ---------- */
.form-sec-title { font-size: 14px; font-weight: 500; color: var(--text); margin: 14px 0 -2px; }
.addr-1 { grid-template-columns: 130px 1fr; }
.addr-2 { grid-template-columns: 110px 1fr; }
.addr-3 { grid-template-columns: 1fr 1fr 84px; }
.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.cf-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cf-side { gap: 0; }
.acc.cf-acc > summary { padding: 13px 2px; }
.acc.cf-acc:first-child > summary { padding-top: 4px; }
.acc.cf-acc > summary > svg:last-child { transform: none; }
.acc.cf-acc[open] > summary > svg:last-child { transform: rotate(90deg); }
.cf-acc > .acc-body { padding: 2px 2px 18px; }
.hint { display: inline-grid; vertical-align: -3px; color: var(--text-3); cursor: help; font-style: normal; }
.hint svg { width: 15px; height: 15px; }
.disc-default { display: flex; gap: 6px; max-width: 360px; }
.field .disc-default select:first-child { width: 70px; flex: none; }
.field .disc-default input { width: 110px; flex: none; text-align: right; }
.field .disc-default select:last-child { flex: 1; }
.toggle-row { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; cursor: pointer; padding: 4px 0; }
.toggle-row .switch { margin-top: 2px; width: 40px; height: 22px; }
.toggle-row .switch::after { width: 18px; height: 18px; }
.toggle-row input:checked + .switch { background: var(--primary); }
.toggle-row input:checked + .switch::after { transform: translateX(18px); }
.toggle-row > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.toggle-row strong { font-weight: 500; color: var(--text); }
.toggle-row small { color: var(--text-2); font-size: 13px; line-height: 1.4; }
.toggle-list { display: flex; flex-direction: column; gap: 18px; }
.svc-auto-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; line-height: 1.5; }
.svc-auto-note > svg { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.svc-auto-st { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.svc-auto-st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.svc-auto-st.on::before { background: var(--ok); }
.svc-auto-note .link-btn { font-size: inherit; }
.svc-ret-custom[hidden] { display: none; }

/* ---------- Seções recolhíveis (ficha do cliente e formulários) ---------- */
.acc-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.acc { border-bottom: 1px solid var(--border); }
.acc > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 4px; cursor: pointer; font-weight: 500; color: var(--text); user-select: none; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary > svg:first-child { color: var(--text-3); width: 17px; height: 17px; }
.acc > summary > span { flex: 1; }
.acc > summary > svg:last-child { color: var(--text-3); transition: transform .18s; }
.acc[open] > summary > svg:last-child { transform: rotate(180deg); }
.acc > summary:hover { color: var(--primary-ink); }
.acc-count { font-style: normal; font-size: 12px; font-weight: 500; color: var(--text-2); background: var(--fill); border-radius: 99px; padding: 0 8px; }
.acc-body { padding: 2px 4px 18px; }
.acc-body > .info-grid { margin-top: 2px; }
.acc-body .sec-title.first, .acc-body > .sec-title:first-child { margin-top: 4px; }
.acc-inline { background: var(--surface-2); border-radius: 12px; padding: 0 14px; margin-top: 4px; }
.acc-inline > summary { justify-content: space-between; padding: 12px 0; }
.acc-inline .acc-body { padding: 0 0 14px; gap: 14px; }

/* ---------- Cliente selecionado (agendamento / comanda) ---------- */
.client-chip { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.client-chip .cc-main { flex: 1; min-width: 0; }
.client-chip .cc-main strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-chip .cc-main small { color: var(--text-3); }
.client-chip + .cc-tags { margin-top: 8px; }
[data-client-pick] .field-row { align-items: end; }

@media (max-width: 900px) {
  .ficha-top { grid-template-columns: auto 1fr auto; padding: 14px 12px 14px 16px; }
  .ficha-actions { grid-column: 1 / -1; order: 1; justify-content: flex-start; margin-top: 12px; }
  .ficha-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .ficha-nav { flex-direction: row; overflow-x: auto; padding: 0 8px; }
  .ficha-nav button { white-space: nowrap; padding: 12px 10px; border-right: 0; margin: 0 0 -1px; border-bottom: 2px solid transparent; }
  .ficha-nav button.active { background: none; border-bottom-color: var(--primary); }
  .ficha-panel { padding: 16px; }
  .cf-grid { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 560px) {
  .modal.ficha-modal { height: 94vh; height: 94dvh; }
  .addr-1, .addr-2, .addr-3 { grid-template-columns: 1fr; }
  .client-chip { flex-wrap: wrap; }
}

/* ---------- Fieldset sem moldura (agrupa campos para desativar de uma vez) ---------- */
.plain-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.plain-fieldset.form, .form > .plain-fieldset { display: flex; flex-direction: column; gap: 12px; }
.plain-fieldset:disabled { opacity: .7; }
.ficha-panel > .warn { margin: 0 0 14px; }

/* ---------- Acesso: tela de bloqueio / troca de usuário ---------- */
.lock-screen { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; padding: 16px; background: var(--bg); animation: fade .15s ease; overflow-y: auto; }
.lock-card { width: min(560px, 100%); background: var(--surface); border-radius: 20px; padding: 26px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.lock-card h2 { margin: 4px 0 0; font-size: 19px; }
.lock-brand { display: flex; align-items: center; gap: 10px; align-self: flex-start; }
.lock-brand > div { display: flex; flex-direction: column; line-height: 1.2; }
.lock-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; width: 100%; }
.lock-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; border: 0; border-radius: 14px; background: var(--surface-2); cursor: pointer; font: inherit; color: var(--text); text-align: center; transition: background .15s; }
.lock-tile:hover, .lock-tile:focus-visible { background: var(--primary-50); }
.lock-tile small { color: var(--text-3); font-size: 12px; }
.lock-back { align-self: flex-start; }
.lock-user { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lock-pin { display: flex; gap: 8px; width: min(320px, 100%); }
.lock-pin input { flex: 1; min-width: 0; height: 42px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 0 14px; background: var(--surface); font-size: 18px; letter-spacing: .3em; text-align: center; }
.lock-pin .btn { height: 42px; }
.lock-err { margin: -6px 0 0; color: var(--danger-ink); font-size: 13px; font-weight: 400; }
.shake { animation: shake .32s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.no-access { max-width: 420px; margin: 60px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-2); }
.no-access > svg { width: 38px; height: 38px; color: var(--text-3); }
.no-access h2 { margin: 0; color: var(--text); }
.pin-input { letter-spacing: .3em; font-size: 17px; }

/* ---------- Permissões (cadastro do profissional) ---------- */
.perm-access { display: flex; flex-direction: column; gap: 14px; padding-bottom: 4px; }
.pin-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.perm-wrap[data-off] .perm-list { opacity: .45; pointer-events: none; }
.perm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.perm-head .sec-title { margin: 10px 0 6px; }
.perm-presets { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.perm-list { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.perm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.perm-row:last-child { border-bottom: 0; }
.perm-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.perm-info small { color: var(--text-3); font-size: 12.5px; line-height: 1.4; }
.perm-ctrls { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.perm-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; }
.perm-chip { position: relative; cursor: pointer; }
.perm-chip input { position: absolute; opacity: 0; pointer-events: none; }
.perm-chip span { display: block; padding: 6px 12px; font-size: 13px; font-weight: 400; color: var(--text-2); background: var(--surface); transition: background .15s, color .15s; white-space: nowrap; }
.perm-seg .perm-chip + .perm-chip span { border-left: 1px solid var(--border-strong); }
.perm-chip input:checked + span { background: var(--primary); color: var(--on-primary); }
.perm-chip input:focus-visible + span { box-shadow: inset 0 0 0 2px var(--primary-100); }
.perm-chip.wide span { border: 1px solid var(--border-strong); border-radius: 9px; min-width: 180px; text-align: center; }
.perm-chip.wide input:checked + span { border-color: var(--primary); }

/* ---------- Personalizar serviços (cadastro do profissional) ---------- */
.psv-intro { margin: 0 0 12px; }
.psv-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.psv-tools .search { flex: 1; min-width: 200px; }
.table.psv { border: 1px solid var(--border); border-radius: 12px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.table.psv th, .table.psv td { padding: 7px 8px; }
.table.psv th:first-child, .table.psv td:first-child { padding-left: 12px; width: 30px; }
.psv-cat td { background: var(--surface-2); font-size: 13px; font-weight: 500; color: var(--text-2); padding-top: 8px !important; padding-bottom: 8px !important; }
.psv-name strong { display: block; font-weight: 500; }
.psv-name small { color: var(--text-3); font-size: 12px; }
.psv input[type=checkbox][data-k=on] { width: 16px; height: 16px; accent-color: var(--primary); }
.psv .sm-input { height: 32px; }
.psv-money { width: 96px; text-align: right; }
.psv-pct { width: 74px; text-align: right; }
.psv select[data-k=duration] { width: 136px; }
.psv-cost { display: flex; gap: 4px; }
.psv-cost input { width: 78px; text-align: right; }
.psv-cost select { width: 56px; padding: 0 4px; }
.psv .custom { border-color: var(--primary); background: var(--primary-50); color: var(--text); font-weight: 500; }
.psv tr.off td:not(:first-child) { opacity: .45; }
.psv tr.off .psv-name strong { font-weight: 400; }
.psv .switch-row { justify-content: center; }

/* ---------- Configurar comissões ---------- */
.cc-top { align-items: center; grid-template-columns: 200px 1fr; }
.cc-top p { margin: 18px 0 0; }
.cc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; margin: 6px 0 4px; }
.radio-group { display: flex; flex-direction: column; gap: 6px; }
.rg-title { font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.radio-opt { display: flex; align-items: center; gap: 9px; cursor: pointer; color: var(--text-2); font-size: 13.5px; }
.radio-opt input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.radio-opt:hover { color: var(--text); }
.cc-admin { display: flex; flex-direction: column; gap: 8px; padding: 14px 0 4px; margin-top: 6px; }
.cc-admin .field { max-width: 220px; }

/* ---------- Serviço: custo adicional e produtos consumidos ---------- */
.cost-input { display: flex; gap: 6px; max-width: 280px; }
.field .cost-input input { flex: 1; text-align: right; }
.field .cost-input select { width: 120px; flex: none; }
.consume-list { display: flex; flex-direction: column; gap: 6px; }
.consume-list:empty { display: none; }
.consume-row { display: grid; grid-template-columns: 1fr 90px auto auto; gap: 6px; align-items: center; }
.field .consume-row input { text-align: right; }

@media (max-width: 900px) {
  .cc-grid { grid-template-columns: 1fr; }
  .perm-row { grid-template-columns: 1fr; }
  .perm-ctrls { align-items: flex-start; }
}
@media (max-width: 560px) {
  .cc-top { grid-template-columns: 1fr; }
  .cc-top p { margin: 0; }
  .pay-config-row { grid-template-columns: 44px 1fr 74px 80px; gap: 6px; }
  .perm-chip span { padding: 6px 9px; }
}

/* ================= Conta na nuvem: carregamento, sincronização, plano ================= */
.boot-screen { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg); }
.boot-card { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; max-width: 360px; padding: 24px; }
.boot-card .bk-logo { height: 34px; color: var(--text); }
.boot-msg { color: var(--text-2); font-size: 14px; line-height: 1.5; }
.boot-bar { width: 180px; height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.boot-bar span { display: block; width: 40%; height: 100%; border-radius: 99px; background: var(--primary); animation: bootbar 1.1s ease-in-out infinite; }
@keyframes bootbar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.boot-actions { display: flex; gap: 8px; }

.sync-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 99px; border: 0; background: var(--fill); color: var(--text-3); cursor: pointer; font-size: 12px; font-weight: 400; white-space: nowrap; }
.sync-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.sync-chip.busy .dot { background: var(--primary); animation: syncpulse 1s ease-in-out infinite; }
.sync-chip.warn { color: var(--warn-ink); background: var(--warn-bg); }
.sync-chip.warn .dot { background: var(--warn); }
.sync-chip.bad { color: var(--danger-ink); background: var(--danger-bg); }
.sync-chip.bad .dot { background: var(--danger); }
@keyframes syncpulse { 50% { opacity: .3; } }

.plan-banner { display: flex; align-items: center; gap: 10px; padding: 8px 22px; font-size: 13px; background: var(--primary-50); color: var(--text); }
.plan-banner svg { width: 17px; height: 17px; flex: none; color: var(--primary-ink); }
.plan-banner span { flex: 1; min-width: 0; }
.plan-banner.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.plan-banner.warn svg { color: var(--warn); }
.plan-banner.bad { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger-ink); }
.plan-banner.bad svg { color: var(--danger); }
.plan-banner .btn { flex: none; }

.nav-item.locked { opacity: .62; }
.nav-item.locked:hover { opacity: 1; }
.nav-lock { display: inline-flex; font-style: normal; }
.nav-lock svg { width: 14px; height: 14px; }
.copy-input { width: 100%; height: 38px; border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; background: var(--surface-2); }

/* ---------- Promoções ---------- */
.chip.promo { background: var(--promo-bg); color: var(--promo); }
.warn.promo { background: var(--promo-bg); color: var(--promo); border-color: color-mix(in srgb, #f97316 30%, var(--surface)); }
.promo-tag { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin-top: 4px; font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--promo); background: var(--promo-bg); padding: 1px 8px; border-radius: 6px; }
.promo-tag svg { width: 12px; height: 12px; flex: none; }
.offer-icon.promo { background: var(--promo-bg); color: var(--promo); }
.promo-card.readonly { cursor: default; }
.promo-off { font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--promo); line-height: 1.1; }
.offer-card .promo-facts { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.promo-facts li { display: flex; align-items: flex-start; gap: 8px; }
.promo-facts svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--text-3); }
.promo-ex { font-size: 13px; color: var(--text-2); background: var(--surface-2); border-radius: 8px; padding: 6px 10px; margin-top: auto; }
.promo-ex s, .pick-price s, .promo-preview s, .booking-summary s, .pop-svc s { color: var(--text-3); font-weight: 400; }
.promo-empty { display: flex; flex-direction: column; align-items: center; padding-bottom: 24px; }
.promo-value { display: flex; gap: 8px; align-items: center; }
.promo-value input { flex: 1; min-width: 0; }
.promo-note { margin: -6px 0 0; }
.day-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.day-chip input { position: absolute; opacity: 0; pointer-events: none; }
.day-chip span { display: inline-grid; place-items: center; min-width: 50px; height: 34px; padding: 0 12px; border: 1px solid transparent; border-radius: 99px; background: var(--fill); cursor: pointer; font-weight: 400; color: var(--text-2); transition: background .15s, border-color .15s; }
.day-chip span:hover { border-color: var(--primary); }
.day-chip input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.day-chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--primary-100); }
.day-chips .link-btn { margin-left: 6px; }
.promo-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pick-all { margin: 2px 0 6px; }
.pick-list { background: var(--surface-2); border-radius: 12px; max-height: 232px; overflow-y: auto; padding: 4px; background: var(--surface); }
.pick-list.pros { max-height: 180px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-top: 8px; }
.pick-list.all { opacity: .55; }
.pick-group { font-size: 12.5px; font-weight: 500; color: var(--text-2); padding: 10px 8px 2px; }
.pick { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.pick:hover { background: var(--fill); }
.pick input { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; flex: none; }
.pick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-price { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.pick-price.on { color: var(--promo); font-weight: 500; }
.promo-pros-mode { align-self: flex-start; }
.promo-preview { display: flex; align-items: flex-start; gap: 10px; background: var(--promo-bg); color: var(--text-2); padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.promo-preview svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--promo); }
/* Agendamento online */
.day-btn.promo:not(.on) { border-color: color-mix(in srgb, #f97316 45%, var(--surface)); }
.day-promo { font-style: normal; font-size: 10px; font-weight: 600; color: var(--promo); line-height: 1.2; margin-top: 1px; }
.day-btn.on .day-promo { color: var(--on-primary); }
.promo-line { display: flex; align-items: center; gap: 8px; color: var(--promo); background: var(--promo-bg); padding: 8px 12px; border-radius: 10px; font-size: 13px; margin: -4px 0 12px; }
.promo-line svg, .promo-row svg { width: 16px; height: 16px; flex: none; }
.booking-summary .promo-row svg { color: var(--promo); }
@media (max-width: 700px) { .promo-cols { grid-template-columns: 1fr; } }

.upsell { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.upsell p { margin: 0; line-height: 1.5; }
.upsell-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary-ink); }
.upsell-icon svg { width: 26px; height: 26px; }
.upsell-icon.ok { background: var(--ok-bg); color: var(--ok); }
.upsell-plan { width: 100%; text-align: left; border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.upsell-plan > strong { font-size: 15px; }
.upsell-plan > span { float: right; font-weight: 600; color: var(--primary-ink); }
.upsell-plan ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.upsell-plan li { display: flex; align-items: center; gap: 6px; }
.upsell-plan li svg { width: 14px; height: 14px; color: var(--ok); }
.btn.block { width: 100%; }

.locked-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin: 14px; border-radius: 12px; background: var(--primary-50); }
.locked-card > svg { width: 24px; height: 24px; color: var(--primary-ink); flex: none; }
.locked-card > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.locked-card small { color: var(--text-3); }

/* ---------- Página Assinatura ---------- */
.view-assinatura .card { padding: 18px; margin-bottom: 14px; }
.sub-top { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
.sub-status-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sub-status h3 { margin: 2px 0 0; font-size: 22px; }
.sub-status p { line-height: 1.6; color: var(--text-2); }
.sub-usage .sec-title { margin-top: 0; }
.usage-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.usage-row span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.usage-row svg { width: 16px; height: 16px; }
.usage-bar { height: 6px; border-radius: 99px; background: var(--surface-2); margin: 8px 0 12px; overflow: hidden; }
.usage-bar span { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.usage-bar.full span { background: var(--warn); }
.feat-list { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; font-size: 13px; }
.feat-list li { display: flex; align-items: flex-start; gap: 7px; }
.feat-list svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.feat-list li.on svg { color: var(--ok); }
.feat-list li.off { color: var(--text-3); }
.feat-list li.off svg { color: var(--text-3); }
.card-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head-row .sec-title { margin: 0; }
.seg { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--fill); }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 99px; cursor: pointer; font-weight: 400; color: var(--text-2); font-size: 13px; }
.seg button.active { background: var(--surface); color: var(--text); font-weight: 500; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 10px; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 4px; border: 2px solid transparent; border-radius: 16px; padding: 18px; background: var(--surface); }
.plan-card h4 { margin: 0; font-size: 17px; }
.plan-card p { margin: 0 0 6px; min-height: 34px; }
.plan-card.featured { border-color: var(--primary); }
.plan-card.current { background: var(--primary-50); }
.plan-card .feat-list { flex: 1; }
.plan-ribbon { position: absolute; top: -10px; right: 14px; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--primary); color: var(--on-primary); }
.plan-price { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-top: 6px; }
.plan-price small { font-size: 13px; font-weight: 400; color: var(--text-3); }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-color: var(--danger-line); }
.danger-zone > div { display: flex; flex-direction: column; gap: 2px; }
.slug-input { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; background: var(--surface); }
.slug-input > span { padding: 0 4px 0 10px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.slug-input input { border: 0 !important; box-shadow: none !important; flex: 1; min-width: 80px; }
.sub-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--primary-50); }
.sub-summary > div { display: flex; flex-direction: column; }
.sub-summary small { color: var(--text-3); }
.sub-price { font-size: 22px; font-weight: 600; color: var(--primary-ink); }
.sub-price small { font-size: 12px; color: var(--text-3); font-weight: 400; }
.pay-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pay-choice { cursor: pointer; position: relative; }
.pay-choice input { position: absolute; opacity: 0; pointer-events: none; }
.pay-choice > span { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); }
.pay-choice > span svg { width: 18px; height: 18px; color: var(--text-3); }
.pay-choice small { color: var(--text-3); font-size: 11.5px; line-height: 1.35; }
.pay-choice input:checked + span { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 1px var(--primary); }
.pay-choice input:checked + span svg { color: var(--primary-ink); }
.pay-choice input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.muted.small svg { width: 13px; height: 13px; vertical-align: -2px; }

@media (max-width: 860px) {
  .sub-top { grid-template-columns: 1fr; }
  .pay-choices { grid-template-columns: 1fr; }
  .plan-banner { padding: 8px 14px; flex-wrap: wrap; }
  .sync-chip span:not(.dot) { display: none; }
  .danger-zone { flex-direction: column; align-items: flex-start; }
}

/* ================= Página de entrada (login.html) ================= */
.auth-page { background: var(--surface); min-height: 100vh; }
/* Só a parte clara: logo em cima da caixa e o símbolo da marca bem apagado no fundo (nada da agenda aqui) */
.auth-wrap { position: relative; min-height: 100vh; overflow: hidden; isolation: isolate; }
.auth-bg-sym { position: absolute; z-index: -1; right: -8vmin; bottom: -12vmin; width: min(78vmin, 720px); height: auto; color: var(--text); opacity: .045; pointer-events: none; }
.auth-bg-sym .bk-disc { fill: var(--primary); }
.auth-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; }
.auth-brand .bk-logo { height: 34px; }
.auth-main > .auth-brand { color: var(--text); margin-bottom: 8px; }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 14px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 20px; padding: 28px; }
.auth-card h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; }
.auth-card > p { line-height: 1.55; }
.auth-card .form { margin-top: 14px; }
.auth-loading { color: var(--text-3); text-align: center; padding: 30px 0; }
.auth-row { display: flex; justify-content: flex-end; margin-top: -4px; }
.auth-switch { text-align: center; margin: 16px 0 0; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.auth-switch a { white-space: nowrap; }
.auth-switch a, .auth-card a { color: var(--primary-ink); font-weight: 400; }
.auth-note { background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin: 8px 0; }
.auth-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); margin-bottom: 10px; }
.auth-icon svg { width: 24px; height: 24px; }
.auth-foot { font-size: 12.5px; color: var(--text-3); }
.auth-foot a { color: var(--text-3); }
.pw-input { display: flex; align-items: center; gap: 4px; }
.pw-input input { flex: 1; }
.pw-meter { height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: -6px; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s, background .2s; }
.pw-meter[data-s="1"] span { width: 30%; background: var(--danger); }
.pw-meter[data-s="2"] span { width: 55%; background: var(--warn); }
.pw-meter[data-s="3"] span { width: 80%; background: var(--ok); }
.pw-meter[data-s="4"] span { width: 100%; background: var(--ok); }
.check-row { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; line-height: 1.45; cursor: pointer; }
.check-row input { margin-top: 2px; width: 16px; height: 16px; flex: none; accent-color: var(--primary); }
@media (max-width: 860px) {
  .auth-card { padding: 22px 18px; }
}

/* Página de entrada, revisão de 21/10/2026: botões maiores,
   olho da senha dentro do campo.
   Componentes com os MESMOS valores do site de vendas (site/site.css, camada "Componentes"):
   mudar um número aqui pede mudar lá também. */
.auth-page, .admin-gate {
  --btn-h: 50px; --btn-h-sm: 40px; --btn-px: 24px; --btn-radius: 999px; --btn-font: 16px; --btn-weight: 500; --btn-press: scale(.97);
  --field-h: 48px; --field-r: 12px;
  --card-r: 16px;
  --title-weight: 600; --title-tracking: -.03em;
  --focus-ring: var(--primary);
}
.auth-page :focus-visible, .admin-gate :focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.auth-main { position: relative; min-height: 100vh; min-height: 100dvh; padding-top: 32px; padding-bottom: 32px; } /* caixa no meio da tela */
.auth-main::after { content: ""; flex: none; height: 42px; } /* mesmo espaço do logo embaixo: a caixa fica exatamente no centro */
.auth-card { max-width: 440px; padding: 36px 32px 32px; border-radius: var(--card-r); border: 1px solid var(--border); box-shadow: 0 12px 40px rgba(20, 22, 30, .07); } /* flutua sobre o fundo claro */
.auth-card h2 { font-size: 28px; font-weight: var(--title-weight); letter-spacing: var(--title-tracking); margin-bottom: 8px; }
.auth-card > p.muted { margin: 0 0 4px; }
.auth-card .btn.block { height: var(--btn-h); padding: 0 var(--btn-px); border-radius: var(--btn-radius); font-size: var(--btn-font); font-weight: var(--btn-weight); transition: background .2s, transform .15s; }
.auth-card .btn:active { transform: var(--btn-press); }
.auth-card .pw-input { position: relative; display: block; }
.auth-card .pw-input input { width: 100%; padding-right: 46px; }
.auth-card .pw-input [data-eye] { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.auth-card .pw-meter { margin-top: 2px; }
.auth-row { margin-top: 2px; }
.auth-foot { font-size: 13px; }
/* Outras formas de entrar (Google, link por e-mail) e a linha "ou entre com e-mail e senha" */
.auth-alt { display: grid; gap: 10px; margin-top: 22px; }
.auth-card .auth-alt-btn { justify-content: center; gap: 10px; background: var(--surface); border: 1.5px solid var(--border-strong); color: var(--text); font-weight: 500; }
.auth-card .auth-alt-btn:hover { background: var(--surface-2); border-color: var(--text-3); }
.auth-alt-btn svg { width: 20px; height: 20px; flex: none; }
.auth-alt-btn svg.g-logo { stroke: none; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 22px 0 4px; font-size: 13.5px; color: var(--text-3); }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-card > p.muted + .form { margin-top: 18px; }
@media (max-width: 860px) {
  .auth-main { padding-top: 20px; padding-bottom: 20px; }
  .auth-switch { font-size: 11px; } /* no celular a frase fica mais curta que o botão Entrar */
  .auth-card { padding: 28px 20px 24px; }
  .auth-card h2 { font-size: 24px; }
  .auth-card .auth-alt-btn { padding: 0 14px; font-size: 15px; min-width: 0; white-space: normal; line-height: 1.2; } /* texto longo cabe na caixa */
}

/* ================= Painel administrativo (admin/) ================= */
.admin-page { background: var(--bg); }
.admin-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.admin-gate[hidden] { display: none; }
.auth-brand.dark { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 16px; color: var(--text); }
.auth-brand.dark .bk-logo { height: 28px; }
.auth-brand.dark span { font-family: inherit; font-size: 13.5px; font-weight: 400; color: var(--text-2); }
.auth-icon.lock { background: var(--primary-50); color: var(--primary-ink); }
.code-input { font-size: 26px !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; height: 54px !important; }
.mfa-qr { display: grid; place-items: center; padding: 12px; margin: 10px 0; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.mfa-qr img { width: 190px; height: 190px; }
.mfa-secret { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.mfa-secret code { font-size: 13px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); word-break: break-all; user-select: all; }
.env-chip { font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 99px; background: var(--fill); color: var(--text-2); }
.env-chip.prod { background: var(--danger-bg); color: var(--danger-ink); }
.admin-loading { padding: 40px; text-align: center; color: var(--text-3); }
.admin-filters { padding-bottom: 10px; gap: 8px; }
.admin-filters select, .admin-filters input[type=date] { height: 34px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: var(--text); padding: 0 8px; }
.admin-filters .search { min-width: 260px; flex: 1; max-width: 420px; margin: 0; }
.inline-field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.admin-tenant .modal-content { padding-top: 6px; }
.admin-tenant-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.admin-tab { padding-top: 14px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-json { word-break: break-all; font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; }
.admin-plans .plan-card.inactive { opacity: .6; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 4px 0; }
.inline-form { display: flex; gap: 8px; margin-top: 12px; }
.inline-form input { flex: 1; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.panel-title + .info-grid { margin-bottom: 12px; }
.view-saloes .card > [data-list], .view-faturas .card > [data-list] { overflow-x: auto; }
@media (max-width: 860px) {
  .check-grid, .grid-3 { grid-template-columns: 1fr; }
  .admin-filters .search { min-width: 0; max-width: none; width: 100%; }
}

/* ================= Agendamento online público (reservar.html) ================= */
body.public-booking { min-height: 100vh; background: var(--bg); }
body.public-booking .view { padding: 0; overflow: visible; }
.booking-powered { text-align: center; margin-top: 14px; }
.booking-powered .bk-logo { display: inline-block; height: 13px; vertical-align: -2px; margin-left: 2px; color: var(--text-2); }

/* ---------- Cashback (Marketing › Cashback) ---------- */
.cb-tabs .tabs { padding: 4px 14px 0; }
.nf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nf-head .cb-tabs { flex: 1; min-width: 0; }
.nf-head .tabs { padding: 12px 14px 2px; overflow-x: auto; flex-wrap: nowrap; } /* abas com respiro em cima; rolam para o lado se não couberem */
.nf-head .tabs button { flex: none; }
.nf-tab-tools { flex: none; padding: 12px 14px 2px 0; }
.nf-tab-tools:empty { display: none; }
@media (max-width: 900px) { .nf-tab-tools { display: none; } } /* no celular o filtro fica na barra flutuante */
.cb-card .card-toolbar { border-bottom: 0; padding-bottom: 6px; }
.cb-card .cb-off { margin: 14px 14px 0; }
.cb-card .cb-off .btn { margin-left: auto; }
.cb-kpis { padding: 14px 14px 0; margin-bottom: 0; }
.cb-table .cb-check { width: 42px; padding-right: 0; }
.cb-table input[type=checkbox]:not([data-active]) { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; cursor: pointer; }
.cb-table .switch-row { display: inline-flex; }
.cb-row-off td:not(:nth-last-child(-n+2)) { opacity: .5; }
.cb-ic { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-3); }
.cb-ic svg { width: 15px; height: 15px; }
.cb-ic.service { background: var(--primary-100); color: var(--primary-ink); }
.cb-ic.product { background: var(--teal-bg); color: var(--teal); }
.cb-val { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.cb-val small { font-size: 11.5px; }
.cb-sub { display: block; font-size: 11.5px; }
.th-sort { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.th-sort svg { width: 13px; height: 13px; }
.bulk-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 14px 10px; padding: 8px 12px; border-radius: 12px; background: var(--primary-50); }
.bulk-bar strong { margin-right: 6px; font-size: 13px; }
.bulk-bar[hidden] { display: none; }
.svc-bulk { display: flex; align-items: center; gap: 8px; flex: none; }
.svc-bulk[hidden] { display: none; }
.svc-bulk strong { font-size: 13px; color: var(--primary-ink); white-space: nowrap; }
/* Serviços: uma tabela só, agrupada por categoria (ordem arrastável), favorito e seleção em massa */
.svc-table .svc-check { width: 42px; padding-right: 0; cursor: pointer; }
.table .cl-check { width: 42px; padding-right: 0; cursor: pointer; }
.table .cl-phone { white-space: nowrap; }
.table tr.selected td { background: var(--primary-50); }
.svc-table tr.svc-cat td { background: var(--surface-2); padding-top: 12px; padding-bottom: 12px; border-top: 10px solid var(--surface); }
.svc-table tr.svc-cat td:first-child { box-shadow: inset 4px 0 0 var(--primary); }
.svc-table tbody:first-of-type tr.svc-cat td { border-top: 0; }
.svc-cat-name { display: flex; align-items: center; gap: 10px; }
.svc-cat-name strong { font-size: 15px; font-weight: 600; color: var(--primary-ink); }
.svc-cat-name .muted { font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 99px; background: var(--fill); }
.svc-grip { cursor: grab; color: var(--text-3); margin: -4px 0 -4px -6px; }
.svc-grip svg { stroke-width: 3.2; }
.svc-grip:active { cursor: grabbing; }
.svc-table tbody.dragging { opacity: .45; }
.svc-table tbody.drop-target tr.svc-cat td { box-shadow: inset 0 2px 0 var(--primary); }
.svc-table tr.selected td { background: var(--primary-50); }
.svc-table tr.svc-off td:not(.svc-check) { opacity: .55; }
.svc-name { display: flex; align-items: center; gap: 8px; }
.svc-fav { border: 0; background: none; padding: 2px; margin: -2px 0; border-radius: 6px; cursor: pointer; color: var(--text-3); display: inline-grid; }
.svc-fav svg { width: 17px; height: 17px; }
.svc-fav:hover:not(:disabled) { color: var(--primary-ink); }
.svc-fav.on { color: var(--primary); }
.svc-fav.on svg { fill: currentColor; }
.svc-fav:disabled { cursor: default; }
.pager .pg { min-width: 30px; height: 30px; border: 1px solid transparent; background: none; border-radius: 8px; cursor: pointer; color: var(--text-2); font-weight: 400; }
.pager .pg:hover { background: var(--surface-2); }
.pager .pg.on { color: var(--text); font-weight: 500; background: var(--primary-100); }
.pager select { height: 32px; border: 1px solid var(--border-strong); border-radius: 9px; padding: 0 8px; background: var(--surface); margin-left: 6px; }
.cb-config { padding: 16px 18px 18px; }
.cb-intro { align-items: flex-start; margin-bottom: 6px; }
.cb-intro svg { flex: none; margin-top: 2px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.set-row[hidden] { display: none; }
.set-text h4 { margin: 0 0 4px; font-size: 15px; font-weight: 500; }
.set-text p { margin: 0; color: var(--text-2); font-size: 13.5px; max-width: 760px; }
.set-ctl { flex: none; display: flex; justify-content: flex-end; min-width: 220px; }
.cb-value { display: flex; gap: 8px; align-items: center; }
.cb-value input, .money-input input { height: 38px; width: 130px; border: 1px solid var(--border-strong); border-radius: 9px; padding: 0 10px; background: var(--surface); outline: none; }
.cb-value select { height: 38px; border: 1px solid var(--border-strong); border-radius: 9px; padding: 0 8px; background: var(--surface); outline: none; }
.cb-value input:focus, .money-input input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.money-input { display: flex; align-items: center; gap: 8px; }
.money-input span { color: var(--text-3); font-size: 13px; min-width: 18px; text-align: right; }
.cb-example { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.set-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 16px; }
.cb-use { display: inline-flex; align-items: center; gap: 8px; }
.cb-choice { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--surface-2); border-radius: 12px; }
.cb-choice.off { opacity: .5; }
.cb-choice .cb-value { padding-left: 24px; }
.cb-item-field { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.cb-item-field .cb-value input, .cb-item-field .cb-value select { height: 36px; }
.cb-item-field .cb-value input { width: 100px; }
.cb-redeem { align-items: flex-start; color: var(--text); font-weight: 400; }
.cb-redeem-note { margin: -6px 0 0 24px; }
@media (max-width: 760px) {
  .set-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .set-ctl { justify-content: flex-start; min-width: 0; }
  .pager { flex-wrap: wrap; justify-content: center; }
  .pager .muted { width: 100%; text-align: center; margin: 0; }
}
.cb-label { display: flex; flex-direction: column; line-height: 1.3; }
.cb-label small { font-size: 11.5px; }
@media (max-width: 760px) {
  .cb-table .cb-type, .cb-table .cb-edit { display: none; }
  .cb-table th, .cb-table td { padding-left: 8px; padding-right: 8px; }
  .cb-ic { width: 24px; height: 24px; }
}

/* ---------- Campos numéricos ---------- */
/* Valores são só digitados (sem setas); quantidades (data-qty) ganham − e + discretos */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-step { display: flex; align-items: stretch; height: 38px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.qty-step.sm { display: inline-flex; height: 32px; vertical-align: middle; }
.qty-step:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.qty-step input[type=number] { flex: 1; min-width: 0; width: auto; height: 100%; border: 0; border-radius: 0; box-shadow: none; background: transparent; text-align: center; padding: 0 2px; }
.qty-step input[type=number]:focus { box-shadow: none; }
.qty-step.sm input[type=number] { flex: none; width: 38px; }
.qs-btn { flex: none; width: 30px; border: 0; background: none; color: var(--text-3); cursor: pointer; display: grid; place-items: center; transition: background .15s, color .15s; }
.qty-step.sm .qs-btn { width: 24px; }
.qs-btn:hover { background: var(--surface-2); color: var(--text); }
.qs-btn svg { width: 13px; height: 13px; stroke-width: 2; }
.qty-step:has(input:disabled) .qs-btn { opacity: .4; pointer-events: none; }
/* Valor com a unidade na mesma caixa: [R$ ▾ | 10,00] */
.unit-input { display: inline-flex; align-items: stretch; height: 34px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.unit-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.unit-input input[type=number] { width: 96px; min-width: 0; height: 100%; border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: 0 10px 0 4px; text-align: right; outline: none; }
.unit-input input[type=number]:focus { box-shadow: none; }
.unit-input .unit, .unit-input select { flex: none; display: flex; align-items: center; border: 0; background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 500; padding: 0 8px 0 10px; }
.unit-input select { height: 100%; width: auto; cursor: pointer; padding-right: 4px; }
.unit-input select:focus { box-shadow: none; }
.pay-row .unit-input { flex: none; height: 32px; }
.pay-row .unit-input input[type=number] { width: 84px; }

/* ---------- Comanda: itens e janela "Adicionar à comanda" ---------- */
.cmd-items .it-actions { white-space: nowrap; text-align: right; width: 1%; }
.cmd-items tr.editing td { background: var(--primary-50); }
.add-item-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 2px; color: var(--primary-ink); font-weight: 500; cursor: pointer; }
.add-item-btn svg { width: 16px; height: 16px; stroke-width: 2.2; }
.add-item-btn:hover { text-decoration: underline; }
.ai-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.ai-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ai-tools .search { flex: 1; min-width: 180px; max-width: none; }
.ai-pro { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.ai-pro[hidden] { display: none; }
.ai-pro select { height: 34px; border: 1px solid var(--border-strong); border-radius: 9px; padding: 0 10px; background: var(--surface); max-width: 200px; }
.ai-use[hidden] { display: none; }
.ai-list { display: flex; flex-direction: column; gap: 2px; max-height: min(52vh, 460px); overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.ai-group { font-size: 12.5px; font-weight: 500; color: var(--text-2); padding: 12px 10px 4px; }
.ai-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: none; border-radius: 12px; padding: 9px 10px; cursor: pointer; color: var(--text); }
.ai-item:hover:not(:disabled) { background: var(--primary-50); }
.ai-item:disabled { opacity: .45; cursor: not-allowed; }
.ai-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ai-main small { color: var(--text-3); font-size: 12px; }
.ai-main .chip { align-self: flex-start; }
.ai-price { white-space: nowrap; font-weight: 500; font-size: 13.5px; }
.ai-price s { color: var(--text-3); font-weight: 400; margin-right: 4px; }
.ai-price small { color: var(--text-3); font-weight: 400; }
.ai-plus { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--primary-ink); background: var(--primary-50); flex: none; }
.ai-plus svg { width: 15px; height: 15px; stroke-width: 2.2; }
.ai-empty { display: flex; align-items: center; gap: 10px; color: var(--text-2); padding: 22px 10px; font-size: 13.5px; }
.ai-empty svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.cmd-items td:first-child { min-width: 170px; }
.cmd-items tr.editing td { border-bottom-color: transparent; }
.cmd-items tr.it-editor td { background: var(--primary-50); padding-top: 4px; }
.it-edit { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.it-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); font-weight: 400; }
.it-field select.sm-input { min-width: 160px; width: auto; }
.it-field .unit-input { height: 32px; }
.it-field .unit-input input[type=number] { width: 84px; }
.it-edit .it-done { margin-left: auto; }
.it-name .it-meta { display: none; }
@media (max-width: 700px) {
  /* Celular: o item mostra profissional, quantidade e valor numa linha; ficam visíveis o total e os botões */
  .cmd-items th:nth-child(n+2):nth-child(-n+5), .cmd-items tr:not(.it-editor) > td:nth-child(n+2):nth-child(-n+5) { display: none; }
  .cmd-items td:first-child { min-width: 0; }
  .it-name .it-meta { display: block; text-transform: none; letter-spacing: 0; font-size: 12px; margin-top: 2px; }
  .it-edit .it-done { margin-left: 0; }
}

/* ---------- Automação (Marketing › Automação: campanhas de WhatsApp) ---------- */
.auto-body { padding: 14px 16px 0; display: flex; flex-direction: column; gap: 14px; }
.auto-body:last-child { padding-bottom: 16px; }
.auto-intro { align-items: flex-start; }
.auto-intro svg { flex: none; margin-top: 1px; }
.auto-kpis { margin-bottom: 0; }
.aq-groups { display: flex; flex-direction: column; gap: 16px; }
.aq-group-h { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 13.5px; font-weight: 500; }
.aq-ic { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; flex: none; background: var(--primary-50); color: var(--primary-ink); }
.aq-ic svg { width: 15px; height: 15px; }
.offer-icon.aq-ic { width: 36px; height: 36px; border-radius: 10px; }
.offer-icon.aq-ic svg { width: 19px; height: 19px; }
.aq-ic.aniversario { background: var(--pink-bg); color: var(--pink); }
.aq-ic.reconquista { background: var(--promo-bg); color: var(--promo); }
.aq-ic.cuidados { background: var(--teal-bg); color: var(--teal); }
.aq-ic.retorno { background: var(--warn-bg); color: var(--warn-ink); }
.aq-ic.boasvindas { background: var(--ok-bg); color: var(--ok); }
.aq-ic.agendado { background: var(--ok-bg); color: var(--ok); }
.aq-ic.cancelado { background: var(--teal-bg); color: var(--teal); }
.aq-ic.preparo { background: var(--teal-bg); color: var(--teal); }
.aq-ic.avaliacao { background: var(--pink-bg); color: var(--pink); }
.aq-ic.convite { background: var(--primary-50); color: var(--primary-ink); }
.aq-ic.cashback { background: var(--ok-bg); color: var(--ok); }
.aq-ic.pacote { background: var(--teal-bg); color: var(--teal); }
.aq-ic.cobranca { background: var(--warn-bg); color: var(--warn-ink); }
.auto-sec + .auto-sec { border-top: 1px solid var(--border); }
.auto-sec-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0; padding: 16px 16px 0; font-size: 15px; }
.auto-sec .offer-grid { padding-top: 12px; }
.aq-list { display: flex; flex-direction: column; gap: 6px; }
.aq-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; }
.aq-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.aq-main strong { font-weight: 500; font-size: 13.5px; }
.aq-main small { color: var(--text-3); font-size: 12px; }
.aq-text { margin: 4px 0 0; font-size: 13px; color: var(--text-2); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aq-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.aq-when { flex: none; align-self: center; }
.auto-later { border-top: 1px solid var(--border); padding-top: 12px; }
.auto-later > summary { cursor: pointer; font-weight: 500; font-size: 13.5px; display: flex; align-items: center; gap: 8px; list-style: none; padding: 2px 0 10px; }
.auto-later > summary::-webkit-details-marker { display: none; }
.auto-later > summary::before { content: '›'; font-size: 18px; line-height: 1; color: var(--text-3); transition: transform .15s; }
.auto-later[open] > summary::before { transform: rotate(90deg); }
.auto-later .aq-item { opacity: .85; }
.auto-snippet { font-size: 12.5px; color: var(--text-2); background: var(--bubble); border-radius: 10px 10px 10px 2px; padding: 8px 10px; margin-top: auto; }
.auto-snippet p { margin: 0; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.auto-card .offer-foot { align-items: center; }
.auto-card .promo-facts li.warn-text svg { color: var(--warn); }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.auto-msg-meta { display: inline-flex; align-items: center; gap: 8px; }
.auto-msg-pill { font-size: 11.5px; font-weight: 400; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; line-height: 1.35; }
.auto-reset { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--text-2); font-size: 11.5px; font-weight: 400; padding: 2px 4px; cursor: pointer; transition: color .15s; }
.auto-reset svg { width: 13px; height: 13px; stroke-width: 2; }
.auto-reset:hover { color: var(--text); text-decoration: underline; }
.auto-vars { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: -22px; padding-right: 64px; }
.auto-num input { max-width: 140px; }
.auto-num small { font-size: 12px; }
.auto-time-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.auto-time-row input { max-width: 90px; }
.auto-time-row select { max-width: 140px; }
.auto-time-txt { font-size: 13px; color: var(--text); font-weight: 400; }
.auto-extras { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.auto-extras-title { font-size: 12.5px; font-weight: 600; color: var(--text); }
.auto-extra { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; }
.auto-extra-sum { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; user-select: none; font-size: 13px; font-weight: 500; color: var(--text); }
.auto-extra-sum::-webkit-details-marker { display: none; }
.auto-extra-chk { display: inline-flex; align-items: center; flex: none; }
.auto-extra-lbl { flex: 1; min-width: 0; }
.auto-extra-chev { display: inline-flex; color: var(--text-2); transition: transform .18s ease; }
.auto-extra-chev svg { width: 16px; height: 16px; }
.auto-extra[open] .auto-extra-chev { transform: rotate(180deg); }
.auto-extra-body { display: flex; flex-direction: column; gap: 12px; padding: 12px 14px 14px; border-top: 1px solid var(--border); background: var(--surface-2); }
.auto-bubble { white-space: pre-wrap; max-width: none; }
.wa-preview {
  --wa-doodle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160' fill='none' stroke='%23e5ddd1' stroke-opacity='0.65' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 14l22-5M24 12a3.5 3.5 0 1 0 0 .1M18 22l22-5M32 19a3.5 3.5 0 1 0 0 .1'/%3E%3Cpath d='M52 10l2.5 5.5 5.5 2.5-5.5 2.5L52 26l-2.5-5.5L44 18l5.5-2.5z'/%3E%3Ccircle cx='74' cy='14' r='3'/%3E%3Cpath d='M88 8h20a3 3 0 0 1 3 3v13a3 3 0 0 1-3 3H88a3 3 0 0 1-3-3V11a3 3 0 0 1 3-3zm-3 6h26'/%3E%3Ccircle cx='126' cy='16' r='11'/%3E%3Ccircle cx='126' cy='16' r='4'/%3E%3Cpath d='M146 10l2 4.5 4.5 2-4.5 2-2 4.5-2-4.5-4.5-2 4.5-2z'/%3E%3Crect x='6' y='36' width='16' height='4.5' rx='2.2'/%3E%3Crect x='14' y='45' width='14' height='4.5' rx='2.2'/%3E%3Cpath d='M34 38l2.5 5.5 5.5 2.5-5.5 2.5L34 54l-2.5-5.5L26 46l5.5-2.5z'/%3E%3Crect x='46' y='30' width='14' height='10' rx='2'/%3E%3Cpath d='M54 54c0-8 8-14 18-14s18 6 18 14-8 14-18 14l-9 5 1.5-7c-6-2.5-10.5-7-10.5-12z'/%3E%3Cpath d='M72 46c-1.8-2.6-6-2.6-7 .8-.8 2.6 2.6 6 7 8.6 4.4-2.6 7.8-6 7-8.6-1-3.4-5.2-3.4-7-.8z'/%3E%3Ccircle cx='100' cy='42' r='3.5'/%3E%3Ccircle cx='122' cy='46' r='14'/%3E%3Cpath d='M110 38h10l4 8m-4 0h10'/%3E%3Cpath d='M144 36l6-4 6 6-4 6-6-2-2-6z'/%3E%3Cpath d='M4 72l12-8 8 18-12 8z'/%3E%3Ccircle cx='38' cy='96' r='14'/%3E%3Ccircle cx='38' cy='79' r='2.5'/%3E%3Cpath d='M34 100c2-4.5 4.5-7 9-9-2 4.5-4.5 7-9 9z'/%3E%3Ccircle cx='56' cy='76' r='3'/%3E%3Cpath d='M64 82c0-7 8-12 19-12s19 5 19 12-8 12-19 12c-2.5 0-5 0-7.5-.8L67 97l1.5-6c-3-2.5-4.5-5.5-4.5-9z'/%3E%3Cline x1='75' y1='80' x2='91' y2='80'/%3E%3Cline x1='75' y1='85' x2='87' y2='85'/%3E%3Cpath d='M110 78h20l2.5 7h-25l2.5-7z'/%3E%3Crect x='110' y='85' width='20' height='13' rx='1.5'/%3E%3Cpath d='M142 84c4-7 10-10 12-17 3.5 5 5 12 1.5 19-2.5 5-9.5 7-13.5-2z'/%3E%3Cpath d='M8 118l28 6-6 28-28-6zM17 119l-6 28M27 122l-6 28M6 127l28 6M4 136l28 6'/%3E%3Ccircle cx='48' cy='124' r='3.5'/%3E%3Cpath d='M58 148c0-4.5 4.5-8 10.5-8s10.5 3.5 10.5 8'/%3E%3Ccircle cx='68.5' cy='134' r='4.5'/%3E%3Cpath d='M86 116c3-5 9-6 12-2 3 4 1 11-5 14-5 2.5-10-1-9-7z'/%3E%3Ccircle cx='126' cy='124' r='14'/%3E%3Cpolyline points='126 116 126 124 132 128'/%3E%3Cpath d='M148 136c2-8 6-14 10-16 2 5 1 13-3 19-3 4-7 3-7-3z'/%3E%3Ccircle cx='18' cy='62' r='2.5'/%3E%3Ccircle cx='96' cy='62' r='2.8'/%3E%3Ccircle cx='60' cy='108' r='3.5'/%3E%3Ccircle cx='104' cy='106' r='2.5'/%3E%3Ccircle cx='144' cy='106' r='3'/%3E%3Ccircle cx='102' cy='144' r='3'/%3E%3Ccircle cx='44' cy='146' r='2.5'/%3E%3C/svg%3E");
  background-color: #f5f1eb;
  background-image: var(--wa-doodle);
  background-repeat: repeat;
  background-size: 160px 160px;
  border-radius: 13px;
  padding: 12px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, .06);
}
.wa-preview-head { font-size: 11.5px; font-weight: 500; color: #54656f; line-height: 1.25; }
.wa-preview .auto-bubble { margin-left: 36px; background: #d9fdd3; color: #111b21; border-radius: 12px; padding: 10px 14px 20px; position: relative; box-shadow: 0 1px 2px rgba(11, 20, 26, .1); font-size: 13.2px; line-height: 1.48; }
.wa-bubble-text { white-space: pre-wrap; word-break: break-word; }
.wa-bubble-meta { position: absolute; right: 11px; bottom: 5px; font-size: 10.5px; color: #667781; display: inline-flex; align-items: center; gap: 3px; line-height: 1; user-select: none; }
.wa-checks { font-style: normal; color: #53bdeb; font-weight: 700; letter-spacing: -2px; margin-right: 2px; font-size: 11px; }
.wa-preview-foot { font-size: 10.5px; color: #54656f; line-height: 1.3; opacity: .82; }
:root[data-theme="dark"] .wa-preview {
  --wa-doodle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160' fill='none' stroke='%23ffffff' stroke-opacity='0.055' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 14l22-5M24 12a3.5 3.5 0 1 0 0 .1M18 22l22-5M32 19a3.5 3.5 0 1 0 0 .1'/%3E%3Cpath d='M52 10l2.5 5.5 5.5 2.5-5.5 2.5L52 26l-2.5-5.5L44 18l5.5-2.5z'/%3E%3Ccircle cx='74' cy='14' r='3'/%3E%3Cpath d='M88 8h20a3 3 0 0 1 3 3v13a3 3 0 0 1-3 3H88a3 3 0 0 1-3-3V11a3 3 0 0 1 3-3zm-3 6h26'/%3E%3Ccircle cx='126' cy='16' r='11'/%3E%3Ccircle cx='126' cy='16' r='4'/%3E%3Cpath d='M146 10l2 4.5 4.5 2-4.5 2-2 4.5-2-4.5-4.5-2 4.5-2z'/%3E%3Crect x='6' y='36' width='16' height='4.5' rx='2.2'/%3E%3Crect x='14' y='45' width='14' height='4.5' rx='2.2'/%3E%3Cpath d='M34 38l2.5 5.5 5.5 2.5-5.5 2.5L34 54l-2.5-5.5L26 46l5.5-2.5z'/%3E%3Crect x='46' y='30' width='14' height='10' rx='2'/%3E%3Cpath d='M54 54c0-8 8-14 18-14s18 6 18 14-8 14-18 14l-9 5 1.5-7c-6-2.5-10.5-7-10.5-12z'/%3E%3Cpath d='M72 46c-1.8-2.6-6-2.6-7 .8-.8 2.6 2.6 6 7 8.6 4.4-2.6 7.8-6 7-8.6-1-3.4-5.2-3.4-7-.8z'/%3E%3Ccircle cx='100' cy='42' r='3.5'/%3E%3Ccircle cx='122' cy='46' r='14'/%3E%3Cpath d='M110 38h10l4 8m-4 0h10'/%3E%3Cpath d='M144 36l6-4 6 6-4 6-6-2-2-6z'/%3E%3Cpath d='M4 72l12-8 8 18-12 8z'/%3E%3Ccircle cx='38' cy='96' r='14'/%3E%3Ccircle cx='38' cy='79' r='2.5'/%3E%3Cpath d='M34 100c2-4.5 4.5-7 9-9-2 4.5-4.5 7-9 9z'/%3E%3Ccircle cx='56' cy='76' r='3'/%3E%3Cpath d='M64 82c0-7 8-12 19-12s19 5 19 12-8 12-19 12c-2.5 0-5 0-7.5-.8L67 97l1.5-6c-3-2.5-4.5-5.5-4.5-9z'/%3E%3Cline x1='75' y1='80' x2='91' y2='80'/%3E%3Cline x1='75' y1='85' x2='87' y2='85'/%3E%3Cpath d='M110 78h20l2.5 7h-25l2.5-7z'/%3E%3Crect x='110' y='85' width='20' height='13' rx='1.5'/%3E%3Cpath d='M142 84c4-7 10-10 12-17 3.5 5 5 12 1.5 19-2.5 5-9.5 7-13.5-2z'/%3E%3Cpath d='M8 118l28 6-6 28-28-6zM17 119l-6 28M27 122l-6 28M6 127l28 6M4 136l28 6'/%3E%3Ccircle cx='48' cy='124' r='3.5'/%3E%3Cpath d='M58 148c0-4.5 4.5-8 10.5-8s10.5 3.5 10.5 8'/%3E%3Ccircle cx='68.5' cy='134' r='4.5'/%3E%3Cpath d='M86 116c3-5 9-6 12-2 3 4 1 11-5 14-5 2.5-10-1-9-7z'/%3E%3Ccircle cx='126' cy='124' r='14'/%3E%3Cpolyline points='126 116 126 124 132 128'/%3E%3Cpath d='M148 136c2-8 6-14 10-16 2 5 1 13-3 19-3 4-7 3-7-3z'/%3E%3Ccircle cx='18' cy='62' r='2.5'/%3E%3Ccircle cx='96' cy='62' r='2.8'/%3E%3Ccircle cx='60' cy='108' r='3.5'/%3E%3Ccircle cx='104' cy='106' r='2.5'/%3E%3Ccircle cx='144' cy='106' r='3'/%3E%3Ccircle cx='102' cy='144' r='3'/%3E%3Ccircle cx='44' cy='146' r='2.5'/%3E%3C/svg%3E");
  background-color: #0b141a;
  border-color: rgba(255, 255, 255, .07);
}
:root[data-theme="dark"] .wa-preview-head, :root[data-theme="dark"] .wa-preview-foot { color: #8696a0; }
:root[data-theme="dark"] .wa-preview .auto-bubble { background: #005c4b; color: #e9edef; box-shadow: 0 1px 2px rgba(0, 0, 0, .28); }
:root[data-theme="dark"] .wa-bubble-meta { color: rgba(233, 237, 239, .62); }
.care-list { display: flex; flex-direction: column; gap: 10px; max-height: min(60vh, 520px); overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.care-list .pick-group { padding: 6px 0 0; }
@media (max-width: 700px) {
  .auto-body { padding: 12px 12px 0; }
  .aq-item { flex-wrap: wrap; padding: 12px; }
  .aq-actions { width: 100%; padding-left: 44px; }
  .aq-actions .btn.primary { flex: 1; justify-content: center; }
  .aq-when { width: 100%; padding-left: 44px; }
}

/* ---------- Painel do WhatsApp (whatsapp.html, aberto pela extensão ao lado do WhatsApp Web) ---------- */
body.wa-page { background: var(--bg); }
.wa-panel { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-width: 0; }
.wa-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; background: var(--surface); flex: none; }
.wa-head .bk-mark { width: 30px; height: 30px; }
.wa-head .bk-mark .bk-sym { height: 26px; }
.wa-head-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wa-head-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-state { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-state.is-ok { color: var(--ok); }
.wa-state.is-warn { color: var(--warn-ink); }
.wa-tabs { background: var(--surface); flex: none; }
.wa-tabs .tabs { padding: 4px 8px 8px; }
.wa-tabs .tabs button { height: 32px; padding: 0 12px; font-size: 13px; }
.wa-body.view { padding: 12px 12px 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.wa-body.view:has(.wa-quick-dock) { padding-bottom: 0; }
.wa-body > * { margin: 0; }
.wa-sec h4 { margin: 0 0 8px; font-size: 14.5px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.wa-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.wa-sec-head h4 { margin: 0; }
.wa-sec-act { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; }
.wa-sec-act svg { width: 14px; height: 14px; }
.wa-sec .muted.small { margin: 4px 0 0; }
.wa-quick-dock {
  position: sticky; bottom: 0; z-index: 10;
  margin-top: auto; margin-left: -12px; margin-right: -12px;
  padding: 12px 14px 14px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 18px rgba(15, 23, 42, .06);
}
:root[data-theme="dark"] .wa-quick-dock { box-shadow: 0 -6px 18px rgba(0, 0, 0, .28); }
.wa-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--radius); padding: 12px; }
.wa-card strong { font-size: 15px; }
.wa-client-id, .wa-unknown > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wa-unknown p { margin: 4px 0 0; }
.wa-av { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.wa-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.wa-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-actions:empty { display: none; }
.wa-actions .btn.primary { flex: 1; justify-content: center; }
.wa-alerts { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.wa-alerts li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 10px; border-radius: 9px; background: var(--primary-50); color: var(--text-2); }
.wa-alerts li svg { width: 15px; height: 15px; flex: none; }
.wa-alerts li.warn { background: var(--warn-bg); color: var(--warn-ink); }
.wa-alerts li.bad { background: var(--danger-bg); color: var(--danger-ink); }
.wa-alerts li.pink { background: var(--pink-bg); color: var(--pink); font-weight: 500; }
.wa-notes { display: flex; gap: 8px; font-size: 13px; background: var(--surface); border-radius: 10px; padding: 8px 10px; color: var(--text-2); }
.wa-notes svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--text-3); }
.wa-notes p { margin: 0; white-space: pre-wrap; }
.wa-notes-box { display: flex; flex-direction: column; gap: 6px; }
.wa-notes-area {
  width: 100%; min-height: 62px; resize: vertical;
  border: 1px solid var(--border); border-radius: 11px;
  padding: 9px 11px; background: var(--surface); color: var(--text);
  font: inherit; font-size: 13px; line-height: 1.4;
  transition: border-color .15s, box-shadow .15s;
}
.wa-notes-area:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.wa-notes-foot { display: flex; justify-content: flex-end; }
.wa-qm-list { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.wa-qm-title { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 2px; }
.wa-qm-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.wa-qm-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.wa-qm-info strong { font-size: 13px; }
.wa-qm-info small { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-qm-acts { display: flex; gap: 2px; flex: none; }
.wa-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; }
.wa-stats > div { background: var(--surface); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.wa-stats small { font-size: 11px; color: var(--text-3); }
.wa-stats strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-list { display: flex; flex-direction: column; gap: 6px; }
.wa-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--surface); border: 0; border-radius: 10px; padding: 8px 10px; cursor: pointer; color: var(--text); font: inherit; }
.wa-row:hover:not(:disabled) { background: var(--primary-50); }
.wa-row > span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wa-row small { color: var(--text-3); font-size: 12px; }
.wa-row > svg { width: 16px; height: 16px; color: var(--ok); flex: none; }
.wa-ev { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 10px; padding: 8px 10px; }
.wa-ev.past { opacity: .6; }
.wa-ev-when { display: flex; flex-direction: column; align-items: center; min-width: 48px; flex: none; }
.wa-ev-when strong { font-size: 13px; }
.wa-ev-when small { font-size: 12px; color: var(--text-2); }
.wa-ev-main { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; flex: 1; font-size: 13px; }
.wa-ev-main > span { font-weight: 400; }
.wa-ev-main small { font-size: 12px; }
.wa-ev-featured {
  position: relative; overflow: hidden;
  align-items: stretch; gap: 12px;
  padding: 11px 12px 11px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ev-accent, var(--primary)) 26%, var(--border));
  box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--ev-accent, var(--primary)) 18%, transparent);
}
.wa-ev-featured::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--ev-accent, var(--primary));
}
.wa-ev-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 54px; padding: 6px 8px; border-radius: 11px; flex: none;
  background: color-mix(in srgb, var(--ev-accent, var(--primary)) 14%, var(--surface-2));
  color: var(--text); text-align: center; line-height: 1.1;
}
.wa-ev-mon { font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--primary-ink); }
.wa-ev-day { font-size: 19px; font-weight: 700; color: var(--text); margin: 2px 0 1px; }
.wa-ev-wk { font-size: 11px; font-weight: 500; color: var(--text-2); }
.wa-ev-featured .wa-ev-main { justify-content: center; gap: 4px; }
.wa-ev-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; flex-wrap: wrap; }
.wa-ev-time {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 700; color: var(--primary-ink);
  background: var(--primary-50); padding: 2px 8px; border-radius: 999px;
}
.wa-ev-time svg { width: 13px; height: 13px; flex: none; }
.wa-ev-svc { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.25; }
.wa-ev-pro { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); }
.wa-ev-pro svg { width: 13px; height: 13px; color: var(--text-3); flex: none; }
.wa-ev-confirm { margin-top: 4px; width: 100%; justify-content: center; }
.wa-ev-featured[data-ev] { cursor: pointer; transition: transform .12s, box-shadow .15s; }
.wa-ev-featured[data-ev]:hover { transform: translateY(-1px); }
.wa-inline-app { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: var(--bg); }
.wa-inline-app[hidden] { display: none !important; }
.wa-inline-bar { height: 40px; padding: 0 10px 0 14px; display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-bottom: 1px solid var(--border); flex: none; }
.wa-inline-app iframe { flex: 1; width: 100%; border: 0; }
.wa-pk { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.wa-pk li { display: flex; gap: 8px; color: var(--text-2); }
.wa-pk li svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--primary-ink); }
.wa-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-quick .chip-btn { padding: 5px 11px; font-size: 12.5px; }
.wa-search { width: 100%; height: 38px; border: 1px solid var(--border-strong); border-radius: 9px; padding: 0 11px; background: var(--surface); color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s; }
.wa-hello { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 24px 8px; }
.wa-hello > svg { width: 34px; height: 34px; color: var(--ok); }
.wa-hello h3 { margin: 0; }
.wa-hello p { margin: 0; }
.wa-hello.compact { padding: 10px 8px 4px; }
.wa-hello.compact > svg { width: 26px; height: 26px; }
.wa-q { display: flex; flex-direction: column; gap: 8px; }
.wa-qi { background: var(--surface); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.wa-qi-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.wa-qi-head small { flex-basis: 100%; padding-left: 34px; margin-top: -6px; }
.wa-qi-text { margin: 0; font-size: 13px; white-space: pre-wrap; background: var(--bubble); color: var(--text); border-radius: 10px 10px 10px 2px; padding: 8px 10px; max-height: 132px; overflow: auto; }
.wa-qi-actions { display: flex; align-items: center; gap: 4px; }
.wa-later, .wa-day { text-align: center; }
.wa-body .locked-card { margin: 0; }
.wa-page .toasts { bottom: 12px; width: calc(100% - 24px); }
.wa-page .toast { max-width: 100%; }

/* Automação: aviso de risco do envio e cartão da extensão */
.auto-risk { align-items: flex-start; }
.auto-risk svg { flex: none; margin-top: 2px; }
.auto-ext { display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.auto-ext-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.auto-ext-main strong { font-size: 14px; }
.auto-ext-actions { display: flex; gap: 6px; flex: none; }
.hist-err { display: block; font-size: 11.5px; margin-top: 2px; }
/* Janela do QR Code para conectar o WhatsApp (o código fica em fundo branco para a câmera ler também no tema escuro) */
.wa-qr-steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 4px; font-size: 13.5px; color: var(--text-2); }
.wa-qr { width: 264px; height: 264px; margin: 0 auto; display: grid; place-items: center; border-radius: 12px; background: #fff; padding: 12px; }
.wa-qr img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
@media (max-width: 640px) {
  .auto-ext { flex-wrap: wrap; }
  .auto-ext-actions { width: 100%; }
}

/* Sinal da extensão do WhatsApp no topo do menu (verde = conectado e enviando; vermelho = verificar) */
.wa-conn { margin-left: auto; position: relative; width: 32px; height: 32px; flex: none; padding: 0; display: grid; place-items: center; border-radius: 9px; border: 0; background: none; color: var(--sb-fg-2); cursor: pointer; transition: background .15s, color .15s; }
.wa-conn:hover { background: var(--sb-hover); color: var(--sb-fg); }
.wa-conn svg { width: 20px; height: 20px; }
.wa-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); flex: none; }
.wa-conn .wa-dot { position: absolute; top: 3px; right: 2px; width: 11px; height: 11px; border: 2px solid var(--sb-bg); }
.wa-conn.ok .wa-dot, .wa-conn-pop .ok .wa-dot { background: var(--ok); }
.wa-conn.bad .wa-dot, .wa-conn-pop .bad .wa-dot { background: var(--danger); }
.wa-conn.bad .wa-dot { animation: wa-blink 1.6s ease-in-out infinite; }
@keyframes wa-blink { 50% { opacity: .35; } }
.mobile-bar .wa-conn { margin-left: 0; color: var(--text-2); }
.mobile-bar .wa-conn .wa-dot { border-color: var(--surface); }
.wa-conn-pop { padding: 6px 8px 4px; font-size: 13px; white-space: normal; }
.wa-conn-pop > strong { display: flex; align-items: center; gap: 8px; line-height: 1.3; }
.wa-conn-pop ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.wa-conn-pop li { font-size: 12.5px; line-height: 1.4; }
.wa-conn-pop p { margin: 8px 0 0; }
@media (min-width: 901px) {
  .sb-collapsed .brand { flex-direction: column; gap: 10px; }
  .sb-collapsed .wa-conn { margin-left: 0; }
}
.wa-photo-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; margin-top: 4px; align-self: flex-start; }
.wa-photo-btn svg { width: 14px; height: 14px; }
.wa-conn-line { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; margin: 2px 0; color: var(--text-2); }
.wa-conn-line.ok .wa-dot { background: var(--ok); }
.wa-conn-line.bad .wa-dot { background: var(--danger); }
.brand .wa-conn { margin-right: 6px; }
.wa-head .wa-conn { margin-left: 0; color: var(--text-2); }
.wa-head .wa-conn:hover { background: var(--surface-2); color: var(--text); }
.wa-head .wa-conn .wa-dot { border-color: var(--surface); }
.wa-outdated { align-items: flex-start; font-size: 12.5px; }
.wa-outdated svg { flex: none; margin-top: 2px; }

/* ---------- Notas fiscais (js/pages/notas.js) ---------- */
.nf-tools { flex-wrap: wrap; gap: 10px; }
.nf-all { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.nf-body { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.nf-sum { margin: 6px 0 0; }
.nf-sub { display: block; font-size: 11.5px; margin-top: 1px; }
.nf-problem { display: flex; align-items: center; gap: 5px; color: var(--danger-ink); font-size: 12px; margin-top: 2px; }
.nf-problem svg { width: 13px; height: 13px; flex: none; }
.nf-test { display: inline-block; margin-left: 6px; font-size: 11.5px; font-weight: 500; color: var(--warn-ink); background: var(--warn-bg); border-radius: 99px; padding: 0 6px; }
.nf-actions { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nf-alert { margin-bottom: 12px; align-items: flex-start; }
.nf-alert svg, .nf-intro svg { flex: none; margin-top: 1px; }
.nf-intro { align-items: flex-start; }
.nf-month { display: inline-flex; align-items: center; gap: 8px; }
.nf-month input { height: 36px; border: 1px solid var(--border-strong); border-radius: 9px; padding: 0 10px; background: var(--surface); color: var(--text); font: inherit; }
.nf-partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.nf-partner { border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.nf-partner-head { display: flex; align-items: center; gap: 10px; }
.nf-partner-head > div:first-of-type { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.nf-partner-val { display: flex; flex-direction: column; align-items: flex-end; }
.nf-partner-val b { font-size: 16px; }
.nf-text { margin: 0; white-space: pre-wrap; font: 12.5px/1.5 inherit; font-family: inherit; background: var(--surface-2); border-radius: 10px; padding: 10px; color: var(--text-2); max-height: 180px; overflow: auto; }
.nf-received { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ok); background: var(--ok-bg); border-radius: 9px; padding: 8px 10px; }
.nf-received svg { width: 15px; height: 15px; flex: none; }
.nf-received span { flex: 1; color: var(--text-2); }
.nf-receive { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nf-receive input { height: 32px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 0 9px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; min-width: 0; }
.nf-receive input[name=numero] { width: 110px; } .nf-receive input[name=obs] { flex: 1; min-width: 140px; }
.nf-config { gap: 22px; max-width: 760px; }
.nf-sec { display: flex; flex-direction: column; gap: 12px; }
.nf-sec h3 { margin: 4px 0 0; font-size: 15px; }
.nf-status { display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.nf-status > svg { width: 20px; height: 20px; flex: none; color: var(--warn-ink); }
.nf-status.ok { background: var(--ok-bg); }
.nf-status.ok > svg { color: var(--ok); }
.nf-status > div { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.nf-status small { font-size: 12.5px; color: var(--text-2); }
.nf-form-foot { display: flex; justify-content: flex-end; }
.nf-switch { align-self: end; margin-bottom: 8px; }
.nf-adv > summary { cursor: pointer; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.nf-foot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
@media (max-width: 640px) { .nf-partners { grid-template-columns: 1fr; } .nf-body { padding: 4px 10px 12px; } }
.nf-tools { justify-content: flex-start; }
.nf-tools .toolbar-right { margin-left: auto; }

/* ============ Página de agendamento online: apresentação do salão, vários serviços, avaliações ============ */
.booking-card + .booking-card, .booking-top + [data-flow] > .booking-card:first-child { margin-top: 14px; }
.booking-hero .booking-brand { margin-bottom: 10px; align-items: flex-start; }
.booking-brand .brand-mark { width: 44px; height: 44px; font-size: 20px; border-radius: 12px; }
.bb-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bb-addr { display: inline-flex; align-items: flex-start; gap: 4px; }
.bb-addr svg { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.bb-rating { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; font: inherit; align-self: flex-start; }
.bb-rating:hover .muted { color: var(--primary-ink); text-decoration: underline; }
.booking-about { margin: 0 0 12px; color: var(--text-2); line-height: 1.5; white-space: pre-line; }
.booking-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.bk-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 99px; background: var(--surface-2); font-size: 12.5px; color: var(--text-2); }
.bk-chip svg { width: 14px; height: 14px; color: var(--primary-ink); }
.booking-links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.booking-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bg-thumb { position: relative; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--surface-2); }
.bg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bg-thumb span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; font-size: 12px; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.photo-full { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 10px; }
.bk-hint { margin: -6px 0 12px; }
.bk-title { margin: 6px 0 6px; font-size: 18px; }
.bk-status { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 500; margin-bottom: 12px; background: var(--ok-bg); color: var(--ok); }
.bk-status.warn { background: var(--warn-bg); color: var(--warn-ink); }
.bk-status.bad { background: var(--danger-bg); color: var(--danger-ink); }
/* Escolha de vários serviços */
/* Serviço escolhido: borda e fundo na cor principal (a borda mais grossa diferencia do efeito de passar o mouse) */
.choice.on { border-color: var(--primary); background: var(--primary-50); box-shadow: inset 0 0 0 1px var(--primary); }
.choice:disabled { opacity: .45; cursor: not-allowed; }
.choice:disabled:hover { border-color: transparent; background: var(--surface-2); }
.svc-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 0 4px; margin-top: 6px; background: var(--surface); border-top: 1px solid var(--border); }
.svc-bar-sum { flex: 1 1 auto; min-width: 0; font-size: 13.5px; color: var(--text-2); }
/* Estrelas */
.stars { display: inline-flex; align-items: center; gap: 1px; color: var(--border-strong); vertical-align: middle; }
.stars i { display: inline-grid; }
.stars svg { width: 15px; height: 15px; stroke-width: 1.6; }
.stars i.on { color: #f5a524; }
.stars i.on svg { fill: currentColor; }
.stars b { margin-left: 5px; font-size: 13px; color: var(--text); }
.choice .stars { margin-top: 2px; }
.booking-reviews .br-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.booking-reviews h2 { margin: 0; font-size: 17px; }
.br-list { display: flex; flex-direction: column; gap: 10px; }
.br-item { padding: 14px 16px; background: var(--surface-2); border-radius: 14px; }
.br-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.br-top small { margin-left: auto; }
.br-item p { margin: 6px 0 0; color: var(--text-2); line-height: 1.45; }
.br-item .br-reply, .rv-reply { font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--fill); color: var(--text-2); }
/* Avaliar o atendimento */
.rv-pro { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); border-radius: 14px; margin-bottom: 10px; }
.rv-pro-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.star-pick { display: flex; gap: 4px; margin-top: 6px; }
.star-btn { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--border-strong); cursor: pointer; }
.star-btn svg { width: 30px; height: 30px; stroke-width: 1.5; }
.star-btn:hover, .star-btn:focus-visible { background: var(--surface-2); }
.star-btn.on { color: #f5a524; }
.star-btn.on svg { fill: currentColor; }

/* ============ Agendamento online (gestão): página do salão, fotos, links ============ */
.online-form { max-width: 720px; }
.switch-row small { display: block; margin-top: 2px; font-weight: 400; }
.amenity-picks { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.amenity-pick { position: relative; cursor: pointer; }
.amenity-pick input { position: absolute; opacity: 0; pointer-events: none; }
.amenity-pick span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: 1px solid transparent; background: var(--fill); font-size: 13px; color: var(--text-2); }
.amenity-pick span svg { width: 15px; height: 15px; }
.amenity-pick input:checked + span { border-color: var(--primary); background: var(--primary-50); color: var(--primary-ink); font-weight: 400; }
.amenity-pick input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.gallery-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 10px; }
.ge-item { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 14px; background: var(--surface-2); }
.ge-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
.ge-item input { height: 32px; border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; background: var(--surface); color: var(--text); font-size: 13px; }
.ge-actions { display: flex; align-items: center; gap: 4px; }
.ge-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 160px; border-radius: 14px; background: var(--fill); color: var(--text-2); cursor: pointer; font-size: 13px; }
.ge-add:hover { color: var(--text); background: var(--primary-100); }
.ge-add svg { width: 22px; height: 22px; }
.link-rows { display: flex; flex-direction: column; gap: 10px; }
.link-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--surface-2); border-radius: 14px; }
.link-row-main { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.link-code { font-size: 12px; color: var(--primary-ink); overflow-wrap: anywhere; margin-top: 3px; }
.link-count { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.link-count b { font-size: 18px; }

/* ============ Avaliações ============ */
.rv-tools { justify-content: flex-end; margin-bottom: 12px; }
.rv-dash .info-box { margin-bottom: 14px; flex-wrap: wrap; }
.rv-dash .info-box .btn { margin-left: auto; }
.rv-pros { display: flex; flex-direction: column; gap: 8px; }
.rv-pro-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rv-pro-name { flex: 1 1 120px; min-width: 0; }
.rv-list { display: flex; flex-direction: column; gap: 10px; }
.rv-card { padding: 14px 16px; border-radius: 14px; background: var(--surface); }
.rv-card.is-hidden { background: var(--surface-2); }
.rv-card-head { display: flex; align-items: center; gap: 10px; }
.rv-who { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.rv-ratings { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 2px; font-size: 13px; color: var(--text-2); }
.rv-rating { display: inline-flex; align-items: center; gap: 6px; }
.rv-comment { margin: 6px 0 0; line-height: 1.5; }
.rv-reply { margin: 8px 0 0; }
.rv-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rv-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.rv-count { margin-left: auto; }
.rv-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 20px; align-items: start; }
.rv-page .info-box { margin-top: 14px; flex-wrap: wrap; }
.rv-preview { display: flex; flex-direction: column; gap: 6px; }
.rv-preview .booking-card { padding: 16px; box-shadow: none; }
@media (max-width: 900px) {
  .rv-page { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .link-row { flex-wrap: wrap; }
  .link-count { flex-direction: row; gap: 4px; min-width: 0; }
  .bg-thumb { width: 112px; height: 86px; }
  .booking-card { padding: 18px; }
}

/* ============ Metas por profissional ============ */
.month-nav { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 99px; background: var(--surface); }
.month-nav strong { min-width: 150px; text-align: center; font-size: 14px; }
.goal-salon { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.goal-salon-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-bottom: 14px; }
.goal-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; background: var(--surface); border-radius: var(--radius); }
.goal-head { display: flex; align-items: center; gap: 10px; }
.goal-who { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.goal-metric { display: flex; flex-direction: column; gap: 5px; }
.goal-metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.goal-nums { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.goal-nums strong { font-size: 17px; letter-spacing: -.01em; }
.goal-nums.big strong { font-size: 24px; }
.goal-nums .muted { font-size: 13px; }
.goal-pct { margin-left: auto; font-size: 13px; color: var(--text-2); }
.goal-bar { height: 8px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.goal-bar span { display: block; height: 100%; border-radius: inherit; background: var(--primary); transition: width .3s; }
.goal-bar.t-ok span { background: var(--ok); }
.goal-bar.t-warn span { background: var(--warn); }
.goal-bar.t-bad span { background: var(--danger); }
.goal-chip { padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 500; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.goal-chip.t-ok { background: var(--ok-bg); color: var(--ok); }
.goal-chip.t-warn { background: var(--warn-bg); color: var(--warn-ink); }
.goal-chip.t-bad { background: var(--danger-bg); color: var(--danger-ink); }
.goal-none-list { display: flex; flex-wrap: wrap; gap: 8px; }
.goal-none-item { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; background: var(--surface-2); border-radius: 99px; }
.goal-ref { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
.goal-modal .check { margin-right: 14px; }
@media (max-width: 560px) {
  .month-nav strong { min-width: 120px; }
  .goal-grid { grid-template-columns: 1fr; }
}

/* ============ Página do salão em abas, serviços com foto, ícones das redes ============ */
.booking-head .booking-brand { margin-bottom: 0; }
.bk-tabs { display: flex; gap: 4px; margin: 16px -24px -24px; padding: 0 16px; overflow-x: auto; }
.bk-tab { position: relative; flex: none; padding: 13px 12px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 400; color: var(--text-2); cursor: pointer; }
.bk-tab:hover { color: var(--text); }
.bk-tab.on { color: var(--primary-ink); font-weight: 500; }
.bk-tab.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px; background: var(--primary); }
.bk-tab-n { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: var(--surface-2); font-size: 11.5px; font-weight: 500; color: var(--text-2); }
.booking-head + [data-pane] > .booking-card, [data-pane] + [data-pane] > .booking-card { margin-top: 14px; }
.bk-sec { margin: 18px 0 10px; font-size: 15px; }
.bk-sec:first-child { margin-top: 0; }
.booking-about-card .booking-about { margin-bottom: 0; }
/* Serviço: foto, nome, duração, descrição e preço */
.choice.svc-choice { display: flex; align-items: center; justify-content: flex-start; gap: 12px; }
.svc-choice .choice-main { flex: 1 1 auto; min-width: 0; }
.choice-photo { width: 84px; height: 84px; flex: none; border-radius: 14px; object-fit: cover; background: var(--surface-2); box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 6%, transparent); }
.svc-choice { padding: 10px 14px 10px 10px; gap: 14px; }
/* Serviço sem foto: o símbolo do Bukme em uma cor só, cinza (tons neutros, acompanham o tema) */
.choice-ph { display: grid; place-items: center; background: color-mix(in srgb, var(--text) 7%, var(--surface)); }
.choice-ph .bk-sym { width: 40%; height: auto; color: color-mix(in srgb, var(--text) 22%, var(--surface)); }
.booking-addr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; color: var(--text-2); }
.booking-addr svg { width: 16px; height: 16px; color: var(--text-3); }
.booking-addr span { flex: 1 1 200px; }
.brand-logo { object-fit: cover; padding: 0; background: var(--surface); }
.logo-field { display: flex; align-items: center; gap: 16px; padding: 14px 16px; margin-bottom: 16px; border-radius: 16px; background: var(--surface-2); }
.logo-field > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.logo-field small { font-size: 12.5px; }
.logo-field .row-actions { margin-top: 8px; }
.logo-prev .brand-mark { width: 64px; height: 64px; font-size: 28px; border-radius: 16px; }
.choice-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; margin-top: 2px; line-height: 1.35; }
.choice-price { flex: none; font-weight: 500; }
/* Preço discreto, junto da duração: o destaque fica na foto e no nome do serviço */
.choice-main .choice-price { font-weight: 400; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Ícones das redes sociais (cor de cada marca) */
.soc { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: #fff; background: var(--text-3); flex: none; }
.soc svg { width: 13px; height: 13px; }
.soc.big { width: 40px; height: 40px; border-radius: 11px; }
.soc.big svg { width: 21px; height: 21px; }
.soc.instagram { background: linear-gradient(45deg, #f9a43a, var(--brand-instagram) 55%, #8a3ab9); }
.soc.whatsapp { background: var(--brand-whatsapp); }
.soc.google { background: var(--brand-google); }
.soc.facebook { background: var(--brand-facebook); }
.soc.geral { background: var(--primary); color: var(--on-primary); }
.booking-links .btn .soc { margin-right: 2px; }
/* Agendamento online › Serviços */
.osvc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.osvc-bulk { display: flex; gap: 6px; }
.osvc-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.osvc-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.osvc-row.off .osvc-main strong, .osvc-row.off .osvc-photo { opacity: .55; }
.osvc-photo { width: 44px; height: 44px; flex: none; border-radius: 9px; object-fit: cover; }
.osvc-photo.empty { display: grid; place-items: center; background: var(--fill); color: var(--text-3); }
.osvc-photo.empty svg { width: 18px; height: 18px; }
.osvc-main { display: flex; flex-direction: column; gap: 1px; flex: 1 1 0; min-width: 0; } /* nome sempre ao lado da foto; textos longos terminam com … */
.osvc-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) {
  .bk-tabs { margin: 14px -18px -18px; padding: 0 8px; }
  .choice-photo { width: 72px; height: 72px; }
  .choice-ph b { font-size: 19px; }
}

/* Bônus de meta */
.goal-bonus { display: flex; align-items: center; gap: 6px; margin-top: 2px; padding: 5px 8px; border-radius: 8px; background: var(--surface-2); font-size: 12.5px; color: var(--text-2); }
.goal-bonus svg { width: 14px; height: 14px; flex: none; color: var(--primary-ink); }
.goal-bonus.t-ok { background: var(--ok-bg); color: var(--ok); }
.goal-bonus.t-ok svg { color: var(--ok); }
.goal-bonus.off { opacity: .7; text-decoration: line-through; }
.goal-bonus-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; font-size: 13.5px; }
.goal-form-head, .goal-form-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; }
.goal-form-head { font-size: 12px; font-weight: 500; color: var(--text-2); }
.goal-form-head span:first-child { grid-column: 2; }
.goal-form-head span:last-child { grid-column: 3; }
.goal-form-label { font-size: 13.5px; font-weight: 400; }
.goal-form-row input, .goal-form-row .unit-input { width: 100%; }
.goal-form-row .unit-input { height: 38px; }
.goal-form-row .unit-input input[type=number] { width: auto; flex: 1 1 auto; }
@media (max-width: 560px) {
  .goal-form-head { display: none; }
  .goal-form-row { grid-template-columns: 1fr 1fr; }
  .goal-form-label { grid-column: 1 / -1; }
}

/* ---------- Tom das superfícies ----------
   Sem bordas nem sombras: um bloco se separa do que está atrás só pelo tom. Sobre o fundo da página ele é branco;
   dentro de um cartão ou janela (também brancos) desce um tom. :where() mantém a especificidade baixa, então os estados
   (:hover, .on, .off) de cada bloco continuam valendo. */
:where(.card, .panel, .modal, .popover, .drawer, .booking-card, .lock-card) :is(.panel, .kpi, .offer-card, .goal-card, .rv-card, .nf-partner, .nf-status, .plan-card, .wa-card) { background: var(--surface-2); }

/* ---------- Formulários: campos preenchidos, interruptores com mola, opções em cartões, janelas ----------
   :root:root só dá peso ao seletor, para ganhar das regras de campo mais antigas lá em cima (.field input etc.);
   :where() mantém o resto baixo para não brigar com os campos embutidos (qty-step, unit-input). */
:root:root {
  --field-h: 42px;
  --field-r: 12px;
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

/* Campos preenchidos (mesmo jeito da busca): tom neutro, sem moldura; ao focar, ficam claros com o anel na cor principal */
:root:root :where(.field) :where(input:not([type=checkbox], [type=radio], [type=color], [type=file], [type=range]), select, textarea),
:root:root :where(.sm-input, .notes-area, .status-select, .qty-step, .unit-input) {
  height: var(--field-h); border-radius: var(--field-r); border-color: transparent; background-color: var(--fill);
  transition: background-color .18s, border-color .18s, box-shadow .25s var(--ease-out);
}
:root:root :where(.sm-input, .unit-input) { height: 36px; }
:root:root :where(.field) textarea, :root:root .notes-area { height: auto; padding: 10px 12px; line-height: 1.5; }
:root:root :where(.field) :where(input, select, textarea):hover:not(:focus, :disabled, [readonly]),
:root:root :where(.sm-input, .notes-area, .status-select, .qty-step, .unit-input):hover:not(:focus, :focus-within) { background-color: var(--fill-hover); }
:root:root :where(.field) :where(input, select, textarea):focus,
:root:root :where(.sm-input, .notes-area):focus,
:root:root :where(.qty-step, .unit-input):focus-within,
:root:root .status-select:focus-visible { background-color: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-100); }
:root:root :where(.field) ::placeholder { color: var(--text-3); opacity: .85; }
/* Desativado e só leitura: sem preenchimento, com contorno tracejado (diferente de um campo vazio) */
:root:root :where(.field) :where(input, select, textarea):is(:disabled, [readonly]) { background-color: transparent; border: 1px dashed var(--border-strong); color: var(--text-3); }
/* Lista suspensa com seta própria (a nativa destoa entre navegadores) */
:root:root :where(.field) select:not([multiple]) {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23878da0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 16px;
}
:root:root :is(.qty-step, .unit-input) input { background-color: transparent !important; } /* o fundo é do contorno */
:root:root .unit-input .unit, :root:root .unit-input select { background: transparent; color: var(--text-3); }
/* Rótulo acende na cor principal enquanto se preenche o campo */
:root:root .field > span { transition: color .18s; }
:root:root .field:focus-within > span { color: var(--primary-ink); }
:root:root .field:has([aria-invalid="true"]) > span { color: var(--danger-ink); }
:root:root .form { gap: 14px; }
:root:root .field { gap: 6px; }

/* Interruptores maiores, com mola; o botão estica ao ser pressionado */
:root:root .switch, :root:root .toggle-row .switch { width: 44px; height: 26px; background: color-mix(in srgb, var(--text) 20%, transparent); transition: background .2s; }
:root:root .switch::after, :root:root .toggle-row .switch::after { top: 3px; left: 3px; width: 20px; height: 20px; transition: transform .32s var(--ease-spring), width .18s var(--ease-out); }
:root:root :is(.switch-row, .toggle-row) input:checked + .switch { background: var(--primary); }
:root:root :is(.switch-row, .toggle-row) input:checked + .switch::after { transform: translateX(18px); }
:root:root :is(.switch-row, .toggle-row):active .switch::after { width: 25px; }
:root:root :is(.switch-row, .toggle-row):active input:checked + .switch::after { transform: translateX(13px); }
:root:root :is(.switch-row, .toggle-row):hover input:not(:checked) + .switch { background: color-mix(in srgb, var(--text) 28%, transparent); }

/* Opções ligadas/desligadas viram cartões que acendem quando marcados */
:root:root .toggle-row { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); transition: background .2s; }
:root:root .toggle-row:has(input:checked) { background: var(--primary-50); }
:root:root .check-grid { gap: 8px; }
:root:root .check-grid .check { padding: 9px 12px; border-radius: 12px; background: var(--surface-2); transition: background .18s, color .18s; }
:root:root .check-grid .check:hover { background: var(--fill-hover); }
:root:root .check-grid .check:has(input:checked) { background: var(--primary-50); color: var(--text); font-weight: 400; }
:root:root :is(.check, .check-row) input { width: 18px; height: 18px; }

/* Seções do formulário: blocos de tom (cadastro do cliente) e títulos com um traço na cor principal */
:root:root .acc.cf-acc { border-bottom: 0; background: var(--surface-2); border-radius: 16px; padding: 0 16px; margin-bottom: 10px; }
:root:root .acc.cf-acc > summary, :root:root .acc.cf-acc:first-child > summary { padding: 14px 0; }
:root:root .cf-acc > .acc-body { padding: 0 0 16px; }
:root:root .cf-acc :where(.field) :where(input, select, textarea):not(:focus):not(:hover) { background-color: var(--fill-hover); }
:root:root .form-sec-title { display: flex; align-items: center; gap: 9px; font-size: 15px; margin: 18px 0 0; }
:root:root .form-sec-title::before { content: ""; width: 4px; height: 16px; border-radius: 99px; background: var(--primary); flex: none; }
:root:root .svc-row { border-radius: 16px; padding: 12px; }
:root:root .svc-row :where(.field) :where(input, select):not(:focus):not(:hover) { background-color: var(--fill-hover); }

/* Foto do cadastro compacta, ao lado dos botões (antes ocupava o alto do formulário) */
:root:root .photo-field { flex-direction: row; justify-content: flex-start; gap: 16px; padding: 2px 0 4px; }
:root:root .photo-field .avatar.xxl { width: 76px; height: 76px; }
:root:root .photo-prev { display: inline-grid; border-radius: 50%; outline: 2px dashed var(--border-strong); outline-offset: 3px; transition: outline-color .2s; }
:root:root .photo-field:hover .photo-prev { outline-color: var(--primary); }
:root:root .svc-modal .photo-prev, .svc-modal .photo-prev .avatar, .svc-modal .photo-prev .avatar img { border-radius: 18px; }
:root:root .photo-actions .btn { height: 32px; }

/* Endereço preenchido pelo CEP: os campos piscam na cor principal */
@keyframes v2-filled { 0%, 40% { background-color: var(--primary-100); } }
:root:root .autofilled { animation: v2-filled 1.2s var(--ease-out); }

/* Janelas: mais arredondadas, título maior e entrada com mola; no celular sobem de baixo */
@keyframes v2-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes v2-sheet { from { transform: translateY(100%); } }
:root:root .modal { border-radius: 20px; animation: v2-pop .28s var(--ease-out); }
:root:root .modal-foot { border-radius: 0 0 20px 20px; padding: 14px 20px; }
:root:root .modal-head { padding-top: 18px; }
:root:root .modal-head h2 { font-size: 20px; letter-spacing: -.01em; }
@media (max-width: 560px) {
  :root:root .modal, :root:root .modal.lg, :root:root .modal.xl, :root:root .modal.sm { border-radius: 22px 22px 0 0; animation: v2-sheet .34s var(--ease-out); }
  :root:root .modal-foot { border-radius: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  :root:root .modal-foot .btn { height: 44px; }
}

/* ---------- Gráficos: entrada animada e destaque ao passar o mouse ----------
   .chart-in é posto por ui.js só ao abrir a tela ou trocar aba/período (não a cada atualização automática). */
@keyframes bc-grow { from { transform: scaleY(0); } }
@keyframes hb-fill { from { transform: scaleX(0); } }
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }
@keyframes ring-sweep { from { --p: 0; } }
.bc-stack, .bc-group i { transform-origin: bottom; }
.chart-in .bc-stack, .chart-in .bc-group i { animation: bc-grow .6s cubic-bezier(.22, 1, .36, 1) backwards; animation-delay: min(calc(var(--i) * 18ms), 520ms); }
.bc-stack i:last-child, .bc-group i { border-radius: 6px 6px 0 0; }
.bc-stack { width: min(26px, 70%); }
/* Brilho suave de cima para baixo em cada barra (por cima da cor da série) */
.bc-stack i, .bc-group i, .hbar-track span { background-image: linear-gradient(to bottom, rgba(255, 255, 255, .22), transparent 70%); }
.bc-stack i, .bc-group i { transition: opacity .2s, filter .2s; }
/* Passando o mouse numa coluna, as outras se apagam */
.bc-cols:hover .bc-col:not(:hover) :is(.bc-stack, .bc-group) i { opacity: .4; }
.bc-cols:has(.bc-col:focus-visible) .bc-col:not(:focus-visible) :is(.bc-stack, .bc-group) i { opacity: .4; }
.hbar-track { height: 8px; }
.hbar-track span { transform-origin: left; transition: filter .2s; }
.chart-in .hbar-track span { animation: hb-fill .7s cubic-bezier(.22, 1, .36, 1) backwards; animation-delay: min(calc(var(--i) * 45ms), 400ms); }
.hbar:hover .hbar-track span { filter: brightness(1.08) saturate(1.1); }
.goal-ring.chart-in { animation: ring-sweep 1s cubic-bezier(.22, 1, .36, 1); }
.chart-tip { animation: pop .12s ease; }

/* ---------- Faixas que rolam para o lado (abas, tabelas largas, menus de seções) ----------
   ui.js põe fade-l / fade-r quando há mais itens daquele lado: a borda some num degradê, como uma sombra,
   indicando que dá para arrastar. Máscara (e não cor por cima) funciona sobre qualquer fundo, nos dois temas. */
@property --fade-l { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --fade-r { syntax: "<length>"; inherits: false; initial-value: 0px; }
.fade-l, .fade-r {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
  transition: --fade-l .2s, --fade-r .2s;
}
.fade-l { --fade-l: 40px; }
.fade-r { --fade-r: 40px; }

/* Quem pediu menos movimento ao sistema não vê animações nem transições */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Em telas de toque, os alvos menores ganham altura para o dedo não errar */
@media (pointer: coarse) {
  .nav-item { padding-top: 9px; padding-bottom: 9px; }
  .btn.sm, .icon-btn.sm { height: 34px; }
  .icon-btn.sm { width: 34px; }
}

/* ---------- Cadastro do serviço: grade de 4 colunas, campos da mesma altura e o mesmo ritmo vertical em todas as abas ---------- */
.svc-modal .ficha-panel.form { gap: 18px; }
.svc-modal .ficha-panel > :first-child { margin-top: 0; }
.svc-modal .ficha-panel > .form-sec-title { margin: 0 0 -6px; }
.svc-modal .ficha-panel[data-panel="cashback"] > .form-sec-title:first-child { display: none; } /* repete o nome da aba */
.svc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 16px; }
.svc-grid .span-1 { grid-column: span 1; }
.svc-grid .span-3 { grid-column: span 3; }
.svc-grid .span-2 { grid-column: span 2; }
.svc-grid .span-4 { grid-column: 1 / -1; }
.svc-modal .field > small { margin: 0; line-height: 1.4; }
/* Campos com unidade (R$, %, dias) e o custo com R$/%: mesma altura e largura total da coluna */
:root:root .svc-modal .unit-input { display: flex; width: 100%; height: var(--field-h); border-radius: var(--field-r); }
.svc-modal .unit-input input[type=number] { flex: 1 1 auto; width: auto; padding: 0 12px 0 2px; text-align: left; }
.svc-modal .unit-input input[type=number]:first-child { padding-left: 12px; }
.svc-modal .unit-input .unit { padding: 0 4px 0 12px; font-size: 14px; }
.svc-modal .unit-input input + .unit { padding: 0 12px 0 4px; }
.svc-modal .cost-input { max-width: none; gap: 8px; }
.svc-modal .field .cost-input input { text-align: left; }
.svc-modal .field .cost-input select { width: 96px; }
/* Foto: o contorno tracejado fica dentro da margem, alinhado aos campos */
:root:root .svc-modal .photo-field { padding: 5px 0 0 5px; align-items: center; }
/* Retorno: "Enviar depois de [dias]" no mesmo cartão e no mesmo texto da linha do interruptor */
.svc-ret-days { display: flex; align-items: center; gap: 14px; padding: 7px 14px; border-radius: 14px; background: var(--surface-2); cursor: text; }
.svc-ret-days strong { font-weight: 500; color: var(--text); }
:root:root .svc-modal .svc-ret-days .unit-input { width: 132px; height: 36px; background-color: var(--surface); }
/* Interruptor sem descrição: o texto fica no meio da altura do interruptor */
.toggle-row:not(:has(small)) { align-items: center; }
.toggle-row:not(:has(small)) .switch { margin-top: 0; }
.svc-auto-note { margin: 0; }
/* Produtos consumidos: botão alinhado à esquerda, quantidade com largura fixa */
.svc-modal .consume-row { grid-template-columns: minmax(0, 1fr) 110px auto 34px; gap: 8px; }
.svc-modal [data-add-consume] { align-self: flex-start; margin-top: 4px; }
/* Cashback: interruptor e valor alinhados como os outros campos */
.svc-modal .cb-item-field { gap: 12px 16px; }
.svc-modal .cb-item-field .cb-value { display: flex; gap: 8px; }
.svc-modal .cb-item-field .cb-value :is(select, input) { height: var(--field-h); border-radius: var(--field-r); border: 1px solid transparent; background-color: var(--fill); padding: 0 12px; }
.svc-modal .cb-item-field .cb-value select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23878da0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 16px; }
.svc-modal .cb-item-field .cb-value :is(select, input):focus { background-color: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-100); outline: none; }
@media (max-width: 700px) {
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-grid .span-2, .svc-grid .span-3 { grid-column: 1 / -1; }
}

/* Produtos: entrada e saída rápidas na linha; quem fez a movimentação */
.stock-quick { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.stock-who { display: flex; align-items: center; gap: 6px; margin: 0; }
.stock-who svg { width: 14px; height: 14px; flex: none; }

/* ---------- Vouchers ---------- */
.vch-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.vch-type { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid transparent; cursor: pointer; font-weight: 500; font-size: 13.5px; color: var(--text-2); transition: background .15s, border-color .15s, color .15s; }
.vch-type input { position: absolute; opacity: 0; pointer-events: none; }
.vch-type svg { width: 20px; height: 20px; }
.vch-type:hover { background: var(--primary-50); }
.vch-type:has(input:checked) { border-color: var(--primary); background: var(--primary-50); color: var(--text); }
.vch-type:has(input:checked) svg { color: var(--primary-ink); }
.vch-type:has(input:disabled) { cursor: default; opacity: .6; }
.vch-type:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--primary-100); }
.vch-code { display: flex; gap: 8px; align-items: center; }
.vch-pick { display: flex; gap: 8px; align-items: center; }
.vch-pick input { flex: 1; min-width: 0; }
.vch-pick .btn { flex: none; height: var(--field-h); }
.vch-code input { flex: 1; font-family: ui-monospace, 'Courier New', monospace; letter-spacing: .06em; text-transform: uppercase; }
.vch-sale-done { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.vch-sale-done svg { width: 16px; height: 16px; color: var(--ok); flex: none; margin-top: 2px; }
.vch-cell { display: flex; align-items: center; gap: 8px; }
.vch-code-txt { font-family: ui-monospace, 'Courier New', monospace; letter-spacing: .04em; }
.vch-gift { display: inline-grid; color: var(--primary-ink); }
.vch-gift svg { width: 16px; height: 16px; }
.vch-cell .vch-copy { width: 28px; height: 28px; margin: -4px -4px -4px -2px; color: var(--text-3); }
.vch-cell .vch-copy:hover { color: var(--primary-ink); }
.vch-cell .vch-copy svg { width: 15px; height: 15px; }
.vch-line { align-items: center; }
.vch-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.vch-x { border: 0; background: none; padding: 0; margin-left: 2px; display: inline-grid; cursor: pointer; color: inherit; opacity: .7; }
.vch-x:hover { opacity: 1; }
.vch-x svg { width: 12px; height: 12px; }
.vch-modal [data-gift][hidden] { display: none; }
.vch-on-col { width: 64px; }
/* Primeira linha: interruptor e, ao lado, o código (também no celular) */
.vch-head-row { display: flex; align-items: flex-end; gap: 16px; min-width: 0; }
.vch-status { flex: none; display: flex; padding-bottom: 4px; }
.vch-code-field { flex: 1; min-width: 0; }
/* Lista em cartões (celular): sem o interruptor, a situação já aparece no cartão */
@container (max-width: 640px) { .table .vch-on-col, .table.stack td.vch-on-col:first-child { display: none; } }
:root:root .vch-active { align-self: flex-start; height: 34px; padding: 0 12px 0 6px; border-radius: 99px; background: var(--fill); display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 13.5px; font-weight: 400; cursor: pointer; }
:root:root .vch-active:has(input:checked) { background: var(--primary-50); }
.vch-on { display: inline-flex; padding: 4px 0; }

/* ---------- Agenda com colunas estreitas ("Todos na tela" ou muitas colunas) ----------
   Classe narrow-cols posta por applyCols() em agenda.js quando cada coluna fica abaixo de ~130 px */
.narrow-cols .res-head { flex-direction: column; gap: 4px; padding: 6px 2px; }
.narrow-cols .res-head .avatar { width: 34px; height: 34px; }
.narrow-cols .res-head .meta { align-items: center; max-width: 100%; }
.narrow-cols .res-head .res-full, .narrow-cols .res-head small { display: none; }
.narrow-cols .res-head .res-first { display: block; font-size: 12.5px; font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.narrow-cols .ev-end { display: none; }
.narrow-cols .free-label { font-size: clamp(7px, 12.5cqw, 9px); } /* nunca maior que o nome do cliente */
/* Agendamentos: textos menores; o nome do cliente pode usar duas linhas */
.narrow-cols .ev { padding: 3px 4px; font-size: 9.5px; line-height: 1.2; gap: 1px; }
.narrow-cols .ev-top { font-size: 9px; gap: 3px; }
.narrow-cols .ev-flag { display: none; }
.narrow-cols .ev-client { order: 0; font-size: 9.5px; line-height: 1.15; white-space: normal; overflow-wrap: break-word; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.narrow-cols .ev-service, .narrow-cols .ev-notes { font-size: 9px; }
/* Coluna das horas mais estreita e linhas mais altas: mais espaço para cada horário */
.narrow-cols .fc-timegrid-slot-label-cushion { font-size: 10.5px; padding: 0 4px; }
.narrow-cols .fc-timegrid-slot { height: 2.4em; }
.narrow-cols .fc-event.block .fc-event-main { padding: 3px 4px; font-size: 10px; }
.narrow-cols .block-label svg { width: 11px; height: 11px; }

/* ---------- Janelas sobrepostas translúcidas (vidro fosco) ----------
   Janelas, painéis laterais, menus, popover da agenda e busca: o fundo aparece desfocado por trás.
   As partes internas que já eram um tom abaixo (rodapé, lista lateral da ficha) ficam translúcidas também. */
:root { --glass: color-mix(in srgb, var(--surface) 72%, transparent); --glass-2: color-mix(in srgb, var(--surface-2) 25%, transparent); --glass-blur: blur(10px) saturate(180%) brightness(1.6); }
/* O brilho extra deixa o vidro branco no claro (a página escurecida por trás não acinzenta a janela); no escuro, sem brilho */
:root[data-theme="dark"] { --glass-blur: blur(12px) saturate(160%); }
:root:root :is(.modal, .drawer, .palette-box) { background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
/* Menus e o resumo do agendamento abrem sem escurecer a tela: sem o brilho extra (que lá apagaria o fundo) */
:root:root :is(.menu, .popover) { background: color-mix(in srgb, var(--surface) 68%, transparent); -webkit-backdrop-filter: blur(10px) saturate(180%); backdrop-filter: blur(10px) saturate(180%); }
:root:root :is(.modal-foot, .ficha-nav) { background: var(--glass-2); }
/* Menu lateral aberto no celular: translúcido também, na cor da barra lateral */
@media (max-width: 900px) {
  :root:root .sidebar { background: color-mix(in srgb, var(--sb-bg) 80%, transparent); -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%); }
}

/* Filtro da página Comandas */
.cmd-periods { display: flex; flex-wrap: wrap; gap: 6px; }
.cmd-periods button { height: 30px; padding: 0 12px; border: 0; border-radius: 99px; background: var(--fill); color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 400; cursor: pointer; }
.cmd-periods button:hover { background: var(--fill-hover); }
.cmd-periods button.on { background: var(--primary-100); color: var(--primary-ink); font-weight: 500; }
.cmd-filter-dates input { width: 100%; height: 34px; border: 0; border-radius: 99px; padding: 0 12px; background: var(--fill); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.cmd-filter-dates { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; color: var(--text-3); }
.cmd-filter-dates[hidden] { display: none; }
.cmd-filter-dates input { flex: 1; min-width: 0; padding: 0 8px; }
.cmd-filter [data-clear] { font-weight: 500; }
.cmd-filter [data-clear]:disabled { opacity: .4; cursor: default; }
.cmd-filter .is-off { opacity: .4; pointer-events: none; } /* período não vale com "Em aberto" */
.cmd-filter .cmd-periods + .cmd-filter-dates { margin-top: 8px; }

/* Lista de comandas: tabela no espaço largo; cartões quando estreito (nunca rola para o lado) */
.cmd-list { container-type: inline-size; }
.cmd-cards { display: none; }
@container (max-width: 640px) {
  .cmd-list .table-wrap { display: none; }
  .cmd-cards { display: block; }
}
.cmd-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--grid); cursor: pointer; }
.cmd-card:hover { background: var(--primary-50); }
.cmd-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cmd-card-main strong { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-card-main small { color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-card-main .cmd-card-items { color: var(--text-2); }
.cmd-card-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cmd-card-side strong { font-size: 14px; }
.cmd-card-side small { font-size: 12px; white-space: nowrap; }
.cmd-card > .svc-fav { flex: none; }
.prod-card .prod-qty { font-size: 14px; font-weight: 500; line-height: 1.2; }
.prod-card .prod-qty span { font-size: 12px; font-weight: 400; color: var(--text-3); }
.prod-card .cmd-card-side small { color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.prod-card .prod-check { flex: none; width: 18px; height: 18px; margin: 0; pointer-events: none; }
.cmd-card.selected { background: var(--primary-50); }

/* Profissionais: arrastar o cartão pela alça muda a ordem (agenda e agendamento online) */
.pro-grip { margin-left: auto; align-self: flex-start; flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--text-3); cursor: grab; touch-action: none; }
.pro-grip:hover, .pro-grip:focus-visible { background: var(--fill); color: var(--text); }
.pro-grip svg { width: 18px; height: 18px; stroke-width: 2.6; }
.pro-cards.sorting { cursor: grabbing; user-select: none; }
.pro-cards.sorting .pro-grip { cursor: grabbing; }
.pro-card.dragging { opacity: .55; box-shadow: 0 0 0 2px var(--primary); }

/* Alças de arrastar (ui.sortable): o toque arrasta em vez de rolar a página */
[data-move], [data-grip] { touch-action: none; user-select: none; -webkit-user-select: none; }
.sorting, .sorting * { cursor: grabbing !important; user-select: none; }
tbody.dragging > tr > td { background: var(--primary-50); }
.cat-row.dragging { opacity: .6; }

/* Comissões › Vales / Pagamentos: nome do profissional em destaque */
.com-pro strong { font-weight: 500; font-size: 14px; color: var(--text); }
.cb-table .cb-on { width: 64px; }
.cb-table tr.selected td, .cb-table tr:has([data-sel]:checked) td { background: var(--primary-50); }
.cmd-card .cb-wa { flex: none; color: var(--ok, #16a34a); }
/* Interruptores menores nas listas (Cashback › Produtos e serviços, Agendamento online › Serviços) */
:root:root :is(.cb-table, .osvc-row) .switch { width: 34px; height: 20px; }
:root:root :is(.cb-table, .osvc-row) .switch::after { top: 3px; left: 3px; width: 14px; height: 14px; }
:root:root :is(.cb-table, .osvc-row) .switch-row input:checked + .switch::after { transform: translateX(14px); }
:root:root :is(.cb-table, .osvc-row) .switch-row:active .switch::after { width: 18px; }
:root:root :is(.cb-table, .osvc-row) .switch-row:active input:checked + .switch::after { transform: translateX(10px); }
.cb-table .cb-on { width: 54px; }

/* Agendamento online: lápis no canto do cartão de serviço; cartões dos agendamentos no celular */
.osvc-row { position: relative; }
.osvc-row .osvc-edit { position: absolute; top: 8px; right: 8px; color: var(--primary-ink); }
.osvc-row:has(.osvc-edit) .osvc-main { padding-right: 34px; }
.ol-card { align-items: flex-start; }
.ol-card .cmd-card-side { align-items: flex-end; }
.ol-card-actions { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.ol-card.pending { box-shadow: inset 3px 0 0 var(--warn); }

/* Financeiro › Contas a pagar e receber: cartões no celular */
.fin-card { align-items: flex-start; }
.fin-card .cmd-card-side { align-items: flex-end; }
.fin-card .cmd-card-main strong { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.25; }
.fin-card.overdue { box-shadow: inset 3px 0 0 var(--danger); }
.fin-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.fin-ic svg { width: 15px; height: 15px; }
.fin-ic.receita { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.fin-ic.despesa { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
@media (max-width: 640px) { .sum-strip { gap: 4px 14px; font-size: 13px; } }

/* Importar clientes (Clientes › Importar) */
.imp-foot { display: flex; align-items: center; gap: 8px; width: 100%; }
.imp-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 16px; margin: 12px 0; border-radius: 16px; background: var(--surface-2); border: 2px dashed var(--border-strong); cursor: pointer; text-align: center; transition: background .15s, border-color .15s; }
.imp-drop svg { width: 28px; height: 28px; color: var(--primary-ink); }
.imp-drop:hover, .imp-drop.over { background: var(--primary-50); border-color: var(--primary); }
.imp-drop.busy { opacity: .6; pointer-events: none; }
.imp-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 12px; }
.imp-file svg { width: 18px; height: 18px; color: var(--primary-ink); flex: none; }
.imp-file span { display: flex; flex-direction: column; min-width: 0; }
.imp-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-modal .check { margin-bottom: 6px; }
.imp-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 14px; margin: 10px 0 14px; }
.imp-map .field small { min-height: 1.3em; display: block; }
.imp-opts { display: grid; grid-template-columns: 180px 1fr; gap: 14px; align-items: start; margin-top: 14px; }
.imp-notes { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.imp-notes p { margin: 0; }
.imp-problems { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow: auto; font-size: 13px; display: flex; flex-direction: column; gap: 4px; color: var(--text-2); }
.imp-done { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 0 8px; }
.imp-done > svg { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); stroke-width: 2.6; margin-bottom: 8px; }
.imp-done h3 { margin: 0 0 4px; }
@media (max-width: 640px) { .imp-opts { grid-template-columns: 1fr; } }
