/* =====================================================================
   Paletas. Cada uma define cores, brilho do fundo e vidro.
   ===================================================================== */
:root, [data-tema="preto-laranja"] {
  --bg: #100F0E; --surface: rgba(27, 25, 23, .80); --surface2: rgba(255, 255, 255, .065); --line: rgba(255, 255, 255, .085);
  --text: #F4EFE9; --muted: #B5ADA5;
  --accent: #D9703A; --accent-hi: #E58A55; --accent-hover: #E58A55; --on-accent: #17110D; --accent-text: #E58A55;
  --green: #9BE08F; --blue: #7CC4FF; --red: #FF8A80;
  --glow: 217, 112, 58; --cool: 80, 120, 150; --ga: .27; --ca: .17;
  --card-line: rgba(255, 255, 255, .075);
  --shadow-1: inset 0 1px 0 rgba(255, 255, 255, .045), 0 14px 34px -20px rgba(0, 0, 0, .75);
  --glass: rgba(26, 24, 22, .62); --glass-solid: #1B1917; --glass-line: rgba(255, 255, 255, .11);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --grain-o: .05;
  --title: 'Sora', 'Manrope', system-ui, sans-serif;
  --body: 'Manrope', system-ui, -apple-system, sans-serif;
}
[data-tema="branco-laranja"] {
  --bg: #F6F3EF; --surface: rgba(255, 255, 255, .88); --surface2: rgba(70, 45, 20, .055); --line: rgba(70, 45, 20, .09);
  --text: #1B1714; --muted: #5F564E;
  --accent: #D9703A; --accent-hi: #E58A55; --accent-hover: #C9622E; --on-accent: #17110D; --accent-text: #A9481A;
  --green: #1B7A38; --blue: #1F5FBF; --red: #C0281F;
  --glow: 232, 132, 74; --cool: 120, 160, 205; --ga: .26; --ca: .17;
  --card-line: rgba(70, 45, 20, .07);
  --shadow-1: 0 1px 2px rgba(70, 45, 20, .05), 0 16px 34px -22px rgba(70, 45, 20, .32);
  --glass: rgba(255, 255, 255, .68); --glass-solid: #FFFFFF; --glass-line: rgba(70, 45, 20, .10);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --grain-o: .035;
}
[data-tema="azul-claro"] {
  --bg: #F3F6FB; --surface: rgba(255, 255, 255, .88); --surface2: rgba(20, 50, 100, .055); --line: rgba(20, 50, 100, .09);
  --text: #10233F; --muted: #526178;
  --accent: #1F5FBF; --accent-hi: #3A78D8; --accent-hover: #184E9E; --on-accent: #FFFFFF; --accent-text: #1F5FBF;
  --green: #1B7A38; --blue: #1F5FBF; --red: #C0281F;
  --glow: 58, 120, 216; --cool: 130, 175, 225; --ga: .22; --ca: .16;
  --card-line: rgba(20, 50, 100, .07);
  --shadow-1: 0 1px 2px rgba(20, 50, 100, .05), 0 16px 34px -22px rgba(20, 50, 100, .30);
  --glass: rgba(255, 255, 255, .68); --glass-solid: #FFFFFF; --glass-line: rgba(20, 50, 100, .10);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --grain-o: .035;
}

/* =====================================================================
   Base
   ===================================================================== */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--body); font-weight: 500; }
