:root {
  --ink: #05070c;
  --muted: #67706d;
  --paper: #f7f7f4;
  --surface: #ffffff;
  --green: #050b18;
  --green-2: #315bce;
  --gold: #3a68ff;
  --border: #d8dfef;
  --danger: #a23b35;
  --shadow: 0 18px 45px rgba(23, 26, 28, .07);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); }
body { margin: 0; min-height: 100vh; }
a { color: var(--green-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--green); color: #fff; padding: 30px 20px 22px; display: flex; flex-direction: column; }
.brand { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 7px; color: inherit; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; width: 188px; max-width: 100%; height: auto; }
.brand-label { display: block; padding-left: 2px; font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.64); }
.nav { display: grid; gap: 7px; margin-top: 38px; }
.nav a { color: rgba(255,255,255,.72); padding: 11px 13px; border-radius: 10px; font-size: 15px; text-decoration: none; border: 1px solid transparent; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav a.active { color: #fff; background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.13); }
.sidebar-footer { margin-top: auto; display: grid; gap: 8px; padding: 16px 4px 0; border-top: 1px solid rgba(255,255,255,.13); }
.user-email { color: rgba(255,255,255,.75); font-size: 12px; word-break: break-all; }
.main { padding: 38px clamp(24px, 4vw, 64px) 60px; min-width: 0; }
.topbar { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-weight: 800; }
h1 { margin-bottom: 0; font-size: clamp(30px, 4vw, 46px); letter-spacing: -.025em; }
h2 { font-size: 25px; margin-bottom: 0; }
h3 { font-size: 18px; }
.eyebrow { display: block; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; color: var(--gold); margin-bottom: 7px; }
.muted { color: var(--muted); font-size: 13px; }
.button { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 15px; background: var(--surface); color: var(--green); border: 1px solid var(--border); border-radius: 10px; font-weight: 700; font-size: 13px; text-decoration: none; }
.button:hover { border-color: var(--green); text-decoration: none; }
.button.primary { background: var(--green-2); color: #fff; border-color: var(--green-2); }
.button.danger { color: var(--danger); border-color: rgba(162,59,53,.35); }
.button.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }
.button.small { min-height: 34px; padding: 6px 10px; }
.button.full { width: 100%; }
.flash { padding: 13px 16px; background: #eef5f1; border: 1px solid #bdd5ca; color: var(--green); border-radius: 12px; margin-bottom: 22px; }
.flash.error { background: #fff2f0; border-color: #e3b4ae; color: var(--danger); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.metric-card { color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); text-decoration: none; min-height: 145px; display: flex; flex-direction: column; }
.metric-card:hover { border-color: var(--gold); text-decoration: none; }
.metric-card span { color: var(--muted); font-size: 13px; }
.metric-card strong { font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 42px; font-weight: 800; margin: 11px 0 2px; }
.metric-card small { margin-top: auto; color: var(--muted); }
.metric-card.accent { background: var(--green); color: #fff; border-color: var(--green); }
.metric-card.accent span, .metric-card.accent small { color: rgba(255,255,255,.7); }
.content-grid { display: grid; gap: 22px; margin-bottom: 24px; align-items: start; }
.content-grid.two-thirds { grid-template-columns: minmax(0, 1.45fr) minmax(300px, .8fr); }
.content-grid.form-aside { grid-template-columns: minmax(0, 1.65fr) minmax(320px, .65fr); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 24px; min-width: 0; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.panel-heading > a { font-size: 13px; font-weight: 700; }
.list { display: grid; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 15px 2px; border-top: 1px solid #ece7df; color: var(--ink); text-decoration: none; }
.list-row:first-child { border-top: 0; }
.list-row:hover strong { color: var(--green-2); }
.list-row strong, .list-row small { display: block; }
.list-row small { color: var(--muted); margin-top: 5px; }
.status { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 800; white-space: nowrap; background: #efede7; color: #5e635f; }
.status.approved, .status.published, .status.cliente { background: #e3f1e9; color: #236047; }
.status.review, .status.scheduled, .status.qualificado { background: #fff3d8; color: #7e5b16; }
.status.rejected, .status.failed, .status.perdido { background: #fde7e4; color: #983b34; }
.status.queued, .status.generating, .status.publishing, .status.reuniao, .status.proposta { background: #e6eef7; color: #345b80; }
.timeline { display: grid; gap: 2px; }
.timeline-item { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 11px; padding: 13px 0; border-top: 1px solid #ece7df; }
.timeline-item:first-child { border-top: 0; }
.timeline-dot { width: 9px; height: 9px; background: var(--gold); border-radius: 50%; }
.timeline-item strong, .timeline-item small { display: block; }
.timeline-item small { color: var(--muted); margin-top: 4px; }
.empty { padding: 45px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 14px; }
.empty strong { color: var(--ink); display: block; margin-bottom: 7px; }
.empty p { margin-bottom: 0; }
.empty.compact { padding: 25px 15px; }
.stack-form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; font-size: 12px; font-weight: 800; color: #404744; }
input, select, textarea { width: 100%; color: var(--ink); background: #fcfbf8; border: 1px solid var(--border); border-radius: 9px; padding: 10px 11px; font-weight: 400; line-height: 1.45; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(58,104,255,.18); border-color: var(--gold); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 13px; }
legend { padding: 0 6px; font-size: 12px; font-weight: 800; }
.check-list { max-height: 190px; overflow: auto; display: grid; gap: 9px; }
.source-review-list { max-height: 340px; }
.check { display: flex; grid-template-columns: 20px 1fr; align-items: start; gap: 8px; font-weight: 500; }
.check input { width: auto; margin-top: 3px; }
.sticky-card { position: sticky; top: 25px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
th, td { padding: 13px 10px; border-bottom: 1px solid #ece7df; vertical-align: top; }
td strong, .table-note, .error-text { display: block; }
.table-note { color: var(--muted); margin-top: 4px; max-width: 400px; overflow: hidden; text-overflow: ellipsis; }
.error-text { color: var(--danger); margin-top: 6px; max-width: 480px; }
.research-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.research-card { border: 1px solid var(--border); border-radius: 13px; padding: 16px; background: #fcfbf8; }
.research-card h3 { line-height: 1.35; margin-bottom: 9px; }
.research-card p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.research-card > a { font-size: 12px; font-weight: 800; }
.research-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 11px; }
.topic-summary { background: var(--green); color: #fff; border-radius: var(--radius); padding: 25px; display: flex; justify-content: space-between; gap: 25px; margin-bottom: 22px; }
.topic-editor summary { cursor: pointer; font-family: Georgia, serif; font-size: 21px; margin-bottom: 18px; }
.topic-approval { margin-top: 0; }
.topic-summary p { margin-bottom: 0; max-width: 760px; color: rgba(255,255,255,.78); line-height: 1.55; }
.summary-meta { display: grid; justify-items: end; gap: 8px; min-width: 210px; }
.summary-meta small { color: rgba(255,255,255,.65); }
.compact-panel { padding: 18px 22px; }
.source-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.source-chips a { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #f1eee7; border-radius: 999px; padding: 7px 11px; font-size: 12px; }
.action-panel { display: flex; justify-content: space-between; align-items: center; gap: 25px; }
.action-panel p { margin: 8px 0 0; color: var(--muted); }
.script-panel { padding: 26px; }
.approval-bar { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.approval-bar form { display: flex; gap: 8px; }
.production-zone { margin-top: 24px; padding: 21px; background: #f3f0e8; border-radius: 14px; }
.production-zone > div:first-child p { color: var(--muted); }
.production-forms { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; margin-top: 18px; }
.video-review { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 22px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 20px; }
.video-copy p { color: var(--muted); }
video { width: 100%; max-height: 570px; background: #111; border-radius: 13px; }
.video-actions { display: grid; gap: 14px; align-content: start; }
.schedule-form { padding: 16px; border: 1px solid var(--border); border-radius: 13px; background: #fcfbf8; }
.analytics-grid { margin-top: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel-kpi { display: grid; justify-items: end; color: var(--muted); }
.panel-kpi strong { color: var(--ink); font-size: 30px; line-height: 1; }
.panel-kpi small { margin-top: 5px; }
.funnel-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.funnel-step { padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: #fcfbf8; }
.funnel-step span, .funnel-step strong { display: block; }
.funnel-step span { color: var(--muted); font-size: 11px; min-height: 30px; }
.funnel-step strong { margin-top: 7px; font-size: 26px; }
.channel-list { display: grid; }
.channel-list div { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid #ece7df; }
.channel-list div:first-child { padding-top: 0; }
.channel-list div:last-child { border-bottom: 0; }
.inline-form { display: flex; gap: 7px; min-width: 230px; }
.inline-form select { min-width: 130px; }
.retry-form { min-width: 0; margin-top: 9px; }
.calendar-editor { min-width: 340px; margin-top: 10px; }
.calendar-editor summary { cursor: pointer; color: var(--green-2); font-weight: 800; }
.calendar-editor form { margin-top: 12px; }
.integration-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.persona-banner { display: grid; grid-template-columns: 190px 1fr; gap: 26px; align-items: center; background: var(--green); color: #fff; border-radius: var(--radius); padding: 22px; margin-bottom: 22px; box-shadow: var(--shadow); }
.persona-banner img { width: 190px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%; border-radius: 13px; }
.persona-banner p { color: rgba(255,255,255,.75); line-height: 1.6; max-width: 760px; }
.persona-banner blockquote { margin: 18px 0 0; padding-left: 16px; border-left: 2px solid var(--gold); font-size: 18px; font-weight: 700; }
.integration-card { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 16px; display: flex; gap: 11px; align-items: center; }
.integration-card strong, .integration-card small { display: block; }
.integration-card small { color: var(--muted); margin-top: 3px; }
.integration-dot { width: 12px; height: 12px; border-radius: 50%; background: #c3beb4; box-shadow: 0 0 0 4px #f0ede7; }
.integration-dot.ready { background: #2e7b5c; box-shadow: 0 0 0 4px #e3f1e9; }
.integration-check { display: flex; align-items: center; gap: 12px; margin: -8px 0 22px; }
.definition-list { margin: 0; display: grid; }
.definition-list div { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid #ece7df; }
.definition-list dt { color: var(--muted); }
.definition-list dd { margin: 0; font-weight: 700; word-break: break-word; }
.notice { margin: 18px 0 0; padding: 13px; background: #fff7e5; color: #72551f; border-radius: 10px; font-size: 13px; }
.password-form { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border); }
.audit-list { display: grid; }
.audit-list div { padding: 11px 0; border-bottom: 1px solid #ece7df; }
.audit-list span, .audit-list small { display: block; }
.audit-list small { color: var(--muted); margin-top: 4px; }
.login-body { background: radial-gradient(circle at 85% 10%, rgba(49,91,206,.45), transparent 34%), var(--green); min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(470px, 100%); background: var(--paper); padding: clamp(28px, 5vw, 48px); border-radius: 24px; box-shadow: 0 30px 70px rgba(0,0,0,.25); }
.login-brand { color: var(--green); margin-bottom: 38px; }
.login-brand .brand-label { color: var(--muted); }
.login-brand .brand-logo, .capture-brand .brand-logo { width: 220px; }
.login-card h1 { font-size: 40px; margin: 4px 0 12px; }
.login-card > p { color: var(--muted); line-height: 1.6; margin-bottom: 25px; }
.capture-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 10% 10%, rgba(58,104,255,.7), transparent 27%), linear-gradient(145deg, var(--green) 0 45%, var(--paper) 45% 100%); }
.capture-card { width: min(620px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: clamp(28px, 6vw, 58px); box-shadow: 0 30px 80px rgba(0,0,0,.2); }
.capture-brand { color: var(--green); margin-bottom: 42px; }
.capture-brand .brand-label { color: var(--muted); }
.capture-card h1 { font-size: clamp(34px, 7vw, 55px); line-height: 1.02; margin-bottom: 18px; }
.capture-card > p { color: var(--muted); font-size: 17px; line-height: 1.65; }
.capture-form { margin-top: 30px; }
.capture-form .button { margin-top: 4px; min-height: 48px; }
.consent { font-size: 12px; line-height: 1.5; color: var(--muted); }
.capture-note { margin-top: 30px; padding: 16px; background: #eef5f1; color: var(--green); border-radius: 12px; line-height: 1.5; }
.capture-source { display: block; color: var(--muted); margin-top: 22px; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid.two-thirds, .content-grid.form-aside { grid-template-columns: 1fr; }
  .sticky-card { position: static; }
  .research-grid { grid-template-columns: repeat(2, 1fr); }
  .funnel-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 18px; }
  .nav { margin-top: 20px; display: flex; overflow-x: auto; padding-bottom: 5px; }
  .nav a { white-space: nowrap; }
  .sidebar-footer { display: none; }
  .main { padding: 25px 16px 45px; }
  .topbar { align-items: start; }
  .metric-grid, .research-grid, .production-forms, .video-review, .approval-bar, .integration-grid, .persona-banner { grid-template-columns: 1fr; }
  .persona-banner img { width: 150px; }
  .metric-card { min-height: 125px; }
  .field-row { grid-template-columns: 1fr; }
  .topic-summary, .action-panel { display: grid; }
  .summary-meta { justify-items: start; min-width: 0; }
  .approval-bar form { display: grid; }
  .panel-heading { display: grid; }
  .panel-kpi { justify-items: start; }
  .funnel-grid { grid-template-columns: repeat(2, 1fr); }
}
