/* Busca Foto: estilo único para as três áreas (público, fotógrafo, admin) */
:root {
  --brand: #E8492B; --brand-2: #FF8A3D; --brand-ink: #fff; --brand-soft: #FDE9E3;
  --ink: #171A22; --ink-2: #3B4150; --muted: #6E7483; --line: #E8E6E1; --line-2: #D9D6CF;
  --bg: #F5F4F0; --surface: #FFFFFF; --surface-2: #FAF9F6;
  --ok: #12925A; --ok-soft: #E3F5EC; --warn: #B7791F; --warn-soft: #FDF3DC; --danger: #D0342C; --danger-soft: #FCE7E6; --info: #2563EB; --info-soft: #E6EEFD;
  --r: 16px; --r-sm: 10px; --shadow: 0 1px 2px rgba(20,22,30,.06), 0 6px 24px rgba(20,22,30,.07); --shadow-lg: 0 18px 60px rgba(20,22,30,.22);
  --side: 76px; --side-open: 252px; --top: 60px; --bottom: 68px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-soft: #3A1E17; --ink: #F2F1EE; --ink-2: #D2D0CB; --muted: #9A9FAB; --line: #2A2E38; --line-2: #383D49;
    --bg: #111318; --surface: #191C23; --surface-2: #1E222A; --ok-soft: #13301F; --warn-soft: #33290F; --danger-soft: #3A1714; --info-soft: #162447;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 24px rgba(0,0,0,.25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand-soft: #3A1E17; --ink: #F2F1EE; --ink-2: #D2D0CB; --muted: #9A9FAB; --line: #2A2E38; --line-2: #383D49;
  --bg: #111318; --surface: #191C23; --surface-2: #1E222A; --ok-soft: #13301F; --warn-soft: #33290F; --danger-soft: #3A1714; --info-soft: #162447;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 24px rgba(0,0,0,.25); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 800; } h2 { font-size: 20px; font-weight: 800; } h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; } .center { text-align: center; } .nobr { white-space: nowrap; }
.hidden { display: none !important; }
svg.i { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 18px; height: 18px; }

/* ---------- casca do app ---------- */
.app { min-height: 100vh; min-height: 100dvh; }
.side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: var(--side); background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 12px; transition: width .22s ease, box-shadow .22s; overflow: hidden; }
.side.open { width: var(--side-open); box-shadow: var(--shadow-lg); }
.side .logo { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 4px; margin-bottom: 16px; font-weight: 800; font-size: 17px; color: var(--ink); white-space: nowrap; }
.side .logo .mark { width: 44px; height: 44px; flex: none; border-radius: 13px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center; color: #fff; }
.side nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side a.nav { display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 13px; border-radius: 12px; color: var(--ink-2); font-weight: 600; white-space: nowrap; position: relative; }
.side a.nav:hover { background: var(--surface-2); }
.side a.nav.on { background: var(--brand-soft); color: var(--brand); }
.side a.nav .lbl { opacity: 0; transition: opacity .15s; }
.side.open a.nav .lbl, .side.open .logo .lbl, .side.open .foot .lbl { opacity: 1; }
.side .logo .lbl, .side .foot .lbl { opacity: 0; transition: opacity .15s; }
.side .foot { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.side .badge { position: absolute; left: 30px; top: 7px; }
.main { margin-left: var(--side); min-height: 100vh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 10px; padding: 0 22px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; }
.top.scrolled { border-bottom-color: var(--line); }
.top .title { font-weight: 800; font-size: 18px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .back { margin-left: -8px; }
.content { width: 100%; max-width: 1180px; margin: 0 auto; padding: 18px 22px 40px; flex: 1; }
.content.narrow { max-width: 760px; }
.bottom { display: none; }
.fab { display: none; }
.imp-bar { background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: 13px; padding: 8px 16px; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }

@media (max-width: 899px) {
  .side { display: none; }
  .main { margin-left: 0; padding-bottom: calc(var(--bottom) + env(safe-area-inset-bottom)); }
  .top { padding: 0 14px; height: 56px; }
  .content { padding: 14px 16px 28px; }
  .bottom { display: flex; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: calc(var(--bottom) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 24px rgba(20,22,30,.06); }
  .bottom a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 700; position: relative; min-width: 0; }
  .bottom a.on { color: var(--brand); }
  .bottom a .badge { position: absolute; top: 6px; left: calc(50% + 6px); }
  .bottom a.big .pill { width: 56px; height: 56px; margin-top: -26px; border-radius: 18px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 45%, transparent); }
  .bottom a.big .pill svg { width: 26px; height: 26px; }
  .bottom a.big { color: var(--ink-2); }
  h1 { font-size: 22px; }
}

/* ---------- componentes ---------- */
.btn { --c: var(--surface); --t: var(--ink); appearance: none; border: 1px solid var(--line-2); background: var(--c); color: var(--t); font: inherit; font-weight: 700; font-size: 15px; height: 44px; padding: 0 18px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap; transition: transform .08s, filter .15s, background .15s; text-decoration: none; }
.btn:hover { filter: brightness(.97); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { --c: var(--brand); --t: #fff; border-color: transparent; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand-2) 60%, var(--brand))); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn.dark { --c: var(--ink); --t: var(--bg); border-color: transparent; }
.btn.ghost { --c: transparent; border-color: transparent; }
.btn.soft { --c: var(--brand-soft); --t: var(--brand); border-color: transparent; }
.btn.danger { --c: var(--danger-soft); --t: var(--danger); border-color: transparent; }
.btn.ok { --c: var(--ok); --t: #fff; border-color: transparent; }
.btn.lg { height: 54px; font-size: 16px; padding: 0 24px; border-radius: 15px; }
.btn.sm { height: 36px; font-size: 13px; padding: 0 12px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.icon { width: 44px; padding: 0; }
.btn.icon.sm { width: 36px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; } .row.between { justify-content: space-between; } .row.nowrap { flex-wrap: nowrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.tight { padding: 14px; }
.card h3 { margin-bottom: 10px; }
.card + .card { margin-top: 14px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 10px; }
.section-title h2, .section-title h3 { margin: 0; }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.stat .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: 13px; font-weight: 600; }

.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 8px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tag.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tag.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.tag.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.tag.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 14px; background: var(--info-soft); color: var(--ink); font-size: 14px; margin-bottom: 14px; }
.alert svg { color: var(--info); margin-top: 1px; }
.alert.warn { background: var(--warn-soft); } .alert.warn svg { color: var(--warn); }
.alert.danger { background: var(--danger-soft); } .alert.danger svg { color: var(--danger); }
.alert.ok { background: var(--ok-soft); } .alert.ok svg { color: var(--ok); }
.alert .grow > b { display: block; }

label.f { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 13px; color: var(--ink-2); }
label.f .hint { font-weight: 500; color: var(--muted); font-size: 12px; }
.in, select.in, textarea.in { appearance: none; width: 100%; height: 46px; border: 1px solid var(--line-2); border-radius: 12px; padding: 0 14px; font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); transition: border .15s, box-shadow .15s; }
textarea.in { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
select.in { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236E7483' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.in:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
input[type=color].in { padding: 4px; width: 56px; }
input[type=range] { width: 100%; accent-color: var(--brand); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); margin: 1px 0 0; flex: none; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; cursor: pointer; }
.switch + .switch { border-top: 1px solid var(--line); }
.switch .t b { display: block; font-size: 15px; }
.switch .t span { color: var(--muted); font-size: 13px; }
.switch input { appearance: none; width: 48px; height: 28px; border-radius: 14px; background: var(--line-2); position: relative; flex: none; cursor: pointer; transition: background .2s; margin: 0; }
.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; }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(20px); }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { appearance: none; border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 13px; color: var(--muted); height: 34px; padding: 0 12px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin: 0 -2px 16px; padding: 0 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; display: flex; align-items: center; gap: 7px; padding: 12px 12px; font-weight: 700; font-size: 14px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--brand); border-bottom-color: var(--brand); }

.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.list .it { display: flex; gap: 12px; align-items: center; padding: 13px 16px; border-top: 1px solid var(--line); color: var(--ink); }
.list .it:first-child { border-top: 0; }
a.it:hover { background: var(--surface-2); }
.list .it .av { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; flex: none; overflow: hidden; }
.list .it .av img { width: 100%; height: 100%; object-fit: cover; }
.list .it .tx { flex: 1; min-width: 0; }
.list .it .tx b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .it .tx span { color: var(--muted); font-size: 13px; }

.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }

.empty { text-align: center; padding: 44px 18px; color: var(--muted); }
.empty .ic { width: 68px; height: 68px; border-radius: 22px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin: 0 auto 14px; }
.empty .ic svg { width: 32px; height: 32px; }
.empty h3 { color: var(--ink); }

.progress { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 6px; transition: width .3s; }
.progress.ok > i { background: var(--ok); }

.skel { background: linear-gradient(90deg, var(--line) 0%, var(--surface-2) 50%, var(--line) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }
.spin { width: 22px; height: 22px; border: 3px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; border-radius: 50%; animation: rot .8s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 60px 0; color: var(--brand); }

/* álbuns */
.album-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); color: var(--ink); display: flex; flex-direction: column; transition: transform .15s; }
.album-card:hover { transform: translateY(-2px); }
.album-card .cv { aspect-ratio: 16/10; background: var(--surface-2) center/cover; position: relative; }
.album-card .cv .tag { position: absolute; top: 10px; left: 10px; }
.album-card .cv .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--line-2); }
.album-card .cv .ph svg { width: 44px; height: 44px; }
.album-card .bd { padding: 14px 16px 16px; }
.album-card .bd b { display: block; font-size: 16px; margin-bottom: 2px; }
.album-card .meta { color: var(--muted); font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; }

