:root {
  /* Identidade: laranja #FE7302 (marca, da logo), #FBA45C (destaque), cinzas #919599 / #CDCDCB / #F8F8F8.
     Botões e links usam o laranja um pouco mais escuro (#C4540F / #A9480C) para o texto branco ficar legível (contraste ≥ 4,5). */
  --brand: #FE7302; --brand-light: #FBA45C;
  --bg: #F8F8F8; --surface: #fff; --surface-2: #fbfbfa; --border: #e6e6e4; --border-strong: #CDCDCB;
  --text: #1d1e20; --text-2: #45484d; --muted: #5f6368;
  --primary: #C4540F; --primary-600: #A9480C; --primary-50: #fdf0e6;
  --good: #0a7a0a; --good-bg: #e8f6e8; --warn: #8a5a00; --warn-bg: #fdf3dc; --bad: #c02f2f; --bad-bg: #fdecec;
  --info: #45484d; --info-bg: #f1f1ef; --violet: #A9480C; --violet-bg: #fdf0e6;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(29, 30, 32, .04), 0 1px 3px rgba(29, 30, 32, .06);
  --shadow-lg: 0 10px 30px rgba(29, 30, 32, .14); --sidebar: 248px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--primary-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
h4 { font-size: 13px; font-weight: 600; }
p { margin: 4px 0; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: 12px; word-break: break-all; }
kbd { font: 11px/1 ui-monospace, monospace; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; color: var(--muted); margin-left: auto; }
.muted { color: var(--muted); } .small { font-size: 12px; } .center { text-align: center; } .right { text-align: right; } .grow { flex: 1; min-width: 0; }
.strong { font-weight: 600; } .mt { margin-top: 16px; } .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--good); } .neg { color: var(--bad); } .warn-text { color: var(--warn); }
.icon { flex-shrink: 0; vertical-align: middle; }
input, select, textarea { font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 10px; width: 100%; min-height: 38px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent); outline-offset: 0; border-color: var(--primary); }
input[type=checkbox] { width: 16px; height: 16px; min-height: 0; accent-color: var(--primary); }
input[type=color] { padding: 2px; height: 38px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-weight: 550; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-600); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: rgba(15, 23, 42, .05); }
.btn.success { background: var(--good); border-color: var(--good); color: #fff; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-ghost { background: transparent; border-color: transparent; color: var(--bad); }
.btn.danger-ghost:hover { background: var(--bad-bg); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; margin-top: 8px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--text-2); cursor: pointer; position: relative; flex-shrink: 0; }
.icon-btn:hover { background: rgba(15, 23, 42, .06); color: var(--text); text-decoration: none; }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--border); position: fixed; inset: 0 auto 0 0; overflow-y: auto; padding: 16px 12px 24px; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--text); padding: 4px 8px 16px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand.big { font-size: 18px; justify-content: center; padding-bottom: 20px; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: var(--text); color: var(--brand); display: grid; place-items: center; flex: none; }
.logo svg { height: 21px; width: auto; }
.brand.big .logo { width: 40px; height: 40px; } .brand.big .logo svg { height: 28px; width: auto; }
.nav-group { margin-bottom: 6px; }
.nav-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 10px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; border-radius: 6px; }
.nav-title::-webkit-details-marker { display: none; }
.nav-title::after { content: '▾'; font-size: 10px; transition: transform .15s; }
.nav-group:not([open]) > .nav-title::after { transform: rotate(-90deg); }
.nav-title:hover { color: var(--text); background: var(--surface-2); }
.sidebar-cta { margin: 0 0 14px; }
.nav-foot { padding: 8px 10px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; }
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--primary-50); color: var(--primary); }
.main { flex: 1; margin-left: var(--sidebar); min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 24px; background: var(--bg); border-bottom: 1px solid var(--border); }
.topbar .spacer { flex: 1; }
.company-switch { width: auto; max-width: 260px; font-weight: 600; border-color: transparent; background: transparent; }
.company-switch:hover { background: var(--surface); border-color: var(--border); }
.bell .dot { position: absolute; top: 2px; right: 1px; background: var(--bad); color: #fff; border-radius: 9px; font-size: 10px; line-height: 16px; min-width: 16px; padding: 0 4px; font-weight: 700; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; font-weight: 700; cursor: pointer; display: inline-grid; place-items: center; flex-shrink: 0; }
.avatar.sm { width: 36px; height: 36px; background: var(--primary-50); color: var(--primary); }
.content { padding: 24px; max-width: 1360px; margin: 0 auto; }
.scrim { position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 25; }
.only-m { display: none !important; }
.bottom-nav { display: none; }

/* Menus */
.dropdown { position: relative; }
.menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; }
.menu.right, .add-menu { left: auto; right: 0; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: var(--radius-sm); cursor: pointer; color: var(--text); text-align: left; font: inherit; }
.menu button:hover, .menu a:hover { background: var(--surface-2); text-decoration: none; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; display: flex; flex-direction: column; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; font: inherit; font-size: 13px; color: var(--text); position: relative; }
.quick-item:hover { border-color: var(--primary); color: var(--primary); }
.quick-item kbd { position: absolute; top: 6px; right: 6px; }

