:root {
    --brand: #0096c7;
    --brand-dark: #0077a0;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f1f5f9;
    --card: #ffffff;
    --danger-bg: #fef2f2;
    --danger: #b91c1c;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    background: var(--ink);
    color: #fff;
}
.topbar a { color: #fff; text-decoration: none; }
.brand { font-weight: 700; font-size: 18px; }
.brand span { color: var(--brand); font-weight: 500; }
.topbar nav { display: flex; gap: 16px; align-items: center; font-size: 14px; }
.topbar .who { color: #cbd5e1; }
.topbar a.who:hover { color: #fff; }

.container { max-width: 960px; margin: 32px auto; padding: 0 16px; }

h1 { margin: 0 0 4px; font-size: 26px; }
h2 { margin: 0 0 8px; font-size: 18px; }
.muted { color: var(--muted); margin-top: 0; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 24px;
    margin-top: 20px;
}
.card.narrow { max-width: 420px; margin: 48px auto; }

form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
input {
    font: inherit;
    font-weight: 400;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}
input:focus { outline: 2px solid var(--brand); border-color: var(--brand); }

button {
    font: inherit;
    font-weight: 600;
    padding: 11px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
}
button:hover { background: var(--brand-dark); }

.alert {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 10px 12px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 14px;
}

/* ---- Etapa 2: clientes ---- */
a { color: var(--brand-dark); }
.small { font-size: 13px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

.button {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}
.button:hover { background: var(--brand-dark); }
button.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); align-self: flex-start; padding: 10px 16px; }
button.secondary:hover { background: var(--bg); }
form button[type=submit]:not(.secondary) { align-self: flex-start; padding: 11px 24px; }
.card.narrow form button[type=submit] { align-self: stretch; }

select, textarea {
    font: inherit;
    font-weight: 400;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
textarea { resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.card.flush { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
td a { font-weight: 600; text-decoration: none; }
.empty { padding: 24px; color: var(--muted); margin: 0; }

.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #e0f2fe; color: #075985; font-size: 12px; font-weight: 600; white-space: nowrap; }
.notice { background: #ecfdf5; color: #047857; padding: 10px 12px; border-radius: 8px; margin-top: 12px; font-size: 14px; }
.card.success { border-color: #6ee7b7; }
.card.success textarea { width: 100%; margin: 8px 0 12px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }

.steps { list-style: none; padding: 0; margin: 12px 0 0; display: flex; gap: 8px; flex-wrap: wrap; counter-reset: step; }
.steps li { counter-increment: step; flex: 1 1 140px; padding: 10px 12px; border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 14px; }
.steps li::before { content: counter(step) ". "; font-weight: 700; }
.steps li.done { background: #e0f2fe; color: #075985; }
.steps li.done::before { content: "✓ "; }
.steps li.current { background: var(--brand); color: #fff; font-weight: 600; }

@media (max-width: 640px) {
    .grid-2 { grid-template-columns: 1fr; }
    .topbar { padding: 14px 16px; }
}

/* ---- Área de membros ---- */
.topbar nav a { color: #e2e8f0; }
.topbar nav a:hover { color: #fff; }
.hint { font-weight: 400; font-size: 13px; color: var(--muted); }
label.short { max-width: 260px; }
.kind-switch { display: flex; gap: 20px; flex-wrap: wrap; }
.kind-switch label { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.table-title { padding: 16px 16px 0; }
td.icon { width: 36px; font-size: 18px; }
td.actions { white-space: nowrap; text-align: right; }
td.actions form { display: inline; margin: 0 0 0 12px; }
button.link { background: none; padding: 0; color: var(--brand-dark); font-weight: 600; font-size: 14px; }
button.link:hover { background: none; text-decoration: underline; }
button.link.danger { color: var(--danger); }

.section-title { margin: 32px 0 0; font-size: 20px; }
.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.content-grid .card { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.content-item h3 { margin: 0; font-size: 16px; }
.content-item p { margin: 0; }
.content-item .button { align-self: flex-start; margin-top: auto; }
.button .light { font-weight: 400; opacity: .85; font-size: 13px; }
.video { position: relative; padding-top: 56.25%; border-radius: 8px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) {
    .topbar { flex-wrap: wrap; gap: 8px; }
    .topbar nav { gap: 12px; flex-wrap: wrap; }
    td.actions form { display: block; margin: 6px 0 0; }
}

[hidden] { display: none !important; }

/* ---- Raio-X e brief ---- */
.progress { list-style: none; padding: 0; margin: 20px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.progress a { display: block; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; text-decoration: none; color: var(--muted); }
.progress li.current a { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.question { display: flex; flex-direction: column; gap: 6px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.question:last-of-type { border-bottom: 0; }
.qnum { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #e0f2fe; color: #075985; font-size: 12px; margin-right: 4px; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; color: var(--muted); font-size: 13px; cursor: pointer; }
.form-nav { display: flex; gap: 12px; justify-content: flex-end; }
.form-nav button { align-self: auto !important; }
.summary { margin: 8px 0 0; }
.summary dt { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 14px; }
.summary dd { margin: 4px 0 0; white-space: normal; }
.tag.warn { background: #fef2f2; color: var(--danger); }
.tag.pending { background: #fef3c7; color: #92400e; }
details summary { cursor: pointer; font-weight: 600; color: var(--brand-dark); margin-top: 8px; }
.block-title { margin: 20px 0 0; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }
.hidden-source { display: none; }
.steps-howto { background: var(--bg); border-radius: 8px; padding: 12px 14px; margin: 12px 0; font-size: 14px; }
.steps-howto p { margin: 0 0 4px; }
#brief form { margin-top: 20px; }
.question > label:first-child { flex-direction: row; align-items: flex-start; gap: 6px; }
.qnum { flex-shrink: 0; }

/* ---- Campanha ---- */
.delay { font-size: 12px; font-weight: 600; color: #075985; background: #e0f2fe; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.sequence { padding-left: 0; list-style: none; counter-reset: seq; margin: 8px 0 0; }
.sequence li { counter-increment: seq; border-left: 3px solid var(--line); padding: 4px 0 4px 14px; margin-bottom: 14px; }
.sequence li p { margin: 6px 0 0; }
.seq-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seq-head strong::before { content: counter(seq) ". "; }
.flow { margin: 8px 0 0; }
.flow > div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.flow > div:last-child { border-bottom: 0; }
.flow dt { font-weight: 600; font-size: 14px; }
.flow dd { margin: 4px 0 0; }
.changed { background: #fffbeb; border-radius: 6px; }
.sequence li.changed { border-left-color: #f59e0b; }
.flow > div.changed { padding-left: 10px; padding-right: 10px; }
.client-comment { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 12px; margin: 12px 0; font-size: 14px; }
.rows { display: flex; flex-direction: column; gap: 14px; margin: 10px 0; }
.row-edit { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--bg); border-radius: 8px; }
.row-fields { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-fields input[type=text] { flex: 1 1 220px; }
label.inline { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; font-size: 13px; }
label.inline input { width: 80px; }
.tag.status-rascunho { background: var(--bg); color: var(--muted); }
.tag.status-enviada { background: #e0f2fe; color: #075985; }
.tag.status-aprovada { background: #ecfdf5; color: #047857; }
.tag.status-ajustes_pedidos { background: #fef3c7; color: #92400e; }
.card.highlight { border-color: var(--brand); box-shadow: 0 0 0 3px #e0f2fe; }
code { background: var(--bg); padding: 1px 5px; border-radius: 4px; font-size: 13px; }

/* ---- Métricas ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
table.metrics { font-size: 13px; }
table.metrics th { white-space: nowrap; font-size: 11px; }
table.metrics td.num { text-align: right; white-space: nowrap; }
table.metrics tr.total td { font-weight: 700; background: var(--bg); border-top: 2px solid var(--line); }
.rate { display: inline-block; padding: 1px 7px; border-radius: 999px; font-weight: 600; font-size: 12px; }
.rate-ruim { background: #fef2f2; color: var(--danger); }
.rate-regular { background: #fef3c7; color: #92400e; }
.rate-bom { background: #e0f2fe; color: #075985; }
.rate-ótimo { background: #ecfdf5; color: #047857; }
.below { color: #b45309; margin-left: 4px; cursor: help; }
.legend .rate { margin-right: 4px; }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr 1fr; } }

button.armed { background: var(--danger) !important; color: #fff !important; padding: 4px 10px !important; border-radius: 6px; }

/* ---- Parte 1: área do cliente ---- */
.menu-toggle { display: none; background: transparent !important; border: 0; color: #fff; font-size: 24px; padding: 0 4px !important; line-height: 1; }
.menu-toggle:hover { background: none; }
.topbar nav a.active { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 6px; }
.label { margin: 0 0 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-dark); }

.welcome { display: flex; flex-direction: column; gap: 14px; }
.welcome .video { max-width: 720px; width: 100%; }
.welcome p { margin: 0; font-size: 16px; }

.meeting { display: flex; gap: 18px; align-items: center; border-left: 4px solid var(--brand); }
.meeting h2 { margin: 0; }
.meeting .muted { margin: 2px 0 0; }
.meeting-date { flex-shrink: 0; width: 64px; text-align: center; background: var(--ink); color: #fff; border-radius: 10px; padding: 8px 0; }
.meeting-date .day { display: block; font-size: 26px; font-weight: 700; line-height: 1.1; }
.meeting-date .month { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }

.card.now { background: #f0f9ff; border-color: #bae6fd; }
.card.now h2 { font-size: 22px; margin-bottom: 6px; }
.card.now p:not(.label) { margin: 0 0 14px; }

.timeline { list-style: none; padding: 0; margin: 12px 0; position: relative; }
.timeline li { display: flex; align-items: center; gap: 12px; padding: 7px 0; position: relative; color: var(--muted); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 36px; height: calc(100% - 22px); width: 2px; background: var(--line); }
.timeline li.done::after { background: #7dd3fc; }
.timeline .dot { flex-shrink: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); font-size: 13px; font-weight: 700; z-index: 1; }
.timeline li.done { color: #075985; }
.timeline li.done .dot { background: #e0f2fe; border-color: #7dd3fc; }
.timeline li.current { color: var(--ink); font-weight: 700; }
.timeline li.current .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.home-cards .card { margin-top: 20px; }
.home-cards { gap: 0 16px; }

.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { padding: 12px 0; color: var(--ink); font-size: 16px; list-style-position: outside; }
.faq-answer { padding: 0 0 14px; color: #334155; }

fieldset.checks { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; margin: 0; }
fieldset.checks legend { font-size: 14px; font-weight: 600; padding: 0 6px; }

/* Botões fixos (WhatsApp / agenda) */
.action-bar { position: fixed; right: 20px; bottom: 20px; display: flex; gap: 10px; z-index: 50; }
.action-bar .action { padding: 12px 18px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; box-shadow: 0 6px 18px rgba(15, 23, 42, .25); }
.action-bar .whatsapp { background: #16a34a; }
.action-bar .schedule { background: var(--ink); }
body:has(.action-bar) main { padding-bottom: 80px; }

@media (max-width: 600px) {
    .topbar { flex-wrap: wrap; }
    .menu-toggle { display: block; }
    .main-nav { display: none !important; width: 100%; flex-direction: column; align-items: stretch !important; gap: 0 !important; padding-top: 8px; }
    body.menu-open .main-nav { display: flex !important; }
    .main-nav a, .main-nav .who { padding: 12px 4px; border-top: 1px solid #1e293b; font-size: 16px; }
    .container { margin: 20px auto; }
    h1 { font-size: 23px; }
    .card { padding: 18px; }
    .home-cards { display: block; }
    .action-bar { left: 0; right: 0; bottom: 0; gap: 0; }
    .action-bar .action { flex: 1; text-align: center; border-radius: 0; box-shadow: none; padding: 15px 8px; }
    .form-nav { flex-direction: column-reverse; }
    .form-nav button { width: 100%; }
    input, select, textarea { font-size: 16px; } /* evita zoom automático no iPhone */
}

/* ---- Parte 2: Playbook, Primeiros Passos, métricas do cliente ---- */
.topbar nav { flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
.pb-top { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pb-home { font-weight: 700; text-decoration: none; }
.pb-search { flex-direction: row; gap: 8px; margin: 0; flex: 1 1 320px; max-width: 520px; }
.pb-search input { flex: 1; }
.pb-search button { align-self: auto !important; padding: 10px 16px !important; }
.pb-label { display: block; margin: 0 0 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-dark); }
.pb-manual h2 { font-size: 21px; }
.pb-index { margin: 8px 0 0; padding-left: 22px; columns: 2; column-gap: 28px; }
.pb-index li { padding: 3px 0; break-inside: avoid; }
.pb-result { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); margin-top: 12px; }
.pb-result:hover { border-color: var(--brand); }
mark { background: #fef08a; padding: 0 1px; border-radius: 2px; }

.pb-article { line-height: 1.65; font-size: 16px; }
.pb-article h1 { font-size: 28px; margin-bottom: 14px; }
.pb-article h2 { margin: 30px 0 8px; font-size: 20px; }
.pb-article h3 { margin: 24px 0 6px; font-size: 17px; }
.pb-lead { font-size: 18px; color: #334155; }
.pb-hint { font-size: 14px; color: var(--muted); font-style: italic; margin-top: -4px; }
.pb-note { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 28px; }
.pb-label + h1 { margin-top: 0; }
p.pb-label { margin-top: 18px; }
.pb-table { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 8px; }
.pb-table table { font-size: 14px; }
.pb-table th { background: var(--ink); color: #fff; }
.pb-table td { line-height: 1.5; }
.pb-ul, .pb-ol { padding-left: 22px; }
.pb-ul li, .pb-ol li { margin: 6px 0; }
.pb-check { list-style: none; padding: 0; }
.pb-check li { padding: 6px 0 6px 30px; position: relative; }
.pb-check li::before { content: "☐"; position: absolute; left: 4px; color: var(--brand); font-size: 18px; line-height: 1.3; }
.pb-script { border: 1px solid #c7d2fe; background: #eef2ff; border-radius: 10px; margin: 14px 0; overflow: hidden; }
.pb-script-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; background: #e0e7ff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #3730a3; }
.pb-script p { margin: 0; padding: 12px 14px; font-weight: 500; }
.pb-script .copy { align-self: auto !important; padding: 5px 12px !important; font-size: 12px; background: #4338ca; text-transform: none; letter-spacing: 0; }
.ph { color: #4338ca; font-weight: 700; }
.pb-example { border-left: 4px solid var(--brand); background: #f0f9ff; padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 14px 0; }
.pb-example p { margin: 4px 0; }
.pb-callout { display: flex; gap: 12px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 12px 14px; margin: 16px 0; }
.pb-callout .pb-icon { font-size: 20px; line-height: 1.3; }
.pb-callout p { margin: 4px 0 0; }
.pb-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.pb-pager a { font-weight: 600; text-decoration: none; }
.pb-pager .next { margin-left: auto; text-align: right; }
.secondary-link { background: #fff !important; color: var(--ink) !important; border: 1px solid var(--line); }

.issues li { margin: 8px 0; }
.export-form { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.export-form button { align-self: flex-end !important; }

@media (max-width: 760px) {
    .pb-index { columns: 1; }
    .pb-article { font-size: 15px; padding: 18px 16px; }
    .pb-article h1 { font-size: 23px; }
    .pb-search { flex-basis: 100%; }
}

/* Campos sempre cabem na coluna (evita a página ficar mais larga que o celular) */
.grid-2 > *, .grid-3 > * { min-width: 0; }
input:not([type=checkbox]):not([type=radio]), select, textarea { max-width: 100%; min-width: 0; }
label > input:not([type=checkbox]):not([type=radio]), label > select, label > textarea { width: 100%; }

/* ---- Minha conta ---- */
.account { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; margin: 8px 0 0; }
.account dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.account dd { margin: 0; }
.narrow-form { max-width: 420px; }
@media (max-width: 760px) { .account { grid-template-columns: 1fr; gap: 2px; } .account dd { margin-bottom: 10px; } }

/* ---- Boas-vindas (sem vídeo) ---- */
.welcome h2 { font-size: 21px; margin: 0; }
.welcome > p { margin: 0; }
.flow-strip { list-style: none; padding: 0; margin: 4px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; counter-reset: flow; }
.flow-strip li { position: relative; background: var(--bg); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.flow-strip li strong { color: var(--brand-dark); }
.flow-strip li span { font-size: 13px; color: var(--muted); }
.flow-strip li:not(:last-child)::after { content: "→"; position: absolute; right: -10px; top: 50%; transform: translateY(-50%); color: var(--brand); font-weight: 700; z-index: 1; }
.welcome-points { margin: 0; padding-left: 20px; }
.welcome-points li { margin: 5px 0; }
@media (max-width: 760px) {
    .flow-strip { grid-template-columns: 1fr; }
    .flow-strip li:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -15px; transform: none; }
}

/* ---- Parte 4: gestão de clientes ---- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-top: 18px; overflow-x: auto; }
.tabs a { padding: 10px 16px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--brand); }
.tag.partner { background: #ede9fe; color: #5b21b6; }
.text-warn { color: #b45309; font-weight: 600; }
.text-danger { color: var(--danger); font-weight: 600; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi strong { font-size: 19px; }
.kpi-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kpi.warn { border-color: #fbbf24; background: #fffbeb; }
.kpi.danger { border-color: #fca5a5; background: var(--danger-bg); }
.bar { display: block; height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar span { display: block; height: 100%; background: var(--brand); }
.kpi.warn .bar span { background: #f59e0b; }

.inline-form { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.inline-form input[type=text] { flex: 1 1 180px; width: auto; }
.inline-form input[type=date], .inline-form input[type=file] { width: auto; }
.inline-form button { align-self: auto !important; padding: 10px 16px !important; }
.contract-file { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; }
.contract-file .inline-form { margin: 0; }
table.compact td { padding: 8px 10px; }
.followup-form { background: var(--bg); padding: 14px; border-radius: 10px; }
.history-item { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.history-item p { margin: 0; }
.history-item:last-child { border-bottom: 0; }
.delete-form { display: inline; margin: 0; }
.task { display: grid; grid-template-columns: 30px 1fr auto auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.task form { margin: 0; }
.task.concluida .task-title { text-decoration: line-through; color: var(--muted); }
button.checkbox { width: 24px; height: 24px; padding: 0 !important; border: 2px solid var(--line); background: #fff; color: var(--brand); border-radius: 6px; font-size: 14px; line-height: 1; }
.task.concluida button.checkbox { background: #e0f2fe; border-color: #7dd3fc; }
fieldset.products { margin-top: 14px; }

@media (max-width: 760px) {
    .kpis { grid-template-columns: 1fr 1fr; }
    .task { grid-template-columns: 30px 1fr auto; }
    .task .tag, .task .muted { grid-column: 2; }
    .history-item { grid-template-columns: 1fr auto; }
    .history-item p { grid-column: 1 / -1; }
}
table.compact { table-layout: fixed; }
table.compact td { overflow-wrap: anywhere; }
@media (max-width: 760px) {
    .inline-form > * { flex: 1 1 100%; width: 100% !important; }
    .inline-form label.inline { flex-wrap: wrap; }
}

/* ---- Parte 5: funil ---- */
.container:has(.board) { max-width: 1400px; }
.board-filters select { width: auto; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(165px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; margin-top: 12px; align-items: start; }
.column { background: #e9eef5; border-radius: 12px; padding: 10px; min-height: 200px; display: flex; flex-direction: column; gap: 8px; border: 2px solid transparent; }
.column.drop { border-color: var(--brand); background: #e0f2fe; }
.column header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 2px 4px 6px; }
.column header strong { font-size: 14px; flex: 1 1 auto; }
.column .count { background: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 700; }
.column .sum { width: 100%; font-size: 12px; color: var(--muted); }
.column.won { background: #ecfdf5; }
.column.lost { background: #fef2f2; }
.cards { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.deal { display: flex; flex-direction: column; gap: 3px; background: #fff; border-radius: 8px; padding: 10px 12px; text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .08); border: 1px solid var(--line); cursor: grab; }
.deal:hover { border-color: var(--brand); }
.deal.dragging { opacity: .4; }
.deal strong { font-size: 14px; }
.deal-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.deal-meta .value { font-weight: 700; color: #047857; }
.stars { color: #f59e0b; letter-spacing: 1px; }
.fu { padding: 0 6px; border-radius: 999px; background: var(--bg); }
.fu-late { background: var(--danger-bg); color: var(--danger); font-weight: 700; }
.fu-today { background: #fef3c7; color: #92400e; font-weight: 700; }
.deal-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.deal-tags span { font-size: 11px; background: #ede9fe; color: #5b21b6; border-radius: 4px; padding: 0 6px; }
.more { font-size: 13px; font-weight: 600; text-decoration: none; padding: 4px; }
.drop-hint { margin: 0; padding: 4px; }

.closing-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.closing-row form { margin: 0; }
.won-btn { background: #16a34a !important; }
.won-btn:hover { background: #15803d !important; }
.lost-form { margin: 0; }
.lost-form.highlight { outline: 3px solid #fca5a5; border-radius: 10px; padding: 6px; }
.reopen { margin-top: 10px; }
.span-2 { grid-column: span 2; }
.timeline-log { list-style: none; padding: 0; margin: 16px 0 0; }
.timeline-log li { border-left: 3px solid var(--line); padding: 4px 0 10px 12px; }
.timeline-log li p { margin: 2px 0 0; }
.timeline-log .ev-followup { border-left-color: var(--brand); }
.timeline-log .ev-nota { border-left-color: #a78bfa; }
@media (max-width: 760px) { .span-2 { grid-column: auto; } .board { grid-auto-columns: 80%; } }

.contact-notes td { padding-top: 0; border-top: 0; }
.contact-notes details summary { margin: 0; }

/* ---- Parte 7: painel ---- */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.dash-grid > .card { margin-top: 20px; }
.kpis.compact { margin-top: 8px; }
.count-badge { display: inline-block; min-width: 24px; text-align: center; background: var(--bg); border-radius: 999px; font-size: 13px; padding: 0 8px; margin-left: 4px; vertical-align: middle; }
.todo { list-style: none; padding: 0; margin: 8px 0 0; }
.todo li { display: grid; grid-template-columns: 86px 1fr; column-gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.todo li:last-child { border-bottom: 0; }
.todo li .muted { grid-column: 2; }
.todo li a { font-weight: 600; text-decoration: none; }
.when { grid-row: span 2; font-size: 12px; font-weight: 700; color: var(--muted); }
.when.late { color: var(--danger); }
.when.today { color: #b45309; }
.hbar { display: grid; grid-template-columns: minmax(120px, 190px) 1fr auto; gap: 10px; align-items: center; padding: 5px 0; text-decoration: none; color: var(--ink); font-size: 13px; }
.hbar-track { height: 12px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--brand); border-radius: 999px; min-width: 2px; }
.hbar-fill.lost { background: #f87171; }
.hbar-value { font-weight: 600; white-space: nowrap; }
th.num { text-align: right; }
@media (max-width: 760px) {
    .dash-grid { grid-template-columns: 1fr; }
    .hbar { grid-template-columns: 1fr auto; }
    .hbar-track { grid-column: 1 / -1; grid-row: 2; }
}

.task > *, .history-item > * { min-width: 0; }

/* Playbook: ilustrações, capas e falas sem botão de copiar */
.pb-figure { margin: 18px 0; text-align: center; }
.pb-figure img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.pb-manual { display: flow-root; }
.pb-cover { float: right; width: 120px; max-height: 110px; object-fit: contain; margin: 0 0 8px 16px; }
.pb-script.quote { background: #f8fafc; border-color: var(--line); }
.pb-script.quote .pb-script-head { background: #f1f5f9; color: var(--muted); }
@media (max-width: 600px) { .pb-cover { width: 80px; } }

.read-online { border-color: #bae6fd; background: #f0f9ff; }
