/* ==========================================================================
   desagênc.ia — V2 app first
   Pensado para o celular. No computador, o app aparece dentro de um celular.
   Base: Manual da Marca v1.0. Preto sustenta. Lima destaca. Coral = esperando você.
   ========================================================================== */

:root {
  --preto: #141414;
  --lima: #C6FF00;
  --branco: #FFFFFF;
  --papel: #F5F5EF;
  --floresta: #073B32;
  --coral: #FF725E;

  --cinza-900: #1f1f1f;
  --cinza-700: #4a4a46;
  --cinza-500: #8a8a84;
  --cinza-300: #d6d6cf;
  --cinza-200: #e6e6e0;
  --cinza-100: #efefe9;

  --lima-suave: #f1ffb8;
  --coral-suave: #ffe3de;
  --floresta-suave: #dfeee9;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --pill: 999px;

  --sombra: 0 1px 2px rgba(20,20,20,.04), 0 6px 20px -10px rgba(20,20,20,.18);
  --sombra-forte: 0 2px 4px rgba(20,20,20,.08), 0 20px 40px -14px rgba(20,20,20,.35);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);

  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --pad: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100%;
  font-family: var(--font); font-size: 16px; line-height: 1.45; color: var(--preto);
  background: var(--papel);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: 1.15; letter-spacing: -.015em; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; -webkit-appearance: none; }
img { max-width: 100%; display: block; }
[x-cloak] { display: none !important; }
::selection { background: var(--lima); color: var(--preto); }

.muted { color: var(--cinza-700); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.strong { font-weight: 700; }
.lead { font-size: 16px; color: var(--cinza-700); }
.lime-t { color: var(--lima); }
.coral-t { color: #c2381f; }
.forest-t { color: var(--floresta); }
.center { text-align: center; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stats3 b { display: block; font-size: 18px; }
.stats3 span { font-size: 11px; color: var(--cinza-700); }

.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.start { align-items: flex-start; }
.wrap { flex-wrap: wrap; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.flex-1 { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

/* ---------------------------------------------------------------- app shell */
.app { min-height: 100vh; display: flex; flex-direction: column; background: var(--papel); }
.screen { flex: 1; padding: 12px var(--pad) calc(var(--tab-h) + var(--safe-b) + 24px); max-width: 560px; width: 100%; margin: 0 auto; }
.screen.no-tabs { padding-bottom: 32px; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.94); border-bottom: 1px solid var(--cinza-200); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: calc(10px + var(--safe-t)) var(--pad) 10px;
  display: flex; align-items: center; gap: 10px; min-height: 56px;
}
.topbar .logo img { height: 22px; width: auto; }
.topbar .title { font-weight: 800; font-size: 17px; }
.topbar .back { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--branco); border: 1px solid var(--cinza-200); text-decoration: none; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--floresta); color: var(--branco); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; border: 0; cursor: pointer; }

/* barra inferior */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--branco); border-top: 1px solid var(--cinza-200);
  padding: 6px 8px calc(6px + var(--safe-b));
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 2px;
  font-size: 11px; font-weight: 700; color: var(--cinza-500); text-decoration: none; background: none; border: 0; position: relative; cursor: pointer;
}
.tabbar svg { width: 24px; height: 24px; }
.tabbar a.active { color: var(--preto); }
.tabbar a.active svg { stroke-width: 2.5; }
.tabbar .count { position: absolute; top: 2px; right: calc(50% - 24px); background: var(--coral); color: var(--preto); font-size: 11px; font-weight: 800; border-radius: var(--pill); padding: 0 6px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; }
.tabbar .fab { margin-top: -22px; }
.tabbar .fab span.c { width: 56px; height: 56px; border-radius: 50%; background: var(--lima); color: var(--preto); display: grid; place-items: center; box-shadow: 0 8px 20px -8px rgba(20,20,20,.5); border: 4px solid var(--branco); }
.tabbar .fab span.c svg { width: 26px; height: 26px; stroke-width: 2.5; }
.tabbar .fab { color: var(--preto); }

