/* ==========================================================================
   AgendaZap - sistema visual
   Tinta índigo + papel frio + coral (ação) + esmeralda (confirmado) + âmbar (atenção)
   Títulos: Fraunces · Interface: Manrope
   ========================================================================== */

:root {
  --ink: #171a3d;
  --indigo: #1f2360;
  --indigo-2: #2b3080;
  --ink-soft: #5b5f82;
  --muted: #8a8fb0;
  --paper: #f4f6fa;
  --card: #ffffff;
  --line: #e3e6ee;
  --line-soft: #eef0f6;

  --accent: #ff5a36;
  --accent-dark: #e8471f;
  --accent-soft: #fff0ec;
  --green: #1fae7a;
  --green-dark: #0f7a54;
  --green-soft: #e3f6ee;
  --amber: #f5a524;
  --amber-dark: #a9560a;
  --amber-soft: #fff4dc;
  --danger: #d92d20;
  --danger-soft: #fdecea;

  --r-card: 10px;
  --r-field: 8px;
  --r-pill: 999px;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --sidebar-w: 256px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; color: var(--ink); line-height: 1.15; letter-spacing: -0.012em; margin: 0; }
h1 { font-size: 2rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 12px; }

.muted { color: var(--ink-soft); font-size: 0.92rem; }
.hidden { display: none !important; }
.ico { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 15px; height: 15px; }
.ico-lg { width: 24px; height: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.page-narrow { max-width: 600px; }

/* ==========================================================================
   Topbar (páginas públicas e área do cliente)
   ========================================================================== */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; gap: 12px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; flex-shrink: 0; }
.nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink-soft); font-size: 0.92rem; font-weight: 600; padding: 7px 12px; border-radius: var(--r-pill); }
.nav a:hover { color: var(--ink); background: var(--paper); text-decoration: none; }
.nav a.btn { color: #fff; padding: 8px 18px; margin: 0 0 0 4px; }
.nav a.btn:hover { background: var(--accent-dark); }

.footer { margin-top: 56px; padding: 26px 0; color: var(--ink-soft); font-size: 0.85rem; text-align: center; border-top: 1px solid var(--line); }
.footer p { margin: 0; }

/* ==========================================================================
   Botões
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  cursor: pointer; font-size: 0.92rem; font-weight: 700; font-family: var(--font-body); line-height: 1.2;
  margin: 10px 6px 0 0;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .06s ease;
}
.btn:hover { text-decoration: none; background: var(--paper); border-color: #cfd3e2; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-dark { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.btn-dark:hover { background: var(--indigo-2); border-color: var(--indigo-2); }
.btn-outline { background: transparent; border-color: #c3c8dc; }
.btn-danger-outline { background: transparent; border-color: #f2b8b2; color: var(--danger); }
.btn-danger-outline:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; margin: 0; }
.btn-block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.btn-row .btn, .btn-row form { margin: 0; }

/* ==========================================================================
   Formulários
   ========================================================================== */
label { display: block; margin: 16px 0 0; font-weight: 700; font-size: 0.88rem; color: var(--ink); }
label > input, label > select, label > textarea { margin-top: 6px; font-weight: 500; }
input, select, textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid #d6dae8; border-radius: var(--r-field);
  font-size: 0.95rem; font-family: inherit; color: var(--ink); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: #a3a8c2; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(255, 90, 54, .15); }
textarea { resize: vertical; line-height: 1.5; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); }
input[type="range"] { padding: 0; accent-color: var(--accent); }
input[type="file"] { padding: 9px; background: var(--paper); }
select[multiple] { padding: 6px; }
.hint { color: var(--ink-soft); font-size: 0.82rem; font-weight: 500; margin-top: 6px; display: block; }
.checkbox-row { display: flex; align-items: center; gap: 9px; font-weight: 600; margin: 12px 0 0; }
.checkbox-row input { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
fieldset { border: 0; padding: 0; margin: 16px 0 0; }
legend { font-weight: 700; font-size: 0.88rem; padding: 0; margin-bottom: 6px; }
.check-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.check-chip { margin: 0; display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border: 1px solid #d6dae8; border-radius: var(--r-pill); font-weight: 600; font-size: 0.85rem; background: #fff; cursor: pointer; }
.check-chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }

/* ==========================================================================
   Cards, painéis, tabelas
   ========================================================================== */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; margin: 18px 0; }
