/* Linguagem visual inspirada no iOS/macOS: fundo claro, vidro fosco, cantos generosos, azul do sistema.
   Modo escuro automático pelo aparelho. */
:root {
  color-scheme: light dark;
  --bg: #FFFFFF; --bg2: #F5F5F7; --surf: #FFFFFF; --surf2: #F5F5F7; --fill: #E8E8ED;
  --line: rgba(0, 0, 0, .08); --text: #1D1D1F; --mute: #6E6E73; --faint: #AEAEB2;
  --acc: #0071E3; --acc-h: #0077ED; --acc-ink: #FFFFFF; --acc-soft: rgba(0, 113, 227, .1); --link: #0066CC;
  --ok: #248A3D; --ok-bg: rgba(52, 199, 89, .14); --ok-fill: #34C759;
  --warn: #B25000; --warn-bg: rgba(255, 159, 10, .16); --warn-fill: #FF9F0A;
  --bad: #D70015; --bad-bg: rgba(255, 59, 48, .1);
  --glass: rgba(255, 255, 255, .72); --glass-line: rgba(0, 0, 0, .06);
  --shadow: 0 2px 6px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .08);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, .06), 0 24px 60px rgba(0, 0, 0, .14);
  --r: 22px; --r-sm: 14px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.25, .1, .25, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg2: #000000; --surf: #1C1C1E; --surf2: #2C2C2E; --fill: #3A3A3C;
    --line: rgba(255, 255, 255, .1); --text: #F5F5F7; --mute: #A1A1A6; --faint: #636366;
    --acc: #0A84FF; --acc-h: #2997FF; --acc-soft: rgba(10, 132, 255, .18); --link: #2997FF;
    --ok: #30D158; --ok-bg: rgba(48, 209, 88, .16); --ok-fill: #30D158;
    --warn: #FFB340; --warn-bg: rgba(255, 159, 10, .18); --warn-fill: #FF9F0A;
    --bad: #FF453A; --bad-bg: rgba(255, 69, 58, .16);
    --glass: rgba(28, 28, 30, .72); --glass-line: rgba(255, 255, 255, .08);
    --shadow: 0 0 0 1px rgba(255, 255, 255, .06); --shadow-lg: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 60px rgba(0, 0, 0, .6);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.47 var(--font); letter-spacing: -.022em; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(34px, 8vw, 64px); line-height: 1.05; font-weight: 700; letter-spacing: -.035em; }
h2 { font-size: clamp(26px, 5vw, 34px); line-height: 1.12; font-weight: 700; letter-spacing: -.03em; }
h3 { font-size: 19px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--mute); letter-spacing: -.01em; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--acc-soft); outline-offset: 2px; box-shadow: 0 0 0 1px var(--acc); }
.ico { width: 20px; height: 20px; flex: none; }
.mute { color: var(--mute); }
.small { font-size: 14px; letter-spacing: -.01em; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrapx { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 14px; }
.gap-lg { gap: 28px; }
.hide { display: none !important; }
.center { text-align: center; }
.t6 { gap: 6px; } .t8 { gap: 8px; } .t10 { gap: 10px; } .mt14 { margin-top: 14px; } .dim { opacity: .85; } .txt { color: var(--text); }
.back { gap: 2px; font-size: 17px; margin-left: -6px; }
.back .ico { width: 22px; height: 22px; }

/* barra superior em vidro */
.top { position: sticky; top: 0; z-index: 20; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--glass-line); }
.top-in { max-width: 1080px; height: 54px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 10px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.logo svg { width: 28px; height: 28px; }
.logo .lg-bg { fill: var(--acc); }
.logo .lg-fg { stroke: #fff; fill: none; }
.logo .lg-dot { fill: #fff; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 16px 120px; }
.narrow { max-width: 620px; }

/* botões em pílula */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 50px; padding: 0 24px; border-radius: 980px; border: 0; background: var(--fill); color: var(--text); font-size: 17px; font-weight: 500; text-decoration: none; transition: transform .2s var(--ease), background .2s var(--ease), opacity .2s; }
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn:active { transform: scale(.97); }
.btn.pri { background: var(--acc); color: var(--acc-ink); }
.btn.pri:hover { background: var(--acc-h); filter: none; }
.btn.pri:disabled { background: var(--fill); color: var(--faint); cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--link); }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 34px; padding: 0 16px; font-size: 14px; }
.btn.block { width: 100%; }
.btn .ico { width: 18px; height: 18px; }
.iconbtn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--fill); color: var(--text); flex: none; }
.iconbtn .ico { width: 18px; height: 18px; }
.textbtn { border: 0; background: none; padding: 0; color: var(--link); font-size: inherit; }

/* cartões */
.card { background: var(--surf); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; background: var(--surf2); }
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.scene { display: block; width: 100%; height: 100%; }

