/* Acervo Angel — paleta em tons de preto e branco */
:root {
  --ink: #0b0b0b;
  --ink-2: #1c1c1c;
  --ink-3: #2c2c2c;
  --paper: #ffffff;
  --g50: #f6f6f5;
  --g100: #ececeb;
  --g200: #dadad8;
  --g400: #9b9b98;
  --g600: #5e5e5b;
  --radius: 18px;
  --serif: "Bodoni 72", "Didot", "Playfair Display", "Times New Roman", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 62px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--g50);
  font-size: 16px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- Topo ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--ink);
  padding: calc(var(--safe-top) + 8px) 16px 10px;
  display: flex; justify-content: center;
}
.topbar-logo { height: 46px; width: auto; max-width: 70vw; object-fit: contain; }

.view {
  padding: 16px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 96px);
  max-width: 560px; margin: 0 auto;
  min-height: 70vh;
}

/* ---------- Menu inferior ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: space-around;
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--g200);
  padding-bottom: var(--safe-bottom);
}
.tab {
  flex: 1; height: var(--tabbar-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--g400); font-size: 11px; font-weight: 600; letter-spacing: .02em;
}
.tab svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab[data-tab="mais"] svg { fill: currentColor; stroke-width: 2.4; }
.tab.active { color: var(--ink); }

/* ---------- Tipografia ---------- */
.h1 { font-family: var(--serif); font-size: 30px; font-weight: 400; font-style: italic; margin: 4px 0 2px; letter-spacing: -.01em; }
.h2 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--g600); margin: 26px 2px 10px; }
.muted { color: var(--g600); }
.small { font-size: 13px; }
.center { text-align: center; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { text-decoration: none; }

/* ---------- Cartões ---------- */
.card { background: var(--paper); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 0 var(--g200); }
.card + .card { margin-top: 12px; }
.card-dark { background: var(--ink); color: #fff; box-shadow: none; }
.card-dark .muted { color: #b8b8b5; }
.hero-label { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
.hero-value { font-size: 38px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.hero-sub { font-size: 14px; opacity: .8; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.stat-label { font-size: 12px; color: var(--g600); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font-size: 21px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.card-dark .stat-label { color: #b8b8b5; }

/* ---------- Botões de ação grandes ---------- */
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.action {
  background: var(--paper); border-radius: var(--radius); padding: 14px 6px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15px; box-shadow: 0 1px 0 var(--g200);
}
.action .ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; }
.action.outline .ic { background: var(--paper); color: var(--ink); border: 1.6px solid var(--ink); }
.action svg, .ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.action:active, .btn:active, .row:active, .piece:active { transform: scale(.98); }
.link-btn { display: block; width: 100%; margin-top: 10px; padding: 13px; border-radius: 14px; border: 1.5px dashed var(--g400); font-weight: 600; color: var(--g600); background: transparent; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 20px; border-radius: 14px; font-weight: 700; font-size: 17px;
  background: var(--ink); color: #fff; width: 100%;
}
.btn.secondary { background: var(--g100); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.danger { background: transparent; color: var(--ink); border: 1.5px solid var(--g200); font-weight: 600; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-row { display: flex; gap: 10px; margin-top: 12px; }
.btn-row .btn { flex: 1; }

.fab {
  position: fixed; right: 18px; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px); z-index: 15;
  height: 56px; padding: 0 22px 0 18px; border-radius: 28px; background: var(--ink); color: #fff;
  display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}
.fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* ---------- Listas ---------- */
.list { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 0 var(--g200); }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; width: 100%; text-align: left; background: var(--paper); }
.row + .row { border-top: 1px solid var(--g100); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--g600); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-value { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-chev { color: var(--g400); font-size: 20px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 700; font-size: 16px; background: var(--ink); color: #fff;
}
.avatar.out { background: var(--paper); color: var(--ink); border: 1.6px solid var(--ink); }
.avatar.neutral { background: var(--g100); color: var(--g600); border: 1.6px dashed var(--g400); }
.day-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; margin: 20px 0 8px; font-size: 13px; color: var(--g600); font-weight: 600; }
.empty { text-align: center; color: var(--g600); padding: 36px 20px; }
.empty svg { width: 46px; height: 46px; stroke: var(--g400); fill: none; stroke-width: 1.4; margin: 0 auto 10px; display: block; }

/* ---------- Seletor de mês ---------- */
.month-nav { display: flex; align-items: center; justify-content: space-between; background: var(--paper); border-radius: 14px; padding: 6px; box-shadow: 0 1px 0 var(--g200); margin-bottom: 14px; }
.month-nav button { width: 44px; height: 40px; border-radius: 10px; font-size: 22px; }
.month-nav button:active { background: var(--g100); }
.month-nav .label { font-weight: 700; }

/* ---------- Chips / filtros ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; flex-wrap: wrap; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 9px 14px; border-radius: 22px; background: var(--paper); border: 1.5px solid var(--g200); font-weight: 600; font-size: 15px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.add { border-style: dashed; color: var(--g600); }
.seg { display: flex; background: var(--g100); border-radius: 12px; padding: 3px; }
.seg button { flex: 1; height: 40px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--g600); }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* ---------- Peças ---------- */
.search { position: relative; margin: 12px 0; }
.search input { width: 100%; height: 46px; border-radius: 14px; border: 0; background: var(--paper); padding: 0 14px 0 42px; box-shadow: 0 1px 0 var(--g200); font-size: 16px; }
.search svg { position: absolute; left: 13px; top: 12px; width: 22px; height: 22px; fill: none; stroke: var(--g400); stroke-width: 2; stroke-linecap: round; }
.pieces { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.piece { background: var(--paper); border-radius: 16px; overflow: hidden; text-align: left; box-shadow: 0 1px 0 var(--g200); display: flex; flex-direction: column; }
.piece-photo { aspect-ratio: 4 / 5; background: var(--g100); display: grid; place-items: center; position: relative; }
.piece-photo img { width: 100%; height: 100%; object-fit: cover; }
.piece-photo svg { width: 42px; height: 42px; stroke: var(--g400); fill: none; stroke-width: 1.4; }
.piece-tag { position: absolute; left: 8px; top: 8px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 8px; letter-spacing: .04em; text-transform: uppercase; }
.piece-tag.light { background: rgba(255,255,255,.92); color: var(--ink); }
.piece-info { padding: 10px 12px 12px; }
.piece-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.piece-price { font-weight: 800; font-size: 17px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.piece-cost { font-size: 12px; color: var(--g600); margin-top: 1px; }

/* ---------- Lucro (DRE) ---------- */
.dre-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; }
.dre-line + .dre-line { border-top: 1px solid var(--g100); }
.dre-line .lbl { font-weight: 600; }
.dre-line .hint { font-size: 12.5px; color: var(--g600); font-weight: 400; margin-top: 2px; }
.dre-line.sub { padding-left: 12px; }
.dre-line.sub .lbl { font-weight: 400; }
.dre-line.total { border-top: 2px solid var(--ink) !important; }
.dre-line.total .lbl, .dre-line.total .money { font-size: 19px; font-weight: 800; }
.bar { height: 8px; border-radius: 4px; background: var(--g100); overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding-top: 10px; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.bars .b { width: 100%; max-width: 36px; background: var(--ink); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.bars .b.neg { background: repeating-linear-gradient(45deg, var(--g400) 0 3px, transparent 3px 7px); border: 1.5px solid var(--g600); }
.bars .b.cur { outline: 2px solid var(--ink); outline-offset: 2px; }
.bars .m { font-size: 11px; color: var(--g600); font-weight: 600; text-transform: capitalize; }
.note { display: flex; gap: 10px; background: var(--g100); border-radius: 14px; padding: 12px 14px; font-size: 14px; color: var(--ink-3); margin-top: 12px; }
.note b { font-weight: 700; }

/* ---------- Bottom sheet (formulários) ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; animation: fade .2s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--g50); border-radius: 22px 22px 0 0;
  max-height: calc(100vh - var(--safe-top) - 24px); max-height: calc(100dvh - var(--safe-top) - 24px);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 8px 18px calc(var(--safe-bottom) + 20px);
  animation: up .25s cubic-bezier(.2,.8,.2,1);
  max-width: 600px; margin: 0 auto;
}
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--g200); margin: 2px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-title { font-family: var(--serif); font-style: italic; font-size: 26px; margin: 0; font-weight: 400; }
.sheet-close { width: 36px; height: 36px; border-radius: 50%; background: var(--g100); font-size: 20px; line-height: 1; color: var(--g600); }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } }

.field { margin-bottom: 16px; }
.field > label, .field > .label { display: block; font-size: 14px; font-weight: 700; margin: 0 2px 7px; }
.field .help { font-size: 13px; color: var(--g600); margin: 6px 2px 0; }
.input, .select, .textarea {
  width: 100%; height: 52px; border-radius: 14px; border: 1.5px solid var(--g200); background: var(--paper);
  padding: 0 14px; font-size: 17px; outline: none;
}
.textarea { height: 84px; padding: 12px 14px; resize: none; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); }
.money-input { position: relative; }
.money-input span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--g600); font-size: 20px; }
.money-input .input { padding-left: 52px; font-size: 26px; font-weight: 700; height: 64px; font-variant-numeric: tabular-nums; }
.input-row { display: flex; gap: 10px; }
.input-row > * { flex: 1; min-width: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border: 1.5px solid var(--g200); border-radius: 14px; padding: 14px; font-size: 15px; }
.check input { width: 22px; height: 22px; accent-color: var(--ink); flex: none; margin: 0; }
.photo-pick { display: flex; align-items: center; gap: 14px; }
.photo-pick .thumb { width: 84px; height: 104px; border-radius: 14px; background: var(--g100); overflow: hidden; display: grid; place-items: center; flex: none; border: 1.5px dashed var(--g400); }
.photo-pick .thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-pick .thumb svg { width: 30px; height: 30px; stroke: var(--g400); fill: none; stroke-width: 1.6; }
.calc { background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 14px; font-size: 15px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.pick-list { max-height: 300px; overflow-y: auto; background: var(--paper); border-radius: 14px; border: 1.5px solid var(--g200); }
.pick { display: flex; align-items: center; gap: 12px; padding: 10px 12px; width: 100%; text-align: left; }
.pick + .pick { border-top: 1px solid var(--g100); }
.pick .mini { width: 44px; height: 54px; border-radius: 8px; background: var(--g100); overflow: hidden; flex: none; display: grid; place-items: center; }
.pick .mini img { width: 100%; height: 100%; object-fit: cover; }
.pick .mini svg { width: 22px; height: 22px; stroke: var(--g400); fill: none; stroke-width: 1.5; }
.pick .tick { width: 26px; height: 26px; border-radius: 50%; border: 1.8px solid var(--g400); flex: none; display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800; }
.pick.on .tick { background: var(--ink); border-color: var(--ink); }

.detail-photo { width: 100%; aspect-ratio: 4 / 5; max-height: 52vh; object-fit: cover; border-radius: 16px; background: var(--g100); }
.kv { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--g100); }
.kv:first-child { border-top: 0; }
.kv span:first-child { color: var(--g600); }
.kv span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 60;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 24px; font-weight: 600; font-size: 15px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: fade .2s; max-width: 90vw; text-align: center;
}

.greet { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 14px; }
.greet .date { font-size: 13px; color: var(--g600); }

.install-steps { margin: 0; padding-left: 20px; }
.install-steps li { margin: 6px 0; }

@media (min-width: 600px) {
  .pieces { grid-template-columns: repeat(3, 1fr); }
}
.grid2 .card + .card, .grid2 > .card { margin-top: 0; }
button.card { width: 100%; font: inherit; color: inherit; }
.row[disabled] { opacity: 1; cursor: default; }

/* ---------- Cores de sinal (psicologia das cores) ----------
   A marca continua preto e branco. Cor só aparece para dar significado:
   verde-oliva = entrou / lucro · vinho = saiu / prejuízo · âmbar = atenção · cinza = não conta no lucro.
   Sempre junto com sinal (+ / − / ▲ / ▼), nunca a cor sozinha. */
:root {
  --pos: #3b6d11; --pos-ink: #27500a; --pos-bg: #eaf3de; --pos-on-dark: #a9d26c;
  --neg: #a32d2d; --neg-ink: #791f1f; --neg-bg: #fcebeb; --neg-on-dark: #f4a3a3;
  --warn: #854f0b; --warn-ink: #633806; --warn-bg: #faeeda; --warn-line: #ef9f27;
  --muted-val: #6b6b68;
}
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.nz  { color: var(--muted-val); }
.card-dark .pos { color: var(--pos-on-dark); }
.card-dark .neg { color: var(--neg-on-dark); }
.card.tone-pos { background: var(--pos-bg); box-shadow: none; }
.card.tone-pos .stat-label { color: var(--pos); }
.card.tone-pos .stat-value { color: var(--pos-ink); }
.card.tone-neg { background: var(--neg-bg); box-shadow: none; }
.card.tone-neg .stat-label { color: var(--neg); }
.card.tone-neg .stat-value { color: var(--neg-ink); }
.note.warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #f3d7a6; }
.note.warn b { color: var(--warn-ink); }
.note.warn.tap { width: 100%; text-align: left; font-size: 14px; align-items: center; }
.note.warn.tap::after { content: '›'; margin-left: auto; font-size: 20px; }
.piece-tag.warn { background: var(--warn-bg); color: var(--warn-ink); }
.calc.pos { background: var(--pos-bg); color: var(--pos-ink); }
.calc.neg { background: var(--neg-bg); color: var(--neg-ink); }
.bars .b.pos { background: var(--pos); }
.bars .b.neg { background: repeating-linear-gradient(45deg, var(--neg-bg) 0 3px, #f09595 3px 6px); border: 1.5px solid var(--neg); }
.bar.out > i { background: var(--neg); opacity: .85; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }

/* ---------- Listas (checklist da feira) ---------- */
.back-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; margin: -6px 0 2px -4px; font-weight: 600; font-size: 16px; color: var(--g600); }
.list-home { display: flex; align-items: center; gap: 14px; text-align: left; margin-top: 12px; }
.list-home-ic { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--ink); color: #fff; }
.list-home-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.list-home-title { font-weight: 700; font-size: 18px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-home .row-sub b { color: var(--ink); }
.empty svg { stroke-linecap: round; stroke-linejoin: round; }
.list-bar { background: rgba(255,255,255,.18); height: 10px; border-radius: 5px; margin-top: 12px; }
.list-bar > i { background: #fff; }
.list-add { margin-top: 12px; padding: 12px; }
.list-add-row { display: flex; gap: 8px; }
.list-add-row .input { flex: 1; min-width: 0; }
.list-add-btn { width: 52px; height: 52px; flex: none; border-radius: 14px; background: var(--ink); color: #fff; display: grid; place-items: center; }
.list-add-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.list-add-btn:active { transform: scale(.96); }
.input.input-sm { height: 46px; font-size: 15px; }
.checklist .check-row { padding: 0; gap: 0; align-items: stretch; }
.check-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 14px 8px 14px 16px; text-align: left; min-height: 60px; }
.check-main .row-title { display: block; white-space: normal; font-size: 17px; }
.check-main .row-sub { display: block; white-space: normal; font-size: 14px; }
.check-main .row-sub b { color: var(--ink); }
.check-box { width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--ink); flex: none; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: #fff; }
.check-edit { flex: none; padding: 0 16px; font-size: 14px; font-weight: 600; color: var(--g600); border-left: 1px solid var(--g100); }
.check-row.done { background: var(--g50); }
.check-row.done .check-box { background: var(--ink); }
.check-row.done .row-title { text-decoration: line-through; color: var(--g400); font-weight: 500; }
.check-row.done .row-sub, .check-row.done .row-sub b { color: var(--g400); }

/* ---------- Código de acesso e personalização (produto com licença) ---------- */
body.travado .tabbar { display: none; }
.gate { padding: 8px 2px 32px; }
.gate p { line-height: 1.45; }
.gate-title { font-family: var(--serif); font-style: italic; font-weight: 400; }
.lic-input { font-size: 20px; letter-spacing: .06em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.topbar-nome { color: #fff; font-family: var(--serif); font-style: italic; font-size: 26px; line-height: 46px; max-width: 80vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marca-preview { height: 76px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin: 16px 0 20px; padding: 0 16px; transition: background .2s; }
.marca-preview img { max-height: 50px; max-width: 80%; object-fit: contain; }
.cores { display: flex; flex-wrap: wrap; gap: 12px; }
.cor { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.cor.on { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px #0b0b0b; }

/* Escolha do ramo de atividade (Personalizar meu app) */
.ramos { display: grid; gap: 8px; }
.ramo { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--paper); border: 1.5px solid var(--g200); border-radius: 14px; padding: 12px 14px; color: var(--ink); }
.ramo.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.ramo-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--g100); flex: none; display: grid; place-items: center; }
.ramo.on .ramo-ic { background: var(--ink); color: #fff; }
.ramo-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ramo-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ramo-txt b { font-size: 16px; }
.ramo-txt span { font-size: 13px; color: var(--g600); line-height: 1.3; }
.ramo.breve { border-style: dashed; color: var(--g400); }
.ramo.breve .ramo-txt span { color: var(--g400); }

/* iPhone: prévia do ícone antes de colocar na tela */
.icone-previa { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 8px 0 18px; }
.icone-previa img { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.icone-previa span { font-size: 13px; color: var(--g600); max-width: 140px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Venda de item com quantidade: cada toque soma uma unidade; "−" tira uma */
.pick.pick-qtd { padding: 0; gap: 0; }
.pick-qtd .pick-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-align: left; }
.pick-qtd .tick { font-size: 14px; color: var(--g600); }
.pick-qtd.on .tick { color: #fff; }
.pick-menos { flex: none; width: 48px; align-self: stretch; font-size: 24px; font-weight: 700; color: var(--ink); border-left: 1px solid var(--g100); }

/* "Mais cores": abre o seletor de cores do celular */
.cor-mais { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 6px; border-radius: 999px; border: 1.5px solid var(--g200); background: var(--paper); font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; }
.cor-mais.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.cor-mais-amostra { width: 32px; height: 32px; border-radius: 50%; background: conic-gradient(#e11d48, #f59e0b, #16a34a, #0ea5e9, #6d28d9, #e11d48); box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.cor-mais input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }

/* =====================================================================
   Tela "Personalizar meu app": prévia ao vivo + 3 blocos numerados
   ===================================================================== */
.pers { padding-bottom: 0; }
.pers .gate-title { margin-bottom: 4px; }
.pers-sub { margin: 0 2px 14px; font-size: 15px; }

/* Prévia: topo do app e ícone do celular, lado a lado */
.pers-previa { display: flex; align-items: center; gap: 14px; background: var(--paper); border-radius: 20px; padding: 14px; box-shadow: 0 1px 0 var(--g200), 0 8px 24px rgba(0,0,0,.06); margin-bottom: 18px; }
.pers-topo { flex: 1; min-width: 0; height: 72px; border-radius: 14px; display: flex; align-items: center; justify-content: center; padding: 0 12px; transition: background .2s; overflow: hidden; }
.pers-topo img { max-height: 46px; max-width: 90%; object-fit: contain; }
.pers-topo .topbar-nome { font-size: 22px; line-height: 1.2; max-width: 100%; }
.pers-icone { flex: none; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.pers-icone-img { width: 60px; height: 60px; border-radius: 15px; display: grid; place-items: center; overflow: hidden; box-shadow: 0 3px 10px rgba(0,0,0,.18); transition: background .2s; }
.pers-icone-img img { max-width: 62%; max-height: 62%; object-fit: contain; }
.pers-icone-img b { color: #fff; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 34px; line-height: 1; }
.pers-icone-nome { font-size: 11px; color: var(--g600); max-width: 72px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Blocos numerados */
.pers-sec { background: var(--paper); border-radius: 20px; padding: 16px 14px 14px; box-shadow: 0 1px 0 var(--g200); margin-bottom: 12px; }
.pers-tit { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.pers-num { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; display: grid; place-items: center; flex: none; }
.pers-sec .field:last-child { margin-bottom: 0; }
.pers-sec > .help { font-size: 13px; color: var(--g600); margin: 10px 2px 0; }
.opc { font-weight: 400; color: var(--g600); }

/* Ramos em grade de 2 colunas */
.pers .ramos { grid-template-columns: 1fr 1fr; gap: 10px; }
.pers .ramo { position: relative; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border-radius: 16px; background: var(--g50); border-color: transparent; }
.pers .ramo.on { background: var(--paper); border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pers .ramo-ic { width: 38px; height: 38px; background: var(--paper); }
.pers .ramo-txt b { font-size: 15px; line-height: 1.2; }
.pers .ramo-txt span { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ramo-ok { display: none; position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; place-items: center; }
.pers .ramo.on .ramo-ok { display: grid; }

/* Logo: miniatura + botões */
.pers-logo { display: flex; align-items: center; gap: 12px; }
.pers-logo-box { flex: none; width: 76px; height: 76px; border-radius: 16px; border: 1.5px dashed var(--g400); background: var(--g50); color: var(--g600); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 600; overflow: hidden; }
.pers-logo-box svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.pers-logo-box.tem { border: 0; }
.pers-logo-box img { max-width: 80%; max-height: 80%; object-fit: contain; }
.pers-logo-acoes { flex: 1; min-width: 0; }
.pers-logo-acoes .btn { height: 46px; font-size: 15px; }
.pers-logo-acoes .help { margin: 6px 2px 0; font-size: 13px; color: var(--g600); }
.pers-tirar { border: 0; padding: 8px; margin-top: 4px; }

/* Interruptor "Logo em branco" */
.field > .pers-switch, .pers-switch { display: flex; font-weight: 400; margin-left: 0; margin-right: 0; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--g50); }
.pers-switch span { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.pers-switch small { font-size: 12px; color: var(--g600); }
.pers-switch input { appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; border-radius: 999px; background: var(--g200); position: relative; transition: background .2s; margin: 0; cursor: pointer; }
.pers-switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.pers-switch input:checked { background: var(--ink); }
.pers-switch input:checked::after { transform: translateX(20px); }

/* Cores */
.pers .cores { display: grid; grid-template-columns: repeat(4, 44px); justify-content: space-between; gap: 12px 0; }
.pers .cor-mais { grid-column: 1 / -1; justify-self: start; }
.cor-det { margin-top: 14px; border-top: 1px solid var(--g100); padding-top: 10px; }
.cor-det summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--g600); padding: 4px 2px; list-style: none; }
.cor-det summary::-webkit-details-marker { display: none; }
.cor-det summary::before { content: '›'; display: inline-block; margin-right: 8px; transition: transform .2s; }
.cor-det[open] summary::before { transform: rotate(90deg); }
.cor-codigo { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.cor-codigo label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cor-codigo label > span { font-size: 12px; font-weight: 600; color: var(--g600); }
.cor-codigo .input { height: 46px; padding: 0 8px; font-size: 15px; text-align: center; font-variant-numeric: tabular-nums; }
.cor-hex .input { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .02em; }
.cor-det .help { font-size: 12px; color: var(--g600); margin: 8px 2px 0; }
.pers-aviso { margin: 4px 4px 8px; }

/* Aviso de versão nova (fica acima do menu de baixo) */
.aviso-versao { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px); z-index: 60; max-width: 536px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 18px; background: var(--ink); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.28); animation: aviso-sobe .3s ease-out; }
body.travado .aviso-versao { bottom: calc(var(--safe-bottom) + 12px); }
.aviso-versao-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.aviso-versao-txt small { font-size: 12.5px; opacity: .8; }
.aviso-versao-btn { flex: none; height: 42px; padding: 0 18px; border-radius: 12px; background: #fff; color: var(--ink); font-weight: 700; font-size: 15px; }
@keyframes aviso-sobe { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Sobre o app */
.sobre-topo { display: flex; align-items: center; gap: 14px; margin: 4px 2px 14px; }
.sobre-ic { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; flex: none; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.sobre-ic img { max-width: 62%; max-height: 62%; object-fit: contain; }
.sobre-ic b { color: #fff; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 30px; }
.sobre-nome { font-size: 18px; font-weight: 700; }
a.btn { text-decoration: none; display: flex; align-items: center; justify-content: center; }

/* Botão de salvar sempre à vista */
.pers-acoes { position: sticky; bottom: 0; margin: 8px -16px 0; padding: 14px 16px calc(14px + var(--safe-bottom)); background: linear-gradient(to bottom, rgba(246,246,245,0), var(--g50) 30%); }
.pers-acoes .link-btn { border: 0; margin-top: 4px; padding: 10px; }

/* Lista curta dentro de um aviso */
.aviso-lista { margin: 0 0 12px; padding-left: 20px; line-height: 1.6; }

/* O que há de novo */
.novidades { display: grid; gap: 12px; margin: 4px 0 18px; }
.novidade { display: flex; gap: 12px; align-items: flex-start; }
.novidade-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center; margin-top: 1px; }
.novidade b { display: block; font-size: 15px; }
.novidade span { font-size: 14px; color: var(--g600); line-height: 1.35; }

/* Cópias automáticas */
.copia-row { align-items: center; }
.copia-btn { width: auto; height: 40px; padding: 0 14px; font-size: 14px; flex: none; }

/* Ideias para vender mais */
.ideia-linha { padding: 8px 0; }
.ideia-linha + .ideia-linha { border-top: 1px solid var(--g100); }
.ideia-linha[data-piece] { cursor: pointer; }
.ideia-topo { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.ideia-topo b { font-weight: 600; white-space: nowrap; }
.ideia-sub { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--g600); margin: 4px 0 2px; }
.ideia-sub ~ .ideia-sub { margin-top: 16px; }
.ideia-card { margin-top: 10px; }
.ideia-nome { font-size: 16px; }
.ideia-tag { background: var(--warn-bg); color: var(--warn-ink); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.ideia-acao { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ideia-acao .small-btn { width: auto; height: 40px; padding: 0 16px; font-size: 15px; }
.ideia-porque { margin-top: 10px; font-size: 13px; color: var(--g600); }
.ideia-porque summary { cursor: pointer; font-weight: 600; }
.note.tap-plain { width: 100%; text-align: left; }
.ideia-texto { min-height: 120px; resize: vertical; font-size: 15px; line-height: 1.4; padding: 10px 12px; height: auto; }
.ideia-botoes { display: flex; gap: 8px; margin-top: 10px; }
.ideia-botoes .btn { height: 42px; font-size: 14px; padding: 0 10px; flex: 1; }
.link-inline { color: var(--ink); text-decoration: underline; font-weight: 600; font-size: inherit; padding: 0; }
.tipo-linha { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--g100); }
.tipo-linha span { flex: 1; font-size: 14px; }
.tipo-linha .input { width: 46%; height: 40px; font-size: 15px; }
.ideia-home { display: block; width: 100%; text-align: left; margin-top: 12px; border-left: 4px solid var(--ink); }
.ideia-home-titulo { font-weight: 700; font-size: 17px; margin: 4px 0 2px; }
