/* Fábrica de Conteúdo nocodeverse: mesma linguagem visual da Central Comercial (Partner Desk)
   Same visual language as the partner guide (02-playbook/guia-parceiro-prospeccao.html):
   a field guide. Bricolage Grotesque for headings, IBM Plex Sans for reading,
   IBM Plex Mono for numbers, labels and the scripts the partner sends.
   Colors only through the tokens below (light and dark). Meaning colors:
   good / warn / bad for status, hot / warm / cold for the prospect score. */

@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --bg: #EEF3F7; --surface: #ffffff; --surface-2: #f7f9fc; --ink: #141A2E; --muted: #4f5a6e; --faint: #626d80; --line: #d8e0ea; --line-2: #e6ecf2;
  --accent: #1C50FC; --accent-soft: #e3eaff; --on-accent: #ffffff;
  --brand: #1C50FC; --on-brand: #ffffff; --brand-dark: #141A2E; --on-brand-dark: #eef2f8;
  --hot: #c2410c; --hot-soft: #fdeee5; --warm: #975c06; --warm-soft: #fbf3dc; --cold: #2f6f9f; --cold-soft: #e4f0f8;
  --good: #1d7a4a; --good-soft: #e3f4ea; --bad: #b42318; --bad-soft: #fbe9e7; --warn: #975c06; --warn-soft: #fbf3dc;
  --wa: #1d7a4a; --ig: #a3367c; --ig-soft: #f8e8f2; --on-solid: #ffffff;
  --shadow: 0 1px 2px rgba(20, 26, 46, .05), 0 4px 16px rgba(20, 26, 46, .04);
  --shadow-up: 0 -4px 20px rgba(20, 26, 46, .08);
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 12px; --radius-sm: 8px;
  --nav-h: 0px; --top-h: 3.5rem;
  /* old names kept so every page reads the same tokens */
  --card: var(--surface); --border: var(--line); --text: var(--ink); --dim: var(--muted);
  --blue: var(--accent); --green: var(--good); --amber: var(--warn); --red: var(--bad);
  --log-bg: #0d1222; --log-fg: #eef2f8; --log-dim: #8f9ab0;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1222; --surface: #141A2E; --surface-2: #18203a; --ink: #eef2f8; --muted: #9aa4b5; --faint: #8893a6; --line: #2a3240; --line-2: #20283a;
    --accent: #6f97ff; --accent-soft: #16244a; --on-accent: #0d1222;
    --brand-dark: #0a0f1d;
    --hot: #ff9a6b; --hot-soft: #3a2016; --warm: #f1c35a; --warm-soft: #332a12; --cold: #7fbde6; --cold-soft: #15283a;
    --good: #5fd39a; --good-soft: #123222; --bad: #ff8a7e; --bad-soft: #3a1714; --warn: #f1c35a; --warn-soft: #332a12;
    --wa: #5fd39a; --ig: #f08ccd; --ig-soft: #3a1631; --on-solid: #0d1222;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-up: 0 -4px 20px rgba(0, 0, 0, .35);
    --log-bg: #080c18;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1222; --surface: #141A2E; --surface-2: #18203a; --ink: #eef2f8; --muted: #9aa4b5; --faint: #8893a6; --line: #2a3240; --line-2: #20283a;
  --accent: #6f97ff; --accent-soft: #16244a; --on-accent: #0d1222;
    --brand-dark: #0a0f1d;
  --hot: #ff9a6b; --hot-soft: #3a2016; --warm: #f1c35a; --warm-soft: #332a12; --cold: #7fbde6; --cold-soft: #15283a;
  --good: #5fd39a; --good-soft: #123222; --bad: #ff8a7e; --bad-soft: #3a1714; --warn: #f1c35a; --warn-soft: #332a12;
  --wa: #5fd39a; --ig: #f08ccd; --ig-soft: #3a1631; --on-solid: #0d1222;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-up: 0 -4px 20px rgba(0, 0, 0, .35);
  --log-bg: #080c18;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
html { -webkit-text-size-adjust: 100%; }
html, body { background: var(--bg); color: var(--ink); }
body { font: 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; padding-bottom: var(--nav-h); min-height: 100vh; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mono { font-size: .88em; }
.ico { flex: none; }
.hidden { display: none !important; }
.muted, .dim { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font: 500 .7rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--bg); padding: .5rem .8rem; border-radius: var(--radius-sm); z-index: 100; }
.skip:focus { left: .5rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }

/* ---------- top bar ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top, 0px); }
.topbar-in { max-width: 82rem; margin: 0 auto; padding: .5rem 1.25rem; display: flex; align-items: center; gap: 1rem; min-height: var(--top-h); }
.brand { display: flex; align-items: center; gap: .65rem; min-width: 0; text-decoration: none; }
.brand-mark { width: 2rem; height: 2rem; border-radius: 8px; background: var(--brand); color: var(--on-brand); display: flex; align-items: center; justify-content: center; font: 600 .78rem/1 var(--mono); letter-spacing: .02em; flex: none; }
.brand-name { font: 800 1rem/1.15 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.brand-sub { font: 500 .64rem/1.3 var(--mono); color: var(--muted); white-space: nowrap; text-transform: uppercase; letter-spacing: .08em; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .7rem; border-radius: var(--radius-sm); font-size: .86rem; font-weight: 500; color: var(--muted); text-decoration: none; white-space: nowrap; min-height: 2.5rem; }
.nav a:hover { background: var(--accent-soft); color: var(--accent); }
.nav a.active { background: var(--ink); color: var(--bg); }
.user-btn { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--line); border-radius: 999px; padding: .25rem .7rem .25rem .3rem; font-size: .84rem; color: var(--muted); background: var(--surface); min-height: 2.5rem; }
.user-btn:hover { border-color: var(--muted); }
.avatar { width: 1.85rem; height: 1.85rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font: 600 .7rem/1 var(--mono); }
.menu { position: fixed; right: max(1rem, env(safe-area-inset-right, 0px)); top: calc(var(--top-h) + .3rem + env(safe-area-inset-top, 0px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0, 0, 0, .16); padding: .4rem; min-width: 15rem; z-index: 40; }
.menu .who { padding: .55rem .65rem .7rem; border-bottom: 1px solid var(--line-2); margin-bottom: .3rem; font-size: .8rem; color: var(--muted); }
.menu .who b { display: block; font-size: .9rem; color: var(--ink); }
.menu button, .menu a { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .6rem .65rem; border-radius: var(--radius-sm); font-size: .88rem; color: var(--ink); text-align: left; text-decoration: none; min-height: 2.6rem; }
.menu button:hover, .menu a:hover { background: var(--accent-soft); color: var(--accent); }
.menu .sep { height: 1px; background: var(--line-2); margin: .3rem 0; }
.menu .only-phone { display: none; }

/* bottom tab bar on phones: big targets, the active one in ink */
.tabbar { display: none; }
@media (max-width: 1100px) { .nav a { padding: .45rem .55rem; font-size: .82rem; } .nav a .ico { display: none; } }
@media (max-width: 860px) { .nav { display: none; } .user-btn { margin-left: auto; } .menu .only-phone { display: flex; } }
@media (max-width: 860px) {
  :root { --nav-h: calc(4rem + env(safe-area-inset-bottom, 0px)); }
  .user-btn .uname { display: none; }
  .user-btn { padding: .2rem; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; height: var(--nav-h); background: var(--surface); border-top: 1px solid var(--line); z-index: 30; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; font-size: .7rem; font-weight: 500; color: var(--muted); text-decoration: none; min-height: 3.5rem; }
  .tabbar a.active { color: var(--ink); font-weight: 600; }
  .tabbar a.active .ico { color: var(--accent); }
}

/* ---------- layout ---------- */
.page { max-width: 82rem; margin: 0 auto; padding: 1.5rem 1.25rem 2.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; }
.page-head .sub { font-size: .9rem; color: var(--muted); margin-top: .25rem; }
.toolbar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
@media (max-width: 980px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2.reorder { display: flex; flex-direction: column; align-items: stretch; }
  .grid-2.reorder > .stack { display: contents; }
  .grid-2.reorder [data-o="1"] { order: 1; } .grid-2.reorder [data-o="2"] { order: 2; } .grid-2.reorder [data-o="3"] { order: 3; }
  .grid-2.reorder [data-o="4"] { order: 4; } .grid-2.reorder [data-o="5"] { order: 5; } .grid-2.reorder [data-o="6"] { order: 6; }
  .grid-2.reorder [data-o="7"] { order: 7; } .grid-2.reorder [data-o="8"] { order: 8; } .grid-2.reorder [data-o="9"] { order: 9; }
  .grid-2.reorder [data-o="10"] { order: 10; } .grid-2.reorder [data-o="11"] { order: 11; } .grid-2.reorder [data-o="12"] { order: 12; }
}
details > summary.area-head { flex-wrap: nowrap; }
details > summary.area-head::-webkit-details-marker { display: none; }
details[open] > summary.area-head > .ico:last-child { transform: rotate(90deg); }