/* ---------------------------------------------------------------- cards & listas */
.card { background: var(--branco); border: 1px solid var(--cinza-200); border-radius: var(--r); padding: 16px; box-shadow: var(--sombra); }
.card.flat { box-shadow: none; }
.card.dark { background: var(--preto); color: var(--branco); border-color: var(--preto); }
.card.dark .muted { color: #b5b5af; }
.card.forest { background: var(--floresta); color: var(--branco); border-color: var(--floresta); }
.card.forest .muted { color: #b9d3cc; }
.card.lime { background: var(--lima); border-color: var(--lima); }
.card.paper { background: var(--papel); box-shadow: none; }
.card.coral-soft { background: var(--coral-suave); border-color: #ffcfc6; box-shadow: none; }
.card.tap { cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s; }
.card.tap:active { transform: scale(.985); }
.card.selected { border-color: var(--preto); box-shadow: 0 0 0 3px var(--lima); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h3 { font-size: 16px; }
.card-head .more { font-size: 13px; font-weight: 700; text-decoration: none; color: var(--cinza-700); }

.section { margin-top: 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 0 2px; }
.section-head h2 { font-size: 17px; }
.section-head a { font-size: 13px; font-weight: 700; color: var(--cinza-700); text-decoration: none; }

.list { background: var(--branco); border: 1px solid var(--cinza-200); border-radius: var(--r); overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 14px; border-bottom: 1px solid var(--cinza-100); text-decoration: none; width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; cursor: pointer; min-height: 60px; }
.li:last-child { border-bottom: 0; }
.li:active { background: var(--papel); }
.li .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--papel); display: grid; place-items: center; flex: none; }
.li .ic svg { width: 20px; height: 20px; }
.li b { display: block; font-size: 15px; line-height: 1.3; }
.li span.sub { display: block; font-size: 13px; color: var(--cinza-700); margin-top: 2px; }
.li .chev { margin-left: auto; color: var(--cinza-300); flex: none; }
.li .chev svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px; border-radius: var(--pill); border: 1.5px solid transparent;
  font-weight: 800; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s var(--ease), background .15s, border-color .15s;
  background: var(--lima); color: var(--preto);
}
.btn svg { width: 20px; height: 20px; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.dark { background: var(--preto); color: var(--branco); }
.btn.ghost { background: transparent; border-color: var(--cinza-300); color: var(--preto); }
.btn.white { background: var(--branco); color: var(--preto); border-color: var(--cinza-200); }
.btn.coral { background: var(--coral); color: var(--preto); }
.btn.forest { background: var(--floresta); color: var(--branco); }
.btn.sm { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.btn.sm svg { width: 16px; height: 16px; }
.btn.lg { min-height: 54px; font-size: 17px; }
.btn.icon { padding: 0; width: 44px; height: 44px; min-height: 0; border-radius: 50%; }
.btn.block { width: 100%; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 700; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--pill);
  background: var(--branco); border: 1.5px solid var(--cinza-200); font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--preto); color: var(--branco); border-color: var(--preto); }
.chip.lime { background: var(--lima); border-color: var(--lima); color: var(--preto); }
.chip svg { width: 15px; height: 15px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 800; line-height: 1.4; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.paper  { background: var(--cinza-100); color: var(--cinza-700); }
.badge.lime   { background: var(--lima-suave); color: #4e6300; }
.badge.coral  { background: var(--coral-suave); color: #a32e1c; }
.badge.forest { background: var(--floresta-suave); color: var(--floresta); }
.badge.black  { background: var(--preto); color: var(--branco); }
.badge.plain::before { display: none; }
.dotc { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--cinza-300); flex: none; }
.dotc.lime { background: #9cc800; } .dotc.coral { background: var(--coral); } .dotc.forest { background: var(--floresta); } .dotc.black { background: var(--preto); }
.chip.on .dotc { outline: 2px solid rgba(255,255,255,.6); }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--cinza-700); background: var(--cinza-100); border-radius: 6px; padding: 2px 8px; }

/* ---------------------------------------------------------------- formulários */
.input, .select, .textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--preto); background: var(--branco);
  border: 1.5px solid var(--cinza-300); border-radius: 14px; padding: 13px 16px; outline: 0; min-height: 50px;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--preto); box-shadow: 0 0 0 4px var(--lima-suave); }
.input.lg { font-size: 19px; padding: 16px 18px; }
.textarea { min-height: 110px; resize: none; }
label.field { display: block; font-size: 13px; font-weight: 800; margin-bottom: 6px; }

input[type=range].range { -webkit-appearance: none; width: 100%; height: 10px; background: var(--cinza-200); border-radius: 5px; outline: 0; margin: 10px 0; }
input[type=range].range::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: var(--preto); border: 5px solid var(--lima); box-shadow: var(--sombra); }
input[type=range].range::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: var(--preto); border: 5px solid var(--lima); }

