:root {
    --bg: #f5f4f0;
    --surface: #ffffff;
    --sidebar-bg: #fbfaf7;
    --border: #eceae4;
    --text: #2b2b2b;
    --text-muted: #8a887f;
    /* Paleta da marca MinhaCirurgia */
    --primary: #221C59;        /* azul-marinho */
    --primary-soft: #ecebf4;
    --accent-orange: #EC8A2E;  /* laranja */
    --accent-purple: #8E2C6E;  /* roxo/magenta */
    --accent-navy: #221C59;    /* azul-marinho */
    --danger: #c0492f;
    --radius: 14px;
    --shadow: 0 1px 3px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.03);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}

/* ---------- Shell ---------- */
.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 248px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 18px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px 16px;
}
.brand img { max-width: 168px; height: auto; display: block; }

.earnings-badge {
    background: #fff7e0;
    border: 1px solid #f0e2b6;
    color: #8a6d1a;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12.5px;
    margin-bottom: 14px;
}
.earnings-badge strong { display: block; font-size: 15px; color: #6b5310; }

.nav { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 11px; border-radius: 10px;
    color: var(--text); text-decoration: none;
    font-size: 13.5px;
}
.nav a:hover { background: #f0eee8; }
.nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav a .ico { width: 18px; text-align: center; opacity: .85; }
.nav a .badge-count {
    margin-left: auto; background: #eceae4; color: var(--text-muted);
    border-radius: 20px; font-size: 11px; padding: 1px 8px;
}
.nav-sep { height: 1px; background: var(--border); margin: 10px 4px; }

/* Submenu (Recompensas) */
.nav-details > summary { list-style: none; display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; font-size: 13.5px; cursor: pointer; color: var(--text); }
.nav-details > summary::-webkit-details-marker { display: none; }
.nav-details > summary:hover { background: #f0eee8; }
.nav-details > summary.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-caret { margin-left: auto; font-size: 10px; opacity: .6; transition: transform .15s; }
.nav-details[open] .nav-caret { transform: rotate(180deg); }
.subnav { list-style: none; padding: 2px 0 4px 26px; margin: 0; display: flex; flex-direction: column; gap: 1px; border-left: 2px solid var(--border); margin-left: 18px; }
.subnav a { display: block; padding: 7px 10px; border-radius: 8px; font-size: 12.5px; color: var(--text-muted); text-decoration: none; }
.subnav a:hover { background: #f0eee8; color: var(--text); }
.subnav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* ---------- Main ---------- */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
    height: 60px; background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 16px;
    padding: 0 24px;
    position: sticky; top: 0; z-index: 5;
}
.topbar .ticker { color: var(--text-muted); font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; }
.topbar .user { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.topbar .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-orange); color: #fff; display: grid; place-items: center; }

.content { padding: 26px 28px; max-width: 1240px; width: 100%; }
.page-title { font-size: 24px; font-weight: 700; margin: 0 0 2px; }
.page-sub { color: var(--text-muted); margin: 0 0 20px; }

/* Botões */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 9px; font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.12); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: #f4f2ec; }

/* Cabeçalho de página com ação */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head .page-title, .page-head .page-sub { margin: 0; }
.page-head .page-sub { margin-top: 2px; }
.btn.sm { padding: 5px 12px; font-size: 12.5px; }
.toast-ok { background: #e7f4ec; color: #2e8b57; border: 1px solid #bfe3cd; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 13.5px; }

/* Tabela genérica */
table.table { width: 100%; border-collapse: collapse; }
table.table th, table.table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
table.table th { color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .02em; }
table.table td.num, table.table th.num { text-align: right; }
table.table .sub { color: var(--text-muted); font-size: 11.5px; }
table.table tr:last-child td { border-bottom: none; }
.empty { color: var(--text-muted); text-align: center; padding: 30px 0; }

/* ================= Wizard de campanha ================= */
.wizard-body { background: var(--bg); min-height: 100vh; margin: 0; }
.wizard-header { background: var(--primary); color: #fff; padding: 14px 26px; display: flex; align-items: center; justify-content: space-between; }
.wz-brand { font-weight: 700; font-size: 18px; }
.wz-camp { font-size: 12.5px; opacity: .8; margin-top: 2px; }
.btn-light { background: #fff; color: var(--primary); border: none; }
.btn-light:hover { background: #f0f0f5; }

/* Dropdown "Voltar para o painel" (wizard) */
.wz-exit { position: relative; }
.wz-exit > summary { list-style: none; cursor: pointer; }
.wz-exit > summary::-webkit-details-marker { display: none; }
.wz-exit-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.18); min-width: 170px; overflow: hidden; }
.wz-exit-menu button, .wz-exit-menu a { display: block; width: 100%; text-align: left; padding: 12px 16px; background: none; border: none; font-size: 13.5px; font-family: inherit; color: var(--text); cursor: pointer; text-decoration: none; }
.wz-exit-menu button:hover, .wz-exit-menu a:hover { background: #f4f2ec; }

.wizard-main { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; max-width: 1120px; margin: 26px auto; padding: 0 20px; align-items: start; }
@media (max-width: 880px) { .wizard-main { grid-template-columns: 1fr; } }

.wizard-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 30px; }
.wz-step-label { color: var(--text-muted); font-size: 13px; }
.wz-h1 { font-size: 24px; font-weight: 700; margin: 2px 0 6px; }
.wz-sub { color: var(--text-muted); font-size: 13px; margin: 0 0 12px; max-width: 640px; line-height: 1.5; }
.wz-label { display: block; font-weight: 700; font-size: 13.5px; margin: 20px 0 8px; }
.wz-input { width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px; font-size: 14px; font-family: inherit; color: var(--text); background: #fff; }
.wz-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* Objetivo (cards) */
.obj-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .obj-grid { grid-template-columns: 1fr; } }
.obj-card { position: relative; border: 1.5px solid var(--border); border-radius: 14px; padding: 22px 18px; text-align: center; cursor: pointer; display: block; transition: .15s; }
.obj-card:hover { border-color: #c9c6be; }
.obj-card input { position: absolute; opacity: 0; }
.obj-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.obj-check { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; display: none; place-items: center; font-size: 12px; }
.obj-card:has(input:checked) .obj-check { display: grid; }
.obj-ico { color: var(--primary); line-height: 0; }
.obj-ttl { font-weight: 700; font-size: 15px; margin: 8px 0 6px; }
.obj-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* Abordagens (linhas de rádio) */
.appr-list { display: flex; flex-direction: column; gap: 8px; }
.appr-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: #f3f2ee; color: var(--text); font-size: 13.5px; cursor: pointer; }
.appr-row input { position: absolute; opacity: 0; }
.appr-mark { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #b9b6ad; flex-shrink: 0; }
.appr-row:has(input:checked) { background: var(--accent-orange); color: #fff; }
.appr-row:has(input:checked) .appr-mark { border-color: #fff; background: #fff; }

/* Configurações avançadas */
.adv { margin-top: 20px; border: 1px solid var(--border); border-radius: 10px; padding: 0 14px; }
.adv summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 13.5px; }
.adv[open] { padding-bottom: 14px; }

.wz-actions { display: flex; justify-content: flex-end; margin-top: 24px; }
.wz-note { font-size: 11.5px; color: var(--text-muted); margin-top: 18px; background: #faf9f6; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.soon-tag { font-size: 10px; font-weight: 600; color: #7a5cc0; background: #f1eef8; border-radius: 20px; padding: 1px 7px; vertical-align: middle; }

/* Recompensas: tabs de tipo */
.rw-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.rw-tab { flex: 1; min-width: 140px; position: relative; text-align: center; padding: 14px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--text-muted); }
.rw-tab:hover { border-color: #c9c6be; }
.rw-tab input { position: absolute; opacity: 0; }
.rw-tab:has(input:checked) { background: var(--accent-orange); border-color: var(--accent-orange); color: #fff; }

.rw-fields { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .rw-fields { grid-template-columns: 1fr; } }

.rw-toggles { display: flex; flex-direction: column; gap: 12px; }
.rw-toggle { display: flex; align-items: center; gap: 12px; font-size: 13.5px; }

/* Recompensas: cards de resgate */
.rg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.rg-card { position: relative; border: 1.5px solid var(--border); border-radius: 14px; padding: 18px 16px; text-align: center; cursor: pointer; }
.rg-card:hover { border-color: #c9c6be; }
.rg-card input { position: absolute; opacity: 0; }
.rg-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.rg-ico { color: var(--primary); line-height: 0; }
.rg-ttl { font-weight: 600; font-size: 13.5px; margin: 8px 0 5px; }
.rg-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }

/* Comunicação */
.ai-box { border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 8px; background: #faf9f6; }
.ai-title { font-weight: 700; font-size: 14px; color: var(--primary); }
.ai-summary { margin-top: 10px; font-size: 12px; color: #2e8b57; background: #e7f4ec; border: 1px solid #bfe3cd; border-radius: 8px; padding: 8px 10px; }
.comm-section-title { font-size: 16px; font-weight: 700; margin: 26px 0 4px; padding-bottom: 8px; border-bottom: 2px solid var(--accent-orange); display: inline-block; }
.comm-channel { border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.comm-channel-head { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.comm-channel.muted-channel { opacity: .7; }
.vars-hint { font-size: 11px; color: var(--text-muted); margin-top: 8px; }
.vars-hint code { background: #f1eff0; border-radius: 4px; padding: 1px 5px; font-size: 10.5px; color: var(--primary); }
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif-card { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; }
.notif-ico { color: var(--primary); line-height: 0; flex-shrink: 0; }
.notif-body { flex: 1; }
.notif-ttl { font-weight: 600; font-size: 13.5px; }
.notif-desc { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* Formulário de indicação (etapa 4) */
.form-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 18px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.form-tab { font-size: 12.5px; padding: 8px 12px; border-radius: 8px; background: #f1efe9; color: var(--text-muted); }
.form-tab.on { background: var(--primary); color: #fff; font-weight: 600; }
.form-cfg-grid { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
@media (max-width: 780px) { .form-cfg-grid { grid-template-columns: 1fr; } }
.field-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 2px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.field-row:last-child { border-bottom: none; }
.field-row.fixed { color: var(--text-muted); }
.req { font-size: 10.5px; font-weight: 600; color: #a9791b; background: #fbeecd; border-radius: 20px; padding: 1px 8px; }

/* Prévia do formulário */
.form-preview { position: sticky; top: 12px; }
.preview-label { text-align: center; font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.preview-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px 18px; box-shadow: var(--shadow); }
.preview-title { font-weight: 700; font-size: 16px; text-align: center; }
.preview-subtitle { font-size: 11.5px; color: var(--text-muted); text-align: center; margin: 6px 0 16px; line-height: 1.4; }
.preview-field { margin-bottom: 14px; }
.preview-field label { display: block; font-size: 11.5px; color: var(--text-muted); margin-bottom: 4px; }
.pf-input { display: block; height: 30px; border-bottom: 1.5px solid var(--border); font-size: 12px; color: var(--text-muted); line-height: 30px; }
.preview-terms { font-size: 10px; color: var(--text-muted); text-align: center; margin: 8px 0 12px; }
.preview-button { background: var(--primary); color: #fff; text-align: center; padding: 11px; border-radius: 10px; font-weight: 600; font-size: 13.5px; }

/* Publicação de páginas (etapa 5) */
.pub-card { border: 1px solid var(--border); border-radius: 14px; padding: 4px 18px; margin-bottom: 14px; background: var(--surface); box-shadow: var(--shadow); }
.pub-card > summary { cursor: pointer; padding: 14px 0; font-weight: 700; font-size: 15px; }
.pub-card[open] { padding-bottom: 16px; }
.pub-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .pub-options { grid-template-columns: 1fr; } }
.pub-opt { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-size: 13.5px; }
.pub-opt small { color: var(--text-muted); font-size: 11.5px; }
.pub-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.pub-detail { display: none; margin-top: 14px; }
.pub-card:has(input[value="Builder"]:checked) .pub-builder { display: block; }
.pub-card:has(input[value="Embed"]:checked) .pub-embed { display: block; }
.url-box { background: #f4f2ec; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; color: var(--primary); word-break: break-all; }
.wz-input.code { font-family: monospace; font-size: 11.5px; }

/* Publicação — cards de método */
.method-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; }
@media (max-width: 600px) { .method-cards { grid-template-columns: 1fr; } }
.method-card { position: relative; border: 1.5px solid var(--border); border-radius: 14px; padding: 18px 16px; text-align: center; cursor: pointer; display: block; }
.method-card:hover { border-color: #c9c6be; }
.method-card input { position: absolute; opacity: 0; }
.method-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.mc-check { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; display: none; place-items: center; font-size: 12px; }
.method-card:has(input:checked) .mc-check { display: grid; }
.mc-ico { color: var(--primary); line-height: 0; display: flex; justify-content: center; }
.mc-ttl { font-weight: 700; font-size: 14px; margin: 10px 0 6px; }
.mc-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }

/* Publicação — blocos numerados */
.pub-block { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 16px; }
.pub-block-num { font-weight: 700; font-size: 14px; color: var(--primary); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.pub-block-num .num { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--primary); display: inline-grid; place-items: center; font-size: 12px; }
.domain-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.dtab { font-size: 12px; padding: 7px 12px; border-radius: 8px; background: #f1efe9; color: var(--text-muted); }
.dtab.on { background: var(--accent-orange); color: #fff; font-weight: 600; }
.slug-input { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.slug-prefix { background: #f4f2ec; color: var(--text-muted); font-size: 12.5px; padding: 0 10px; white-space: nowrap; border-right: 1px solid var(--border); display: flex; align-items: center; }
.slug-input input { border: none; border-radius: 0; flex: 1; min-width: 80px; }
.slug-input input:focus { box-shadow: none; outline: none; }
.warn-box { background: #fdf6e3; border: 1px solid #f0e2b6; color: #7a5f14; border-radius: 8px; padding: 10px 12px; font-size: 11.5px; margin-top: 10px; }
.upload-box { border: 1.5px dashed var(--border); border-radius: 9px; padding: 14px; text-align: center; color: var(--text-muted); font-size: 12.5px; }

/* Publicação — prévia social */
.social-preview { display: flex; gap: 12px; border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: #f4f7f4; margin-top: 6px; }
.sp-img { width: 64px; height: 64px; border-radius: 8px; background: linear-gradient(135deg, var(--accent-orange), var(--accent-purple)); flex-shrink: 0; }
.sp-body { min-width: 0; }
.sp-title { font-weight: 700; font-size: 13.5px; }
.sp-desc { font-size: 12px; color: var(--text-muted); margin: 3px 0 6px; }
.sp-url { font-size: 11px; color: var(--primary); word-break: break-all; }

/* Stepper (direita) */
.wizard-steps { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 20px; display: flex; flex-direction: column; gap: 16px; }
.wz-step { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-muted); text-decoration: none; }
.wz-step .wz-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #d3cfc4; flex-shrink: 0; }
.wz-step.on { color: var(--primary); font-weight: 700; }
.wz-step.on .wz-dot { border-color: var(--primary); background: var(--primary); }
.wz-step.disabled { opacity: .55; }

/* Abas de filtro (lista de campanhas) */
.filter-tabs-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; margin-bottom: 16px; }
.ft-label { color: var(--text-muted); font-weight: 600; font-size: 13px; margin-right: 6px; }
.ft { padding: 6px 14px; border-radius: 8px; font-size: 13px; text-decoration: none; color: var(--text-muted); }
.ft:hover { background: #f0eee8; }
.ft.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* Cards de campanha */
.camp-list { display: flex; flex-direction: column; gap: 14px; }
.camp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.camp-main { display: grid; grid-template-columns: auto 2fr 1.4fr 1.3fr auto; align-items: center; gap: 18px; padding: 16px 18px; }
.camp-toggle-form { margin: 0; }
.camp-name { font-weight: 700; font-size: 15px; }
.camp-desc { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.camp-id { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.camp-type { font-size: 12.5px; color: var(--accent-orange); }
.camp-reward { font-size: 12.5px; color: var(--text); }
.camp-actions { display: flex; align-items: center; gap: 6px; }
.kebab { position: relative; }
.kebab > summary { list-style: none; cursor: pointer; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-size: 17px; color: var(--text-muted); border: 1px solid var(--border); background: #fff; }
.kebab > summary::-webkit-details-marker { display: none; }
.kebab > summary:hover { background: #f4f2ec; }
.kebab[open] > summary { background: var(--primary-soft); color: var(--primary); }
.kebab-menu { position: absolute; right: 0; top: 34px; z-index: 20; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); min-width: 130px; overflow: hidden; }
.kebab-menu form { margin: 0; }
.kebab-menu button { display: block; width: 100%; text-align: left; padding: 10px 14px; background: none; border: none; font-size: 13px; font-family: inherit; color: var(--text); cursor: pointer; }
.kebab-menu button:hover { background: #f4f2ec; }
.kebab-menu button.danger { color: var(--danger); }

.camp-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; background: #faf9f6; border-top: 1px solid var(--border); }
.camp-pages { display: flex; gap: 28px; flex-wrap: wrap; }
.cp { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }
.cp b { color: var(--accent-orange); font-weight: 600; }
@media (max-width: 860px) {
    .camp-main { grid-template-columns: auto 1fr; row-gap: 8px; }
    .camp-type, .camp-reward, .camp-actions { grid-column: 2; }
}

/* Indicações — pills de período e filtros */
.per-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.per-pill { padding: 6px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; text-decoration: none; color: var(--text-muted); background: #fff; }
.per-pill:hover { background: #f0eee8; }
.per-pill.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.per-pill.clear { border-style: dashed; }
.all-filters { position: relative; }
.all-filters > summary { list-style: none; cursor: pointer; }
.all-filters > summary::-webkit-details-marker { display: none; }
.all-filters-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 25; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.15); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 260px; }

/* Indicações — lista */
.ref-list { padding: 6px 0; overflow: visible; }
.ref-row { display: grid; grid-template-columns: 28px 100px 1.2fr 1.1fr 1.5fr 130px 40px; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.ref-row:last-child { border-bottom: none; }
.ref-row.ref-head { font-size: 12px; font-weight: 700; color: var(--text-muted); padding: 10px 18px; }
.ref-dot { font-size: 14px; }
.ref-date { font-size: 13px; font-weight: 600; }
.ref-strong { font-size: 13px; font-weight: 600; }
.ref-lead { font-size: 12.5px; font-weight: 700; }
.ref-sub { font-size: 11.5px; color: var(--text-muted); }
.ref-source { display: inline-block; margin-top: 4px; font-size: 10.5px; color: var(--accent-orange); font-weight: 600; }
.ref-menu { min-width: 240px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ref-menu label { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.ref-menu select, .ref-menu input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-family: inherit; }
@media (max-width: 900px) { .ref-row { grid-template-columns: 24px 1fr 1fr 36px; } .ref-row > :nth-child(3), .ref-row > :nth-child(4) { display: none; } }

/* Conversões — lista */
.conv-row { display: grid; grid-template-columns: 90px 150px 1fr 1.5fr 1fr 70px 100px 40px; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.conv-row:last-child { border-bottom: none; }
.conv-row.ref-head { font-size: 12px; font-weight: 700; color: var(--text-muted); padding: 10px 18px; }
.conv-code { font-size: 12.5px; font-weight: 700; letter-spacing: .5px; color: var(--text-muted); }
.conv-reward { color: var(--accent-orange); font-weight: 700; }
.conv-deal { font-size: 12px; font-style: italic; color: var(--primary); margin-top: 4px; }
@media (max-width: 1000px) { .conv-row { grid-template-columns: 1fr 1.5fr 100px 36px; } .conv-row > :nth-child(1), .conv-row > :nth-child(2), .conv-row > :nth-child(3), .conv-row > :nth-child(6) { display: none; } }

/* Embaixadores — lista */
.amb-row { display: grid; grid-template-columns: 90px 1.3fr 1.3fr 70px 100px 44px 36px; gap: 12px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.amb-row:last-child { border-bottom: none; }
.amb-row.ref-head { font-size: 12px; font-weight: 700; color: var(--text-muted); padding: 10px 18px; }
.amb-count { text-align: center; font-size: 15px; font-weight: 700; }
.amb-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chip { display: inline-block; border-radius: 20px; font-size: 10.5px; font-weight: 600; padding: 3px 10px; border: 1px solid var(--border); }
.chip-ok { background: #e7f4ec; color: #247a46; border-color: #bfe3cd; }
.chip-no { background: #f9f0f0; color: #8f3434; border-color: #ecd1d1; }
.link-btn { width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--primary); color: #fff; font-size: 15px; cursor: pointer; display: grid; place-items: center; }
.link-btn:hover { filter: brightness(1.15); }
.link-btn.copied { background: #2e9e5b; }
@media (max-width: 900px) { .amb-row { grid-template-columns: 80px 1fr 44px 36px; } .amb-row > :nth-child(3), .amb-row > :nth-child(4), .amb-row > :nth-child(5) { display: none; } }

/* Importação de participantes */
.imp-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
@media (max-width: 640px) { .imp-methods { grid-template-columns: 1fr; } }
.imp-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px; padding: 18px 14px; text-align: center; cursor: pointer; font-family: inherit; }
.imp-card:hover { border-color: #c9c6be; }
.imp-card.on { border-color: var(--primary); background: var(--primary-soft); }
.imp-ico { font-size: 24px; }
.imp-ttl { font-weight: 700; font-size: 14.5px; margin: 8px 0 4px; }
.imp-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }
.imp-panel h3 { margin: 0 0 10px; font-size: 16px; }
.imp-hint { background: #eef4fb; border: 1px solid #d4e3f5; color: #3a5c86; border-radius: 8px; padding: 9px 12px; font-size: 12px; margin-bottom: 14px; }
.imp-hint a { color: var(--primary); font-weight: 600; }
.imp-row { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr 42px; gap: 10px; margin-bottom: 10px; }
.imp-row input { padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; font-size: 13.5px; font-family: inherit; }
.imp-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.imp-add { border: 1.5px solid var(--primary); background: #fff; color: var(--primary); border-radius: 9px; font-size: 17px; cursor: pointer; }
.imp-add:hover { background: var(--primary-soft); }

/* Integrações */
.api-code { background: #1d1b2e; color: #e8e6f0; border-radius: 10px; padding: 14px 16px; font-size: 12.5px; overflow-x: auto; font-family: Consolas, 'Courier New', monospace; margin-top: 10px; line-height: 1.6; }
.int-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .int-cards { grid-template-columns: 1fr; } }
.int-card-head { font-weight: 700; font-size: 14.5px; background: var(--primary); color: #fff; margin: -18px -18px 14px; padding: 12px 18px; border-radius: var(--radius) var(--radius) 0 0; }
.int-value-row { display: flex; gap: 8px; }
.int-value-row input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; font-family: Consolas, monospace; font-size: 12.5px; background: #faf9f6; color: var(--text); }
.int-copy { width: 38px; border: none; border-radius: 9px; background: var(--primary); color: #fff; font-size: 14px; cursor: pointer; }
.int-webhook-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.int-webhook-form input, .int-webhook-form select { padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; font-size: 13px; font-family: inherit; }
.api-doc { margin-bottom: 16px; }
.api-doc h3 { margin: 0 0 6px; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.api-doc p { font-size: 13px; color: var(--text-muted); margin: 4px 0; }
.api-resp { margin-top: 8px; }
.api-method { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 6px; color: #fff; letter-spacing: .5px; }
.api-method.post { background: #2e9e5b; }
.api-method.get { background: #2f6fd4; }

/* Fechamento de recompensas */
.fech-filtros { margin-bottom: 18px; }
.fech-filtros-top { display: flex; align-items: center; margin-bottom: 12px; }
.fech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 800px) { .fech-grid { grid-template-columns: 1fr; } }
.fech-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
@media (max-width: 700px) { .fech-cards { grid-template-columns: 1fr; } }
.fech-card { padding: 22px 22px; }
.fech-num { font-size: 26px; font-weight: 800; }
.fech-num.azul { color: #2f6fd4; }
.fech-num.verde { color: #22a65a; }
.fech-lbl { font-size: 13.5px; font-weight: 600; margin-top: 6px; }

/* Modal Links pessoais */
.links-modal { border: none; border-radius: 18px; padding: 28px 30px; width: min(680px, 92vw); box-shadow: 0 20px 70px rgba(0,0,0,.3); }
.links-modal::backdrop { background: rgba(20,18,40,.45); }
.lm-close { position: absolute; top: 16px; right: 18px; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--border); background: #fff; cursor: pointer; font-size: 14px; }
.lm-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; padding-right: 40px; }
.lm-title { font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.lm-name { font-size: 14px; color: var(--text); }
.lm-email { font-size: 12.5px; color: var(--text-muted); font-style: italic; }
.lm-table { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.lm-cols { display: grid; grid-template-columns: 1.2fr 70px 1.6fr 44px; gap: 14px; align-items: center; }
.lm-cols-head { font-size: 13px; font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.lm-body { background: #faf9f6; border-radius: 10px; padding: 14px; }
.lm-camp { font-size: 13px; }
.lm-clicks { font-size: 13px; color: var(--text-muted); text-align: center; }
.lm-links label { display: block; font-size: 11px; color: var(--text-muted); margin: 8px 0 4px; }
.lm-links label:first-child { margin-top: 0; }
.lm-linkbox { display: flex; gap: 6px; }
.lm-linkbox input { flex: 1; min-width: 0; padding: 8px 10px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 12px; color: var(--text); background: #fff; }
.lm-linkbox button { width: 36px; border: none; border-radius: 8px; background: var(--primary); color: #fff; font-size: 14px; cursor: pointer; }
.lm-mailbtn { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--border); background: #fff; display: grid; place-items: center; text-decoration: none; color: var(--text); font-size: 15px; }
.lm-mailbtn:hover { background: #f4f2ec; }

/* ----- Lista de integrações (Marketing & vendas / E-Commerce) ----- */
.int-list-card { max-width: 780px; padding: 26px 28px; border-radius: 16px; }
.int-list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.int-list-title { font-size: 21px; font-weight: 800; color: #1c1a27; margin: 0; }
.int-new-btn { background: var(--accent-orange, #f26522); color: #fff; border: none; border-radius: 24px; padding: 11px 22px; font-size: 14px; font-weight: 700; cursor: pointer; }
.int-new-btn:hover { filter: brightness(1.06); }
.int-row { display: flex; align-items: center; gap: 16px; border: 1px solid var(--border, #e4e1d8); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; background: #fff; }
.int-row-toggle { margin: 0; display: flex; align-items: center; }
.switch { width: 44px; height: 24px; border-radius: 24px; border: none; background: #d6d3cc; position: relative; cursor: pointer; padding: 0; transition: background .15s; flex: none; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.switch.on { background: #12b5a5; }
.switch.on .knob { left: 23px; }
.int-row-info { flex: 1; min-width: 0; }
.int-row-name { font-weight: 800; font-size: 14.5px; color: #1c1a27; letter-spacing: .3px; }
.int-row-sub { font-size: 12.5px; color: var(--text-muted, #7b7690); margin-top: 2px; }
.int-row-del { background: none; border: none; color: #d5322f; font-size: 17px; cursor: pointer; padding: 6px; }
.int-row-del:hover { transform: scale(1.12); }
.int-adv { margin-top: 6px; }
.int-adv summary { list-style: none; cursor: pointer; font-weight: 800; font-size: 15px; color: #1c1a27; display: flex; align-items: center; gap: 8px; }
.int-adv summary::-webkit-details-marker { display: none; }
.int-adv-plus { color: var(--text-muted, #7b7690); font-weight: 400; }
.int-adv-body { font-size: 13px; color: var(--text-muted, #7b7690); padding-top: 10px; }

/* ----- Hub de integrações: telas fieis ao BuzzLead ----- */
.bz-blue-btn { background: #3b9af6; color: #fff; border: none; border-radius: 10px; padding: 11px 20px; font-size: 14px; font-weight: 700; cursor: pointer; }
.bz-blue-btn:hover { filter: brightness(1.06); }
.bz-orange-outline { border: 1.5px solid var(--accent-orange, #f26522); color: var(--accent-orange, #f26522); background: #fff; border-radius: 10px; padding: 10px 18px; font-weight: 700; }
.bz-orange-outline:hover { background: #fdeee0; }
.wh-grid { display: grid; grid-template-columns: 64px 150px 1fr 130px 110px 150px; gap: 12px; align-items: center; }
.wh-grid-head { padding: 6px 18px 12px; font-weight: 700; font-size: 13px; color: #555; }
.wh-row { border: 1.5px solid #cfe6fb; background: #f6fbff; border-radius: 26px; padding: 10px 18px; margin-bottom: 12px; font-size: 13px; }
.wh-url { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wh-actions { display: flex; gap: 8px; align-items: center; }
.act-btn { background: none; border: none; color: #3b9af6; font-size: 16px; cursor: pointer; padding: 4px; }
.act-btn:hover { transform: scale(1.15); }
.act-btn.act-del { color: #d5322f; }
.rw-icon { font-size: 28px; background: #eef5fd; border-radius: 12px; padding: 10px; }
.rw-search { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid var(--border, #e4e1d8); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; }
.rw-search input { border: none; outline: none; flex: 1; font-size: 14px; background: transparent; }
.rw-empty { text-align: center; color: var(--text-muted, #7b7690); padding: 56px 20px; font-size: 15px; }
.rw-row { margin-bottom: 14px; }
.rw-row-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.rw-urls label { display: block; font-size: 12px; font-weight: 700; color: #555; margin: 8px 0 4px; }
.flt-card { position: relative; margin-bottom: 18px; }
.flt-title { font-weight: 700; margin-bottom: 10px; }
.flt-export { position: absolute; top: 16px; right: 18px; }
.flt-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.flt-grow { flex: 1; min-width: 240px; }
.flt-btn { padding: 11px 26px; }
.auto-switch.on { background: #f26522; }
.diag-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border, #e4e1d8); }
.diag-row:last-child { border-bottom: none; }
.diag-ico { font-size: 18px; }
.diag-name { font-weight: 700; font-size: 14px; color: #1c1a27; }
.diag-detail { font-size: 12.5px; color: var(--text-muted, #7b7690); margin-top: 2px; }
.diag-status { font-size: 11.5px; font-weight: 800; letter-spacing: .4px; }
.logo-preview { border: 1.5px dashed var(--border, #e4e1d8); border-radius: 12px; padding: 26px; display: grid; place-items: center; background: #faf9f7; }
.logo-preview img { max-height: 90px; max-width: 100%; }
.nps-hero { text-align: center; padding: 48px 32px; }
.nps-hero-ico { font-size: 44px; color: var(--accent-orange, #f26522); margin-bottom: 14px; }
.nps-canais-title { font-size: 13.5px; color: var(--text-muted, #7b7690); margin: 40px 0 18px; }
.nps-canais { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; text-align: left; }
.nps-canal { border: 1.5px solid var(--border, #e4e1d8); border-radius: 14px; padding: 22px; }
.nps-canal-tag { font-size: 11.5px; font-weight: 800; color: #3b9af6; letter-spacing: .5px; margin-bottom: 10px; }
.nps-canal h3 { font-size: 16px; font-weight: 800; color: #1c1a27; margin: 0 0 8px; }
.nps-canal p { font-size: 13px; color: var(--text-muted, #7b7690); margin: 0; line-height: 1.6; }
.com-card { display: flex; align-items: center; gap: 20px; padding: 18px 22px; border-radius: 14px; margin-bottom: 14px; }
.com-info { flex: 1.6; min-width: 0; }
.com-status { display: inline-block; background: #f5a623; color: #fff; font-size: 10.5px; font-weight: 800; padding: 3px 10px; border-radius: 12px; margin-bottom: 6px; }
.com-status.on { background: #21a366; }
.com-name { font-weight: 800; font-size: 14.5px; color: #1c1a27; }
.com-sub { font-size: 12.5px; color: var(--text-muted, #7b7690); margin-top: 2px; }
.com-channel { font-size: 20px; width: 34px; text-align: center; }
.com-goal { flex: 0.8; font-size: 12.5px; color: var(--text-muted, #7b7690); letter-spacing: .4px; }
.com-trigger { flex: 1.2; font-size: 12.5px; color: var(--text-muted, #7b7690); }
.com-sends { border: 1.5px solid var(--border, #e4e1d8); border-radius: 10px; padding: 10px 22px; text-align: center; }
.com-sends-num { font-size: 20px; font-weight: 800; color: #4a4657; }
.com-sends-label { font-size: 11.5px; color: var(--text-muted, #7b7690); }
.com-ver { border: 1.5px solid #3b9af6; color: #3b9af6; background: #fff; border-radius: 20px; padding: 7px 26px; font-size: 13px; font-weight: 700; text-decoration: none; }
.com-ver:hover { background: #eef5fd; }
.disp-tabs { display: flex; gap: 8px; border-bottom: 1.5px solid var(--border, #e4e1d8); padding-bottom: 0; }
.disp-tab { background: none; border: none; border-bottom: 3px solid transparent; padding: 10px 16px; font-size: 14px; font-weight: 700; color: var(--text-muted, #7b7690); cursor: pointer; }
.disp-tab.on { color: var(--navy, #221C59); border-bottom-color: var(--accent-orange, #f26522); }
.em-usage { height: 10px; background: #eceae3; border-radius: 6px; overflow: hidden; }
.em-usage-fill { height: 100%; background: linear-gradient(90deg, #3b9af6, #56c6f0); border-radius: 6px; }
.em-notice { background: #fdf6e3; border: 1.5px solid #f0d48a; border-radius: 12px; padding: 16px 18px; font-size: 13px; color: #6b5b1e; margin: 18px 0; line-height: 1.6; }
.em-badge { background: #21c07a; color: #fff; font-size: 10.5px; font-weight: 800; padding: 4px 10px; border-radius: 12px; letter-spacing: .4px; }
.rk-conv-head { background: #eceff3; border-radius: 8px 8px 0 0; }
.rk-conv { background: #f6f8fa; }
.pt-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pt-card { padding: 24px 26px; border-radius: 14px; }
.pt-num { font-size: 26px; font-weight: 800; color: #4a4657; }
.pt-num.pt-blue { color: #3b9af6; }
.pt-num.pt-green { color: #21a366; }
.pt-num.pt-red { color: #e33d3d; }
.fail-badge { background: #e33d3d; color: #fff; font-size: 10.5px; font-weight: 800; padding: 4px 10px; border-radius: 12px; letter-spacing: .4px; }
.pt-label { font-size: 14px; font-weight: 600; color: #1c1a27; margin-top: 6px; }
.rr-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 40px; }
.rr-form .filter-field select, .rr-form .filter-field input { width: 100%; box-sizing: border-box; }
.rr-submit { grid-column: 1 / -1; }
.imp-hero, .conn-hero { text-align: center; padding: 48px 32px; max-width: 720px; }
.imp-xicon { width: 84px; height: 84px; margin: 0 auto 18px; background: #21a366; border-radius: 18px; display: grid; place-items: center; }
.imp-xicon span { color: #fff; font-size: 40px; font-weight: 900; font-family: Georgia, serif; }
.conn-hero-ico { font-size: 64px; margin-bottom: 12px; }
.imp-hero-title { font-size: 22px; font-weight: 800; color: #1c1a27; margin: 0 0 10px; }
.imp-hero-sub { font-size: 14px; color: var(--text-muted, #7b7690); max-width: 560px; margin: 0 auto 22px; line-height: 1.6; }

/* ----- Login do admin ----- */
.auth-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--navy, #221C59) 0%, #2e2775 55%, #453a9e 100%); padding: 24px; }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 14px; padding: 36px 32px; box-shadow: 0 18px 50px rgba(10, 8, 40, .35); text-align: center; }
.auth-logo { height: 54px; margin-bottom: 14px; }
.auth-title { font-size: 20px; font-weight: 800; color: var(--navy, #221C59); margin: 0 0 4px; }
.auth-sub { font-size: 13px; color: var(--text-muted, #7b7690); margin: 0 0 20px; }
.auth-error { background: #f9e9e9; color: #8f3434; border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.auth-label { display: block; text-align: left; font-size: 12.5px; font-weight: 600; color: var(--text, #2c2a38); margin: 12px 0 5px; }
.auth-input { width: 100%; box-sizing: border-box; border: 1.5px solid var(--border, #e4e1d8); border-radius: 8px; padding: 11px 12px; font-size: 14px; }
.auth-input:focus { outline: none; border-color: var(--navy, #221C59); }
.auth-btn { width: 100%; margin-top: 20px; padding: 12px; font-size: 14.5px; }
.topbar-sair { background: none; border: 1.5px solid var(--border, #e4e1d8); border-radius: 8px; padding: 6px 12px; font-size: 12.5px; color: var(--text, #2c2a38); cursor: pointer; }
.topbar-sair:hover { background: #f4f2ec; }
.lm-sharebtns { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.lm-wa { border-color: #25d366; font-size: 12px; }
.lm-wa:hover { background: #e9f9ef; }
.lm-fb { border-color: #1877f2; color: #1877f2; font-weight: 800; font-family: Georgia, serif; }
.lm-fb:hover { background: #e9f1fd; }
.lm-foot { display: flex; justify-content: flex-end; margin-top: 18px; }

/* Cores por status do funil */
.st-new { color: #3b6fd4; } .status-badge.st-new { background: #e8effb; color: #2f5bb0; }
.st-contact { color: #b98a12; } .status-badge.st-contact { background: #fdf3d7; color: #93700c; }
.st-qualif { color: #7a5cc0; } .status-badge.st-qualif { background: #f1eef8; color: #64499f; }
.st-nego { color: var(--accent-orange); } .status-badge.st-nego { background: #fdeee0; color: #c56d1d; }
.st-won { color: #2e9e5b; } .status-badge.st-won { background: #e7f4ec; color: #247a46; }
.st-lost { color: #a33b3b; } .status-badge.st-lost { background: #f9e9e9; color: #8f3434; }

/* Status badge */
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.status-badge.ok { background: #e7f4ec; color: #2e8b57; }
.status-badge.muted { background: #eceae4; color: #8a887f; }
.status-badge.warn { background: #fbeecd; color: #a9791b; }

/* Formulário */
.form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.grow { flex: 1; min-width: 240px; }
.form-field > label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-field input[type=text], .form-field input[type=date], .form-field input:not([type]), .form-field textarea {
    padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; font-size: 13.5px; font-family: inherit; background: #fff; color: var(--text);
}
.form-field textarea { resize: vertical; }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.val { color: var(--danger); font-size: 12px; }
.val-summary:empty { display: none; }
.val-summary { color: var(--danger); font-size: 13px; }
.val-summary ul { margin: 0; padding-left: 18px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* Switch (toggle) */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #cfccc4; border-radius: 20px; transition: .2s; cursor: pointer; }
.switch .slider::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* Cards de formato */
.fmt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.fmt-card { position: relative; border: 1.5px solid var(--border); border-radius: 12px; padding: 14px 14px 14px 40px; cursor: pointer; display: block; transition: .15s; }
.fmt-card:hover { border-color: #c9c6be; }
.fmt-card input { position: absolute; top: 15px; left: 14px; }
.fmt-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.fmt-title { font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.fmt-desc { font-size: 12px; color: var(--text-muted); line-height: 1.35; }

/* Barra de filtro */
.filter-bar { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-field { display: flex; flex-direction: column; gap: 5px; }
.filter-field label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.filter-field select, .filter-field input { padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; font-size: 13.5px; background: #fff; font-family: inherit; color: var(--text); }
.filter-field select:focus, .filter-field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.filter-note { width: 100%; font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* ---------- KPI cards ---------- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 18px;
}
.kpi-card { display: flex; flex-direction: column; gap: 6px; }
.kpi-card .kpi-label { color: var(--text-muted); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.kpi-card .kpi-value { font-size: 30px; font-weight: 700; line-height: 1.1; }
.kpi-card .kpi-foot { font-size: 12px; color: var(--text-muted); }
.kpi-card .bar { height: 5px; border-radius: 4px; margin-top: 4px; background: var(--primary); opacity: .85; }
.kpi-card.orange .bar { background: var(--accent-orange); }
.kpi-card.purple .bar { background: var(--accent-purple); }
.kpi-card.navy   .bar { background: var(--accent-navy); }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: #eef7f0; color: #2e9e5b; font-weight: 600; }
.pill.soon { background: #f1eef8; color: #7a5cc0; }

/* ---------- Sections ---------- */
.section-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .section-grid { grid-template-columns: 1fr; } }
.card h3 { margin: 0 0 16px; font-size: 16px; }

/* Funil do programa (afunilado; badge de taxa colado na borda de cada etapa) */
.funnelb { display: flex; flex-direction: column; gap: 30px; padding: 4px 0 8px; }
.funnelb-step { display: flex; justify-content: center; }
.fb-wrap { position: relative; }                 /* largura definida inline por etapa */
.fb-body {
    text-align: center;
    padding: 16px 12px;
    background: #eef0f2;
    color: var(--text);
    clip-path: polygon(0 0, 100% 0, calc(100% - 26px) 100%, 26px 100%);
}
.funnelb-step:first-child .fb-body { background: var(--accent-orange); color: #fff; }
.fb-value { font-size: 23px; font-weight: 700; line-height: 1.1; }
.fb-label { font-size: 12.5px; opacity: .92; }
.fb-rate {
    position: absolute;
    left: 50%; bottom: -22px;                    /* centralizado no vão entre as etapas */
    transform: translateX(-50%);
    z-index: 3;
}
.fb-rate-badge {
    background: var(--primary); color: #fff;
    font-weight: 700; font-size: 13px;
    padding: 5px 14px; border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    white-space: nowrap;
}
.fb-rate-text {                                  /* rótulo da taxa, ao lado do badge */
    position: absolute; left: calc(100% + 12px); top: 50%;
    transform: translateY(-50%);
    font-size: 11.5px; color: var(--text-muted);
    white-space: nowrap;
}

/* Gráfico de linha */
.legend { display: flex; gap: 18px; margin-bottom: 4px; font-size: 12px; color: var(--text-muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.linechart { width: 100%; height: auto; }
.linechart .axis { font-size: 10px; fill: var(--text-muted); }
.linechart .pt { font-size: 9.5px; fill: var(--text-muted); font-weight: 600; }

/* Rosca (distribuição) */
.donut-wrap { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.donut { width: 150px; height: 150px; flex-shrink: 0; }
.donut-num { font-size: 22px; font-weight: 700; fill: var(--text); }
.donut-lbl { font-size: 9px; fill: var(--text-muted); }
.donut-legend { display: flex; flex-direction: column; gap: 14px; flex: 1; min-width: 200px; }
.dl-block { line-height: 1.3; }
.dl-head { font-size: 13.5px; }
.dl-nums { font-size: 12.5px; color: var(--text-muted); margin: 1px 0 2px 15px; }
.dl-nums span { font-weight: 700; }
.dl-desc { font-size: 11px; color: var(--text-muted); margin-left: 15px; max-width: 260px; }

/* Stat tiles (rentabilização) */
.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.stat { background: #faf9f6; border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.stat-lbl { font-size: 11.5px; color: var(--text-muted); }
.stat-val { font-size: 19px; font-weight: 700; margin-top: 2px; }

/* Lista chave/valor (outros indicadores) */
.kv { display: flex; flex-direction: column; }
.kv-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.kv-row:last-child { border-bottom: none; }
.kv-row span { color: var(--text-muted); }
.kv-row b { font-size: 16px; }

/* Ranking */
table.rank { width: 100%; border-collapse: collapse; }
table.rank th, table.rank td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 13px; }
table.rank th { color: var(--text-muted); font-weight: 600; }
table.rank td.num, table.rank th.num { text-align: right; }
.rank-pos { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #f1efe9; font-size: 12px; font-weight: 700; }
.rank-pos.p1 { background: #fdf1c9; color: #9a7a12; }
.rank-pos.p2 { background: #ececec; color: #6b6b6b; }
.rank-pos.p3 { background: #f6e2cf; color: #a4632a; }

/* ==========================================================================
   Camada do console comercial. Reúne classes que já eram usadas nas views mas
   nunca tinham sido definidas (.card-title, .toast-err, --navy) e o vocabulário
   novo de comparação de período, ranking e paginação.
   ========================================================================== */

:root {
    /* Usada em várias views admin; só existia em painel.css/lp-cadastro.css,
       que o _AdminLayout não carrega — os usos caíam no fallback. */
    --navy: #221C59;
    --pos: #21a366;
    --neg: #e33d3d;
    --warn: #d79a1b;
    --info: #4c8fd6;
}

/* Título de bloco dentro de um card. */
.card-title { font-size: 15px; font-weight: 700; color: var(--navy); margin: 0 0 14px; }

/* Par do .toast-ok para mensagens de erro. */
.toast-err { background: #fdeaea; color: #b52d2d; border: 1px solid #f3c2c2; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 13.5px; }
.toast-warn { background: #fdf6e3; color: #8a6a12; border: 1px solid #f0e0b0; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 13.5px; }

/* Aviso de confiança do dado, ao lado de um número. */
.warn-box { background: #fdf6e3; border-left: 3px solid var(--warn); border-radius: 8px; padding: 9px 12px; font-size: 12.5px; color: #6b5a2a; line-height: 1.55; }

/* ----- Comparação com o período anterior ----- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.kpi-label { font-size: 11.5px; font-weight: 700; color: var(--text-muted); letter-spacing: .04em; text-transform: uppercase; }
.kpi-value { font-size: 25px; font-weight: 800; color: #1c1a27; line-height: 1.2; margin-top: 5px; font-variant-numeric: tabular-nums; }
.kpi-value.sm { font-size: 20px; }
.kpi-foot { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 20px; white-space: nowrap; }
.delta-up { background: #e7f4ec; color: var(--pos); }
.delta-down { background: #fdeaea; color: var(--neg); }
.delta-flat { background: #f1efe9; color: var(--text-muted); }
.delta-none { background: transparent; color: var(--text-muted); font-weight: 600; }

/* ----- Filtro de período em pílulas ----- */
.per-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.per-pills a { padding: 6px 13px; border: 1px solid var(--border); border-radius: 20px; font-size: 12.5px; color: #5c5866; text-decoration: none; background: var(--surface); white-space: nowrap; }
.per-pills a:hover { border-color: #b9d4ee; }
.per-pills a.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }

/* ----- Barra horizontal de ranking / progresso ----- */
.bar { height: 8px; background: #efedea; border-radius: 99px; overflow: hidden; min-width: 60px; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--info); }
.bar.pos > span { background: var(--pos); }
.bar.warn > span { background: var(--warn); }
.bar.neg > span { background: var(--neg); }

/* ----- Faixa horizontal de etapas do funil (foto da situação atual) ----- */
.stage-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.stage { flex: 1 1 118px; border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; text-decoration: none; background: var(--surface); border-top: 3px solid var(--border); }
.stage:hover { border-color: #b9d4ee; }
.stage-n { font-size: 21px; font-weight: 800; color: #1c1a27; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stage-l { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.stage.s-new { border-top-color: #9aa5b8; }
.stage.s-qual { border-top-color: var(--info); }
.stage.s-nego { border-top-color: var(--warn); }
.stage.s-won { border-top-color: var(--pos); }
.stage.s-lost { border-top-color: var(--neg); }
.stage.s-dup { border-top-color: #b9a5c8; }

/* Selo de etapa dentro de tabela. */
.st-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.st-new { background: #eef1f6; color: #59637a; }
.st-qual { background: #e8f2fd; color: #2f6fae; }
.st-nego { background: #fdf6e3; color: #8a6a12; }
.st-won { background: #e7f4ec; color: #1c7a4c; }
.st-lost { background: #fdeaea; color: #b52d2d; }
.st-dup { background: #f4eef8; color: #6b4a80; }

/* Situação de atividade do embaixador. */
.sit { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.sit-ativo { background: #e7f4ec; color: #1c7a4c; }
.sit-adormecido { background: #fdf6e3; color: #8a6a12; }
.sit-inativo { background: #fdeaea; color: #b52d2d; }
.sit-nunca { background: #f1efe9; color: #6b6b6b; }

/* ----- Tabela larga, rodapé e paginação ----- */
.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 100%; }
table.rank td.money, table.rank th.money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty-cell { color: var(--text-muted); font-size: 13px; }
.list-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; color: var(--text-muted); }
.pager { display: flex; gap: 6px; align-items: center; }
.pager a, .pager span { padding: 5px 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; color: #5c5866; text-decoration: none; background: var(--surface); }
.pager a:hover { border-color: #b9d4ee; }
.pager .on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.pager .off { opacity: .45; }

/* ----- Fila de ação: lista curta com contato e motivo ----- */
.queue { display: grid; gap: 8px; }
.queue-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--border); border-left: 3px solid var(--warn); border-radius: 9px; background: var(--surface); }
.queue-row.q-cold { border-left-color: var(--neg); }
.queue-row.q-stuck { border-left-color: var(--warn); }
.queue-row.q-never { border-left-color: #9aa5b8; }
.queue-main { flex: 1; min-width: 0; }
.queue-name { font-size: 13.5px; font-weight: 600; color: #1c1a27; }
.queue-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.queue-why { font-size: 12px; color: #5c5866; white-space: nowrap; }

/* Gráfico de linha em SVG inline. */
.linechart { width: 100%; height: auto; display: block; }
.linechart .axis { font-size: 10px; fill: var(--text-muted); }
