/* Eventeiro — design system
   Paleta própria do Eventeiro: coral, amarelo-sol, creme e quase-preto. Sem azul. */
:root {
  --coral: #FF5A4E;
  --coral-600: #E9473C;
  --coral-50: #FFF0EE;
  --sun: #FFC531;
  --sun-50: #FFF7DD;
  --ink: #1B1420;
  --ink-2: #4A4150;
  --muted: #7A7180;
  --line: #ECE3D6;
  --line-2: #E0D4C3;
  --cream: #FFF6E8;
  --paper: #FFFCF7;
  --white: #FFFFFF;
  --ok: #2E9E6A;
  --ok-50: #E7F6EE;
  --warn: #C98A00;
  --danger: #D6453B;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(27, 20, 32, .05), 0 8px 24px rgba(27, 20, 32, .06);
  --shadow-lg: 0 12px 48px rgba(27, 20, 32, .16);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --header-h: 60px;
  --sidebar-w: 268px;
  --drawer-w: 380px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 .75em; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img, video { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
[hidden] { display: none !important; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  background: var(--ink); color: var(--white); font-weight: 600; font-size: 15px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease, opacity .15s;
}
.btn:hover { background: #2c2233; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-coral { background: var(--coral); }
.btn-coral:hover { background: var(--coral-600); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--cream); }
.btn-soft { background: var(--cream); color: var(--ink); }
.btn-soft:hover { background: #FBECD4; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; }
.btn-icon { width: 42px; padding: 0; }
.btn-icon.btn-sm { width: 34px; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--coral-600); font-weight: 600; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ---------- topo ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--header-h);
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled, .app .topbar { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--coral); color: #fff; display: grid; place-items: center; font-size: 20px; line-height: 1; padding-bottom: 3px; }
.topbar .spacer { flex: 1; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--sun); color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; overflow: hidden; border: 0; cursor: pointer; padding: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- menus ---------- */
.menu { position: relative; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; max-width: 320px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 50;
}
.menu-panel.left { left: 0; right: auto; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; background: none; text-align: left; text-decoration: none; cursor: pointer; font-size: 15px; }
.menu-item:hover, .menu-item.active { background: var(--cream); }
.menu-item small { color: var(--muted); display: block; font-size: 12px; }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-label { padding: 8px 12px 4px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- landing ---------- */
.landing { min-height: 100dvh; display: flex; flex-direction: column; }
.hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 16px 24px; text-align: center; transition: all .35s ease; }
.capi { width: 168px; height: 168px; margin: 0 auto 4px; position: relative; }
.capi video, .capi img { width: 100%; height: 100%; object-fit: contain; }
.hero h1 { font-size: clamp(30px, 7vw, 46px); font-weight: 800; max-width: 680px; }
.hero h1 em { font-style: normal; color: var(--coral); }
.hero .sub { color: var(--ink-2); font-size: 18px; margin-top: 8px; }
.landing.chatting .hero { display: none; }

.thread { width: 100%; max-width: 760px; margin: 0 auto; padding: 16px 16px 8px; display: none; flex-direction: column; gap: 18px; flex: 1; }
.landing.chatting .thread { display: flex; }
.msg { display: flex; gap: 10px; align-items: flex-start; animation: rise .25s ease both; }
.msg-user { justify-content: flex-end; }
.msg-user .bubble { background: var(--cream); border-radius: 20px 20px 6px 20px; padding: 10px 16px; max-width: 85%; white-space: pre-wrap; word-wrap: break-word; }
.msg-capi .bubble { padding: 4px 0; max-width: 100%; }
.msg-capi .face { width: 36px; height: 36px; border-radius: 50%; background: var(--sun-50); flex: none; overflow: hidden; }
.msg-capi .face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transform: scale(1.6); transform-origin: 50% 15%; }
.bubble p:last-child { margin-bottom: 0; }
.bubble ul, .bubble ol { margin: .25em 0 .75em; padding-left: 1.3em; }
.att-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.typing { display: inline-flex; gap: 4px; padding: 10px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.chip { border: 1px solid var(--line-2); background: var(--white); border-radius: 999px; padding: 8px 14px; font-size: 14px; cursor: pointer; transition: background .15s, border-color .15s; }
.chip:hover { background: var(--cream); border-color: var(--sun); }
.reply-chips { justify-content: flex-start; margin: 4px 0 0 46px; }

.composer-wrap { position: sticky; bottom: 0; width: 100%; padding: 8px 12px calc(12px + var(--safe-b)); background: linear-gradient(to bottom, transparent, var(--paper) 30%); z-index: 10; }
.landing:not(.chatting) .composer-wrap { position: static; background: none; max-width: 760px; margin: 0 auto; padding-top: 0; }
.composer {
  max-width: 760px; margin: 0 auto; background: var(--white); border: 1px solid var(--line-2);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 10px 10px 8px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.composer:focus-within { border-color: var(--sun); box-shadow: 0 0 0 4px rgba(255, 197, 49, .2), var(--shadow); }
.composer textarea {
  width: 100%; border: 0; outline: 0; resize: none; font: inherit; font-size: 17px; line-height: 1.45;
  min-height: 52px; max-height: 220px; background: transparent; color: var(--ink); padding: 4px 2px;
}
.composer textarea::placeholder { color: #A39AA8; }
.composer-bar { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.composer-bar .spacer { flex: 1; }
.tool { width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.tool:hover { background: var(--cream); color: var(--ink); }
.tool.recording { background: var(--coral); color: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 78, .5); } 70% { box-shadow: 0 0 0 12px rgba(255, 90, 78, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 78, 0); } }
.send { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--coral); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .15s, opacity .15s; }
.send:disabled { background: var(--line-2); cursor: not-allowed; }
.rec-timer { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--coral-600); font-weight: 600; }
.files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.file { display: inline-flex; align-items: center; gap: 6px; background: var(--cream); border-radius: 10px; padding: 5px 8px 5px 10px; font-size: 13px; max-width: 240px; }
.file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file button { border: 0; background: none; cursor: pointer; padding: 2px; color: var(--muted); display: grid; }
.file.loading { opacity: .6; }
.footnote { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; }
.footnote a { color: var(--muted); }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(27, 20, 32, .45); z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease; }
@media (min-width: 640px) { .modal-backdrop { align-items: center; } }
.modal { width: 100%; max-width: 440px; background: var(--white); border-radius: 24px 24px 0 0; padding: 26px 22px calc(22px + var(--safe-b)); box-shadow: var(--shadow-lg); animation: slideup .25s ease; position: relative; max-height: 92dvh; overflow: auto; }
@media (min-width: 640px) { .modal { border-radius: 24px; padding: 30px 28px; } }
.modal h2 { font-size: 24px; margin-bottom: 6px; }
.modal .lead { color: var(--ink-2); margin-bottom: 18px; }
.modal-close { position: absolute; top: 12px; right: 12px; }
.modal .capi { width: 96px; height: 96px; margin: -6px auto 6px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideup { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.social { display: grid; gap: 10px; }
.social-btn { display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--white); text-decoration: none; font-weight: 600; font-size: 15px; cursor: pointer; transition: background .15s, border-color .15s; }
.social-btn:hover { background: var(--cream); }
.social-btn svg { width: 22px; height: 22px; flex: none; }
.social-btn .soon { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--cream); padding: 3px 9px; border-radius: 99px; }
.social-btn.disabled { opacity: .55; cursor: default; pointer-events: none; }
.legal-note { font-size: 12px; color: var(--muted); margin-top: 14px; text-align: center; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + var(--safe-b)); z-index: 200; display: grid; gap: 8px; width: min(92vw, 420px); }
@media (min-width: 900px) { .toasts { bottom: 24px; } }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 14px; animation: rise .2s ease; display: flex; gap: 10px; align-items: center; }
.toast.error { background: var(--danger); }