.toggle { position: relative; width: 50px; height: 30px; border-radius: 15px; background: var(--cinza-300); border: 0; cursor: pointer; transition: background .2s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--branco); transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.toggle.on { background: var(--preto); }
.toggle.on::after { transform: translateX(20px); background: var(--lima); }

.option { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--cinza-200); border-radius: var(--r); background: var(--branco); cursor: pointer; min-height: 60px; text-align: left; width: 100%; }
.option:active { transform: scale(.99); }
.option.on { border-color: var(--preto); box-shadow: 0 0 0 3px var(--lima); }
.option .emoji { font-size: 26px; flex: none; width: 36px; text-align: center; }
.option b { display: block; font-size: 15px; }
.option span.sub { display: block; font-size: 13px; color: var(--cinza-700); }
.option .tick { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--cinza-300); display: grid; place-items: center; flex: none; }
.option.on .tick { background: var(--preto); border-color: var(--preto); color: var(--lima); }
.option .tick svg { width: 14px; height: 14px; }
.options { display: flex; flex-direction: column; gap: 10px; }
.options.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.options.grid .option { flex-direction: column; align-items: flex-start; gap: 8px; }
.swatches { display: flex; gap: 6px; }
.swatches i { width: 30px; height: 30px; border-radius: 9px; border: 1px solid rgba(0,0,0,.08); }

.rank { display: flex; flex-direction: column; gap: 8px; }
.rank .item { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; background: var(--branco); border: 1.5px solid var(--cinza-200); border-radius: 14px; }
.rank .item .pos { width: 30px; height: 30px; border-radius: 50%; background: var(--preto); color: var(--lima); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.rank .item:first-child .pos { background: var(--lima); color: var(--preto); }
.rank .item b { display: block; font-size: 15px; }
.rank .item span.sub { font-size: 12px; color: var(--cinza-700); }
.rank .item .mv { margin-left: auto; display: flex; flex-direction: column; gap: 2px; }
.rank .item .mv button { width: 32px; height: 26px; border-radius: 8px; border: 1px solid var(--cinza-200); background: var(--papel); display: grid; place-items: center; cursor: pointer; }
.rank .item .mv button:disabled { opacity: .3; }
.rank .item .mv svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- medidores, números */
.meter { height: 10px; background: var(--cinza-200); border-radius: 5px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--preto); border-radius: 5px; transition: width .6s var(--ease); }
.meter.lime i { background: var(--lima); } .meter.forest i { background: var(--floresta); } .meter.coral i { background: var(--coral); }
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.kpi .d { font-size: 12px; font-weight: 800; }
.kpi .d.up { color: var(--floresta); } .kpi .d.down { color: #a32e1c; }
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; }
.bar-chart .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-chart .b i { width: 100%; background: var(--preto); border-radius: 8px 8px 3px 3px; transition: height .8s var(--ease); }
.bar-chart .b i.lime { background: var(--lima); }
.bar-chart .b span { font-size: 12px; color: var(--cinza-700); }
.alloc { display: flex; height: 40px; border-radius: 12px; overflow: hidden; }
.alloc i { display: flex; align-items: center; justify-content: center; color: var(--branco); font-size: 13px; font-weight: 800; transition: flex .4s var(--ease); min-width: 34px; }

