:root {
  --bg: #FAF8F5; --surface: #FFFFFF; --ink: #161514; --muted: #6E6A64; --line: #E7E1D8;
  --orange: #F26A1B; --gold: #E8601A; --gold-2: #F58A3C; --dark: #111111; --ok: #2F7A4F; --warn: #B7791F; --bad: #B23B3B;
  --radius: 18px; --tap: 56px;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; }
body { overscroll-behavior: none; user-select: none; -webkit-user-select: none; }
input, textarea, select { user-select: text; -webkit-user-select: text; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: .2px; margin: 0 0 .4em; }
h1 { font-size: 2rem; } h2 { font-size: 1.6rem; } h3 { font-size: 1.2rem; }
p { line-height: 1.5; margin: 0 0 .8em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.gold-t { color: var(--gold); }

/* layout */
#app { min-height: 100%; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: var(--dark); color: #fff; position: sticky; top: 0; z-index: 10; }
.topbar .brand { font-family: var(--serif); font-size: 1.25rem; color: #fff; }
.topbar .brand b { color: var(--orange); font-weight: 600; }
.topbar .sp { flex: 1; }
.topbar .who { font-size: .9rem; opacity: .85; }
.topbar button { background: transparent; color: #fff; border: 1px solid #444; border-radius: 12px; padding: 8px 14px; font-size: .9rem; }
.sync { font-size: .8rem; padding: 4px 10px; border-radius: 99px; background: #222; color: #ddd; white-space: nowrap; }
.sync.ok { color: #9FD8B4; } .sync.wait { color: #F2C879; } .sync.err { color: #F29B9B; }
main { flex: 1; padding: 24px; max-width: 1100px; width: 100%; margin: 0 auto; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .row.end { justify-content: flex-end; } .row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .grid2, .grid3 { grid-template-columns: 1fr; } main { padding: 16px; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 16px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.spacer { height: 16px; }

/* botões */
.btn { min-height: var(--tap); padding: 0 26px; border-radius: 14px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-size: 1.05rem; font-weight: 600; font-family: var(--sans); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .08s; }
.btn:active { transform: scale(.98); }
.btn.gold { background: var(--gold); border-color: var(--gold); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.big { min-height: 72px; font-size: 1.2rem; padding: 0 34px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .35; pointer-events: none; }
.linkbtn { background: none; border: none; color: var(--gold); font-weight: 600; font-size: 1rem; padding: 8px; cursor: pointer; }

/* formulários */
label.f { display: block; font-size: .9rem; color: var(--muted); margin: 14px 0 6px; }
input.in, textarea.in, select.in { width: 100%; min-height: var(--tap); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; font-size: 1.1rem; background: #fff; color: var(--ink); font-family: var(--sans); }
textarea.in { min-height: 90px; }
input.in:focus, textarea.in:focus { outline: 2px solid var(--gold-2); border-color: transparent; }
.check { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; margin: 10px 0; cursor: pointer; }
.check input { width: 28px; height: 28px; accent-color: var(--gold); flex: none; margin-top: 2px; }
.check.disabled { opacity: .45; pointer-events: none; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { min-height: 52px; padding: 0 20px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 1rem; color: var(--ink); cursor: pointer; font-family: var(--sans); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* lista de clientes */
.search { font-size: 1.3rem !important; min-height: 68px !important; }
.list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; cursor: pointer; }
.item:active { background: #F3EFE8; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: #EEE7DC center/cover; flex: none; display: grid; place-items: center; font-family: var(--serif); color: var(--gold); font-size: 1.3rem; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.item .t { font-weight: 600; } .item .s { color: var(--muted); font-size: .9rem; }
.badge { display: inline-block; font-size: .78rem; padding: 3px 10px; border-radius: 99px; background: #F1EADF; color: #6b5532; margin: 2px 4px 2px 0; }
.badge.red { background: #F6E1E1; color: var(--bad); } .badge.green { background: #E2F1E7; color: var(--ok); }

/* login */
.login { min-height: 100vh; background: var(--dark); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }
.login h1 { font-size: 2.6rem; } .login h1 b { color: var(--orange); font-weight: 600; }
.barbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; width: 100%; max-width: 820px; margin: 24px 0; }
.barber { background: #1C1B1A; border: 1px solid #2c2a28; border-radius: 18px; padding: 18px 10px; text-align: center; cursor: pointer; color: #fff; }
.barber .avatar { margin: 0 auto 10px; width: 72px; height: 72px; background: #2a2622; }
.pinbox { display: flex; gap: 12px; justify-content: center; margin: 18px 0; }
.pinbox span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--gold-2); }
.pinbox span.f { background: var(--gold-2); }
.pad { display: grid; grid-template-columns: repeat(3, 88px); gap: 14px; justify-content: center; }
.pad button { height: 88px; border-radius: 50%; border: 1px solid #333; background: #1C1B1A; color: #fff; font-size: 1.8rem; font-family: var(--sans); }
.pad button:active { background: #333; }
.unitsel { display: flex; gap: 10px; margin-top: 8px; }
.unitsel button { min-height: 48px; padding: 0 22px; border-radius: 99px; border: 1px solid #444; background: transparent; color: #ccc; font-size: 1rem; }
.unitsel button.on { background: var(--gold); border-color: var(--gold); color: #fff; }

/* cards de introdução */
.slides { position: relative; overflow: hidden; border-radius: 22px; background: var(--dark); color: #fff; min-height: 340px; }
.slide { padding: 48px 44px; display: none; } .slide.on { display: block; animation: fade .4s; }
.slide h2 { font-size: 2.1rem; color: #fff; } .slide p { font-size: 1.25rem; color: #ddd; max-width: 640px; }
.slide .n { color: var(--gold-2); font-family: var(--serif); font-size: 1.1rem; margin-bottom: 12px; }
.dots { display: flex; gap: 8px; justify-content: center; margin: 14px 0; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: #ccc; } .dots i.on { background: var(--gold); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.q { margin: 22px 0; } .q h3 { margin-bottom: 12px; }
.offer { background: #fff; border: 1px solid var(--gold-2); border-radius: 18px; padding: 20px; }

/* câmera */
.cam { position: fixed; inset: 0; background: #000; z-index: 50; display: flex; flex-direction: column; }
.cam video, .cam canvas.ov, .cam img.ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cam img.ghost { opacity: .35; pointer-events: none; }
.cam .guide { position: absolute; left: 50%; top: 46%; width: 46vmin; height: 62vmin; transform: translate(-50%, -50%); border: 3px dashed rgba(255,255,255,.45); border-radius: 50%; pointer-events: none; }
.cam .bar { position: absolute; left: 0; right: 0; padding: 16px 20px; display: flex; align-items: center; gap: 12px; color: #fff; background: linear-gradient(rgba(0,0,0,.65), transparent); }
.cam .bar.top { top: 0; } .cam .bar.bottom { bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.75)); justify-content: center; padding-bottom: 28px; }
.cam .angle { font-family: var(--serif); font-size: 1.4rem; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks span { font-size: .9rem; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.12); }
.checks span.ok { background: rgba(47,122,79,.85); }
.shutter { width: 86px; height: 86px; border-radius: 50%; border: 6px solid #fff; background: var(--gold); }
.shutter[disabled] { opacity: .3; }
.cam .side { position: absolute; bottom: 40px; }
.cam .side.l { left: 24px; } .cam .side.r { right: 24px; }
.cam .side button { min-height: 52px; padding: 0 18px; border-radius: 14px; border: 1px solid #555; background: rgba(0,0,0,.5); color: #fff; font-size: 1rem; }

/* análise */
.stage { position: relative; background: #000; border-radius: 18px; overflow: hidden; touch-action: none; }
.stage canvas { width: 100%; display: block; }
.shape-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.shape-btns button { min-height: 52px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-size: 1rem; }
.shape-btns button.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.shape-btns button .sug { font-size: .7rem; display: block; opacity: .8; }
.result { font-family: var(--serif); font-size: 2.2rem; }
.conf { font-size: .9rem; }

/* propostas */
.prop { border: 2px solid var(--line); border-radius: 18px; padding: 18px; background: #fff; cursor: pointer; }
.prop.on { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(232,96,26,.14); }
.prop .lbl { font-size: .8rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--gold); margin-top: 10px; }
.prop .evitar { background: #F6EFE4; border-radius: 10px; padding: 8px 12px; font-size: .9rem; margin-top: 10px; }

/* antes/depois */
.ba { position: relative; border-radius: 18px; overflow: hidden; background: #000; touch-action: none; }
.ba img { width: 100%; display: block; }
.ba .after { position: absolute; inset: 0; overflow: hidden; }
.ba .after img { position: absolute; inset: 0; height: 100%; width: auto; max-width: none; }
.ba .handle { position: absolute; top: 0; bottom: 0; width: 4px; background: #fff; }
.ba .tag { position: absolute; top: 12px; padding: 4px 12px; background: rgba(0,0,0,.6); color: #fff; border-radius: 99px; font-size: .85rem; }
.side-by-side { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side-by-side figure { margin: 0; } .side-by-side img { width: 100%; border-radius: 14px; display: block; background: #eee; }
.side-by-side figcaption { text-align: center; font-size: .9rem; color: var(--muted); margin-top: 6px; }

/* timeline */
.tl { position: relative; padding-left: 28px; }
.tl::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl .ev { position: relative; margin-bottom: 8px; }
.tl .ev::before { content: ''; position: absolute; left: -24px; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); border: 3px solid var(--bg); }
.tl .gap { color: var(--muted); font-size: .85rem; margin: 6px 0 12px; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; }
.thumbs img { width: 76px; height: 96px; object-fit: cover; border-radius: 10px; background: #eee; }
.stats { display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); }
.stats b { color: var(--ink); font-size: 1.2rem; display: block; }

/* feedback */
.faces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.faces button { min-height: 150px; border-radius: 22px; border: 1px solid var(--line); background: #fff; font-size: 1.2rem; font-family: var(--sans); }
.faces button span { display: block; font-size: 3.4rem; margin-bottom: 6px; }
.faces button:active { background: #F3EFE8; }

/* QR */
.qr { background: #fff; padding: 22px; border-radius: 22px; display: inline-block; }
.qr img, .qr canvas, .qr svg { width: min(60vmin, 380px); height: auto; display: block; }

/* assinatura */
.sig { width: 100%; height: 200px; border: 2px dashed var(--line); border-radius: 14px; background: #fff; touch-action: none; display: block; }

/* modal / toast */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal-box { background: var(--bg); border-radius: 22px; padding: 24px; width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.modal-box.wide { width: min(1000px, 100%); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); opacity: 0; background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 14px; z-index: 200; transition: .25s; max-width: 90vw; }
.toast.show { transform: translate(-50%, 0); opacity: 1; } .toast.err { background: var(--bad); } .toast.ok { background: var(--ok); }

.legal { font-size: .92rem; line-height: 1.5; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; max-height: 260px; overflow: auto; user-select: text; }
.legal h4 { margin: 10px 0 4px; font-size: .95rem; }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th, table.t td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { min-height: 46px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: .95rem; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.demo { background: #F2C879; color: #3b2a00; text-align: center; font-size: .85rem; padding: 6px; }
.cam .bar.bottom { pointer-events: none; } .cam .bar.bottom .shutter { pointer-events: auto; }
.cam .side { z-index: 3; }
@media (max-width: 560px) { .topbar { padding: 10px 12px; gap: 8px; } .topbar .who { display: none; } .topbar button { padding: 6px 10px; } h1 { font-size: 1.6rem; } }
/* antes e depois */
.ba2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bafig { margin: 0; position: relative; background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 3 / 4; }
.bafig img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bafig figcaption { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: .8rem; letter-spacing: 1.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px; }
.baempty { color: #888; display: grid; place-items: center; height: 100%; }
.baslide { position: relative; aspect-ratio: 3 / 4; max-height: 75vh; margin: 0 auto; background: #000; border-radius: 16px; overflow: hidden; touch-action: none; }
.baslide > img, .baslide-top img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.baslide-top { position: absolute; inset: 0; }
.baslide-handle { position: absolute; top: 0; bottom: 0; width: 3px; background: #fff; transform: translateX(-50%); }
.baslide-handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: #fff; color: #111; border-radius: 99px; padding: 6px 10px; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.baslide .tag { position: absolute; top: 10px; padding: 4px 12px; background: rgba(0,0,0,.6); color: #fff; border-radius: 99px; font-size: .8rem; }
.bafull { position: fixed; inset: 0; background: #000; z-index: 120; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
.bafull .ba2.big { width: min(100%, calc((100vh - 140px) * 1.5)); }
.bafull-date { color: #F58A3C; font-family: var(--serif); margin-top: 14px; font-size: 1.1rem; }
.bafull-x { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; color: #fff; border-color: #555; }
.bafull .btn.bafull-x { color: #fff; border-color: #666; background: rgba(255,255,255,.08); }
/* editor de desenho */
.sk { position: fixed; inset: 0; z-index: 130; background: #0d0d0d; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.sk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; }
.sk-title { color: #fff; font-family: var(--serif); font-size: 1.1rem; }
.sk-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 6px; }
.sk-canvas { max-width: 100%; max-height: 100%; touch-action: none; border-radius: 10px; background: #000; }
.sk-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 10px 12px 14px; }
.sk-group { display: flex; gap: 6px; align-items: center; background: #1c1b1a; border-radius: 14px; padding: 5px; }
.sk-btn { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid #333; background: #1c1b1a; color: #eee; font-size: .95rem; font-family: var(--sans); display: inline-flex; align-items: center; gap: 6px; }
.sk-btn.on { background: #fff; color: #111; border-color: #fff; }
.sk-btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; font-weight: 600; }
.sk-btn[disabled] { opacity: .35; }
.sk-color { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #444; }
.sk-color.on { border: 3px solid #fff; box-shadow: 0 0 0 2px #F58A3C; }
.sk-dot { display: inline-block; border-radius: 50%; background: currentColor; }
.annot { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.annot img { width: 84px; height: 112px; object-fit: cover; border-radius: 10px; background: #eee; }
/* orientação: avaliação × consultoria e passo a passo */
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.cmp-col { border: 1px solid #444; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 8px; color: #bbb; font-size: 1.05rem; }
.cmp-col b { font-family: var(--serif); font-size: 1.3rem; color: #fff; }
.cmp-col.on { border-color: var(--gold-2); background: rgba(245,138,60,.10); color: #eee; }
.cmp-col.on b { color: var(--gold-2); }
.howto { margin: 8px 0 0; padding-left: 1.4em; font-size: 1.2rem; color: #ddd; display: grid; gap: 12px; max-width: 680px; }
.howto b { color: #fff; }
.dots i { cursor: pointer; }
@media (max-width: 640px) { .cmp { grid-template-columns: 1fr; } .slide { padding: 32px 22px; } .slide h2 { font-size: 1.6rem; } }

/* "290" da marca em laranja */
.hero h1 b, h1.serif b { color: var(--orange) !important; }