/* ---------- painel ---------- */
.app { min-height: 100dvh; }
.app-body { display: flex; min-height: calc(100dvh - var(--header-h)); }
.sidebar { display: none; width: var(--sidebar-w); flex: none; border-right: 1px solid var(--line); padding: 14px 10px; position: sticky; top: var(--header-h); height: calc(100dvh - var(--header-h)); overflow-y: auto; background: var(--paper); }
@media (min-width: 900px) { .sidebar { display: block; } }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-decoration: none; font-size: 15px; color: var(--ink-2); position: relative; }
.nav-item:hover { background: var(--cream); color: var(--ink); }
.nav-item.active { background: var(--cream); color: var(--ink); font-weight: 600; }
.nav-item .icon { color: var(--muted); }
.nav-item.active .icon { color: var(--coral); }
.nav-item .dot { width: 7px; height: 7px; border-radius: 50%; margin-left: auto; background: transparent; }
.nav-item .dot.generating { background: var(--sun); animation: blink 1.2s infinite; }
.nav-item .dot.ready { background: var(--ok); }
.nav-item .dot.error { background: var(--danger); }
.nav-item .dot.locked { background: var(--line-2); }
.nav-topics { list-style: none; margin: 2px 0 8px 40px; padding: 0; font-size: 13px; color: var(--muted); }
.nav-topics li { padding: 3px 0; line-height: 1.35; }
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 14px 10px 6px; }