/* ---------------------------------------------------------------- peças (prévia visual) */
.art {
  position: relative; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 14px; color: var(--c-fg, #fff); font-weight: 800; line-height: 1.2; aspect-ratio: 1 / 1;
  background: var(--c-img, none) center / cover no-repeat, var(--c-bg, #333);
}
.art::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 80% 0%, rgba(255,255,255,.28), transparent 60%); }
.art[style*="--c-img"]::before { background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.65) 100%); }
.art[style*="--c-img"] .text { text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.art .brandmark { position: absolute; top: 12px; left: 12px; width: 26px; height: 26px; border-radius: 7px; background: var(--c-fg, #fff); opacity: .9; }
.art .text { position: relative; font-size: 15px; text-shadow: 0 1px 2px rgba(0,0,0,.15); }
.art.story { aspect-ratio: 9 / 16; }
.art.wide { aspect-ratio: 16 / 9; }
.art.email { aspect-ratio: 4 / 5; }
.art.sq-56 { width: 56px; height: 56px; aspect-ratio: auto; flex: none; padding: 6px; border-radius: 12px; }
.art.sq-56 .brandmark { width: 12px; height: 12px; top: 6px; left: 6px; border-radius: 4px; }
.art.sq-56 .text { font-size: 9px; }
.art.sq-72 { width: 72px; height: 72px; aspect-ratio: auto; flex: none; padding: 8px; border-radius: 12px; }
.art.sq-72 .brandmark { width: 14px; height: 14px; top: 8px; left: 8px; border-radius: 4px; }
.art.sq-72 .text { font-size: 10px; }

/* "post" como no Instagram */
.post { background: var(--branco); border: 1px solid var(--cinza-200); border-radius: var(--r); overflow: hidden; }
.post .ph { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.post .ph .avatar { width: 30px; height: 30px; font-size: 12px; }
.post .ph b { font-size: 14px; }
.post .art { border-radius: 0; }
.post .pb { padding: 10px 12px 12px; font-size: 14px; }
.post .pb .acts { display: flex; gap: 14px; color: var(--cinza-700); margin-bottom: 8px; }
.post .pb .acts svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- linha do tempo (onde a peça está) */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline .st { display: flex; gap: 12px; align-items: flex-start; position: relative; padding-bottom: 14px; }
.timeline .st::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--cinza-200); }
.timeline .st:last-child::before { display: none; }
.timeline .st .dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--cinza-300); background: var(--branco); flex: none; display: grid; place-items: center; }
.timeline .st .dot svg { width: 12px; height: 12px; }
.timeline .st.done .dot { background: var(--floresta); border-color: var(--floresta); color: var(--branco); }
.timeline .st.now .dot { background: var(--lima); border-color: var(--preto); box-shadow: 0 0 0 4px var(--lima-suave); }
.timeline .st.now.wait .dot { background: var(--coral); border-color: var(--coral); }
.timeline .st b { display: block; font-size: 14px; }
.timeline .st span.sub { font-size: 12px; color: var(--cinza-700); }
.timeline .st:not(.done):not(.now) { opacity: .5; }

/* passos simplificados (chips de etapa) */
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 6px; border-radius: 3px; background: var(--cinza-200); }
.steps i.done { background: var(--floresta); }
.steps i.now { background: var(--lima); }
.steps i.wait { background: var(--coral); }

/* ---------------------------------------------------------------- mascote / balões */
.mascot { display: inline-block; }
.mascot svg { display: block; }
.mascot.wave svg .hand { transform-origin: 70% 60%; animation: wave 1.6s ease-in-out infinite; }
.bubble { position: relative; color: var(--preto); background: var(--branco); border: 1.5px solid var(--preto); border-radius: 18px; padding: 12px 16px; font-size: 15px; line-height: 1.4; }
.bubble::after { content: ""; position: absolute; left: -9px; top: 18px; width: 14px; height: 14px; background: var(--branco); border-left: 1.5px solid var(--preto); border-bottom: 1.5px solid var(--preto); transform: rotate(45deg); }
.bubble.lime { background: var(--lima); border-color: var(--lima); }
.bubble.lime::after { background: var(--lima); border-color: var(--lima); }
.helper { display: flex; gap: 12px; align-items: flex-start; }
.helper .mascot { flex: none; }

/* ---------------------------------------------------------------- folhas (bottom sheets), toasts */
.overlay { position: fixed; inset: 0; background: rgba(20,20,20,.5); z-index: 80; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet {
  background: var(--branco); border-radius: 24px 24px 0 0; width: 100%; max-width: 560px;
  max-height: calc(100% - 40px - var(--safe-t)); display: flex; flex-direction: column;
  box-shadow: var(--sombra-forte); animation: up .3s var(--ease);
}
.sheet.full { max-height: 100%; height: 100%; border-radius: 0; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--cinza-300); margin: 10px auto 0; flex: none; }
.sheet-head { padding: 12px 16px 8px; display: flex; align-items: center; gap: 10px; flex: none; }
.sheet-head h2 { font-size: 18px; flex: 1; }
.sheet-body { padding: 4px 16px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.sheet-foot { padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--cinza-100); display: flex; gap: 10px; flex: none; background: var(--branco); }
.sheet-foot .btn { flex: 1; }