/* cards (called "area" in the pages) */
.area { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; box-shadow: var(--shadow); }
.area-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.area-title { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.area-icon { width: 2.1rem; height: 2.1rem; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.area-title h2 { font-size: 1.08rem; font-weight: 600; letter-spacing: -.005em; }
.area-title .sub { font-size: .8rem; color: var(--muted); margin-top: 2px; font-family: var(--body); }
.area-body { padding: 1.15rem; }
.area-body.flush { padding: 0; }
.sub-head { font: 500 .7rem/1.2 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .6rem; }
.note { font-size: .8rem; color: var(--muted); line-height: 1.5; }
.empty { display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; color: var(--muted); padding: 2rem 1.25rem; font-size: .9rem; }
.empty b { color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 1.02rem; }
.empty .ico { color: var(--faint); }
.callout { display: flex; gap: .6rem; align-items: flex-start; font-size: .86rem; line-height: 1.45; padding: .7rem .85rem; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--ink); }
.callout.warn { background: var(--warn-soft); }
.callout.bad { background: var(--bad-soft); }
.callout.good { background: var(--good-soft); }
.callout .ico { margin-top: .15rem; color: var(--accent); }
.callout.warn .ico { color: var(--warn); } .callout.bad .ico { color: var(--bad); } .callout.good .ico { color: var(--good); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border-radius: var(--radius-sm); padding: .55rem .95rem; font-size: .88rem; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; text-decoration: none; min-height: 2.75rem; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { border-color: var(--muted); }
.btn-dark, .btn-primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-dark:hover, .btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-good { background: var(--good); border-color: var(--good); color: var(--on-solid); }
.btn-wa { background: var(--wa); border-color: var(--wa); color: var(--on-solid); }
.btn-ig { background: var(--ig); border-color: var(--ig); color: var(--on-solid); }
.btn-good:hover, .btn-wa:hover, .btn-ig:hover, .btn-accent:hover { filter: brightness(1.08); border-color: transparent; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.btn-sm { padding: .35rem .65rem; min-height: 2.25rem; font-size: .8rem; }
.btn-lg { min-height: 3.1rem; font-size: .95rem; padding: .7rem 1.2rem; }
.btn-danger { color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; width: 1rem; height: 1rem; border-radius: 999px; border: 2px solid var(--muted); border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 2px; gap: 2px; }
.seg button { padding: .45rem .8rem; font-size: .84rem; color: var(--muted); border-radius: 6px; white-space: nowrap; min-height: 2.3rem; }
.seg button:hover { color: var(--ink); }
.seg button.active { background: var(--ink); color: var(--bg); font-weight: 600; }
/* P31: no celular o seletor quebra linha em vez de esconder botões (Ligação sumia a 375px). */
@media (max-width: 520px) { .seg { display: flex; flex-wrap: wrap; overflow-x: visible; } .seg button { flex: 1 1 auto; } }
.input, .select, textarea.input { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: .55rem .7rem; font-size: .92rem; width: 100%; color: var(--ink); min-height: 2.75rem; }
.input::placeholder { color: var(--faint); }
textarea.input { min-height: 5rem; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238893a6' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; width: auto; }
.input:focus, .select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.input[aria-invalid="true"] { border-color: var(--bad); }
label.field { display: flex; flex-direction: column; gap: .35rem; font-size: .82rem; font-weight: 600; color: var(--ink); min-width: 0; }
label.field .hint, div.field > .hint { font-weight: 400; color: var(--muted); font-size: .78rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .9rem 1.1rem; }
.form-grid .wide { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: .5rem; font-size: .88rem; min-height: 2.25rem; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.search { position: relative; flex: 1 1 14rem; }
.search .ico { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .input { padding-left: 2.2rem; }

/* ---------- numbers, KPIs, meters ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .kpis.k6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kpi { border: 1px solid var(--line-2); border-radius: 10px; padding: .85rem .95rem; background: var(--surface-2); min-width: 0; }
.kpi-label { font: 500 .68rem/1.25 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.kpi-value { font: 600 1.55rem/1.2 var(--mono); letter-spacing: -.02em; margin-top: .3rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-sub { font-size: .76rem; color: var(--muted); margin-top: .2rem; }
.kpi.hl { background: var(--accent-soft); border-color: transparent; }
.goal-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.goal-num { font: 600 2rem/1.1 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.goal-num small { font-size: .95rem; color: var(--muted); font-weight: 400; }
.bar { height: .5rem; background: var(--line-2); border-radius: 999px; overflow: hidden; margin: .6rem 0 .8rem; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }
.bar.done > span { background: var(--good); }
.bar.full > span { background: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-stat { display: inline-flex; align-items: center; gap: .35rem; font: 500 .78rem/1.3 var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .65rem; white-space: nowrap; background: var(--surface); }
.chip-stat b { color: var(--ink); font-weight: 600; }

/* ---------- pills: status, meaning, prospect tier ---------- */
.pill { display: inline-flex; align-items: center; gap: .3rem; font: 500 .72rem/1.2 var(--mono); padding: .22rem .55rem; border-radius: 999px; white-space: nowrap; background: var(--line-2); color: var(--muted); }
.st-new { background: var(--accent-soft); color: var(--accent); }
.st-contacted { background: var(--cold-soft); color: var(--cold); }
.st-replied, .st-xray_sent { background: var(--warm-soft); color: var(--warm); }
.st-call_booked, .st-link_sent { background: var(--hot-soft); color: var(--hot); }
.st-paid { background: var(--good-soft); color: var(--good); }
.st-lost { background: var(--line-2); color: var(--muted); }
.st-do_not_contact { background: var(--bad-soft); color: var(--bad); }
.pill.ok, .pill.good { background: var(--good-soft); color: var(--good); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.wait { background: var(--warn-soft); color: var(--warn); }
.pill.off { background: var(--line-2); color: var(--muted); }
.win-open { background: var(--good-soft); color: var(--good); }
.win-later { background: var(--warn-soft); color: var(--warn); }
.win-closed, .win-unknown { background: var(--line-2); color: var(--muted); }
.tier { display: inline-flex; align-items: center; gap: .35rem; font: 600 .7rem/1 var(--mono); padding: .32rem .55rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; background: var(--line-2); color: var(--muted); }
.tier::before { content: ""; width: .45rem; height: .45rem; border-radius: 999px; background: currentColor; }
.tier-hot { background: var(--hot-soft); color: var(--hot); }
.tier-warm { background: var(--warm-soft); color: var(--warm); }
.tier-cold { background: var(--cold-soft); color: var(--cold); }
.tier b { font-weight: 600; letter-spacing: 0; }
.grade { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .3rem; border-radius: 6px; font: 600 .8rem/1 var(--mono); border: 1.5px solid var(--line); }
.grade-A, .grade-B { color: var(--good); border-color: var(--good); }
.grade-C { color: var(--warn); border-color: var(--warn); }
.grade-D, .grade-E { color: var(--bad); border-color: var(--bad); }
.ch-badge { display: inline-flex; align-items: center; gap: .3rem; font: 500 .72rem/1.2 var(--mono); padding: .22rem .5rem; border-radius: 6px; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.ch-whatsapp { background: var(--good-soft); color: var(--wa); }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; justify-items: center; padding: 1.25rem; }
.login-side { display: none; }
@media (min-width: 900px) {
  .login-wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding: 0; justify-items: stretch; align-items: stretch; }
  .login-side { display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: 3rem; background: var(--brand-dark); color: var(--on-brand-dark); }
  .login-side h2 { font: 800 clamp(2rem, 3.2vw, 2.8rem)/1.08 var(--display); letter-spacing: -.02em; max-width: 16ch; }
  .login-side p { opacity: .75; max-width: 44ch; }
  .login-side ol { display: grid; gap: .9rem; counter-reset: s; max-width: 42ch; }
  .login-side li { counter-increment: s; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .8rem; font-size: .95rem; align-items: center; }
  .login-side li::before { content: counter(s); font: 600 .85rem/1.9rem var(--mono); text-align: center; width: 2rem; height: 2rem; border-radius: 999px; border: 1px solid currentColor; opacity: .8; }
  .login-side .brand-mark { background: var(--brand); color: var(--on-brand); }
  .login-side .eyebrow { color: inherit; opacity: .7; }
  .login-main { display: flex; align-items: center; justify-content: center; padding: 2rem; }
}
.login-main { width: 100%; display: flex; justify-content: center; }
.login { width: 100%; max-width: 24rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.75rem; display: flex; flex-direction: column; gap: 1rem; box-shadow: var(--shadow); }
.login h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.login .brand-mark { width: 2.4rem; height: 2.4rem; font-size: .9rem; }
.form-err { font-size: .86rem; color: var(--bad); min-height: 1.2rem; }

/* ---------- loading ---------- */
.skeleton { display: grid; gap: 1rem; }
.sk { border-radius: var(--radius); background: linear-gradient(90deg, var(--line-2) 0%, var(--surface-2) 50%, var(--line-2) 100%); background-size: 200% 100%; animation: sk 1.3s ease-in-out infinite; }
.sk.h1 { height: 2.4rem; width: min(22rem, 70%); }
.sk.row { height: 5.5rem; }
.sk.card { height: 11rem; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .sk, .live-dot, .btn.busy::after { animation: none; } *, *::before, *::after { transition: none !important; } }

/* ---------- toast / dialog ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 1rem); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: .65rem 1rem; border-radius: 10px; font-size: .88rem; z-index: 60; box-shadow: 0 10px 28px rgba(0, 0, 0, .22); max-width: calc(100vw - 2rem); display: flex; align-items: center; gap: .75rem; }
.toast.err { background: var(--bad); color: var(--on-solid); }
.toast button { color: inherit; text-decoration: underline; font-weight: 600; min-height: 2rem; }
dialog { border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(30rem, calc(100vw - 2rem)); color: var(--ink); background: var(--surface); }
dialog::backdrop { background: rgba(13, 18, 34, .5); }
dialog .d-head { padding: 1rem 1.2rem; border-bottom: 1px solid var(--line-2); font: 600 1.1rem/1.25 var(--display); }
dialog .d-body { padding: 1.2rem; display: flex; flex-direction: column; gap: .9rem; }
dialog .d-foot { padding: .9rem 1.2rem; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: .5rem; }
.secret { font: .8rem var(--mono); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: .6rem .7rem; word-break: break-all; }

/* =====================================================================
   Fábrica de Conteúdo: paleta nova da nocodeverse (marca-tokens.md, 14/11/2026)
   preto, cinza, branco, azul da marca #347DF5 (só marca e detalhe) e céu #6CABDD;
   texto azul pequeno usa #2560C9 (contraste AA).
   ===================================================================== */
:root { --accent: #2560C9; --accent-soft: #E1EEF8; --brand: #347DF5; --on-brand: #ffffff; --brand-dark: #0B0B0C; --ink: #0B0B0C; --bg: #F4F4F5; --line: #E4E4E7; --line-2: #ECECEF; --muted: #52525B; --faint: #71717A; --sky: #6CABDD;
  --st-briefing: #975c06; --st-briefing-soft: #fbf3dc; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --accent: #6CABDD; --accent-soft: #14283a; --ink: #F4F4F5; --bg: #0B0B0C; --surface: #18181B; --surface-2: #1f1f23; --line: #2E2E33; --line-2: #26262b; --muted: #A1A1AA; --faint: #8b8b94; --on-accent: #0B0B0C; --st-briefing: #f1c35a; --st-briefing-soft: #332a12; } }
:root[data-theme="dark"] { --accent: #6CABDD; --accent-soft: #14283a; --ink: #F4F4F5; --bg: #0B0B0C; --surface: #18181B; --surface-2: #1f1f23; --line: #2E2E33; --line-2: #26262b; --muted: #A1A1AA; --faint: #8b8b94; --on-accent: #0B0B0C; --st-briefing: #f1c35a; --st-briefing-soft: #332a12; }
.brand-mark { background: var(--brand); border-radius: 9px; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.aviso-pagina { max-width: 36rem; margin: 15vh auto; padding: 1.5rem; display: grid; gap: 1rem; }
.banner { display: flex; gap: .6rem; align-items: flex-start; font-size: .86rem; padding: .65rem .9rem; border-radius: var(--radius-sm); background: var(--accent-soft); }
.banner.warn { background: var(--warn-soft); } .banner.bad { background: var(--bad-soft); }
.banner .ico { margin-top: .1rem; flex: none; }

/* estados da peça */
.pill.st-pendente, .pill.st-gerando { background: var(--line-2); color: var(--muted); }
.pill.st-briefing { background: var(--st-briefing-soft); color: var(--st-briefing); }
.pill.st-briefing_aprovado, .pill.st-produzindo { background: var(--accent-soft); color: var(--accent); }
.pill.st-pronto, .pill.st-agendado { background: var(--good-soft); color: var(--good); }
.pill.st-publicado { background: var(--good); color: var(--on-solid); }
.pill.st-precisa_de_voce, .pill.st-erro { background: var(--bad-soft); color: var(--bad); }
.pill.st-revisao_final, .pill.st-para_gravar, .pill.st-manual { background: var(--warn-soft); color: var(--warn); }
.pill.st-descartado { background: var(--line-2); color: var(--faint); text-decoration: line-through; }

/* cabeçalho da semana */
.semana-nav { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.semana-nav h1 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.02em; }
.etapas { display: flex; flex-wrap: wrap; gap: .4rem; }
.etapas .chip-stat.on { border-color: var(--ink); }

/* grade dias x perfis */
.semana-grade { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.semana-grade table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 72rem; table-layout: fixed; }
.semana-grade th, .semana-grade td { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); vertical-align: top; padding: .5rem; }
.semana-grade th { font: 500 .7rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: left; background: var(--surface-2); position: sticky; top: 0; z-index: 2; }
.semana-grade th.perfil, .semana-grade td.perfil { width: 10.5rem; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.semana-grade th.perfil { z-index: 3; background: var(--surface-2); }
.semana-grade td.perfil b { display: block; font: 600 .86rem/1.25 var(--body); }
.semana-grade td.perfil span { font-size: .74rem; color: var(--muted); }
.semana-grade td.vazio { background: repeating-linear-gradient(135deg, transparent 0 8px, var(--line-2) 8px 9px); }
.semana-lista { display: none; }
@media (max-width: 860px) { .semana-grade { display: none; } .semana-lista { display: flex; flex-direction: column; gap: 1rem; } }
.dia-bloco h3 { font: 600 1rem/1.2 var(--display); margin: 0 0 .5rem; display: flex; align-items: baseline; gap: .5rem; }
.dia-bloco h3 small { font: 500 .72rem/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.dia-bloco .cards { display: grid; gap: .6rem; }

/* cartão da peça */
.peca { display: flex; flex-direction: column; gap: .4rem; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: .55rem .6rem; font-size: .8rem; color: inherit; cursor: pointer; min-height: 2.75rem; }
.peca + .peca { margin-top: .45rem; }
.peca:hover { border-color: var(--muted); }
.peca:focus-visible { outline: 2px solid var(--accent); }
.peca.st-descartado { opacity: .5; }
.peca .linha { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.peca .hora { font: 600 .76rem/1 var(--mono); }
.peca .fmt { font: 500 .66rem/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.peca .lang { font: 600 .62rem/1 var(--mono); border: 1px solid var(--line); border-radius: 4px; padding: .15rem .25rem; color: var(--muted); }
.peca .gancho { font-size: .8rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.peca .mini { position: relative; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; background: var(--line-2); }
.peca .mini.v { aspect-ratio: 9 / 16; max-height: 9rem; width: auto; }
.peca .mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.peca .motivo { font-size: .74rem; color: var(--bad); line-height: 1.3; }
.dia-bloco .peca .mini { max-width: 9rem; }
.dia-bloco .peca { flex-direction: row; gap: .7rem; align-items: flex-start; }
.dia-bloco .peca .corpo { display: flex; flex-direction: column; gap: .35rem; min-width: 0; flex: 1; }

/* painel da peça */
dialog.painel { width: min(70rem, calc(100vw - 1rem)); max-height: calc(100vh - 1rem); margin: auto; overflow: hidden; }
dialog.painel[open] { display: flex; flex-direction: column; }
.painel .d-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.painel .d-body { overflow: auto; display: grid; grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 860px) { .painel .d-body { grid-template-columns: 1fr; } dialog.painel { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; } }
.painel .acoes { display: flex; flex-wrap: wrap; gap: .5rem; }
.painel .secao { display: grid; gap: .6rem; }
.painel .secao h3 { font: 500 .7rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.painel dl { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: .35rem .75rem; font-size: .86rem; }
.painel dt { color: var(--muted); }
.painel ul.pontos { list-style: disc; padding-left: 1.1rem; display: grid; gap: .3rem; font-size: .88rem; }
.painel .fato { font-size: .82rem; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; padding: .45rem .6rem; }
.painel .fato small { display: block; color: var(--muted); font-family: var(--mono); font-size: .7rem; margin-top: .2rem; }
.rev li { font-size: .84rem; display: flex; gap: .45rem; align-items: flex-start; padding: .3rem 0; }
.rev li.b { color: var(--bad); } .rev li.a { color: var(--warn); }
.rev li em { font-style: normal; font-family: var(--mono); font-size: .76rem; color: var(--muted); }

/* prévia como a rede mostra */
.rede { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; max-width: 24rem; width: 100%; }
.rede .cab { display: flex; align-items: center; gap: .55rem; padding: .6rem .7rem; }
.rede .av { width: 2.2rem; height: 2.2rem; border-radius: 999px; background: var(--brand); flex: none; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; font: 600 .75rem/1 var(--mono); }
.rede .av.q { border-radius: 8px; }
.rede .quem b { display: block; font-size: .84rem; } .rede .quem span { font-size: .74rem; color: var(--muted); }
.rede .txt { padding: .2rem .8rem .8rem; font-size: .88rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.rede .txt .tags { color: var(--accent); }
.rede .txt .mais { color: var(--muted); }
.rede .fio-item { border-top: 1px solid var(--line-2); padding: .6rem .8rem; font-size: .88rem; white-space: pre-wrap; }
.rede .fio-item small { display: block; font: 500 .7rem/1 var(--mono); color: var(--muted); margin-bottom: .3rem; }
.rede .comentario { border-top: 1px solid var(--line-2); padding: .55rem .8rem; font-size: .8rem; color: var(--muted); }
.slides { position: relative; background: #000; }
.slides .quadro { position: relative; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; }
.slides .quadro.v { aspect-ratio: 9 / 16; }
.slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.slides .nav { position: absolute; inset: auto 0 .5rem; display: flex; justify-content: center; gap: .3rem; }
.slides .nav i { width: .45rem; height: .45rem; border-radius: 999px; background: rgba(255,255,255,.45); }
.slides .nav i.on { background: #fff; }
.slides button.ant, .slides button.prox { position: absolute; top: 50%; transform: translateY(-50%); width: 2.5rem; height: 2.5rem; border-radius: 999px; background: rgba(255,255,255,.9); color: #0B0B0C; display: flex; align-items: center; justify-content: center; }
.slides button.ant { left: .4rem; } .slides button.prox { right: .4rem; }
.roteiro { width: 100%; border-collapse: collapse; font-size: .82rem; }
.roteiro td, .roteiro th { border-bottom: 1px solid var(--line-2); padding: .4rem .35rem; text-align: left; vertical-align: top; }
.roteiro th { font: 500 .66rem/1.2 var(--mono); text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.roteiro .t { font-family: var(--mono); white-space: nowrap; color: var(--muted); }

/* listas de fatos e configurações */
.fatos-lista { display: grid; gap: .5rem; }
.fato-linha { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem .75rem; align-items: start; border-bottom: 1px solid var(--line-2); padding: .6rem 0; }
.fato-linha.off { opacity: .55; }
.fato-linha textarea { min-height: 3.2rem; }
.mix { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: .5rem; }
.mix label { font-size: .8rem; }
.mix input { width: 100%; }
.tabela { width: 100%; border-collapse: collapse; font-size: .84rem; }
.tabela th, .tabela td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line-2); }
.tabela th { font: 500 .68rem/1.2 var(--mono); text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.tabela-wrap { overflow-x: auto; }

/* P50: séries, venda, roteiro visual, vídeo com IA e números */
.pill.serie { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pill.venda { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.fora { background: var(--good-soft); color: var(--good); border-color: transparent; }
.pill.parar { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.video-ia .prompt { border: 1px solid var(--line); border-radius: var(--radius-sm); margin: .5rem 0; background: var(--surface-2); }
.video-ia .prompt-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .35rem .6rem; border-bottom: 1px solid var(--line-2); }
.video-ia pre { margin: 0; padding: .6rem; white-space: pre-wrap; word-break: break-word; font: 400 .78rem/1.5 var(--mono); }
.serie-card { display: grid; gap: .6rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: .9rem; }
.serie-card.off { opacity: .65; }
.serie-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .6rem; }
.serie-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: center; }
.numeros-tabela input.input { width: 5.5rem; padding: .3rem .4rem; font-family: var(--mono); text-align: right; }
.numeros-tabela td.peca-nome { min-width: 12rem; }
.nkpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.nkpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.nkpi b { display: block; font: 800 1.35rem/1.2 var(--display); }
.nkpi small { color: var(--muted); }
@media (max-width: 640px) {
  .numeros-tabela thead { display: none; }
  .numeros-tabela, .numeros-tabela tbody { display: block; }
  .numeros-tabela tr { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .35rem; padding: .7rem 0; border-bottom: 1px solid var(--line-2); }
  .numeros-tabela td { border: 0; padding: 0; min-width: 0; }
  .numeros-tabela td.peca-nome { grid-column: 1 / -1; min-width: 0; }
  .numeros-tabela td[data-l]::before { content: attr(data-l); display: block; font: 500 .6rem/1.4 var(--mono); color: var(--muted); text-transform: uppercase; }
  .numeros-tabela input.input { width: 100%; }
  .serie-grid { grid-template-columns: 1fr 1fr; }
  .nkpis { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .nkpi { padding: .6rem .7rem; }
  .nkpi b { font-size: 1.1rem; }
  .nkpi small { font-size: .72rem; }
}
/* cartão nunca mais largo que a coluna (texto longo quebra em vez de empurrar a tela) */
.peca { min-width: 0; max-width: 100%; }
.peca .gancho, .peca .motivo { overflow-wrap: anywhere; min-width: 0; }

.pill.st-renderizando { background: var(--accent-soft); color: var(--accent); }
.ajustar textarea { min-height: 4.5rem; }
.memoria-ask { display: grid; gap: .5rem; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius-sm); padding: .75rem .85rem; }
.memoria-ask q { font-style: normal; font-weight: 600; }
.versoes li { display: flex; gap: .5rem; align-items: center; justify-content: space-between; padding: .35rem 0; border-bottom: 1px solid var(--line-2); font-size: .84rem; }
.video-player { width: 100%; max-width: 320px; aspect-ratio: 9 / 16; border-radius: 12px; background: #000; display: block; }
.repetida { border-left: 3px solid var(--bad); padding: .4rem .7rem; background: var(--bad-soft); border-radius: 6px; font-size: .84rem; margin-top: .4rem; }
.mem-card { display: grid; gap: .5rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: .7rem; }
.mem-card.off { opacity: .6; }
.mem-card.pend { border-color: var(--accent); }
.mem-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .78rem; color: var(--muted); }
.mem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
@media (max-width: 640px) { .mem-grid { grid-template-columns: 1fr; } }

/* v3: as duas filas de domingo e a escolha do tipo do Reels */
.filas { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin: 1rem 0; }
.fila { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: .8rem; min-width: 0; }
.fila-head { margin-bottom: .6rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline; }
.fila-lista { display: grid; gap: .45rem; max-height: 26rem; overflow-y: auto; }
.fila-lista .peca + .peca { margin-top: 0; }
.tipos { display: grid; gap: .45rem; }
.tipo { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .55rem .7rem; cursor: pointer; }
.tipo.on { border-color: var(--accent); background: var(--accent-soft); }
.tipo input { margin-top: .25rem; accent-color: var(--accent); }
.pill.st-aguardando_clone { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 760px) { .filas { grid-template-columns: 1fr; } }
.fila .peca { flex-direction: row; align-items: flex-start; gap: .6rem; }
.fila .peca .mini { width: 4.5rem; max-width: 4.5rem; flex: none; }
.fila .peca .corpo { display: flex !important; flex-direction: column; gap: .3rem; min-width: 0; flex: 1; }
.capturas { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .6rem; margin-top: .8rem; }
.captura { display: grid; gap: .35rem; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem; background: var(--surface-2); min-width: 0; }
.captura img { width: 100%; border-radius: 6px; display: block; }
.captura small { color: var(--muted); overflow-wrap: anywhere; }
.derivacoes { display: grid; gap: .35rem; padding-left: 1.2rem; }
.derivacoes li { font-size: .88rem; color: var(--muted); }
.derivacoes li.agora { color: var(--ink); }
.pauta-linha { display: grid; gap: .3rem; padding: .6rem 0; border-bottom: 1px solid var(--line-2); }
.pauta-linha .mem-meta { gap: .35rem; }
.filtros { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