body { display: flex; justify-content: center; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-weight: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.btn, .cli, .row, .chip, .tier, .opt, .tema, .icon-btn, .back, .nav a, .big-cta, .pill { transition: transform .16s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
.btn:active, .cli:active, .chip:active, .tier:active, .opt:active, .tema:active, .big-cta:active, .icon-btn:active, .back:active { transform: scale(.975); }

/* ---------- Estrutura e fundo com brilho por aba ---------- */
.app {
  width: 100%; max-width: 480px; height: 100dvh;
  display: flex; flex-direction: column; background: var(--bg); overflow: hidden; position: relative;
  --amb1: radial-gradient(70% 45% at 92% -6%, rgba(var(--glow), var(--ga)), transparent 70%);
  --amb2: radial-gradient(60% 40% at -4% 102%, rgba(var(--cool), var(--ca)), transparent 70%);
}
.app[data-aba="clientes"] {
  --amb1: radial-gradient(65% 42% at -6% 6%, rgba(var(--glow), var(--ga)), transparent 70%);
  --amb2: radial-gradient(60% 40% at 104% 96%, rgba(var(--cool), var(--ca)), transparent 70%);
}
.app[data-aba="ia"] {
  --amb1: radial-gradient(85% 50% at 50% 110%, rgba(var(--glow), calc(var(--ga) * 1.25)), transparent 70%);
  --amb2: radial-gradient(60% 38% at 50% -8%, rgba(var(--cool), calc(var(--ca) * 1.15)), transparent 70%);
}
.app[data-aba="aulas"] {
  --amb1: radial-gradient(70% 45% at 106% 38%, rgba(var(--glow), calc(var(--ga) * .85)), transparent 70%);
  --amb2: radial-gradient(60% 40% at -6% -2%, rgba(var(--cool), var(--ca)), transparent 70%);
}
.app[data-aba="negocio"] {
  --amb1: radial-gradient(70% 45% at -6% -4%, rgba(var(--glow), var(--ga)), transparent 70%);
  --amb2: radial-gradient(70% 42% at 106% 104%, rgba(var(--glow), calc(var(--ga) * .55)), transparent 70%);
}
.app::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: var(--amb1), var(--amb2); }
.app::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background-image: var(--grain); opacity: var(--grain-o); }
@media (min-width: 520px) {
  .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
.top, .main { position: relative; z-index: 1; }
.top { flex-shrink: 0; padding: max(20px, env(safe-area-inset-top)) 22px 12px; display: flex; align-items: center; gap: 12px; }
.top.big { padding-top: max(26px, env(safe-area-inset-top)); }
.main { flex: 1; overflow-y: auto; padding: 4px 20px 32px; display: flex; flex-direction: column; gap: 14px; -webkit-overflow-scrolling: touch; }
.app.has-nav .main { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
.title { font-family: var(--title); font-weight: 600; font-size: 24px; letter-spacing: -.015em; line-height: 1.18; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.title.xl { font-size: 30px; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; line-height: 1.45; }

/* Entrada suave das telas */
@keyframes subir { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.main > * { animation: subir .42s cubic-bezier(.2, .7, .2, 1) both; }
.main > *:nth-child(2) { animation-delay: .04s; } .main > *:nth-child(3) { animation-delay: .08s; }
.main > *:nth-child(4) { animation-delay: .12s; } .main > *:nth-child(n+5) { animation-delay: .16s; }
@media (prefers-reduced-motion: reduce) { .main > * { animation: none; } * { transition: none !important; } }

/* ---------- Navegação inferior (vidro flutuante) ---------- */
.nav {
  position: absolute; z-index: 5; left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom)); height: 70px;
  display: flex; align-items: center; justify-content: space-around; padding: 0 6px;
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: 35px;
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 18px 36px -16px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .nav { background: var(--glass-solid); } }
@media (prefers-reduced-transparency: reduce) { .nav { background: var(--glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.nav a { min-width: 58px; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 700; border-radius: 22px; }
.nav a.on { color: var(--accent-text); background: rgba(var(--glow), .13); }
.nav a.ia {
  width: 60px; height: 60px; min-width: 60px; margin-top: -34px; border-radius: 30px; gap: 0; color: var(--on-accent); font-size: 11px; font-weight: 800;
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  box-shadow: 0 0 0 5px var(--bg), 0 14px 30px -8px rgba(var(--glow), .7), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.nav a.ia.on { color: var(--on-accent); background: linear-gradient(180deg, var(--accent-hi), var(--accent)); }

/* ---------- Componentes ---------- */
.card {
  background: var(--surface); border: 1px solid var(--card-line); border-radius: 26px; padding: 20px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-1);
}
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card-h h2, .h2 { font-family: var(--title); font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row .t { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.row .s { color: var(--muted); font-size: 13px; font-weight: 500; }
.pill { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 99px; background: var(--surface2); white-space: nowrap; border: 0; }
button.pill { min-height: 32px; }

.btn {
  min-height: 54px; border-radius: 18px; border: 1px solid var(--line); padding: 0 20px; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 700; font-size: 16px; background: var(--surface2); color: var(--text); width: 100%;
}
.btn.primary {
  border-color: transparent; color: var(--on-accent);
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  box-shadow: 0 12px 28px -12px rgba(var(--glow), .75), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--red); background: transparent; }
.btn.small { min-height: 46px; font-size: 14px; border-radius: 16px; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.icon-btn, .back {
  border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
}
.icon-btn { width: 48px; height: 48px; }
.back { width: 44px; height: 44px; }
.icon-btn.orange { background: linear-gradient(180deg, var(--accent-hi), var(--accent)); border-color: transparent; box-shadow: 0 10px 22px -10px rgba(var(--glow), .8); }

.big-cta {
  position: relative; overflow: hidden; color: var(--on-accent); border-radius: 30px; padding: 24px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(140deg, var(--accent-hi) 0%, var(--accent) 100%);
  box-shadow: 0 22px 44px -22px rgba(var(--glow), .85), inset 0 1px 0 rgba(255, 255, 255, .32);
}
.big-cta::after { content: ''; position: absolute; right: -40px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 65%); pointer-events: none; }
.big-cta > * { position: relative; z-index: 1; }
.big-cta .t { font-family: var(--title); font-weight: 600; font-size: 26px; line-height: 1.05; letter-spacing: -.02em; }
.big-cta .s { font-size: 14px; font-weight: 600; margin-top: 6px; display: block; opacity: .82; }
.big-cta .dot { width: 54px; height: 54px; border-radius: 50%; background: var(--on-accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .5); }

/* ---------- Formulário ---------- */
.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
.inp, .field input, .field textarea, .field select, .search input {
  background: var(--surface2); border: 1px solid var(--line); border-radius: 16px; padding: 0 16px; min-height: 50px; color: var(--text); font-size: 16px; font-weight: 500; width: 100%; outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { padding: 14px 16px; line-height: 1.5; resize: none; min-height: 92px; }
.field input:focus, .field textarea:focus, .field select:focus, .inp:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--glow), .16); }
.field select { appearance: none; -webkit-appearance: none; }
.money { display: flex; align-items: center; gap: 8px; background: var(--surface2); border: 1px solid var(--line); border-radius: 16px; padding: 0 16px; transition: border-color .2s ease, box-shadow .2s ease; }
.money:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--glow), .16); }
.money span { color: var(--muted); font-size: 15px; }
.money input { border: 0; background: transparent; padding: 0; min-height: 48px; flex: 1; min-width: 0; box-shadow: none !important; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.search { display: flex; align-items: center; gap: 10px; background: var(--glass); border: 1px solid var(--glass-line); border-radius: 20px; padding: 0 16px; height: 52px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.search input { border: 0; background: transparent; padding: 0; min-height: 0; height: 100%; font-size: 15px; box-shadow: none; }
.hint { color: var(--muted); font-size: 14px; line-height: 1.55; font-weight: 500; }
.hint.center { text-align: center; padding: 8px 12px; }

.steps { display: flex; gap: 8px; font-size: 13px; font-weight: 700; flex-wrap: wrap; }
.steps a { padding: 6px 14px; border-radius: 99px; background: var(--surface2); color: var(--muted); min-height: 34px; display: flex; align-items: center; border: 1px solid var(--line); }
.steps a.on { background: linear-gradient(180deg, var(--accent-hi), var(--accent)); color: var(--on-accent); border-color: transparent; }

.total-box { display: flex; justify-content: space-between; align-items: flex-end; background: var(--surface2); border: 1px solid var(--line); border-radius: 20px; padding: 16px; gap: 12px; }
.total-box .l { display: flex; flex-direction: column; gap: 2px; }
.total-box .r { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.big-num { font-family: var(--title); font-weight: 600; font-size: 26px; color: var(--accent-text); letter-spacing: -.02em; line-height: 1.1; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 15px; }
.kv span:last-child { white-space: nowrap; text-align: right; }
.kv.b { font-weight: 800; font-size: 17px; border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- Clientes ---------- */
.cli { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--card-line); border-radius: 24px; padding: 14px 16px; box-shadow: var(--shadow-1); }
.avatar { width: 46px; height: 46px; border-radius: 16px; background: linear-gradient(160deg, rgba(var(--glow), .22), rgba(var(--glow), .07)); border: 1px solid rgba(var(--glow), .22); color: var(--accent-text); display: flex; align-items: center; justify-content: center; font-family: var(--title); font-weight: 600; font-size: 15px; flex-shrink: 0; }
.cli .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }

/* ---------- Materiais ---------- */
.mat { display: flex; flex-direction: column; gap: 8px; padding: 13px 0; border-top: 1px solid var(--line); }
.mat .r1 { display: flex; gap: 8px; }
.mat .r1 .inp { min-width: 0; flex: 1; }
.mat .r2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mat .r2 .money { min-width: 0; }
.mat input { min-height: 46px; font-size: 15px; }
.mat .q { width: 72px; flex: none; text-align: center; padding: 0 8px; }
.mat .sub { flex-basis: 100%; text-align: right; font-weight: 800; font-size: 15px; }
.mini-x { width: 46px; height: 46px; flex: none; border-radius: 16px; border: 1px solid var(--line); background: var(--surface2); display: flex; align-items: center; justify-content: center; }

/* ---------- Preço ---------- */
.tier { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; background: var(--surface2); border: 1.5px solid var(--line); width: 100%; text-align: left; min-height: 66px; }
.tier.on { border-color: var(--accent); background: rgba(var(--glow), .10); }
.tier .n { font-weight: 800; font-size: 16px; }
.tier .d { color: var(--muted); font-size: 12px; font-weight: 500; }
.tier .v { font-family: var(--title); font-weight: 600; font-size: 21px; letter-spacing: -.02em; }
.tier.on .v { color: var(--accent-text); }

/* ---------- Fotos e assinatura ---------- */
.fotos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.foto { position: relative; aspect-ratio: 1; border-radius: 18px; background: var(--surface2); overflow: hidden; }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto button { position: absolute; top: 5px; right: 5px; width: 32px; height: 32px; border-radius: 16px; border: 0; background: rgba(20, 19, 18, .72); display: flex; align-items: center; justify-content: center; }
.foto-add { aspect-ratio: 1; border-radius: 18px; border: 1.5px dashed var(--line); background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 700; }
.sig { background: #fff; border-radius: 18px; touch-action: none; width: 100%; height: 150px; display: block; }

/* ---------- Ferramentas ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface2); font-weight: 700; font-size: 14px; }
.chip.on { border-color: var(--accent); background: rgba(var(--glow), .12); color: var(--accent-text); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 700; font-size: 12px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl .n { text-align: right; white-space: nowrap; }
.tbl tr.atual td { background: rgba(var(--glow), .09); }
.tbl tr.atual td:first-child { border-left: 3px solid var(--accent); padding-left: 8px; }

/* ---------- Proposta em PDF ---------- */
.previa { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.previa a { position: relative; flex: none; width: 112px; scroll-snap-align: start; }
.previa img { width: 100%; display: block; border-radius: 10px; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .6); background: #fff; }
.previa span:not(.hint) { position: absolute; left: 6px; bottom: 6px; background: rgba(20, 19, 18, .75); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.paginas { display: flex; flex-direction: column; gap: 16px; }
.pg { margin: 0; } .pg img { width: 100%; display: block; border-radius: 12px; background: #fff; box-shadow: var(--shadow-1); }
.pg figcaption { text-align: center; color: var(--muted); font-size: 12px; margin-top: 6px; }
.field .rot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cor { width: 44px; height: 44px; border-radius: 50%; border: 3px solid transparent; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25), 0 6px 14px -8px rgba(0, 0, 0, .6); }
.cor.on { border-color: var(--text); }
.capa-foto { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface2); aspect-ratio: 4/3; }
.capa-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.capa-foto span { position: absolute; left: 8px; bottom: 8px; background: rgba(20, 19, 18, .75); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }

/* ---------- Modelos de proposta e galeria ---------- */
.modelos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.modelo { background: var(--surface); border: 1.5px solid var(--card-line); border-radius: 22px; padding: 10px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-1); }
.modelo.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--glow), .18), var(--shadow-1); }
.mod-img { padding: 0; border: 0; background: var(--surface2); border-radius: 14px; overflow: hidden; aspect-ratio: 595 / 842; display: flex; align-items: center; justify-content: center; }
.mod-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mod-img .sk { color: var(--muted); font-size: 12px; }
.mod-t { display: flex; flex-direction: column; gap: 2px; }
.mod-t b { font-size: 14px; font-weight: 800; } .mod-t small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.mod-a { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.mod-a .pill { min-height: 34px; display: inline-flex; align-items: center; padding: 0 10px; font-size: 11.5px; }
.modelo.on .mod-a .pill:first-child { background: linear-gradient(180deg, var(--accent-hi), var(--accent)); color: var(--on-accent); }
.sheet { position: absolute; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet-c { width: 100%; max-height: 88%; overflow-y: auto; background: var(--bg); border-top: 1px solid var(--glass-line); border-radius: 28px 28px 0 0; padding: 18px 18px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; animation: subir .3s ease both; }
.sheet-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.galeria { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.galeria button { padding: 0; border: 0; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface2); }
.galeria img { width: 100%; height: 100%; object-fit: cover; display: block; }
.srv-n { flex: 1; font-weight: 700; font-size: 14px; line-height: 1.35; align-self: center; }

/* ---------- Orçamento com visual futurista (Serviço, Preço, Capa e envio) ---------- */
.app[data-aba="orcamento"] {
  --amb1: radial-gradient(70% 40% at -8% 4%, rgba(var(--glow), calc(var(--ga) * 1.15)), transparent 70%);
  --amb2: radial-gradient(80% 45% at 108% 100%, rgba(var(--cool), calc(var(--ca) * 1.3)), transparent 70%);
}
.app[data-aba="orcamento"]::before {
  background: var(--amb1), var(--amb2),
    linear-gradient(rgba(var(--cool), .075) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(var(--cool), .075) 1px, transparent 1px) 0 0 / 34px 34px;
}
.app[data-aba="orcamento"] .mat {
  position: relative; border: 1px solid var(--card-line); border-radius: 22px; padding: 14px; margin-top: 10px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .02) 60%), var(--surface2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 26px -18px rgba(0, 0, 0, .8);
}
.app[data-aba="orcamento"] .mat::before { content: ''; position: absolute; left: 14px; right: 14px; top: 0; height: 1.5px; border-radius: 2px; background: linear-gradient(90deg, rgba(var(--glow), .8), rgba(var(--glow), 0)); }
.app[data-aba="orcamento"] .mat .sub { color: var(--accent-text); font-family: var(--title); font-size: 17px; letter-spacing: -.01em; }
.app[data-aba="orcamento"] .mat .inp, .app[data-aba="orcamento"] .mat .money { background: rgba(0, 0, 0, .18); }
.app[data-aba="orcamento"] .card { background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 45%), var(--surface); }
.app[data-aba="orcamento"] .tier { background: linear-gradient(150deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015)), var(--surface2); }
.app[data-aba="orcamento"] .total-box { background: linear-gradient(135deg, rgba(var(--glow), .14), rgba(255, 255, 255, .02)), var(--surface2); }
.app[data-aba="orcamento"] .kv.b span:last-child { font-family: var(--title); letter-spacing: -.01em; }

