:root {
  --bg: #08090d;
  --surface: #13151e;
  --surface-2: #1c1f2e;
  --border: #2a2e42;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --accent: #ff148a;
  --accent-hover: #db0f75;
  --accent-soft: rgba(255, 20, 138, 0.16);
  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.15);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.16);
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.16);
  --purple: #a855f7;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
body { background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease; }
button:active { transform: scale(0.97); }
input, select, textarea {
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
.hidden { display: none !important; }

/* ================= PIN SCREEN ================= */
#screen-pin {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at top, #2a0c24 0%, #000000 58%);
}
.pin-card {
  width: 100%;
  max-width: 380px;
  background: #0d0e14;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px 24px 28px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.65);
}
.brand-logo-hero {
  width: 196px;
  height: 108px;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
  background: #000;
  margin: 0 auto 6px;
  display: block;
}
.brand-sub { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 2.2px; color: var(--muted); margin-bottom: 12px; }
.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
}
.sync-pill.online { border-color: rgba(16,185,129,0.45); color: var(--green); background: var(--green-soft); }
.sync-pill.offline { border-color: rgba(245,158,11,0.5); color: var(--amber); background: var(--amber-soft); }

.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 18px 0 10px; }
.pin-dot { width: 17px; height: 17px; border-radius: 50%; border: 2px solid var(--border); background: transparent; transition: all 0.15s; }
.pin-dot.filled { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 14px rgba(255,20,138,0.7); }
.pin-msg { min-height: 20px; font-size: 0.84rem; color: var(--red); margin-bottom: 12px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.key-btn {
  height: 58px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 700;
}
.key-btn:hover { background: #262b40; border-color: var(--accent); }
.key-btn.action { font-size: 0.92rem; color: var(--muted); }
#btn-install-pwa {
  margin-top: 14px;
  width: 100%;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(255, 20, 138, 0.45);
}

/* Staff Selector inside PIN screen */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.staff-btn {
  padding: 18px 12px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: #fff;
  font-size: 1.08rem;
  font-weight: 800;
}
.staff-btn:hover { border-color: var(--accent); background: #26162a; }

/* ================= TOPBAR ================= */
.topbar {
  min-height: 62px;
  background: #0a0b10;
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-brand { display: flex; align-items: center; gap: 8px; }
.nav-logo { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; background: #000; border: 1px solid var(--border); }
.logo-sm { font-weight: 900; font-size: 1.08rem; letter-spacing: 1px; }
.logo-sm span { color: var(--accent); }
.dvr-clock {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  gap: 7px;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.topbar-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.btn {
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.83rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: #262c40; }
.btn-amber { background: var(--amber-soft); color: var(--amber); border: 1px solid rgba(245,158,11,0.35); }
.btn-blue { background: var(--blue-soft); color: #93c5fd; border: 1px solid rgba(59,130,246,0.4); }
.btn-red { background: var(--red-soft); color: #fca5a5; border: 1px solid rgba(239,68,68,0.4); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-green { background: var(--green); color: #052e16; font-weight: 800; }
.btn-green:hover { background: #059669; color: #fff; }
.btn-wa { background: #16a34a; color: #fff; font-weight: 700; padding: 6px 10px; font-size: 0.78rem; border-radius: 8px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.btn-wa:hover { background: #15803d; }

.role-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.role-chip b { color: #fff; }
.role-chip.patron { border-color: rgba(255,20,138,0.5); background: var(--accent-soft); color: #ff8dc7; }

/* ================= POS / CAJA ================= */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 415px;
  height: calc(100vh - 62px);
}
.pos-left {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pos-toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.search-box { flex: 1; min-width: 220px; }
.cat-bar { display: flex; gap: 7px; flex-wrap: wrap; }
.cat-pill {
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.84rem;
}
.cat-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  padding-bottom: 24px;
}
.prod-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 118px;
}
.prod-card:hover { border-color: var(--accent); background: #1a1d2b; }
.prod-card.no-price { border-color: rgba(245,158,11,0.5); opacity: 0.85; }
.prod-top { display: flex; justify-content: space-between; align-items: center; gap: 4px; margin-bottom: 6px; }
.prod-cat { font-size: 0.67rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; }
.stock-badge { font-size: 0.7rem; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.stock-badge.low { background: var(--amber-soft); color: var(--amber); }
.stock-badge.out { background: var(--red-soft); color: var(--red); }
.prod-name { font-size: 0.91rem; font-weight: 700; color: var(--text); line-height: 1.24; margin-bottom: 4px; }
.prod-loc { font-size: 0.7rem; color: var(--muted); margin-bottom: 6px; }
.prod-price { font-size: 1.15rem; font-weight: 800; color: var(--green); }
.prod-price.missing { color: var(--amber); font-size: 0.85rem; }

/* Ticket derecho */
.pos-right {
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 62px);
}
.ticket-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.channel-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 14px 6px;
  background: #10121b;
  border-bottom: 1px solid var(--border);
}
.ch-btn {
  padding: 7px 4px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}
.ch-btn.active { background: var(--accent-soft); border-color: var(--accent); color: #ff8dc7; }

.delivery-box {
  padding: 8px 14px;
  background: #121524;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.delivery-box input, .delivery-box select { padding: 7px 9px; font-size: 0.82rem; width: 100%; }

.ticket-items { flex: 1; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.ticket-empty { margin: auto; text-align: center; color: var(--muted); font-size: 0.88rem; padding: 18px; }
.cart-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cart-info { flex: 1; }
.cart-name { font-size: 0.86rem; font-weight: 700; }
.cart-sub { font-size: 0.76rem; color: var(--muted); margin-top: 2px; }
.qty-ctrl { display: flex; align-items: center; gap: 5px; }
.qty-btn { width: 26px; height: 26px; border-radius: 7px; background: var(--bg); color: var(--text); border: 1px solid var(--border); font-weight: 800; }
.qty-val { min-width: 20px; text-align: center; font-weight: 700; font-size: 0.9rem; }

.ticket-footer {
  border-top: 1px solid var(--border);
  padding: 12px 14px;
  background: #0d0f17;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* Discount panel (ONLY Patrón/Admin) */
.discount-box {
  background: rgba(255, 20, 138, 0.08);
  border: 1px dashed rgba(255, 20, 138, 0.45);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.discount-row { display: flex; gap: 6px; align-items: center; }
.discount-row select { width: 64px; padding: 6px; font-size: 0.82rem; }
.discount-row input { flex: 1; padding: 6px 8px; font-size: 0.84rem; min-width: 0; }

.total-summary { display: flex; flex-direction: column; gap: 3px; }
.sub-row { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); }
.sub-row.disc { color: #ff8dc7; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; }
.total-label { font-size: 0.9rem; color: var(--muted); font-weight: 700; }
.total-amount { font-size: 1.85rem; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; }

.pay-methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pay-btn {
  padding: 8px 4px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.76rem;
}
.pay-btn.active { background: var(--green-soft); border-color: var(--green); color: var(--green); }

.cash-calc { display: flex; flex-direction: column; gap: 7px; }
.quick-bills { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.bill-btn { padding: 7px 3px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: 0.76rem; font-weight: 700; }
.bill-btn:hover { border-color: var(--green); }
.cash-input-row { display: flex; gap: 8px; align-items: center; }
.cash-input-row input { width: 130px; padding: 8px 9px; font-weight: 700; }
.change-box { flex: 1; text-align: right; }
.change-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; }
.change-val { font-size: 1.15rem; font-weight: 900; color: var(--green); }
.change-val.short { color: var(--red); }

/* Combined payment panel */
.combo-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.combo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.combo-field label { display: block; font-size: 0.68rem; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.combo-field input { width: 100%; padding: 7px 8px; font-size: 0.88rem; font-weight: 700; }
.combo-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.combo-status.ok { color: var(--green); }
.combo-status.err { color: var(--red); }

.btn-charge { width: 100%; padding: 14px; border-radius: 12px; font-size: 1.08rem; letter-spacing: 0.4px; }

/* ================= MODO PATRÓN / ADMIN ================= */
#screen-patron { background: var(--bg); min-height: 100vh; padding-bottom: 48px; }
.patron-tabs {
  background: #0d0f17;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 62px;
  z-index: 25;
}
.ptab-btn {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.83rem;
}
.ptab-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.patron-wrap { max-width: 960px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.patron-narrow { max-width: 640px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 16px; }

.hero-cash {
  background: linear-gradient(145deg, #102620 0%, #13151e 70%);
  border: 1px solid rgba(16, 185, 129, 0.42);
  border-radius: 20px;
  padding: 20px 18px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}
.hero-kicker { font-size: 0.74rem; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; color: var(--green); }
.hero-money { font-size: 2.6rem; font-weight: 900; color: #fff; margin: 4px 0; font-variant-numeric: tabular-nums; }
.hero-sub { font-size: 0.78rem; color: var(--muted); margin-bottom: 14px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.kpi-box { background: rgba(8, 9, 13, 0.62); border: 1px solid var(--border); border-radius: 12px; padding: 10px 8px; text-align: center; }
.kpi-label { font-size: 0.69rem; color: var(--muted); margin-bottom: 3px; text-transform: uppercase; }
.kpi-val { font-size: 1rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.kpi-val.pos { color: var(--green); }
.kpi-val.neg { color: var(--amber); }
.kpi-val.pink { color: #ff8dc7; }

.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.section-title { font-size: 0.88rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); }

/* Close Verdict */
.close-verdict {
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.close-verdict.faltante { border-color: var(--red); background: linear-gradient(145deg, #2b1318 0%, var(--surface) 100%); }
.close-verdict.perfecto { border-color: var(--green); background: linear-gradient(145deg, #102821 0%, var(--surface) 100%); }
.close-verdict.sobrante { border-color: var(--blue); background: linear-gradient(145deg, #121f33 0%, var(--surface) 100%); }
.verdict-badge { display: inline-block; padding: 5px 12px; border-radius: 999px; font-weight: 900; font-size: 0.88rem; margin: 8px 0; }
.faltante .verdict-badge { background: var(--red); color: #fff; }
.perfecto .verdict-badge { background: var(--green); color: #052e16; }
.sobrante .verdict-badge { background: var(--blue); color: #fff; }
.verdict-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 8px; font-size: 0.86rem; }
.verdict-cell { background: rgba(0,0,0,0.3); padding: 9px; border-radius: 10px; }
.verdict-cell small { display: block; color: var(--muted); font-size: 0.72rem; }
.verdict-cell strong { font-size: 1.08rem; }

/* Alerts & Feed */
.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert-item {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.84rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.alert-item.warn { background: var(--amber-soft); border: 1px solid rgba(245,158,11,0.3); color: #fde68a; }
.alert-item.danger { background: var(--red-soft); border: 1px solid rgba(239,68,68,0.35); color: #fecaca; }
.alert-item.info { background: var(--blue-soft); border: 1px solid rgba(59,130,246,0.35); color: #bfdbfe; }
.alert-right { display: flex; align-items: center; gap: 8px; }

.feed-list { display: flex; flex-direction: column; gap: 9px; }
.feed-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 11px 13px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.feed-card.fresh { animation: flashGreen 1.8s ease; }
@keyframes flashGreen {
  0% { background: rgba(16, 185, 129, 0.4); border-color: var(--green); }
  100% { background: var(--surface-2); border-color: var(--border); }
}
.feed-time {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin-bottom: 5px;
}
.feed-desc { font-size: 0.88rem; font-weight: 600; color: var(--text); line-height: 1.35; }
.feed-meta { font-size: 0.75rem; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.feed-right { text-align: right; white-space: nowrap; }
.feed-amount { font-size: 1.1rem; font-weight: 900; color: var(--green); }
.feed-amount.expense { color: var(--amber); }
.pay-tag { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-top: 2px; display: block; }

/* Tables in Reports & Inventory */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.data-table th, .data-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.data-table th { color: var(--muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.6px; background: #10121b; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.badge-sm { display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: 0.72rem; font-weight: 700; }
.badge-warn { background: var(--amber-soft); color: var(--amber); }
.badge-ok { background: var(--green-soft); color: var(--green); }
.badge-err { background: var(--red-soft); color: var(--red); }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar input[type="date"] { padding: 8px 10px; font-size: 0.85rem; }

/* Settings Grid */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 7px;
}

/* ================= MODALES ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
  overflow-y: auto;
}
.modal-box {
  width: 100%;
  max-width: 470px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal-title { font-size: 1.15rem; font-weight: 800; }
.modal-sub { font-size: 0.85rem; color: var(--muted); line-height: 1.4; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; flex-wrap: wrap; }

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #10b981;
  color: #052e16;
  font-weight: 800;
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.45);
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  text-align: center;
  max-width: 92vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

@media (max-width: 920px) {
  .pos-layout { grid-template-columns: 1fr; height: auto; }
  .pos-right { height: auto; border-left: none; border-top: 1px solid var(--border); }
}

/* ================= ÁREA DE IMPRESIÓN DEDICADA ================= */
#print-area { display: none; }

@media print {
  body { background: #fff !important; color: #000 !important; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; color: #000; background: #fff; width: 100%; }

  /* Ticket térmico 80mm / 58mm */
  .print-ticket {
    width: 74mm;
    margin: 0 auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    line-height: 1.32;
    color: #000;
  }
  .print-ticket .tk-center { text-align: center; }
  .print-ticket .tk-line { border-top: 1px dashed #000; margin: 6px 0; }
  .print-ticket table { width: 100%; border-collapse: collapse; }
  .print-ticket td { padding: 2px 0; vertical-align: top; }
  .print-ticket .r { text-align: right; white-space: nowrap; }

  /* Hoja Carta (Formato Semanal EROTIC'X / Inventario / Contingencia) */
  .print-sheet {
    width: 100%;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    color: #000;
  }
  .print-sheet h2 { font-size: 15px; margin-bottom: 3px; }
  .print-sheet .sh-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000;
    padding-bottom: 6px;
    margin-bottom: 8px;
  }
  .print-sheet table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
  .print-sheet th, .print-sheet td {
    border: 1px solid #000;
    padding: 3px 4px;
    text-align: center;
    font-size: 9px;
  }
  .print-sheet th { background: #e5e7eb !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-weight: 700; }
  .print-sheet td.left, .print-sheet th.left { text-align: left; }
  .print-sheet tr.total-tr td { font-weight: 800; background: #fce7f3 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
