/* Leads — folha de estilo principal. Sem estilos inline (CSP style-src 'self'). */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e2e5ea;
  --text: #1c2330;
  --muted: #5f6b7c;
  --primary: #1f5eff;
  --primary-strong: #1646c4;
  --primary-soft: #e8efff;
  --success: #15803d;
  --success-soft: #e7f6ec;
  --danger: #c62828;
  --danger-soft: #fdecec;
  --warning: #b45309;
  --warning-soft: #fdf3e3;
  --sidebar: #111827;
  --sidebar-text: #cbd2dc;
  --sidebar-active: #1f2937;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b;
    --surface: #161c25;
    --surface-2: #1d2530;
    --border: #2a3441;
    --text: #e6eaf0;
    --muted: #97a3b4;
    --primary: #6b93ff;
    --primary-strong: #8aa9ff;
    --primary-soft: #1c2742;
    --success-soft: #11291b;
    --danger-soft: #3a1717;
    --warning-soft: #33250f;
    --sidebar: #0a0e14;
    --sidebar-active: #18202b;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Estrutura */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); padding: 1rem .75rem; display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: .5rem; color: #fff; font-weight: 700; font-size: 1.1rem; padding: .25rem .5rem; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--primary); display: grid; place-items: center; color: #fff; font-size: .9rem; }
.tenant-switch { display: block; padding: .5rem; border-radius: 8px; background: var(--sidebar-active); color: #fff; font-size: .85rem; }
.tenant-switch span { display: block; color: var(--sidebar-text); font-size: .75rem; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { text-transform: uppercase; font-size: .7rem; letter-spacing: .06em; color: #8391a5; padding: .25rem .5rem; }
.nav-link { color: var(--sidebar-text); padding: .45rem .6rem; border-radius: 7px; display: flex; justify-content: space-between; align-items: center; }
.nav-link:hover { background: var(--sidebar-active); color: #fff; text-decoration: none; }
.nav-link.active { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.nav-link.disabled { opacity: .45; pointer-events: none; }
.nav-soon { font-size: .65rem; border: 1px solid #3b4658; border-radius: 99px; padding: 0 .4rem; }
.sidebar-footer { margin-top: auto; font-size: .85rem; }
.sidebar-footer form { margin: 0; }
.link-button { background: none; border: 0; color: var(--sidebar-text); padding: .45rem .6rem; cursor: pointer; font: inherit; }
.link-button:hover { color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.75rem .5rem; }
.content { padding: .5rem 1.75rem 2rem; }
.page-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; }
.page-header .subtitle { color: var(--muted); margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.actions form { margin: 0; }

/* Componentes */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.25rem; }
.card + .card { margin-top: 1rem; }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.card-header h2, .card-header h3 { margin: 0; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout-panel { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 1rem; align-items: start; }

.stat { display: flex; flex-direction: column; gap: .15rem; }
.stat-label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 1.6rem; font-weight: 700; }
.stat-note { color: var(--muted); font-size: .8rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; padding: .5rem .9rem; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-strong); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: .3rem .6rem; font-size: .8rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

.badge { display: inline-block; border-radius: 99px; padding: .1rem .55rem; font-size: .75rem; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.tag { display: inline-flex; align-items: center; gap: .3rem; border-radius: 99px; padding: .1rem .55rem; font-size: .75rem; font-weight: 600; border: 1px solid var(--tag-color, var(--border)); color: var(--tag-color, var(--muted)); background: transparent; }
.tag form { display: inline; margin: 0; }
.tag button { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; font-size: .9rem; line-height: 1; }
.dot { width: 10px; height: 10px; border-radius: 99px; display: inline-block; background: var(--dot-color, var(--muted)); flex: none; }

.alert { border-radius: 8px; padding: .75rem 1rem; margin-bottom: 1rem; border: 1px solid transparent; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: rgba(21, 128, 61, .25); }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(198, 40, 40, .25); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: rgba(180, 83, 9, .25); }
.alert-info { background: var(--primary-soft); color: var(--primary-strong); border-color: rgba(31, 94, 255, .2); }
.validation-summary-valid { display: none; }
.validation-summary-errors ul { margin: 0; padding-left: 1.1rem; }

/* Tabelas */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.empty strong { display: block; color: var(--text); margin-bottom: .25rem; }

/* Formulários */
.form { display: grid; gap: 1rem; }
.form-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field label, .label { font-weight: 600; font-size: .85rem; }
.field .hint { font-size: .8rem; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=search], input[type=color], select, textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: .5rem .65rem; font: inherit; color: var(--text); background: var(--surface);
}
input[type=color] { padding: .15rem; height: 38px; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .25rem; }
.field-validation-error, .text-danger { color: var(--danger); font-size: .8rem; }
.input-validation-error { border-color: var(--danger) !important; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin: 0; }
legend { font-weight: 700; padding: 0 .35rem; }
.form-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin-bottom: 1rem; }
.filters .field { min-width: 150px; flex: 1 1 150px; }
.filters .field.grow { flex: 3 1 260px; }
.inline-form { display: inline-flex; gap: .35rem; align-items: center; margin: 0; }
.inline-form select, .inline-form input { width: auto; padding: .3rem .5rem; font-size: .85rem; }

/* Definições */
dl.details { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; }
dl.details dt { color: var(--muted); font-size: .85rem; }
dl.details dd { margin: 0; overflow-wrap: anywhere; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .9rem; }
.timeline li { display: grid; grid-template-columns: 12px 1fr; gap: .75rem; }
.timeline .marker { width: 12px; height: 12px; border-radius: 99px; background: var(--primary); margin-top: .35rem; box-shadow: 0 0 0 3px var(--primary-soft); }
.timeline .marker.stage { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.timeline .marker.task { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.timeline .meta { font-size: .8rem; color: var(--muted); }
.timeline .body { white-space: pre-line; }

/* Lista simples */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }

/* Kanban */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: .75rem; overflow-x: auto; padding-bottom: .75rem; align-items: start; }
.column { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 220px); }
.column-header { padding: .7rem .8rem; border-bottom: 3px solid var(--stage-color, var(--border)); display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.column-header h3 { margin: 0; font-size: .95rem; }
.column-body { padding: .6rem; display: flex; flex-direction: column; gap: .5rem; overflow-y: auto; min-height: 80px; }
.column.drop-target .column-body { outline: 2px dashed var(--primary); outline-offset: -6px; border-radius: 8px; }
.opp-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .6rem .7rem; box-shadow: var(--shadow); cursor: grab; }
.opp-card.dragging { opacity: .5; }
.opp-card.saving { opacity: .6; pointer-events: none; }
.opp-card h4 { margin: 0 0 .2rem; font-size: .9rem; }
.opp-card .org { font-size: .8rem; color: var(--muted); }
.opp-card .meta { display: flex; justify-content: space-between; margin-top: .4rem; font-size: .8rem; }

/* Diálogo */
dialog { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; background: var(--surface); color: var(--text); width: min(460px, 92vw); box-shadow: 0 20px 45px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(15, 20, 27, .45); }

/* Autenticação */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: linear-gradient(160deg, var(--primary-soft), var(--bg) 55%); }
.auth-card { width: min(420px, 100%); }
.auth-card .brand { color: var(--text); justify-content: center; margin-bottom: 1rem; font-size: 1.3rem; }
.auth-links { display: flex; justify-content: space-between; font-size: .85rem; margin-top: .5rem; }
.code-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .35rem; font-family: ui-monospace, Consolas, monospace; background: var(--surface-2); padding: .75rem; border-radius: 8px; }
.mono { font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }

/* Paginação */
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; font-size: .85rem; color: var(--muted); }

/* Barras do funil no dashboard */
.funnel { display: flex; flex-direction: column; gap: .5rem; }
.funnel-row { display: grid; grid-template-columns: 130px 1fr 110px; gap: .75rem; align-items: center; font-size: .9rem; }
.funnel-bar { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.funnel-bar span { display: block; height: 100%; width: var(--bar-width, 0); background: var(--bar-color, var(--primary)); border-radius: 99px; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .nav-group { flex-direction: row; flex-wrap: wrap; }
  .nav-title { display: none; }
  .layout-panel, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .content, .topbar { padding-left: 1rem; padding-right: 1rem; }
}

/* ===== Fase 4: e-mail, templates e arquivos ===== */
[hidden] { display: none !important; }
.layout-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.layout-editor > aside { display: grid; gap: 16px; }
.layout-editor > aside .card + .card { margin-top: 0; }
@media (max-width: 1100px) { .layout-editor { grid-template-columns: 1fr; } }
.form-row .field.grow { flex: 1 1 260px; }
.form h3 { margin: 12px 0 4px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 12px; }
.details dt { color: var(--muted); font-size: 13px; }
.details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.html-editor { display: grid; gap: 6px; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; background: var(--surface-2); }
.editor-toolbar .grow { flex: 1; }
.editor-toolbar .btn[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); }
.editor-variables { max-width: 220px; }
.editor-surface { min-height: 260px; max-height: 70vh; overflow: auto; padding: 14px; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: #fff; color: #1c2330; line-height: 1.5; }
.editor-surface:focus { outline: 2px solid var(--primary); outline-offset: -2px; }
.editor-surface img { max-width: 100%; height: auto; }
.editor-surface a { color: #1f5eff; }
.editor-source { width: 100%; min-height: 260px; font-size: 13px; }
.file-button { cursor: pointer; }
.file-button.saving { opacity: .6; pointer-events: none; }
.file-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.file-list li { display: flex; gap: 8px; align-items: center; }
.variable-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.variable-list li { display: grid; }
.variable-list code { font-size: 12px; }
.preview-frame { width: 100%; height: 640px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.preview-text { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); padding: 12px; border-radius: var(--radius); font-size: 13px; }
.inline-form input[type="email"] { flex: 1; min-width: 180px; }

/* ===== Fase 5: campanhas ===== */
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; min-width: 120px; }
.progress span { display: block; height: 100%; width: var(--bar-width, 0%); background: var(--primary); }
.progress-lg { height: 12px; margin: 0 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 2px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; color: var(--text); text-decoration: none; }
.chip.active, .chip:hover { background: var(--primary-soft); border-color: var(--primary); }
.plain { list-style: none; margin: 0; padding: 0; }
select[multiple] { min-height: 120px; }
.grid-4 + .layout-editor, .grid-4 + .progress, .grid-4 + .alert { margin-top: 16px; }

/* ===== Fase 5.5: painel de marketing, agenda, biblioteca ===== */
.section-gap { margin-top: 16px; }
.grow { flex: 1; min-width: 0; }
.capitalize { text-transform: capitalize; }
.text-danger a, a.text-danger { color: var(--danger); }
button.chip { background: var(--surface); cursor: pointer; font: inherit; font-size: 12px; }
.campaign-list li { align-items: center; }
.campaign-list .progress { margin: 6px 0 4px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; }
.check-icon { width: 20px; height: 20px; border-radius: 99px; margin-top: 2px; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 2px solid var(--border); }
.check-ok .check-icon { background: var(--success-soft); border-color: var(--success); }
.check-ok .check-icon::after { content: "✓"; color: var(--success); }
.check-warn .check-icon { background: var(--warning-soft); border-color: var(--warning); }
.check-warn .check-icon::after { content: "!"; color: var(--warning); }
.check-missing .check-icon { background: var(--danger-soft); border-color: var(--danger); }
.check-missing .check-icon::after { content: "×"; color: var(--danger); }
.check-manual .check-icon::after { content: "i"; color: var(--muted); }

.estimate { position: sticky; top: 16px; }
.estimate.loading { opacity: .7; }
.estimate-total { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.estimate-total span:first-child { font-size: 2rem; font-weight: 700; }
.estimate .list li { flex-direction: column; gap: 0; padding: 6px 0; }

.variable-button { display: grid; width: 100%; text-align: left; background: none; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; cursor: pointer; color: inherit; font: inherit; }
.variable-button:hover, .variable-button:focus-visible { background: var(--surface-2); border-color: var(--border); }
.library-dialog { width: min(760px, 94vw); }
.library-grid { display: grid; gap: 8px; max-height: 60vh; overflow: auto; }
.library-grid.images { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.library-item { display: grid; gap: 4px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px; cursor: pointer; color: inherit; font: inherit; }
.library-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.library-item.added { border-color: var(--success); }
.library-item img { width: 100%; height: 96px; object-fit: contain; background: #fff; border-radius: 4px; }
.library-item span { overflow-wrap: anywhere; }

.calendar-card { padding: 0; overflow: hidden; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-head { padding: 8px; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); text-align: center; }
.calendar-day { min-height: 110px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.out { background: var(--surface-2); color: var(--muted); }
.calendar-day.today .calendar-date { background: var(--primary); color: #fff; }
.calendar-date { font-size: .8rem; font-weight: 700; width: 24px; height: 24px; border-radius: 99px; display: grid; place-items: center; }
.calendar-task { display: block; font-size: .75rem; padding: 2px 6px; border-radius: 5px; border-left: 3px solid var(--primary); background: var(--primary-soft); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-task:hover { text-decoration: none; filter: brightness(.97); }
.calendar-time { font-weight: 700; }
.calendar-task.type-call { border-left-color: #1f5eff; }
.calendar-task.type-email { border-left-color: #7c3aed; }
.calendar-task.type-meeting { border-left-color: #0891b2; }
.calendar-task.type-visit { border-left-color: #b45309; }
.calendar-task.type-whatsapp { border-left-color: #15803d; }
.calendar-task.late { background: var(--danger-soft); }
.calendar-task.done { opacity: .6; text-decoration: line-through; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.legend .calendar-task { display: inline-block; }
@media (max-width: 760px) {
  .calendar-day { min-height: 70px; }
  .calendar-task .calendar-time { display: none; }
}
.feedback-form { margin-top: 16px; }
.feedback-form fieldset { display: grid; gap: 6px; }
.grid > .card + .card { margin-top: 0; }
.form > .card + .card { margin-top: 0; }
.estimate h3 { margin-top: 14px; }
.estimate .card-header { align-items: flex-start; }
.field-narrow { max-width: 340px; }
.text-toolbar { border-radius: var(--radius) var(--radius) 0 0; }
.text-toolbar + .text-editor { border-top-left-radius: 0; border-top-right-radius: 0; }
.eyebrow { margin: 0 0 4px; font-size: .85rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 0 16px; }
.tabs .tab { padding: 8px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; color: var(--muted); font-weight: 600; margin-bottom: -1px; }
.tabs .tab:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.tabs .tab.active { color: var(--text); background: var(--surface); border-color: var(--border); }
.tab-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--surface-2); font-size: .75rem; text-align: center; }
.row-actions { justify-content: center; flex-wrap: nowrap; gap: .35rem; }
details.new-list { margin-bottom: 16px; }
details.new-list summary { cursor: pointer; color: var(--primary); }
details.new-list[open] summary { margin-bottom: 12px; }

/* ===== Tema visual (identidade Horus): cores, ícones, tabelas e filtros ===== */
:root {
  --navy: #0d3a73;
  --navy-strong: #0a2d5a;
  --navy-soft: #e7eef8;
  --brand: #2f7bc4;
  --brand-strong: #2566a6;
  --yellow: #f4c21a;
  --yellow-strong: #dcab06;
  --zebra: #f6f8fc;
  --row-hover: #eaf1fb;
  --primary: #2f7bc4;
  --primary-strong: #2566a6;
  --primary-soft: #e6f0fa;
  --sidebar: #0b2447;
  --sidebar-active: #13386a;
  --bg: #f3f6fa;
}
@media (prefers-color-scheme: dark) {
  :root {
    --navy: #1b4f94;
    --navy-strong: #163f78;
    --navy-soft: #16263d;
    --zebra: #18202b;
    --row-hover: #1c2a3d;
    --primary: #5d9de0;
    --primary-strong: #7fb3ea;
    --primary-soft: #182b44;
    --sidebar: #08172d;
    --sidebar-active: #122c51;
  }
}

/* Ícones */
.fa-solid, .fa-regular { line-height: 1; }
.btn .fa-solid, .btn .fa-regular { font-size: .9em; }
.nav-link { justify-content: flex-start; gap: .6rem; }
.nav-link .nav-icon { width: 18px; text-align: center; opacity: .85; }
.nav-link .nav-soon { margin-left: auto; }
h1 .page-icon, h2 .page-icon { color: var(--navy); margin-right: .45rem; }

/* Cabeçalho da página */
.page-header { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1.2rem; box-shadow: var(--shadow); align-items: center; }
.page-header h1 { color: var(--navy); text-transform: uppercase; letter-spacing: .02em; font-size: 1.3rem; margin: 0; }
.page-header .subtitle { font-size: .9rem; margin-top: .2rem; }
@media (prefers-color-scheme: dark) { .page-header h1, h1 .page-icon, h2 .page-icon { color: #9cc3f0; } }

/* Botões */
.btn { border-radius: 6px; box-shadow: 0 1px 1px rgba(16, 24, 40, .06); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn-navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-strong); border-color: var(--navy-strong); color: #fff; }
.btn-warning { background: var(--yellow); border-color: var(--yellow); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.btn-warning:hover { background: var(--yellow-strong); border-color: var(--yellow-strong); color: #fff; }
.btn-success:hover { filter: brightness(.95); }
.btn-icon { width: 34px; height: 30px; padding: 0; }
.btn-icon.btn-sm { width: 32px; height: 28px; }

/* Painel de pesquisa */
.filters.card, .search-panel { border: 1px solid var(--navy); border-left: 5px solid var(--navy); border-radius: 4px; box-shadow: none; padding-top: .6rem; }
.filters.card .filters-title, .search-panel .filters-title { flex-basis: 100%; font-weight: 600; font-size: .9rem; color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: .45rem; margin-bottom: .25rem; }

/* Tabelas */
.table { border: 1px solid var(--border); }
.table thead th { background: var(--navy); color: #fff; border-right: 1px solid rgba(255, 255, 255, .14); border-bottom: 0; text-align: center; font-size: .72rem; letter-spacing: .05em; padding: .7rem .75rem; }
.table thead th:last-child { border-right: 0; }
.table thead tr.table-title th { background: var(--navy-strong); font-size: .75rem; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.table td { border-right: 1px solid var(--border); }
.table td:last-child { border-right: 0; }
.table tbody tr:nth-child(even) { background: var(--zebra); }
.table tbody tr:hover { background: var(--row-hover); }
.table td a:not(.btn) { font-weight: 500; }
.table th.right, .table td.right { text-align: right; }
.table th.center, .table td.center { text-align: center; }
.card.table-wrap { padding: 0; overflow: hidden; }
.card.table-wrap > .table { border: 0; }
.card.table-wrap > .pager, .card.table-wrap > .empty, .card.table-wrap > .filters, .card.table-wrap > p { margin: 0; padding: .75rem 1rem; }
.card.table-wrap > .filters { border-bottom: 1px solid var(--border); }

/* Badges de situação */
.badge { text-transform: uppercase; letter-spacing: .03em; font-size: .68rem; border-radius: 4px; padding: .2rem .5rem; }

/* Card header com ícone */
.card-header h2, .card-header h3 { color: var(--navy); }
@media (prefers-color-scheme: dark) { .card-header h2, .card-header h3 { color: #b9d4f3; } }
.page-header > div:first-child { flex: 1 1 420px; min-width: 0; }
.page-header > .actions { margin-left: auto; }
details.new-list:not([open]) { display: none; }
.table td { vertical-align: middle; }
.grid + .layout-panel, .grid + .card, .layout-panel + .layout-panel { margin-top: 1rem; }
.grid-4 > .stat { border-top: 4px solid var(--navy); }
.grid-4 > .stat:nth-child(2) { border-top-color: var(--brand); }
.grid-4 > .stat:nth-child(3) { border-top-color: var(--success); }
.grid-4 > .stat:nth-child(4) { border-top-color: var(--yellow); }
.stat-value { color: var(--navy); }
@media (prefers-color-scheme: dark) { .stat-value { color: #b9d4f3; } }
.card.table-wrap > :not(table):not(input) { margin: .75rem 1rem; padding: 0; }
.card.table-wrap > .filters { margin: 0; padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.card.table-wrap > .actions select { width: auto; min-width: 240px; }

/* ===== Detalhe da lista ===== */
.list-header { align-items: flex-start; }
.eyebrow-label { margin: 0 0 .25rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: .35rem; }
.list-title { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: 0; }
.list-title .badge { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.meta-line span + span::before { content: "·"; margin: 0 .45rem; color: var(--muted); }
.header-side { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; }
.back-link { font-size: .85rem; display: inline-flex; align-items: center; gap: .35rem; }
details.edit-list:not([open]) { display: none; }
details.edit-list > summary { display: none; }
.archive-form { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.inline-filter { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0 0 .75rem; }
.inline-filter input[type="search"], .inline-filter input[type="text"] { flex: 0 1 300px; min-width: 200px; }
.inline-filter select { flex: 0 0 auto; width: auto; min-width: 180px; }
.members-table td { font-size: .88rem; }
.members-table .contact-cell strong { display: block; }
.stage-badge { display: inline-block; padding: .15rem .55rem; border-radius: 99px; font-size: .72rem; font-weight: 700; color: #fff; background: var(--stage-color, var(--brand)); text-decoration: none; white-space: nowrap; }
.stage-badge:hover { filter: brightness(1.1); text-decoration: none; color: #fff; }
.tag-chips { display: flex; flex-wrap: wrap; gap: .25rem; }
.score { display: inline-block; min-width: 2rem; text-align: center; padding: .1rem .45rem; border-radius: 6px; font-weight: 700; font-size: .8rem; background: var(--zebra); color: var(--muted); }
.score.score-hot { background: var(--yellow); color: #3a2b00; }
.score.score-warm { background: #e3eefa; color: var(--navy); }
.btn-icon.btn-danger:hover { color: var(--danger); }
@media (max-width: 720px) { .header-side { align-items: flex-start; } }

/* ===== Detalhe do contato ===== */
.contact-header { align-items: flex-start; }
.contact-header .list-title .score { font-size: .75rem; }
.info-strip { padding: 1rem 1.25rem; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem 1.25rem; margin: 0 0 1rem; }
.info-grid > div { min-width: 0; }
.info-grid dt, .info-label { font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 .15rem; }
.info-grid dd { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.info-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; border-top: 1px solid var(--border); padding-top: .75rem; }
.info-chips .info-label { flex-basis: 100%; margin: 0; }
.chip-forms { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip-forms .inline-form { display: flex; gap: .3rem; align-items: center; margin: 0; }
.chip-forms select { width: auto; min-width: 180px; font-size: .85rem; padding: .3rem .5rem; }
.list-chip { display: inline-flex; align-items: center; gap: .3rem; border-radius: 99px; padding: .1rem .55rem; font-size: .75rem; font-weight: 600; background: #e3eefa; color: var(--navy); }
.list-chip a { color: inherit; text-decoration: none; }
.list-chip form { display: inline; margin: 0; }
.list-chip button { background: none; border: 0; color: var(--danger); cursor: pointer; padding: 0; font-size: .9rem; line-height: 1; }
.contact-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.contact-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.contact-col > .card { margin: 0; }
.panel-card { border-left: 4px solid var(--navy); }
.panel-title { display: flex; align-items: center; gap: .45rem; font-weight: 600; padding-bottom: .5rem; margin-bottom: .75rem; border-bottom: 1px solid var(--border); }
.panel-title .badge, .panel-title .tab-count { margin-left: auto; }
.stage-picker { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; }
.stage-picker form { margin: 0; }
.stage-option { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid transparent; border-radius: 6px; padding: .3rem .65rem; font-size: .82rem; background: #eaf1fa; color: var(--navy); cursor: pointer; text-decoration: none; font-family: inherit; }
.stage-option:hover { border-color: var(--brand); text-decoration: none; }
.stage-option.current { background: var(--stage-color, var(--navy)); color: #fff; font-weight: 700; cursor: default; }
.compact-list { margin: 0 0 .75rem; }
.campaign-received { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.campaign-received li { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding-bottom: .6rem; border-bottom: 1px solid var(--border); }
.campaign-received li:last-child { border-bottom: 0; padding-bottom: 0; }
.campaign-stats { display: flex; flex-wrap: wrap; gap: .3rem; align-items: flex-start; }
.stat-chip { font-size: .72rem; font-weight: 600; border-radius: 4px; padding: .05rem .4rem; }
.stat-open { background: var(--success-soft); color: var(--success); }
.stat-click { background: #e3eefa; color: var(--brand); }
.stat-reply { background: #f1e8fb; color: #7a3fb5; }
.feed { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 1rem; }
.feed li { position: relative; }
.feed li::before { content: ""; position: absolute; left: calc(-1.1rem - 6px); top: .3rem; width: 10px; height: 10px; border-radius: 99px; background: var(--muted); box-shadow: 0 0 0 3px var(--surface, #fff); }
.feed li.dot-info::before { background: var(--brand); }
.feed li.dot-success::before { background: var(--success); }
.feed li.dot-stage::before { background: #8e44ad; }
.feed li.dot-reply::before { background: #7a3fb5; }
.feed li.dot-danger::before { background: var(--danger); }
.feed li.dot-muted::before { background: #b7c0cc; }
.feed-head { display: flex; justify-content: space-between; gap: .5rem; }
.feed-kind { font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.feed-date { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.feed-text { font-size: .9rem; }
.feed-body { font-size: .85rem; color: var(--muted); white-space: pre-line; margin-top: .2rem; }
.feed-message { margin-top: .4rem; border-left: 3px solid var(--brand); background: var(--zebra); border-radius: 4px; }
.feed-message-title { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: .35rem .6rem; border-bottom: 1px solid var(--border); }
.feed-message-body { padding: .5rem .6rem; font-size: .88rem; white-space: pre-line; }
.feed-meta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .25rem; font-size: .78rem; color: var(--muted); }
.feed-meta a { color: var(--muted); }
@media (max-width: 1100px) { .contact-columns { grid-template-columns: 1fr 1fr; } .contact-columns > .contact-col:last-child { grid-column: 1 / -1; } }
@media (max-width: 720px) { .contact-columns { grid-template-columns: 1fr; } }

/* ===== Formulário único do lead ===== */
.lead-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .6rem 1rem; }
.lead-grid > .field { margin: 0; min-width: 0; }
.lead-grid .span-1 { grid-column: span 1; } .lead-grid .span-2 { grid-column: span 2; } .lead-grid .span-3 { grid-column: span 3; }
.lead-grid .span-4 { grid-column: span 4; } .lead-grid .span-5 { grid-column: span 5; } .lead-grid .span-8 { grid-column: span 8; }
.lead-grid label { font-size: .78rem; font-weight: 600; }
.lead-form .form-actions.center { justify-content: center; margin-top: 1rem; }
.lead-org-link { margin-left: auto; font-weight: 400; }
input.uppercase { text-transform: uppercase; }
@media (max-width: 1100px) { .lead-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .lead-grid .span-5, .lead-grid .span-8 { grid-column: span 6; } .lead-grid .span-4 { grid-column: span 3; } .lead-grid .span-1 { grid-column: span 2; } }
@media (max-width: 720px) { .lead-grid { grid-template-columns: 1fr 1fr; } .lead-grid > .field { grid-column: span 2; } .lead-grid .span-1, .lead-grid .span-2 { grid-column: span 1; } }

/* ===== Configurar funis ===== */
.pipeline-card.is-archived { opacity: .75; border-left-color: var(--muted); }
.pipeline-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.pipeline-head .actions form { margin: 0; }
.pipeline-name { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0 0 .2rem; font-size: 1.1rem; }
.stage-flow { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .9rem; }
.stage-flow .stage-badge { position: relative; padding-right: .9rem; }
.stages-table .row-actions { justify-content: center; flex-wrap: nowrap; display: flex; gap: .3rem; }
.stages-table th:first-child, .stages-table td:first-child { width: 110px; }
.stages-table .row-actions form { margin: 0; }
.archived-stages { margin: .6rem 0 0; }
.field-color input[type=color] { width: 64px; height: 38px; padding: 2px; }
dialog h2 { font-size: 1.05rem; display: flex; align-items: center; gap: .45rem; margin: 0 0 1rem; }
dialog .form-actions { justify-content: flex-end; }

/* ===== Contas de envio ===== */
.account-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1rem; }
.account-list > .card { margin: 0; }
.account-grid { grid-template-columns: minmax(200px, 1.5fr) repeat(4, minmax(0, 1fr)) minmax(230px, 1.4fr); margin: 0; padding-top: .75rem; border-top: 1px solid var(--border); }
.account-error { margin: .75rem 0 0; }
.pipeline-name .fa-envelope { color: var(--brand); }
@media (max-width: 1100px) { .account-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }

/* ===== Rodapé da política dentro do editor ===== */
.html-editor.with-footer .editor-surface { border-radius: 0; border-bottom: 0; }
.editor-footer-preview { border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: #fff; padding: 0 14px 10px; color: #6b7280; }
.editor-footer-content { border-top: 1px solid #e5e7eb; padding-top: 12px; text-align: center; font-size: 12px; line-height: 1.6; }
.editor-footer-content p { margin: 0 0 2px; }
.editor-footer-content a { color: #6b7280; pointer-events: none; text-decoration: none; }
.editor-footer-note { margin-top: 10px; font-size: .72rem; color: var(--muted); text-align: right; }
.editor-footer-note a { color: var(--brand); }
.editor-surface:not([hidden]) ~ .editor-footer-preview { margin-top: -6px; }
.editor-source:not([hidden]) ~ .editor-footer-preview { border-top: 1px solid var(--border); border-radius: var(--radius); }

/* ===== Formulário de campanha ===== */
.campaign-form > .card { margin-bottom: 1rem; }
.audience-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.5rem; align-items: start; }
.audience-col { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.audience-label { font-size: .8rem; font-weight: 600; }
.audience-sublabel { font-size: .75rem; color: var(--muted); margin-top: .35rem; }
.check-box-list { border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem .75rem; max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: .2rem; background: var(--surface); }
.check-box-list .check, .inline-checks .check { font-size: .85rem; font-weight: 400; margin: 0; display: inline-flex; align-items: center; gap: .3rem; }
.inline-checks { display: flex; flex-wrap: wrap; gap: .2rem .8rem; }
.uf-checks { gap: .2rem .6rem; }
.uf-checks .check { min-width: 3.1rem; }
.population-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .35rem; }
.population-row .field { margin: 0; }
.population-row label { font-size: .75rem; color: var(--muted); font-weight: 400; }
.population-bands { display: flex; flex-wrap: wrap; gap: .1rem .5rem; align-items: center; }
.band-button { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font: inherit; }
.band-button + .band-button::before { content: "·"; color: var(--muted); margin-right: .5rem; }
.band-button:hover { text-decoration: underline; }
.meso-panel { margin-top: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--zebra); padding: .9rem 1rem; }
.meso-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.meso-head p { margin: .25rem 0 .5rem; }
.meso-empty { background: rgba(47, 123, 196, .08); color: var(--navy); border-radius: 6px; padding: .6rem .8rem; }
.meso-group { border: 0; margin: .4rem 0 0; padding: 0; }
.meso-group legend { font-size: .75rem; font-weight: 700; color: var(--navy); padding: 0; margin-bottom: .2rem; }
.audience-note { margin: .75rem 0; }
.send-preview { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.send-preview.loading { opacity: .7; }
.send-preview-head { display: flex; align-items: center; gap: 1.25rem; padding: 1rem 1.25rem; background: var(--zebra); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.send-preview-head > div:first-child { flex: 1 1 320px; }
.send-preview-head h2 { margin: .15rem 0; font-size: 1.15rem; }
.send-preview-head p { margin: 0; }
.send-preview-eyebrow { color: var(--success); margin: 0; }
.send-preview-total { display: flex; flex-direction: column; align-items: center; padding: 0 1.25rem; border-left: 1px solid var(--border); min-width: 130px; }
.send-preview-total strong { font-size: 1.8rem; color: var(--navy); line-height: 1.1; }
.send-preview-counts { display: flex; flex-wrap: wrap; gap: .3rem 1.25rem; padding: .6rem 1.25rem; border-bottom: 1px solid var(--border); color: var(--muted); }
.send-preview-counts strong { color: var(--text); }
.send-preview-body { max-height: 420px; overflow: auto; }
.send-preview-body .table-wrap { margin: 0; }
.send-preview-empty { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1.75rem 1rem; color: var(--muted); }
.send-preview-empty .fa-filter { font-size: 1.3rem; color: var(--muted); }
.send-preview-more { padding: .5rem 1rem; margin: 0; }
.field-check { justify-content: flex-end; padding-bottom: .55rem; }
.campaign-actions { padding: .5rem 0 1.5rem; justify-content: center; }
.lead-grid .span-6 { grid-column: span 6; }
@media (max-width: 1100px) { .audience-grid { grid-template-columns: 1fr 1fr; } .audience-col:last-child { grid-column: 1 / -1; } }
@media (max-width: 720px) { .audience-grid { grid-template-columns: 1fr; } .send-preview-total { border-left: 0; padding: 0; } }

/* ===== Relatórios ===== */
.report-period { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0; }
.report-period label { font-size: .85rem; color: var(--muted); }
.report-period input[type=date] { width: auto; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; margin-bottom: 1rem; }
.report-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.report-col > .card { margin: 0; }
.report-table td, .report-table th { white-space: nowrap; }
.report-table td:first-child { white-space: normal; }
.report-table .bar-col { width: 38%; }
.report-table .progress { min-width: 80px; }
.report-table .progress span { background: var(--bar-color, var(--brand)); }
.report-table .progress.bar-ok span { background: #26c281; }
.report-table .progress.bar-bad span { background: var(--danger); }
.report-table .progress.bar-muted span { background: #b7c0cc; }
.report-table tfoot td { font-weight: 700; border-top: 2px solid var(--border); }
.report-foot { margin: .6rem 0 0; }
@media (max-width: 1100px) { .report-grid { grid-template-columns: 1fr; } }
.report-table td.text-danger { font-size: inherit; font-weight: 600; }

/* ===== Primeiros passos (onboarding) ===== */
.onboarding-hero { padding: 1.25rem 1.5rem; }
.onboarding-hero-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.1rem; }
.onboarding-hero-head h1 { margin: 0 0 .2rem; font-size: 1.45rem; text-transform: none; letter-spacing: 0; }
.onboarding-hero-head .subtitle { margin: 0; }
.onboarding-avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; color: #fff; background: linear-gradient(135deg, var(--brand), #7c4dff); box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(47, 123, 196, .35); }
.onboarding-progress-label { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: .35rem; }
.onboarding-progress-label span { color: var(--muted); }
.onboarding-progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.onboarding-progress span { display: block; height: 100%; width: var(--bar-width, 0%); background: linear-gradient(90deg, #1f6fff, #7c4dff); transition: width .4s; }
.onboarding-done, .onboarding-next { display: flex; align-items: center; gap: .85rem; border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0; flex-wrap: wrap; }
.onboarding-done { background: var(--success-soft); border: 1px solid rgba(21, 128, 61, .3); }
.onboarding-done > i { color: var(--success); font-size: 1.4rem; }
.onboarding-next { background: rgba(47, 123, 196, .08); border: 1px solid rgba(47, 123, 196, .3); }
.onboarding-next > i { color: var(--brand); font-size: 1.2rem; }
.onboarding-done > div, .onboarding-next > div { flex: 1 1 320px; }
.onboarding-done strong { color: var(--success); }
.onboarding-steps { list-style: none; margin: 0 0 1.5rem; padding: 0; position: relative; }
.onboarding-step { position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 1rem; padding-bottom: 1rem; }
.onboarding-step:not(:last-child)::before { content: ""; position: absolute; left: 18px; top: 38px; bottom: 0; width: 2px; background: var(--border); }
.onboarding-step.is-done:not(:last-child)::before { background: rgba(21, 128, 61, .35); }
.onboarding-marker { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface); border: 2px solid var(--border); color: var(--muted); z-index: 1; }
.onboarding-step.is-done .onboarding-marker { background: var(--success); border-color: var(--success); color: #fff; }
.onboarding-step.is-attention .onboarding-marker { border-color: var(--warning); color: var(--warning); }
.onboarding-step.is-next .onboarding-marker { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px rgba(47, 123, 196, .15); }
.onboarding-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; height: 100%; }
.onboarding-step.is-next .onboarding-card { border-color: rgba(47, 123, 196, .55); box-shadow: 0 4px 14px rgba(13, 58, 115, .08); }
.onboarding-card h3 { margin: 0 0 .25rem; font-size: 1rem; display: flex; align-items: center; gap: .5rem; }
.onboarding-card h3 i { color: var(--brand); }
.onboarding-card > p.muted { margin: 0 0 .6rem; font-size: .9rem; }
.onboarding-status { margin: 0 0 .5rem; font-size: .88rem; font-weight: 600; color: var(--muted); display: flex; gap: .4rem; align-items: baseline; }
.is-done .onboarding-status { color: var(--success); }
.is-attention .onboarding-status { color: var(--warning); }
.onboarding-guidance { margin: 0 0 .75rem; font-size: .85rem; }
.onboarding-guidance summary { cursor: pointer; color: var(--muted); }
.onboarding-guidance ul { margin: .5rem 0 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .25rem; }
.onboarding-section { font-size: 1.05rem; margin: 1.5rem 0 .75rem; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.onboarding-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.onboarding-step-flat.is-done .onboarding-card { border-left: 4px solid var(--success); }
.onboarding-step-flat.is-pending .onboarding-card, .onboarding-step-flat.is-attention .onboarding-card { border-left: 4px solid var(--warning); }
.onboarding-step-flat.is-manual .onboarding-card { border-left: 4px solid var(--brand); }
.onboarding-tech ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.onboarding-tech li { display: flex; align-items: flex-start; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.onboarding-tech li:last-child { border-bottom: 0; }
.onboarding-tech li > div { flex: 1; }
.onboarding-tech-icon { margin-top: .2rem; color: var(--muted); }
.onboarding-tech .is-done .onboarding-tech-icon { color: var(--success); }
.onboarding-tech .is-attention .onboarding-tech-icon { color: var(--warning); }
.onboarding-tech .is-pending .onboarding-tech-icon { color: var(--danger); }
.onboarding-banner { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.25rem; margin-bottom: 1rem; border-radius: var(--radius); border: 1px solid rgba(47, 123, 196, .35); background: linear-gradient(90deg, rgba(47, 123, 196, .09), rgba(124, 77, 255, .07)); }
.onboarding-banner-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: .3rem; }
.onboarding-banner-text strong i { color: var(--brand); }
.onboarding-banner .progress span { background: linear-gradient(90deg, #1f6fff, #7c4dff); }