/* tile de viagem: foto inteira com texto por cima, estilo vitrine */
.tile { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: 28px; overflow: hidden; text-align: left; color: #fff; background: #111; box-shadow: var(--shadow); transition: transform .45s var(--ease), box-shadow .45s var(--ease); isolation: isolate; }
.tile:hover { transform: scale(1.015); box-shadow: var(--shadow-lg); }
.tile:active { transform: scale(.99); }
.tile .media { position: absolute; inset: 0; z-index: -2; transition: transform 1.2s var(--ease); }
.tile:hover .media { transform: scale(1.05); }
.tile::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .12) 32%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .78) 100%); }
.tile .tt { position: absolute; left: 22px; right: 22px; top: 20px; }
.tile .tt > span { font-size: 13px; font-weight: 600; opacity: .9; letter-spacing: .02em; text-transform: uppercase; }
.tile .tt h3 { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; }
.tile .bb { position: absolute; left: 22px; right: 22px; bottom: 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.tile .bb .p { font-size: 13px; opacity: .85; }
.tile .bb b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.tile .go { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 980px; font-size: 15px; font-weight: 600; background: rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); white-space: nowrap; }
.tile .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.glasschip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 980px; font-size: 12.5px; font-weight: 500; background: rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.glasschip .ico { width: 13px; height: 13px; }

.price { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 980px; font-size: 12.5px; font-weight: 600; letter-spacing: -.01em; text-transform: capitalize; }
.tag.pago { color: var(--ok); background: var(--ok-bg); }
.tag.pendente { color: var(--warn); background: var(--warn-bg); }
.tag.cancelada { color: var(--bad); background: var(--bad-bg); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--mute); font-size: 15px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta .ico { width: 16px; height: 16px; }

.hero { padding: 36px 0 34px; display: grid; gap: 14px; text-align: center; justify-items: center; }
.hero p { font-size: clamp(19px, 3.4vw, 24px); line-height: 1.35; color: var(--mute); max-width: 560px; letter-spacing: -.02em; }
.hero .grad { background: linear-gradient(90deg, #0071E3, #42A1EC 45%, #1BB3A0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.trust { display: flex; justify-content: center; gap: 8px 22px; flex-wrap: wrap; color: var(--mute); font-size: 14px; margin-top: 6px; }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust .ico { width: 16px; height: 16px; color: var(--acc); }
.foot { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--mute); font-size: 12.5px; display: flex; gap: 8px 18px; flex-wrap: wrap; justify-content: center; }

/* galeria do pacote */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 26px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery > * { scroll-snap-align: center; aspect-ratio: 4 / 3; border-radius: 26px; overflow: hidden; background: var(--fill); }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: -4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--fill); transition: background .2s; }
.dots i.on { background: var(--text); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks .ico { color: var(--acc); width: 20px; height: 20px; margin-top: 1px; }

/* etapas */
.steps { display: flex; gap: 6px; margin: 4px 0 26px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--fill); transition: background .3s var(--ease); }
.steps i.on { background: var(--acc); }
.stepname { font-size: 13px; color: var(--mute); margin-bottom: 8px; font-weight: 600; }

/* listas agrupadas (estilo Ajustes do iOS) */
.group { background: var(--surf); border-radius: var(--r-sm); box-shadow: var(--shadow); overflow: hidden; }
.group > * + * { border-top: 1px solid var(--line); }
.opt { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 15px 18px; border: 0; background: var(--surf); transition: background .15s; }
.opt:hover { background: var(--surf2); }
.opt .dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--faint); flex: none; display: grid; place-items: center; transition: .2s var(--ease); }
.opt[aria-checked="true"] .dot { border-color: var(--acc); background: var(--acc); box-shadow: inset 0 0 0 4px var(--surf); }
.opt:disabled { opacity: .45; cursor: not-allowed; }
.opt .side-r { font-size: 14px; color: var(--mute); text-align: right; }
.opt .side-r.few { color: var(--warn); font-weight: 600; }