.main { flex: 1; min-width: 0; padding: 20px 16px calc(96px + var(--safe-b)); }
@media (min-width: 900px) { .main { padding: 28px 36px 60px; } }
.main-inner { max-width: 980px; margin: 0 auto; }
.mod-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.mod-head h1 { font-size: 28px; font-weight: 800; }
.mod-head .spacer { flex: 1; }
.save-state { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; min-width: 74px; }
.save-state.saving::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); animation: blink 1s infinite; }
.save-state.saved::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.save-state.error { color: var(--danger); }

.event-switch { display: inline-flex; align-items: center; gap: 6px; max-width: 46vw; height: 38px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); cursor: pointer; font-weight: 600; font-size: 15px; }
.event-switch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hide-sm { display: none; }
@media (min-width: 720px) { .hide-sm { display: inline-flex; } }
.show-sm { display: inline-flex; }
@media (min-width: 720px) { .show-sm { display: none; } }

/* barra de baixo no celular */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; background: var(--white); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safe-b)); }
@media (min-width: 900px) { .bottom-nav { display: none; } }
.bottom-nav a, .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); text-decoration: none; padding: 4px 2px; border: 0; background: none; cursor: pointer; }
.bottom-nav .active { color: var(--coral); font-weight: 600; }
.sheet-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sheet-list .nav-item { border: 1px solid var(--line); }

/* cartões e seções */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 14px; }
.section { margin-bottom: 28px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.section-head h2 { font-size: 19px; font-weight: 700; }
.section-head .spacer { flex: 1; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--coral-600); margin-bottom: 4px; }
.grid-2 { display: grid; gap: 14px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { display: grid; gap: 12px; }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.field-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }

