:root {
  --bg: #F5F6F8; --panel: #FFFFFF; --panel2: #F3F4F7; --line: #E6E8EE; --text: #12162A; --muted: #6B7287;
  --brand: #222E58; --ok: #1C7A44; --focus: #4C8DFF; --stage: #E9EBF0;
  --radius: 14px; --shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 20px rgba(16,24,40,.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0E111C; --panel: #151927; --panel2: #1C2131; --line: #262C3E; --text: #E9ECF4; --muted: #8B93AA;
    --brand: #9CB0F5; --ok: #4ACB82; --stage: #0A0D16; --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0E111C; --panel: #151927; --panel2: #1C2131; --line: #262C3E; --text: #E9ECF4; --muted: #8B93AA;
    --brand: #9CB0F5; --ok: #4ACB82; --stage: #0A0D16; --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: Archivo, Inter, sans-serif; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 800; } h2 { font-size: 15px; font-weight: 700; }
h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
h4 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 14px 0 8px; }
.ic { display: inline-flex; } .ic svg { display: block; }
.muted { color: var(--muted); } .small { font-size: 12px; } .grow { flex: 1; }
.hint { font-size: 12px; color: var(--muted); margin: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr) 0; height: 100vh; }
.app.dock-open { grid-template-columns: var(--side) minmax(0, 1fr) 340px; }

/* ---------- barra lateral (ícones) */
.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding: 16px 8px; gap: 22px; }
.brand { display: grid; justify-items: center; gap: 4px; color: var(--brand); cursor: pointer; text-decoration: none; border-radius: 10px; transition: transform .12s; }
.brand:hover { transform: scale(1.06); }
.brand b { display: none; }
nav { display: grid; gap: 6px; width: 100%; }
nav button { all: unset; cursor: pointer; display: grid; justify-items: center; gap: 4px; padding: 10px 2px; border-radius: 12px; color: var(--muted); font-size: 10.5px; font-weight: 600; text-align: center; }
nav button:hover { background: var(--panel2); color: var(--text); }
nav button.on { background: var(--panel2); color: var(--text); }
nav button.on .ic { color: var(--ok); }
.side-foot { margin-top: auto; display: grid; justify-items: center; }
.kit-mini { all: unset; cursor: pointer; display: grid; justify-items: center; gap: 4px; font-size: 10px; color: var(--muted); text-align: center; }
.kit-mini img { width: 52px; height: 30px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; border: 1px solid var(--line); }