/* ônibus */
.bus { width: 100%; max-width: 330px; margin: 0 auto; padding: 16px 18px 20px; background: var(--surf); border-radius: 80px 80px 30px 30px; box-shadow: var(--shadow); }
.bus-front { display: flex; justify-content: space-between; align-items: center; padding: 22px 6px 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); color: var(--mute); font-size: 12.5px; }
.drv { display: inline-flex; align-items: center; gap: 6px; }
.drv .ico { width: 18px; height: 18px; }
.door { padding: 3px 12px; border-radius: 980px; background: var(--surf2); }
.bus-grid { display: grid; grid-template-columns: repeat(2, 1fr) 22px repeat(2, 1fr); gap: 9px 8px; }
.seat { aspect-ratio: 1; min-width: 0; padding: 0; border-radius: 12px 12px 8px 8px; border: 0; background: var(--surf2); color: var(--text); font-size: 15px; font-weight: 500; position: relative; box-shadow: inset 0 0 0 1px var(--line); transition: transform .18s var(--ease), background .18s var(--ease), color .18s; }
.seat::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: 4px; height: 3px; border-radius: 3px; background: currentColor; opacity: .18; }
.seat:not(:disabled):hover { box-shadow: inset 0 0 0 2px var(--acc); }
.seat:not(:disabled):active { transform: scale(.9); }
.seat.sel { background: var(--acc); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(0, 113, 227, .35); }
.seat.pago { background: var(--acc); color: #fff; font-weight: 600; box-shadow: none; }
.seat.pendente { background: var(--warn-fill); color: #fff; font-weight: 600; box-shadow: none; }
.seat.occ, .seat.bloqueada { background: transparent; color: var(--faint); box-shadow: inset 0 0 0 1px var(--line); }
.seat.occ::before, .seat.bloqueada::before { content: ''; position: absolute; left: 50%; top: 50%; width: 46%; height: 1.5px; background: var(--faint); transform: translate(-50%, -50%) rotate(-45deg); opacity: .7; }
.seat.occ { cursor: not-allowed; font-size: 0; }
.seat.bloqueada { font-size: 13px; }
.seat.focus { outline: 3px solid var(--acc-soft); outline-offset: 2px; box-shadow: inset 0 0 0 2px var(--acc); }
.wc { grid-column: span 2; display: grid; place-items: center; border-radius: 12px; background: var(--surf2); color: var(--mute); font-size: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; font-size: 14px; color: var(--mute); margin: 2px 0 18px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend .seat { width: 18px; font-size: 0; border-radius: 6px; pointer-events: none; box-shadow: inset 0 0 0 1px var(--line); }
.legend .seat::after { display: none; }
.legend .seat.sel { box-shadow: none; }

/* barra inferior em vidro */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--glass-line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.bar-in { max-width: 620px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.bar .price { font-size: 20px; }
.tabs { display: flex; max-width: 480px; margin: 0 auto; }
.tabs button { flex: 1; display: grid; justify-items: center; gap: 3px; padding: 2px; background: none; border: 0; color: var(--faint); font-size: 11px; font-weight: 500; letter-spacing: 0; }
.tabs .ico { width: 24px; height: 24px; }
.tabs [aria-current="page"] { color: var(--acc); }
.bar.tabbar { padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }

/* formulários */
label.f { display: grid; gap: 7px; font-size: 14px; color: var(--mute); font-weight: 500; }
.in { width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 12px; border: 0; background: var(--surf2); color: var(--text); font-size: 17px; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s var(--ease); }
.in::placeholder { color: var(--faint); }
.in:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--acc), 0 0 0 4px var(--acc-soft); }
.in.err { box-shadow: inset 0 0 0 1.5px var(--bad), 0 0 0 4px var(--bad-bg); }
textarea.in { min-height: 96px; resize: vertical; }
.errmsg { color: var(--bad); font-size: 13px; font-weight: 500; }
.g2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--mute); line-height: 1.45; }
.consent input { width: 22px; height: 22px; margin-top: 0; accent-color: var(--acc); flex: none; }
.note { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--surf2); font-size: 14px; color: var(--mute); line-height: 1.45; }
.note .ico { color: var(--acc); margin-top: 1px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; color: var(--warn); background: var(--warn-bg); padding: 4px 12px; border-radius: 980px; }