/* ---------- Dinheiro, rascunhos, Salvar, recorte da logo ---------- */
.nav a { position: relative; }
.marca { position: absolute; top: 2px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-style: normal; font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--bg); }
.app[data-aba="dinheiro"] {
  --amb1: radial-gradient(70% 45% at 104% 6%, rgba(var(--glow), calc(var(--ga) * .9)), transparent 70%);
  --amb2: radial-gradient(65% 42% at -6% 100%, rgba(var(--cool), calc(var(--ca) * 1.2)), transparent 70%);
}
.fin-card { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; align-items: end; padding: 16px 18px; border-radius: 26px; border: 1px solid var(--card-line); background: linear-gradient(145deg, rgba(var(--glow), .12), rgba(255, 255, 255, .02) 55%), var(--surface); box-shadow: var(--shadow-1); }
.fin-a { display: flex; flex-direction: column; gap: 2px; grid-column: 1 / -1; }
.main > * { flex-shrink: 0; }
.fin-v { font-family: var(--title); font-weight: 600; font-size: 24px; letter-spacing: -.02em; color: var(--accent-text); line-height: 1.1; }
.fin-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .fin-b b { font-size: 14px; font-weight: 800; }
.metricas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metrica { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--card-line); box-shadow: var(--shadow-1); }
.metrica b { font-family: var(--title); font-weight: 600; font-size: 19px; letter-spacing: -.02em; }
.metrica.dest { grid-column: 1 / -1; background: linear-gradient(145deg, rgba(var(--glow), .16), rgba(255, 255, 255, .02) 60%), var(--surface); }
.metrica.dest b { font-size: 30px; color: var(--accent-text); }
.prog { height: 7px; border-radius: 99px; background: var(--surface2); overflow: hidden; margin-top: 6px; }
.prog i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); }
.dica { font-size: 13px; line-height: 1.5; color: var(--muted); padding: 14px 16px; border-radius: 18px; border: 1px dashed rgba(var(--glow), .5); background: rgba(var(--glow), .07); }
.dica b { color: var(--accent-text); }
.link-card { flex-direction: row; align-items: center; gap: 12px; }
.link-card .grow { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.autosave { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; margin-top: -4px; }
.busca-st { font-size: 12.5px; line-height: 1.4; color: var(--muted); min-height: 0; margin: -4px 0 0; }
.busca-st:empty { display: none; }
.busca-st.ok { color: var(--green); } .busca-st.erro { color: var(--red); } .busca-st.aviso { color: var(--accent-text); }
.savebar { position: absolute; z-index: 40; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 22px; background: var(--glass); border: 1px solid rgba(var(--glow), .6); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .6); font-size: 13px; font-weight: 700; }
.savebar span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.savebar .btn { width: auto; min-height: 44px; padding: 0 20px; }
.app.has-nav .savebar { bottom: calc(96px + env(safe-area-inset-bottom)); }
.crop { max-width: 100%; height: auto; border-radius: 14px; touch-action: none; display: block; cursor: grab; }
.logo-prev.wide { width: 76px; height: 76px; border-radius: 20px; font-size: 12px; }
.logo-prev.wide img { object-fit: contain; }
.field input[type=range] { padding: 0; min-height: 34px; border: 0; background: transparent; accent-color: var(--accent); }

