:root {
  --bg: #09090b;
  --bg-2: #101012;
  --surface: #151518;
  --surface-2: #1c1c21;
  --line: #2a2822;
  --gold: #d4af37;
  --gold-2: #e8c96a;
  --gold-dim: #8a7020;
  --cream: #f4efe4;
  --muted: #9a9286;
  --ok: #6ee7b7;
  --warn: #fbbf24;
  --danger: #f87171;
  --blue: #93c5fd;
  --sidebar: 252px;
  --navh: 64px;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(0,0,0,.45);
  --font: "Outfit", system-ui, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; width: 100%; max-width: 100%; overflow-x: hidden; background: var(--bg); color: var(--cream); font-family: var(--font); }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; touch-action: manipulation; }
#app { overflow-x: hidden; max-width: 100%; min-width: 0; }
button, input, select, textarea { font-family: inherit; font-size: 16px; max-width: 100%; }
a { color: var(--gold); }
img { max-width: 100%; }

.boot { min-height: 100vh; display: grid; place-items: center; color: var(--gold); letter-spacing: .35em; text-transform: uppercase; font-size: 12px; }
.view-boot { min-height: 36vh; }
.boot-mark { width: 48px; height: 48px; border: 2px solid var(--gold); border-radius: 50%; margin: 0 auto 16px; animation: pulse 1.4s ease-in-out infinite; }
.boot-logo { max-height: 80px; max-width: 200px; object-fit: contain; margin: 0 auto 16px; display: block; }
@keyframes pulse { 50% { transform: scale(.85); opacity: .5; } }

