/* Masarte · sistema visual
   Crema cálido, marrón horno, terracota de brasa y trazos manuscritos. */

:root {
  --cream: #F4EADC;
  --cream-2: #EFE2CF;
  --paper: #FFFBF5;
  --line: #E6D5BE;
  --line-strong: #D6BFA0;
  --brown: #4E2512;
  --brown-2: #6B3A1F;
  --ink: #3B2115;
  --muted: #8A6A55;
  --ember: #C9561A;
  --ember-2: #E0782E;
  --ember-soft: #F8DFC6;
  --olive: #5D7434;
  --olive-soft: #E7EBD2;
  --red: #A93A24;
  --red-soft: #F6DCD3;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-script: "Caveat", "Segoe Script", cursive;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(78, 37, 18, .04), 0 6px 18px -10px rgba(78, 37, 18, .28);
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background:
    radial-gradient(120% 60% at 50% -10%, #FBF4EA 0%, transparent 60%),
    var(--cream);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); color: var(--brown); margin: 0; font-weight: 700; letter-spacing: -.01em; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--ember-2); outline-offset: 2px; border-radius: 6px; }

.script { font-family: var(--font-script); font-weight: 700; color: var(--brown-2); }
.icon { flex: none; display: block; }

/* ---------- Shell & navegación ---------- */
.shell { min-height: 100dvh; }
.main {
  max-width: 680px;
  margin: 0 auto;
  padding: 12px 16px calc(var(--tabbar-h) + var(--safe-b) + 28px);
}

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  display: flex; justify-content: space-around;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding: 6px 4px var(--safe-b);
  background: rgba(255, 251, 245, .94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tabbar__brand { display: none; }
.tabbar__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  border-radius: 12px; min-width: 0;
}
.tabbar__item.is-active { color: var(--brown); }
.tabbar__item.is-active .icon { color: var(--ember); }
.tabbar__item.is-active::after {
  content: ""; width: 18px; height: 3px; border-radius: 3px; background: var(--ember); margin-top: 1px;
}
.tabbar__item:not(.is-active)::after { content: ""; height: 3px; margin-top: 1px; }

@media (min-width: 960px) {
  .tabbar {
    inset: 0 auto 0 0; width: 248px; height: auto;
    flex-direction: column; justify-content: flex-start; gap: 2px;
    padding: 24px 14px; border-top: 0; border-right: 1px solid var(--line);
  }
  .tabbar__brand {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 4px 8px 22px; margin-bottom: 10px; border-bottom: 1px solid var(--line);
  }
  .tabbar__brand .oven-mark { width: 88px; height: auto; }
  .tabbar__brand-name {
    font-family: var(--font-display); font-weight: 800; font-size: 30px; color: var(--brown);
    letter-spacing: .04em; text-transform: uppercase; line-height: 1; margin-top: 6px;
  }
  .tabbar__brand-tag { font-family: var(--font-script); font-weight: 700; font-size: 19px; color: var(--brown-2); margin-top: 4px; }
  .tabbar__item {
    flex: none; flex-direction: row; justify-content: flex-start; gap: 12px;
    padding: 11px 14px; font-size: 15px;
  }
  .tabbar__item:hover { background: var(--cream-2); color: var(--brown); }
  .tabbar__item.is-active { background: var(--ember-soft); }
  .tabbar__item::after, .tabbar__item:not(.is-active)::after { display: none; }
  .main { padding: 32px 32px 48px; margin-left: max(248px, calc(50vw - 340px + 124px)); margin-right: auto; }
}

/* ---------- Encabezados ---------- */
.page-header {
  display: flex; align-items: center; gap: 8px;
  min-height: 52px; margin: 4px 0 12px;
}
.page-header__title { font-size: 28px; line-height: 1.1; flex: 1; min-width: 0; overflow-wrap: break-word; }
.page-header__back { margin-left: -8px; }
.page-header__back, .icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 50%; color: var(--brown);
}
.icon-btn:hover, .page-header__back:hover { background: var(--cream-2); }
.page-header__actions { display: flex; gap: 6px; align-items: center; }

.hero { margin: -12px -16px 0; overflow: hidden; }
.hero__img { width: 100%; height: 132px; object-fit: cover; object-position: 50% 50%; }
@media (min-width: 560px) { .hero__img { height: auto; } }
@media (min-width: 960px) { .hero { margin: 0 0 4px; border-radius: var(--radius); box-shadow: var(--shadow); } }

.greeting { margin: 14px 0 12px; }
.greeting__hello { font-size: 30px; line-height: 1; margin: 0; }
.greeting__date { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 16px; cursor: pointer; text-align: center;
  transition: transform .08s ease, background-color .15s ease;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--ember); color: #FFF8F0; box-shadow: 0 6px 14px -8px rgba(201, 86, 26, .9); }