.toasts { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tab-h) + var(--safe-b) + 12px); display: flex; flex-direction: column; gap: 8px; z-index: 90; pointer-events: none; }
.toast { background: var(--preto); color: var(--branco); padding: 12px 14px; border-radius: 14px; box-shadow: var(--sombra-forte); display: flex; gap: 10px; align-items: center; animation: up .3s var(--ease); font-size: 14px; font-weight: 600; }
.toast .ok { width: 24px; height: 24px; border-radius: 50%; background: var(--lima); color: var(--preto); display: grid; place-items: center; flex: none; }
.toast .ok svg { width: 13px; height: 13px; }
.toast.celebrate { background: var(--lima); color: var(--preto); }
.toast.celebrate .ok { background: var(--preto); color: var(--lima); }

/* chat */
.chat { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--papel); flex: 1; overflow-y: auto; }
.chat.wa { background: #ece5dd; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.4; }
.msg.me { align-self: flex-end; background: var(--preto); color: var(--branco); border-bottom-right-radius: 5px; }
.msg.bot, .msg.client { align-self: flex-start; background: var(--branco); border: 1px solid var(--cinza-200); border-bottom-left-radius: 5px; }
.msg.wa { align-self: flex-end; background: #dcf8c6; color: var(--preto); border-bottom-right-radius: 5px; }
.typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--cinza-500); margin-right: 3px; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
.chat-foot { display: flex; gap: 8px; padding: 10px 12px calc(10px + var(--safe-b)); border-top: 1px solid var(--cinza-200); background: var(--branco); }
.chat-foot .input { border-radius: var(--pill); min-height: 46px; padding: 10px 16px; }

/* ---------------------------------------------------------------- começar (onboarding) */
.onb { min-height: 100vh; display: flex; flex-direction: column; background: var(--papel); }
.onb-top { position: sticky; top: 0; z-index: 10; background: var(--papel); padding: calc(12px + var(--safe-t)) var(--pad) 8px; }
.onb-top .row { margin-bottom: 10px; }
.onb-top .logo img { height: 20px; }
.onb-main { flex: 1; padding: 8px var(--pad) 140px; max-width: 560px; width: 100%; margin: 0 auto; }
.onb-main h1 { font-size: 26px; margin-top: 6px; }
.onb-foot { position: fixed; bottom: 0; left: 0; right: 0; background: var(--branco); border-top: 1px solid var(--cinza-200); padding: 12px var(--pad) calc(12px + var(--safe-b)); display: flex; gap: 10px; z-index: 5; }
.onb-foot .btn.main { flex: 1; }
.block-intro { background: var(--preto); color: var(--branco); border-radius: var(--r-lg); padding: 24px 20px; }
.block-intro .n { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--lima); }
.block-intro h1 { color: var(--branco); margin-top: 8px; }
.block-intro p { color: #c9c9c3; margin-top: 10px; }
.block-intro ul { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.block-intro li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #e4e4de; }
.block-intro li svg { width: 18px; height: 18px; flex: none; color: var(--lima); margin-top: 2px; }
.why { display: flex; gap: 10px; align-items: flex-start; background: var(--lima-suave); border-radius: 14px; padding: 12px 14px; font-size: 13px; margin-top: 16px; }
.why svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* ---------------------------------------------------------------- calendário (agenda) */
.daystrip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.daystrip::-webkit-scrollbar { display: none; }
.daystrip .d { flex: none; width: 52px; padding: 8px 0; border-radius: 14px; background: var(--branco); border: 1px solid var(--cinza-200); text-align: center; font-size: 12px; color: var(--cinza-700); cursor: pointer; position: relative; }
.daystrip .d b { display: block; font-size: 17px; color: var(--preto); }
.daystrip .d.today { border-color: var(--preto); }
.daystrip .d.on { background: var(--preto); color: #b5b5af; border-color: var(--preto); }
.daystrip .d.on b { color: var(--lima); }
.daystrip .d .dots { display: flex; gap: 3px; justify-content: center; margin-top: 4px; height: 6px; }
.daystrip .d .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--cinza-300); }
.daystrip .d .dots i.aprovacao { background: var(--coral); } .daystrip .d .dots i.agendado, .daystrip .d .dots i.aprovado { background: var(--floresta); } .daystrip .d .dots i.gerando, .daystrip .d .dots i.revisao, .daystrip .d .dots i.briefing, .daystrip .d .dots i.pedido { background: #9cc800; }
.agenda-day { font-size: 13px; font-weight: 800; color: var(--cinza-700); text-transform: uppercase; letter-spacing: .06em; margin: 18px 2px 8px; display: flex; justify-content: space-between; }

/* ---------------------------------------------------------------- feed de novidades */
.feed .ev { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--cinza-100); font-size: 14px; align-items: flex-start; }
.feed .ev:last-child { border-bottom: 0; }
.feed .ev .t { color: var(--cinza-500); font-size: 12px; flex: none; width: 42px; padding-top: 3px; }
.feed .ev .ic { width: 28px; height: 28px; border-radius: 9px; background: var(--cinza-100); display: grid; place-items: center; flex: none; }
.feed .ev .ic svg { width: 14px; height: 14px; }
.list-plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.list-plain li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.list-plain li svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.agent { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--papel); }
.agent b { display: block; font-size: 14px; }
.agent span { font-size: 12px; color: var(--cinza-700); }
.palette { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.palette .sw { text-align: center; cursor: pointer; }
.palette .sw i { display: block; height: 56px; border-radius: 12px; border: 1px solid rgba(0,0,0,.06); margin-bottom: 4px; }
.palette .sw.on i { outline: 3px solid var(--preto); outline-offset: 2px; }
.palette .sw b { display: block; font-size: 11px; }
.palette .sw span { font-size: 10px; color: var(--cinza-700); }
.divider { height: 1px; background: var(--cinza-200); margin: 16px 0; }
.phone-bar { background: var(--floresta); color: var(--branco); padding: 12px 14px; font-size: 14px; font-weight: 800; display: flex; gap: 10px; align-items: center; }
.swipe { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: none; }
.swipe::-webkit-scrollbar { display: none; }
.swipe > * { scroll-snap-align: start; flex: 0 0 86%; }
.swipe.two > * { flex: 0 0 72%; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--branco); border: 1px solid var(--cinza-200); font-size: 13px; }
.notice svg { width: 18px; height: 18px; flex: none; }