/* LOGIN */
.login {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr;
  background: radial-gradient(1200px 600px at 20% -10%, #2a2314 0%, transparent 50%), var(--bg);
}
.login-art { display: flex; flex-direction: column; justify-content: flex-end; padding: 56px; position: relative; overflow: hidden; }
.login-art::before {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath fill='%23d4af37' fill-opacity='.04' d='M0 0h1v80H0zM0 0h80v1H0z'/%3E%3C/svg%3E");
}
.brand-big { font-family: var(--serif); font-size: clamp(56px, 8vw, 92px); line-height: .9; margin: 0; position: relative; }
.brand-big em { font-style: italic; color: var(--gold); }
.login-art p { position: relative; max-width: 420px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.login-box { display: grid; place-items: center; padding: 32px 24px; }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 36px 28px; box-shadow: var(--shadow); }
.eyebrow { letter-spacing: .32em; text-transform: uppercase; font-size: 11px; color: var(--gold); margin: 0 0 8px; }
.login-card h2 { font-family: var(--serif); font-size: 32px; margin: 0 0 24px; font-weight: 600; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; max-width: 100%; background: #0d0d10; border: 1px solid var(--line); color: var(--cream);
  border-radius: 12px; padding: 12px 14px; font-size: 16px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; border-radius: 12px; padding: 12px 18px; font-weight: 600; font-size: 14px;
  transition: transform .15s, filter .15s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn-gold { background: linear-gradient(180deg, #e8c96a, #c9a227); color: #1a1408; width: 100%; padding: 14px; }
.btn-gold:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--cream); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-danger { background: #3a1518; color: #fecaca; border: 1px solid #5c2228; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-ok { background: #12352a; color: var(--ok); }
.btn-sm { padding: 8px 12px; font-size: 12px; border-radius: 10px; }
.alert { background: #3a1515; color: #fca5a5; padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; }

/* SHELL */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; min-width: 0; max-width: 100%; overflow-x: hidden; }
.sidebar {
  background: linear-gradient(180deg, #121214, #0c0c0e);
  border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; text-decoration: none; color: inherit; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; background: #1a170f; border: 1px solid #3a3018;
  display: grid; place-items: center; overflow: hidden; flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-mark.has-logo { background: #0d0d10; padding: 3px; }
.login-logo { text-align: center; margin: 0 0 18px; }
.login-logo img, .login-art-logo { max-height: 88px; max-width: 220px; object-fit: contain; }
.login-art-logo { position: relative; margin-bottom: 20px; display: block; }
.logo-preview { max-height: 88px; max-width: 240px; object-fit: contain; background: #0d0d10; border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: block; margin: 8px 0; }
.brand h1 { font-family: var(--serif); font-size: 22px; margin: 0; line-height: 1; }
.brand small { display: block; color: var(--gold); letter-spacing: .18em; font-size: 9px; text-transform: uppercase; margin-top: 3px; }
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow: auto; }
.nav button, .nav a.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: transparent; border: 0; color: var(--muted); padding: 10px 12px; border-radius: 12px;
  cursor: pointer; font-size: 14px;
}
.nav button:hover, .nav a.nav-item:hover { background: var(--surface-2); color: var(--cream); }
.nav button.active { background: #1d1a12; color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }
.nav .ico { width: 18px; text-align: center; font-size: 15px; }
.side-user { padding: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #1a1408; flex-shrink: 0; }
.side-user .meta { flex: 1; min-width: 0; }
.side-user b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user span { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.logout { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; }

.main { min-width: 0; max-width: 100%; overflow-x: hidden; padding: 22px 28px 90px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; max-width: 100%; }
.topbar > div { min-width: 0; flex: 1 1 160px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-width: 0; max-width: 100%; flex: 1 1 180px; }

/* CARDS / GRID */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px;
}
.kpi .lbl { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.kpi .val { font-family: var(--serif); font-size: 32px; margin: 6px 0 0; }
.kpi .hint { font-size: 12px; color: var(--gold-2); margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr .9fr; gap: 14px; }
.cust-card { border-radius: 12px; padding: 12px; margin: 4px 0 12px; }
.cust-card.ok { background: #12352a; border: 1px solid #1d5c45; }
.cust-card.new { background: #1d1a12; border: 1px solid #4a3d18; }
.cust-card .field { margin-bottom: 10px; }
.cust-card .field:last-child { margin-bottom: 0; }
.reset-box { max-width: 720px; margin-top: 28px; border-color: #4a2020; }
.reset-box h3 { font-family: var(--serif); font-size: 28px; margin: 0 0 8px; }
.reset-opt {
  display: flex; gap: 12px; align-items: flex-start; width: 100%;
  background: #0d0d10; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-top: 8px; cursor: pointer; color: inherit; text-align: left;
}
.reset-opt.on { border-color: var(--gold); background: #1d1a12; }
.reset-opt input { margin-top: 3px; accent-color: var(--gold); flex-shrink: 0; }
.reset-opt b { display: block; margin-bottom: 3px; font-size: 14px; }
.reset-opt span { font-size: 12px; color: var(--muted); font-weight: 400; line-height: 1.4; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h3 { margin: 0 0 14px; font-size: 16px; font-weight: 600; }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

/* CHART */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.bar { width: 100%; max-width: 28px; background: linear-gradient(180deg, var(--gold-2), var(--gold-dim)); border-radius: 6px 6px 3px 3px; min-height: 4px; }
.bar-col span { font-size: 10px; color: var(--muted); }

/* TABLES */
.table-wrap { overflow: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; color: var(--muted); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.data td { padding: 10px; border-bottom: 1px solid #1f1e22; vertical-align: middle; }
table.data tr:hover td { background: #19191d; }
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.badge-ok { background: #12352a; color: var(--ok); }
.badge-warn { background: #3a2a10; color: var(--warn); }
.badge-off { background: #2a1518; color: var(--danger); }
.badge-info { background: #152033; color: var(--blue); }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid #0006; display: inline-block; }

.topbar h2 { font-family: var(--serif); font-size: 34px; margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.topbar .sub { color: var(--muted); margin: 4px 0 0; font-size: 14px; }

/* POS */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; min-width: 0; max-width: 100%; }
.pos-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; max-width: 100%; }
.pos-head h2 { font-family: var(--serif); font-size: 34px; margin: 0; font-weight: 600; }
.pos-head .sub { color: var(--muted); margin: 0; font-size: 14px; }
.pos-tools { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.search { flex: 1; min-width: 0; width: 100%; background: #0d0d10; border: 1px solid var(--line); color: var(--cream); border-radius: 12px; padding: 12px 14px; font-size: 16px; }
.chips { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; max-width: 100%; width: 100%; flex-wrap: nowrap; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip { background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.chip.on, .pay.on { background: #2a2414; color: var(--gold); border-color: #4a3d18; }
label.chip { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
label.chip input { accent-color: var(--gold); }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; min-width: 0; max-width: 100%; }
.prod-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; cursor: pointer;
  text-align: left; color: inherit; padding: 0; width: 100%; min-width: 0;
  content-visibility: auto; contain-intrinsic-size: auto 200px;
}
.prod-card:hover { border-color: var(--gold-dim); }
.prod-ph {
  height: 110px; background: linear-gradient(160deg, #1c1a16, #12110e);
  display: grid; place-items: center; font-size: 42px; position: relative;
}
.prod-ph img { width: 100%; height: 110px; object-fit: cover; background: #12110e; }
.stock-pill { position: absolute; top: 8px; right: 8px; background: #0008; color: var(--cream); font-size: 10px; padding: 3px 7px; border-radius: 999px; }
.prod-body { padding: 10px 12px 12px; min-width: 0; }
.prod-body .brand { display: block; padding: 0; gap: 0; font-size: 10px; color: var(--gold); letter-spacing: .12em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-body h4 { margin: 4px 0 6px; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-body .price { color: var(--gold-2); font-weight: 600; }

.cart {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px;
  position: sticky; top: 16px; max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  min-width: 0; max-width: 100%;
}
.cart h3 { font-family: var(--serif); font-size: 24px; margin: 0 0 12px; }
.cart-items { flex: 1; overflow: auto; min-height: 120px; }
.cart-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-item small { color: var(--muted); }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #0d0d10; color: var(--cream); cursor: pointer; flex-shrink: 0; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 0; gap: 8px; min-width: 0; }
.cart-total b { font-family: var(--serif); font-size: 28px; overflow-wrap: anywhere; }
.pay-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.pay-grid .btn { width: 100%; padding: 10px 6px; font-size: 12px; }

/* MODAL */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.62); z-index: 50;
  display: grid; place-items: center; padding: 16px;
  backdrop-filter: blur(6px);
  overflow: hidden;
}
.modal { width: 100%; max-width: min(560px, 100%); background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: 22px; max-height: 90vh; overflow: auto; overflow-x: hidden; }
.modal.wide { max-width: min(820px, 100%); }
.modal h3 { font-family: var(--serif); font-size: 28px; margin: 0 0 6px; }
.modal-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.modal-actions .btn { width: 100%; }
.cash-banner {
  background: #1d1a12; border: 1px solid #4a3d18; color: var(--gold-2);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 13px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.size-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.size-btn { min-width: 48px; padding: 10px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--cream); cursor: pointer; }
.size-btn.on { border-color: var(--gold); color: var(--gold); background: #1d1a12; }
.size-btn.loan { border-style: dashed; border-color: var(--gold-dim); color: var(--gold-2); }
.size-btn.loan small { color: var(--gold); }
.loan-tag { color: var(--warn); font-size: 11px; margin-top: 4px; }
td.warn { color: var(--danger); font-weight: 600; }
.color-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 14px; }
.color-btn { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #000; cursor: pointer; }
.color-btn.on { outline: 2px solid var(--gold); outline-offset: 2px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.span-2 { grid-column: span 2; }

/* TOAST */
.toast {
  position: fixed; bottom: 84px; left: 12px; right: 12px; transform: none;
  background: #1d1a12; color: var(--gold-2); border: 1px solid #4a3d18;
  padding: 12px 18px; border-radius: 12px; z-index: 80; font-size: 14px; box-shadow: var(--shadow);
  text-align: center;
}

/* MOBILE NAV */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; height: calc(var(--navh) + env(safe-area-inset-bottom));
  background: #101012ee; border-top: 1px solid var(--line); backdrop-filter: blur(12px);
  padding-bottom: env(safe-area-inset-bottom); z-index: 40; max-width: 100%;
}
.bottom-nav nav { display: flex; height: var(--navh); width: 100%; }
.bottom-nav button {
  flex: 1 1 0; min-width: 0; background: none; border: 0; color: var(--muted); font-size: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer;
  overflow: hidden; padding: 0 2px;
}
.bottom-nav button.active { color: var(--gold); }
.bottom-nav .ico { font-size: 18px; }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .big { font-size: 42px; margin-bottom: 8px; }

.inv-list { display: flex; flex-direction: column; gap: 10px; }
.inv-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
  cursor: pointer; text-align: left; color: inherit; width: 100%;
  content-visibility: auto; contain-intrinsic-size: auto 96px;
}
.inv-card:hover { border-color: var(--gold-dim); }
.inv-card .top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.inv-card h4 { margin: 0 0 2px; font-size: 16px; font-weight: 600; }
.inv-pairs { font-family: var(--serif); font-size: 22px; line-height: 1; }
.inv-pairs small { display: block; font-family: var(--font); font-size: 11px; color: var(--muted); margin-top: 4px; font-weight: 400; }
.run { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.run-name { font-size: 11px; color: var(--muted); min-width: 72px; }
.sz {
  display: inline-flex; align-items: center; gap: 4px; background: #0d0d10; border: 1px solid var(--line);
  border-radius: 8px; padding: 4px 7px; font-size: 12px; color: var(--cream);
}
.sz b { font-variant-numeric: tabular-nums; min-width: 1.2em; text-align: center; }
.sz.ok { border-color: #1d3a30; }
.sz.low { border-color: #5c4310; color: var(--warn); }
.sz.out { border-color: #4a2020; color: var(--danger); opacity: .85; }
.sz.out b { color: var(--danger); }

.stock-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.size-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.size-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 8px 12px; text-align: center;
}
.size-tile .t { font-size: 13px; color: var(--muted); }
.size-tile .n {
  font-family: var(--serif); font-size: 34px; line-height: 1.1; font-weight: 600; color: var(--gold);
  padding: 8px 0 2px;
}
.size-tile.low .n { color: var(--warn); }
.size-tile.out .n { color: var(--danger); }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.entrada-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; }
.entrada-cell { text-align: center; }
.entrada-cell span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.entrada-cell input {
  width: 100%; text-align: center; font-size: 20px; font-weight: 600; padding: 10px 4px;
  background: #0d0d10; border: 1px solid var(--line); color: var(--cream); border-radius: 10px;
  -moz-appearance: textfield; appearance: textfield;
}
.role-pick { display: flex; flex-direction: column; gap: 8px; }
.role-opt {
  display: block; width: 100%; text-align: left; background: #0d0d10; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; cursor: pointer; color: inherit;
}
.role-opt.on { border-color: var(--gold); background: #1d1a12; }
.role-opt b { display: block; margin-bottom: 4px; font-size: 14px; }
.role-opt span { font-size: 12px; color: var(--muted); font-weight: 400; line-height: 1.4; }

.mobile-cart-bar {
  display: none; position: fixed; left: 12px; right: 12px; bottom: calc(var(--navh) + 10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #e8c96a, #c9a227); color: #1a1408; border-radius: 14px;
  padding: 12px 16px; z-index: 30; font-weight: 600; justify-content: space-between; align-items: center; border: 0;
  width: auto; max-width: calc(100% - 24px); box-sizing: border-box;
}

@media (min-width: 981px) {
  .login-card .login-logo { display: none; }
}

@media (max-width: 980px) {
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .app { display: block; width: 100%; }
  .sidebar { display: none; }
  .bottom-nav { display: block; }
  .main { padding: 12px 12px 130px; width: 100%; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi .val { font-size: 24px; }
  .grid-2, .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .pos {
    display: block;
    width: 100%;
    max-width: 100%;
  }
  .pos > div { min-width: 0; max-width: 100%; }
  .prod-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .prod-ph { height: 88px; font-size: 32px; }
  .prod-ph img { height: 88px; }
  .pos-head h2 { font-size: 26px; }
  .topbar h2 { font-size: 26px; }
  .cart {
    display: none !important;
  }
  .pos.cart-open .cart {
    display: flex !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-width: 100%;
    z-index: 45;
    max-height: min(78vh, calc(100dvh - var(--navh) - 8px));
    border-radius: 20px 20px 0 0;
    margin: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
  .pos.cart-open ~ .mobile-cart-bar { display: none; }
  .mobile-cart-bar { display: flex; }
  .modal { padding: 18px 14px; border-radius: 16px 16px 0 0; max-height: min(88vh, 100dvh); }
  .overlay { align-items: end; place-items: end center; padding: 0; }
  .modal h3 { font-size: 22px; }
}

@media print {
  .sidebar, .bottom-nav, .actions, .btn { display: none !important; }
  .app { display: block; }
  .main { padding: 0; }
}