.btn--primary:hover { background: #B54B14; }
.btn--ghost { background: var(--paper); color: var(--brown); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--cream-2); }
.btn--text { background: none; color: var(--brown-2); min-height: 44px; }
.btn--danger { color: var(--red); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn--block { width: 100%; }
form.button_to { margin: 0; }

.link { color: var(--ember); font-weight: 700; font-size: 14px; }
.link:hover { text-decoration: underline; }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 8px; }
.quick-actions .btn { padding: 0 12px; white-space: nowrap; font-size: 15px; }
.actions-stack { display: grid; gap: 8px; margin-top: 20px; }

/* ---------- Tarjetas y estadísticas ---------- */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px;
}

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow); min-width: 0;
}
.stat--accent {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--brown) 0%, #6E3416 100%); border-color: transparent; color: #FBEBD9;
}
.stat__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.stat--accent .stat__label, .stat--accent .stat__hint { color: #E8C9A8; }
.stat__value { font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--brown); line-height: 1.15; overflow-wrap: anywhere; }
.stat--accent .stat__value { color: #FFF4E6; font-size: 38px; }
.stat__hint { font-size: 12.5px; color: var(--muted); }

.balance {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 18px 16px; border-radius: var(--radius); margin: 0 0 4px;
  background: var(--olive-soft); color: var(--olive);
}
.balance--debt { background: var(--ember-soft); color: var(--ember); }
.balance__label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.balance__value { font-family: var(--font-display); font-weight: 800; font-size: 36px; line-height: 1.1; color: var(--brown); }
.balance__hint { font-size: 14px; font-weight: 600; }

/* ---------- Secciones y listas ---------- */
.section { margin-top: 26px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section__title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 20px; color: var(--brown); margin: 0 0 10px;
}
.section__title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }
.section__head .section__title { flex: 1; }
.section__title--warn { color: var(--red); }

.list {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.row {
  display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 10px 14px;
  border-top: 1px solid var(--line);
}
.list > .row:first-child, .list > :first-child { border-top: 0; }
a.row:hover, .row__link:hover { background: #FBF3E8; }
.row.is-inactive { opacity: .55; }
.row--order { padding: 0; gap: 0; }
.row__link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 10px 14px; min-height: 64px; }
.row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row__title { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__meta { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row__amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--brown); }
.row__date { width: 44px; flex: none; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; line-height: 1.15; }
.row__chev { color: var(--line-strong); }
.row__icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--cream-2); color: var(--brown-2); flex: none; }
.row__action {
  align-self: stretch; width: 56px; flex: none; display: grid; place-items: center;
  background: none; border: 0; border-left: 1px solid var(--line); color: var(--olive); cursor: pointer;
}
.row__action:hover { background: var(--olive-soft); }
.row--order .button_to { display: flex; align-self: stretch; }
.row--order.is-cancelado .row__title { text-decoration: line-through; color: var(--muted); }

.amount--debt { color: var(--ember); }
.amount--credit { color: var(--olive); }

.avatar {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: var(--ember-soft); color: var(--brown-2);
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
}

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
}
.badge--pendiente { background: var(--ember-soft); color: #9A4012; }
.badge--entregado { background: var(--olive-soft); color: var(--olive); }
.badge--cancelado { background: var(--cream-2); color: var(--muted); }

.empty { text-align: center; padding: 26px 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); }
.empty .script { font-size: 24px; margin: 0 0 4px; }

.summary-line { color: var(--muted); font-size: 14px; margin: 0 0 10px; text-align: center; }
.summary-line strong { color: var(--brown); }

.note {
  background: #FFF6E0; border-left: 3px solid var(--ember-2); border-radius: 6px;
  padding: 8px 12px; margin: 10px 0 0; font-size: 14.5px;
}
.note p { margin: 0 0 6px; } .note p:last-child { margin: 0; }

/* ---------- Segmentos, buscador y selector de día ---------- */
.segmented {
  display: flex; gap: 4px; padding: 4px; margin: 0 0 14px;
  background: var(--cream-2); border-radius: 999px;
}
.segmented a {
  flex: 1; text-align: center; padding: 8px 10px; border-radius: 999px;
  font-size: 14px; font-weight: 700; color: var(--muted);
}
.segmented a.is-active { background: var(--paper); color: var(--brown); box-shadow: 0 1px 4px rgba(78, 37, 18, .15); }

.search {
  display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 0 14px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px; color: var(--muted);
}
.search input { flex: 1; border: 0; background: none; min-height: 46px; font: inherit; color: var(--ink); outline: none; }