/* Cabeçalho de página e cards */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-header p { margin-top: 4px; }
.page-header .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.clickable, a.card { color: inherit; display: block; transition: border-color .12s, box-shadow .12s; cursor: pointer; }
.card.clickable:hover, a.card:hover { border-color: var(--border-strong); box-shadow: 0 4px 14px rgba(15, 23, 42, .08); text-decoration: none; }
.card h3 { margin-bottom: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.card-head select { width: auto; }
.card-head.pad { padding: 16px 18px 0; }
.pad { padding: 12px 18px; } .pad-sm { padding: 8px 10px; }
.sticky { position: sticky; top: 76px; }
.stack > .card { margin-bottom: 16px; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 24px 0 12px; }

.grid { display: grid; gap: 16px; }
.grid > .card { margin-bottom: 0; }
.grid + .card, .grid + .grid, .card + .grid, .tabs + .grid { margin-top: 16px; }
.grid.kpis { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.grid.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.grid.stats.six { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.grid.two-one { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); margin-bottom: 16px; align-items: start; }
.grid.one-two { grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); align-items: start; }
.grid.accounts { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-bottom: 12px; }
.grid.insights { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 16px; }
.grid.autos { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid.reports { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.stat { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.stat-sub { font-size: 12px; color: var(--muted); }
.date-pill { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 2px 9px 2px 7px; border-radius: 999px; background: var(--primary-50); color: var(--primary-600); font-size: 12px; font-weight: 500; white-space: nowrap; }
.date-pill b { font-weight: 650; }
.stat-sub > div { margin-top: 3px; }
.stat-icon { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; flex-shrink: 0; background: var(--surface-2); color: var(--text-2); }
.tone-good { background: var(--good-bg); color: var(--good); } .tone-warn { background: var(--warn-bg); color: var(--warn); }
.tone-bad { background: var(--bad-bg); color: var(--bad); } .tone-info { background: var(--info-bg); color: var(--info); }
.tone-violet { background: var(--violet-bg); color: var(--violet); } .tone-neutral { background: #f1f1ef; color: #45484d; } .tone-muted { background: #f1f1ef; color: var(--muted); }
.hero-number { display: flex; flex-direction: column; gap: 2px; }
.hero-number strong { font-size: 30px; letter-spacing: -.02em; }

/* Badges, chips */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 8px; white-space: nowrap; line-height: 1.5; }
.chip { display: inline-flex; align-items: center; font-size: 11px; border-radius: 6px; padding: 1px 6px; background: #f1f5f9; color: var(--text-2); margin-left: 2px; white-space: nowrap; }
.beta { display: inline-block; white-space: nowrap; vertical-align: middle; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--primary-50); color: var(--primary-600); font-size: 11.5px; font-weight: 650; letter-spacing: 0; }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--text-2); white-space: nowrap; }
.chip-btn:hover { border-color: var(--primary); color: var(--primary); }
.chip-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chips.center { justify-content: center; padding: 0 16px 20px; }
.cat { display: inline-flex; align-items: center; gap: 6px; }
.cat i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex-shrink: 0; }

/* Tabs e toolbar */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.toolbar .tabs { border: 0; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; }
.tab { border: 0; background: none; padding: 9px 12px; font: inherit; font-weight: 550; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.toolbar .tab { padding: 5px 12px; border-radius: 6px; border: 0; margin: 0; }
.toolbar .tab.active { background: var(--primary-50); }
.tab-count { background: #eef2f7; color: var(--text-2); border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 18px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.search { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0 10px; flex: 1 1 240px; max-width: 380px; color: var(--muted); }
.search input { border: 0; padding: 0; outline: none; min-height: 36px; }
.filter { width: auto; min-width: 140px; }
.filter.on { border-color: var(--primary); color: var(--primary); }
.date-range { display: flex; align-items: center; gap: 6px; } .date-range input { width: 150px; }
.period { display: flex; gap: 6px; } .period select { width: auto; } .period input { width: 150px; }
.summary-line { display: flex; justify-content: space-between; padding: 0 4px 8px; color: var(--text-2); font-size: 13px; }

/* Tabela */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table th.sortable { cursor: pointer; user-select: none; } .table th.sortable:hover { color: var(--text); }
.table td { padding: 10px 14px; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; } .table tr.clickable:hover td { background: #fafbfc; }
.table th.right, .table td.right { text-align: right; }
.table tfoot td { border-top: 1px solid var(--border); background: var(--surface-2); font-weight: 600; }
.table.compact td, .table.compact th { padding: 6px 10px; font-size: 12.5px; }
.cell-main { font-weight: 500; } .cell-sub { font-size: 12px; color: var(--muted); }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
td.actions-cell { width: 1%; white-space: nowrap; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 13px; }

/* Formulários e modais */
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; animation: fade .12s; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; box-shadow: var(--shadow-lg); animation: pop .14s; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 18px 20px 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: translateY(8px) scale(.99); opacity: 0; } }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.req { color: var(--bad); }
.field.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; flex-wrap: wrap; }
.field.check .hint { width: 100%; }
.field.check > input { flex: none; width: auto; min-height: 0; }
.field.check > span:not(.help) { flex: 0 1 auto; min-width: 0; max-width: calc(100% - 52px); font-weight: 450; } /* texto longo quebra ao lado da caixa, com espaço para o (?) */
.hint { color: var(--muted); font-size: 11.5px; }
.span-2 { grid-column: 1 / -1; }
.form-section { grid-column: 1 / -1; margin: 10px 0 2px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--text-2); }
.form-grid > .form-section:first-child { border: 0; padding-top: 0; margin-top: 0; }
.form-extra { margin-top: 16px; }
.money-input { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.money-input:focus-within { outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent); border-color: var(--primary); }
.money-input span { padding-left: 10px; color: var(--muted); font-size: 13px; }
.money-input input { border: 0; outline: none !important; text-align: right; }
.ref-select { display: flex; gap: 4px; }
.attachments { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 8px; }
.attach-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.attachments ul { list-style: none; padding: 0; margin: 0; }
.attachments li { display: flex; align-items: center; gap: 8px; padding: 4px 0; } .attachments li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history { margin-top: 12px; font-size: 13px; } .history summary { cursor: pointer; color: var(--text-2); } .history ul { padding-left: 18px; }
.segmented { display: flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; margin: 12px 0; }
.segmented button { flex: 1; border: 0; background: none; padding: 7px; border-radius: 6px; font: inherit; font-weight: 550; cursor: pointer; color: var(--muted); }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.totals { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.totals.big { font-size: 18px; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }

/* Itens de venda */
.items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.items-head, .item-row { display: grid; grid-template-columns: minmax(0, 3fr) 80px 130px 120px 100px 34px; gap: 8px; align-items: start; }
.item-row.purchase, .items-head:has(+ .purchase) { grid-template-columns: minmax(0, 3fr) 80px 130px 100px 34px; }
.items-head { font-size: 12px; color: var(--muted); font-weight: 600; }
.item-main { display: flex; flex-direction: column; gap: 4px; }
.item-row strong { padding-top: 9px; }

/* Alertas */
.alert { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; border: 1px solid; }
.alert.danger { background: var(--bad-bg); border-color: #f5c2c2; color: #7f1d1d; }
.alert.warning { background: var(--warn-bg); border-color: #f3dca6; color: #6b4600; }
.alert.info { background: var(--info-bg); border-color: #dcdcd8; color: #2e3034; }
.alert p { margin: 2px 0 0; }
.alerts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.alert-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-sm); color: var(--text); border: 1px solid var(--border); }
.alert-item:hover { background: var(--surface-2); text-decoration: none; }
.alert-item > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.alert-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.alert-item.danger .alert-icon { background: var(--bad-bg); color: var(--bad); }
.alert-item.warning .alert-icon { background: var(--warn-bg); color: var(--warn); }
.alert-item.info .alert-icon { background: var(--info-bg); color: var(--info); }
.alert-item .chev { color: var(--muted); }
.alerts-card { max-height: 360px; overflow-y: auto; }
.all-good { display: flex; gap: 8px; align-items: center; color: var(--good); padding: 16px 0; }

/* Dashboard */
.progress { height: 6px; background: #eef2f7; border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.progress span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.steps a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); }
.steps a:hover { border-color: var(--primary); text-decoration: none; }
.steps li.done a { color: var(--muted); text-decoration: line-through; }
.step-n { width: 22px; height: 22px; border-radius: 50%; background: #eef2f7; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.steps li.done .step-n { background: var(--good-bg); color: var(--good); }
.onboarding.done { display: flex; align-items: center; gap: 14px; }
.onboarding.done > div:nth-child(2) { flex: 1; }
.ok-mark { width: 44px; height: 44px; border-radius: 50%; background: var(--good-bg); color: var(--good); display: grid; place-items: center; flex-shrink: 0; }
.task-mini { list-style: none; margin: 0; padding: 0; }
.task-mini a { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0f2f5; color: var(--text); }
.task-mini li:last-child a { border: 0; }
.prio { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.prio.high { background: var(--bad); } .prio.medium { background: #eda100; } .prio.low { background: #94a3b8; }
.chart-box { position: relative; width: 100%; }
.insight { display: flex; flex-direction: column; gap: 6px; }
.insight-head { display: flex; align-items: center; gap: 8px; }
.insight-value { font-size: 20px; font-weight: 650; }
.insight p { color: var(--text-2); font-size: 13px; }
.split-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; background: #eef2f7; }
.legend-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; margin-top: 8px; }
.legend-row i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 4px; }
.rank { list-style: none; padding: 0; margin: 8px 0 0; }
.rank li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f0f2f5; }
.rank li:last-child { border: 0; }
.disclaimer { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; }

/* Contas */
.account { text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.account:hover { border-color: var(--border-strong); }
.account.inactive { opacity: .6; }
.account-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.account-name { font-weight: 600; font-size: 15px; }
.account-balance { font-size: 22px; font-weight: 650; margin: 8px 0 4px; }

/* Cliente */
.info { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0 0 12px; font-size: 13px; }
.info dt { color: var(--muted); } .info dd { margin: 0; word-break: break-word; }
.note-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-sm); padding: 8px 10px; font-size: 13px; white-space: pre-wrap; }
.quick-links { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; margin: 8px 0; }
.note-form { display: flex; gap: 8px; margin-bottom: 12px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li > a, .timeline li > div { display: flex; gap: 12px; align-items: flex-start; padding: 10px 6px; border-bottom: 1px solid #f0f2f5; color: var(--text); border-radius: 6px; }
.timeline li > a:hover { background: var(--surface-2); text-decoration: none; }
.tl-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: #eef2f7; color: var(--text-2); }
.t-sale, .t-payment { background: var(--good-bg); color: var(--good); } .t-charge { background: var(--warn-bg); color: var(--warn); }
.t-quote { background: var(--info-bg); color: var(--info); } .t-message { background: #e7f8ef; color: #128c4a; } .t-note { background: #fffbeb; color: #92400e; }
.tl-title { font-size: 13px; white-space: pre-wrap; word-break: break-word; }

/* Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: #eef1f5; border-radius: var(--radius); padding: 10px; min-height: 240px; display: flex; flex-direction: column; gap: 8px; transition: background .12s; }
.kcol.over { background: var(--primary-50); outline: 2px dashed var(--primary); }
.kcol-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 13px; padding: 2px 4px 4px; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; cursor: grab; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.kcard:hover { border-color: var(--border-strong); }
.kcard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kempty { color: var(--muted); font-size: 12px; text-align: center; padding: 20px 0; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); }

/* Calendário */
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.cal-head { background: var(--surface-2); padding: 6px; text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-day { background: var(--surface); min-height: 96px; padding: 4px 6px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.cal-day:hover { background: #fafbfc; } .cal-day.other { background: #fafbfc; color: var(--muted); }
.cal-day.today .cal-n { background: var(--primary); color: #fff; border-radius: 50%; }
.cal-n { font-size: 12px; font-weight: 600; width: 22px; height: 22px; display: grid; place-items: center; }
.cal-task { border: 0; text-align: left; font: inherit; font-size: 11.5px; background: var(--info-bg); color: var(--info); border-radius: 4px; padding: 1px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-task.done { background: var(--good-bg); color: var(--good); text-decoration: line-through; }
.cal-task.overdue { background: var(--bad-bg); color: var(--bad); }
.task-check { cursor: pointer; }
.done-text { text-decoration: line-through; color: var(--muted); }

/* Automações */
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: .15s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.auto { display: flex; flex-direction: column; gap: 8px; }
.auto.off { opacity: .65; }
.flow-mini { font-size: 13px; display: flex; gap: 8px; align-items: baseline; }
.pill { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; border-radius: 5px; padding: 2px 6px; flex-shrink: 0; }
.pill.when { background: var(--info-bg); color: var(--info); } .pill.if { background: var(--warn-bg); color: var(--warn); } .pill.then { background: var(--good-bg); color: var(--good); }
.auto-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; border-top: 1px solid #f0f2f5; flex-wrap: wrap; gap: 6px; }
.auto.template { border-style: dashed; }
.auto.template .btn { align-self: flex-start; margin-top: auto; }
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(0, 1.2fr); align-items: start; margin-bottom: 16px; }
.builder .card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.step.when { border-top: 3px solid var(--info); } .step.if { border-top: 3px solid #eda100; } .step.then { border-top: 3px solid var(--good); }
.step-head { display: flex; align-items: center; gap: 8px; }
.arrow { display: grid; place-items: center; padding-top: 40px; color: var(--muted); }
.cond-row { display: grid; grid-template-columns: 1fr 1fr 34px; gap: 6px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.cond-row > :nth-child(3) { grid-column: 1 / 3; grid-row: 2; } .cond-row > :nth-child(4) { grid-column: 3; grid-row: 1; }
.action-box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; background: var(--surface-2); }
.action-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }

/* WhatsApp */
.inbox { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - 230px); min-height: 480px; }
.inbox-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.inbox-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-bottom: 1px solid var(--border); }
.conv-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.conv-list a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; color: var(--text); border-bottom: 1px solid #f0f2f5; }
.conv-list a:hover { background: var(--surface-2); text-decoration: none; }
.conv-list a.on { background: var(--primary-50); }
.conv-top { display: flex; justify-content: space-between; gap: 6px; }
.conv-last { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-list .grow { display: flex; flex-direction: column; gap: 2px; }
.inbox-thread { min-height: 0; display: flex; flex-direction: column; }
.inbox-thread > .empty { margin: auto; }
.thread { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.thread-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.thread-head select { width: auto; }
.messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: #f3f1ec; }
.msg { display: flex; flex-direction: column; max-width: 78%; }
.msg.out { align-self: flex-end; align-items: flex-end; } .msg.in { align-self: flex-start; }
.bubble { padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.msg.out .bubble { background: #d9fdd3; border-top-right-radius: 3px; } .msg.in .bubble { background: #fff; border-top-left-radius: 3px; }
.bubble.wide { max-width: 100%; }
.msg-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.templates { display: flex; gap: 6px; padding: 8px 12px 0; overflow-x: auto; }
.composer { display: flex; gap: 8px; padding: 10px 12px; align-items: flex-end; }
.composer textarea { min-height: 42px; }

/* Campanhas */
.audience-box { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--primary-50); }
.big-num { font-size: 24px; margin-right: 4px; }
.var-row { display: grid; grid-template-columns: 48px 1fr 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.var-row select:last-child { grid-column: 2 / 4; }
.phone { background: #f3f1ec; border-radius: var(--radius); padding: 16px; margin: 8px 0; min-height: 120px; }
.phone .msg { max-width: 100%; }
.phone .bubble { background: #fff; }
.schedule { display: flex; gap: 8px; margin: 10px 0; }

/* Assistente */
.assistant .chat { min-height: 360px; display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); }
.assistant .msg { max-width: 92%; }
.assistant .msg.out .bubble { background: var(--primary); color: #fff; }
.assistant .msg.in .bubble { background: var(--surface); border: 1px solid var(--border); }
.assistant details { margin-top: 8px; } .assistant summary { cursor: pointer; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.chat-empty { text-align: center; padding: 30px 0 0; }
.composer.ask { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 8px; align-items: center; }
.composer.ask input { border: 0; outline: none; }
.typing { color: var(--muted); animation: pulse 1.2s infinite; } @keyframes pulse { 50% { opacity: .4; } }

/* Notificações, relatórios, config */
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list button { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 12px 16px; border: 0; border-bottom: 1px solid #f0f2f5; background: none; font: inherit; cursor: pointer; color: var(--text); }
.notif-list button:hover { background: var(--surface-2); }
.notif-list .grow { display: flex; flex-direction: column; }
.notif-list li.unread button { background: #fff8f2; } .notif-list li.unread strong::before { content: '● '; color: var(--primary); }
.report-card { display: flex; flex-direction: column; gap: 4px; }
.pref-list { list-style: none; padding: 0; margin: 0; }
.pref-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f2f5; }
.integration { display: flex; flex-direction: column; gap: 8px; } .integration .btn { align-self: flex-start; }
.integration h3 { display: flex; gap: 8px; align-items: center; }
.danger-zone { margin-top: 16px; border: 1px solid #f5c2c2; border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.danger-zone summary { color: var(--bad); cursor: pointer; font-weight: 600; }
.danger-zone[open] { display: flex; } .danger-zone input { margin: 8px 0; }

/* Vazio, carregando, toasts */
.empty { text-align: center; padding: 40px 20px; color: var(--text-2); }
.empty h3 { margin: 10px 0 4px; }
.empty p { max-width: 420px; margin: 0 auto; color: var(--muted); }
.empty-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--primary-50); color: var(--primary); display: inline-grid; place-items: center; }
.empty-actions { margin-top: 14px; display: flex; gap: 8px; justify-content: center; }
.loading { display: grid; place-items: center; padding: 60px 0; }
.spinner { width: 28px; height: 28px; border: 3px solid #dbe3ee; border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { display: flex; gap: 8px; align-items: center; background: #0f172a; color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); max-width: 380px; animation: pop .15s; font-size: 13.5px; }
.toast.success .icon { color: #4ade80; } .toast.error { background: #7f1d1d; }

/* Auth */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 50% -10%, #dbe8fb, transparent), var(--bg); }
.auth-card { width: 100%; max-width: 420px; padding: 28px; }
.auth-card.wide { max-width: 720px; }
.auth-card h1 { text-align: center; margin-bottom: 4px; }
.auth-card > p.muted { text-align: center; margin-bottom: 18px; }
.auth-form { margin: 8px 0 12px; }
.auth-form .btn { margin-top: 16px; height: 42px; }
/* Botão do Google: branco, borda cinza e o "G" colorido (diretrizes de marca do Google) */
.btn.google { background: #fff; color: #1f1f1f; border: 1px solid #747775; height: 42px; gap: 10px; font-weight: 500; text-decoration: none; margin-top: 12px; }
.btn.google:hover { background: #f8f9fa; } .btn.google svg { flex: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
/* Código de verificação: um quadradinho por dígito (um campo invisível por cima recebe a digitação) */
.code-input { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; max-width: 340px; margin: 6px auto 0; width: 100%; }
.code-input input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; caret-color: transparent; z-index: 1; cursor: text; padding: 0; border: 0; min-height: 0; }
.code-input .box { height: 56px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); display: grid; place-items: center;
  font-size: 24px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s; }
.code-input .box.filled { border-color: var(--text-2); }
.code-input .box.cur { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(196, 84, 15, .18); }
.code-input .box.cur:not(.filled)::after { content: ""; width: 2px; height: 26px; background: var(--primary); animation: code-caret 1s steps(1) infinite; }
@keyframes code-caret { 50% { opacity: 0; } }
@media (max-width: 400px) { .code-input { gap: 6px; } .code-input .box { height: 50px; font-size: 21px; } }
.security-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.security-row:first-of-type { border-top: 0; } .security-row p { margin: 2px 0 0; }
.auth-foot { margin-top: 16px; }
.step-label { text-align: center; color: var(--primary); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.demo-box { display: flex; gap: 14px; align-items: center; justify-content: space-between; margin-top: 20px; padding: 14px; background: var(--primary-50); border-radius: var(--radius); flex-wrap: wrap; }

/* Comprovante */
.receipt { max-width: 720px; margin: 0 auto; padding: 28px; }
.receipt header { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--text); padding-bottom: 12px; margin-bottom: 16px; }
.print-only { display: none; }

/* Ajuda contextual, "Mais opções", confirmação, desfazer */
.help { display: inline-grid; place-items: center; flex: none; box-sizing: border-box; width: 16px; height: 16px; min-width: 16px; max-width: 16px; padding: 0; line-height: 1; border-radius: 50%; background: #e2e8f0; color: var(--text-2); font-size: 11px; font-weight: 700; margin-left: 6px; cursor: help; position: relative; vertical-align: middle; flex-shrink: 0; }
.help:hover::after, .help:focus::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: 260px; background: #0f172a; color: #fff; font-size: 12px; font-weight: 400; line-height: 1.4; padding: 8px 10px; border-radius: 8px; z-index: 60; white-space: normal; text-align: left; box-shadow: var(--shadow-lg); }
.help:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
details.more { margin-top: 12px; border-top: 1px dashed var(--border-strong); padding-top: 10px; }
details.more > summary { cursor: pointer; color: var(--primary); font-weight: 550; font-size: 13px; list-style: none; margin-bottom: 8px; }
details.more > summary::before { content: '＋ '; }
details.more[open] > summary::before { content: '－ '; }
.confirm-text { color: var(--text-2); margin: 0 0 4px; }
.toast-action { background: transparent; border: 1px solid rgba(255, 255, 255, .5); color: #fff; border-radius: 6px; padding: 3px 10px; font: inherit; font-weight: 600; cursor: pointer; }
.toast-action:hover { background: rgba(255, 255, 255, .12); }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.plain-list { padding-left: 18px; color: var(--text-2); display: flex; flex-direction: column; gap: 8px; margin: 0; }

/* Fluxos guiados */
.wizard-progress { display: flex; gap: 6px; margin-bottom: 10px; }
.wizard-progress span { flex: 1; height: 5px; border-radius: 3px; background: #e2e8f0; }
.wizard-progress span.on { background: var(--primary); }
.wizard .step-label { text-align: left; margin: 0 0 2px; }
.wizard-q { font-size: 21px; font-weight: 650; margin-bottom: 4px; }
.wizard-hint { margin-bottom: 4px; }
.wizard-body { margin: 16px 0 4px; min-height: 120px; }
.modal.tall { min-height: min(640px, 88vh); display: flex; flex-direction: column; }
.modal.tall .modal-body { flex: 1; }
.choices { display: grid; gap: 8px; }
.choices.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .choices.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; font: inherit; text-align: left; color: var(--text); transition: border-color .12s, background .12s; min-height: 56px; }
.choice:hover { border-color: var(--primary); }
.choice.on { border-color: var(--primary); background: var(--primary-50); }
.choice-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.choice-text { display: flex; flex-direction: column; min-width: 0; }
.choice-text small { color: var(--muted); font-size: 12px; }
.choice .dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.big-money .money-input { border-width: 2px; border-radius: var(--radius); }
.big-money .money-input span { font-size: 22px; padding-left: 14px; }
.big-money input { font-size: 30px; font-weight: 650; min-height: 64px; }
.big-input { font-size: 20px; min-height: 54px; }
.picker input[type=search] { margin-bottom: 8px; }
.pick-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; max-height: 330px; overflow-y: auto; }
.pick-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1.5px solid transparent; border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; font: inherit; text-align: left; color: var(--text); }
.pick-item:hover { border-color: var(--border-strong); }
.pick-item.on { border-color: var(--primary); background: var(--primary-50); }
.pick-item .grow { display: flex; flex-direction: column; }
.pick-item small { color: var(--muted); font-size: 12px; }
.picker-new, .card-inset { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-top: 10px; }
.card-inset h4 { margin-bottom: 8px; }
.picker-new .row-gap { margin-top: 10px; }
.explain { display: flex; gap: 8px; align-items: flex-start; background: var(--info-bg); color: #2e3034; border-radius: var(--radius-sm); padding: 10px 12px; margin: 12px 0 0; font-size: 13px; }
.explain.warn { background: var(--warn-bg); color: #6b4600; }
dl.review { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
dl.review dt { color: var(--muted); } dl.review dd { margin: 0; word-break: break-word; }
.done-view { text-align: center; padding: 10px 0; }
.done-view h2 { margin: 12px 0 6px; }
.done-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.ok-mark.big { width: 64px; height: 64px; margin: 0 auto; }
.cust-row { margin-bottom: 8px; }

/* Ações rápidas */
.actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.actions-grid.small { margin-top: 4px; }
.action-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; font: inherit; text-align: left; color: var(--text); min-height: 64px; }
.action-card:hover { border-color: var(--primary); background: var(--primary-50); }
.action-card strong { display: block; font-size: 15px; }
.action-card small { color: var(--muted); font-size: 12px; }
.action-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--primary-50); color: var(--brand); }

/* Busca global */
.global-search { position: relative; display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0 10px; width: 320px; color: var(--muted); }
.global-search input { border: 0; outline: none !important; min-height: 36px; padding: 0; }
.global-search.in-modal { width: 100%; margin-bottom: 10px; }
.search-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 70vh; overflow-y: auto; z-index: 45; }
.search-results { list-style: none; margin: 0; padding: 6px; }
.search-results button { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: var(--radius-sm); cursor: pointer; font: inherit; text-align: left; color: var(--text); }
.search-results button:hover { background: var(--surface-2); }
.search-results .grow { display: flex; flex-direction: column; }
.search-results small { color: var(--muted); font-size: 12px; }

/* Tour e demonstração */
.tour-layer { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 70; }
.tour-card { position: fixed; width: 300px; margin: 0; box-shadow: var(--shadow-lg); animation: pop .15s; }
.tour-card.centered { left: 50%; top: 40%; transform: translate(-50%, -50%); }
.tour-card::before { content: ''; position: absolute; left: -7px; top: 18px; width: 12px; height: 12px; background: var(--surface); border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); transform: rotate(45deg); }
.tour-card.centered::before { display: none; }
.tour-text { font-size: 16px; font-weight: 600; margin: 4px 0 14px; }
.tour-card .step-label { text-align: left; }
.tour-target { position: relative; z-index: 71; background: var(--surface) !important; box-shadow: 0 0 0 3px var(--primary), 0 0 0 8px rgba(29, 100, 199, .25); border-radius: 8px; }
.demo-banner { background: var(--primary-50); border: 1px solid #f6d3b8; color: #5c2a08; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; font-size: 13px; }
.demo-banner .chips { margin-top: 8px; }

/* Dashboard e listas */
.main-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.main-kpis .stat-value { font-size: 24px; }
.main-kpis .stat-label { font-size: 13.5px; color: var(--text-2); font-weight: 600; }
.story ul { list-style: none; padding: 0; margin: 0; }
.story-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; border: 0; border-bottom: 1px solid #f0f2f5; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--text); border-radius: 6px; }
.story-item:hover { background: var(--surface-2); }
.story-item span { flex: 1; }
.story-item .chev { color: var(--muted); }
.tone-text-good > .icon:first-child { color: var(--good); } .tone-text-warn > .icon:first-child { color: #c98500; }
.tone-text-bad > .icon:first-child { color: var(--bad); } .tone-text-neutral > .icon:first-child { color: var(--info); }
.setup .progress { margin-bottom: 10px; }
.shortcuts { display: none; gap: 8px; overflow-x: auto; margin: -4px 0 14px; padding-bottom: 4px; }
.shortcut { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 72px; padding: 10px 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font: inherit; font-size: 12px; font-weight: 600; color: var(--text); cursor: pointer; }
.shortcut span { font-size: 22px; color: var(--brand); display: grid; }
button.card.stat { font: inherit; text-align: left; color: inherit; width: 100%; }
.card.stat.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
a.chip { text-decoration: none; }
a.chip:hover { background: var(--primary-50); color: var(--primary); }

/* Boleto */
.boleto-top { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.hero-value { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.hero-value.small { font-size: 20px; }
.boleto-top .right p { margin-top: 6px; }
.action-list { display: flex; flex-direction: column; gap: 6px; }
.action-list .btn { justify-content: flex-start; margin: 0; }
.provider-status { font-size: 16px; font-weight: 600; margin: 4px 0 12px; }

/* Responsivo */
@media (max-width: 1280px) {
  .main-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .global-search { width: 240px; }
}
@media (max-width: 1100px) {
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .builder { grid-template-columns: 1fr; gap: 0; } .arrow { padding: 6px 0; transform: rotate(90deg); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .only-m { display: inline-flex !important; } td.only-m { display: table-cell !important; }
  .hide-m { display: none !important; }
  .topbar { padding: 0 12px; }
  .content { padding: 16px 16px 90px; }
  .grid.two, .grid.two-one, .grid.one-two, .grid.three { grid-template-columns: minmax(0, 1fr); }
  .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sticky { position: static; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: 64px; background: var(--surface); border-top: 1px solid var(--border); z-index: 20; align-items: center; justify-content: space-around; padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a, .bottom-nav > button:not(.fab) { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); background: none; border: 0; font-family: inherit; cursor: pointer; flex: 1; }
  .bottom-nav a.active { color: var(--primary); } .bottom-nav a:hover { text-decoration: none; }
  .fab { width: 50px; height: 50px; border-radius: 50%; background: var(--primary); color: #fff; border: 0; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(29, 100, 199, .4); margin-top: -18px; cursor: pointer; }
  .toasts { bottom: 76px; right: 12px; left: 12px; }
  .inbox { grid-template-columns: 1fr; height: calc(100vh - 210px); }
  .inbox.has-conv .inbox-list { display: none; } .inbox:not(.has-conv) .inbox-thread { display: none; }
  .items-head { display: none; }
  .item-row, .item-row.purchase { grid-template-columns: 1fr 1fr; background: var(--surface-2); padding: 8px; border-radius: var(--radius-sm); }
  .item-row .item-main { grid-column: 1 / -1; }
  .only-m-flex { display: flex !important; }
  .main-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-kpis > :first-child { grid-column: 1 / -1; }
  .tour-card:not(.centered) { left: 50% !important; top: 40% !important; transform: translate(-50%, -50%); }
  .tour-card::before { display: none; }
}
@media (max-width: 600px) {
  .hide-s { display: none !important; }
  .topbar { gap: 2px; padding: 0 8px; }
  .topbar .spacer { display: none; }
  .company-switch { max-width: none; flex: 1 1 auto; min-width: 0; padding-left: 4px; padding-right: 4px; text-overflow: ellipsis; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 19px; }
  .page-header { align-items: flex-start; }
  .page-header .actions { width: 100%; }
  .stat-value { font-size: 18px; }
  .grid.kpis, .grid.stats.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .var-row { grid-template-columns: 40px 1fr; } .var-row input { grid-column: 2; }
  .schedule { flex-direction: column; }
  .search { max-width: none; }
  .filter { flex: 1 1 140px; }
  .date-range { width: 100%; } .date-range input { flex: 1; width: auto; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .cal-day { min-height: 62px; } .cal-task { font-size: 0; height: 6px; padding: 0; }
  .overlay { padding: 0; align-items: flex-end; } .modal { border-radius: 16px 16px 0 0; max-height: 92vh; overflow-y: auto; }
  .modal.tall { height: 92vh; }
  .msg { max-width: 90%; }
  .actions-grid { grid-template-columns: minmax(0, 1fr); }
  .demo-banner .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .choices.cols-2, .choices.cols-3 { grid-template-columns: minmax(0, 1fr); }
  .big-money input { font-size: 26px; }
  dl.review { grid-template-columns: minmax(0, 1fr); gap: 2px; } dl.review dd { margin-bottom: 8px; }
}

/* Impressão (PDF) */
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .bottom-nav, .no-print, .toolbar, .page-header .actions, .pager, .row-actions, .toasts, .back { display: none !important; }
  .main { margin: 0; } .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .print-only { display: inline; }
  .table-wrap { overflow: visible; }
  a { color: inherit; }
}

/* Pix junto com o boleto */
.pix-box { display: flex; gap: 16px; align-items: center; margin-top: 16px; padding: 14px; border: 1px dashed var(--border); border-radius: 12px; }
.pix-box img { border-radius: 8px; background: #fff; padding: 6px; flex: none; }
.pix-box p { margin: 4px 0 10px; }
@media (max-width: 560px) { .pix-box { flex-direction: column; text-align: center; } }

/* Lista numerada simples (passos de conexão) */
.numbered { padding-left: 20px; margin: 8px 0 12px; }
.numbered li { margin: 4px 0; }

/* Linha com valor para copiar (dados do webhook) */

/* Modelos de cobrança do WhatsApp */

/* Notas fiscais */
.row-gap.start { justify-content: flex-start; align-items: center; }
.summary-table th { width: 38%; text-align: left; font-weight: 500; color: var(--muted); }
.summary-table td, .summary-table th { vertical-align: top; }
.sheet-table { table-layout: fixed; }
.sheet-table th { white-space: normal; width: 36%; }
.sheet-table td { overflow-wrap: anywhere; }
.sheet-table td:last-child { width: 48px; padding-left: 0; padding-right: 0; }
@media (max-width: 600px) { .sheet-table th, .sheet-table td { padding: 8px 6px; } }
.fiscal-log { list-style: none; margin: 8px 0 0; padding: 0; }
.fiscal-log li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.fiscal-log li:last-child { border-bottom: 0; }

/* Assinatura */
.plan-table th, .plan-table .cell-sub { width: auto; white-space: normal; }
.plan-table { table-layout: auto; }
.plan-table td { white-space: nowrap; vertical-align: top; }
.plan-table tr.total th, .plan-table tr.total td { border-top: 1px solid var(--border); font-size: 15px; color: var(--text); }
.plan-table label.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; color: var(--text); cursor: pointer; }
.plan-points { padding-left: 18px; line-height: 1.6; }
.plan-points li { margin-bottom: 6px; }
.plan-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.plan-banner .chips { margin-top: 0; }
.nav-item .lock { margin-left: auto; opacity: .55; }
.stepper { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; }
.stepper strong { min-width: 24px; text-align: center; font-size: 15px; }
.stepper .btn { min-width: 36px; justify-content: center; }
.checkout-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 16px 0; }
.checkout-steps li { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; padding: 6px 4px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 600; }
.checkout-steps li.on { background: var(--primary-50); color: var(--primary-600); }
.checkout-steps li.done { color: var(--text); }
.checkout-summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; }
.checkout-summary span { flex: 1; min-width: 0; }
.checkout-summary strong { white-space: nowrap; }
.trust-seals { list-style: none; padding: 0; margin: 16px 0 6px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.trust-seals li { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.trust-seals .seal-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #e7f6ec; color: #1e7a3c; }
.trust-seals strong { display: block; font-size: 13px; }
.trust-seals span:not(.seal-icon) { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.seal-links { margin-top: 6px; }
@media (max-width: 380px) { .trust-seals { grid-template-columns: 1fr; } }
/* Logo oficial do Mercado Pago: sempre sobre fundo branco, sem efeitos (regras do kit da marca) */
.mp-seal { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px 0 0; padding: 6px 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); color: var(--muted); font-size: 13px; font-weight: 600; }
.mp-seal img { display: block; height: 48px; width: auto; }

/* ---------- Guias animados das integrações (public/js/guides.js) ---------- */
.demo-stage { position: relative; aspect-ratio: 16 / 10; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 14px; overflow: hidden; animation: demo-in .35s ease; }
@keyframes demo-in { from { opacity: 0; transform: translateY(6px); } }
.demo-caption { margin: 14px 0 0; line-height: 1.5; min-height: 4.5em; } .demo-n { display: block; font-size: 12px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.demo-progress { height: 3px; background: var(--primary); border-radius: 3px; transform-origin: left; animation: demo-bar 5.2s linear forwards; margin-top: 8px; } @keyframes demo-bar { from { transform: scaleX(0); } }
.demo-ctrl { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.demo-dots { display: flex; gap: 6px; } .demo-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; background: var(--border-strong); cursor: pointer; } .demo-dots button.on { background: var(--primary); width: 22px; border-radius: 5px; }
.demo-note { margin-top: 10px; }
/* cursor que vai até o ponto do clique e "clica" */
.demo-cursor { position: absolute; left: 92%; top: 94%; width: 18px; height: 18px; z-index: 5; pointer-events: none; animation: demo-move 1.1s .5s cubic-bezier(.3,.7,.2,1) forwards;
  background: no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 11-6.5 1.2L16 21l-3 1.3-3.4-6.7L4 20z' fill='%231d1e20' stroke='white' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.demo-cursor::after { content: ""; position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--primary); opacity: 0; animation: demo-click .6s 1.65s ease-out; }
@keyframes demo-move { to { left: var(--x); top: var(--y); } }
@keyframes demo-click { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(2); } }
.demo-stage .hl { animation: demo-hl 1.4s 1.7s ease-in-out 2; } @keyframes demo-hl { 50% { box-shadow: 0 0 0 4px rgba(196, 84, 15, .35); } }
@media (prefers-reduced-motion: reduce) { .demo-cursor { animation: none; left: var(--x); top: var(--y); } .demo-cursor::after, .demo-stage .hl, .demo-stage { animation: none; } .demo-stage .hl { box-shadow: 0 0 0 3px rgba(196, 84, 15, .35); } }
/* telas simplificadas */
.mock { height: 100%; background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; font-size: 12.5px; display: flex; flex-direction: column; }
.mock-bar { height: 26px; flex: none; display: flex; align-items: center; gap: 5px; padding: 0 10px; background: #f1f1ef; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.mock-bar i { width: 7px; height: 7px; border-radius: 50%; background: #d4d4d1; } .mock-bar span { margin-left: 8px; background: #fff; border-radius: 5px; padding: 1px 10px; }
.mock-body { flex: 1; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.mock-body p, .mock-card p { margin: 0; color: var(--text-2); }
.mock-app { display: flex; gap: 12px; height: 100%; margin: -14px -16px; } .mock-side { width: 26%; background: #fbfbfa; border-right: 1px solid var(--border); padding: 12px; display: flex; flex-direction: column; gap: 6px; } .mock-side b { color: var(--primary); } .mock-side span { color: var(--muted); font-size: 11px; }
.mock-main { flex: 1; padding: 14px 14px 14px 0; display: flex; flex-direction: column; gap: 8px; }
.mock-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.mock-btn { display: inline-block; padding: 6px 12px; border-radius: 7px; font-weight: 650; font-size: 12px; white-space: nowrap; }
.mock-btn.primary { background: var(--primary); color: #fff; } .mock-btn.neutral { background: #2f3133; color: #fff; } .mock-btn.ghost { border: 1px solid var(--border-strong); color: var(--text); }
.mock-field { border: 1px solid var(--border-strong); border-radius: 7px; padding: 4px 9px; display: flex; flex-direction: column; min-width: 0; flex: none; } .mock-row .mock-field { flex: 1; } .mock-field small { color: var(--muted); font-size: 10px; } .mock-field span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock-center { margin: auto; width: min(320px, 100%); display: flex; flex-direction: column; gap: 8px; align-items: stretch; text-align: center; } .mock-center .mock-btn { align-self: center; } .mock-center b { font-size: 14px; }
.mock-row { display: flex; gap: 8px; align-items: center; } .mock-row.between { justify-content: space-between; } .mock-row.end { justify-content: flex-end; } .mock-center .mock-row { justify-content: center; }
.mock-list { margin: 0; padding-left: 18px; text-align: left; color: var(--text-2); }
.mock-ok { color: var(--good) !important; font-weight: 700; } .mock-muted { color: var(--muted) !important; }
.mock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .mock-tile { border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-weight: 600; }
.mock-option { border: 1px solid var(--border-strong); border-radius: 8px; padding: 9px; font-weight: 600; text-align: left; }
@media (max-width: 560px) { .demo-stage { aspect-ratio: auto; height: 300px; padding: 10px; } .mock { font-size: 11.5px; } .mock-side { display: none; } .mock-main { padding-left: 14px; } }
/* Integrações: chamada do Mercado Pago com um clique */
.connect-hero { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; } .connect-hero .row-gap { align-items: center; }
.btn.mp { background: var(--primary); color: #fff; } .steps-mini { margin: 0; padding-left: 20px; color: var(--text-2); } .steps-mini li { margin: 4px 0; }

/* Lembretes pelo WhatsApp do próprio usuário (painel) */
.wa-reminders .wa-list { list-style: none; margin: 10px 0 8px; padding: 0; }
.wa-reminders .wa-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.wa-reminders .wa-list li:first-child { border-top: 0; } .wa-reminders .grow { display: flex; flex-direction: column; min-width: 0; }
.btn.wa-send { background: #1f8f4e; border-color: #1f8f4e; color: #fff; } .btn.wa-send:hover { background: #18773f; }
.bad-text { color: var(--bad); }
@media (max-width: 640px) { .wa-reminders .wa-list li { flex-wrap: wrap; } .wa-reminders .grow { flex: 1 1 100%; } .wa-reminders .wa-send { flex: 1; justify-content: center; } }

/* WhatsApp pelo próprio usuário: fila completa e quadro de Integrações */
.link-btn { background: none; border: 0; padding: 0; color: var(--primary-600); font: inherit; cursor: pointer; text-decoration: underline; }
.wa-preview { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 6px 0 0; font-size: 14px; color: var(--text-2); }
.wa-section + .wa-section { margin-top: 18px; } .wa-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.wa-section-head h4 { margin: 0; font-size: 15px; } .wa-reminders .grow .link-btn { align-self: flex-start; margin-top: 2px; }
.mb { margin-bottom: 12px; }
.composer .btn.wa-send { white-space: nowrap; }

/* Checkout: o que o módulo Organização acrescenta */
.org-list { margin: 6px 0 0; padding-left: 18px; font-weight: 400; } .org-list li { margin: 3px 0; }
.org-note { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--bg); font-weight: 400; }

/* Suporte: botão "Ajuda", chat e faixa de visualização do suporte */
.sp-fab { position: fixed; right: 20px; bottom: 20px; z-index: 25; display: flex; align-items: center; gap: 6px; padding: 10px 16px; border: 0; border-radius: 999px;
  background: var(--text); color: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-lg); }
.sp-fab:hover { background: #000; }
.sp-fab .dot { background: var(--brand); color: #fff; border-radius: 9px; font-size: 11px; line-height: 18px; min-width: 18px; padding: 0 5px; font-weight: 700; }
.sp-panel { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 380px; height: min(560px, calc(100vh - 40px)); display: flex; flex-direction: column; padding: 0; overflow: hidden; box-shadow: var(--shadow-lg); }
.sp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.sp-head > div { display: flex; flex-direction: column; } .sp-head .icon-btn { font-size: 22px; line-height: 1; }
.sp-log { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.sp-empty { color: var(--muted); text-align: center; margin: auto 8px; }
.sp-msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); align-self: flex-start; }
.sp-msg.me { align-self: flex-end; background: var(--primary-50); border-color: #f6d3b8; }
.sp-msg p, .sp-sys p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-msg time, .sp-sys time { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.sp-msg.me time { text-align: right; }
.sp-sys { align-self: center; max-width: 92%; text-align: center; font-size: 13px; color: var(--text-2); background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 10px; padding: 8px 12px; }
.sp-access { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.sp-grant { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--warn-bg); color: var(--warn); font-size: 13px; }
.sp-grant span { flex: 1; }
.sp-composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface); }
.sp-composer textarea { resize: none; min-height: 42px; max-height: 140px; }
.sp-viewing { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: #1d1e20; color: #fff; font-size: 13px; position: sticky; top: 0; z-index: 30; }
.sp-viewing span { flex: 1; }
@media (max-width: 900px) {
  .sp-fab { bottom: 76px; right: 12px; padding: 10px 12px; } .sp-fab span:not(.dot) { display: none; }
  .sp-panel { inset: 0; width: auto; height: auto; margin: 0; border-radius: 0; z-index: 60; }
}
.sp-online { display: inline-flex; align-items: center; gap: 6px; color: var(--good); font-weight: 550; }
.sp-online::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #1fa34a; box-shadow: 0 0 0 3px rgba(31, 163, 74, .18); }
.sp-wait { align-self: center; max-width: 92%; margin: 2px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

/* Checkout: hoje R$ 0,00 e quando começa a mensalidade */
.trial-box { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 6px; }
.trial-box > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); }
.trial-box > div:first-child { background: var(--good-bg); border-color: #bfe3bf; }
.trial-box span { font-size: 12px; color: var(--muted); } .trial-box strong { font-size: 20px; } .trial-box small { font-size: 12px; color: var(--text-2); }
.trial-box > div:first-child strong { color: var(--good); }
@media (max-width: 420px) { .trial-box { grid-template-columns: 1fr; } }

/* Chat de ajuda: conversa nova com sugestões e histórico das resolvidas */
.sp-head-actions { display: flex; align-items: center; gap: 2px; } .sp-head .icon-btn.on { background: var(--primary-50); color: var(--primary-600); }
.sp-start { margin: auto 4px; text-align: center; } .sp-start p { margin: 0 0 6px; }
.sp-suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.sp-hist-title { margin: 0; font-weight: 600; }
.sp-hist { display: flex; flex-direction: column; gap: 2px; text-align: left; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font: inherit; cursor: pointer; }
.sp-hist:hover { border-color: var(--border-strong); } .sp-hist strong { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-back { padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface); } .sp-back.top { border-top: 0; border-bottom: 1px solid var(--border); padding: 8px 16px; }

/* WhatsApp: mensagens automáticas e histórico */
.wa-recipe .wa-preview { margin: 4px 0 10px; }
.wa-history-head { margin-bottom: 12px; } .wa-history-head h2 { margin: 6px 0 2px; }
.grid.stats.four { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.alt-provider { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border-strong); font-size: 14px; }
.connect-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 6px; }
.video-btn { width: 40px; height: 40px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--primary, #E56515); }
.connect-alt { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border-strong); }
.asaas-how .numbered { margin: 0 0 10px; } .asaas-how .plain-list li { margin: 4px 0; }