/* pagamento / voucher */
.qr { width: 200px; height: 200px; margin: 0 auto; padding: 14px; background: #fff; border-radius: 20px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.qr svg { display: block; width: 100%; height: 100%; }
.pixcode { font: 12.5px/1.45 var(--mono); letter-spacing: 0; word-break: break-all; padding: 12px 14px; background: var(--surf2); border-radius: 12px; color: var(--mute); }
.sum { display: grid; gap: 10px; }
.sum div { display: flex; justify-content: space-between; gap: 12px; }
.sum .tot { padding-top: 12px; border-top: 1px solid var(--line); font-weight: 600; font-size: 19px; }
.voucher { position: relative; overflow: hidden; padding: 0; }
.voucher .banner { height: 120px; position: relative; }
.voucher .banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, .55)); }
.voucher .banner .bt { position: absolute; left: 20px; right: 20px; bottom: 14px; z-index: 1; color: #fff; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.voucher .banner h3 { font-size: 22px; font-weight: 700; }
.voucher .head { padding: 18px 20px; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.voucher .code { font: 600 24px/1.1 var(--mono); letter-spacing: .04em; }
.voucher .in2 { padding: 18px 20px; display: grid; gap: 14px; }
.okmark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-fill); color: #fff; margin: 0 auto; animation: pop .5s var(--ease); }
.okmark .ico { width: 34px; height: 34px; stroke-width: 2.6; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.seatpill { display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding: 0 8px; border-radius: 9px; background: var(--acc-soft); color: var(--acc); font-weight: 600; font-size: 14px; letter-spacing: 0; }
.empty { text-align: center; padding: 56px 16px; color: var(--mute); display: grid; gap: 14px; justify-items: center; }
.empty .ico { width: 44px; height: 44px; color: var(--faint); }

/* página de créditos */
.credits { display: grid; gap: 12px; }
.credit { display: flex; gap: 14px; align-items: center; }
.credit .thumb { width: 72px; height: 54px; }

#toast { position: fixed; left: 50%; bottom: 104px; transform: translate(-50%, 16px) scale(.96); z-index: 60; max-width: calc(100% - 32px); padding: 13px 20px; border-radius: 980px; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); color: var(--text); font-size: 15px; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: .35s var(--ease); }
#toast.on { opacity: 1; transform: translate(-50%, 0) scale(1); }

.fade { animation: fade .4s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- painel admin (estilo macOS) ---------- */
body.admin { background: var(--bg2); }
.adm { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 18px 12px; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.side .logo { padding: 4px 10px 18px; }
.nav { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; border: 0; background: none; color: var(--text); text-align: left; font-size: 15px; font-weight: 500; text-decoration: none; }
.nav .ico { color: var(--acc); width: 19px; height: 19px; }
.nav:hover { background: var(--fill); text-decoration: none; }
.nav[aria-current="page"] { background: var(--acc); color: #fff; }
.nav[aria-current="page"] .ico { color: #fff; }
.main { padding: 30px 32px 60px; min-width: 0; }
.main > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.kpis { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.kpi b { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.03em; margin: 4px 0 2px; }
.cols { display: grid; gap: 18px; grid-template-columns: 1.15fr 1fr; align-items: start; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-weight: 600; color: var(--mute); font-size: 12.5px; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surf2); }
.scroll { overflow-x: auto; }
.mono { font-family: var(--mono); font-size: 13.5px; letter-spacing: 0; }
progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 6px; border: 0; border-radius: 6px; overflow: hidden; background: var(--fill); }
progress::-webkit-progress-bar { background: var(--fill); }
progress::-webkit-progress-value { background: var(--acc); border-radius: 6px; }
progress::-moz-progress-bar { background: var(--acc); border-radius: 6px; }
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--fill); flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 7px; color: var(--text); font-size: 13.5px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--surf); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
select.in { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.main header select.in { min-height: 38px; padding-top: 6px; padding-bottom: 6px; font-size: 15px; background-position: calc(100% - 20px) 16px, calc(100% - 15px) 16px; background-color: var(--surf); width: auto; max-width: 100%; }
dialog { width: min(560px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; border: 0; border-radius: 22px; background: var(--surf); color: var(--text); box-shadow: var(--shadow-lg); }
dialog[open] { animation: fade .3s var(--ease); }
dialog::backdrop { background: rgba(0, 0, 0, .32); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog form { padding: 24px; display: grid; gap: 16px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: min(420px, 100%); padding: 32px; display: grid; gap: 18px; text-align: center; justify-items: center; }
.thumb { width: 88px; height: 64px; border-radius: 12px; overflow: hidden; flex: none; background: var(--fill); }
.pkg { padding: 0; overflow: hidden; }
.pkg .cover { height: 150px; position: relative; }
.pkg .pb { padding: 18px 20px 20px; display: grid; gap: 12px; }
.deprow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surf2); font-size: 14px; }
.printonly { display: none; }

@media (max-width: 900px) {
  .adm { grid-template-columns: 1fr; }
  .side { position: fixed; inset: auto 0 0 0; height: auto; z-index: 30; flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--glass-line); }
  .side .logo, .side .sidefoot { display: none; }
  .nav { flex-direction: column; gap: 3px; padding: 6px 2px; font-size: 10.5px; justify-content: center; text-align: center; }
  .nav[aria-current="page"] { background: none; color: var(--acc); }
  .nav[aria-current="page"] .ico { color: var(--acc); }
  .nav .ico { color: var(--faint); width: 22px; height: 22px; }
  .main { padding: 20px 16px 110px; }
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 440px) { .g2 { grid-template-columns: 1fr; } .tile { aspect-ratio: 4 / 4.6; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print {
  body, body.admin { background: #fff; color: #000; }
  .side, .noprint, #toast { display: none !important; }
  .adm { display: block; } .main { padding: 0; }
  .card { box-shadow: none; padding: 0; background: none; }
  .tbl th, .tbl td { border-color: #bbb; color: #000; }
  .tbl tbody tr:hover td { background: none; }
  .printonly { display: block; } .mute { color: #444; }
}
