/* ===== Tokens ===== */
.win {
  --side: #1f403b; --side-2: #2b524b; --side-tx: #e9efe9;
  --gold: #b8913a; --gold-2: #d6b467; --gold-soft: #efe3c4;
  --bg: #f6f4ef; --card: #dfe5e0; --card-2: #eaeeea; --input: #e3e8e4;
  --ink: #151716; --ink-2: #59625f; --ink-3: #8b9490; --line: #cdd5cf;
  --red: #8e3434; --green: #2d8a57; --blue: #2f6f8f;
  --chart-1: #1f403b; --chart-2: #c9a24a; --chart-3: #8e3434;
}
.win.is-dark {
  --bg: #121a19; --card: #1f2b29; --card-2: #182220; --input: #243331;
  --ink: #eef1ed; --ink-2: #a9b5b0; --ink-3: #74817c; --line: #2e3e3a;
  --gold-soft: #3a321f; --chart-1: #6fb3a5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Poppins", system-ui, sans-serif; background: #dfe3df; color: #151716; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--gold, #b8913a); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.demobar { display: flex; align-items: center; gap: 1rem; padding: 8px 16px; background: #f4f4f6; font: 500 13px "Outfit", sans-serif; }
.demobar span { flex: 1; text-align: center; color: #4a4950; }
.demobar__cta { background: #0d0c10; color: #fff; padding: 6px 14px; border-radius: 99px; font-weight: 600; }

/* ===== Ventana ===== */
.stage { padding: 18px; overflow-x: auto; }
.win {
  max-width: 1480px; min-width: 980px; margin: 0 auto; height: calc(100svh - 60px - 36px); min-height: 660px;
  background: #0d0f0e; border-radius: 34px; padding: 10px; display: flex; flex-direction: column;
  box-shadow: 0 40px 80px -40px rgba(20, 40, 35, .5);
}
.titlebar { display: flex; justify-content: space-between; align-items: center; padding: 2px 14px 8px; color: #9aa5a0; font-size: 12px; }
.titlebar__name { display: flex; align-items: center; gap: 8px; }
.logo-mini { width: 18px; height: 18px; border-radius: 6px; background: #b8913a; color: #fff; font: italic 600 12px "Playfair Display", serif; display: grid; place-items: center; }
.titlebar__btns { display: flex; gap: 14px; }
.titlebar__btns i { width: 11px; height: 11px; border-radius: 50%; background: #3b4441; }
.titlebar__btns i:last-child { background: #a8463b; }
.narrow-note { display: none; text-align: center; color: #59625f; font-size: 13px; margin-top: 10px; }
@media (max-width: 1000px) { .narrow-note { display: block; } }

.app { flex: 1; min-height: 0; border-radius: 24px; overflow: hidden; background: var(--bg); color: var(--ink); display: grid; grid-template-columns: 236px 1fr; transition: background .3s, color .3s; }
.app.is-login { grid-template-columns: 1fr 1fr; }
.win.fs-sm .app { zoom: .92; }
.win.fs-lg .app { zoom: 1.08; }

/* ===== Login ===== */
.login-art { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px; background: var(--bg); text-align: center; }
.login-art svg { width: min(420px, 90%); height: auto; }
.login-art h2 { font-size: 24px; max-width: 360px; line-height: 1.3; min-height: 62px; }
.dots { display: flex; gap: 8px; justify-content: center; }
.dots button { width: 10px; height: 10px; border-radius: 99px; background: var(--line); transition: .3s; }
.dots button.on { width: 30px; background: var(--gold); }
.login-form { background: var(--card); display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(32px, 6vw, 90px); gap: 14px; }
.login-form h1 { font-size: 34px; line-height: 1.1; }
.login-form > p { color: var(--ink-2); font-size: 13px; margin-top: -8px; margin-bottom: 8px; }
.field { position: relative; }
.field input { width: 100%; background: var(--card-2); border: 1.5px solid transparent; border-radius: 12px; padding: 15px 16px; outline: 0; font-size: 15px; }
.field input:focus { border-color: var(--gold); }
.field input[aria-invalid="true"] { border-color: var(--red); }
.field .eye { position: absolute; right: 12px; top: 50%; translate: 0 -50%; color: var(--ink-3); padding: 4px; }
.btn-gold { background: var(--gold); color: #1a1408; font-weight: 600; border-radius: 12px; padding: 14px 18px; transition: background .2s, transform .15s; text-align: center; }
.btn-gold:hover { background: var(--gold-2); }
.btn-gold:active { transform: scale(.98); }
.btn-gold[disabled] { opacity: .5; pointer-events: none; }
.btn-line { border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 16px; font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--card-2); transition: border-color .2s; }
.btn-line:hover { border-color: var(--gold); }
.btn-danger { color: var(--red); }
.or { text-align: center; color: var(--ink-3); font-size: 13px; }
.socials { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.login-links { text-align: center; font-size: 13px; color: var(--ink-2); display: grid; gap: 6px; }
.login-links button { color: var(--blue); }
.login-hint { text-align: center; font-size: 12px; background: var(--gold-soft); border-radius: 10px; padding: 8px; color: var(--ink-2); }
.login-err { color: var(--red); font-size: 13px; min-height: 1.2em; }
.login-foot { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 16px; }

/* ===== Barra lateral ===== */
.side { background: var(--side); color: var(--side-tx); display: flex; flex-direction: column; padding: 24px 16px 16px; gap: 4px; min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }
.brand__mark { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--gold-2); display: grid; place-items: center; color: var(--gold-2); font: italic 600 22px "Playfair Display", serif; }
.brand b { font: italic 600 22px "Playfair Display", serif; color: var(--gold-2); }
.nav-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; text-align: left; color: #d7e1dc; transition: background .2s, color .2s; position: relative; }
.nav-btn:hover { background: var(--side-2); color: #fff; }
.nav-btn.is-active { background: var(--gold); color: #fff; }
.nav-btn .count { margin-left: auto; background: var(--gold); color: #1a1408; font-size: 11px; font-weight: 600; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }
.nav-btn.is-active .count { background: #fff; }
.side hr { border: 0; border-top: 1px solid rgba(255,255,255,.12); margin: 12px 8px; }
.side small.lbl { font-size: 12px; color: #9fb2ab; padding: 0 12px 4px; }
.me { margin-top: auto; background: var(--side-2); border-radius: 20px; padding: 18px 12px; text-align: center; display: grid; gap: 4px; justify-items: center; }
.me b { font-size: 14px; }
.me small { font-size: 11px; color: #b5c5bf; }
.me .btn-pill { margin-top: 6px; background: rgba(0,0,0,.2); padding: 6px 16px; border-radius: 99px; font-size: 12px; font-weight: 500; }
.me .btn-pill:hover { background: rgba(0,0,0,.35); }
.copy { text-align: center; font-size: 11px; color: #9fb2ab; margin-top: 10px; }

.av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; color: #fff; flex: none; }
.av--lg { width: 64px; height: 64px; font-size: 22px; }
.av--xl { width: 120px; height: 120px; font-size: 40px; border: 4px solid var(--gold-soft); }
.av-stack { display: flex; }
.av-stack .av { width: 32px; height: 32px; font-size: 11px; border: 2px solid var(--card); }
.av-stack .av + .av { margin-left: -12px; margin-top: 14px; }

/* ===== Área principal ===== */
.main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.top { display: flex; align-items: center; gap: 16px; padding: 18px 26px 6px; }
.back { width: 40px; height: 34px; border-radius: 8px; background: var(--card); display: grid; place-items: center; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.crumbs b { color: var(--ink); font-weight: 600; }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; transition: background .2s; }
.icon-btn:hover { background: var(--card); }
.icon-btn .dot { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--gold); color: #1a1408; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 3px; }
.clock { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 10px; padding: 0 12px; width: 220px; color: var(--ink-3); }
.search input { border: 0; outline: 0; background: none; padding: 9px 0; width: 100%; color: var(--ink); font-size: 13px; }
.view { flex: 1; min-height: 0; overflow: auto; padding: 8px 26px 24px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.view-title { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.view-title h1 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.view-title .grow { flex: 1; }

/* Notificaciones */
.notif-pop { position: absolute; top: 46px; right: 0; width: 320px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 40px -16px rgba(0,0,0,.3); padding: 10px; z-index: 30; display: grid; gap: 4px; }
.notif-pop h4 { font-size: 14px; padding: 6px 8px; display: flex; justify-content: space-between; }
.notif-pop h4 button { font-size: 12px; color: var(--gold); font-weight: 500; }
.notif { display: flex; gap: 10px; padding: 10px; border-radius: 12px; font-size: 13px; text-align: left; width: 100%; }
.notif:hover { background: var(--card-2); }
.notif.unread { background: var(--gold-soft); }
.notif span { font-size: 18px; }
.notif small { display: block; color: var(--ink-3); font-size: 11px; }

/* ===== Tarjetas ===== */
.card { background: var(--card); border-radius: 22px; padding: 18px 20px; min-width: 0; }
.card h3 { font-size: 16px; font-weight: 600; }
.card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; }
.mini-select { background: var(--card-2); border: 0; border-radius: 8px; padding: 5px 10px; font-size: 12px; outline: 0; }

/* Dashboard */
.periods { display: flex; gap: 4px; border-bottom: 2px solid var(--line); }
.periods button { padding: 6px 14px; font-size: 13px; font-weight: 500; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.periods button.is-active { color: var(--ink); border-color: var(--gold); }
.dash { display: grid; grid-template-columns: 1.25fr 1fr .8fr; grid-template-rows: auto auto; gap: 14px; }
.dash .stack { display: grid; gap: 14px; }
.dash .wide { grid-column: span 1; }
.dash-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-size: 10px; fill: var(--ink-2); font-family: inherit; }
.chart .grid line { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .ln { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart .hover-line { stroke: var(--ink-3); stroke-dasharray: 2 3; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 11px; padding: 6px 9px; border-radius: 8px; white-space: nowrap; translate: -50% -110%; opacity: 0; transition: opacity .15s; }
.tip.on { opacity: 1; }
.legend { display: flex; justify-content: center; gap: 14px; font-size: 12px; font-weight: 500; margin-top: 8px; flex-wrap: wrap; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }
.donut { position: relative; width: 190px; margin: 6px auto 0; }
.donut svg { width: 100%; height: auto; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 22; transition: stroke-dasharray .6s ease, stroke-dashoffset .6s ease; }
.donut b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 700; }
.kpi { display: grid; gap: 4px; }
.kpi__head { display: flex; gap: 10px; align-items: flex-start; }
.kpi__sq { width: 26px; height: 26px; border-radius: 5px; flex: none; }
.kpi__head b { font-size: 13px; font-weight: 600; display: block; }
.kpi__head small { font-size: 11px; font-weight: 600; }
.up { color: var(--green); }
.down { color: #c0392b; }
.kpi__num { font-size: 30px; font-weight: 700; text-align: center; margin: 6px 0; }
.kpi__bars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi__bars i { height: 3px; border-radius: 2px; background: var(--ink); }
.list-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.row { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.row__txt { flex: 1; min-width: 0; }
.row__txt b { font-size: 13px; font-weight: 600; display: block; }
.row__txt small { font-size: 11px; color: var(--ink-2); }
.row__val { font-weight: 700; font-size: 15px; }
.tag { display: inline-block; font-size: 9px; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: var(--side); color: #fff; margin-bottom: 1px; }
.tag--gold { background: var(--gold); }
.plate { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; background: radial-gradient(circle at 40% 35%, #fff, #e8e2d6); flex: none; box-shadow: 0 2px 6px -2px rgba(0,0,0,.3); }

/* ===== Comida y bebidas ===== */
.food { display: grid; grid-template-columns: 1fr 330px; gap: 18px; height: 100%; min-height: 0; }
.food__left { min-height: 0; display: flex; flex-direction: column; }
.cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cat { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; background: var(--card); font-size: 13px; font-weight: 500; transition: .2s; }
.cat.is-active { background: var(--side); color: #fff; }
.prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; overflow: auto; padding: 2px 4px 10px 2px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.prod { position: relative; background: var(--card); border-radius: 22px; padding: 18px 12px 14px; text-align: center; display: grid; justify-items: center; gap: 2px; transition: background .2s, transform .2s; animation: pop .3s both; }
.prod:hover { transform: translateY(-3px); }
.prod.is-active { background: var(--gold); }
.prod .dish { width: 96px; height: 96px; font-size: 52px; margin-bottom: 8px; }
.prod b { font-size: 14px; font-weight: 600; }
.prod small { font-size: 11px; color: var(--ink-2); }
.prod .price { font-size: 19px; font-weight: 700; color: var(--gold); margin-top: 4px; }
.prod.is-active .price, .prod.is-active small { color: var(--ink); }
.prod .quick { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 8px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; font-size: 18px; font-weight: 700; }
.prod.is-active .quick { background: #fff; }
.dish { border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 42% 35%, #ffffff, #ebe5d9 60%, #d5cdbd); box-shadow: 0 10px 18px -10px rgba(0,0,0,.45), inset 0 -4px 8px rgba(0,0,0,.06); }
.dish span { filter: drop-shadow(0 6px 6px rgba(0,0,0,.25)); }

.ticket { background: var(--card); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; min-height: 0; }
.ticket h3 { font-size: 17px; display: flex; justify-content: space-between; align-items: center; }
.ticket__cfg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.ticket__cfg label { font-size: 11px; color: var(--ink-2); display: grid; gap: 3px; }
.ticket__cfg select, .ticket__cfg input { background: var(--card-2); border: 0; border-radius: 8px; padding: 8px; font-size: 13px; outline: 0; width: 100%; }
.ticket__cfg .full { grid-column: 1 / -1; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--card-2); border-radius: 10px; padding: 3px; }
.seg button { padding: 7px 4px; border-radius: 8px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.seg button.is-active { background: var(--side); color: #fff; }
.ticket__items { flex: 1; overflow: auto; min-height: 60px; margin: 0 -6px; padding: 0 6px; }
.ti { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); animation: pop .25s both; }
.ti .plate { width: 34px; height: 34px; font-size: 17px; }
.ti__txt { flex: 1; min-width: 0; font-size: 13px; }
.ti__txt b { font-weight: 600; display: block; }
.ti__txt small { color: var(--ink-3); font-size: 11px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qty { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.qty button { width: 24px; height: 24px; border-radius: 6px; background: var(--card-2); display: grid; place-items: center; font-weight: 700; }
.qty button.plus { background: var(--gold-soft); color: var(--gold); }
.ticket__sum { display: grid; gap: 4px; font-size: 13px; padding-top: 10px; }
.ticket__sum div { display: flex; justify-content: space-between; color: var(--ink-2); }
.ticket__sum .tot { color: var(--ink); font-weight: 700; font-size: 18px; }
.ticket .btn-gold { margin-top: 10px; }
.empty { text-align: center; color: var(--ink-3); font-size: 13px; padding: 30px 10px; }
.empty span { font-size: 34px; display: block; margin-bottom: 6px; }

/* Panel deslizable de producto */
.drawer-bg { position: absolute; inset: 0; background: rgba(20, 30, 28, .35); z-index: 20; animation: fade .2s; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 400px; background: var(--card); z-index: 21; border-radius: 26px 0 0 26px; padding: 28px; display: flex; flex-direction: column; gap: 6px; animation: slide .3s cubic-bezier(.2, .8, .2, 1); overflow: auto; }
.drawer .dish { width: 170px; height: 170px; font-size: 96px; margin: 10px auto 12px; }
.drawer h2 { text-align: center; font-size: 22px; }
.drawer > small { text-align: center; color: var(--ink-2); }
.drawer .big-price { text-align: center; font-size: 28px; font-weight: 700; color: var(--gold); margin: 8px 0 14px; }
.drawer h4 { font-size: 13px; color: var(--ink-2); font-weight: 500; margin: 6px 0 4px; }
.addon { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.addon span { flex: 1; font-size: 14px; font-weight: 600; }
.addon span small { display: block; font-size: 11px; color: var(--ink-3); font-weight: 400; }
.drawer textarea { background: var(--card-2); border: 0; border-radius: 10px; padding: 10px; font-size: 13px; resize: none; outline: 0; }
.drawer .btn-gold { margin-top: auto; }
.drawer__close { position: absolute; top: 16px; left: 16px; }
.drawer__main-qty { justify-content: center; margin: 4px 0 10px; font-size: 16px; }
.drawer__main-qty button { width: 32px; height: 32px; }

/* ===== Mensajes ===== */
.msgs { display: grid; grid-template-columns: 340px 1fr; height: 100%; min-height: 0; margin: -8px -26px -24px; }
.msgs__list { padding: 8px 18px 18px 26px; overflow: auto; scrollbar-width: thin; }
.msgs__list h4 { font-size: 16px; font-weight: 600; margin: 10px 0 8px; }
.conv { display: flex; gap: 12px; width: 100%; text-align: left; background: var(--card); border-radius: 18px; padding: 14px; margin-bottom: 10px; border: 1.5px solid transparent; transition: border-color .2s; }
.conv.is-active { border-color: var(--gold); }
.conv__txt { flex: 1; min-width: 0; }
.conv__txt div { display: flex; justify-content: space-between; gap: 6px; }
.conv__txt b { font-size: 14px; font-weight: 600; }
.conv__txt time { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.conv__txt p { font-size: 12px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.conv__txt p strong { color: var(--ink); font-weight: 600; }
.unread { margin-left: auto; align-self: flex-end; background: #b03a2e; color: #fff; font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; }
.chat { background: var(--card); display: flex; flex-direction: column; min-height: 0; }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.chat__head b { font-size: 15px; }
.chat__head small { display: block; font-size: 11px; color: var(--green); }
.chat__head .acts { margin-left: auto; display: flex; gap: 6px; }
.chat__body { flex: 1; overflow: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; }
.day-sep { align-self: center; font-size: 11px; background: var(--card-2); padding: 3px 10px; border-radius: 6px; color: var(--ink-2); }
.bubble { display: flex; gap: 10px; max-width: 75%; align-items: flex-start; animation: pop .25s both; }
.bubble .av { width: 34px; height: 34px; font-size: 11px; }
.bubble__in { background: var(--bg); border-radius: 4px 14px 14px 14px; padding: 9px 12px; font-size: 13px; }
.bubble__in b { display: block; font-size: 12px; }
.bubble time { display: block; font-size: 10px; color: var(--ink-3); margin-top: 3px; }
.bubble--mine { align-self: flex-end; flex-direction: row-reverse; }
.bubble--mine .bubble__in { border-radius: 14px 4px 14px 14px; text-align: right; }
.bubble--mine time::after { content: " ✓✓"; color: var(--green); }
.typing { font-size: 12px; color: var(--ink-3); font-style: italic; }
.chat__input { display: flex; gap: 10px; padding: 14px 20px; align-items: center; }
.chat__input div { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 12px; padding: 0 12px; color: var(--ink-3); }
.chat__input input { flex: 1; border: 0; outline: 0; background: none; padding: 12px 0; font-size: 13px; color: var(--ink); }
.send { width: 44px; height: 44px; border-radius: 12px; background: var(--gold); color: #1a1408; display: grid; place-items: center; }

/* ===== Cuentas ===== */
.bills { display: grid; grid-template-columns: 380px 1fr; height: 100%; min-height: 0; margin: -8px -26px -24px; }
.bills__list { padding: 8px 18px 0 26px; display: flex; flex-direction: column; min-height: 0; }
.filters { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; }
.filters select { background: none; border: 0; font-size: 13px; outline: 0; font-weight: 500; }
.orders { flex: 1; overflow: auto; display: grid; gap: 10px; align-content: start; padding-bottom: 10px; scrollbar-width: thin; }
.order { background: var(--card); border-radius: 16px; padding: 14px 16px; text-align: left; border: 1.5px solid transparent; display: grid; gap: 6px; transition: border-color .2s; animation: pop .25s both; }
.order.is-active { border-color: var(--gold); }
.order div { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.order b { font-size: 15px; font-weight: 600; }
.order .amt { font-size: 16px; font-weight: 700; }
.order small { font-size: 12px; color: var(--ink-2); }
.st { font-size: 10px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st--active { color: var(--gold); }
.st--paid { color: var(--green); }
.st--cancelled { color: #c0392b; }
.bills__search { margin: 10px 0 14px; }
.bills__search .search { width: 100%; }
.bill { background: var(--card); padding: 18px 26px 22px; display: flex; flex-direction: column; min-height: 0; overflow: auto; }
.bill__head { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 16px; }
.bill__head h2 { font-size: 24px; }
.pill { padding: 7px 18px; border-radius: 10px; font-size: 13px; font-weight: 600; background: var(--gold); color: #1a1408; }
.pill--paid { background: var(--green); color: #fff; }
.pill--cancelled { background: #c0392b; color: #fff; }
.bill h4 { font-size: 16px; font-weight: 600; margin: 4px 0 12px; }
.details { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.details small { font-size: 12px; color: var(--ink-2); display: block; }
.details b { font-size: 16px; font-weight: 600; }
.items-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.bi { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.bi b { flex: 1; font-weight: 600; }
.bi .plate { border-radius: 8px; }
.bill__total { display: flex; justify-content: space-between; font-weight: 700; font-size: 16px; padding: 12px 0; }
.bill__acts { margin-top: auto; display: grid; grid-template-columns: auto 1fr; gap: 10px; padding-top: 10px; }

/* ===== Ajustes y perfil ===== */
.settings { display: grid; grid-template-columns: 310px 1fr; gap: 26px; min-height: 100%; }
.set-nav { background: var(--card); border-radius: 22px; padding: 26px 16px; display: grid; align-content: start; gap: 4px; }
.set-nav button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; text-align: left; color: var(--ink-2); }
.set-nav button.is-active { color: var(--ink); font-weight: 600; background: var(--card-2); }
.set-pane { padding: 20px 6px 0; display: flex; flex-direction: column; }
.set-pane h3 { font-size: 18px; font-weight: 600; }
.set-pane > p { font-size: 13px; color: var(--ink-2); margin: 2px 0 18px; }
.tbl-head, .tbl-row { display: grid; grid-template-columns: 1fr 90px 90px; align-items: center; gap: 10px; }
.tbl-head { font-size: 12px; color: var(--ink-2); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.tbl-head span:not(:first-child), .tbl-row > *:not(:first-child) { justify-self: center; }
.tbl-row { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.switch { width: 52px; height: 28px; border-radius: 14px; background: var(--gold-soft); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch[aria-checked="true"] { background: var(--gold); }
.switch[aria-checked="true"]::after { left: 28px; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.set-row small { display: block; font-size: 12px; color: var(--ink-2); font-weight: 400; }
.set-row select, .set-row input[type="number"] { background: var(--card); border: 0; border-radius: 8px; padding: 7px 10px; font-size: 13px; outline: 0; }
.set-sub { font-size: 15px; font-weight: 600; margin: 18px 0 4px; }
.set-pane .btn-gold { margin-top: auto; margin-bottom: 4px; }
.set-pane .save-wrap { margin-top: 26px; display: grid; }

.profile { display: grid; grid-template-columns: 310px 1fr; gap: 26px; }
.prof-card { background: var(--card); border-radius: 22px; padding: 26px 20px; display: grid; justify-items: center; align-content: start; gap: 4px; text-align: center; }
.prof-card h3 { font-size: 18px; margin-top: 10px; }
.prof-card > small { font-size: 13px; color: var(--ink-2); }
.prof-stats { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 14px; margin: 18px 0; width: 100%; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.prof-stats i { background: var(--line); }
.prof-stats b { font-size: 22px; display: block; }
.prof-stats small { font-size: 12px; color: var(--ink-2); }
.prof-links { width: 100%; display: grid; gap: 2px; }
.prof-links button { display: flex; gap: 10px; align-items: center; padding: 9px 6px; font-size: 14px; color: var(--ink-2); text-align: left; border-radius: 8px; }
.prof-links button.is-active { color: var(--ink); font-weight: 600; }
.prof-links button:hover { background: var(--card-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { display: grid; gap: 5px; font-size: 12px; color: var(--ink-2); font-weight: 500; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid input, .form-grid select { background: var(--card); border: 1.5px solid transparent; border-radius: 10px; padding: 11px 12px; font-size: 14px; color: var(--ink); outline: 0; }
.form-grid input:focus { border-color: var(--gold); }
.verified { position: relative; }
.verified::after { content: "✓ Verificado"; position: absolute; right: 12px; bottom: 12px; font-size: 11px; color: var(--green); font-weight: 600; }
.radios { display: flex; gap: 26px; margin-bottom: 14px; font-size: 14px; font-weight: 500; }
.radios label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.radios input { accent-color: var(--gold); width: 16px; height: 16px; }

/* ===== Diálogos ===== */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(15, 25, 22, .55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.overlay[hidden] { display: none; }
.dialog { width: min(460px, 100%); background: #f6f4ef; color: #151716; border-radius: 24px; padding: 26px; outline: 0; animation: rise .3s cubic-bezier(.2, .8, .2, 1); max-height: 92vh; overflow: auto; font-family: "Poppins", sans-serif; }
.dialog h3 { font-size: 20px; margin-bottom: 4px; }
.dialog > p { color: #59625f; font-size: 13px; margin-bottom: 14px; }
.pay-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.pay-tabs button { padding: 12px 6px; border-radius: 14px; background: #e3e8e4; font-size: 13px; font-weight: 600; display: grid; gap: 4px; justify-items: center; border: 1.5px solid transparent; }
.pay-tabs button span { font-size: 22px; }
.pay-tabs button.is-active { border-color: #b8913a; background: #efe3c4; }
.pay-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 6px 0; }
.pay-row.big { font-size: 22px; font-weight: 700; border-top: 1px dashed #cdd5cf; margin-top: 6px; padding-top: 12px; }
.tips { display: flex; gap: 6px; }
.tips button { padding: 6px 12px; border-radius: 8px; background: #e3e8e4; font-size: 13px; font-weight: 600; }
.tips button.is-active { background: #1f403b; color: #fff; }
.cash-in { width: 100%; font-size: 22px; font-weight: 700; padding: 12px; border-radius: 12px; border: 1.5px solid #cdd5cf; background: #fff; outline: 0; margin: 6px 0; }
.cash-in:focus { border-color: #b8913a; }
.quick-cash { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.quick-cash button { padding: 6px 12px; border-radius: 8px; background: #e3e8e4; font-size: 13px; font-weight: 600; }
.terminal { text-align: center; padding: 18px; background: #e3e8e4; border-radius: 16px; margin-bottom: 8px; font-size: 14px; }
.terminal span { font-size: 40px; display: block; animation: bob 1.4s ease-in-out infinite; }
.dialog-acts { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 16px; }
.dialog .btn-line { background: #fff; border-color: #cdd5cf; }
.dialog .btn-gold { background: #b8913a; color: #1a1408; }

.receipt { background: #fff; color: #222; font: 13px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; padding: 22px 18px; border-radius: 8px; box-shadow: 0 6px 20px -10px rgba(0,0,0,.3); margin: 4px 0 6px;
  mask: linear-gradient(#000 0 0) top/100% calc(100% - 8px) no-repeat, radial-gradient(circle 5px at 50% 100%, transparent 98%, #000) bottom/12px 8px repeat-x; }
.receipt h4 { text-align: center; font-size: 16px; }
.receipt .c { text-align: center; }
.receipt hr { border: 0; border-top: 1px dashed #999; margin: 8px 0; }
.receipt .r { display: flex; justify-content: space-between; gap: 10px; }
.receipt .r.t { font-weight: 700; font-size: 15px; }
.receipt-print { display: none; }

.toast { position: fixed; left: 50%; bottom: 30px; translate: -50% 20px; z-index: 80; background: #1f403b; color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: .3s; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); }
.toast.on { opacity: 1; translate: -50% 0; }

@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes slide { from { transform: translateX(100%); } }
@keyframes bob { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Impresión del ticket */
@media print {
  body > *:not(.receipt-print) { display: none !important; }
  .receipt-print { display: block !important; }
  .receipt-print .receipt { box-shadow: none; mask: none; width: 80mm; }
}
.av--conv { width: 48px; height: 48px; }
.soc { width: 20px; height: 20px; border-radius: 50%; color: #fff; font: 700 12px Arial, sans-serif; display: grid; place-items: center; }