/* ---------- base */
main { overflow: auto; container-type: inline-size; }
.page { padding: 24px 28px 40px; display: grid; gap: 18px; align-content: start; }
.head { display: flex; align-items: center; gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 18px; }
.btn { border: 1px solid var(--line); background: var(--panel); padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; transition: .12s; }
.btn:hover { border-color: var(--muted); }
.btn.pri { background: var(--text); color: var(--panel); border-color: var(--text); }
.btn.pri:hover { opacity: .88; }
.btn.lg { padding: 11px 18px; font-size: 14px; border-radius: 12px; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--panel2); }
.btn:disabled { opacity: .4; cursor: default; }
.mini { all: unset; cursor: pointer; width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 7px; color: var(--muted); font-size: 13px; }
.mini:hover { background: var(--panel2); color: var(--text); } .mini:disabled { opacity: .3; cursor: default; }
.mini.danger:hover { color: #E5484D; }
input:not([type]), input[type=text], textarea, select { width: 100%; border: 1px solid var(--line); background: var(--panel2); border-radius: 10px; padding: 8px 10px; outline: none; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
input[type=range] { width: 100%; accent-color: var(--text); }
label.f { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 2px; background: var(--panel2); flex-wrap: wrap; }
.seg button { all: unset; cursor: pointer; padding: 5px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); grid-column: 1/-1; }

/* ---------- 1. descrever */
.hero { min-height: 100%; display: flex; align-items: center; justify-content: center; }
.hero-in { width: min(760px, 100%); display: grid; gap: 14px; text-align: center; }
.hero-in h1 { font-size: 34px; }
.hero-in p { margin: -6px 0 6px; }
.prompt-card { padding: 14px; display: grid; gap: 10px; text-align: left; }
.prompt-card textarea { border: 0; background: transparent; font-size: 16px; padding: 6px; resize: none; box-shadow: none; }
.attach { display: flex; gap: 10px; align-items: center; padding: 8px; background: var(--panel2); border-radius: 10px; }
.attach img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.chip:hover { color: var(--text); border-color: var(--muted); }

/* ---------- barra de etapas */
.studio-page { padding: 14px 18px 18px; gap: 14px; height: 100vh; grid-template-rows: auto 1fr; }
.topbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stepper { display: flex; gap: 4px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.st { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.st i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--panel2); }
.st.done i { background: var(--ok); color: #fff; }
.st.on { background: var(--panel2); color: var(--text); }
.st.on i { background: var(--text); color: var(--panel); }

/* ---------- 2. editor */
.editor-grid { display: grid; grid-template-columns: 250px 1fr 290px; gap: 14px; min-height: 0; }
.panel > * { min-width: 0; }
.panel { grid-template-columns: minmax(0, 1fr); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; overflow: auto; display: grid; gap: 12px; align-content: start; }
.center { display: grid; grid-template-rows: 1fr auto; gap: 10px; min-height: 0; }
.stage { background: var(--stage); border-radius: var(--radius); display: grid; place-items: center; overflow: hidden; min-height: 340px;
  background-image: radial-gradient(color-mix(in srgb, var(--muted) 22%, transparent) 1px, transparent 1px); background-size: 18px 18px; }
.edit-canvas { box-shadow: 0 12px 40px rgba(0,0,0,.25); outline: none; touch-action: none; }
.stage-bar { display: flex; gap: 8px; align-items: center; }
.fmt-sel { width: auto; min-width: 220px; }
.tag { font-size: 11px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 3px 9px; }
.adds { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tool { all: unset; cursor: pointer; display: grid; justify-items: center; gap: 4px; padding: 8px 2px; border-radius: 10px; border: 1px solid var(--line); font-size: 10.5px; color: var(--muted); font-weight: 600; }
.tool b { font-family: Archivo; font-size: 15px; line-height: 16px; color: var(--text); }
.tool:hover { border-color: var(--muted); color: var(--text); }
.layer-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.layer { display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 9px; cursor: pointer; font-size: 12.5px; }
.layer:hover { background: var(--panel2); }
.layer.on { background: color-mix(in srgb, var(--focus) 14%, transparent); }
.layer.off .ln { opacity: .45; text-decoration: line-through; }
.layer .lt { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: var(--panel2); font-size: 11px; font-weight: 700; color: var(--muted); flex: none; }
.layer .ln { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer .mini { width: 22px; height: 22px; font-size: 11px; }
.igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 10px; }
.itile { all: unset; cursor: pointer; aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; transition: transform .12s; }
.itile svg { width: 100%; height: auto; max-width: 52px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.22)); }
.itile:hover { transform: scale(1.08); }
.itile.on { outline: 2px solid var(--focus); outline-offset: 2px; }
.igrp h4 { margin-top: 6px; }
.ph { display: flex; align-items: center; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ph b { font-size: 13px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.sw { all: unset; cursor: pointer; width: 24px; height: 24px; border-radius: 7px; border: 1px solid rgba(0,0,0,.14); box-sizing: border-box; }
.sw.on { outline: 2px solid var(--focus); outline-offset: 2px; }
.sw.auto { display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--muted); background: var(--panel2); }
.icon-cur { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--panel2); border-radius: 10px; }
.icon-cur > div { display: grid; gap: 6px; justify-items: start; }
.docpanel { display: grid; gap: 12px; }
.field-photo { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.field-photo img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.scenes { display: grid; gap: 6px; } .scenes .row { flex-wrap: nowrap; } .scenes h4 { margin: 0; }

/* ---------- 3. formatos */
.formats-step, .export-step { overflow: auto; display: grid; gap: 16px; align-content: start; }
.lead { margin: 0; color: var(--muted); }
.fgroups { display: grid; gap: 20px; }
.fgroups section { display: grid; gap: 10px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.fcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; cursor: pointer; display: grid; gap: 8px; transition: .12s; }
.fcard:hover { border-color: var(--muted); }
.fcard.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.fcard .thumb { position: relative; height: 160px; display: grid; place-items: center; background: var(--stage); border-radius: 10px; }
.fcard canvas { border-radius: 3px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.check { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--muted); background: var(--panel); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.fcard.on .check { background: var(--text); border-color: var(--text); color: var(--panel); }
.fmeta { display: flex; align-items: center; justify-content: space-between; }
.fmeta b { display: block; font-size: 13px; } .fmeta span { font-size: 11.5px; color: var(--muted); }

/* ---------- 4. exportar */
.exp-opts { display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.exp-head { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.exp-list { display: grid; }
.exp-row { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.exp-row:last-child { border-bottom: 0; }
.exp-row .tw { width: 72px; height: 72px; display: grid; place-items: center; background: var(--stage); border-radius: 10px; flex: none; }

/* ---------- logo / marca / biblioteca */
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.lcard { padding: 12px; display: grid; gap: 10px; }
.lcard .art { height: 160px; display: grid; place-items: center; background: #fff; border-radius: 10px; border: 1px solid var(--line); padding: 14px; overflow: hidden; }
.lcard .art.dark { background: var(--stage); padding: 0; } .lcard .art img { max-width: 100%; max-height: 150px; }
.lcard .art svg { max-width: 100%; max-height: 130px; width: auto; height: auto; }
.lcard.sel { outline: 2px solid var(--ok); }
.fav { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.fav figure { margin: 0; text-align: center; font-size: 11px; color: var(--muted); }
.fav canvas { display: block; margin: 0 auto 4px; image-rendering: pixelated; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0/8px 8px; }
.tabmock { display: flex; align-items: center; gap: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px 10px 0 0; padding: 8px 12px; width: 240px; font-size: 12px; }
.two { display: grid; grid-template-columns: 1fr 1.1fr; gap: 18px; align-items: start; }
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 28px; text-align: center; color: var(--muted); display: grid; gap: 6px; justify-items: center; transition: .15s; }
.drop.over { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, transparent); }
.log { font: 12px/1.5 ui-monospace, Menlo, monospace; background: var(--panel2); border-radius: 10px; padding: 10px; max-height: 160px; overflow: auto; white-space: pre-wrap; }
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.logos .lg { border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: grid; gap: 6px; }
.logos .lg .im { height: 64px; display: grid; place-items: center; border-radius: 6px; background: repeating-conic-gradient(#e9ebf0 0 25%, #fff 0 50%) 0 0/12px 12px; }
.logos .lg img { max-width: 100%; max-height: 56px; }
.roles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.role { display: grid; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.role input[type=color] { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 2px; background: var(--panel2); cursor: pointer; }
.palette { display: flex; gap: 6px; flex-wrap: wrap; }
.palette i { width: 24px; height: 24px; border-radius: 7px; border: 1px solid rgba(0,0,0,.1); cursor: pointer; }
.rules textarea { min-height: 90px; font-size: 13px; }
.sample { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sample canvas { width: 100%; border-radius: 8px; }

#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--panel); padding: 10px 16px; border-radius: 10px; opacity: 0; transition: .25s; pointer-events: none; z-index: 60; font-weight: 500; }
#toast.on { opacity: 1; transform: translateX(-50%); }

@media (max-width: 1180px) { .editor-grid { grid-template-columns: 220px 1fr 260px; } .two { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .studio-page { height: auto; } .editor-grid { grid-template-columns: 1fr; } .center { order: -1; } .stage { min-height: 420px; }
  .stepper .st { padding: 6px 8px; } .topbar { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .side { flex-direction: row; padding: 8px 16px; overflow-x: auto; }
  nav { display: flex; } .side-foot, .brand { display: none; } .page { padding: 16px; } .roles { grid-template-columns: repeat(3, 1fr); }
  .hero-in h1 { font-size: 26px; } .stepper { overflow-x: auto; max-width: 100%; }
}

/* ---------- desfazer */
.btn.undo { gap: 6px; }
.btn.undo:not(:disabled) { border-color: var(--text); }

/* ---------- assistente (todas as telas) */
.nav-assist { margin-top: 10px; border-top: 1px solid var(--line) !important; padding-top: 14px !important; border-radius: 0 !important; }
.dock { background: var(--panel); border-left: 1px solid var(--line); display: grid; grid-template-rows: auto 1fr auto; min-height: 0; overflow: hidden; }
.app:not(.dock-open) .dock { display: none; }
.dock-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); }
.dock-head b { font-family: Archivo; font-size: 15px; }
.chat-msgs { overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 10px 12px; border-radius: 14px; max-width: 92%; font-size: 13px; line-height: 1.45; display: grid; gap: 8px; }
.msg.me { align-self: flex-end; background: var(--text); color: var(--panel); border-bottom-right-radius: 5px; }
.msg.bot { align-self: flex-start; background: var(--panel2); border-bottom-left-radius: 5px; }
.msg img { width: 100%; max-width: 220px; border-radius: 9px; display: block; }
.msg .btn { justify-self: start; }
.msg.ex { all: unset; align-self: flex-end; max-width: 92%; background: color-mix(in srgb, var(--text) 82%, transparent); color: var(--panel); padding: 10px 12px; border-radius: 14px; border-bottom-right-radius: 5px; font-size: 13px; display: grid; gap: 8px; cursor: pointer; box-sizing: border-box; border: 1.5px dashed transparent; }
.msg.ex:hover { border-color: var(--ok); }
.ex-title { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; text-align: center; margin-top: 6px; }
.ex-try { font-size: 11px; opacity: .7; font-weight: 600; }
.dock-foot { border-top: 1px solid var(--line); padding: 12px; display: grid; gap: 10px; }
.chips.left { justify-content: flex-start; }
.dock-foot .chip { font-size: 12px; padding: 5px 10px; text-align: left; }
.composer { border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: grid; gap: 6px; background: var(--panel2); }
.composer textarea { border: 0; background: transparent; resize: none; padding: 4px; box-shadow: none !important; }
@media (max-width: 1100px) { .app.dock-open { grid-template-columns: var(--side) minmax(0, 1fr) 300px; } }
@media (max-width: 900px) { .app.dock-open .dock { position: fixed; right: 0; top: 0; bottom: 0; width: min(360px, 100vw); z-index: 40; box-shadow: -10px 0 30px rgba(0,0,0,.25); } .app.dock-open { grid-template-columns: var(--side) minmax(0, 1fr) 0; } }

/* editor se reorganiza conforme o espaço (ex.: com o assistente aberto) */
@container (max-width: 1080px) {
  .editor-grid { grid-template-columns: minmax(0, 1fr) 260px; grid-template-rows: minmax(0, 1fr) auto; }
  .editor-grid .panel.left { grid-column: 1 / -1; order: 3; max-height: 230px; }
  .stepper .st { padding: 6px 8px; }
}
@container (max-width: 720px) {
  .studio-page { height: auto; }
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .editor-grid .panel.right { order: 2; }
  .stage { min-height: 380px; }
}

/* ---------- tela inicial = conversa com o assistente */
.page.home { min-height: 100%; display: flex; justify-content: center; padding-top: 6vh; }
.home-chat { width: min(780px, 100%); display: flex; flex-direction: column; gap: 14px; }
.home-hero { text-align: center; display: grid; gap: 6px; margin-bottom: 4px; }
.home-hero h1 { font-size: 34px; }
.home-hero p { margin: 0; }
.home-msgs { display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow: auto; padding: 4px 2px; }
.home-msgs .msg { font-size: 14px; max-width: 80%; }
.home-msgs .msg img { max-width: 280px; }
.composer.big { padding: 12px; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }
.composer.big textarea { font-size: 16px; }
.home-chat .chips { justify-content: center; }
.examples { display: grid; gap: 10px; }
.examples .ex-title { margin: 0; }
.ex-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.examples.big .ex-grid { grid-template-columns: 1fr 1fr; }
.ex-card { all: unset; cursor: pointer; display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-sizing: border-box; transition: .12s; }
.ex-card:hover { border-color: var(--ok); transform: translateY(-1px); }
.ex-card img, .ex-card .ex-art { width: 96px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.ex-card .ex-art { display: grid; place-items: center; background: var(--panel2); color: var(--muted); }
.ex-card p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.4; }
.ex-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ok); }
.chat-msgs .examples .ex-card img, .chat-msgs .examples .ex-card .ex-art { width: 72px; height: 50px; }
.msg.typing { flex-direction: row; display: flex; gap: 4px; padding: 12px 14px; }
.msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; } .msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@container (max-width: 640px) { .examples.big .ex-grid { grid-template-columns: 1fr; } .home-hero h1 { font-size: 26px; } }

/* ---------- chat no estilo Claude: simples e objetivo */

.msg { font-size: 14px; }
.msg.me { background: var(--panel2); color: var(--text); border-radius: 18px; border-bottom-right-radius: 18px; padding: 10px 14px; max-width: 82%; }
.msg.bot { background: none; padding: 2px 4px; max-width: 100%; border-radius: 0; }
.msg img { max-width: 200px; border-radius: 12px; }
.file-chip { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.msg-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.msg.typing { background: none; }
.msg.typing .prog { font-size: 12px; color: var(--muted); margin-left: 8px; }

.composer, .composer.big { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); padding: 12px 12px 10px 14px; display: grid; gap: 8px; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.composer:focus-within { border-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.composer textarea, .composer.big textarea { border: 0 !important; background: transparent !important; box-shadow: none !important; resize: none; padding: 4px 2px; font-size: 15px; line-height: 1.5; min-height: 26px; max-height: 220px; }
.composer.big { min-height: 118px; align-content: space-between; }
.cbar { display: flex; align-items: center; gap: 8px; }
.round-btn { all: unset; cursor: pointer; width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); }
.round-btn:hover { background: var(--panel2); color: var(--text); }
.send-btn { all: unset; cursor: pointer; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--send); color: #fff; opacity: .45; transition: opacity .15s; }
.send-btn.ready { opacity: 1; }
.send-btn:disabled { cursor: default; opacity: .3; }
.fmt-mini { all: unset; cursor: pointer; font-size: 12.5px; color: var(--muted); padding: 6px 8px; border-radius: 8px; }
.fmt-mini:hover { background: var(--panel2); color: var(--text); }
.plus-wrap { position: relative; }
.plus-menu { position: absolute; left: 0; bottom: 40px; width: 300px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 34px rgba(0,0,0,.22); padding: 6px; z-index: 30; display: grid; }
.plus-menu[hidden] { display: none; }
.dock .plus-menu { width: 270px; }
.pm-item { all: unset; cursor: pointer; display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; font-size: 13px; }
.pm-item:hover { background: var(--panel2); }
.pm-item b { display: block; font-weight: 600; } .pm-item small { display: block; color: var(--muted); font-size: 11.5px; }
.pm-item input { margin-left: auto; }
.pm-ic { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--panel2); font-size: 15px; flex: none; }
.att { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: visible; }
.att img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.att.file { width: auto; height: auto; display: inline-flex; gap: 8px; align-items: center; padding: 10px 30px 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; justify-self: start; }
.att-x { all: unset; cursor: pointer; position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); color: var(--panel); font-size: 10px; display: grid; place-items: center; }
.home-hero { gap: 12px; justify-items: center; margin-bottom: 10px; }
.hero-mark { color: var(--send); }
.home-hero h1 { font-size: 32px; font-weight: 600; font-family: Georgia, 'Times New Roman', serif; letter-spacing: -.01em; }
.page.home { padding-top: 14vh; }
.dock-foot { gap: 8px; }

/* cartão da análise */
.an-card { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.an-thumb { width: 100%; max-width: 240px !important; max-height: 180px; object-fit: contain; border-radius: 10px; background: var(--panel2); }
.an-sec { display: grid; gap: 4px; } .an-sec > b { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.an-pal { display: flex; flex-wrap: wrap; gap: 6px; }
.an-pal span { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-family: ui-monospace, Menlo, monospace; }
.an-pal i { width: 16px; height: 16px; border-radius: 5px; border: 1px solid rgba(0,0,0,.12); }
.an-font span:first-child { font-size: 17px; }
.color-in { width: 44px; height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: var(--panel2); }

/* ---------- caixa de mensagem em pílula (estilo Claude) */
.composer-wrap { display: grid; gap: 8px; }
.composer-wrap .composer, .composer-wrap.big .composer { min-height: 0; display: grid; gap: 8px; padding: 8px 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel2); box-shadow: none; }
.composer-wrap.big .composer { padding: 10px 12px; border-radius: 20px; }
.cline { display: flex; align-items: center; gap: 6px; }
.cline textarea { flex: 1; border: 0 !important; background: transparent !important; box-shadow: none !important; resize: none; padding: 6px 4px !important; font-size: 15px; line-height: 1.45; min-height: 0; max-height: 220px; }
.composer-wrap.big .cline textarea { font-size: 16px; }
.icon-btn { all: unset; cursor: pointer; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); flex: none; }
.icon-btn:hover { background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.send-btn { background: none; opacity: 1; }
.send-btn.ready { color: var(--text); }
.send-btn:disabled { opacity: .35; }
.icon-btn.rec { color: #E5484D; animation: blink 1s infinite; }
.att-row { display: flex; gap: 8px; padding: 6px 4px 0; }
.under { display: flex; align-items: center; gap: 16px; padding: 0 10px; font-size: 13px; color: var(--muted); }
.under .opt { display: inline-flex; align-items: center; gap: 4px; }
.under .fmt-mini { color: var(--text); padding: 2px 4px; }
.plus-menu { bottom: 44px; }
.home-hero h1 { color: var(--text); }
.hero-mark { color: var(--ok); }

/* ---------- seletor de tema */
.theme-btn { all: unset; cursor: pointer; display: grid; justify-items: center; gap: 3px; font-size: 10px; color: var(--muted); padding: 6px 4px; border-radius: 10px; margin-bottom: 10px; }
.theme-btn:hover { background: var(--panel2); color: var(--text); }

/* ---------- configurações / agentes */
.cfg { display: grid; gap: 14px; max-width: 900px; }
.cfg-card { display: grid; gap: 12px; }
.cfg-card.off { opacity: .6; }
.ag-name { font-family: Archivo, Inter, sans-serif; font-size: 16px; font-weight: 700; flex: 1; min-width: 180px; }
.grid-tight { display: grid; gap: 6px; }
.pill { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.msg-meta { font-size: 11px; color: var(--muted); }
.under .mode select { color: var(--text); font-weight: 600; }
.dock .under { padding: 0 6px; font-size: 12px; }

/* ---------- layout estilo Claude: chat à esquerda, prévia grande à direita */
.app.dock-open { grid-template-columns: var(--side) 360px minmax(0, 1fr); }
.dock { border-left: 0; border-right: 1px solid var(--line); }
@media (max-width: 1100px) { .app.dock-open { grid-template-columns: var(--side) 320px minmax(0, 1fr); } }
.studio-page { padding: 12px 16px 16px; gap: 10px; grid-template-rows: auto minmax(0, 1fr); }
.topbar .stepper { border: 0; background: transparent; padding: 0; }
.cost-chip { font-size: 12px; color: var(--muted); padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; white-space: nowrap; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(8px); }
.topbar { flex-wrap: nowrap; } .topbar .st { padding: 6px 8px; }

.editor-v2 { min-height: 0; height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.editor-v2.with-insp { grid-template-columns: minmax(0, 1fr) 300px; }
.editor-v2 .stage-col { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 8px; }
.editor-v2 .stage { height: 100%; min-height: 420px; border-radius: 16px; }
.editor-v2 .stage-bar { display: flex; gap: 6px; align-items: center; }
.tbtn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--text); background: var(--panel); border: 1px solid var(--line); }
.tbtn:hover, .tbtn.on { border-color: var(--muted); }
.tbtn.on { background: var(--panel2); }
.editor-v2 .fmt-sel { width: auto; min-width: 0; max-width: 260px; font-size: 12.5px; padding: 6px 10px; }
.inspector { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.inspector[hidden] { display: none; }
.insp-head { display: flex; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); }
.insp-head .seg { flex-wrap: wrap; }
.insp-head .seg button { font-size: 12px; padding: 5px 8px; }
.inspector > .panel { border: 0; border-radius: 0; background: none; box-shadow: none; padding: 12px; overflow: auto; }
.inspector > .panel[hidden] { display: none; }
@container (max-width: 760px) { .editor-v2.with-insp { grid-template-columns: minmax(0, 1fr); } .inspector { max-height: 45vh; } }
.badge-ia { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--text); color: var(--panel); }
.lcard .art { position: relative; }
.stale-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 90; background: #B54708; color: #fff; padding: 9px 16px; font-size: 13px; font-weight: 600; text-align: center; }

/* ---------- modelos prontos (variações de estilo) ---------- */
.sugs { display: grid; gap: 10px; width: 100%; margin-top: 6px; }
.sugs-head { display: flex; align-items: baseline; gap: 8px; }
.sugs-head b { font-size: 13px; }
.sugs-head small { color: var(--muted); font-size: 11.5px; }
.sugs-head .mini { align-self: center; }
.sugs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.msg .sugs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.msg .sugs { margin-top: 10px; }
.msg .sugs-head small { display: none; }
.sug { all: unset; cursor: pointer; display: grid; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-sizing: border-box; min-width: 0; transition: .12s; }
.sug:hover { border-color: var(--ok); transform: translateY(-1px); }
.sug canvas { width: 100%; height: auto; aspect-ratio: 1; border-radius: 8px; display: block; }
.sug-tag { font-size: 11px; font-weight: 700; color: var(--ok); text-transform: uppercase; letter-spacing: .06em; }
.sug-txt { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg .sug-txt { display: none; }
.msg .sug-tag { font-size: 10px; }
.home-chat .sugs { max-width: 760px; margin: 18px auto 0; }
.page > .sugs { margin: 4px 0 18px; }
.catalog { display: grid; gap: 14px; }
.cat-bar { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.sug.cat { padding: 8px; gap: 6px; }
.sug-tag em { font-style: normal; color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; }
.sug.cat .sug-txt { white-space: normal; color: var(--text); font-size: 12.5px; line-height: 1.3; }

/* ---------- sobre a empresa ---------- */
.emp-text { width: 100%; box-sizing: border-box; min-height: 220px; resize: vertical; font: inherit; font-size: 14px; line-height: 1.55; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); color: var(--text); }
.emp-text:focus { outline: none; border-color: var(--focus); }
.emp-read { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--panel2); }
.emp-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; font-size: 13px; align-items: start; }
.emp-row b { color: var(--muted); font-weight: 600; }
.emp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.static { cursor: default; font-size: 12px; padding: 3px 9px; }
@media (max-width: 640px) { .emp-row { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- identidade visual (área separada) ---------- */
.id-page .head { gap: 10px; flex-wrap: wrap; }
.id-brief { display: grid; grid-template-columns: 1.3fr 1.3fr .6fr 1fr 1fr; gap: 12px; align-items: end; }
@media (max-width: 900px) { .id-brief { grid-template-columns: 1fr 1fr; } }
.id-body { display: grid; gap: 14px; margin-top: 14px; }
.id-pals { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.id-pal, .id-font { all: unset; cursor: pointer; display: grid; gap: 8px; padding: 10px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--panel); box-sizing: border-box; transition: .12s; min-width: 0; }
.id-pal:hover, .id-font:hover { transform: translateY(-1px); }
.id-pal.on, .id-font.on { border-color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.id-pal .sw { display: grid; grid-template-columns: 2fr 1.4fr 1fr 1fr 1fr; height: 74px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.id-pal b { font-size: 13px; }
.id-edit { display: flex; flex-wrap: wrap; gap: 14px; }
.id-col { display: grid; justify-items: center; gap: 2px; font-size: 12px; cursor: pointer; }
.id-col input[type=color] { width: 54px; height: 54px; border: 1px solid var(--line); border-radius: 12px; padding: 0; background: none; cursor: pointer; }
.id-col small { color: var(--muted); font-family: ui-monospace, monospace; font-size: 11px; }
.id-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.id-font { padding: 16px; background: #FFFFFF; color: #12162A; }
.id-mocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.id-mock { margin: 0; display: grid; gap: 8px; }
.id-mock canvas, .id-sheet canvas { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); display: block; }
.id-mock figcaption { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.id-sheet { max-width: 760px; }
.id-pal .sw span { display: block; height: 100%; }
@media (max-width: 1100px) { .id-brief { grid-template-columns: 1fr 1fr 1fr; } }
.id-pal .sw, .id-pal b { width: 100%; }
.id-pal { justify-items: stretch; text-align: left; }

/* ---------- IA liga/desliga + edições silenciosas ---------- */
.ai-toggle { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--muted); padding: 3px 9px 3px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); }
.ai-toggle i { width: 26px; height: 15px; border-radius: 99px; background: var(--line); position: relative; transition: .15s; }
.ai-toggle i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.ai-toggle.on { color: #8B5CF6; border-color: color-mix(in srgb, #8B5CF6 45%, var(--line)); }
.ai-toggle.on i { background: #8B5CF6; }
.ai-toggle.on i::after { left: 13px; }
.composer.ai { border-color: color-mix(in srgb, #8B5CF6 55%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, #8B5CF6 12%, transparent); }
.msg-done { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ok); padding: 2px 4px; cursor: default; }
.msg-done span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ok) 14%, transparent); font-size: 11px; font-weight: 800; }
.msg-done small { color: #8B5CF6; font-weight: 700; }
.msg { position: relative; }
.msg .tick { font-style: normal; font-size: 11px; font-weight: 800; color: var(--ok); margin-left: 6px; cursor: default; opacity: .85; }
.msg .tick.ai { color: #8B5CF6; }
.msg.bot .tick.ai { margin-left: 4px; }

/* ---------- variações sob a prévia ---------- */
.editor-v2 .stage-col { grid-template-rows: auto minmax(0, 1fr) auto; }
.editor-v2 .stage { min-height: 360px; }
.var-strip { display: grid; gap: 6px; }
.var-strip[hidden] { display: none; }
.var-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.var-head b { font-weight: 600; }
.var-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; }
.var-card { all: unset; cursor: pointer; display: grid; gap: 4px; justify-items: center; flex: none; }
.var-card canvas { width: 76px; height: 76px; border-radius: 10px; border: 2px solid transparent; outline: 1px solid var(--line); display: block; transition: .12s; }
.var-card:hover canvas { transform: translateY(-1px); }
.var-card.on canvas { border-color: var(--ok); outline-color: transparent; }
.var-card span { font-size: 11px; color: var(--muted); }
.var-card.on span { color: var(--text); font-weight: 600; }

/* ---------- fotos sob a prévia ---------- */
.var-head span { font-size: 12px; color: var(--muted); }
.ph-card { all: unset; cursor: pointer; position: relative; flex: none; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; outline: 1px solid var(--line); background: var(--panel2); box-sizing: border-box; border: 2px solid transparent; }
.ph-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-card:hover { transform: translateY(-1px); }
.ph-card.on { border-color: var(--ok); outline-color: transparent; }
.ph-card.busy { opacity: .5; }
.ph-card.sk { cursor: default; display: grid; place-items: center; font-size: 11px; color: var(--muted); animation: sk 1.2s ease-in-out infinite; }
@keyframes sk { 50% { opacity: .55; } }
.ph-ai { position: absolute; top: 4px; right: 4px; font-style: normal; font-size: 11px; color: #fff; background: #8B5CF6; border-radius: 99px; padding: 1px 5px; }
.ph-msg { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.btn.gen { border-color: color-mix(in srgb, #8B5CF6 55%, var(--line)); color: #8B5CF6; }
.btn.gen.pulse { box-shadow: 0 0 0 3px color-mix(in srgb, #8B5CF6 25%, transparent); }
.img-key { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.img-key .hint a { color: var(--focus); }
.img-more { border: 1px dashed var(--line); border-radius: 12px; padding: 8px 12px; display: grid; gap: 10px; }
.img-more summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.img-key input { width: 100%; box-sizing: border-box; }

/* ---------- Configurações (estilo Claude) ---------- */
.set-page { padding: 0; }
.set-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.set-side { padding: 28px 14px; border-right: 1px solid var(--line); }
.set-title { font-size: 20px; font-weight: 700; padding: 0 10px 18px; letter-spacing: -.01em; }
.set-nav { display: grid; gap: 2px; }
.set-nav button { all: unset; cursor: pointer; padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--muted); }
.set-nav button:hover { background: var(--panel2); color: var(--text); }
.set-nav button.on { background: var(--panel2); color: var(--text); font-weight: 600; }
.set-content { padding: 28px 40px 60px; max-width: 760px; display: grid; gap: 26px; align-content: start; }
.set-content > h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
.set-group { display: grid; gap: 10px; }
.set-group h2 { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0; text-transform: none; }
.set-box { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.set-row { display: flex; align-items: center; gap: 16px; padding: 14px 18px; flex-wrap: wrap; }
.set-box > * + * { border-top: 1px solid var(--line); }
.set-row.stack { display: grid; gap: 10px; align-items: stretch; }
.set-l { flex: 1 1 260px; min-width: 0; }
.set-l b { font-size: 14px; font-weight: 600; }
.set-l p { margin: 3px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.set-r { flex: 0 1 auto; display: flex; align-items: center; gap: 8px; }
.set-r select, .set-r input:not([type=checkbox]) { min-width: 220px; }
.set-num { width: 110px !important; min-width: 0 !important; }
.set-hint { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.5; }
.set-link { font-size: 12.5px; color: var(--focus); }
.set-row textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 13.5px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); color: var(--text); resize: vertical; }
.set-row input:not([type=checkbox]):not([type=color]), .set-row select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel2); color: var(--text); font: inherit; font-size: 13px; }
.switch { all: unset; cursor: pointer; width: 38px; height: 22px; border-radius: 99px; background: var(--line); position: relative; transition: .15s; flex: none; }
.switch i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch.on { background: var(--ok); }
.switch.on i { left: 19px; }
.switch[disabled] { opacity: .45; cursor: default; }
.dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dot.ok::before { background: var(--ok); }
.conn-ctl { display: flex; align-items: center; gap: 8px; }
.conn-edit { flex-basis: 100%; display: flex; gap: 8px; align-items: center; }
.conn-edit[hidden] { display: none; }
.conn-edit input { flex: 1; }
.ag-row { all: unset; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 14px 18px; box-sizing: border-box; width: 100%; }
.ag-row:hover { background: var(--panel2); }
.ag-n { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-n em { font-style: normal; font-weight: 400; color: var(--muted); }
.ag-m { font-size: 12.5px; color: var(--muted); text-align: right; }
.chev { color: var(--muted); font-size: 11px; }
.ag-row .dot::before { margin: 0; }
.ag-edit { background: var(--panel2); border-top: 1px solid var(--line); }
.ag-edit > * + * { border-top: 1px solid var(--line); }
.ag-edit .set-row { padding: 12px 18px; }
.mem-add { display: flex; gap: 8px; }
.mem-add input { flex: 1; }
.mem-list { display: grid; }
.mem-item { display: flex; gap: 10px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--line); }
.mem-item:first-child { border-top: 0; }
.mem-t { flex: 1; font-size: 13.5px; outline: none; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; }
.mem-t:focus { background: var(--panel2); }
.mem-item small { font-size: 11px; color: var(--muted); }
.danger-t { color: #D92D20; }
.set-content .emp-read { margin-top: 4px; }
@media (max-width: 760px) { .set-shell { grid-template-columns: 1fr; } .set-side { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px; } .set-nav { display: flex; flex-wrap: wrap; } .set-content { padding: 18px 16px 40px; } }

/* ---------- aparência das camadas ---------- */
.fx-block { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.fx-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.fx-rot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 6px; }
.fx-lock { gap: 8px; align-items: center; color: var(--muted); }
.layer .l-op { font-size: 10.5px; color: var(--muted); padding: 0 4px; }
.layer .mini.on { opacity: 1; }
.layer .mini.lk { opacity: .3; filter: grayscale(1); } .layer .mini.lk.on { opacity: 1; filter: none; } .layer:hover .mini.lk { opacity: .7; }

/* ---------- carrossel: barra de slides ---------- */
.pages { display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); flex-wrap: wrap; }
.pages .pg, .pages .pg-nav { all: unset; cursor: pointer; min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pages .pg:hover, .pages .pg-nav:hover { background: var(--panel2); color: var(--text); }
.pages .pg.on { background: var(--text); color: var(--panel); }
.pages .pg-nav[disabled], .pages .mini[disabled] { opacity: .3; cursor: default; }
.pages .pg-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.img-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.img-it { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.img-it img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.img-it figcaption { display: flex; gap: 6px; align-items: center; padding: 6px 8px; font-size: 11.5px; color: var(--muted); }
.img-it figcaption span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.img-q { padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel2); color: var(--text); font: inherit; font-size: 13px; width: 200px; }
.btn.saved { color: var(--ok); border-color: transparent; background: none; opacity: 1; }
.set-taxa { width: 160px !important; min-width: 0 !important; }

/* ---------- conversa na tela inicial: caixa de mensagem fixa embaixo (estilo Claude) */
.page.home:has(.home-chat.conv) { height: 100%; padding: 0; display: block; }
.home-chat.conv { width: 100%; height: 100%; gap: 0; min-height: 0; }
.home-chat.conv .home-msgs { flex: 1; min-height: 0; max-height: none; gap: 14px; padding: 28px max(20px, calc((100% - 780px) / 2)) 16px; }
.home-chat.conv .composer-wrap { width: min(780px, calc(100% - 40px)); margin: 0 auto; padding: 4px 0 12px; background: var(--bg); }
.home-chat.conv .under { padding: 0 6px; }
.home-chat.conv .under .grow { text-align: center; }
.disclaimer { font-size: 12px; color: var(--muted); }
@container (max-width: 640px) { .disclaimer { display: none; } }
.ai-status { display: inline-flex; align-items: baseline; gap: 10px; font-size: 13px; color: var(--muted); white-space: nowrap; cursor: default; }
.ai-status b { font-weight: 500; color: var(--text); }
.ai-status .auto { color: var(--text); margin-left: 8px; }
.dock .ai-status { font-size: 12px; gap: 8px; }

/* ---------- barra lateral expansível com conversas recentes (estilo Claude) */
.app { --side: 76px; }
.app.side-wide { --side: 256px; }
.side-top { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.side-toggle { all: unset; cursor: pointer; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); }
.side-toggle:hover { background: var(--panel2); color: var(--text); }
.recent { display: none; }
.side-wide .side { align-items: stretch; padding: 14px 10px 12px; gap: 14px; }
.side-wide .side-top { flex-direction: row; justify-content: space-between; padding: 0 4px; }
.side-wide .brand { grid-auto-flow: column; align-items: center; gap: 9px; }
.side-wide .brand:hover { transform: none; opacity: .85; }
.side-wide .brand b { display: inline; font-family: Archivo, Inter, sans-serif; font-size: 16px; font-weight: 700; color: var(--text); }
.side-wide nav { gap: 2px; }
.side-wide nav button { grid-auto-flow: column; justify-content: start; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 500; text-align: left; }
.side-wide .nav-assist { margin-top: 6px; padding-top: 8px !important; border-radius: 9px !important; }
.side-wide .recent { display: flex; flex-direction: column; gap: 1px; flex: 1; min-height: 0; overflow: auto; margin: 0 -4px; padding: 0 4px; }
.rc-new { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--text); }
.rc-new:hover { background: var(--panel2); }
.rc-new span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--panel2); }
.rc-title { font-size: 11.5px; color: var(--muted); padding: 14px 10px 6px; font-weight: 500; }
.rc-item { display: flex; align-items: center; border-radius: 9px; }
.rc-item:hover, .rc-item.on { background: var(--panel2); }
.rc-open { all: unset; cursor: pointer; flex: 1; min-width: 0; padding: 7px 10px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: color-mix(in srgb, var(--text) 85%, transparent); }
.rc-item.on .rc-open { color: var(--text); font-weight: 500; }
.rc-del { all: unset; cursor: pointer; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; font-size: 11px; color: var(--muted); opacity: 0; }
.rc-item:hover .rc-del { opacity: 1; }
.rc-del:hover { color: #E5484D; }
.side-wide .side-foot { margin-top: 0; grid-auto-flow: column; justify-content: space-between; align-items: center; padding: 8px 4px 0; border-top: 1px solid var(--line); }
.side-wide .theme-btn { grid-auto-flow: column; gap: 6px; margin: 0; font-size: 12px; align-items: center; }
.side-wide .kit-mini { grid-auto-flow: column; gap: 8px; align-items: center; font-size: 12px; }
.side-wide .kit-mini img { width: 44px; height: 26px; }
@media (max-width: 640px) { .side-toggle, .side-wide .recent { display: none; } .side-wide .side { flex-direction: row; } .side-top { display: none; } }
/* edição de texto direto na prévia */
.inline-edit { position: absolute; z-index: 5; box-sizing: border-box; margin: 0; padding: 0 2px; border: 0; outline: 2px solid #4C8DFF; outline-offset: 2px; border-radius: 2px; resize: none; overflow: hidden; background: rgba(255,255,255,.96); color: #12162A; box-shadow: 0 6px 24px rgba(0,0,0,.25); }

/* ---- Gastos do mês */
.spend-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 22px; }
.spend-hero > div { background: var(--panel, rgba(127,127,127,.06)); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.spend-hero small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.spend-hero b { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.spend-hero b.ok { color: #2E9E5B; }
.spend-bar { grid-column: 1 / -1; position: relative; padding-top: 22px !important; }
.spend-bar::before { content: ''; position: absolute; left: 16px; right: 16px; top: 14px; height: 6px; border-radius: 3px; background: var(--line); }
.spend-bar i { position: absolute; left: 16px; top: 14px; height: 6px; border-radius: 3px; background: #2E9E5B; max-width: calc(100% - 32px); }
.spend-bar.warn i { background: #E0A100; } .spend-bar.over i { background: #D64545; }
.spend-bar small { margin: 8px 0 0 !important; }

/* ---- Legenda pronta */
.caption-card { margin-top: 14px; }
.caption-card .exp-head { gap: 8px; margin-bottom: 10px; }
.caption-ta { width: 100%; resize: vertical; min-height: 160px; font: inherit; font-size: 14px; line-height: 1.55; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); }

/* ---- Controles das mensagens (copiar / tentar de novo / editar), aparecem ao passar o mouse */
.msg { position: relative; }
.msg-tools { display: flex; gap: 2px; margin-top: 4px; opacity: 0; transition: opacity .15s; }
.msg.me .msg-tools { justify-content: flex-end; }
.msg:hover .msg-tools, .msg:focus-within .msg-tools { opacity: 1; }
@media (hover: none) { .msg-tools { opacity: .7; } }
.msg-tools .mt { border: 0; background: transparent; color: var(--muted); font-size: 14px; line-height: 1; padding: 5px 7px; border-radius: 7px; cursor: pointer; }
.msg-tools .mt:hover { background: var(--panel2); color: var(--text); }
.send-btn.stop { color: var(--text); }

/* ---- Biblioteca: busca e filtros */
.lib-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; }
.lib-q { flex: 1 1 220px; min-width: 0; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
.lib-sel { width: auto !important; flex: 0 0 auto; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 13px; }

/* ---- Atalhos de teclado */
.kb-modal { position: fixed; inset: 0; z-index: 200; background: rgba(8,10,18,.45); display: grid; place-items: center; padding: 16px; }
.kb-box { width: min(460px, 100%); background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.kb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kb-list { display: grid; gap: 2px; margin-bottom: 10px; }
.kb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kb-row:last-child { border-bottom: 0; }
kbd { font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 5px 7px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); white-space: nowrap; }

/* ---- Carregamento */
.sk-card .art.sk { aspect-ratio: 1; border-radius: 10px; background: var(--panel2); animation: sk 1.2s ease-in-out infinite; }
.sk-line { display: block; height: 10px; border-radius: 5px; background: var(--panel2); margin-top: 10px; animation: sk 1.2s ease-in-out infinite; }
.sk-line.short { width: 55%; }
.ai-working .stage { position: relative; }
.ai-working .stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.07) 50%, transparent 70%); background-size: 250% 100%; animation: ai-shine 1.4s linear infinite; }
@keyframes ai-shine { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .ai-working .stage::after, .sk-card .art.sk, .sk-line { animation: none; } }
.msg > span { white-space: pre-wrap; }

/* ---- Chat integrado em todas as telas (sem aba "Assistente") */
.dock-head b { font-family: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.dock-ctx { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dock-min { display: none; }
@media (max-width: 900px) {
  /* no celular/tela estreita: a conversa fica embaixo, fixa, e pode ser recolhida */
  .app.dock-open { grid-template-columns: var(--side) minmax(0, 1fr) !important; }
  .app.dock-open .dock { position: fixed; left: var(--side); right: 0; bottom: 0; top: auto; width: auto; height: min(50vh, 440px); z-index: 40;
    border-right: 0; border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(0,0,0,.22); border-radius: 16px 16px 0 0; }
  .app.dock-open #view { padding-bottom: min(50vh, 440px); }
  .dock-min { display: inline-flex; }
  .app.chat-min .dock { height: auto; }
  .app.chat-min .chat-msgs, .app.chat-min .dock-foot .chips { display: none; }
  .app.chat-min #view { padding-bottom: 120px; }
  .app.chat-min .dock-min { transform: rotate(180deg); }
}
@media (max-width: 640px) {
  /* celular: barra de navegação no topo (1 coluna) e conversa ocupando a largura toda embaixo */
  .app.dock-open { grid-template-columns: 1fr !important; }
  .app.dock-open .dock { left: 0; height: min(46vh, 400px); }
  .app.dock-open #view { padding-bottom: min(46vh, 400px); }
}
@media (max-width: 900px) {
  .app.dock-open.chat-min .dock { height: auto; }
  .app.dock-open.chat-min #view { padding-bottom: 120px; }
}

/* ---- Publicar (Instagram + Facebook) */
.pub-card { margin-top: 14px; display: grid; gap: 10px; }
.pub-card .exp-head { gap: 8px; }
.pub-dests { flex-wrap: wrap; gap: 8px 16px; }
.pub-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.pub-chk.off { opacity: .5; }
.pub-ag { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.pub-ag-row { display: flex; align-items: center; gap: 10px; }
.pub-ag-row img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.pub-box { width: min(560px, 100%); display: grid; gap: 10px; max-height: calc(100vh - 32px); overflow: auto; }
.pub-top { display: flex; gap: 14px; align-items: center; }
.pub-thumb { width: 96px; height: 96px; object-fit: contain; border-radius: 10px; background: var(--panel2); }
.pub-dest { font-weight: 600; font-size: 14px; margin-top: 4px; }
.pub-dt { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font: inherit; }
.pub-status { min-height: 18px; }
.pub-res { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--panel2); }
.pub-res.ok b { color: #2E9E5B; } .pub-res.err b { color: #D64545; }
.meta-steps { margin: 4px 0 8px; padding-left: 20px; display: grid; gap: 8px; font-size: 13.5px; line-height: 1.5; }
.perm-list { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--panel2); font-size: 12px; user-select: all; word-break: break-word; }

/* ---- Publicações: agenda, fila e automação, histórico */
.pubs .head { flex-wrap: wrap; gap: 10px; }
.pubs-body { display: grid; gap: 14px; }
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.cal-head b { font-size: 16px; }
.cal-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.cal-leg i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { font-size: 11.5px; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-cell { min-height: 84px; border: 1px solid var(--line); border-radius: 10px; padding: 5px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell.off { border-color: transparent; }
.cal-cell.today { border-color: #3B5BDB; }
.cal-n { font-size: 12px; font-weight: 600; }
.cal-chip { display: flex; align-items: center; gap: 4px; border: 0; border-radius: 6px; padding: 2px 4px; font: inherit; font-size: 11px; cursor: pointer; color: #fff; min-width: 0; }
.cal-chip img { width: 16px; height: 16px; object-fit: cover; border-radius: 3px; }
.cal-chip.agendado, .cal-leg .agendado { background: #3B5BDB; }
.cal-chip.publicando { background: #7950F2; }
.cal-chip.publicado, .cal-leg .publicado { background: #2E9E5B; }
.cal-chip.erro, .cal-leg .erro { background: #D64545; }
.cal-free { font-size: 11px; color: var(--muted); }
.pub-list { display: grid; gap: 6px; margin-top: 8px; }
.pub-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; width: 100%; }
.pub-row:hover { background: var(--panel2); }
.pub-row img, .pub-ph { width: 44px; height: 55px; object-fit: cover; border-radius: 7px; background: var(--panel2); flex: none; }
.pub-tag { font-size: 11.5px; padding: 3px 8px; border-radius: 999px; background: var(--panel2); color: var(--muted); white-space: nowrap; text-decoration: none; }
.pub-tag.agendado { background: rgba(59,91,219,.15); color: #5C7CFA; }
.pub-tag.publicado { background: rgba(46,158,91,.15); color: #2E9E5B; }
.pub-tag.erro { background: rgba(214,69,69,.15); color: #D64545; }
.pub-tag.rascunho, .pub-tag.fila { background: rgba(224,161,0,.15); color: #C98F00; }
.pub-sec { display: grid; gap: 8px; }
.pub-dias, .pub-horas { flex-wrap: wrap; gap: 6px; }
.chip.on { background: #3B5BDB; color: #fff; border-color: #3B5BDB; }
.chip-x { border: 0; background: transparent; color: inherit; margin-left: 4px; cursor: pointer; font-size: 11px; }
.rasc-grid { display: grid; gap: 12px; }
.rasc { display: flex; gap: 12px; align-items: flex-start; }
.rasc img { width: 120px; border-radius: 10px; flex: none; }
.gen-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.pub-leg { white-space: pre-wrap; font: inherit; font-size: 13px; background: var(--panel2); border-radius: 10px; padding: 10px 12px; max-height: 220px; overflow: auto; margin: 0; }
.pub-acts { flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 640px) { .cal-cell { min-height: 56px; } .cal-chip span { display: none; } .rasc { flex-direction: column; } .rasc img { width: 100%; max-width: 260px; } }

/* ---- Estratégia (Agenda) */
.est { display: grid; gap: 12px; }
.est .exp-head { gap: 10px; flex-wrap: wrap; }
.est-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.est-sug { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 4px; align-content: start; }
.est-horas { display: grid; gap: 4px; margin: 4px 0; }
.est-h { position: relative; font-size: 12.5px; padding: 3px 8px; border-radius: 6px; background: var(--panel2); overflow: hidden; }
.est-h i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(46,158,91,.22); z-index: 0; }
.est-bloco ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 5px; font-size: 13px; line-height: 1.45; }
.est-bloco summary { cursor: pointer; }
.est-acts { flex-wrap: wrap; gap: 8px; align-items: center; }
.man-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.man-dia { width: 70px; font-size: 13px; }
.cal-tema { display: block; font-size: 10px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-hint { border: 1px solid rgba(224,161,0,.5); background: rgba(224,161,0,.1); border-radius: 10px; padding: 10px 12px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---- Agenda limpa: linha de sugestão, calendário e gavetas laterais */
.sug-bar { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; cursor: pointer; }
.sug-bar:hover { border-color: #3B5BDB; }
.sug-ic { color: #7950F2; }
.sug-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.sug-cta { font-size: 13px; color: #5C7CFA; white-space: nowrap; }
.card.cal { padding: 14px; }
.cal-head { gap: 8px; }
.cal-mes { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.cal-nav { display: flex; align-items: center; gap: 2px; }
.cal-grid { gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cal-dow { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel2); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 6px 0; }
.cal-cell { border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; min-height: 92px; padding: 6px; cursor: pointer; transition: background .12s; }
.cal-cell:hover { background: var(--panel2); }
.cal-cell:focus-visible { outline: 2px solid #3B5BDB; outline-offset: -2px; }
.cal-cell.off { background: transparent; cursor: default; }
.cal-cell.past .cal-n { color: var(--muted); }
.cal-cell.today { border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-cell.today .cal-n { background: #3B5BDB; color: #fff; border-radius: 999px; padding: 1px 7px; }
.cal-top { display: flex; align-items: center; justify-content: space-between; }
.cal-add { opacity: 0; color: var(--muted); font-size: 15px; line-height: 1; transition: opacity .12s; }
.cal-cell:hover .cal-add { opacity: 1; }
.cal-chip { cursor: pointer; }
.cal-more { font-size: 11px; color: var(--muted); }
.prox .pub-list { margin-top: 6px; }
.drawer-wrap { position: fixed; inset: 0; z-index: 180; background: rgba(8,10,18,.35); display: flex; justify-content: flex-end; animation: dw-in .15s ease-out; }
.drawer { width: min(440px, 100%); height: 100%; background: var(--panel); color: var(--text); border-left: 1px solid var(--line); box-shadow: -18px 0 50px rgba(0,0,0,.25); display: flex; flex-direction: column; animation: dw-slide .2s ease-out; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-head b { font-size: 16px; }
.drawer-body { overflow: auto; padding: 14px 18px 24px; display: grid; gap: 16px; align-content: start; }
.drawer .est-grid { grid-template-columns: 1fr; }
@keyframes dw-in { from { opacity: 0; } }
@keyframes dw-slide { from { transform: translateX(24px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .drawer-wrap, .drawer { animation: none; } }
.dia-sec { display: grid; gap: 6px; }
.dia-tit { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.dia-sug { background: var(--panel2); border-radius: 12px; padding: 12px; }
.dia-horas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dia-opts { display: grid; gap: 8px; }
.dia-opt { display: grid; gap: 2px; text-align: left; font: inherit; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; cursor: pointer; }
.dia-opt:hover { border-color: #3B5BDB; background: var(--panel2); }
.dia-opt.pri { border-color: #3B5BDB; }
.dia-opt span { font-size: 12.5px; color: var(--muted); }
.pub-row.static { cursor: default; }
@media (max-width: 640px) { .cal-cell { min-height: 58px; padding: 4px; } .cal-chip span { display: none; } .sug-cta { display: none; } }
/* a linha de sugestão (texto que não quebra) não pode alargar a página */
.pubs-body { grid-template-columns: minmax(0, 1fr); }
.pubs-body > * { min-width: 0; }
.pubs .head > .seg, .pubs .head .seg { max-width: 100%; overflow-x: auto; }

/* ---- "ler mais" e sugestão do dia que abre ao clicar */
.lm { display: grid; gap: 2px; justify-items: start; }
.lm-txt { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.lm-txt.open { display: block; -webkit-line-clamp: unset !important; }
.lm-btn { border: 0; background: transparent; color: #5C7CFA; font: inherit; font-size: 12.5px; padding: 0; cursor: pointer; }
.lm-btn:hover { text-decoration: underline; }
.dia-sug { padding: 0; }
.dia-sug > summary { list-style: none; cursor: pointer; display: grid; gap: 4px; padding: 12px; border-radius: 12px; }
.dia-sug > summary::-webkit-details-marker { display: none; }
.dia-sug > summary:hover { background: rgba(127,127,127,.06); }
.sug-abrir { font-size: 12.5px; color: #5C7CFA; }
.sug-abrir::after { content: ' ▾'; }
.dia-sug[open] .sug-abrir::after { content: ' ▴'; }
.dia-sug[open] .sug-abrir { color: var(--muted); }
.sug-star { text-transform: none; letter-spacing: 0; color: #5C7CFA; font-weight: 500; }
.sug-full { display: grid; gap: 10px; padding: 0 12px 12px; font-size: 13.5px; line-height: 1.5; }
.sug-full .dia-tit { display: block; margin-bottom: 2px; }

/* ---- Roteiro de Reels / Stories */
.rot-modal { z-index: 210; }
.rot-box { width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: grid; gap: 12px; }
.rot-body { display: grid; gap: 14px; }
.rot-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rot-gancho { background: var(--panel2); border-radius: 12px; padding: 12px; display: grid; gap: 4px; }
.rot-cenas { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rot-cenas li { display: grid; grid-template-columns: 74px 1fr; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.rot-tempo { font-weight: 700; font-size: 12.5px; color: #5C7CFA; }
.rot-cena { display: grid; gap: 8px; font-size: 13.5px; line-height: 1.45; }
.rot-tela { font-weight: 600; }
.rot-extra { display: grid; gap: 10px; font-size: 13.5px; line-height: 1.45; }
.rot-extra ul { margin: 4px 0 0; padding-left: 18px; }
.rot-acts { gap: 8px; flex-wrap: wrap; position: sticky; bottom: -18px; background: var(--panel); padding: 10px 0 2px; }
@media (max-width: 640px) { .rot-cenas li { grid-template-columns: 1fr; } }

/* ---- Seletor "Adicionar imagem" */
.img-pick { z-index: 220; }
.ip-box { width: min(720px, 100%); max-height: calc(100vh - 32px); display: grid; grid-template-rows: auto auto 1fr; gap: 10px; overflow: hidden; }
.ip-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.ip-tabs button { border: 0; background: transparent; color: var(--muted); font: inherit; padding: 8px 12px; cursor: pointer; border-bottom: 2px solid transparent; }
.ip-tabs button.on { color: var(--text); border-bottom-color: #3B5BDB; font-weight: 600; }
.ip-body { display: grid; gap: 10px; overflow: auto; align-content: start; }
.ip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ip-it { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 0; overflow: hidden; background: var(--panel2); cursor: pointer; aspect-ratio: 1; }
.ip-it img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ip-it:hover { outline: 2px solid #3B5BDB; }
.ip-tag { position: absolute; left: 6px; bottom: 6px; font-size: 10.5px; background: rgba(0,0,0,.6); color: #fff; padding: 2px 6px; border-radius: 6px; }
.ip-vazio { grid-column: 1 / -1; display: grid; gap: 8px; justify-items: start; font-size: 13px; color: var(--muted); }
.ip-drop { display: grid; gap: 6px; place-items: center; text-align: center; border: 2px dashed var(--line); border-radius: 14px; padding: 36px 16px; cursor: pointer; }
.ip-drop:hover, .ip-drop.over { border-color: #3B5BDB; background: var(--panel2); }

/* ---- Revisão da marca (antes de publicar) e opções da IA */
.rev { border-radius: 10px; padding: 10px 12px; font-size: 13px; background: rgba(224,161,0,.1); border: 1px solid rgba(224,161,0,.45); display: grid; gap: 6px; }
.rev.err { background: rgba(214,69,69,.08); border-color: rgba(214,69,69,.5); }
.rev.ok { background: rgba(46,158,91,.08); border-color: rgba(46,158,91,.4); color: #2E9E5B; }
.rev ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.rev li.erro { color: #D64545; }
.op-card span::first-letter { text-transform: uppercase; }
.cmp { border-collapse: collapse; font-size: 13px; width: 100%; }
.cmp th, .cmp td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.cmp th { color: var(--muted); font-weight: 600; font-size: 12px; }
.seg-mini { display: inline-flex; gap: 2px; background: var(--panel2); border-radius: 8px; padding: 2px; }
.seg-mini button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.seg-mini button.on { background: var(--panel); color: var(--text); }

/* elementos salvos (ícones, botões, formas) */
.els-salvos{padding:6px 10px 2px}
.els-salvos h4{margin:4px 0 6px;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.els-row{display:flex;flex-wrap:wrap;gap:6px}
.el-it{display:grid;place-items:center;min-width:38px;height:34px;padding:0 6px;border:1px solid var(--line);border-radius:8px;background:var(--panel);cursor:pointer}
.el-it:hover{border-color:var(--brand)}
.el-btn{font-size:10px;font-weight:700;padding:3px 8px;white-space:nowrap}
.el-forma{display:block;width:22px;height:16px}

/* ---- Chat discreto: barra flutuante (abre ao enviar ou no ⌃; recolhe no ⌄) */
.app.dock-open { grid-template-columns: var(--side) minmax(0, 1fr) !important; }
.app.dock-open #view { padding-bottom: 92px !important; }
.app.dock-open .dock { position: fixed; top: auto; left: auto; right: 18px; bottom: 18px; width: min(400px, calc(100vw - 36px)); height: auto; max-height: min(64vh, 600px);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.35); z-index: 45; grid-template-rows: auto minmax(0, 1fr) auto; overflow: visible; }
.app.dock-open .dock .chat-msgs { min-height: 120px; }
.dock-min { display: inline-flex !important; }
.dock-expand { display: none; }
.app.dock-open.chat-min .dock { width: min(340px, calc(100vw - 36px)); max-height: none; background: color-mix(in srgb, var(--panel) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: .9; transition: opacity .15s; }
.app.dock-open.chat-min .dock:hover, .app.dock-open.chat-min .dock:focus-within { opacity: 1; }
.app.dock-open.chat-min .dock-head, .app.dock-open.chat-min .chat-msgs, .app.dock-open.chat-min .dock-foot .chips, .app.dock-open.chat-min .dock .under { display: none !important; }
.app.dock-open.chat-min .dock-foot { border-top: 0; padding: 8px; }
.app.dock-open.chat-min .dock-expand { display: grid; place-items: center; position: absolute; top: -13px; right: 16px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; font-size: 13px; line-height: 1; }
.dock-expand i { position: absolute; top: -6px; right: -6px; min-width: 15px; height: 15px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 9px; font-style: normal; display: grid; place-items: center; padding: 0 3px; }
@media (max-width: 640px) {
  .app.dock-open { grid-template-columns: 1fr !important; }
  .app.dock-open .dock, .app.dock-open.chat-min .dock { left: 10px; right: 10px; bottom: 10px; width: auto; }
}

/* ---- Olho (ver) e lápis (editar) nas miniaturas de Formatos/Exportar */
.thumb, .exp-row .tw { position: relative; }
.prev-acoes { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.thumb:hover .prev-acoes, .exp-row:hover .prev-acoes, .prev-acoes:focus-within { opacity: 1; }
@media (hover: none) { .prev-acoes { opacity: 1; } }
.exp-row .tw .prev-acoes { right: -4px; bottom: -4px; }
.icon-btn { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 88%, transparent); color: var(--text); cursor: pointer; backdrop-filter: blur(6px); }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.exp-row .tw .icon-btn { width: 24px; height: 24px; }
.kb-modal.ver-modal { display: grid; grid-template-rows: auto minmax(0, 1fr); place-items: stretch; padding: 16px; background: rgba(5,7,12,.95); }
.ver-top { display: flex; align-items: center; gap: 10px; color: #fff; padding: 0 4px 12px; max-width: 1100px; width: 100%; margin: 0 auto; }
.ver-top .icon-btn { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.ver-body { overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 18px; padding-bottom: 12px; }
.ver-cv { max-width: min(100%, 1000px); max-height: 82vh; width: auto; height: auto; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }

/* ---- Biblioteca: baixar com formatos sugeridos */
.dl-box { width: min(620px, calc(100vw - 32px)); max-height: 88vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.dl-body { overflow: auto; display: grid; gap: 14px; padding: 4px 2px; }
.dl-sec.row { flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.dl-fmts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; margin-top: 8px; }
.dl-fmt { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 13px; }
.dl-fmt.on { border-color: var(--brand); }
.dl-fmt i { margin-left: auto; font-style: normal; font-size: 11px; color: var(--muted); }
.dl-foot { padding-top: 12px; gap: 8px; }
.lcard .row { flex-wrap: wrap; }
/* narração do vídeo */
.narr-texto { width: 100%; margin-top: 6px; resize: vertical; font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg, transparent); color: inherit; }
.narr-vozes { flex-wrap: wrap; gap: 6px; margin-top: 6px; }
/* biblioteca: símbolo de mídia (imagem / vídeo / narração) */
.badge-midia { position: absolute; bottom: 8px; left: 8px; display: inline-flex; gap: 5px; align-items: center; padding: 3px 7px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; opacity: .85; backdrop-filter: blur(4px); line-height: 0; pointer-events: auto; }
.badge-midia span { display: inline-flex; }
.badge-midia .voz { color: #7CF2C8; } /* narração: destaque discreto em verde-água */
/* biblioteca: visualizar (olhinho) */
.lib-ver { cursor: zoom-in; }
.lib-olho { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; opacity: .8; }
.lib-ver:hover .lib-olho { opacity: 1; }
.ver-abas { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 0 4px 12px; max-width: 1100px; margin: 0 auto; }
.ver-abas .btn.on { border-color: var(--brand); color: #fff; }
.kb-modal.ver-modal { grid-template-rows: auto auto minmax(0, 1fr); }

/* ================================================================ SaaS: entrar, créditos, conta e admin (estilo Minuta360IA) */
.acesso { min-height: 100vh; display: grid; place-items: start center; padding: 9vh 16px 40px; background: var(--bg); }
.ac-caixa { width: min(400px, 100%); text-align: center; }
.ac-logo { display: grid; place-items: center; margin-bottom: 14px; color: var(--text); }
.ac-caixa h1 { font-size: 28px; margin: 0; letter-spacing: -.01em; }
.ac-sub { color: var(--muted); margin: 8px auto 24px; font-size: 14px; line-height: 1.5; }
.ac-form { display: grid; gap: 14px; text-align: left; }
.ac-campo { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.ac-campo input, .ac-campo select { font: inherit; font-weight: 400; font-size: 15px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); width: 100%; box-sizing: border-box; }
.ac-campo input:focus, .ac-campo select:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.ac-senha { position: relative; display: block; }
.ac-senha input { padding-right: 42px; }
.ac-olho { all: unset; cursor: pointer; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); padding: 4px; border-radius: 6px; line-height: 0; }
.ac-olho.on, .ac-olho:hover { color: var(--text); }
.ac-lembrar { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.ac-erro { color: #D93D3D; font-size: 13px; min-height: 0; margin: 0; }
.ac-erro:empty { display: none; }
.ac-botao { width: 100%; justify-content: center; margin-top: 4px; }
.ac-link { justify-self: center; }
.ac-ok { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); font-size: 28px; font-weight: 700; }
.ac-rodape { color: var(--muted); font-size: 12px; margin-top: 32px; }

.adm-head h1 { margin: 0; }
.adm-head p { margin: 4px 0 0; font-size: 14px; }
.adm { max-width: 1100px; }
.adm-sec h2 { font-size: 16px; margin: 0 0 10px; }
.adm-sec.alerta { border-color: #E5A13A; }
.card.pad { padding: 18px 20px; }
.adm-vazio { padding: 40px 24px; text-align: center; color: var(--muted); }
.adm-carregando { display: grid; place-items: center; padding: 40px; }
.giro { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--text); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.abas-admin { display: inline-flex; gap: 2px; padding: 3px; background: var(--panel2); border: 1px solid var(--line); border-radius: 11px; max-width: 100%; overflow-x: auto; }
.abas-admin button { all: unset; cursor: pointer; display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.abas-admin button[aria-selected="true"] { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.contador, .nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: #E5484D; color: #fff; font-size: 11px; font-weight: 700; font-style: normal; line-height: 1; }
#nav button { position: relative; }
.nav-badge { position: absolute; top: 2px; right: 4px; margin: 0; }
.side-wide .nav-badge { position: static; margin-left: auto; }
.painel-admin { display: grid; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.kpi { padding: 16px 18px; display: grid; gap: 4px; }
.kpi small { color: var(--muted); font-size: 12px; font-weight: 600; }
.kpi b { font-size: 24px; letter-spacing: -.01em; }
.kpi.destaque { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.pendencias { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lista { padding: 4px 0; }
.lista > .linha, .tabela > .linha { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.lista > .linha:last-child, .tabela > .linha:last-child { border-bottom: 0; }
.tabela > .linha { padding: 9px 2px; }
.linha.col { display: grid; gap: 10px; }
.linha-topo { gap: 12px; cursor: pointer; align-items: center; }
.linha .dir { text-align: right; }
.linha.feito { opacity: .6; }
.linha b.pos { color: var(--ok); }
.col-data { min-width: 112px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: color-mix(in srgb, var(--brand) 18%, var(--panel2)); color: var(--text); font-weight: 700; font-size: 14px; }
.acoes-usuario { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 46px; }
.extrato-usuario { width: 100%; }
.adm .pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--panel2); color: var(--muted); white-space: nowrap; margin-left: 6px; }
.adm .pill.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.adm .pill.warn { background: color-mix(in srgb, #E5A13A 18%, transparent); color: #B5761C; }
.adm .pill.erro { background: color-mix(in srgb, #E5484D 14%, transparent); color: #D93D3D; }
.adm .pill.admin { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); }
.form-linha { flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.form-linha .ac-campo input, .form-linha .ac-campo select { font-size: 13px; padding: 8px 10px; }
.form-col { display: grid; gap: 12px; max-width: 520px; }
.pacotes { flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.pix-box { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.pix-qr { width: 200px; height: 200px; background: #fff; border-radius: 12px; padding: 6px; box-sizing: border-box; }
.pix-qr svg { width: 100%; height: 100%; }
.pix-info { flex: 1; min-width: 240px; display: grid; gap: 10px; align-content: start; }
.pix-info p { margin: 0; }
.pix-cod { width: 100%; box-sizing: border-box; font: 12px ui-monospace, monospace; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); color: var(--text); resize: none; }
.conta-mini { all: unset; cursor: pointer; display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: 10px; margin-top: 4px; }
.conta-mini:hover, .conta-mini.on { background: var(--panel2); }
.conta-mini .avatar { width: 28px; height: 28px; font-size: 12px; }
.conta-txt { display: grid; line-height: 1.2; min-width: 0; }
.conta-txt b { font-size: 13px; }
.conta-txt small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app:not(.side-wide) .conta-txt { display: none; }
@media (max-width: 640px) {
  .acoes-usuario { padding-left: 0; }
  .col-data { min-width: 0; }
  .linha .dir { display: none; }
}
.app[hidden] { display: none !important; }
.adm [hidden] { display: none !important; }
/* ---------- Admin: painel de custos e ganhos */
.adm { --s1: #2a78d6; --s2: #eb6834; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .adm { --s1: #3987e5; --s2: #d95926; } }
:root[data-theme="dark"] .adm { --s1: #3987e5; --s2: #d95926; }
.dash-topo { flex-wrap: wrap; gap: 10px; align-items: center; }
.kpi .var { font-size: 11.5px; font-weight: 700; }
.kpi .var.sobe { color: var(--ok); } .kpi .var.desce { color: #D93D3D; } .kpi .var.nova { color: var(--muted); }
.kpi.negativo { border-color: color-mix(in srgb, #E5484D 45%, var(--line)); }
.meta-card { display: grid; gap: 10px; }
.meta-barra { height: 10px; border-radius: 99px; background: var(--panel2); overflow: hidden; }
.meta-barra i { display: block; height: 100%; border-radius: 99px; background: var(--ok); }
.meta-nums { flex-wrap: wrap; gap: 6px; align-items: baseline; }
.dash-graf-caixa { display: grid; gap: 8px; }
.legenda { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.dash-lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.dash-lg.receita { background: var(--s1); } .dash-lg.custo { background: var(--s2); }
.dash-graf-area { position: relative; }
.dash-graf { width: 100%; height: auto; display: block; }
.dash-graf .grade { stroke: var(--line); stroke-width: 1; }
.dash-graf .base { stroke: var(--muted); stroke-width: 1; }
.dash-graf .eixo { fill: var(--muted); font-size: 11px; }
.dash-graf .b-receita { fill: var(--s1); } .dash-graf .b-custo { fill: var(--s2); }
.dash-graf .alvo { fill: transparent; cursor: crosshair; }
.dash-graf .alvo:hover { fill: color-mix(in srgb, var(--text) 5%, transparent); }
.dash-dica { position: absolute; top: 0; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 10px; padding: 8px 10px; font-size: 12px; display: grid; gap: 3px; pointer-events: none; white-space: nowrap; z-index: 2; }
.tabela-dash { display: grid; margin-bottom: 8px; overflow-x: auto; }
.tabela-dash .tr { display: grid; grid-template-columns: minmax(110px, 2fr) repeat(var(--n, 3), minmax(max-content, 1fr)); min-width: max-content; gap: 14px; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 13px; align-items: center; }
.tabela-dash .tr > span:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.tabela-dash .th { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.dash-duas { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.set-area { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); min-width: 260px; }

.tabela-dash .tr > b.dir, .tabela-dash .tr > span > b.dir { text-align: right; }
.tabela-dash .tr > :not(:first-child) { text-align: right; white-space: nowrap; }
.adm, .adm > *, .painel-admin, .painel-admin > *, .dash-duas > * { min-width: 0; }
/* Config → Empresa → Perfil do negócio */
.pf-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; padding: 12px 16px; }
.pf-grade.um { grid-template-columns: 1fr; }
.pf-grade label { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pf-grade .larga { grid-column: 1 / -1; }
.pf-in, .pf-area { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); }
.pf-area { resize: vertical; line-height: 1.45; }
.set-row.stack .pf-area { margin-top: 8px; }
.pf-acoes { padding: 10px 16px; gap: 8px; align-items: center; }
.pf-avancado[hidden] { display: none !important; }
/* publicar: Feed e Story por rede */
.pub-canais { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 8px 0; }
.pub-canal { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }

/* sugestões da IA: Feed + Stories de cada ideia, com aprovar */
.op3-row { gap: 12px; align-items: flex-start; }
.op3 { display: grid; gap: 6px; flex: none; padding: 8px; border-radius: 12px; border: 2px solid transparent; outline: 1px solid var(--line); }
.op3.on { border-color: var(--ok); outline-color: transparent; }
.op3.ok { background: color-mix(in srgb, var(--ok) 8%, transparent); }
.op3-th { display: flex; gap: 8px; align-items: flex-end; cursor: pointer; }
.op3-th canvas { border-radius: 8px; outline: 1px solid var(--line); display: block; max-height: 190px; width: auto; }
.op3-nome { font-size: 12px; font-weight: 600; } .op3-nome small { font-weight: 400; color: var(--muted); }
.op3 .row { gap: 6px; }