/* ---------------------------------------------------------------- animações */
@keyframes wave { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(18deg); } 75% { transform: rotate(-10deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(.92); opacity: 0; } 60% { transform: scale(1.03); } 100% { transform: none; opacity: 1; } }
.spin { animation: spin 1s linear infinite; }
.enter { animation: rise .35s var(--ease) both; }
.enter-2 { animation-delay: .07s; } .enter-3 { animation-delay: .14s; } .enter-4 { animation-delay: .21s; }
.pop { animation: pop .4s var(--ease); }

/* ---------------------------------------------------------------- no computador: o app dentro de um celular */
@media (min-width: 900px) {
  html, body { height: 100%; }
  body { background: var(--preto); overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 56px; }
  .device-note { color: #b5b5af; max-width: 300px; font-size: 15px; line-height: 1.5; display: block; }
  .device-note h2 { color: var(--branco); font-size: 24px; margin-bottom: 10px; }
  .device-note .url { display: inline-block; margin-top: 14px; background: #262626; color: var(--lima); padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 700; }
  .device-note .qr { margin-top: 16px; width: 120px; height: 120px; background: #fff; border-radius: 12px; padding: 8px; }
  .device {
    width: 420px; height: min(880px, 94vh); border-radius: 48px; background: #000; padding: 12px;
    box-shadow: 0 40px 100px -30px rgba(0,0,0,.9), 0 0 0 2px #2a2a2a; position: relative;
    transform: translateZ(0); /* faz os elementos fixos (barra, folhas, avisos) ficarem dentro do celular */
  }
  .device::before { content: ""; position: absolute; top: 24px; left: 50%; transform: translateX(-50%); width: 110px; height: 30px; background: #000; border-radius: 20px; z-index: 50; }
  .device > .app, .device > .onb { height: 100%; min-height: 0; overflow-y: auto; border-radius: 38px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .device > .app::-webkit-scrollbar, .device > .onb::-webkit-scrollbar { display: none; }
  .device { --safe-t: 36px; --safe-b: 14px; }
  .tabbar, .onb-foot, .toasts, .overlay { position: absolute; }
  .tabbar, .onb-foot { left: 12px; right: 12px; bottom: 12px; border-radius: 0 0 38px 38px; }
  .overlay { inset: 12px; border-radius: 38px; overflow: hidden; }
  .toasts { left: 28px; right: 28px; }
  .topbar, .onb-top { border-radius: 38px 38px 0 0; }
}
@media (max-width: 899px) { .device-note { display: none; } }