/* edição inline */
[data-edit] { border-radius: 8px; padding: 2px 4px; margin: -2px -4px; outline: none; transition: background .12s, box-shadow .12s; min-height: 1.5em; white-space: pre-wrap; word-wrap: break-word; }
[data-edit][contenteditable="true"]:hover { background: var(--cream); cursor: text; }
[data-edit][contenteditable="true"]:focus { background: var(--white); box-shadow: 0 0 0 2px var(--sun); }
[data-edit]:empty::before { content: attr(data-placeholder); color: #B3AAB8; }
.lead-text { font-size: 18px; line-height: 1.6; color: var(--ink); }
.big-quote { font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1.35; }

.list-edit { display: grid; gap: 10px; }
.row-card { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px 44px 14px 14px; }
.row-card .del { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity .15s; }
.row-card:hover .del, .row-card:focus-within .del { opacity: 1; }
@media (hover: none) { .row-card .del { opacity: .7; } }
.kv { display: grid; grid-template-columns: 100px 1fr; gap: 4px 10px; font-size: 15px; margin-top: 6px; }
.kv dt { color: var(--muted); font-size: 13px; padding-top: 2px; }
.kv dd { margin: 0; }
.pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--cream); }
.pill.alto { background: #FDE4E1; color: #A3291F; }
.pill.medio, .pill.médio { background: var(--sun-50); color: #7A5600; }
.pill.baixo { background: var(--ok-50); color: #1D6B47; }
.add-row { border: 1px dashed var(--line-2); background: transparent; border-radius: 12px; padding: 10px; width: 100%; color: var(--ink-2); cursor: pointer; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; }
.add-row:hover { background: var(--cream); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 26px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); }
.timeline li::after { content: ""; position: absolute; left: 10px; top: 18px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }

/* borderô */
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 22px; }
@media (min-width: 720px) { .metrics { grid-template-columns: repeat(4, 1fr); } }
.metric { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.metric .label { font-size: 12px; color: var(--muted); font-weight: 600; }
.metric .value { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.metric .hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.metric.hero-metric { background: var(--ink); color: #fff; border-color: var(--ink); }
.metric.hero-metric .label, .metric.hero-metric .hint { color: #D8CFDD; }
.metric.neg .value { color: var(--danger); }
.metric.hero-metric.neg .value { color: #FF8F86; }
.settings-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .settings-row { grid-template-columns: repeat(5, 1fr); } }
.input, .select { width: 100%; height: 40px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 10px; font: inherit; font-size: 15px; background: var(--white); color: var(--ink); }
.input:focus, .select:focus { outline: none; border-color: var(--sun); box-shadow: 0 0 0 3px rgba(255, 197, 49, .25); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table.lines { width: 100%; border-collapse: collapse; font-size: 14px; }
.lines th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.lines td { padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lines tr:last-child td { border-bottom: 0; }
.lines input { width: 100%; height: 34px; border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 0 6px; font: inherit; color: var(--ink); }
.lines input:hover { background: var(--cream); }
.lines input:focus { outline: none; background: var(--white); border-color: var(--sun); }
.lines .num { text-align: right; font-variant-numeric: tabular-nums; }
.lines .total { font-weight: 600; white-space: nowrap; text-align: right; padding-right: 10px; }
.lines .group td { background: var(--paper); font-weight: 700; font-size: 13px; padding: 8px 10px; }
.lines .group .total { color: var(--ink-2); }
.lines .cell-del { width: 36px; }
.lines .cell-del button { opacity: .35; }
.lines tr:hover .cell-del button { opacity: 1; }
.toggle { border: 1px solid var(--line-2); background: var(--white); border-radius: 99px; font-size: 12px; padding: 3px 9px; cursor: pointer; white-space: nowrap; }
.toggle.on { background: var(--sun-50); border-color: var(--sun); }
.scenarios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.scenario { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-align: center; }
.scenario.mid { border-color: var(--ink); }
.scenario .value { font-weight: 700; font-family: var(--font-display); font-size: 18px; }
.note { font-size: 13px; color: var(--muted); }
.notes-list { margin: 0; padding-left: 1.2em; color: var(--ink-2); font-size: 14px; }

/* estados */
.skeleton { background: linear-gradient(90deg, var(--cream) 0%, #FBF0DF 40%, var(--cream) 80%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; height: 16px; margin-bottom: 10px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.producing { text-align: center; padding: 30px 10px; }
.producing .capi { width: 180px; height: 180px; }
.producing h2 { font-size: 22px; margin-top: 6px; }
.producing p { color: var(--ink-2); }
.progress { height: 6px; background: var(--cream); border-radius: 99px; overflow: hidden; max-width: 360px; margin: 14px auto 0; }
.progress i { display: block; height: 100%; background: var(--coral); border-radius: 99px; transition: width .6s ease; }
.topics-card ol { margin: 0; padding-left: 1.2em; }
.topics-card li { padding: 4px 0; }
.empty { text-align: center; padding: 34px 16px; color: var(--ink-2); }
.empty .capi { width: 140px; height: 140px; }

/* conteúdo travado (sem login): o texto real nunca chega ao navegador */
.locked-wrap { position: relative; }
.locked-fake { filter: blur(7px); user-select: none; pointer-events: none; opacity: .75; }
.locked-fake .fl { height: 14px; border-radius: 6px; background: #D9CFC2; margin: 10px 0; }
.locked-cta { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 40px; }
.locked-card { background: var(--white); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 22px; max-width: 380px; width: calc(100% - 24px); text-align: center; }
.locked-card .capi { width: 96px; height: 96px; margin: -6px auto 0; }
.locked-card h2 { font-size: 21px; margin: 4px 0 6px; }
.locked-card p { color: var(--ink-2); font-size: 15px; }

/* gaveta da Capi */
.drawer { position: fixed; z-index: 60; background: var(--white); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; left: 0; right: 0; bottom: 0; height: 78dvh; border-radius: 22px 22px 0 0; transform: translateY(105%); transition: transform .28s ease; }
.drawer.open { transform: none; }
@media (min-width: 900px) {
  .drawer { left: auto; top: var(--header-h); bottom: 0; right: 0; width: var(--drawer-w); height: auto; border-radius: 0; border-left: 1px solid var(--line); transform: translateX(105%); }
  .drawer.open { transform: none; }
  body.drawer-open .main { margin-right: var(--drawer-w); }
}
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; border-bottom: 1px solid var(--line); }
.drawer-head .face { width: 38px; height: 38px; border-radius: 50%; background: var(--sun-50); overflow: hidden; }
.drawer-head .face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transform: scale(1.6); transform-origin: 50% 15%; }
.drawer-head b { display: block; font-size: 15px; }
.drawer-head small { color: var(--muted); font-size: 12px; }
.drawer-head .spacer { flex: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.drawer-foot { padding: 10px 12px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); }
.drawer-foot form { display: flex; gap: 8px; align-items: flex-end; }
.drawer-foot textarea { flex: 1; border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 12px; font: inherit; resize: none; min-height: 44px; max-height: 140px; outline: none; }
.drawer-foot textarea:focus { border-color: var(--sun); }
.dmsg { font-size: 15px; }
.dmsg.user { align-self: flex-end; background: var(--cream); padding: 8px 12px; border-radius: 16px 16px 4px 16px; max-width: 88%; }
.dmsg.bot { align-self: flex-start; max-width: 95%; }
.proposal { border: 1px solid var(--sun); background: var(--sun-50); border-radius: 14px; padding: 12px; }
.proposal .actions { display: flex; gap: 8px; margin-top: 10px; }
.drawer-hints { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer-hints .chip { font-size: 13px; padding: 6px 10px; }

.fab { position: fixed; right: 16px; bottom: calc(80px + var(--safe-b)); z-index: 35; height: 52px; padding: 0 18px 0 8px; border-radius: 99px; border: 0; background: var(--ink); color: #fff; display: flex; align-items: center; gap: 8px; font-weight: 600; box-shadow: var(--shadow-lg); cursor: pointer; }
.fab .face { width: 38px; height: 38px; border-radius: 50%; background: var(--sun); overflow: hidden; }
.fab .face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transform: scale(1.6); transform-origin: 50% 15%; }
@media (min-width: 900px) { .fab { bottom: 24px; right: 24px; } body.drawer-open .fab { display: none; } }

.banner-super { background: var(--danger); color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: 6px 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; margin-bottom: 8px; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--coral); }
.check b { display: block; }
.check small { color: var(--muted); }

/* páginas simples */
.page { max-width: 760px; margin: 0 auto; padding: 28px 18px 60px; }
.page h1 { font-size: 32px; margin-bottom: 14px; }
.page h2 { font-size: 20px; margin: 22px 0 8px; }
.error-page { min-height: 70dvh; display: grid; place-items: center; text-align: center; padding: 20px; }
.error-page .capi { width: 160px; height: 160px; }

/* super */
.super { max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; }
.super-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.super-nav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14px; }
.super-nav a.active, .super-nav a:hover { background: var(--cream); }
.super table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--white); }
.super th, .super td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.super th { font-size: 12px; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
@media (min-width: 900px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.form-grid { display: grid; gap: 12px; max-width: 520px; }
.form-grid label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
textarea.code { width: 100%; min-height: 280px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
