/* ==========================================================================
   AutoMarketing — design system
   ========================================================================== */
:root {
    --bg: #f5f5f1;
    --surface: #ffffff;
    --surface-2: #ebebe6;
    --surface-3: #f7f7f3;
    --line: #dcdcd5;
    --ink: #161616;
    --ink-2: #4a4a46;
    --muted: #7b7b75;
    --accent: #6e7f1f;
    --accent-ink: #44511a;
    --accent-soft: #f6f8e4;
    --accent-mint: #cfe5c3;
    --ok: #2f7d4f;
    --warn: #b7791f;
    --err: #b42318;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Oswald', 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; font-weight: 600; }
p { margin: 0 0 .6em; }
.muted { color: var(--muted); }
.icon { flex: none; vertical-align: middle; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 22px 14px; background: var(--surface-3); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; text-decoration: none; padding: 0 8px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--ink); color: #fff; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink-2); font-weight: 500; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.is-active { background: var(--ink); color: #fff; }
.sidebar-foot { margin-top: auto; }
.main { padding: 26px 34px 60px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-title { font-size: 26px; margin: 0; letter-spacing: -.01em; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- primitives ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row-wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.panel h3 { font-size: 18px; }
.kicker { display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
.kicker::before { content: ''; width: 18px; height: 1.5px; background: currentColor; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); font-weight: 500; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent; font: 500 16px/1 var(--font); cursor: pointer; text-decoration: none; color: var(--ink); background: transparent; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-loading { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #333; }
.btn-soft { background: var(--surface-2); }
.btn-soft:hover { background: #e0e0da; }
.btn-outline { border-color: var(--ink); background: var(--surface); }
.btn-outline:hover { background: var(--surface-3); }
.btn-ghost { padding: 0 12px; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; }

.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; font-weight: 500; }
.chip-ok { color: var(--ok); border-color: #b9dcc6; background: #f1faf4; }
.chip-warn { color: var(--warn); border-color: #efd8a8; background: #fdf8ee; }
.chip-err { color: var(--err); border-color: #f2c4bf; background: #fdf3f2; }
.badge { display: inline-flex; align-items: center; height: 34px; padding: 0 15px; border-radius: 999px; font-weight: 600; font-size: 16px; }
.badge-dark { background: var(--ink); color: #fff; }

.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid; }
.alert-success { background: #f1faf4; border-color: #b9dcc6; color: var(--ok); }
.alert-error { background: #fdf3f2; border-color: #f2c4bf; color: var(--err); }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 500; font-size: 14px; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 11px 13px; font: 400 15px/1.4 var(--font); color: var(--ink); }
.textarea { min-height: 110px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--accent-mint); border-color: var(--accent); }
.field-error { color: var(--err); font-size: 13px; }
.has-error .input, .has-error .textarea, .has-error .select { border-color: var(--err); }

/* toasts */
.toast-stack { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 360px; font-size: 14px; animation: toast-in .2s ease-out; }
.toast-error { background: var(--err); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* error page / blank */
.blank { background: var(--bg); }
.error-page { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 14px; padding: 20px; }
.error-code { font: 700 72px/1 var(--font-display); }

/* styleguide */
.sg-section { margin-bottom: 36px; }
.sg-title { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; }

/* ==========================================================================
   Peças
   ========================================================================== */
.pieces-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 24px; align-items: start; }
.piece-card { background: var(--surface-2); border-radius: var(--radius-xl); padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 14px; }
.piece-card.is-selected { outline: 2px solid var(--ink); }
.piece-card-head { display: flex; align-items: center; gap: 14px; }
.piece-num { color: var(--muted); font-size: 17px; flex: 1; }
.piece-check input { position: absolute; opacity: 0; pointer-events: none; }
.piece-check span { display: block; width: 28px; height: 28px; border: 2px solid #777; border-radius: 8px; background: var(--surface); cursor: pointer; }
.piece-check input:checked + span { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/16px no-repeat; border-color: var(--ink); }
.piece-preview { display: flex; justify-content: center; }
.photo-credit { color: var(--muted); font-size: 15px; margin: -4px 0 0; }
.photo-credit a { color: var(--ink-2); font-weight: 500; }
.piece-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.piece-title { font-size: 22px; font-weight: 500; margin: 2px 0 0; }
.piece-sub { display: flex; gap: 16px; color: var(--ink-2); margin: 0; font-size: 16px; }
.piece-date { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; font: 500 19px var(--font); color: var(--ink); cursor: pointer; }
.piece-date span { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
.piece-actions { background: var(--surface); border-radius: var(--radius-lg); padding: 14px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.piece-actions-row { display: flex; gap: 12px; flex-wrap: wrap; }
.piece-ai { border-top: 1px solid var(--line); padding-top: 14px; }
.piece-ai-label { display: block; font-weight: 600; margin-bottom: 10px; }
.ai-input { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 6px 6px 6px 16px; }
.ai-input input[type=text] { flex: 1; border: 0; outline: 0; font: 400 16px var(--font); background: transparent; min-width: 0; padding: 10px 0; }
.ai-attach { color: var(--muted); cursor: pointer; padding: 6px; display: grid; }
.ai-send { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--accent-mint); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; }
.ai-send:hover { background: #bcdcac; }

/* ---------- previews (moldura de rede) ---------- */
.pv-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--ink); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); flex: none; }
.pv-avatar-sm { width: 40px; height: 40px; }
.pv-avatar-xs { width: 22px; height: 22px; border-width: 0; box-shadow: none; }
.pv-time { color: var(--muted); font-weight: 400; }

.pv-stories { position: relative; width: 100%; max-width: 480px; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #888; box-shadow: var(--shadow); }
.pv-stories-bars { position: absolute; inset: 12px 16px auto; display: flex; gap: 6px; z-index: 3; }
.pv-stories-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.45); }
.pv-stories-bars .is-on { background: #fff; }
.pv-stories-head { position: absolute; top: 26px; left: 16px; right: 16px; display: flex; align-items: center; gap: 10px; color: #fff; z-index: 3; }
.pv-stories-head .pv-time { color: rgba(255,255,255,.8); }
.pv-stories-art { position: absolute; inset: 0; }
.pv-stories-art .art { height: 100%; }
.pv-stories-art .art-body { padding-bottom: 96px; }
.pv-stories-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 16px; display: flex; align-items: center; gap: 14px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.35)); z-index: 3; }
.pv-stories-reply { flex: 1; border: 1.5px solid rgba(255,255,255,.8); border-radius: 999px; padding: 10px 18px; }

.pv-feed { width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.pv-feed-head { display: flex; align-items: center; gap: 12px; padding: 16px; }
.pv-feed-head > div { flex: 1; display: flex; flex-direction: column; }
.pv-feed-head strong { font-size: 18px; font-weight: 500; }
.pv-more { color: var(--ink-2); }
.pv-caption { padding: 0 16px 16px; font-size: 17px; line-height: 1.5; margin: 0; }
.pv-caption .more { color: var(--muted); cursor: pointer; }
.pv-feed-icons { display: flex; gap: 16px; padding: 12px 16px; }
.pv-linkedin-actions { display: flex; justify-content: space-around; border-top: 1px solid var(--line); padding: 12px 8px; color: var(--ink-2); }
.pv-linkedin-actions span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 500; font-size: 15px; }

/* ---------- artes (renderizáveis) ---------- */
.art { position: relative; overflow: hidden; display: flex; flex-direction: column; background: var(--accent-soft); color: var(--ink); }
.art-photo { flex: 0 0 46%; background-size: cover; background-position: center; }
.art-body { flex: 1; padding: 9% 7% 7%; display: flex; flex-direction: column; justify-content: center; position: relative; }
.art-kicker { display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 500; color: var(--accent-ink); margin-bottom: 14px; }
.art-kicker::before { content: ''; width: 20px; height: 1.5px; background: currentColor; }
.art-headline { font: 700 38px/1.08 var(--font-display); letter-spacing: -.005em; margin: 0 0 14px; }
.art-headline mark { background: none; color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.art-sub { font-size: 18px; color: var(--ink-2); margin: 0 0 18px; }
.art-cta { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-ink); font-weight: 500; font-size: 15px; }
.art-handle { margin-top: auto; align-self: flex-end; font-size: 12px; color: var(--ink-2); padding-top: 16px; }
.art-list { background: #f5f3ec; padding: 12% 8% 6%; justify-content: flex-start; }
.art-blob { position: absolute; top: -18%; right: -14%; width: 46%; aspect-ratio: 1; border-radius: 50%; background: #e3e6d0; }
.art-list .art-headline { position: relative; }
.art-items { list-style: none; padding: 0; margin: 4px 0 14px; position: relative; }
.art-items li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid #ddd9cc; }
.art-items li:last-child { border-bottom: 0; }
.art-items strong { display: block; font-weight: 400; font-size: 16px; }
.art-items small { color: var(--muted); font-size: 13px; }
.art-item-ico { width: 26px; height: 26px; border-radius: 6px; background: #8a8a80; color: #fff; display: grid; place-items: center; flex: none; }
.art-foot { margin-top: auto; padding-top: 20px; display: flex; align-items: center; justify-content: space-between; }
.art-foot .art-handle { margin: 0; padding: 0; }

/* ---------- responsivo ---------- */
@media (max-width: 960px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
    .nav { flex-direction: row; flex-wrap: wrap; }
    .nav-link span { display: none; }
    .main { padding: 20px 16px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Fase 1 — auth, projetos, formulários
   ========================================================================== */
.gap-sm { gap: 12px; }
.align-start { align-items: start; }
.align-end { align-items: flex-end; }
.span-2 { grid-column: span 2; }
.grow { flex: 1; }
.mt { margin-top: 22px; }
.mt-sm { margin-top: 8px; }
.small { font-size: 13px; }
.text-right { text-align: right; }
.text-err { color: var(--err); }
.label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 8px; }
.btn-block { width: 100%; }
.input-sm, .select-sm { padding: 7px 10px; font-size: 14px; }
.select-sm { width: auto; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.narrow { max-width: 560px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.field small.muted { margin-top: -2px; font-size: 13px; }

/* auth */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-side { background: var(--ink); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; }
.brand-light .brand-mark { background: #fff; color: var(--ink); }
.kicker-light { color: #cfd5b5; }
.auth-headline { font: 700 44px/1.08 var(--font-display); max-width: 520px; margin-bottom: 26px; }
.auth-headline mark { background: none; color: #c9dc7a; text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }
.auth-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; color: #dcdcd5; }
.auth-points li { display: flex; gap: 10px; align-items: center; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-form { width: 100%; max-width: 420px; }
.auth-form h1 { font-size: 30px; }
.auth-alt { text-align: center; margin-top: 18px; color: var(--muted); }
.auth-alt a { color: var(--ink); font-weight: 500; }

/* seletor de projeto */
.switcher { position: relative; }
.switcher-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; font: 500 15px var(--font); color: var(--ink); text-align: left; }
.switcher-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; z-index: 50; }
.switcher-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: 10px; font: 400 14px var(--font); color: var(--ink); text-decoration: none; cursor: pointer; text-align: left; }
.switcher-item:hover, .switcher-item.is-active { background: var(--surface-2); }
.project-dot { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; color: #fff; font-weight: 600; font-size: 14px; flex: none; }
.project-dot-sm { width: 22px; height: 22px; border-radius: 6px; font-size: 11px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px 6px 0; border-top: 1px solid var(--line); margin-top: 8px; }
.me-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-mint); color: var(--accent-ink); display: grid; place-items: center; font-weight: 600; }
.me-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.me-info strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-info small { color: var(--muted); font-size: 12px; }

/* projetos */
.project-card { display: flex; flex-direction: column; gap: 14px; }
.project-card.is-active { border-color: var(--ink); }
.project-card-head { display: flex; gap: 12px; align-items: flex-start; }
.project-card-head > div { flex: 1; }
.project-card-head h3 { margin: 0; }
.project-card-head .project-dot { width: 42px; height: 42px; font-size: 18px; border-radius: 12px; }
.project-edit { border-top: 1px solid var(--line); padding-top: 14px; }
.danger-zone { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 13px; }
.danger-zone .input { max-width: 160px; }

/* formulário de negócio */
.form-sections { display: flex; flex-direction: column; gap: 18px; }
.form-sections .panel .grid { gap: 0 18px; }
.repeater { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.repeater-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; align-items: center; }
.color-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.color-item { position: relative; }
.color-item input[type=color] { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 3px; background: var(--surface); cursor: pointer; }
.color-item button { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 11px; line-height: 1; display: none; cursor: pointer; padding: 0; }
.color-item:hover button { display: grid; place-items: center; }
.logo-field { display: flex; gap: 12px; align-items: center; }
.logo-preview { width: 52px; height: 52px; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.form-footer { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 16px; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 30%); }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; min-width: 120px; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.progress-inline { display: flex; align-items: center; gap: 10px; }

/* tabela / listas */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }

/* painel: passos */
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps li > div { flex: 1; display: flex; flex-direction: column; }
.steps li > div a { font-weight: 500; text-decoration: none; }
.step-n { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.steps li.is-done .step-n { background: var(--accent); border-color: var(--accent); color: #fff; }

@media (max-width: 960px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .span-2 { grid-column: auto; }
}

/* ==========================================================================
   Fase 2 — estratégia, personas, campanhas
   ========================================================================== */
.alert-info { background: #f3f5ec; border-color: #d9dfc3; color: var(--accent-ink); display: flex; align-items: center; gap: 8px; }
.alert-warn { background: #fdf8ee; border-color: #efd8a8; color: #8a5a12; }
.alert a { color: inherit; font-weight: 600; }
.section-title { font-size: 18px; margin: 30px 0 14px; }
.mb { margin-bottom: 12px; }
.gap-xs { gap: 4px; }
.nowrap { white-space: nowrap; }
.chip-sm { height: 24px; padding: 0 10px; font-size: 12.5px; }
.chip-muted { color: var(--muted); }
.prio-alta { color: var(--err); border-color: #f2c4bf; background: #fdf3f2; }
.prio-media { color: var(--warn); border-color: #efd8a8; background: #fdf8ee; }
.prio-baixa { color: var(--ok); border-color: #b9dcc6; background: #f1faf4; }
.label-sm { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 10px 0 4px; }
.bullets { margin: 0; padding-left: 18px; }
.bullets li { margin: 3px 0; }
.quotes { list-style: none; margin: 0; padding: 0; }
.quotes li { padding: 6px 10px; border-left: 2px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; margin: 6px 0; font-size: 14px; }
.empty { text-align: center; padding: 60px 20px; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty .icon { color: var(--muted); }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.pipeline { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pipeline-step { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-weight: 500; font-size: 14px; position: relative; padding-left: 34px; }
.pipeline-dot { position: absolute; left: 13px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.pipeline-step.is-done .pipeline-dot { background: var(--accent); }
.pipeline-step.is-running .pipeline-dot, .pipeline-step.is-queued .pipeline-dot { background: var(--warn); animation: pulse 1s ease-in-out infinite alternate; }
.pipeline-step.is-failed .pipeline-dot { background: var(--err); }
@keyframes pulse { to { opacity: .3; } }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-color: var(--ink); }
.study-toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.regen { display: flex; gap: 8px; flex: 1; justify-content: flex-end; max-width: 620px; margin-left: auto; }
.regen .input { flex: 1; }

.study { display: flex; flex-direction: column; gap: 18px; }
.lead { font-size: 19px; line-height: 1.5; color: var(--ink); }
.lead-panel { background: var(--accent-soft); border-color: #e3e8c4; }
.statement { margin: 14px 0 0; padding: 16px 18px; background: var(--surface); border-radius: var(--radius); font-size: 16px; line-height: 1.55; border-left: 3px solid var(--accent); }
.item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item p { margin: 4px 0 0; }
.swot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.swot-q { border-radius: var(--radius); padding: 14px 16px; }
.swot-q h4 { margin-bottom: 6px; }
.swot-s { background: #f1faf4; } .swot-w { background: #fdf3f2; } .swot-o { background: #f3f5ec; } .swot-t { background: #fdf8ee; }
.mini-card { background: var(--surface-3); border-radius: var(--radius); padding: 14px 16px; }
.mini-card h4 { margin-bottom: 4px; }
.cards-grid-wide { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.tips-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.tip-head { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.campaign-suggestion { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.campaign-suggestion > div, .campaign-suggestion > ul { align-self: stretch; }
.objective { display: flex; gap: 6px; align-items: center; font-weight: 500; color: var(--accent-ink); margin: 0; }

.personas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 18px; align-items: start; }
.persona.is-primary { border-color: var(--accent); }
.persona-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.persona-head > div { flex: 1; }
.persona-head h3 { margin: 0; }
.persona-head p { margin: 0; }
.persona-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-mint); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 20px; flex: none; }
.persona-quote { margin: 0 0 12px; font-style: italic; color: var(--accent-ink); font-size: 16px; }
.persona-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin-bottom: 12px; }
.persona-edit { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 14px; }

.check-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill input { position: absolute; opacity: 0; }
.check-pill span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 14px; }
.check-pill input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.check-pill input:focus-visible + span { outline: 2px solid var(--accent-mint); }
@media (max-width: 960px) { .swot, .persona-lists { grid-template-columns: 1fr; } .regen { max-width: none; } }

/* ==========================================================================
   Fase 3 — análise do site, tarefas
   ========================================================================== */
.audit-form { display: flex; gap: 14px; align-items: flex-end; margin-bottom: 18px; }
.audit-form .field { margin: 0; }
.audit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.audit-main, .audit-side { display: flex; flex-direction: column; gap: 18px; }
.audit-summary { display: flex; gap: 22px; align-items: center; }
.score-ring { width: 104px; height: 104px; border-radius: 50%; border: 8px solid var(--line); display: flex; align-items: baseline; justify-content: center; padding-top: 26px; flex: none; }
.score-ring strong { font: 700 34px/1 var(--font-display); }
.score-ring small { color: var(--muted); }
.is-good { border-color: #7fbf93; color: var(--ok); }
.is-mid { border-color: #e7c378; color: var(--warn); }
.is-bad { border-color: #ec9a91; color: var(--err); }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding: 6px 0 6px 26px; position: relative; }
.checks li::before { content: '✓'; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }
.issue strong { margin-right: 4px; }
.check { border-bottom: 1px solid var(--line); padding: 10px 0; }
.check:last-child { border-bottom: 0; }
.check summary { cursor: pointer; display: flex; gap: 10px; align-items: center; font-weight: 500; list-style: none; }
.check summary small { margin-left: auto; }
.check p { margin: 8px 0 4px 20px; color: var(--ink-2); }
.sev-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; border: 0; }
.sev-dot.prio-alta { background: var(--err); } .sev-dot.prio-media { background: var(--warn); } .sev-dot.prio-baixa { background: var(--ok); }
.psi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 12px; }
.psi-item { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.psi-score { width: 58px; height: 58px; border-radius: 50%; border: 5px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.metrics { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
.metrics dt { color: var(--muted); }
.metrics dd { margin: 0; font-weight: 500; text-align: right; }
.page-list { list-style: none; padding: 0; margin: 0 0 10px; max-height: 420px; overflow-y: auto; }
.page-list li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.page-list li div { display: flex; flex-direction: column; min-width: 0; }
.page-list strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-list small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-code { font: 600 12px var(--font); background: #f1faf4; color: var(--ok); border-radius: 6px; padding: 2px 6px; height: fit-content; }
.status-code.is-bad { background: #fdf3f2; color: var(--err); }

.kanban { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.kanban-col { background: var(--surface-2); border-radius: var(--radius-lg); padding: 14px; min-height: 300px; transition: background .15s; }
.kanban-col.is-over { background: #e2e4d4; }
.kanban-col header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 0 4px; }
.kanban-col h3 { font-size: 15px; margin: 0; }
.kanban-count { background: var(--surface); border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 600; }
.kanban-list { display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.task-card { background: var(--surface); border-radius: var(--radius); padding: 12px 14px; border: 1px solid var(--line); cursor: grab; transition: box-shadow .15s; }
.task-card:hover { box-shadow: var(--shadow); }
.task-card.is-dragging { opacity: .45; }
.task-card h4 { font-size: 15px; font-weight: 500; margin: 6px 0 4px; }
.task-top { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.task-cat { font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.task-src { margin-left: auto; }
.task-desc { font-size: 13px; color: var(--ink-2); margin: 0; }
.task-foot { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 8px; align-items: center; }
.kanban-col[data-status="done"] .task-card h4 { text-decoration: line-through; color: var(--muted); }

.modal { border: 0; border-radius: var(--radius-lg); padding: 22px; width: min(620px, 94vw); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal::backdrop { background: rgba(20,20,20,.45); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-head h3 { margin: 0; }
.modal-foot { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
@media (max-width: 1100px) { .audit-grid { grid-template-columns: 1fr; } }
@media (max-width: 960px) { .kanban { grid-template-columns: 1fr; } .audit-form { flex-direction: column; align-items: stretch; } }

/* ==========================================================================
   Fase 4 — artes escaláveis (cqw), layouts, editor de peças
   As medidas da arte são relativas à largura (container query) para que
   card, editor e PNG (432px × 2.5) fiquem idênticos.
   ========================================================================== */
.art { container-type: inline-size; height: 100%; width: 100%; }
.pv-feed-art { position: relative; overflow: hidden; }
.pv-feed-art .art { aspect-ratio: auto !important; min-height: 0 !important; position: absolute; inset: 0; }
.art-kicker { font-size: 2.8cqw; gap: 2.3cqw; margin-bottom: 3.2cqw; }
.art-kicker::before { width: 4.6cqw; }
.art-headline { font-size: 8.8cqw; margin-bottom: 3.2cqw; }
.art-headline mark { text-underline-offset: 1.4cqw; text-decoration-thickness: .5cqw; }
.art-sub { font-size: 4.2cqw; margin-bottom: 4.2cqw; }
.art-cta { font-size: 3.5cqw; gap: 1.8cqw; }
.art-cta .icon { width: 3.7cqw; height: 3.7cqw; }
.art-handle { font-size: 2.8cqw; padding-top: 3.7cqw; }
.art-list { padding: 11cqw 8cqw 6cqw; }
.art-list .art-headline { font-size: 7.4cqw; }
.art-items { margin: 1cqw 0 3.2cqw; }
.art-items li { gap: 3.2cqw; padding: 3.2cqw 0; }
.art-items strong { font-size: 3.7cqw; }
.art-items small { font-size: 3cqw; }
.art-item-ico { width: 6cqw; height: 6cqw; border-radius: 1.4cqw; }
.art-item-ico .icon { width: 3.7cqw; height: 3.7cqw; }
.art-foot { padding-top: 4.6cqw; }
.art-foot .pv-avatar-xs { width: 5cqw; height: 5cqw; }
.art-body { padding: 9cqw 7cqw 7cqw; }
.pv-avatar { background-color: var(--ink); background-size: cover; background-position: center; }

.art-quote { background: var(--ink); color: #fff; justify-content: center; }
.art-quote .art-bg, .art-photo-full .art-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.art-quote .art-bg { opacity: .28; }
.art-quote .art-body { position: relative; justify-content: center; padding: 12cqw 9cqw; }
.art-quote .art-headline { font-size: 11cqw; color: #fff; }
.art-quote .art-headline mark { color: #c9dc7a; }
.art-quote .art-kicker, .art-quote .art-cta { color: #c9dc7a; }
.art-quote .art-sub, .art-quote .art-handle { color: #dcdcd5; }
.art-dots { display: flex; gap: 1.4cqw; margin-top: 5cqw; }
.art-dots span { width: 2cqw; height: 2cqw; border-radius: 50%; background: rgba(255,255,255,.35); }
.art-dots span.is-on { background: #fff; }
.art-photo-full { background: #333; color: #fff; justify-content: flex-end; }
.art-photo-full .art-body { position: relative; justify-content: flex-end; background: linear-gradient(transparent, rgba(0,0,0,.72) 55%); padding-top: 30cqw; flex: none; }
.art-photo-full .art-headline { color: #fff; }
.art-photo-full .art-headline mark { color: #c9dc7a; }
.art-photo-full .art-kicker, .art-photo-full .art-cta { color: #c9dc7a; }
.art-photo-full .art-sub, .art-photo-full .art-handle { color: #eee; }
.art-photo-top .art-photo { flex: 0 0 46%; }
.art-photo-top:not(:has(.art-photo)) .art-body { justify-content: center; }

.pv-article { padding: 0 18px 18px; }
.pv-article h3 { font: 700 22px/1.2 var(--font-display); }
.pv-article p { font-size: 15px; color: var(--ink-2); }

.piece-num { text-decoration: none; }
.piece-num:hover { color: var(--ink); text-decoration: underline; }
.piece-preview { position: relative; }
.piece-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(245,245,241,.75); border-radius: 22px; font-weight: 600; }
.piece-card.is-working .ai-input { opacity: .5; }
.piece-date.is-static { cursor: default; }
.ai-file { display: block; margin-top: 6px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.bulk-bar { display: flex; gap: 8px; align-items: center; margin-left: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 14px; }
.modal-sm { width: min(420px, 94vw); }
.flip { transform: scaleX(-1); }

.editor { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 22px; align-items: start; }
.editor-form { display: flex; flex-direction: column; gap: 16px; }
.editor-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding-bottom: 10px; }
.editor-preview { background: var(--surface-2); border-radius: var(--radius-xl); padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.editor-preview .js-preview { width: 100%; display: flex; justify-content: center; }
.editor-preview .pv-stories { max-width: 330px; }
.repeater-2 { grid-template-columns: 1fr 1fr; margin-bottom: 8px; }
.slides { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.slide-row { display: grid; grid-template-columns: 24px .8fr 1.4fr 1fr 1.4fr auto; gap: 6px; align-items: center; }
.slide-n { font-weight: 600; color: var(--muted); text-align: center; }
.slide-nav { display: flex; gap: 6px; }
.slide-nav button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.slide-nav button.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.image-current { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; font-size: 14px; }
.image-current img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; }
.image-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.unsplash-search { display: flex; gap: 6px; flex: 1; min-width: 240px; }
.unsplash-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 12px; }
.unsplash-item { border: 0; padding: 0; background: none; cursor: pointer; text-align: left; position: relative; }
.unsplash-item img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; display: block; }
.unsplash-item small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unsplash-item.is-loading { opacity: .5; }
.render-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.render-thumb img { width: 80px; border-radius: 8px; border: 1px solid var(--line); display: block; }
.revisions li { align-items: flex-start; gap: 10px; }
@media (max-width: 1200px) { .editor { grid-template-columns: 1fr; } .editor-side { position: static; max-height: none; } }
.art-quote .art-handle { position: absolute; right: 9cqw; bottom: 7cqw; padding: 0; }
/* container da arte fica no wrapper: paddings em cqw da própria .art passam a ser relativos à largura total */
.art { container-type: normal; }
.art-wrap { container-type: inline-size; width: 100%; height: 100%; }
.pv-feed-art .art-wrap { position: absolute; inset: 0; }
.pv-feed-art .art { position: static; height: 100%; }
.pv-stories-art .art-wrap { height: 100%; }
.render-frame .art-wrap { width: 100%; height: 100%; }
/* @handle fixo no rodapé da arte, independente do conteúdo (permite centralizar o texto) */
.art-body { position: relative; }
.art-body .art-handle { position: absolute; right: 7cqw; bottom: 5cqw; margin: 0; padding: 0; }
.pv-stories-art .art-body .art-handle { bottom: calc(96px + 2cqw); }
.art-photo-top .art-body { justify-content: center; }
.pv-stories::before { content: ''; position: absolute; inset: 0 0 auto; height: 90px; background: linear-gradient(rgba(0,0,0,.35), transparent); z-index: 2; pointer-events: none; }
.pv-stories-head { text-shadow: 0 1px 3px rgba(0,0,0,.45); }

/* ==========================================================================
   Fase 5 — calendário
   ========================================================================== */
.cal-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-label { font-size: 20px; margin: 0 8px; min-width: 190px; text-align: center; }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.segmented a { padding: 6px 16px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 14px; color: var(--ink-2); }
.segmented a.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.cal-toolbar form { margin-left: auto; }
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.ev-swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.camp-swatch { width: 14px; height: 6px; border-radius: 3px; display: inline-block; }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--line); gap: 1px; }
.cal-head { background: var(--surface-3); padding: 8px 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cal-day { background: var(--surface); min-height: 128px; padding: 6px; display: flex; flex-direction: column; gap: 3px; transition: background .12s; min-width: 0; }
.cal-week .cal-day { min-height: 460px; }
.cal-day.is-out { background: #fafaf7; }
.cal-day.is-out .cal-num { color: #c3c3bc; }
.cal-day.is-past { background: #fbfbf9; }
.cal-day.is-over { background: var(--accent-soft); outline: 2px dashed var(--accent); outline-offset: -3px; }
.cal-day-head { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-height: 22px; }
.cal-num { font-weight: 600; font-size: 13px; padding: 2px 6px; border-radius: 999px; }
.cal-day.is-today .cal-num { background: var(--ink); color: #fff; }
.cal-date { font-size: 10.5px; padding: 1px 6px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cal-date-feriado { background: #fdf3f2; color: var(--err); }
.cal-date-comemorativa { background: #f3f5ec; color: var(--accent-ink); }
.camp-bar { display: block; height: 14px; border-radius: 3px; color: #fff; font-size: 10px; line-height: 14px; padding: 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.cal-events { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.ev { display: flex; align-items: center; gap: 5px; width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 3px 5px; font: 500 12px var(--font); color: var(--ink); cursor: pointer; text-align: left; min-width: 0; }
.ev[draggable=true] { cursor: grab; }
.ev:hover { box-shadow: var(--shadow); }
.ev.is-dragging { opacity: .4; }
.ev-time { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.ev-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-suggested, .ev-swatch.ev-suggested { border-style: dashed; border-color: #b9b9b0; background: #fbfbf8; }
.ev-approved, .ev-swatch.ev-approved { border-color: #b9dcc6; background: #f1faf4; }
.ev-scheduled, .ev-swatch.ev-scheduled { border-color: #efd8a8; background: #fdf8ee; }
.ev-published, .ev-swatch.ev-published { border-color: var(--ink); background: var(--ink); color: #fff; }
.ev-published .ev-time { color: #bbb; }
.ev-failed, .ev-swatch.ev-failed { border-color: var(--err); background: #fdf3f2; }
.ev-swatch { border: 1px solid; }
.net { flex: none; font-size: 9.5px; font-weight: 700; color: #fff; border-radius: 4px; padding: 1px 4px; line-height: 1.3; }
.net-instagram { background: #d62976; } .net-facebook { background: #1877f2; } .net-linkedin { background: #0a66c2; }
.net-x { background: #111; } .net-tiktok { background: #010101; color: #25f4ee; } .net-youtube { background: #ff0000; }
.best-times { border-top: 1px dashed var(--line); padding-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.best { font-size: 11px; color: var(--muted); display: flex; gap: 5px; align-items: center; }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--bg); box-shadow: -10px 0 40px rgba(0,0,0,.15); z-index: 90; display: flex; flex-direction: column; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.drawer-body { overflow-y: auto; padding: 18px; }
@media (max-width: 960px) { .cal { grid-template-columns: 1fr; } .cal-head { display: none; } .cal-day { min-height: 0; } .cal-day.is-out { display: none; } }

/* ==========================================================================
   Fase 6 — conexões, publicações, desempenho
   ========================================================================== */
.sandbox-bar { justify-content: space-between; flex-wrap: wrap; }
.integrations { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.integration { display: flex; flex-direction: column; gap: 12px; }
.integration-head { display: flex; gap: 12px; align-items: flex-start; }
.integration-head h3 { margin: 0 0 2px; }
.net-lg { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 14px; }
.net-google_analytics { background: #e37400; } .net-search_console { background: #4285f4; } .net-google_ads { background: #34a853; } .net-meta_ads { background: #0866ff; }
.account { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.account-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; font-weight: 600; flex: none; }
.account-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.account-info strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-select { cursor: pointer; }
.integration-foot { margin-top: auto; }
.setup summary { cursor: pointer; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; word-break: break-all; }
.pub-list { display: flex; flex-direction: column; gap: 6px; }
.pub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; background: var(--surface); border-radius: 12px; padding: 8px 12px; }
.pub-status { font-weight: 600; }
.pub-published .pub-status { color: var(--ok); } .pub-failed .pub-status { color: var(--err); } .pub-queued .pub-status, .pub-publishing .pub-status { color: var(--warn); }
.pub-metrics { display: flex; gap: 10px; margin-left: auto; color: var(--ink-2); }
.perf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--surface-3); border-radius: var(--radius); padding: 12px 14px; }
.kpi small { color: var(--muted); display: block; font-size: 12px; }
.kpi strong { font: 700 24px/1.2 var(--font-display); }

/* ==========================================================================
   Fase 7 — leads / inbox
   ========================================================================== */
.inbox-status { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.status-pill { display: inline-flex; gap: 6px; align-items: center; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-size: 14px; }
.status-pill.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.inbox-search { min-width: 260px; }
.inbox { display: grid; grid-template-columns: 380px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; min-height: 560px; }
.inbox-list { border-right: 1px solid var(--line); overflow-y: auto; max-height: calc(100vh - 230px); }
.inbox-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.inbox-item:hover { background: var(--surface-3); }
.inbox-item.is-active { background: var(--accent-soft); }
.inbox-item.is-unread strong { font-weight: 700; }
.inbox-item.is-unread .inbox-avatar { box-shadow: 0 0 0 2px var(--accent); }
.inbox-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 600; flex: none; }
.inbox-avatar-lg { width: 52px; height: 52px; font-size: 20px; background: var(--accent-mint); color: var(--accent-ink); }
.inbox-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inbox-top { display: flex; justify-content: space-between; gap: 8px; }
.inbox-top strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-top small { color: var(--muted); flex: none; }
.inbox-sub { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.inbox-more { margin: 10px auto; display: flex; width: fit-content; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.st-novo.dot, .status-btn.st-novo.is-on { background: #2f6db5; } .st-qualificado.dot, .status-btn.st-qualificado.is-on { background: var(--warn); }
.st-ganho.dot, .status-btn.st-ganho.is-on { background: var(--ok); } .st-perdido.dot, .status-btn.st-perdido.is-on { background: #8a8a80; }
.tag-mini { background: var(--surface-2); border-radius: 999px; padding: 0 7px; font-size: 11px; }
.inbox-detail { overflow-y: auto; max-height: calc(100vh - 230px); }
.lead { padding: 22px 26px; display: flex; flex-direction: column; gap: 16px; }
.lead-head { display: flex; gap: 14px; align-items: center; }
.lead-head h2 { margin: 0; font-size: 22px; }
.lead-head p { margin: 2px 0 0; }
.lead-status { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; width: fit-content; flex-wrap: wrap; }
.status-btn { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font: 500 14px var(--font); cursor: pointer; color: var(--ink-2); }
.status-btn.is-on { color: #fff; }
.lead-contact { display: flex; gap: 8px; flex-wrap: wrap; }
.lead-section { border-top: 1px solid var(--line); padding-top: 14px; }
.lead-fields { display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; margin: 0; }
.lead-fields dt { color: var(--muted); }
.lead-fields dd { margin: 0; font-weight: 500; }
.lead-fields .break { word-break: break-all; font-weight: 400; }
.lead-message { margin-top: 12px; background: var(--surface-3); border-radius: var(--radius); padding: 14px 16px; line-height: 1.55; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 13px; }
.tag button { border: 0; background: none; cursor: pointer; color: inherit; font-size: 15px; line-height: 1; padding: 0 4px; }
.tag-input { border: 1px dashed var(--line); border-radius: 999px; padding: 4px 10px; font: 13px var(--font); width: 110px; }
.note-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.note-form .textarea { min-height: 64px; }
.notes { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.notes li { background: #fffbea; border: 1px solid #f1e6b8; border-radius: 12px; padding: 10px 40px 10px 14px; position: relative; font-size: 14px; }
.notes li p { margin: 4px 0 0; }
.notes .icon-btn { position: absolute; top: 6px; right: 6px; }
.form-card { margin-bottom: 16px; }
.form-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.form-card-head h3 { margin: 0; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.copy-row { display: flex; gap: 6px; align-items: flex-start; }
.copy-row .input, .copy-row .textarea { flex: 1; }
.code, pre.code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
pre.code { background: var(--surface-2); padding: 10px; border-radius: 10px; white-space: pre-wrap; color: var(--ink); }
.utm-builder { display: flex; flex-direction: column; gap: 6px; }
.utm-builder > select { width: 100%; }
.fields-editor { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.field-row { display: grid; grid-template-columns: 1.4fr 1fr 1.6fr auto auto; gap: 8px; align-items: center; }
@media (max-width: 1100px) { .inbox { grid-template-columns: 1fr; } .inbox-list { max-height: 360px; border-right: 0; border-bottom: 1px solid var(--line); } .share-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Fase 8 — vídeos
   ========================================================================== */
.videos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.video-card { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 8px; }
.video-thumb { position: relative; aspect-ratio: 9 / 16; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.video-thumb.is-square { aspect-ratio: 1; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; padding: 2px 7px; border-radius: 6px; }
.video-info { display: flex; flex-direction: column; }
.video-info strong { font-weight: 500; }
.video-status { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.video-editor { grid-template-columns: minmax(0, 1fr) 400px; }
.video-player { width: 100%; max-width: 340px; aspect-ratio: 9 / 16; border-radius: 18px; background: #000; }
.video-player.is-square, .scene-preview.is-square { aspect-ratio: 1; }
.scene-preview { width: 100%; max-width: 340px; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.scenes { display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.scene-row { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.scene-row.is-current { border-color: var(--accent); background: var(--accent-soft); }
.scene-n { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.scene-fields .field { margin-bottom: 8px; }
.scene-media { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.scene-media .input { flex: 1; min-width: 160px; }
.scene-media .dur { width: 64px; display: inline-block; }
.scene-thumb { width: 40px; height: 56px; border-radius: 8px; background: var(--surface-2) center/cover; flex: none; border: 1px solid var(--line); }

/* arte da cena (mesmo HTML no preview e no frame do vídeo) */
.scene { position: relative; width: 100%; height: 100%; overflow: hidden; background: radial-gradient(120% 80% at 20% 10%, color-mix(in srgb, var(--scene-bg) 70%, #6e7f1f), var(--scene-bg)); color: #fff; font-family: var(--font); }
.scene-photo { position: absolute; inset: 0; background-size: cover; background-position: center; }
.scene-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.55) 62%, rgba(0,0,0,.85) 100%); }
.scene.no-photo .scene-shade { background: none; }
.scene-body { position: absolute; left: 8cqw; right: 8cqw; bottom: 22cqw; }
.scene-text { font: 700 11cqw/1.05 var(--font-display); margin: 0; text-shadow: 0 .6cqw 2.4cqw rgba(0,0,0,.35); letter-spacing: -.01em; }
.scene-first .scene-text { font-size: 12.5cqw; }
.scene-text mark { background: var(--scene-accent); color: #161616; padding: 0 1.6cqw; border-radius: 1.6cqw; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.scene.no-photo .scene-body { top: 50%; bottom: auto; transform: translateY(-50%); }
.scene-cta { display: inline-block; margin-top: 5cqw; background: #fff; color: #161616; font-weight: 700; font-size: 5cqw; padding: 3cqw 6cqw; border-radius: 999px; }
.scene-brand { position: absolute; left: 8cqw; bottom: 8cqw; display: flex; align-items: center; gap: 2.4cqw; font-size: 3.6cqw; font-weight: 600; opacity: .95; }
.scene-logo { width: 8cqw; height: 8cqw; border-radius: 50%; background: #fff center/cover; }
.render-frame .art-wrap { width: 100%; height: 100%; }
@media (max-width: 1200px) { .video-editor { grid-template-columns: 1fr; } }
.pv-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene-text { line-height: 1.24; }
.scene-text mark { padding: .3cqw 1.8cqw; border-radius: 1.4cqw; }
.scene-text { line-height: 1.08; }
.scene-text mark { background: none; color: var(--scene-accent); padding: 0; border-radius: 0; text-decoration: underline; text-decoration-thickness: .7cqw; text-underline-offset: 1.6cqw; }
.scene-media .input.dur { flex: none; width: 70px; }

/* IA e chaves */
.spend-panel { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; align-items: flex-start; }
.spend-panel > div:first-child { flex: 1; min-width: 280px; }
.spend-value { font: 700 34px/1.1 var(--font-display); margin-bottom: 8px; }
.spend-tasks { display: flex; gap: 12px; flex-wrap: wrap; }
.spend-tasks > div { background: var(--surface-3); border-radius: var(--radius); padding: 10px 14px; display: flex; flex-direction: column; min-width: 150px; }
.providers { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.provider { display: flex; flex-direction: column; gap: 8px; }
.provider-head { display: flex; justify-content: space-between; align-items: center; }
.provider-head h3 { margin: 0; font-size: 16px; }
.key-form { display: flex; flex-direction: column; gap: 8px; }
.route-block { border-top: 1px solid var(--line); padding: 12px 0; }
.route-block h4 { margin: 0 0 8px; }
.route-row { display: grid; grid-template-columns: 24px 260px 1fr auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.route-n { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.radio { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 6px 0; }
@media (max-width: 960px) { .route-row { grid-template-columns: 24px 1fr; } }
