/* =====================================================================
   VISUAL — todas as cores e medidas ficam nas variáveis abaixo.
   A cor de destaque (--accent) é trocada pela tela "Marca".
   ===================================================================== */
:root {
  --accent: #0071e3;
  --bg: #f5f5f7; --surface: #ffffff; --surface-2: #fbfbfd; --fill: rgba(118,118,128,.12);
  --text: #1d1d1f; --text-2: #6e6e73; --text-3: #a1a1a6; --line: rgba(0,0,0,.08);
  --green: #1f9d55; --orange: #c9700a; --red: #d70015; --purple: #6e56cf; --gray: #8e8e93;
  --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.22);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light dark;
}
/* Escuro automático (segue o sistema), a não ser que o usuário force "claro" */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000; --surface: #1c1c1e; --surface-2: #232326; --fill: rgba(118,118,128,.24);
    --text: #f5f5f7; --text-2: #a1a1a6; --text-3: #6e6e73; --line: rgba(255,255,255,.1);
    --green: #30d158; --orange: #ff9f0a; --red: #ff453a; --purple: #a493f5;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 20px 60px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
/* Escuro forçado pelo botão de tema */
:root[data-theme="dark"] {
  --bg: #000; --surface: #1c1c1e; --surface-2: #232326; --fill: rgba(118,118,128,.24);
  --text: #f5f5f7; --text-2: #a1a1a6; --text-3: #6e6e73; --line: rgba(255,255,255,.1);
  --green: #30d158; --orange: #ff9f0a; --red: #ff453a; --purple: #a493f5;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 20px 60px rgba(0,0,0,.6);
  color-scheme: dark;
}
/* Claro forçado pelo botão de tema */
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; letter-spacing: -.01em; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -.03em; text-wrap: balance; }
h2 { font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
h3 { font-size: 15px; font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.muted { color: var(--text-2); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- estrutura ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px;
  background: color-mix(in srgb, var(--surface) 72%, transparent); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; overflow: hidden; flex: none; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); border: 0; background: none; width: 100%; text-align: left; color: var(--text); font-weight: 500; }
.nav:hover { background: var(--fill); }
.nav.on { background: var(--accent); color: #fff; }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 600; background: var(--fill); padding: 1px 8px; border-radius: 99px; }
.nav.on .count { background: rgba(255,255,255,.25); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--line); }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { padding: 32px 40px 80px; min-width: 0; max-width: 1400px; width: 100%; margin: 0 auto; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.demo-bar { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--text); font-size: 13px; padding: 8px 14px; border-radius: var(--r-sm); margin-bottom: 20px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- componentes ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px; }
.card > h2 { margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; } .between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 99px; padding: 9px 18px; font-weight: 600; background: var(--fill); color: var(--text); white-space: nowrap; transition: transform .12s, filter .12s; }
.btn:hover { filter: brightness(.96); } .btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.danger { color: var(--red); }
.btn.ghost { background: none; color: var(--accent); padding-inline: 10px; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn { border: 0; background: var(--fill); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--text); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, select.input, textarea.input { width: 100%; background: var(--fill); border: 1px solid transparent; border-radius: var(--r-sm); padding: 10px 12px; outline: none; }
.input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
textarea.input { resize: vertical; min-height: 96px; line-height: 1.5; }
.search { position: relative; } .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search .input { padding-left: 36px; border-radius: 99px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .input { width: auto; } .toolbar .search { flex: 1; min-width: 200px; max-width: 340px; } .toolbar .search .input { width: 100%; }

.seg { display: inline-flex; background: var(--fill); padding: 3px; border-radius: 11px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--text-2); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--fill); color: var(--text-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.plain::before { display: none; }
.st-rascunho { color: var(--gray); } .st-revisao_interna { color: var(--purple); } .st-aguardando_cliente { color: var(--orange); }
.st-ajustes { color: var(--red); } .st-aprovado { color: var(--green); } .st-publicado { color: #8e5cf7; }
.pill[class*="st-"] { background: color-mix(in srgb, currentColor 13%, transparent); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; flex: none; background: var(--gray); }
.avatar.lg { width: 48px; height: 48px; font-size: 17px; border-radius: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.chip { font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 7px; background: var(--fill); color: var(--text-2); }
.empty { text-align: center; padding: 44px 20px; color: var(--text-2); }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

/* ---------- painel ---------- */
.kpi { padding: 18px 20px; }
.kpi .v { font-size: 34px; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; margin-top: 6px; }
.kpi .l { font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 34px; gap: 12px; align-items: center; padding: 6px 0; font-size: 14px; }
.bar { height: 10px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); min-width: 2px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: var(--r-sm); border: 0; background: none; width: 100%; text-align: left; }
button.list-item:hover { background: var(--fill); }
.list-item + .list-item { border-top: 1px solid var(--line); }
.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--fill); flex: none; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* ---------- home do cliente (foco em aprovar) ---------- */
.chome { display: flex; flex-direction: column; gap: 22px; max-width: 580px; margin: 0 auto; }
.chome-head h1 { font-size: 28px; margin-top: 2px; }
.chome-sec > h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.chome-sec > h2 .count { font-size: 13px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 99px; padding: 1px 9px; }
.appr-list { display: flex; flex-direction: column; gap: 12px; }
.appr-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 0; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 12px; transition: transform .15s, box-shadow .15s; }
.appr-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.1); }
.appr-cover { width: 76px; height: 76px; border-radius: var(--r-md); object-fit: cover; background: var(--fill); flex: none; }
.appr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.appr-body .t { font-weight: 650; font-size: 16px; line-height: 1.25; }
.appr-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.appr-go { width: 36px; height: 36px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; color: var(--text-2); flex: none; transform: scaleX(-1); }
.chome-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chome-mini .mini { text-align: left; border: 0; padding: 16px 18px; }
.chome-mini .mini .v { font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.chome-mini .mini .l { font-size: 13px; font-weight: 600; color: var(--text-2); margin-top: 2px; }

/* ---------- quadro de peças ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: color-mix(in srgb, var(--fill) 60%, transparent); border-radius: var(--r-lg); padding: 12px; min-height: 160px; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 12px; font-weight: 650; font-size: 14px; }
.pcard { display: block; width: 100%; text-align: left; border: 0; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 10px; margin-bottom: 10px; transition: transform .15s, box-shadow .15s; }
.pcard:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.1); }
.pcard .cover { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 9px; background: var(--fill); display: block; margin-bottom: 10px; }
.pcard .t { font-weight: 600; line-height: 1.3; margin-bottom: 6px; }
.pcard .m.one { flex-wrap: nowrap; } .pcard .m.one span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pcard .m { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }

/* ---------- detalhe da peça ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
.stage { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 18px; min-height: 560px;
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 18px 18px; }
.checks { display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; gap: 10px; font-size: 14px; align-items: flex-start; }
.check b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: #fff; flex: none; margin-top: 1px; }
.check.ok b { background: var(--green); } .check.warn b { background: var(--orange); } .check.err b { background: var(--red); }
.tl { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding-bottom: 16px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--text-2); font-size: 13px; font-weight: 700; }
.tl-ic.g { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.tl-ic.r { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.tl-ic.a { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.bubble { background: var(--fill); border-radius: 4px 14px 14px 14px; padding: 9px 12px; margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.steps { display: flex; gap: 6px; margin: 4px 0 2px; }
.steps i { flex: 1; height: 5px; border-radius: 99px; background: var(--fill); }
.steps i.done { background: var(--accent); } .steps i.bad { background: var(--red); }

/* ---------- mockups dos canais ---------- */
.mock { --mk-bg: #fff; --mk-text: #0f1419; --mk-sub: #65676b; --mk-line: #e6e6e6; color: var(--mk-text); background: var(--mk-bg); font-size: 14px; line-height: 1.4; letter-spacing: 0; }
.mk-feed { width: 360px; max-width: 100%; border-radius: 12px; border: 1px solid var(--mk-line); overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.12); }
.mk-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.mk-head .avatar { width: 34px; height: 34px; }
.mk-head b { font-size: 14px; display: block; } .mk-head small { color: var(--mk-sub); font-size: 12px; }
.mk-media { position: relative; background: #111; overflow: hidden; }
.mk-media img, .mk-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.mk-media .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: #8e8e93; font-size: 13px; text-align: center; padding: 20px; }
.mk-play { position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: none; width: 100%; padding: 0; cursor: pointer; }
.mk-play span { width: 62px; height: 62px; border-radius: 50%; background: rgba(0,0,0,.5); backdrop-filter: blur(8px); display: grid; place-items: center; }
.mk-play svg { width: 26px; height: 26px; fill: #fff; stroke: none; margin-left: 3px; }
.mk-actions { display: flex; gap: 16px; padding: 10px 12px 4px; align-items: center; }
.mk-actions svg { width: 24px; height: 24px; }
.mk-cap { padding: 4px 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.mk-cap .more { color: var(--mk-sub); }
.mk-li-actions { display: flex; justify-content: space-around; border-top: 1px solid var(--mk-line); padding: 10px 6px; color: var(--mk-sub); font-weight: 600; font-size: 13px; }
.mk-phone { width: 290px; max-width: 100%; border-radius: 38px; padding: 9px; background: #1a1a1c; box-shadow: 0 20px 50px rgba(0,0,0,.3), inset 0 0 0 1px #3a3a3c; }
.mk-screen { position: relative; aspect-ratio: 9/16; border-radius: 30px; overflow: hidden; background: #000; color: #fff; }
.mk-screen .mk-media { position: absolute; inset: 0; }
.mk-over { position: absolute; left: 0; right: 0; padding: 14px; pointer-events: none; }
.mk-over.top { top: 0; background: linear-gradient(rgba(0,0,0,.45), transparent); }
.mk-over.bot { bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.65)); padding-right: 62px; padding-top: 40px; font-size: 13px; }
.mk-over .avatar { width: 30px; height: 30px; font-size: 11px; border: 2px solid #fff; }
.mk-prog { height: 3px; border-radius: 9px; background: rgba(255,255,255,.4); margin-bottom: 10px; overflow: hidden; } .mk-prog i { display: block; width: 40%; height: 100%; background: #fff; }
.mk-rail { position: absolute; right: 10px; bottom: 70px; display: flex; flex-direction: column; gap: 16px; align-items: center; pointer-events: none; font-size: 11px; text-align: center; }
.mk-rail svg { width: 28px; height: 28px; stroke: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); display: block; margin-bottom: 2px; }
.mk-safe { position: absolute; left: 0; right: 0; border: 1px dashed rgba(255,255,255,.55); pointer-events: none; }
.mk-yt { width: 560px; max-width: 100%; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.12); border: 1px solid var(--mk-line); }
.mk-yt .body { padding: 12px 14px 16px; } .mk-yt h4 { margin: 0 0 10px; font-size: 17px; line-height: 1.3; }
.mk-desc { background: #f2f2f2; border-radius: 10px; padding: 10px 12px; margin-top: 12px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }

.mk-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.88); color: #111; font-size: 20px; line-height: 1; padding: 0 0 3px; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.mk-nav.prev { left: 8px; } .mk-nav.next { right: 8px; }
.mk-dots { position: absolute; bottom: 9px; left: 0; right: 0; display: flex; gap: 5px; justify-content: center; pointer-events: none; }
.mk-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); } .mk-dots i.on { background: #fff; }
.slide-th { position: relative; display: inline-block; } .slide-th img { width: 56px; height: 56px; border-radius: 9px; object-fit: cover; display: block; }
.slide-th button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--text); color: var(--bg); font-size: 13px; line-height: 1; padding: 0; }

/* ---------- prazos, calendário, ficha do cliente ---------- */
.chip.late { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); font-weight: 600; }
.st-nova { color: var(--accent); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); }
.cal-h { background: var(--surface-2); padding: 8px; font-size: 12px; font-weight: 600; color: var(--text-2); text-align: center; }
.cal-d { background: var(--surface); min-height: 112px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-d.off { background: var(--surface-2); } .cal-d .n { font-size: 12px; font-weight: 600; color: var(--text-2); padding: 2px 4px; align-self: flex-start; }
.cal-d.today .n { background: var(--accent); color: #fff; border-radius: 99px; padding: 2px 8px; }
.cal-chip { display: flex; align-items: center; gap: 5px; width: 100%; border: 0; border-left: 3px solid var(--gray); background: var(--fill); border-radius: 6px; padding: 3px 6px; font-size: 12px; text-align: left; min-width: 0; }
.cal-chip span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cal-chip:hover { background: color-mix(in srgb, var(--accent) 14%, var(--fill)); }
.cal-agenda { display: none; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 14px; } .kv dt { color: var(--text-2); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.report { white-space: pre-wrap; font-size: 14px; line-height: 1.6; background: var(--fill); border-radius: var(--r-sm); padding: 12px 14px; }
.tabs { overflow-x: auto; max-width: 100%; margin-bottom: 18px; } .tabs .seg { white-space: nowrap; }

/* ---------- base de conhecimento ---------- */
.kb { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.article { max-width: 720px; } .article h3 { font-size: 19px; margin: 22px 0 8px; letter-spacing: -.02em; }
.article p { margin: 0 0 12px; line-height: 1.65; } .article ul { margin: 0 0 12px; padding-left: 20px; line-height: 1.7; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(900px 500px at 20% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent), radial-gradient(700px 500px at 100% 100%, color-mix(in srgb, var(--purple) 16%, transparent), transparent), var(--bg); }
.login-card { width: 420px; max-width: 100%; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); border-radius: 28px; padding: 36px 32px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.login-card .brand-mark { width: 60px; height: 60px; border-radius: 17px; font-size: 26px; margin: 0 auto 16px; }
.persona { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; border: 0; background: var(--fill); padding: 10px 12px; border-radius: var(--r-md); }
.persona:hover { background: color-mix(in srgb, var(--accent) 14%, var(--fill)); }

/* ---------- modal / toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.36); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; z-index: 50; animation: fade .18s; }
.sheet { background: var(--surface); border-radius: 24px; width: 560px; max-width: 100%; max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .22s cubic-bezier(.2,.9,.3,1.2); }
.sheet.wide { width: 720px; } .sheet.narrow { width: 420px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 8px; }
.sheet-body { padding: 12px 24px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.sheet-foot { padding: 14px 24px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.drop { border: 1.5px dashed var(--text-3); border-radius: var(--r-md); padding: 16px; display: flex; gap: 14px; align-items: center; }
.drop img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--fill); }
.switch { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--fill); position: relative; transition: background .2s; flex: none; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked { background: var(--green); } .switch input:checked::after { transform: translateX(18px); }
.checks-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.checks-inline label { display: inline-flex; gap: 6px; align-items: center; background: var(--fill); padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 500; cursor: pointer; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; } .swatches button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: color-mix(in srgb, var(--text) 92%, transparent); color: var(--bg); padding: 11px 20px; border-radius: 99px; font-weight: 600; font-size: 14px; z-index: 60; box-shadow: var(--shadow-lg); animation: pop .25s; max-width: calc(100vw - 32px); }
.codebox { background: var(--fill); border-radius: var(--r-sm); padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } }
.toast { animation-name: fade; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- telas menores ---------- */
@media (max-width: 1100px) { .detail { grid-template-columns: 1fr; } .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); z-index: 20; justify-content: space-around; }
  .brand, .side-foot .who, .side-foot .avatar, .nav .count { display: none; }
  .side { justify-content: flex-start; overflow-x: auto; }
  .cal { display: none; } .cal-agenda { display: block; } .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; }
  .demo-bar .grow { flex-basis: 100%; order: 3; }
  .nav { flex-direction: column; gap: 2px; font-size: 10px; padding: 6px 4px; width: auto; flex: none; min-width: 72px; align-items: center; }
  .nav.on { background: none; color: var(--accent); }
  .side-foot { margin: 0; border: 0; padding: 0; }
  .main { padding: 20px 16px 110px; } h1 { font-size: 25px; }
  .g2, .kb, .form-2 { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 110px 1fr 28px; }
}

/* ---------- mockup de tela (Tela Flow) ---------- */
.mk-tv { display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.mk-tv.hor { width: 640px; } .mk-tv.vert { width: 300px; }
.mk-tv-frame { width: 100%; padding: 12px; background: #111113; border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.35), inset 0 0 0 1px #2c2c2e; }
.mk-tv-frame .mk-media { border-radius: 4px; }
.mk-tv-stand { width: 90px; height: 34px; background: linear-gradient(#2c2c2e, #1a1a1c); clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%); }
.mk-tv.vert .mk-tv-stand { width: 120px; height: 18px; border-radius: 0 0 8px 8px; clip-path: none; }
.mk-tv-label { order: 3; margin-top: 10px; font-size: 12px; color: var(--text-2); display: flex; gap: 6px; align-items: center; }
.drive-hint { font-weight: 400; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.slides-list { font-size: 12px; color: var(--text-2); }
[hidden] { display: none !important; }
/* equipe (não admin): esconde a gestão de clientes */
body:not(.is-admin) [data-a="editClient"], body:not(.is-admin) [data-a="deleteClient"], body:not(.is-admin) [data-a="addContact"],
body:not(.is-admin) [data-a="rmContact"], body:not(.is-admin) [data-a="addLink"], body:not(.is-admin) [data-a="rmLink"],
body:not(.is-admin) [data-a="mkFolder"], body:not(.is-admin) [data-a="syncFolders"], body:not(.is-admin) [data-a="editUser"] { display: none !important; }
body:not(.is-admin) [data-ch="onb"] { pointer-events: none; }
/* vídeo do Drive: quadro 2,5x maior, reduzido e centralizado no mockup */
/* O player do Drive fica um pouco mais alto que a moldura: o vídeo (centralizado) ocupa a moldura inteira,
   e só a "casca" do player sai da área visível — a seta do Drive em cima e a fileira de botões embaixo. */
.mk-media iframe.drv { inset: calc(var(--crop, 6.5%) * -1) auto auto 0; width: 250%; height: calc((100% + var(--crop, 6.5%) * 2) * 2.5); transform: scale(.4); transform-origin: 0 0; }
/* avatar com logo do cliente */
.avatar.logo { background: #fff; overflow: hidden; padding: 0; }
.avatar.logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- visualização como cliente ---------- */
.previewing .shell { box-shadow: inset 0 0 0 5px #ff9f0a; min-height: 100vh; }
.previewing .side { background: color-mix(in srgb, #ff9f0a 9%, var(--surface)); }
.preview-bar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px; margin: -4px 0 18px; padding: 12px 16px; border-radius: 16px; background: #ff9f0a; color: #1d1d1f; box-shadow: 0 8px 24px rgba(255,159,10,.35); }
.preview-bar b { display: block; font-size: 15px; } .preview-bar span { font-size: 12.5px; opacity: .85; }
.preview-bar .btn { background: #1d1d1f; color: #fff; flex: none; }
.preview-bar .avatar { width: 38px; height: 38px; flex: none; }

/* ---------- anúncio (campanhas) ---------- */
.mk-cta { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-size: 13px; font-weight: 600; background: var(--mk-fill, rgba(0,0,0,.05)); border-top: 1px solid var(--mk-line, rgba(0,0,0,.08)); }
.mk-cta.over { position: absolute; left: 12%; right: 12%; bottom: 7%; justify-content: center; border-radius: 10px; background: rgba(255,255,255,.92); color: #111; border: 0; z-index: 3; }

/* ---------- janelas no celular: sobe de baixo, botão sempre visível ---------- */
.sheet-head, .sheet-foot { flex: none; }
.sheet-body { flex: 1 1 auto; min-height: 0; }
@media (max-width: 820px) {
  .overlay { padding: 0; place-items: end center; }
  .sheet, .sheet.wide, .sheet.narrow { width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 22px 22px 0 0; }
  .sheet-head { padding: 16px 18px 6px; } .sheet-body { padding: 10px 18px 14px; }
  .sheet-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  .sheet-foot .btn { flex: 1 1 auto; }
  .preview-bar { flex-wrap: wrap; margin-top: 0; } .preview-bar .btn { width: 100%; }
}

/* ---------- ícones dos canais do cliente ---------- */
.ch-icons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ch-ic { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--fill, rgba(0,0,0,.05)); border: 1px solid var(--line); }
.ch-ic img { width: 17px; height: 17px; display: block; }
.ch-ic.txt { font-size: 11px; font-weight: 800; letter-spacing: -.02em; color: #fff; border: 0; }
.ch-ic.ch-linkedin { background: #0a66c2; } .ch-ic.ch-telaflow { background: #e0245e; }
body:not(.is-admin) .admin-only { display: none !important; }
/* aviso sobre o vídeo do Drive (some ao tocar no player) */
.mk-hint { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 4; pointer-events: none; background: rgba(0,0,0,.62); color: #fff; font-size: 13px; font-weight: 600; padding: 9px 14px; border-radius: 999px; white-space: nowrap; backdrop-filter: blur(6px); animation: hintPulse 1.6s ease-in-out infinite; }
@keyframes hintPulse { 50% { opacity: .65; } }
/* vídeo vertical para aprovação: legenda embaixo do celular */
.mk-vwrap { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 290px; max-width: 100%; }
.mk-below { width: 100%; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; max-height: 220px; overflow-y: auto; }
.mk-badge { position: absolute; top: 56px; left: 50%; transform: translateX(-50%); z-index: 3; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.mk-tog { cursor: pointer; border: 0; font-family: inherit; } .mk-tog.on { background: var(--accent); color: #fff; }
/* cliente: tampa o botão do player do Drive que abre o arquivo no Drive (canto superior direito) */
.mk-hint, .mk-shield { display: none !important; }

.pill.dl { color: var(--accent); font-weight: 700; }

/* status publicado, ícones de canal e tipo */
.pill.st-publicado { color: #8e5cf7; }
.ch-mini { width: 16px; height: 16px; border-radius: 4px; display: inline-grid; place-items: center; flex: none; background: #fff; }
.ch-mini img { width: 11px; height: 11px; display: block; }
.ch-mini.txt { font-size: 8px; font-weight: 700; color: #fff; background: #0a66c2; }
.ch-mini.ch-telaflow { background: #111; }
.kind-ic { width: 14px; height: 14px; display: inline-grid; place-items: center; flex: none; opacity: .75; }
.kind-ic svg { width: 13px; height: 13px; }
.cal-chip .ch-mini { width: 14px; height: 14px; } .cal-chip .ch-mini img { width: 10px; height: 10px; }
.chome-mini.three { grid-template-columns: repeat(3, 1fr); }

/* prazo de aprovação x data de publicação */
.due-box { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.due-box > div { background: var(--fill); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.due-box span { font-size: 11px; color: var(--text-2); }
.due-box b { font-size: 13px; }
.due-box.late > div:first-child { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
@media (max-width: 520px) { .due-box { grid-template-columns: 1fr; } }