.card > h2:first-child, .card > h3:first-child { margin-bottom: 4px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.form-card { max-width: 520px; margin: 28px auto; }

.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); overflow-x: auto; margin: 16px 0; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); font-size: 0.9rem; vertical-align: middle; }
.table th { color: var(--ink-soft); font-weight: 700; font-size: 0.8rem; background: #fafbfd; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfe; }
.table form { margin: 0; display: inline; }
.table .sub { display: block; color: var(--ink-soft); font-size: 0.8rem; }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* Pílulas de status */
.badge, .pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: var(--r-pill); font-size: 0.76rem; font-weight: 700; background: #eef0fb; color: var(--indigo); white-space: nowrap; }
.badge-confirmed, .pill-ok { background: var(--green-soft); color: var(--green-dark); }
.badge-cancelled, .pill-bad { background: var(--danger-soft); color: var(--danger); }
.pill-warn { background: var(--amber-soft); color: var(--amber-dark); }
.pill-vip { background: var(--amber-soft); color: var(--amber-dark); }
.pill-vip .ico { width: 12px; height: 12px; fill: currentColor; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #c3c8dc; display: inline-block; flex-shrink: 0; }
.dot-ok { background: var(--green); box-shadow: 0 0 0 3px rgba(31,174,122,.2); }
.dot-warn { background: var(--amber); box-shadow: 0 0 0 3px rgba(245,165,36,.2); }
.dot-bad { background: var(--danger); }

.alert { display: flex; gap: 10px; align-items: flex-start; background: var(--amber-soft); border: 1px solid #f6dfa8; border-left: 4px solid var(--amber); padding: 13px 16px; border-radius: var(--r-field); font-size: 0.92rem; margin: 14px 0; color: #5f3b06; }
.alert .ico { margin-top: 2px; }
.alert-erro { background: var(--danger-soft); border-color: #f4c4be; border-left-color: var(--danger); color: #8a1c13; }
.alert-sucesso { background: var(--green-soft); border-color: #bfe8d6; border-left-color: var(--green); color: #0b5c40; }
.alert p { margin: 0; }
.alert a { font-weight: 700; }

.empty { text-align: center; padding: 38px 20px; color: var(--ink-soft); }
.empty .ico { width: 34px; height: 34px; color: #b6bbd6; margin-bottom: 8px; }
.empty h3 { color: var(--ink); margin-bottom: 4px; }
.empty p { margin: 0 auto 12px; max-width: 42ch; }

details > summary { cursor: pointer; font-weight: 700; color: var(--accent-dark); list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { margin-bottom: 6px; }

.tabs { display: flex; gap: 6px; margin-bottom: 18px; padding: 4px; background: var(--paper); border-radius: var(--r-pill); width: fit-content; }
.tab { padding: 8px 18px; border-radius: var(--r-pill); color: var(--ink-soft); font-size: 0.88rem; font-weight: 700; }
.tab:hover { text-decoration: none; color: var(--ink); }
.tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(23,26,61,.12); }

/* ==========================================================================
   Layout do painel (menu lateral)
   ========================================================================== */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--indigo); color: #c9cdf0;
  padding: 16px 12px 12px; display: flex; flex-direction: column; gap: 1px;
}
.sb-brand { display: flex; align-items: center; gap: 9px; color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; padding: 2px 10px 10px; }
.sb-brand:hover { text-decoration: none; }
.sb-company { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 0 4px; border-radius: var(--r-field); background: rgba(255,255,255,.07); color: #fff; }
.sb-company:hover { text-decoration: none; background: rgba(255,255,255,.12); }
.sb-avatar { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.sb-company strong { display: block; font-size: 0.9rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.sb-company small { color: #aab0e0; font-size: 0.76rem; display: flex; align-items: center; gap: 4px; }
.sb-label { font-size: 0.76rem; font-weight: 700; color: #8f95cc; padding: 9px 12px 2px; }
.sb-link { display: flex; align-items: center; gap: 11px; padding: 7px 12px; border-radius: var(--r-field); color: #c9cdf0; font-weight: 600; font-size: 0.9rem; position: relative; }
.sb-minor { padding: 6px 12px; font-size: 0.84rem; color: #9ea4d6; }
.sb-link:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.sb-link.active { background: rgba(255,255,255,.13); color: #fff; }
.sb-link.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.sb-link .dot { margin-left: auto; }
.sb-spacer { flex: 1; min-height: 4px; }

.app-main { min-width: 0; padding: 30px 34px 40px; }
.app-main .container { max-width: 1120px; padding: 0; margin: 0; }
.app-main .page-narrow { max-width: 720px; }
.app-main .footer { margin-top: 40px; text-align: left; border: 0; padding: 10px 0 0; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin-bottom: 4px; }
.page-head p { margin: 0; color: var(--ink-soft); max-width: 62ch; }
.page-head .btn { margin: 0; }

/* Páginas do painel escritas com <h1> direto dentro de <main> */
.app-main main > h1:first-child, .app-main main > .container > h1:first-child { margin-bottom: 6px; }
.app-main main > h1:first-child + p.muted, .app-main main > .container > h1:first-child + p.muted { margin-bottom: 20px; max-width: 64ch; }
.app-main main > h2, .app-main main > .container > h2 { margin: 30px 0 10px; }

/* ==========================================================================
   Métricas e dashboard
   ========================================================================== */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0; }
.metric { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-card); padding: 16px 18px; margin: 0; }
.metric:nth-child(3n+2) { border-left-color: var(--green); }
.metric:nth-child(3n) { border-left-color: var(--indigo); }
.metric-label { color: var(--ink-soft); font-size: 0.84rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.metric-value { display: block; font-family: var(--font-display); font-size: 1.85rem; font-weight: 600; line-height: 1.2; margin-top: 4px; }
.metric-note { color: var(--ink-soft); font-size: 0.8rem; }
/* compatibilidade com o markup antigo */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { text-align: left; border-left: 4px solid var(--accent); margin: 0; padding: 16px 18px; }
.stats-grid .stat:nth-child(3n+2) { border-left-color: var(--green); }
.stats-grid .stat:nth-child(3n) { border-left-color: var(--indigo); }
.stat-num { display: block; font-family: var(--font-display); font-size: 1.85rem; font-weight: 600; line-height: 1.2; }
.stat span:last-child { color: var(--ink-soft); font-size: 0.84rem; font-weight: 600; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dash-grid .card { margin: 0; }
.dash-col { display: flex; flex-direction: column; gap: 18px; }

.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { display: grid; grid-template-columns: 62px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.agenda li:last-child { border-bottom: 0; padding-bottom: 0; }
.agenda-time { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.agenda-time small { display: block; font-family: var(--font-body); font-size: 0.74rem; color: var(--ink-soft); font-weight: 600; }
.agenda strong { display: block; font-size: 0.95rem; }
.agenda span.sub { color: var(--ink-soft); font-size: 0.84rem; }
.agenda li.done .agenda-time, .agenda li.done strong { color: var(--muted); }

.copy-field { display: flex; gap: 8px; margin-top: 10px; }
.copy-field input { background: var(--paper); font-weight: 600; }
.copy-field .btn { margin: 0; flex-shrink: 0; }

.checklist { list-style: none; margin: 10px 0 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.92rem; font-weight: 600; }
.checklist li:last-child { border-bottom: 0; }
.checklist .tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: transparent; border: 1.5px solid #c3c8dc; flex-shrink: 0; }
.checklist .tick .ico { width: 13px; height: 13px; stroke-width: 2.6; }
.checklist li.done .tick { background: var(--green); border-color: var(--green); color: #fff; }
.checklist li.done span.label { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: #c3c8dc; }
.checklist li a { margin-left: auto; font-size: 0.84rem; }
.progress { height: 6px; border-radius: 6px; background: var(--line-soft); overflow: hidden; margin-top: 6px; }
.progress > span { display: block; height: 100%; background: var(--green); border-radius: 6px; }

/* ==========================================================================
   Lembretes (composer + prévia do WhatsApp)
   ========================================================================== */
.composer-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.composer-grid > .card { margin: 0; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--paper); border-radius: var(--r-pill); }
.segmented label { margin: 0; text-align: center; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 12px; border-radius: var(--r-pill); font-weight: 700; font-size: 0.88rem; color: var(--ink-soft); cursor: pointer; transition: background-color .15s ease; }
.segmented input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(23,26,61,.14); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }

.attach { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px dashed #c3c8dc; border-radius: var(--r-field); background: var(--paper); margin-top: 6px; cursor: pointer; }
.attach:hover { border-color: var(--accent); background: var(--accent-soft); }
.attach input[type="file"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.attach .ico { color: var(--ink-soft); }
.attach-kinds { display: flex; gap: 10px; color: var(--ink-soft); }
.attach-name { font-weight: 600; font-size: 0.88rem; }
.attach-name small { display: block; color: var(--ink-soft); font-weight: 500; }

.delay-row { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.delay-value { min-width: 78px; text-align: center; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; background: var(--paper); border-radius: var(--r-field); padding: 6px 10px; }
.delay-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.74rem; font-weight: 600; margin-top: 2px; }

.phone { background: #0d1117; border-radius: 28px; padding: 12px; max-width: 330px; margin: 0 auto; box-shadow: 0 18px 40px -18px rgba(23,26,61,.5); }
.phone-screen { border-radius: 18px; overflow: hidden; background: #ece5dd; min-height: 330px; display: flex; flex-direction: column; }
.phone-bar { background: var(--indigo); color: #fff; padding: 11px 14px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.88rem; }
.phone-bar .sb-avatar { width: 28px; height: 28px; font-size: 0.8rem; border-radius: 50%; }
.phone-body { padding: 16px 12px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.wa-bubble { align-self: flex-start; background: #fff; border-radius: 4px 12px 12px 12px; padding: 8px 11px; max-width: 92%; font-size: 0.86rem; line-height: 1.45; box-shadow: 0 1px 1px rgba(0,0,0,.13); word-break: break-word; color: #111; }
.wa-bubble .wa-media { background: #d9dde7; border-radius: 8px; height: 110px; margin-bottom: 7px; display: grid; place-items: center; color: #6b7280; font-size: 0.8rem; font-weight: 600; gap: 4px; text-align: center; }
.wa-bubble .wa-foot { display: block; margin-top: 8px; color: #6b7280; font-style: italic; font-size: 0.8rem; }
.wa-empty { color: #9aa0a6; font-style: italic; }
.summary-list { list-style: none; margin: 16px 0 0; padding: 0; }
.summary-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.9rem; }
.summary-list li:last-child { border-bottom: 0; }
.summary-list strong { text-align: right; }

.progress-big { margin: 14px 0 4px; }
.progress-big .progress { height: 10px; }

/* ==========================================================================
   Página pública de agendamento
   ========================================================================== */
.book-band { background: var(--indigo); color: #fff; padding: 34px 0 78px; }
.book-band .container { display: flex; align-items: center; gap: 16px; }
.book-avatar { width: 58px; height: 58px; border-radius: 16px; background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; display: grid; place-items: center; flex-shrink: 0; }
.book-band h1 { color: #fff; font-size: 1.7rem; }
.book-band p { margin: 2px 0 0; color: #b9bfeb; font-size: 0.92rem; }
.book-card { max-width: 640px; margin: -52px auto 0; position: relative; }
.book-card .card { margin: 0; padding: 26px; box-shadow: 0 24px 50px -28px rgba(23,26,61,.45); }
.step { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.step:first-of-type { padding-top: 4px; }
.step:last-of-type { border-bottom: 0; padding-bottom: 0; }
.step-num { width: 30px; height: 30px; border-radius: 50%; background: var(--indigo); color: #fff; font-weight: 800; font-size: 0.85rem; display: grid; place-items: center; margin-top: 2px; }
.step h2 { font-family: var(--font-body); font-size: 1rem; font-weight: 800; margin-bottom: 2px; letter-spacing: 0; }
.step label { margin-top: 10px; }
.slots-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.slot-btn { padding: 9px 16px; border-radius: var(--r-pill); border: 1px solid #d6dae8; background: #fff; cursor: pointer; font-size: 0.9rem; font-weight: 700; color: var(--ink); font-family: var(--font-body); transition: all .12s ease; }
.slot-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.slot-btn.selected { background: var(--accent); color: #fff; border-color: var(--accent); }

.success-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin: 0 auto 14px; }
.success-mark .ico { width: 30px; height: 30px; stroke-width: 2.4; }
.recap { margin: 18px 0; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.recap div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); font-size: 0.92rem; }
.recap div:last-child { border-bottom: 0; }
.recap span { color: var(--ink-soft); }
.recap strong { text-align: right; }

/* ==========================================================================
   Login / cadastro (tela dividida)
   ========================================================================== */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-aside { background: var(--indigo); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-aside .brand { color: #fff; }
.auth-aside h2 { color: #fff; font-size: 2rem; max-width: 18ch; margin-bottom: 18px; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 40ch; }
.auth-points li { display: flex; gap: 12px; color: #c9cdf0; font-size: 0.95rem; }
.auth-points .ico { color: var(--accent); margin-top: 3px; }
.auth-aside small { color: #8f95cc; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 28px; }
.auth-box { width: 100%; max-width: 410px; }
.auth-box h1 { margin-bottom: 6px; }
.auth-box .btn-primary { width: 100%; margin: 20px 0 0; padding: 12px; }
.auth-foot { margin-top: 20px; text-align: center; }

/* ==========================================================================
   Landing
   ========================================================================== */
.hero { padding: 64px 0 48px; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: 2.85rem; line-height: 1.08; margin-bottom: 16px; }
.lead { color: var(--ink-soft); font-size: 1.12rem; max-width: 46ch; }
.hero-actions { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero-actions .btn { margin: 0; padding: 13px 24px; font-size: 0.98rem; }
.hero-note { margin-top: 18px; color: var(--ink-soft); font-size: 0.86rem; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note .ico { color: var(--green); width: 16px; height: 16px; stroke-width: 2.4; }

.hero-card { background: var(--indigo); border-radius: 18px; padding: 22px; color: #fff; box-shadow: 0 30px 60px -34px rgba(31,35,96,.7); }
.hero-card-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.12); font-weight: 700; font-size: 0.92rem; }
.hero-card-head .sb-avatar { border-radius: 50%; }
.hero-card-head small { display: block; color: #aab0e0; font-weight: 500; }
.chat-demo { display: flex; flex-direction: column; gap: 10px; min-height: 250px; }
.chat-demo > * { opacity: 0; }
.chat-bubble, .chat-reply, .chat-confirm { padding: 10px 14px; font-size: 0.93rem; max-width: 88%; line-height: 1.45; }
.chat-reply { align-self: flex-end; background: #fff; color: var(--ink); border-radius: 14px 14px 3px 14px; }
.chat-bubble { align-self: flex-start; background: #2e3380; border-radius: 14px 14px 14px 3px; }
.chat-confirm { align-self: flex-start; background: var(--green); color: #fff; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; border-radius: 14px 14px 14px 3px; }
.chat-typing { align-self: flex-start; background: #2e3380; border-radius: 14px 14px 14px 3px; display: inline-flex; gap: 4px; align-items: center; padding: 0 14px; max-height: 0; overflow: hidden; }
.chat-typing i { width: 6px; height: 6px; border-radius: 50%; background: #aab0e0; animation: blink 1s infinite; }
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
.c1 { animation: in1 12s ease-in-out infinite; }
.chat-typing { animation: typing 12s ease-in-out infinite; }
.c2 { animation: in2 12s ease-in-out infinite; }
.c3 { animation: in3 12s ease-in-out infinite; }
.c4 { animation: in4 12s ease-in-out infinite; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@keyframes in1 { 0% { opacity: 0; transform: translateY(6px); } 4%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes typing { 0%, 10% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; } 12%, 21% { opacity: 1; max-height: 40px; padding-top: 12px; padding-bottom: 12px; } 23%, 100% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; } }
@keyframes in2 { 0%, 22% { opacity: 0; transform: translateY(6px); } 27%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes in3 { 0%, 44% { opacity: 0; transform: translateY(6px); } 49%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes in4 { 0%, 60% { opacity: 0; transform: translateY(6px); } 65%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .chat-demo > * { animation: none !important; opacity: 1; }
  .chat-typing { display: none; }
}

.section { padding: 56px 0 8px; }
.section-head { max-width: 56ch; margin-bottom: 26px; }
.section-head h2 { font-size: 1.9rem; margin-bottom: 8px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; margin: 0; }
.feature .ico-wrap { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark); margin-bottom: 12px; }
.feature:nth-child(3n+2) .ico-wrap { background: var(--green-soft); color: var(--green-dark); }
.feature:nth-child(3n) .ico-wrap { background: #eceefb; color: var(--indigo); }
.feature h3 { font-family: var(--font-body); font-weight: 800; font-size: 1.02rem; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 0.93rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.steps li { list-style: none; position: relative; padding-top: 52px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--indigo); color: #fff; font-family: var(--font-display); font-weight: 600; display: grid; place-items: center; }
.steps h3 { font-family: var(--font-body); font-weight: 800; margin-bottom: 4px; }
.steps p { color: var(--ink-soft); margin: 0; font-size: 0.93rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #fff; border: 1px solid var(--line); color: var(--ink); padding: 7px 16px; border-radius: var(--r-pill); font-size: 0.9rem; font-weight: 600; }
.cta-band { margin: 64px 0 0; background: var(--indigo); color: #fff; border-radius: 18px; padding: 40px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; font-size: 1.8rem; max-width: 22ch; }
.cta-band p { color: #b9bfeb; margin: 8px 0 0; }
.cta-band .btn { margin: 0; padding: 13px 26px; }

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 960px) {
  .app-shell { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 8px 10px; gap: 4px; }
  .sb-brand { padding: 4px 8px; font-size: 1.05rem; flex-shrink: 0; }
  .sb-brand span { display: none; }
  .sb-company, .sb-label, .sb-spacer { display: none; }
  .sb-link { flex-shrink: 0; padding: 8px 12px; font-size: 0.86rem; white-space: nowrap; }
  .sb-link.active::before { display: none; }
  .app-main { padding: 22px 16px 32px; }
  .dash-grid, .composer-grid { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { padding: 26px 24px; gap: 22px; }
  .auth-aside h2 { font-size: 1.5rem; }
  .auth-points { display: none; }
}
@media (max-width: 720px) {
  h1 { font-size: 1.65rem; }
  .hero { padding-top: 36px; }
  .hero-inner, .features, .steps { grid-template-columns: 1fr; gap: 22px; }
  .hero h1 { font-size: 2.1rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .cta-band { padding: 28px 22px; }
  .agenda li { grid-template-columns: 54px 1fr; }
  .agenda li > :last-child { grid-column: 2; }
  .book-card .card { padding: 20px; }
}

/* ==========================================================================
   Complementos (anexo, ranking, chips de seleção)
   ========================================================================== */
.attach { position: relative; }
.attach-kinds { display: inline-flex; gap: 8px; }
.check-chip { margin: 0; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid #d6dae8; border-radius: var(--r-pill); font-weight: 600; font-size: 0.86rem; background: #fff; cursor: pointer; }
.check-chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }
.check-chip input { margin: 0; }
.rank { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 16px; }
.rank-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 0.92rem; }
.rank .progress { height: 8px; margin: 0 0 4px; }
.rank .progress > span { background: var(--accent); }
.rank .sub { color: var(--ink-soft); font-size: 0.8rem; }
.wa-bubble .wa-media img { display: block; }
.wa-bubble .wa-foot { display: block; margin-top: 8px; color: #6b7280; font-style: italic; font-size: 0.8rem; }
.sub { color: var(--ink-soft); font-size: 0.82rem; }
.card > .table-wrap:last-child { margin-bottom: 0; }
@media (max-width: 960px) { .dash-grid[style] { grid-template-columns: minmax(0, 1fr) !important; } }

.wa-text { display: block; white-space: pre-wrap; }
.wa-bubble .wa-media { overflow: hidden; }

/* Controle de intervalo (slider) no estilo da marca */
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 8px; border: 0; padding: 0; cursor: pointer;
  background: linear-gradient(to right, var(--accent) var(--fill, 0%), #dfe2ee var(--fill, 0%));
}
input[type="range"]:focus { box-shadow: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); box-shadow: 0 1px 4px rgba(23,26,61,.3); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); box-shadow: 0 1px 4px rgba(23,26,61,.3); }
input[type="range"]::-moz-range-track { background: transparent; }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Grades nunca devem ser esticadas por tabelas largas (evita rolagem horizontal no celular) */
.dash-col, .dash-grid > *, .composer-grid > * { min-width: 0; }

/* O último passo visível não leva linha divisória (o passo 4 fica oculto até escolher o horário) */
.step:not(:has(~ .step:not(.hidden))) { border-bottom: 0; padding-bottom: 0; }