.day-picker { display: flex; align-items: center; gap: 4px; margin: 0 0 10px; }
.day-picker__form { flex: 1; }
.day-picker__label { position: relative; display: flex; flex-direction: column; align-items: center; flex: 1; cursor: pointer; }
.day-picker__name { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--brown); }
.day-picker__date { font-size: 13px; color: var(--muted); }
.day-picker__input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }

/* ---------- Formularios ---------- */
.form { display: block; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; min-width: 0; border: 0; padding: 0; }
.card .field:last-child { margin-bottom: 0; }
.field label, .field legend { font-size: 14px; font-weight: 700; color: var(--brown-2); padding: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 380px) { .field-row { grid-template-columns: 1fr; } }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number],
input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: #FFFDF9; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  appearance: none; -webkit-appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B3A1F' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}
textarea { min-height: 0; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px rgba(224, 120, 46, .2); }
.input-prefix { display: flex; align-items: center; background: #FFFDF9; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding-left: 12px; }
.input-prefix span { color: var(--muted); font-weight: 700; }
.input-prefix input { border: 0; background: none; box-shadow: none !important; padding-left: 6px; }
.input-prefix:focus-within { border-color: var(--ember); box-shadow: 0 0 0 3px rgba(224, 120, 46, .2); }
.input-prefix--big input { font-family: var(--font-display); font-weight: 700; font-size: 22px; }

.switch { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-weight: 600; cursor: pointer; }
.switch input { width: 22px; height: 22px; accent-color: var(--ember); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span {
  display: inline-block; padding: 10px 16px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line-strong); background: #FFFDF9; font-weight: 700; color: var(--brown-2);
}
.pill input:checked + span { background: var(--brown); border-color: var(--brown); color: #FFF4E6; }
.pill input:focus-visible + span { outline: 3px solid var(--ember-2); outline-offset: 2px; }

/* Lista de cantidades del pedido */
.qty-list { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.qty-list__group {
  margin: 0; padding: 8px 14px; background: var(--cream-2);
  font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brown-2);
}
.qty-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-top: 1px solid var(--line); transition: background-color .15s ease; }
.qty-list__group + .qty-row { border-top: 0; }
.qty-row.has-qty { background: #FFF1E2; }
.qty-row.has-qty .qty-row__name { color: var(--brown); }
.qty-row__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qty-row__name { font-weight: 700; color: var(--ink); }
.qty-row__price { font-size: 13px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 2px; flex: none; }
.stepper__btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid var(--line-strong); background: #FFFDF9; color: var(--brown); cursor: pointer;
}
.stepper__btn:active { background: var(--ember-soft); }
.stepper__input.stepper__input {
  width: 56px; min-height: 40px; padding: 6px 4px; text-align: center;
  font-weight: 800; font-size: 17px; border-color: transparent; background: transparent;
  -moz-appearance: textfield;
}
.stepper__input::-webkit-outer-spin-button, .stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.has-qty .stepper__input { color: var(--ember); }

.sticky-total {
  position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px); z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 18px; margin-top: 8px;
  background: var(--brown); color: #FBEBD9; border-radius: 999px;
  box-shadow: 0 10px 24px -10px rgba(59, 33, 21, .7);
}
.sticky-total > div { display: flex; flex-direction: column; line-height: 1.1; }
.sticky-total__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #E8C9A8; }
.sticky-total__value { font-family: var(--font-display); font-weight: 800; font-size: 24px; color: #FFF4E6; font-variant-numeric: tabular-nums; }
@media (min-width: 960px) { .sticky-total { bottom: 16px; } }

/* ---------- Pedido ---------- */
.order-head__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.order-head__client { font-family: var(--font-display); font-weight: 700; font-size: 21px; color: var(--brown); }
.order-head__client:hover { text-decoration: underline; }
.order-head__meta { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }

.ticket { padding: 6px 16px; background: #FFFDF8; background-image: repeating-linear-gradient(transparent 0 31px, rgba(214, 191, 160, .0) 31px 32px); }
.ticket__line { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--line-strong); }
.ticket__qty { font-weight: 800; color: var(--ember); font-variant-numeric: tabular-nums; }
.ticket__name { font-weight: 600; display: flex; flex-direction: column; }
.ticket__name small { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.ticket__sub { font-variant-numeric: tabular-nums; font-weight: 600; }
.ticket__total { display: flex; justify-content: space-between; padding: 12px 0 8px; font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--brown); }
.ticket__paid { display: flex; justify-content: space-between; padding: 0 0 10px; font-weight: 700; color: var(--olive); font-size: 14.5px; }

/* ---------- Cliente ---------- */
.client-card__meta { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; color: var(--muted); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.contact-actions:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border-radius: 999px; background: var(--cream-2); color: var(--brown); font-weight: 700; font-size: 14.5px;
}
.chip:hover { background: var(--ember-soft); }

/* ---------- Flash ---------- */
.flash {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; margin: 0 0 12px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px;
  transition: opacity .4s ease, transform .4s ease;
}
.flash ul { margin: 4px 0 0; padding-left: 18px; font-weight: 500; }
.flash--notice { background: var(--olive-soft); color: #44562A; }
.flash--alert { background: var(--red-soft); color: var(--red); }
.flash.is-hiding { opacity: 0; transform: translateY(-6px); pointer-events: none; }

/* ---------- Más ---------- */
.more-brand { margin: 8px 0 18px; display: flex; justify-content: center; }
.more-brand__logo { width: 100%; max-width: 380px; border-radius: var(--radius); mix-blend-mode: multiply; }
.footer-tag { text-align: center; font-size: 22px; margin-top: 28px; opacity: .8; }

/* ---------- Ingreso ---------- */
.auth { display: grid; place-items: center; min-height: 100dvh; padding: 24px 16px; }
.auth__card { width: 100%; max-width: 400px; }
.auth__logo { width: 100%; border-radius: var(--radius); mix-blend-mode: multiply; }
.auth__tagline { text-align: center; font-size: 24px; margin: 4px 0 24px; }
.auth .form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }

/* ---------- Lista de precios imprimible ---------- */
.print-page { background: #fff; }
.price-list { max-width: 820px; margin: 0 auto; padding: 16px; }
.price-list__toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.price-list__header { width: 100%; }
.price-list__title { text-align: center; font-family: var(--font-body); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; font-size: 22px; color: var(--brown-2); margin-top: 12px; }
.price-list__date { text-align: center; color: var(--muted); margin: 2px 0 12px; font-size: 13px; }
.price-list__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); }
@media (max-width: 560px) { .price-list__cols { grid-template-columns: 1fr; } }
.price-list__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.price-list__table th { background: var(--brown); color: #fff; font-size: 12px; text-transform: uppercase; padding: 7px 10px; text-align: center; }
.price-list__table td { padding: 7px 10px; border-bottom: 1px solid var(--line); }
.price-list__table td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; width: 34%; border-left: 1px solid var(--line); }
.price-list__table td small { color: var(--muted); }
.price-list__table tbody tr:nth-child(odd) { background: #FFF8F0; }
@media print {
  .no-print { display: none !important; }
  .price-list { padding: 0; }
  @page { margin: 12mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Stock ---------- */
.stock-pill {
  flex: none; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums;
  background: var(--olive-soft); color: var(--olive);
}
.stock-pill--bajo { background: var(--ember-soft); color: #9A4012; }
.stock-pill--agotado { background: var(--red-soft); color: var(--red); }
.badge--stock-ok { background: var(--olive-soft); color: var(--olive); }
.badge--stock-bajo { background: var(--ember-soft); color: #9A4012; }
.badge--stock-agotado { background: var(--red-soft); color: var(--red); }

.stock-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 4px;
}
.stock-card__main { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 16px 14px; background: var(--olive-soft); color: var(--olive); }
.stock-card--bajo .stock-card__main { background: var(--ember-soft); color: var(--ember); }
.stock-card--agotado .stock-card__main { background: var(--red-soft); color: var(--red); }
.stock-card__value { font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: 1.05; color: var(--brown); font-variant-numeric: tabular-nums; }
.stock-card__value small { font-size: 20px; color: var(--brown-2); }
.stock-card__facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.stock-card__facts > div { padding: 10px 8px; text-align: center; border-left: 1px solid var(--line); }
.stock-card__facts > div:first-child { border-left: 0; }
.stock-card__facts dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.stock-card__facts dd { margin: 2px 0 0; font-weight: 800; color: var(--brown); font-variant-numeric: tabular-nums; }

.qty-row__stock--bajo { color: #9A4012; font-weight: 700; }
.qty-row__stock--agotado { color: var(--red); font-weight: 700; }
.summary-line--left { text-align: left; margin-top: -6px; }
.hint { color: var(--muted); font-size: 13px; }
.input-big { font-family: var(--font-display); font-weight: 700; font-size: 24px !important; }

.qty-row__result { color: var(--ember); font-weight: 700; margin-left: 4px; }
.sticky-total .btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ---------- Ubicación ---------- */
.geo-field__label { font-size: 14px; font-weight: 700; color: var(--brown-2); }
.geo-field__value { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14.5px; }
.geo-field__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.geo-status { display: block; color: var(--olive); font-weight: 600; }
.geo-status--error { color: var(--red); }
.geo-card {
  display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px;
  background: var(--paper); border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.geo-card__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.geo-card__title { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--brown); }
.geo-card__meta { font-size: 13.5px; color: var(--muted); }
.geo-card .btn { flex: none; }
.geo-status[hidden] { display: none; }