/* ---------- Estado vazio ---------- */
.empty { text-align: center; color: var(--muted); font-size: 14px; line-height: 1.55; padding: 24px 12px; display: flex; flex-direction: column; gap: 14px; align-items: center; }

/* ---------- Papel (proposta / relatório) ---------- */
.paper { background: #fff; color: #1a1a1a; border-radius: 16px; padding: 0; overflow: hidden; font-size: 14px; line-height: 1.5; box-shadow: var(--shadow-1); }
.paper .pad { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.paper h3 { font-family: var(--title); font-weight: 600; font-size: 20px; letter-spacing: -.015em; }
.paper table { width: 100%; border-collapse: collapse; font-size: 13px; }
.paper th { text-align: left; color: #666; font-weight: 600; padding: 6px 4px; border-bottom: 2px solid #ddd; }
.paper td { padding: 8px 4px; border-bottom: 1px solid #eee; vertical-align: top; }
.paper td.n, .paper th.n { text-align: right; white-space: nowrap; }
.paper .tot { display: flex; justify-content: space-between; font-weight: 700; font-size: 18px; padding-top: 6px; }
.paper .sigline { margin-top: 24px; border-top: 1px solid #999; padding-top: 6px; font-size: 12px; color: #666; }
.paper .fgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.paper .fgrid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; }
.paper .lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #777; }

.cover { padding: 28px 22px; display: flex; flex-direction: column; gap: 18px; min-height: 280px; justify-content: space-between; }
.cover .logo { display: flex; align-items: center; min-height: 44px; }
.cover .logo img { max-height: 52px; max-width: 180px; object-fit: contain; }
.cover .logo b { font-family: var(--title); font-weight: 600; font-size: 17px; letter-spacing: 1.2px; text-transform: uppercase; }
.cover .k { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; opacity: .8; }
.cover .h { font-family: var(--title); font-weight: 600; font-size: 30px; line-height: 1.08; letter-spacing: -.02em; margin: 8px 0 12px; overflow-wrap: anywhere; }
.cover .m { font-size: 14px; opacity: .85; }
.cover .f { display: flex; justify-content: space-between; font-size: 12px; opacity: .8; }
.cover.escuro { background: radial-gradient(90% 70% at 100% 0%, rgba(217, 112, 58, .28), transparent 70%), #100F0E; color: #F4EFE9; }
.cover.escuro .h { color: #E58A55; }
.cover.laranja { background: linear-gradient(140deg, #E58A55, #D26A36); color: #17110D; }
.cover.claro { background: #FFFFFF; color: #17110D; border-bottom: 6px solid #D9703A; }
.cover.azul { background: radial-gradient(90% 70% at 100% 0%, rgba(90, 150, 240, .30), transparent 70%), #12305E; color: #F3F6FB; }
.cover.azul .h { color: #9CC4FF; }

.opts { display: flex; gap: 10px; }
.opt { flex: 1; min-height: 58px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 8px; }
.opt.on { border-color: var(--accent); }
.opt i { width: 100%; height: 16px; border-radius: 8px; display: block; border: 1px solid rgba(128, 128, 128, .3); }

.tema { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; padding: 10px 14px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--surface2); text-align: left; margin-bottom: 10px; }
.tema:last-child { margin-bottom: 0; }
.tema.on { border-color: var(--accent); background: rgba(var(--glow), .10); }
.tema .sw { width: 64px; height: 44px; border-radius: 14px; border: 1px solid var(--line); display: flex; align-items: flex-end; gap: 4px; padding: 6px; flex-shrink: 0; }
.tema .sw i { display: block; height: 100%; flex: 1; border-radius: 6px; }
.tema .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tema b { font-size: 15px; font-weight: 800; }
.tema small { color: var(--muted); font-size: 12px; font-weight: 500; }

.logo-prev { width: 64px; height: 64px; border-radius: 20px; background: var(--surface2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; text-align: center; font-size: 11px; color: var(--muted); overflow: hidden; flex-shrink: 0; }
.logo-prev img { width: 100%; height: 100%; object-fit: contain; }

.toast { position: absolute; left: 50%; bottom: 112px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 13px 20px; border-radius: 99px; font-weight: 700; font-size: 14px; z-index: 50; max-width: 90%; text-align: center; box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .6); }

/* ---------- Impressão / PDF ---------- */
@media print {
  html, body { background: #fff; height: auto; display: block; }
  .app { height: auto; max-width: none; overflow: visible; border: 0; background: #fff; }
  .app::before, .app::after { display: none; }
  .top, .nav, .noprint, .toast { display: none !important; }
  .main { overflow: visible; padding: 0; }
  .main > * { animation: none; }
  .paper { border-radius: 0; box-shadow: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.sheet .chip { min-height: 36px; padding: 0 13px; font-size: 13px; }

/* ---------- Planos ---------- */
.planos-corpo { display: flex; flex-direction: column; gap: 14px; }
.planos-corpo > * { flex-shrink: 0; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; border-radius: 20px; background: var(--surface2); border: 1px solid var(--line); }
.seg button { min-height: 54px; border: 0; border-radius: 15px; background: transparent; color: var(--muted); font-weight: 700; font-size: 14.5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.seg button small { font-size: 11px; font-weight: 800; color: var(--accent-text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.plano { position: relative; width: 100%; text-align: left; color: var(--text); padding: 18px 18px 16px; border-radius: 26px; border: 1.5px solid var(--card-line); background: var(--surface); display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-1); }
.plano.on { border-color: var(--accent); background: linear-gradient(145deg, rgba(var(--glow), .14), rgba(255, 255, 255, .02) 60%), var(--surface); box-shadow: var(--shadow-1), 0 0 0 3px rgba(var(--glow), .2); }
.plano-t { display: flex; align-items: center; justify-content: space-between; font-family: var(--title); font-size: 19px; }
.radio { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: inline-block; position: relative; }
.radio.on { border-color: var(--accent); }
.radio.on::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); }
.plano-preco b { font-family: var(--title); font-weight: 600; font-size: 32px; letter-spacing: -.02em; }
.plano-preco s { color: var(--muted); font-size: 15px; }
.plano ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.plano li { display: grid; grid-template-columns: 16px 1fr; gap: 6px; line-height: 1.4; }
.plano li::before { content: '✓'; color: var(--accent-text); font-weight: 800; }
.plano li.tudo::before { content: none; }
.plano li.tudo span { grid-column: 1 / -1; }
.plano li.tudo { font-weight: 700; color: var(--muted); }
.plano li.breve { color: var(--muted); }
.plano li em { font-style: normal; font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--surface2); }
.selo-pop { position: absolute; top: -12px; right: 18px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 99px; box-shadow: 0 8px 18px -8px rgba(var(--glow), .8); }
.resumo-plano { gap: 4px; }
.resumo-plano .grande { font-family: var(--title); font-size: 18px; }
.total-plano { font-family: var(--title); font-weight: 600; font-size: 30px; letter-spacing: -.02em; color: var(--accent-text); }
.economia { font-size: 13px; font-weight: 700; color: var(--green); }
.bonus { padding: 16px 18px; border-radius: 22px; border: 1px solid rgba(var(--glow), .55); background: linear-gradient(145deg, rgba(var(--glow), .16), rgba(255, 255, 255, .02) 70%); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.bonus p { margin: 0; }
.bonus b:first-child { color: var(--accent-text); }
.bonus.leve { font-size: 13.5px; display: block; }

/* ---------- Barra de salvar com dois botões ---------- */
.savebar .sb-btns { display: flex; gap: 8px; flex-shrink: 0; }
.savebar .sb-btns .btn { padding: 0 16px; }

/* ---------- Aulas ---------- */
.card.destaque { border-color: rgba(var(--glow), .55); background: linear-gradient(145deg, rgba(var(--glow), .14), rgba(255, 255, 255, .02) 60%), var(--surface); }
.lista-pontos { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 14px; line-height: 1.4; }

/* ---------- Tipos de serviço, fotos com legenda, acessos ---------- */
.opcao-tipo { padding: 18px 16px; border-radius: 24px; background: var(--surface); border: 1px solid var(--card-line); box-shadow: var(--shadow-1); }
.foto { cursor: pointer; }
.foto .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: 10.5px; font-weight: 700; color: #fff; text-align: left; line-height: 1.2; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.foto-grande { width: 100%; max-height: 46vh; object-fit: contain; border-radius: 16px; background: var(--surface2); }
.acesso { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.acesso:first-child { border-top: 0; padding-top: 4px; }
.acesso .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; word-break: break-word; }
.acesso .s { font-size: 13.5px; color: var(--muted); }
.acesso .s b { color: var(--text); font-weight: 700; }
.ac-b { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.ac-b .pill { min-height: 34px; color: var(--accent-text); }

/* ---------- Editor de modelo ---------- */
.prev-modelo { position: relative; align-self: center; width: 46%; min-width: 150px; aspect-ratio: 210 / 297; border-radius: 14px; overflow: hidden; background: var(--surface2); box-shadow: var(--shadow-1); display: flex; align-items: center; justify-content: center; }
.prev-modelo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prev-modelo .sk { color: var(--muted); font-size: 12px; }

/* ---------- Contrato de manutenção ---------- */
.ck { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.4; padding: 6px 0; cursor: pointer; }
.ck input { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--accent); margin-top: 1px; }
.opcao-tipo.sel { border-color: var(--accent); box-shadow: var(--shadow-1), 0 0 0 3px rgba(var(--glow), .18); }
button.opcao-tipo { width: 100%; text-align: left; color: var(--text); }
.clausula .inp { margin-top: 8px; }
.clausula textarea.inp { resize: vertical; line-height: 1.5; font-size: 15px; }

/* ---------- Tipos de orçamento, catálogo e calculadoras ---------- */
.mat .gen { margin-top: 6px; min-height: 42px; font-size: 14px; }
.resultados { display: flex; flex-direction: column; gap: 2px; padding: 4px 12px; border-radius: 18px; background: var(--surface2); border: 1px solid var(--line); }
details.calc > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
details.calc > summary::-webkit-details-marker { display: none; }
details.calc[open] > summary svg { transform: rotate(90deg); }
details.calc > summary + * { margin-top: 12px; }
details.calc { gap: 12px; }
.grupo-h { font-family: var(--title); font-size: 14px; font-weight: 600; color: var(--accent-text); margin: 14px 0 -4px; letter-spacing: .01em; }
.grupo-h:first-child { margin-top: 0; }

/* ---------- Meu Negócio em menu ---------- */
.hub { display: flex; flex-direction: column; gap: 10px; }
.hub-btn { display: flex; align-items: center; gap: 14px; padding: 15px 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--card-line); box-shadow: var(--shadow-1); color: var(--text); }
.hub-btn .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hub-btn b { font-size: 16px; font-weight: 700; }
.hub-btn small { font-size: 12.5px; color: var(--muted); font-weight: 500; line-height: 1.3; }
.hub-ic { width: 44px; height: 44px; border-radius: 15px; background: rgba(var(--glow), .14); color: var(--accent-text); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hub-btn > svg:last-child { color: var(--muted); flex-shrink: 0; }
.hub-pdf { background: linear-gradient(135deg, #1d1713, #0d0b0a); border: 1.5px solid var(--accent); color: #F4EFE9; box-shadow: 0 16px 34px -18px rgba(var(--glow), .8); }
.hub-pdf small { color: #cfc6bd; }
.hub-pdf .hub-ic { background: var(--accent); color: var(--on-accent); }
.hub-pdf > svg:last-child { color: var(--accent-hi); }
.texto-legal h3 { font-family: var(--title); font-size: 15px; margin: 12px 0 4px; }
.texto-legal p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }

/* ---------- Cartão do plano ---------- */
.plano-cartao { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 16px; border-radius: 28px; color: var(--on-accent); background: linear-gradient(140deg, var(--accent-hi) 0%, var(--accent) 100%); box-shadow: 0 22px 44px -22px rgba(var(--glow), .85), inset 0 1px 0 rgba(255, 255, 255, .32); }
.plano-cartao::after { content: ''; position: absolute; right: -50px; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .3), transparent 65%); pointer-events: none; }
.plano-cartao > * { position: relative; z-index: 1; }
.pc-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pc-pill { background: rgba(23, 17, 13, .16); color: var(--on-accent); font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 99px; letter-spacing: .02em; }
.pc-dias { font-size: 13px; font-weight: 700; } .pc-dias b { font-family: var(--title); font-size: 24px; letter-spacing: -.02em; margin-right: 2px; }
.pc-ok { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; }
.pc-titulo { font-family: var(--title); font-weight: 600; font-size: 19px; line-height: 1.2; letter-spacing: -.015em; }
.pc-sub { font-size: 13.5px; font-weight: 600; opacity: .85; }
.pc-barra { height: 8px; border-radius: 99px; background: rgba(23, 17, 13, .2); overflow: hidden; }
.pc-barra i { display: block; height: 100%; border-radius: 99px; background: var(--on-accent); }
.pc-cta { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; border-radius: 18px; background: var(--on-accent); color: var(--accent-hi); font-weight: 800; font-size: 16px; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .6); }
.plano-cartao.ultimos { background: linear-gradient(140deg, #f4a45b 0%, #d9703a 55%, #c4552a 100%); }
.plano-cartao.expirado { background: linear-gradient(140deg, #6b625b, #3d3733); color: #F4EFE9; box-shadow: var(--shadow-1); }
.plano-cartao.expirado .pc-pill { background: rgba(255, 255, 255, .14); color: #F4EFE9; }
.plano-cartao.expirado .pc-cta { background: var(--accent); color: var(--on-accent); }
.plano-cartao.assinante { background: var(--surface); color: var(--text); border: 1px solid var(--card-line); box-shadow: var(--shadow-1); }
.plano-cartao.assinante::after { display: none; }
.plano-cartao.assinante .pc-pill { background: var(--surface2); color: var(--text); }
.plano-cartao.assinante .pc-ok { color: var(--green); }
.lembrete-plano { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-radius: 16px; border: 1px dashed rgba(var(--glow), .6); background: rgba(var(--glow), .09); font-size: 13.5px; font-weight: 600; color: var(--text); }
.lembrete-plano span { display: flex; align-items: center; gap: 8px; }
.lembrete-plano b { color: var(--accent-text); font-weight: 800; flex-shrink: 0; }

/* ---------- Boas-vindas ---------- */
.boas-vindas { min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; padding: calc(28px + env(safe-area-inset-top)) 24px calc(28px + env(safe-area-inset-bottom)); }
.bv-marca { font-family: var(--title); font-weight: 600; font-size: 17px; letter-spacing: .01em; color: var(--accent-text); }
.bv-meio { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.bv-ic { width: 104px; height: 104px; border-radius: 34px; background: linear-gradient(140deg, var(--accent-hi), var(--accent)); display: flex; align-items: center; justify-content: center; box-shadow: 0 26px 50px -24px rgba(var(--glow), .9), inset 0 1px 0 rgba(255, 255, 255, .35); }
.bv-meio h1 { font-family: var(--title); font-weight: 600; font-size: 27px; line-height: 1.15; letter-spacing: -.02em; }
.bv-meio p { font-size: 15.5px; line-height: 1.55; color: var(--muted); max-width: 340px; }
.bv-pontos { display: flex; gap: 8px; margin-top: 6px; }
.bv-pontos i { width: 8px; height: 8px; border-radius: 99px; background: var(--line); }
.bv-pontos i.on { width: 26px; background: var(--accent); }
.bv-base { display: flex; flex-direction: column; gap: 10px; }
.resultados { max-height: 320px; overflow-y: auto; }

/* ---------- Ferramentas de campo ---------- */
.calc-corpo { display: flex; flex-direction: column; gap: 12px; }
.desenho-caixa { border-radius: 18px; background: var(--surface2); border: 1px solid var(--line); padding: 8px 8px 4px; }
.desenho-portao { width: 100%; height: auto; display: block; }
details.discreto { margin: 2px 4px; font-size: 13px; color: var(--muted); }
details.discreto summary { cursor: pointer; padding: 6px 0; }
.blk .tog { flex-shrink: 0; }
.blk .tog svg { transition: transform .2s ease; transform: rotate(90deg); }
.blk.fechado .tog svg { transform: rotate(0deg); }
.bloco-res { padding-left: 46px; margin-top: -4px; }

/* ---------- Agenda ---------- */
.ag-seg a { min-height: 44px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14.5px; color: var(--muted); }
.ag-seg a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.ag-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px; }
.ag-nav a { width: 44px; height: 44px; border-radius: 22px; background: var(--surface2); display: flex; align-items: center; justify-content: center; color: var(--text); }
.ag-nav b { font-family: var(--title); font-weight: 600; font-size: 16px; text-align: center; text-transform: capitalize; }
.ag-lista { display: flex; flex-direction: column; gap: 8px; }
.ag-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--card-line); color: var(--text); box-shadow: var(--shadow-1); }
.ag-item.feito { opacity: .6; }
.ag-hora { font-family: var(--title); font-weight: 600; font-size: 16px; color: var(--accent-text); min-width: 54px; }
.ag-item .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ag-item b { font-size: 15.5px; font-weight: 700; }
.ag-item small { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.ag-dia { display: flex; flex-direction: column; gap: 8px; }
.ag-dia-h { display: flex; align-items: baseline; justify-content: space-between; padding: 6px 4px 0; color: var(--text); }
.ag-dia-h b { text-transform: capitalize; }
.ag-dia.hoje .ag-dia-h b { color: var(--accent-text); }
.ag-sem-dia { display: flex; flex-direction: column; gap: 4px; }
.ag-cli { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.ag-cli:first-child { border-top: 0; }
.ag-cli .hora-cli { width: 108px; min-height: 42px; flex-shrink: 0; padding: 0 10px; }
.ag-cli.on { background: rgba(var(--glow), .06); }

/* ---------- Modelos da proposta: escolha por tipo ---------- */
.tipos-mod { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tipo-mod { position: relative; aspect-ratio: 1 / 1.08; border-radius: 24px; overflow: hidden; background-size: cover; background-position: center; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; color: #fff; text-decoration: none; box-shadow: var(--shadow-1); border: 1.5px solid var(--card-line); }
.tipo-mod::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 25%, rgba(10,8,7,.86) 100%); }
.tipo-mod > * { position: relative; }
.tm-nome { display: flex; flex-direction: column; gap: 2px; } .tm-nome b { font-size: 16px; font-weight: 800; line-height: 1.15; } .tm-nome small { font-size: 11.5px; opacity: .85; line-height: 1.3; }
.tm-tag { position: absolute; top: 10px; left: 10px; background: rgba(15,12,10,.6); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 700; }
.tm-uso { align-self: flex-start; margin-bottom: 6px; max-width: 100%; background: linear-gradient(180deg, var(--accent-hi), var(--accent)); color: var(--on-accent); border-radius: 999px; padding: 4px 10px; font-size: 10.5px; font-weight: 800; }

/* =====================================================================
   Cadastro e entrada: uma pergunta por tela, barra de progresso, campos grandes
   ===================================================================== */
.cad { position: relative; z-index: 1; min-height: 100%; height: 100%; display: flex; flex-direction: column; padding: calc(18px + env(safe-area-inset-top)) 22px calc(22px + env(safe-area-inset-bottom)); overflow-y: auto; }
.cad-topo { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px; }
.cad-voltar { padding: 0; cursor: pointer; width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text); background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.cad-voltar.fantasma { visibility: hidden; }
.cad-barra { flex: 1; max-width: 140px; height: 5px; border-radius: 99px; background: var(--surface2); overflow: hidden; }
.cad-barra i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); transition: width .45s cubic-bezier(.2, .7, .2, 1); }
.cad-passo { padding-top: 34px; display: flex; flex-direction: column; gap: 10px; animation: cadEntra .38s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes cadEntra { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.cad-h1 { font-family: var(--title); font-weight: 600; font-size: 29px; line-height: 1.16; letter-spacing: -.02em; }
.cad-sub { font-size: 15.5px; line-height: 1.5; color: var(--muted); }
.cad-sub b { color: var(--text); font-weight: 700; }
.centro { text-align: center; }
.cad-form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.cad-campo { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 20px; border-radius: 999px; background: var(--surface2); border: 1.5px solid var(--line); color: var(--muted); transition: border-color .2s ease, box-shadow .2s ease; }
.cad-campo:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--glow), .14); color: var(--text); }
.cad-campo input { flex: 1; min-width: 0; height: 56px; border: 0; outline: none; background: transparent; color: var(--text); font: 500 17px var(--body); }
.cad-campo input::placeholder { color: var(--muted); opacity: .8; }
.cad-ddi { font-weight: 700; color: var(--text); white-space: nowrap; padding-right: 12px; border-right: 1px solid var(--line); }
.cad-olho { background: transparent; border: 0; padding: 0; cursor: pointer; width: 44px; height: 44px; margin-right: -10px; display: flex; align-items: center; justify-content: center; color: var(--muted); border-radius: 50%; }
.cad-olho.on { color: var(--accent-text); }
.cad-link { color: var(--accent-text); font-weight: 700; background: none; border: 0; padding: 6px 0; font-size: 15px; cursor: pointer; }
.cad-link.direita { align-self: flex-end; margin-top: -4px; }
.cad-mudo { color: var(--muted); font-size: 14px; line-height: 1.5; }
.cad-linha { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cad-st { font-size: 14px; color: var(--muted); min-height: 20px; padding: 0 6px; }
.cad-st.ok { color: var(--green); } .cad-st.erro { color: var(--red); } .cad-st.aviso { color: var(--accent-text); }
.cad-demo { font-size: 13px; line-height: 1.45; color: var(--muted); background: var(--surface2); border: 1px dashed var(--line); border-radius: 14px; padding: 10px 14px; }
.cad-base { margin-top: auto; padding-top: 26px; display: flex; flex-direction: column; gap: 6px; }
.cad-btn { min-height: 58px; border-radius: 999px; font-size: 17px; width: 100%; }
.cad-btn[disabled] { opacity: .38; filter: saturate(.6); box-shadow: none; }
.cad-pular { background: none; border: 0; color: var(--muted); font-weight: 600; font-size: 15px; min-height: 44px; cursor: pointer; }
/* Código de 6 números: um campo real (aceita o preenchimento automático do iPhone) por cima de 6 caixas */
.cad-codigo { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.cad-codigo input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; color: transparent; caret-color: transparent; z-index: 2; }
.cad-codigo span { height: 64px; border-radius: 16px; background: var(--surface2); border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; font: 600 26px var(--title); color: var(--text); transition: border-color .15s ease; }
.cad-codigo span.on { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--glow), .14); }
.cad-codigo span.cheia { border-color: rgba(var(--glow), .5); }
/* Força da senha */
.cad-forca { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 8px; }
.cad-forca i { height: 4px; border-radius: 99px; background: var(--surface2); transition: background .25s ease; }
.cad-forca i.n1 { background: var(--red); } .cad-forca i.n2 { background: var(--accent); } .cad-forca i.n3 { background: var(--green); }
.cad-forca + .cad-mudo { padding: 0 8px; }
.cad-aceite { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: var(--muted); padding: 6px 4px 0; }
.cad-aceite input { width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px; accent-color: var(--accent); }
.cad-aceite a { color: var(--accent-text); font-weight: 700; }
/* Logo da empresa */
.cad-logo { padding: 0; cursor: pointer; position: relative; align-self: center; width: 132px; height: 132px; border-radius: 34px; background: var(--surface2); border: 1.5px dashed var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); margin-bottom: 6px; }
.cad-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 32px; }
.cad-logo-mais { position: absolute; right: -6px; bottom: -6px; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(180deg, var(--accent-hi), var(--accent)); border: 3px solid var(--bg); display: flex; align-items: center; justify-content: center; }
/* Entrar e boas-vindas finais */
.cad-entrar, .cad-fim { justify-content: space-between; }
.cad-meio { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 20px 0; }
.cad-marca { display: flex; align-items: center; justify-content: center; gap: 12px; font: 600 22px var(--title); letter-spacing: -.01em; margin-bottom: 26px; }
.cad-marca-ic { width: 52px; height: 52px; border-radius: 17px; background: linear-gradient(140deg, var(--accent-hi), var(--accent)); display: flex; align-items: center; justify-content: center; box-shadow: 0 16px 32px -16px rgba(var(--glow), .9), inset 0 1px 0 rgba(255, 255, 255, .35); }
.cad-entrar .cad-form { margin-top: 24px; }
.cad-rodape { text-align: center; color: var(--muted); font-size: 15px; padding-top: 18px; }
.cad-entrar .cad-demo { margin-top: 10px; text-align: center; }
.cad-avatar { position: relative; align-self: center; width: 112px; height: 112px; border-radius: 34px; background: linear-gradient(140deg, var(--accent-hi), var(--accent)); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font: 600 38px var(--title); margin-bottom: 18px; box-shadow: 0 26px 50px -24px rgba(var(--glow), .9); animation: cadPop .55s cubic-bezier(.2, 1.4, .4, 1) both; }
.cad-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 34px; }
.cad-ok { position: absolute; right: -8px; bottom: -8px; width: 38px; height: 38px; border-radius: 50%; background: var(--green); border: 3px solid var(--bg); display: flex; align-items: center; justify-content: center; }
@keyframes cadPop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cad-passo, .cad-avatar { animation: none; } }
