/* Hora Marcada — tema: cinzas levemente rosados, cor de destaque ameixa e verde para WhatsApp e promoções. */
:root {
  color-scheme: light;
  --bg: #F6F4F5;
  --surface: #FFFFFF;
  --surface-2: #F9F7F8;
  --line: #E8E2E6;
  --line-strong: #D2C8CF;
  --field-line: #8B8290;
  --ink: #1C1620;
  --ink-2: #51485A;
  --ink-3: #6E6575;

  --accent: #A62F6B;
  --accent-hover: #8C2659;
  --on-accent: #FFFFFF;
  --accent-soft: #FBEAF2;
  --accent-text: #8F2860;
  --accent-ring: rgba(166, 47, 107, .18);

  --wa: #12803F;
  --wa-hover: #0E6B33;
  --on-wa: #FFFFFF;
  --wa-soft: #E3F3EA;
  --wa-text: #0E6B33;

  --promo: #0B7146;
  --promo-soft: #E2F4EA;
  --promo-line: #8FD1AE;
  --promo-solid: #11834F;

  --red: #B42318;
  --red-soft: #FDECEA;
  --red-solid: #C0291B;
  --on-red: #FFFFFF;
  --amber: #8A5300;
  --amber-soft: #FFF1D6;
  --ok: #0E6B33;
  --ok-soft: #E3F3EA;
  --blue: #2546B8;
  --blue-soft: #E8EDFC;

  --ev-wait: #FFF4DE;
  --ev-wait-line: #E7A93B;
  --ev-ok: #E5F4EC;
  --ev-ok-line: #2F9E64;
  --ev-done: #EEEAF3;
  --ev-done-line: #8C7FA0;
  --ev-bad: #FDECEA;
  --ev-bad-line: #D9534A;
  --hatch: rgba(28, 22, 32, .06);

  --toast-bg: #1C1620;
  --toast-ink: #FFFFFF;
  --overlay: rgba(20, 12, 24, .46);
  --shadow-sm: 0 1px 2px rgba(30, 16, 36, .06);
  --shadow: 0 1px 2px rgba(30, 16, 36, .05), 0 10px 30px rgba(30, 16, 36, .07);
  --shadow-lg: 0 4px 12px rgba(30, 16, 36, .10), 0 24px 56px rgba(30, 16, 36, .18);

  --av-s: 55%;
  --av-bg: 91%;
  --av-fg: 28%;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E6575' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #131015; --surface: #1B171E; --surface-2: #221D26; --line: #312A35; --line-strong: #4A3F4F; --field-line: #7B6F81;
  --ink: #F2EDF4; --ink-2: #BEB2C3; --ink-3: #998D9F;
  --accent: #D0508D; --accent-hover: #BB437E; --on-accent: #FFFFFF; --accent-soft: #3A1A2C; --accent-text: #F4A7CB; --accent-ring: rgba(208, 80, 141, .32);
  --wa: #12803F; --wa-hover: #0E6B33; --on-wa: #FFFFFF; --wa-soft: #12291D; --wa-text: #63D08F;
  --promo: #6FD9A4; --promo-soft: #11291C; --promo-line: #275E41; --promo-solid: #1D8F5A;
  --red: #FF9A90; --red-soft: #3A1B1B; --red-solid: #C0291B; --on-red: #FFFFFF; --amber: #F5C26B; --amber-soft: #36290E;
  --ok: #63D08F; --ok-soft: #12291D; --blue: #9DB2FF; --blue-soft: #1C2546;
  --ev-wait: #3A2C10; --ev-wait-line: #D89B2E; --ev-ok: #12291D; --ev-ok-line: #3DBB7A; --ev-done: #29232F; --ev-done-line: #8C7FA0; --ev-bad: #3A1B1B; --ev-bad-line: #E06A61;
  --hatch: rgba(255, 255, 255, .05);
  --toast-bg: #F2EDF4; --toast-ink: #1C1620; --overlay: rgba(4, 2, 6, .64);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35); --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35); --shadow-lg: 0 4px 12px rgba(0, 0, 0, .4), 0 24px 56px rgba(0, 0, 0, .55);
  --av-s: 40%; --av-bg: 25%; --av-fg: 84%;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23998D9F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131015; --surface: #1B171E; --surface-2: #221D26; --line: #312A35; --line-strong: #4A3F4F; --field-line: #7B6F81;
  --ink: #F2EDF4; --ink-2: #BEB2C3; --ink-3: #998D9F;
  --accent: #D0508D; --accent-hover: #BB437E; --on-accent: #FFFFFF; --accent-soft: #3A1A2C; --accent-text: #F4A7CB; --accent-ring: rgba(208, 80, 141, .32);
  --wa: #12803F; --wa-hover: #0E6B33; --on-wa: #FFFFFF; --wa-soft: #12291D; --wa-text: #63D08F;
  --promo: #6FD9A4; --promo-soft: #11291C; --promo-line: #275E41; --promo-solid: #1D8F5A;
  --red: #FF9A90; --red-soft: #3A1B1B; --red-solid: #C0291B; --on-red: #FFFFFF; --amber: #F5C26B; --amber-soft: #36290E;
  --ok: #63D08F; --ok-soft: #12291D; --blue: #9DB2FF; --blue-soft: #1C2546;
  --ev-wait: #3A2C10; --ev-wait-line: #D89B2E; --ev-ok: #12291D; --ev-ok-line: #3DBB7A; --ev-done: #29232F; --ev-done-line: #8C7FA0; --ev-bad: #3A1B1B; --ev-bad-line: #E06A61;
  --hatch: rgba(255, 255, 255, .05);
  --toast-bg: #F2EDF4; --toast-ink: #1C1620; --overlay: rgba(4, 2, 6, .64);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35); --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35); --shadow-lg: 0 4px 12px rgba(0, 0, 0, .4), 0 24px 56px rgba(0, 0, 0, .55);
  --av-s: 40%; --av-bg: 25%; --av-fg: 84%;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23998D9F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* ===== Componentes (base do Retorno) =====
   Base clara e limpa, bordas finas no lugar de caixas pesadas. O verde aparece nas ações de WhatsApp e nas promoções. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (min-width: 861px) { html { scrollbar-gutter: stable; } }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hanken Grotesk", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.lock { overflow: hidden; }
[hidden] { display: none !important; }
h1, h2, h3, p, ul, ol, dl, dd, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { flex: none; display: block; }
h1, h2, h3 { font-family: "Bricolage Grotesque", "Hanken Grotesk", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: -0.012em; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); color: var(--ink); }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--ink-2); }
.small { font-size: 13.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.spacer { flex: 1 1 auto; }
.warn { color: var(--amber); }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 10px;
  font-size: 15px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn-sm { min-height: 34px; padding: 0 12px; border-radius: 9px; font-size: 14px; gap: 6px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border-color: var(--field-line); color: var(--ink); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-ghost { background: none; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.btn-wa { background: var(--wa); color: var(--on-wa); }
.btn-wa:hover:not(:disabled) { background: var(--wa-hover); }
.btn-danger { background: var(--surface); border-color: var(--field-line); color: var(--red); }
.btn-danger:hover:not(:disabled) { background: var(--red-soft); border-color: var(--red); }
.btn-danger-solid { background: var(--red-solid); color: var(--on-red); }
.btn-danger-solid:hover:not(:disabled) { filter: brightness(.92); }
a.btn { text-decoration: none; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.btn-row.end { justify-content: flex-end; margin-top: 8px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
  border: 0; border-radius: 10px; background: none; color: var(--ink-2);
  transition: background-color .12s, color .12s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn-sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn-ok:hover { background: var(--ok-soft); color: var(--ok); }
.icon-btn-danger:hover { background: var(--red-soft); color: var(--red); }

.link {
  padding: 4px 0; border: 0; background: none; color: var(--accent-text);
  font-weight: 600; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;
}
.link:hover { text-decoration-color: currentColor; }

/* ---------- campos ---------- */
.input {
  width: 100%; min-height: 44px; padding: 9px 12px;
  border: 1px solid var(--field-line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font-size: 16px; line-height: 1.4;
  transition: border-color .12s, box-shadow .12s;
}
.input::placeholder { color: var(--ink-3); opacity: 1; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.textarea { min-height: 92px; resize: vertical; }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: var(--chev); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
input[type="date"].input { min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field-label { font-size: 14px; font-weight: 600; color: var(--ink); }
p.field-label { margin: 4px 0 8px; }
.field-hint { font-size: 13px; color: var(--ink-3); }
.form-error { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 14.5px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; font-size: 14.5px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 88px; }
.pw-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--accent-text); font-size: 14px; font-weight: 600;
}
.pw-toggle:hover { background: var(--accent-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.followup .chips { margin-bottom: 12px; }
.chip {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px;
  border: 1px solid var(--field-line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 500; transition: background-color .12s, border-color .12s;
}
.chip:hover { background: var(--surface-2); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); font-weight: 650; }
.demo .chips { margin-bottom: 0; }

.chip-due {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  font-size: 12.5px; font-weight: 650; white-space: nowrap;
}
.due-late { background: var(--red-soft); border-color: transparent; color: var(--red); }
.due-today { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.due-soon { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }

.count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
  font-family: "Hanken Grotesk", Inter, system-ui, sans-serif; font-size: 12.5px; font-weight: 650; letter-spacing: 0; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 650; white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7; }
.pill-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.pill-bad { background: var(--red-soft); border-color: transparent; color: var(--red); }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: 12px; font-weight: 700; }
.notice { margin: 0 0 18px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); font-size: 14px; line-height: 1.45; }

.avatar {
  --hue: 210; --size: 40px;
  flex: none; display: inline-grid; place-items: center; width: var(--size); height: var(--size); border-radius: 50%;
  background: hsl(var(--hue) var(--av-s) var(--av-bg)); color: hsl(var(--hue) var(--av-s) var(--av-fg));
  font-weight: 700; font-size: calc(var(--size) * .42); line-height: 1; user-select: none;
}

/* ---------- estrutura do app ---------- */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side {
  position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 22px;
  padding: 20px 14px 16px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto;
}
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 10px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-name { font-family: "Bricolage Grotesque", "Hanken Grotesk", Inter, system-ui, sans-serif; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.logo-bg { fill: var(--accent); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 10px; color: var(--ink-2); font-weight: 550; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.account { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.account:hover, .account.on { background: var(--surface-2); }
.account-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.account-text strong { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-text small { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .link { align-self: flex-start; margin-left: 10px; }
.main { min-width: 0; padding: 36px clamp(20px, 4vw, 48px) 72px; }
.tabs { display: none; }

.page { max-width: 920px; margin: 0 auto; }
.page-wide { max-width: 1520px; }
.page-narrow { max-width: 920px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin-bottom: 26px; }
.page-head h1 { font-size: clamp(25px, 3vw, 31px); line-height: 1.15; font-weight: 650; }
.page-head .muted { margin-top: 6px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.block { margin-top: 34px; }
.page-head + .block, .page-head + .panel { margin-top: 0; }
.block-title { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 18px; font-weight: 650; }
.sub-title { margin: 0 0 12px; font-family: "Hanken Grotesk", Inter, system-ui, sans-serif; font-size: 14.5px; font-weight: 700; letter-spacing: 0; }
.panel { padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.panel h2 { font-size: 18px; font-weight: 650; }

/* indicadores */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 4px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.kpi { min-width: 0; padding: 16px 20px; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi dt { font-size: 13.5px; color: var(--ink-2); }
.kpi dd { margin: 4px 0 0; display: flex; flex-direction: column; gap: 2px; }
.kpi strong { font-family: "Bricolage Grotesque", "Hanken Grotesk", Inter, system-ui, sans-serif; font-size: 30px; line-height: 1.1; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi dd span { font-size: 13.5px; color: var(--ink-3); }

/* listas */
.list { margin-top: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.row { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row:hover { background: var(--surface-2); }
.row-open { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; margin: 0; padding: 0; border: 0; background: none; text-align: left; color: inherit; }
.row-open::after { content: ""; position: absolute; inset: 0; }
.row-open:focus-visible { outline: none; }
.row-open:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 12px; }
.row > :not(.row-open) { position: relative; z-index: 1; }
.row .chip-due, .row .row-when { pointer-events: none; }
.row-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; font-weight: 650; }
.row-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--ink-2); }
.row-note { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: var(--ink-3); }
.row-note svg { display: inline-block; vertical-align: -2px; margin-right: 5px; }
.row-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.row-when { font-size: 13px; }

/* ---------- pesquisa ---------- */
.toolbar { margin-bottom: 4px; }
.search { position: relative; display: block; max-width: 460px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 42px; }

/* ---------- vazio ---------- */
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 44px 20px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 16px; margin-top: 10px; }
.empty .btn { margin-top: 12px; }
.empty-title { font-family: "Bricolage Grotesque", "Hanken Grotesk", Inter, system-ui, sans-serif; font-size: 19px; font-weight: 650; }
.list + .empty, .list .empty { margin-top: 0; }

/* ---------- primeiros passos ---------- */
.onboard h2 { margin-bottom: 4px; }
.steps { margin: 14px 0 12px; }
.steps li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }

/* ---------- funil ---------- */
.seg { display: inline-flex; max-width: 100%; gap: 2px; margin-bottom: 20px; padding: 3px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.seg-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font-size: 14px; font-weight: 650; white-space: nowrap; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.board { display: flex; align-items: flex-start; gap: 14px; padding-bottom: 14px; overflow-x: auto; }
.col { flex: 1 0 264px; max-width: 390px; display: flex; flex-direction: column; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.col-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 2px 4px 0; }
.col-head h3 { font-family: "Hanken Grotesk", Inter, system-ui, sans-serif; font-size: 14.5px; font-weight: 700; letter-spacing: 0; }
.col-head .icon-btn { margin-left: auto; }
.col-sum { order: 9; flex-basis: 100%; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.col-body { display: flex; flex-direction: column; gap: 8px; min-height: 76px; padding: 2px; border-radius: 12px; }
.col-body.over { background: var(--accent-soft); outline: 2px dashed var(--accent); outline-offset: -2px; }
.col-empty { display: grid; place-items: center; min-height: 72px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--ink-3); font-size: 13.5px; }
.card { position: relative; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.card:hover { border-color: var(--line-strong); }
.card.dragging { opacity: .45; }
.card-open { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 12px 46px 12px 13px; border: 0; border-radius: 12px; background: none; text-align: left; color: inherit; }
.card-name { font-weight: 700; font-size: 15px; }
.card-title { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.card-meta:empty { display: none; }
.card-value { font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.card-wa {
  position: absolute; top: 9px; right: 9px; display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: 50%; background: var(--wa-soft); color: var(--wa-text); transition: background-color .12s, color .12s;
}
.card-wa:hover:not(:disabled) { background: var(--wa); color: var(--on-wa); }
.card-wa:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- janelas e painel lateral ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; background: var(--overlay); animation: fade .16s ease-out; }
.overlay-modal { align-items: center; justify-content: center; padding: 24px; }
.overlay-drawer { justify-content: flex-end; }
.modal { display: flex; flex-direction: column; width: 100%; max-width: 520px; max-height: min(780px, calc(100vh - 48px)); max-height: min(780px, calc(100dvh - 48px)); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); animation: rise .18s ease-out; }
.modal.wide { max-width: 640px; }
.drawer { display: flex; flex-direction: column; width: min(560px, 100%); height: 100%; background: var(--surface); box-shadow: var(--shadow-lg); animation: slide .2s ease-out; }
.layer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 18px 12px 22px; }
.layer-title { font-size: 20px; font-weight: 650; line-height: 1.25; padding-top: 6px; }
.drawer-head .layer-title { padding-top: 0; font-size: 21px; }
.layer-body { flex: 1 1 auto; min-height: 0; padding: 4px 22px 22px; overflow-y: auto; overscroll-behavior: contain; }
.layer-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }
.drawer-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.drawer-who { min-width: 0; }
.drawer-who .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 18px; }
.drawer-notes { margin-bottom: 4px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.drawer .block { margin-top: 26px; }
.drawer .block:first-of-type { margin-top: 22px; }
.composer-to { display: flex; align-items: center; gap: 10px; margin: 2px 0 16px; }
.closed-banner { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; font-size: 14.5px; }
.closed-won { background: var(--ok-soft); color: var(--ok); }
.closed-lost { background: var(--red-soft); color: var(--red); }
.deal-line { margin-bottom: 4px; }
.mini-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 11px 14px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; }
.mini-list li:first-child .mini-row { border-top: 0; }
.mini-row:hover { background: var(--surface-2); }
.drawer .block + .btn-sm { margin-top: 18px; }
.btn-row-close { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }

.timeline { position: relative; margin-top: 18px; }
.tl { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding-bottom: 18px; }
.tl::before { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 1px; background: var(--line); }
.tl:last-child { padding-bottom: 0; }
.tl:last-child::before { display: none; }
.tl-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-3); }
.tl-whatsapp .tl-icon { background: var(--wa-soft); border-color: transparent; color: var(--wa-text); }
.tl-won .tl-icon { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.tl-lost .tl-icon { background: var(--red-soft); border-color: transparent; color: var(--red); }
.tl-text { font-size: 14.5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.tl-time { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }

/* ---------- avisos ---------- */
#toasts { position: fixed; left: 50%; bottom: 24px; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(460px, calc(100vw - 32px)); transform: translateX(-50%); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 100%; padding: 11px 16px; border-radius: 12px; background: var(--toast-bg); color: var(--toast-ink); font-size: 14.5px; box-shadow: var(--shadow-lg); animation: rise .18s ease-out; }
.toast-err { background: var(--red-solid); color: var(--on-red); }
.toast-action { padding: 4px 2px; border: 0; background: none; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- entrar e criar conta ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.auth-side { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 40px clamp(28px, 5vw, 72px); }
.auth-pitch { max-width: 600px; }
.auth-pitch h1 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.04; font-weight: 700; letter-spacing: -0.03em; }
.auth-pitch p { margin-top: 18px; max-width: 46ch; font-size: 17.5px; line-height: 1.55; color: var(--ink-2); }
.peek { width: 100%; max-width: 470px; padding: 14px 18px 6px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.peek-title { margin-bottom: 8px; font-family: "Bricolage Grotesque", "Hanken Grotesk", Inter, system-ui, sans-serif; font-size: 16px; font-weight: 650; }
.peek-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.peek-main { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.peek-name { font-size: 14.5px; font-weight: 650; }
.peek-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ink-2); }
.peek-send { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--wa-soft); color: var(--wa-text); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px clamp(16px, 4vw, 56px); }
.auth-card { width: 100%; max-width: 456px; padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.auth-card h2 { font-size: 26px; font-weight: 650; }
.auth-card > .muted { margin: 6px 0 20px; }
.auth-card > h2 { margin-top: 0; }
.step { margin-bottom: 8px; font-size: 13.5px; font-weight: 650; color: var(--ink-3); }
.auth-form { display: flex; flex-direction: column; margin-top: 18px; }
.auth-card > .notice + .auth-form, .auth-card > .muted + .notice + .auth-form { margin-top: 0; }
.auth-form > .btn-block { margin-top: 6px; }
.auth-links { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.demo { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.demo-title { margin-bottom: 12px; font-size: 14px; color: var(--ink-2); }
.seg-set { margin-bottom: 18px; }
.seg-set .field-label { display: block; margin-bottom: 10px; }
.seg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg-card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 11px 12px; border: 1px solid var(--field-line); border-radius: 12px; background: var(--surface); cursor: pointer; transition: background-color .12s, border-color .12s; }
.seg-card:hover { background: var(--surface-2); }
.seg-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.seg-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg-name { font-size: 14.5px; font-weight: 700; }
.seg-hint { font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
.seg-card:has(input:checked) .seg-hint { color: var(--accent-text); }
.boot-error { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 420px; margin: 18vh auto 0; padding: 0 20px; text-align: center; }

/* ---------- mensagens e conta ---------- */
.connect { margin-bottom: 8px; }
.connect-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.connect .btn-row { margin-top: 14px; }
.tpl-list { margin-top: 12px; }
.tpl { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 18px; border-top: 1px solid var(--line); }
.tpl:first-child { border-top: 0; }
.tpl-main { min-width: 0; }
.tpl-name { font-weight: 700; }
.tpl-body { margin-top: 3px; font-size: 14.5px; color: var(--ink-2); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tpl .row-actions { margin-top: -2px; }
.preview { margin-bottom: 16px; padding: 12px 14px; border-radius: 4px 14px 14px 14px; background: var(--wa-soft); color: var(--ink); font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.settings { max-width: 640px; margin-top: 0; padding: 22px 0 28px; border-top: 1px solid var(--line); }
.page-head + .settings { border-top: 0; padding-top: 0; }
.settings .block-title { margin-bottom: 16px; }
.setting-rows { display: flex; flex-direction: column; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.setting-row:first-child { border-top: 0; padding-top: 0; }
.setting-row > div { min-width: 0; }
.setting-row .btn { flex: none; }
.secret { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.secret code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 18px; font-weight: 700; letter-spacing: .02em; overflow-wrap: anywhere; user-select: all; }

/* ---------- administração ---------- */
.row-static { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; }
.row-static .row-note { white-space: normal; }
.admin-list { margin-top: 14px; }

/* ---------- movimento ---------- */
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes slide { from { opacity: 0; transform: translateX(28px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- telas pequenas ---------- */
@media (max-width: 960px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { gap: 20px; padding: 28px clamp(16px, 5vw, 40px) 4px; }
  .auth-pitch h1 { font-size: clamp(30px, 8vw, 40px); }
  .auth-pitch p { margin-top: 12px; font-size: 16px; }
  .peek { display: none; }
  .auth-main { align-items: flex-start; padding-top: 20px; padding-bottom: 40px; }
}

@media (max-width: 860px) {
  .shell { display: block; }
  .side { display: none; }
  .main { padding: 22px 16px calc(92px + env(safe-area-inset-bottom, 0px)); }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface);
  }
  .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; border-radius: 10px; color: var(--ink-2); font-size: 11.5px; font-weight: 600; }
  .tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab.on { color: var(--accent-text); }
  .tab.on svg { stroke-width: 2.2; }
  #toasts { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .page-head { margin-bottom: 20px; }
  .col { flex-basis: 78vw; }
  .seg { display: flex; width: 100%; }
  .seg-btn { flex: 1 1 auto; justify-content: center; gap: 6px; padding: 0 8px; }
}

@media (max-width: 640px) {
  .kpi { padding: 14px 12px; }
  .kpi strong { font-size: 24px; }
  .kpi dd span { font-size: 12.5px; }
  .row { flex-wrap: wrap; padding: 12px 14px; row-gap: 8px; }
  .row-open, .row-static { flex: 1 1 100%; }
  .row .chip-due, .row .pill { margin-left: 52px; }
  .row .row-actions { margin-left: auto; }
  .row-when { display: none; }
  .row-plain { flex-wrap: nowrap; }
  .row-plain .row-open { flex: 1 1 auto; }
  .row-plain .btn-wa { width: 40px; min-height: 40px; padding: 0; border-radius: 50%; }
  .row-plain .btn-wa span { display: none; }
  .overlay-modal { align-items: flex-end; padding: 0; }
  .modal, .modal.wide { max-width: none; max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0; }
  .drawer { width: 100%; }
  .layer-body { padding-left: 18px; padding-right: 18px; }
  .layer-head { padding-left: 18px; }
  .layer-foot { flex-wrap: wrap; padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .layer-foot .btn { flex: 1 1 auto; }
  .layer-foot .spacer { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 20px; border-radius: 18px; }
  .seg-grid { grid-template-columns: 1fr; }
  .setting-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .tpl { flex-direction: column; gap: 10px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1 1 auto; }
}

/* ===== Hora Marcada: componentes próprios ===== */
.layer-titles { min-width: 0; }
.layer-sub { margin-top: 2px; color: var(--ink-2); font-size: 14px; }
.avatar-img { object-fit: cover; padding: 0; }
.pill-wait { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.pill-done { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.pill-off { background: var(--surface-2); color: var(--ink-3); }
.pill-info { background: var(--blue-soft); border-color: transparent; color: var(--blue); }
.pill-promo { background: var(--promo-soft); border-color: transparent; color: var(--promo); }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 650; white-space: nowrap; }
.tag-promo { background: var(--promo-soft); border-color: var(--promo-line); color: var(--promo); }
.tag-warn { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.tag-bad { background: var(--red-soft); border-color: transparent; color: var(--red); }
.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi-link { display: block; color: inherit; }
.kpi-link:hover strong { color: var(--accent-text); }
.btn-promo { background: var(--promo-solid); color: #fff; }
.btn-promo:hover:not(:disabled) { filter: brightness(.94); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.num { font-variant-numeric: tabular-nums; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.hint-box { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.hint-box strong { color: var(--ink); }

/* interruptor */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; cursor: pointer; }
.switch-text { display: flex; flex-direction: column; gap: 2px; font-size: 15px; font-weight: 600; }
.switch-text small { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.switch { position: relative; flex: none; width: 46px; height: 28px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch-ui { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background-color .15s; pointer-events: none; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }

/* avisos no topo */
.banner { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); font-size: 14.5px; }
.banner svg { margin-top: 1px; }
.banner > div { flex: 1 1 auto; min-width: 0; }
.banner strong { display: block; color: inherit; }
.banner-warn { background: var(--amber-soft); color: var(--amber); }
.banner-bad { background: var(--red-soft); color: var(--red); }
.banner-ok { background: var(--ok-soft); color: var(--ok); }
.banner .btn { flex: none; }

/* Hoje */
.hello h1 { font-size: clamp(25px, 3vw, 31px); font-weight: 650; }
.hello p { margin-top: 4px; color: var(--ink-2); }
.appt-row .appt-time { flex: none; width: 58px; font-family: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif; font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.appt-row .appt-time small { display: block; font-family: "Hanken Grotesk", system-ui, sans-serif; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.appt-row.is-now { background: var(--accent-soft); }
.appt-row.is-past .appt-time { color: var(--ink-3); }
.setup { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.setup-step { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.setup-step.done { opacity: .62; }
.setup-step strong { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.setup-step .muted { font-size: 13.5px; }
.setup-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 700; }
.setup-step.done .setup-num { background: var(--ok-soft); color: var(--ok); }

/* barra de datas */
.datebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.datebar .date-label { min-width: 0; font-family: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif; font-size: 19px; font-weight: 650; }
.datebar .input { width: auto; min-height: 38px; padding-top: 6px; padding-bottom: 6px; }
.day-note { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 14px; color: var(--ink-2); }

/* agenda em colunas */
.cal-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cal { --slot: 1.25px; display: grid; min-width: 100%; }
.cal-head { position: sticky; top: 0; z-index: 3; display: contents; }
.cal-hcell { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); font-weight: 650; font-size: 14.5px; }
.cal-hcell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-hcell small { font-weight: 500; color: var(--ink-3); }
.cal-corner { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; left: 0; top: 0; z-index: 4; }
.cal-times { position: sticky; left: 0; z-index: 2; background: var(--surface); border-right: 1px solid var(--line); }
.cal-time { position: absolute; right: 8px; transform: translateY(-50%); font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cal-col { position: relative; border-left: 1px solid var(--line); cursor: copy; }
.cal-col:first-of-type { border-left: 0; }
.cal-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); pointer-events: none; }
.cal-line.half { border-top-style: dashed; opacity: .55; }
.cal-off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, var(--hatch) 0 6px, transparent 6px 12px); pointer-events: none; }
.cal-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--accent); z-index: 2; pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.ev { position: absolute; left: 4px; right: 4px; z-index: 1; display: flex; flex-direction: column; gap: 1px; overflow: hidden; padding: 5px 8px; border: 0; border-left: 4px solid var(--ev-wait-line); border-radius: 8px; background: var(--ev-wait); color: var(--ink); text-align: left; font-size: 13px; line-height: 1.25; cursor: pointer; box-shadow: var(--shadow-sm); }
.ev:hover { filter: brightness(.97); }
.ev:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ev strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.ev-confirmado { background: var(--ev-ok); border-left-color: var(--ev-ok-line); }
.ev-concluido { background: var(--ev-done); border-left-color: var(--ev-done-line); }
.ev-faltou { background: var(--ev-bad); border-left-color: var(--ev-bad-line); }
.ev-cancelado { display: none; }
.ev-block { z-index: 0; background: var(--surface-2); border-left-color: var(--line-strong); color: var(--ink-2); cursor: pointer; background-image: repeating-linear-gradient(135deg, var(--hatch) 0 6px, transparent 6px 12px); }
.ev-tight { flex-direction: row; align-items: center; gap: 6px; padding-top: 2px; padding-bottom: 2px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 3px; border-left: 3px solid; }

/* agenda em lista (celular e semana) */
.day-group { margin-top: 22px; }
.day-group:first-child { margin-top: 0; }
.day-group h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-family: "Hanken Grotesk", system-ui, sans-serif; font-size: 15px; font-weight: 700; }

/* escolha de horários */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.slot { min-height: 42px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; transition: background-color .12s, border-color .12s; }
.slot:hover { border-color: var(--accent); background: var(--accent-soft); }
.slot.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.slot-group { margin-bottom: 14px; }
.slot-group > p { margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.daystrip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; }
.day-btn { flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px; width: 64px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); scroll-snap-align: start; transition: background-color .12s, border-color .12s; }
.day-btn small { font-size: 12px; color: var(--ink-3); text-transform: capitalize; }
.day-btn strong { font-family: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif; font-size: 20px; font-weight: 650; line-height: 1.15; }
.day-btn em { font-style: normal; font-size: 11px; color: var(--ink-3); text-transform: lowercase; }
.day-btn:hover:not(:disabled) { border-color: var(--accent); }
.day-btn.on { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.day-btn.on small, .day-btn.on em { color: var(--on-accent); opacity: .85; }
.day-btn:disabled { opacity: .5; cursor: not-allowed; background: var(--surface-2); }
.day-btn.hol em { color: var(--red); }

/* seleção em fichas */
.pick-list { display: flex; flex-direction: column; gap: 8px; }
.pick { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color .12s, background-color .12s, box-shadow .12s; }
.pick:hover { border-color: var(--line-strong); }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pick-title { font-weight: 650; }
.pick-sub { font-size: 13.5px; color: var(--ink-2); }
.pick-side { flex: none; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.pick-check { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1.5px solid var(--field-line); border-radius: 7px; color: transparent; }
.pick-check.round { border-radius: 50%; }
.pick:has(input:checked) .pick-check { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.pick-img { flex: none; width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.chip-check { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--field-line); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 550; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); font-weight: 650; }
.chip-check:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* semana de trabalho */
.week { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.week-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.week-row:first-child { border-top: 0; }
.week-day { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.week-day input { width: 18px; height: 18px; accent-color: var(--accent); }
.week-ranges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.range { display: inline-flex; align-items: center; gap: 6px; }
.range .input { width: 128px; min-height: 38px; padding: 6px 10px; }
.week-row.closed .week-ranges { color: var(--ink-3); font-size: 14px; }

/* fila */
.queues { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.queue-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.queue-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.queue-top h2 { font-size: 17px; font-weight: 650; }
.queue-now { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; background: var(--accent-soft); }
.queue-code { font-family: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif; font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.queue-now small { display: block; font-size: 13px; color: var(--accent-text); }
.queue-list .row { padding: 10px 16px; }
.ticket-code { flex: none; display: inline-grid; place-items: center; min-width: 52px; height: 34px; padding: 0 8px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 750; font-variant-numeric: tabular-nums; }
.queue-foot { padding: 12px 16px; border-top: 1px solid var(--line); }

/* página pública */
.pub { min-height: 100vh; min-height: 100dvh; padding-bottom: 120px; }
.pub-wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.pub-head { padding: 28px 0 18px; }
.pub-brand { display: flex; align-items: center; gap: 14px; }
.pub-logo { flex: none; width: 64px; height: 64px; border-radius: 18px; object-fit: cover; background: var(--surface); border: 1px solid var(--line); }
.pub-brand h1 { font-size: clamp(23px, 6vw, 30px); font-weight: 700; line-height: 1.1; }
.pub-brand p { margin-top: 4px; color: var(--ink-2); font-size: 14.5px; }
.pub-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; color: var(--ink-2); font-size: 14px; }
.pub-meta span, .pub-meta a { display: inline-flex; align-items: center; gap: 6px; }
.pub-meta a { color: var(--accent-text); font-weight: 600; }
.pub-about { margin-top: 12px; color: var(--ink-2); font-size: 15px; }
.steps-bar { display: flex; gap: 6px; margin: 4px 0 18px; }
.steps-bar i { flex: 1 1 0; height: 4px; border-radius: 4px; background: var(--line); }
.steps-bar i.on { background: var(--accent); }
.pub-step h2 { font-size: 21px; font-weight: 650; margin-bottom: 4px; }
.pub-step > .muted { margin-bottom: 16px; }
.pub-sec { margin: 18px 0 10px; font-size: 13px; font-weight: 700; color: var(--ink-3); letter-spacing: .01em; }
.promo-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px solid var(--promo-line); border-radius: 16px; background: var(--promo-soft); cursor: pointer; }
.promo-card input { position: absolute; opacity: 0; pointer-events: none; }
.promo-card:has(input:checked) { border-color: var(--promo-solid); box-shadow: 0 0 0 1px var(--promo-solid); }
.promo-card:has(input:focus-visible) { outline: 2px solid var(--promo-solid); outline-offset: 2px; }
.promo-badge { flex: none; display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 10px; background: var(--promo-solid); color: #fff; font-size: 13.5px; font-weight: 750; line-height: 1.2; text-align: center; max-width: 140px; }
.promo-card .pick-title { color: var(--ink); }
.promo-card .pick-sub { color: var(--promo); }
.promo-card .pick-check { border-color: var(--promo-line); }
.promo-card:has(input:checked) .pick-check { border-color: var(--promo-solid); background: var(--promo-solid); color: #fff; }
.price-old { margin-right: 6px; color: var(--ink-3); text-decoration: line-through; font-weight: 500; }
.bookbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; border-top: 1px solid var(--line); background: var(--surface); box-shadow: 0 -8px 24px rgba(30, 16, 36, .08); padding-bottom: env(safe-area-inset-bottom, 0px); }
.bookbar-in { display: flex; align-items: center; gap: 12px; max-width: 640px; margin: 0 auto; padding: 12px 16px; }
.bookbar-sum { flex: 1 1 auto; min-width: 0; font-size: 14px; color: var(--ink-2); }
.bookbar-sum strong { display: block; color: var(--ink); font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; }
.summary dt { color: var(--ink-3); }
.summary dd { margin: 0; font-weight: 600; }
.done-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 8px 18px; text-align: center; }
.done-hero .tick { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.done-hero h2 { font-size: 24px; font-weight: 700; }
.pub-foot { margin: 34px 0 10px; text-align: center; font-size: 12.5px; color: var(--ink-3); }
.pub-foot a { text-decoration: underline; text-underline-offset: 3px; }
.ticket-big { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 16px; border-radius: 20px; background: var(--accent); color: var(--on-accent); text-align: center; }
.ticket-big small { font-size: 14px; opacity: .9; }
.ticket-big strong { font-family: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif; font-size: 64px; line-height: 1; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ticket-big.called { background: var(--promo-solid); }
.ticket-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ticket-stats div { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: center; }
.ticket-stats strong { display: block; font-family: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif; font-size: 26px; font-weight: 700; }
.ticket-stats span { font-size: 13px; color: var(--ink-2); }
.tv { min-height: 100vh; min-height: 100dvh; padding: 28px; background: var(--ink); color: var(--surface); }
.tv h1 { font-size: 28px; margin-bottom: 20px; color: inherit; }
.tv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.tv-card { padding: 24px; border-radius: 22px; background: rgba(255,255,255,.08); }
.tv-card p { font-size: 20px; opacity: .85; }
.tv-card strong { display: block; margin-top: 6px; font-family: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif; font-size: clamp(64px, 10vw, 120px); line-height: 1; font-weight: 750; }
.legal { max-width: 720px; margin: 0 auto; padding: 36px 16px 64px; }
.legal h1 { font-size: 28px; margin-bottom: 8px; }
.legal h2 { font-size: 18px; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--ink-2); margin-bottom: 8px; }
.legal ul { list-style: disc; padding-left: 20px; }
.legal-in-modal { padding: 0; max-width: none; }
.legal-in-modal h2:first-child { margin-top: 4px; }

/* QR e página do salão */
.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.share-card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); text-align: center; }
.share-card svg[role="img"] { width: 200px; height: 200px; border-radius: 10px; }
.share-card h2 { font-size: 17px; font-weight: 650; }
.share-link { width: 100%; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; overflow-wrap: anywhere; user-select: all; }
.logo-edit { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.logo-edit img, .logo-edit .logo-empty { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); }
.thumb { flex: none; width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-3); }

/* tabelas (relatório e administração) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { padding: 10px 14px; text-align: left; font-size: 13px; font-weight: 700; color: var(--ink-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tr:first-child td { border-top: 0; }
.table .r { text-align: right; font-variant-numeric: tabular-nums; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr) 44px; align-items: center; gap: 12px; font-size: 14.5px; }
.bar-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; background: var(--accent); }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; }

/* envio um a um */
.sender { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0; text-align: center; }
.sender .progress { width: 100%; height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.sender .progress i { display: block; height: 100%; background: var(--wa); }
.msg-preview { width: 100%; padding: 12px 14px; border-radius: 12px 12px 12px 4px; background: var(--wa-soft); color: var(--ink); font-size: 14.5px; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }

/* menu "mais" no celular */
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.more-grid a, .more-grid button { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-weight: 600; text-align: left; }

/* prévia: troca de perfil */
.demo-bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; height: 46px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; background: var(--ink); color: var(--surface); font-size: 13.5px; }
.demo-bar::-webkit-scrollbar { display: none; }
.is-demo body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 31; background: var(--ink); }
.demo-bar strong { flex: none; margin-right: 4px; white-space: nowrap; }
.demo-bar button { flex: none; min-height: 30px; padding: 0 11px; border: 1px solid color-mix(in srgb, var(--surface) 30%, transparent); border-radius: 999px; background: none; color: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; }
.demo-bar button:focus-visible { outline: 2px solid var(--surface); outline-offset: 2px; }
.demo-bar button.on { background: var(--surface); color: var(--ink); border-color: var(--surface); }
.is-demo .side { height: calc(100vh - 46px); top: 46px; }

@media (max-width: 860px) {
  .kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis-4 .kpi:nth-child(3) { border-left: 0; }
  .kpis-4 .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .week-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .is-demo .side { top: 0; height: auto; }
}
@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: minmax(0, 1fr) 80px 36px; }
  .queue-code { font-size: 34px; }
  .appt-row .appt-time { width: 50px; font-size: 16px; }
  .range .input { width: 118px; }
  .ticket-big strong { font-size: 54px; }
  .datebar .date-label { flex: 1 1 100%; order: -1; font-size: 18px; }
}
@media print {
  .side, .tabs, .demo-bar, .no-print { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
}

.tabs button.tab { border: 0; background: none; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