/* grade de fotos */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
@media (max-width: 520px) { .photos { grid-template-columns: repeat(3, 1fr); gap: 3px; } }
.ph-it { position: relative; aspect-ratio: 1; background: var(--surface-2); border-radius: 8px; overflow: hidden; cursor: pointer; }
@media (max-width: 520px) { .ph-it { border-radius: 4px; } }
.ph-it img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.ph-it:hover img { transform: scale(1.03); }
.ph-it .flags { position: absolute; left: 6px; bottom: 6px; display: flex; gap: 4px; }
.ph-it .flags .tag { height: 20px; font-size: 11px; padding: 0 6px; background: rgba(0,0,0,.6); color: #fff; border: 0; }
.ph-it .sel { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); display: none; place-items: center; color: #fff; }
.selecting .ph-it .sel { display: grid; }
.ph-it.on .sel { background: var(--brand); border-color: var(--brand); }
.ph-it.on img { transform: scale(.9); border-radius: 6px; }
.ph-it.dim img { opacity: .45; }
.ph-it .score { position: absolute; top: 6px; left: 6px; }

.selbar { position: sticky; top: var(--top); z-index: 20; background: var(--ink); color: var(--bg); border-radius: 14px; padding: 8px 10px 8px 16px; display: flex; gap: 8px; align-items: center; margin-bottom: 12px; box-shadow: var(--shadow-lg); }
.selbar .btn { --c: rgba(255,255,255,.12); --t: #fff; border-color: transparent; }
:root[data-theme="dark"] .selbar .btn, .selbar .btn { color: inherit; }

/* envio */
.drop { border: 2px dashed var(--line-2); border-radius: 20px; padding: 34px 18px; text-align: center; background: var(--surface); transition: border .15s, background .15s; cursor: pointer; }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop .ic { width: 64px; height: 64px; border-radius: 20px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin: 0 auto 12px; }
.drop .ic svg { width: 30px; height: 30px; }
.queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 4px; margin-top: 12px; max-height: 260px; overflow: auto; }
.queue i { aspect-ratio: 1; border-radius: 6px; background: var(--line); position: relative; overflow: hidden; }
.queue i.proc { background: var(--warn-soft); } .queue i.up { background: var(--info-soft); } .queue i.ok { background: var(--ok-soft); } .queue i.err { background: var(--danger-soft); } .queue i.dup { background: var(--surface-2); }
.queue i::after { content: attr(data-s); position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 700; color: var(--muted); }

/* marca d'água */
.wm-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 899px) { .wm-grid { grid-template-columns: 1fr; } }
.wm-prev { position: sticky; top: calc(var(--top) + 12px); border-radius: var(--r); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); min-height: 200px; }
@media (max-width: 899px) { .wm-prev { position: relative; top: 0; } }
.wm-prev img { width: 100%; transition: opacity .2s; }
.wm-prev.busy img { opacity: .55; }
.pos-pick { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 5px; width: 150px; aspect-ratio: 3/2; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.pos-pick button { border: 1px dashed var(--line-2); background: transparent; border-radius: 7px; cursor: pointer; }
.pos-pick button.on { background: var(--brand); border-color: var(--brand); }
.pos-pick button.x { visibility: hidden; }
.logo-box { width: 100%; height: 96px; border: 1px dashed var(--line-2); border-radius: 12px; display: grid; place-items: center; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px; overflow: hidden; }
.logo-box img { max-height: 76px; max-width: 80%; object-fit: contain; }

/* folhas e diálogos */
.ov { position: fixed; inset: 0; z-index: 90; background: rgba(12,14,20,.5); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .18s; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--surface); border-radius: 22px; width: 100%; max-width: 520px; max-height: calc(100dvh - 40px); overflow: auto; box-shadow: var(--shadow-lg); animation: pop .2s ease; }
.sheet.wide { max-width: 760px; }
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.sheet .hd { display: flex; align-items: center; gap: 10px; padding: 18px 20px 6px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.sheet .hd h2 { flex: 1; margin: 0; font-size: 19px; }
.sheet .bd { padding: 8px 20px 20px; }
.sheet .ft { padding: 12px 20px 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--surface); }
@media (max-width: 899px) {
  .ov { align-items: flex-end; padding: 0; }
  .sheet { border-radius: 22px 22px 0 0; max-height: 92dvh; padding-bottom: env(safe-area-inset-bottom); animation: up .25s ease; }
  @keyframes up { from { transform: translateY(40%); opacity: .4; } }
  .sheet .hd::before { content: ''; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 3px; background: var(--line-2); }
  .sheet .ft .btn { flex: 1; }
}

