:root {
  --bg: #f4f5f9;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --text: #171a2b;
  --muted: #6b7086;
  --border: #e4e6ef;
  --border-strong: #d3d6e3;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-soft: #eef0ff;
  --green: #10b981;
  --green-dark: #059669;
  --wa: #25d366;
  --wa-dark: #1da851;
  --red: #ef4444;
  --amber: #f59e0b;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(23, 26, 43, .06);
  --shadow: 0 1px 2px rgba(23, 26, 43, .05), 0 4px 16px rgba(23, 26, 43, .06);
  --shadow-lg: 0 24px 60px rgba(23, 26, 43, .22);
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: .9em; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 5px; border-radius: 6px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 18px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 12px rgba(79, 70, 229, .35);
}
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.brand-sub { font-size: 12px; color: var(--muted); }
.tabs { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); padding: 4px; border-radius: 12px; }
.tab {
  display: flex; align-items: center; gap: 7px;
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 14px; border-radius: 9px; font-weight: 500; color: var(--muted);
  transition: background .15s, color .15s;
}
.tab svg { width: 16px; height: 16px; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); font-weight: 600; }

/* ---------- Painel (stats) ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) minmax(220px, 1.6fr);
  gap: 12px;
  padding: 18px 28px 4px;
}
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow-sm);
  cursor: pointer; text-align: left; transition: transform .12s, box-shadow .12s;
  border-top: 3px solid var(--c, var(--border));
}
.stat:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.stat.money {
  border: 0; color: #fff;
  background: linear-gradient(135deg, #059669, #10b981 60%, #34d399);
  box-shadow: 0 6px 18px rgba(16, 185, 129, .28);
}
.stat.money .stat-label, .stat.money .stat-sub { color: rgba(255, 255, 255, .85); }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

main { padding: 18px 28px 40px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border-strong); background: var(--surface);
  padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(79, 70, 229, .3); }
.btn.primary:hover { background: #4338ca; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: #fecaca; background: #fff; }
.btn.danger:hover { background: #fef2f2; }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn.wa:hover { background: var(--wa-dark); }
.btn.lg { padding: 12px 22px; font-size: 15px; border-radius: 12px; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn .spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid var(--border); background: var(--surface); border-radius: 9px; cursor: pointer; color: var(--muted);
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn.wa { color: var(--wa-dark); border-color: #bbf0d0; background: #effcf4; }
.icon-btn.wa:hover { background: var(--wa); color: #fff; border-color: var(--wa); }

/* ---------- Inputs ---------- */
input[type=text], input[type=search], input[type=number], input[type=url], textarea, select {
  width: 100%;
  border: 1px solid var(--border-strong); background: var(--surface);
  border-radius: var(--radius-sm); padding: 9px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
textarea { resize: vertical; line-height: 1.5; }
.search-input { position: relative; flex: 1; }
.search-input svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-input input { padding-left: 42px; height: 48px; font-size: 15px; border-radius: 12px; }
.search-input.sm input { height: 38px; font-size: 14px; padding-left: 38px; }
.search-input.sm svg { left: 12px; width: 16px; height: 16px; }
.check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; color: var(--muted); }
.check input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--accent); }

/* ---------- Prospectar ---------- */
.search-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 22px 24px; box-shadow: var(--shadow);
  background-image: radial-gradient(1200px 200px at 100% 0%, rgba(124, 58, 237, .06), transparent 60%);
}
.search-intro h1 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.search-intro p { margin: 4px 0 16px; color: var(--muted); }
.search-row { display: flex; gap: 10px; margin-bottom: 12px; }