.toasts { position: fixed; z-index: 120; left: 50%; transform: translateX(-50%); bottom: 24px; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 440px; }
@media (max-width: 899px) { .toasts { bottom: calc(var(--bottom) + 14px + env(safe-area-inset-bottom)); } }
.toast { background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); animation: pop .2s; pointer-events: auto; display: flex; gap: 10px; align-items: center; }
.toast.err { background: var(--danger); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }

/* visualizador */
.viewer { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; flex-direction: column; color: #fff; animation: fade .15s; touch-action: pan-y; }
.viewer .vt { display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); position: absolute; top: 0; left: 0; right: 0; z-index: 2; background: linear-gradient(rgba(0,0,0,.6), transparent); }
.viewer .vt .grow { font-weight: 700; font-size: 14px; opacity: .85; }
.viewer .stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.viewer .stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: transform .2s; }
.viewer .nav-b { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.14); border: 0; color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.viewer .nav-b.l { left: 14px; } .viewer .nav-b.r { right: 14px; }
@media (max-width: 899px) { .viewer .nav-b { display: none; } }
.viewer .vb { display: flex; gap: 8px; justify-content: center; padding: 12px; padding-bottom: max(14px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.7)); position: absolute; left: 0; right: 0; bottom: 0; flex-wrap: wrap; }
.viewer .btn { --c: rgba(255,255,255,.14); --t: #fff; border-color: transparent; }
.viewer .btn.primary { --t: #fff; }

/* público */
.hero { position: relative; border-radius: 24px; overflow: hidden; background: var(--ink) center/cover; color: #fff; min-height: 260px; display: flex; align-items: flex-end; box-shadow: var(--shadow); }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 20%, rgba(0,0,0,.78)); }
.hero .in-h { position: relative; padding: 22px; width: 100%; }
.hero h1 { color: #fff; margin-bottom: 6px; }
.hero .meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; opacity: .92; }
.hero .meta span { display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 899px) { .hero { border-radius: 0 0 24px 24px; margin: -14px -16px 0; min-height: 300px; } }
.cta-search { margin-top: -28px; position: relative; z-index: 2; display: flex; justify-content: center; }
.owner-chip { display: flex; gap: 12px; align-items: center; }
.owner-chip .lg { width: 52px; height: 52px; border-radius: 14px; background: #fff; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); flex: none; }
.owner-chip .lg img { max-width: 86%; max-height: 86%; object-fit: contain; }
.links { display: flex; gap: 8px; flex-wrap: wrap; }

.cam { position: relative; width: 100%; max-width: 420px; aspect-ratio: 3/4; margin: 0 auto; border-radius: 24px; overflow: hidden; background: #000; }
.cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam .oval { position: absolute; inset: 12% 18% 18%; border: 3px dashed rgba(255,255,255,.85); border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.35); pointer-events: none; }
.cam .hint { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: #fff; font-weight: 700; font-size: 14px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.shutter { width: 76px; height: 76px; border-radius: 50%; border: 5px solid var(--surface); background: var(--brand); box-shadow: 0 0 0 3px var(--brand), var(--shadow-lg); cursor: pointer; }
.selfie-prev { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto; border: 4px solid var(--surface); box-shadow: var(--shadow); }
.scan { position: relative; width: 140px; height: 140px; margin: 0 auto; }
.scan img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; }
.scan::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 4px solid transparent; border-top-color: var(--brand); border-right-color: var(--brand-2); animation: rot 1s linear infinite; }

/* páginas de entrada */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth .art { background: linear-gradient(140deg, #1c1f29 0%, #2a1d1a 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth .art .blob { position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 70%, transparent), transparent 65%); right: -160px; top: -140px; opacity: .55; }
.auth .art h1 { font-size: 40px; color: #fff; max-width: 460px; position: relative; }
.auth .art p { color: rgba(255,255,255,.75); max-width: 420px; position: relative; font-size: 16px; }
.auth .art .brand { display: flex; gap: 12px; align-items: center; font-weight: 800; font-size: 19px; position: relative; }
.auth .art .brand .mark { width: 44px; height: 44px; border-radius: 13px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center; }
.auth .form { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth .form > div { width: 100%; max-width: 400px; }
@media (max-width: 899px) {
  .auth { grid-template-columns: 1fr; }
  .auth .art { padding: 28px 22px 34px; min-height: 0; }
  .auth .art h1 { font-size: 27px; margin-top: 18px; }
  .auth .art .steps { display: none; }
}
.steps { display: grid; gap: 14px; position: relative; }
.steps div { display: flex; gap: 12px; align-items: center; color: rgba(255,255,255,.85); }
.steps i { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.1); display: grid; place-items: center; font-style: normal; font-weight: 800; flex: none; }

.home-hero { padding: 26px 0 8px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; }
@media (max-width: 899px) { .home-hero { grid-template-columns: 1fr; } }
.home-hero h1 { font-size: 40px; } @media (max-width: 899px) { .home-hero h1 { font-size: 30px; } }
.mock { border-radius: 26px; background: linear-gradient(140deg, var(--brand), var(--brand-2)); padding: 22px; color: #fff; box-shadow: var(--shadow-lg); }
.mock .ph { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; }
.mock .ph i { aspect-ratio: 1; border-radius: 10px; background: rgba(255,255,255,.22); }
.mock .ph i.m { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.5); }

.bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 120px; }
.bars i { flex: 1; max-width: 26px; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; opacity: .85; position: relative; }
.bars i:hover { opacity: 1; }

.qr { background: #fff; padding: 14px; border-radius: 16px; display: inline-block; border: 1px solid var(--line); }
.qr canvas, .qr img { width: 200px; height: 200px; image-rendering: pixelated; }
.copy { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 6px 14px; }
.copy code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: inherit; font-weight: 600; font-size: 14px; }

.plan-card { border: 2px solid var(--line); border-radius: 16px; padding: 16px; cursor: pointer; background: var(--surface); transition: border .15s; position: relative; }
.plan-card.on { border-color: var(--brand); background: var(--brand-soft); }
.plan-card .pr { font-size: 22px; font-weight: 800; }
.plan-card.disabled { opacity: .5; pointer-events: none; }

.legal { white-space: pre-line; }
.foot-public { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 0 10px; }
.foot-public a { color: var(--muted); text-decoration: underline; }