.alert {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
}
.alert.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert svg { margin-top: 1px; }
.alert a { color: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

.results-head {
  position: sticky; top: 63px; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 22px 0 10px; padding: 10px 14px;
  background: rgba(244, 245, 249, .92); backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: 12px;
}
.results-title { font-weight: 700; font-size: 15px; }
.results-sub { font-size: 12.5px; color: var(--muted); }
.results-actions { display: flex; align-items: center; gap: 12px; }

.result-list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s;
}
.row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.row.selected { border-color: var(--accent); background: #fafaff; box-shadow: 0 0 0 1px var(--accent) inset; }
.row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; margin: 0; }
.row.existing { cursor: default; background: #fbfbfd; }
.row.existing .row-title { color: #444a63; }
.row.existing input { cursor: not-allowed; }
.row-title { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; color: var(--muted); font-size: 13px; }
.row-meta span { display: inline-flex; align-items: center; gap: 5px; }
.row-meta svg { width: 14px; height: 14px; }
.row-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.star { color: #f59e0b; }
.rating { color: var(--text); font-weight: 600; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: color-mix(in srgb, var(--c, var(--accent)) 12%, white);
  color: color-mix(in srgb, var(--c, var(--accent)) 80%, black);
  border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 30%, white);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--accent)); }
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.tag.ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.tag.money { background: #eef0ff; color: #4338ca; border-color: #c7d2fe; }
.tag.warn { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.tag.social { background: #fdf2f8; color: #be185d; border-color: #fbcfe8; }

.load-more { display: flex; justify-content: center; margin-top: 16px; }

.empty {
  text-align: center; padding: 48px 20px; color: var(--muted);
}
.empty .empty-icon {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.empty .empty-icon svg { width: 26px; height: 26px; }
.empty h3 { margin: 0 0 4px; color: var(--text); font-size: 16px; }
.empty p { margin: 0 auto; max-width: 440px; }
.examples { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }

.skeleton { height: 72px; border-radius: 12px; background: linear-gradient(90deg, #eceef4 25%, #f6f7fa 50%, #eceef4 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Quadro (Kanban) ---------- */
.board-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.board-toolbar .search-input { max-width: 360px; }
.board {
  display: grid; grid-template-columns: repeat(6, minmax(195px, 1fr)); gap: 12px;
  overflow-x: auto; padding-bottom: 8px; align-items: start;
}
.col {
  background: #eceef5; border-radius: 16px; padding: 10px;
  display: flex; flex-direction: column; min-height: 300px; max-height: calc(100vh - 250px);
}
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 8px; }
.col-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.col-title { font-weight: 700; font-size: 13.5px; }
.col-count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface); border-radius: 999px; padding: 1px 9px; }
.col-sum { font-size: 12px; color: var(--muted); padding: 0 6px 8px; margin-top: -4px; }
.col-body {
  flex: 1; display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto; padding: 2px; border-radius: 12px; min-height: 80px;
  transition: background .15s;
}
.col-body.over { background: color-mix(in srgb, var(--c) 10%, transparent); outline: 2px dashed color-mix(in srgb, var(--c) 45%, transparent); outline-offset: -2px; }
.col-empty { border: 1.5px dashed var(--border-strong); border-radius: 12px; padding: 18px 10px; text-align: center; color: var(--muted); font-size: 12.5px; }
.col-body.over .col-empty { display: none; }

.card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 11px 12px 10px 14px; cursor: grab; box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, transform .15s, border-color .15s, opacity .15s;
}
.card::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.card:active { cursor: grabbing; }
.card.dragging { opacity: .35; transform: scale(.98); }
.card-title { font-weight: 600; font-size: 13.5px; line-height: 1.3; margin-bottom: 4px; padding-right: 4px; }
.card-line { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.card .icon-btn { width: 30px; height: 30px; }
.drop-ph { height: 6px; border-radius: 4px; background: var(--c, var(--accent)); opacity: .7; margin: 2px 0; flex-shrink: 0; }

/* ---------- Configurações ---------- */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.side-panels { display: flex; flex-direction: column; gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow-sm); }
.panel h2 { margin: 0 0 6px; font-size: 16px; letter-spacing: -.01em; }
.panel p { margin: 0 0 12px; }
.panel-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.chips { display: flex; gap: 6px; margin: 8px 0 14px; }
.chip { border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; font-weight: 500; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.wa-preview { background: #efeae2; border-radius: 14px; padding: 14px; }
.bubble {
  margin-top: 8px; max-width: 420px; background: #d9fdd3; border-radius: 10px 10px 10px 2px;
  padding: 9px 12px; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 1px rgba(0,0,0,.08); font-size: 13.5px;
}
.key-ok, .key-missing { display: flex; align-items: center; gap: 8px; font-weight: 600; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
.key-ok { background: #ecfdf5; color: #047857; }
.key-missing { background: #fffbeb; color: #b45309; }
.path { display: block; padding: 8px 10px; margin-bottom: 10px; word-break: break-all; }

/* ---------- Modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(17, 19, 34, .45); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 24px;
  animation: fade .15s ease-out;
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal {
  width: min(980px, 100%); max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg);
  animation: pop .18s ease-out; overflow: hidden;
}
.modal.narrow { width: min(560px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 16px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.modal-head .sub { color: var(--muted); margin-top: 3px; font-size: 13px; }
.modal-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; overflow: auto; }
.modal.narrow .modal-body { display: block; padding: 20px 24px; }
.modal-main { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.modal-side { padding: 20px 22px; background: var(--surface-2); border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-top: 1px solid var(--border); background: var(--surface); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 600; color: #3e4359; }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input-with-btn { display: flex; gap: 6px; }
.input-with-btn .icon-btn { width: 40px; height: 40px; flex-shrink: 0; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.info-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.info-value { font-weight: 600; margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.stage-select { position: relative; }
.stage-select select { font-weight: 600; padding-left: 30px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.stage-select .dot { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 10px; height: 10px; border-radius: 50%; background: var(--c); pointer-events: none; }
.side-title { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin: 4px 0 -4px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; display: flex; flex-direction: column; gap: 0; }
.timeline li { position: relative; padding: 0 0 14px 20px; border-left: 2px solid var(--border); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--surface-2); }
.timeline .t-stage { font-weight: 600; font-size: 13px; }
.timeline .t-date { font-size: 12px; color: var(--muted); }
.save-state { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.save-state.saving { color: var(--amber); }
.save-state.saved { color: var(--green-dark); }
.wa-to { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #effcf4; border: 1px solid #bbf0d0; margin-bottom: 14px; }
.wa-to strong { font-size: 15px; }
.warn-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast {
  display: flex; align-items: center; gap: 12px;
  background: #1b1e30; color: #fff; padding: 11px 14px 11px 16px; border-radius: 12px;
  box-shadow: var(--shadow-lg); max-width: 440px; font-size: 13.5px;
  animation: pop .18s ease-out; transition: opacity .25s, transform .25s;
}
.toast.error { background: #b91c1c; }
.toast.out { opacity: 0; transform: translateY(6px); }
.toast button { border: 0; background: rgba(255,255,255,.14); color: #fff; padding: 5px 10px; border-radius: 8px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.toast button:hover { background: rgba(255,255,255,.24); }

/* ---------- Vendas, suporte, manutenção ---------- */
.tab-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.tab-badge.urgent { background: var(--red); }
.page-title { margin: 0 0 14px; font-size: 20px; letter-spacing: -.02em; }
.board-toolbar .page-title { margin: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
input[type=date] { width: 100%; border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius-sm); padding: 8px 10px; outline: none; }
.field.inline { flex-direction: row; align-items: center; gap: 8px; }
.field.inline input { width: auto; padding: 5px 8px; }
.sale-box { border: 1px solid #a7f3d0; background: #f3fdf8; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.sale-box.empty-sale { border-color: var(--border); background: var(--surface-2); flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sale-head { display: flex; align-items: center; gap: 10px; }
.sale-head strong { font-size: 18px; }
.sale-head .btn { margin-left: auto; }
.sale-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.maint-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.progress { height: 8px; border-radius: 99px; background: #dbeafe; overflow: hidden; }
.progress > div { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #06b6d4, #3b82f6); }
.progress.warn > div { background: linear-gradient(90deg, #f59e0b, #f97316); }
.progress.done > div { background: #94a3b8; }
.progress-label { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.pay-list { display: flex; flex-direction: column; gap: 6px; }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; flex-wrap: wrap; }
.pay-row > div:first-child { flex: 1; min-width: 160px; }
.pay-title { font-weight: 600; font-size: 13.5px; }
.txt-red { color: var(--red) !important; } .txt-amber { color: #d97706 !important; } .txt-green { color: var(--green-dark) !important; }
.mini-stats, .fin-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.fin-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mini { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.mini.green { border: 0; color: #fff; background: linear-gradient(135deg, #059669, #10b981 60%, #34d399); }
.mini.purple { border: 0; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.mini.green .stat-label, .mini.green .stat-sub, .mini.purple .stat-label, .mini.purple .stat-sub { color: rgba(255,255,255,.88); }
.cgroup { margin-bottom: 22px; }
.cgroup-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cgroup-head h2 { margin: 0; font-size: 16px; }
.cgroup-head .dot { width: 10px; height: 10px; border-radius: 50%; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.ccard { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-sm); cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.ccard:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.cc-top { display: flex; justify-content: space-between; gap: 8px; }
.cc-name { font-weight: 700; }
.cc-val { font-weight: 700; color: var(--green-dark); white-space: nowrap; }
.cc-line { font-size: 12.5px; }
.cc-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.cc-actions .tag { margin-right: auto; }
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--c); border-radius: 12px; padding: 12px 14px; flex-wrap: wrap; }
.notif.atrasado { background: #fef2f2; }
.notif-body { flex: 1; min-width: 200px; }
.notif-title { font-weight: 700; }
.notif-title a { color: var(--text); cursor: pointer; }
.notif-actions { display: flex; gap: 8px; align-items: center; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.bar-val { font-size: 11px; color: var(--muted); height: 16px; white-space: nowrap; }
.bar-stack { flex: 1; width: 100%; max-width: 46px; display: flex; flex-direction: column-reverse; justify-content: flex-start; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.bar.v { background: #10b981; } .bar.m { background: #7c3aed; }
.bar-lbl { font-size: 12px; color: var(--muted); margin-top: 6px; text-transform: capitalize; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legend i.v { background: #10b981; } .legend i.m { background: #7c3aed; }
.fin-total { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }

@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat.money { grid-column: span 3; }
}
@media (max-width: 900px) {
  .topbar, .stats, main { padding-left: 16px; padding-right: 16px; }
  .settings-grid, .modal-body, .grid2, .info-grid { grid-template-columns: 1fr; }
  .modal-side { border-left: 0; border-top: 1px solid var(--border); }
  .row { grid-template-columns: 22px 1fr; }
  .row-side { grid-column: 2; justify-content: flex-start; }
  .brand-sub { display: none; }
  .mini-stats, .fin-grid, .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: 1fr 1fr; }
}
/* ---------- Celular ---------- */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .topbar { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 10px; padding-bottom: 8px; }
  .tabs { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; padding: 8px 11px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 12px; }
  .stat { padding: 8px 10px; }
  .stat-value { font-size: 20px; }
  .stat.money { grid-column: span 3; }
  .fin-grid.three, .mini-stats, .fin-grid { grid-template-columns: 1fr 1fr; }
  .mini.big { grid-column: span 2; }
  .search-row { flex-direction: column; }
  .results-head { position: static; }
  .board { grid-template-columns: repeat(6, 82vw); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; max-height: calc(100vh - 230px); }
  .overlay { padding: 0; place-items: stretch; }
  .modal, .modal.narrow { width: 100%; max-height: 100vh; height: 100%; border-radius: 0; }
  .modal-foot { flex-wrap: wrap; }
  .grid3 { grid-template-columns: 1fr; }
  .notif-actions { width: 100%; justify-content: flex-end; }
  .icon-btn.wa, .card .icon-btn { width: 40px; height: 40px; }
  #toasts { left: 12px; right: 12px; align-items: stretch; }
  .toast { max-width: none; }
  .bars { height: 150px; gap: 6px; }
}
