:root {
  --bg: #fffdf9;
  --surface: #ffffff;
  --surface-soft: #f3f7ff;
  --text: #0b2e6d;
  --muted: #49658e;
  --line: #d8e1ef;
  --primary: #0b2e6d;
  --primary-soft: #e8eef8;
  --accent-purple: #e8eef8;
  --accent-green: #dff5e7;
  --accent-blue: #e6edfa;
  --accent-yellow: #fff1bd;
  --accent-pink: #ffe2ef;
  --brand-blue: #0b2e6d;
  --brand-pink: #ff4fa1;
  --brand-green: #2db55d;
  --brand-lime: #b7e800;
  --brand-sunshine: #ffd24d;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --shadow-soft: 0 18px 44px rgba(11, 46, 109, .12);
  --font-display: "Arial Black", "Trebuchet MS", sans-serif;
  --font-body: "Segoe UI", Arial, sans-serif;
  --sidebar-closed: 76px;
  --sidebar-open: 244px;
  --topbar-h: 68px;
}

/* Caja operativa: apertura, movimientos, conteo físico y cierre. */
.cash-workspace {
  display: grid;
  gap: 18px;
}
.cash-page-header { align-items: end; }
.cash-subnav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 1px;
  scrollbar-width: thin;
}
.cash-subnav a {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  background: rgba(255,255,255,.9);
  font-weight: 900;
  text-decoration: none;
}
.cash-subnav a:hover,
.cash-subnav a:focus-visible { border-color: rgba(116,92,255,.36); background: var(--primary-soft); }
.cash-anchor { position: relative; top: -8px; }
.cash-module-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 12px 28px rgba(32,50,66,.05);
}
.cash-module-nav a {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 17px;
  color: var(--muted);
  font-weight: 900;
  text-decoration: none;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.cash-module-nav a > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-soft);
  color: #6a57e8;
  font-size: 14px;
}
.cash-module-nav a:hover,
.cash-module-nav a:focus-visible { color: var(--text); background: var(--surface-soft); }
.cash-module-nav a.active { color: #3f2a9b; background: linear-gradient(135deg, rgba(216,199,255,.65), rgba(200,237,255,.56)); }
.cash-module-nav a.active > span { color: #fff; background: #745cff; }
.cash-empty-state {
  min-height: 260px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(240,236,255,.78), rgba(238,249,242,.82));
}
.cash-empty-state h3 { margin: 0 0 5px; font-size: 26px; }
.cash-empty-state p { margin: 0; color: var(--muted); font-weight: 750; }
.cash-empty-state a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.cash-empty-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 21px; color: #fff; background: linear-gradient(135deg,#745cff,#83d7e7); font-size: 24px; font-weight: 950; }
.cash-overview-kpis { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; }
.cash-overview-kpis article { min-height: 140px; display: grid; align-content: center; gap: 7px; padding: 20px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: 0 15px 34px rgba(32,50,66,.06); }
.cash-overview-kpis article.is-main { background: linear-gradient(135deg,rgba(216,199,255,.62),rgba(200,237,255,.48)); }
.cash-overview-kpis span,.cash-overview-kpis small { color: var(--muted); font-weight: 800; }
.cash-overview-kpis strong { font-size: clamp(26px,2.4vw,38px); }
.cash-summary-groups { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.cash-summary-groups > section,.cash-recent-card { padding: 18px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: 0 15px 34px rgba(32,50,66,.05); }
.cash-section-minihead { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.cash-section-minihead > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; color: #5f49d4; background: var(--primary-soft); font-weight: 950; }
.cash-section-minihead h3,.cash-recent-head h3 { margin: 0; font-size: 19px; }
.cash-section-minihead p,.cash-recent-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; font-weight: 750; }
.cash-summary-groups dl { display: grid; gap: 8px; margin: 0; }
.cash-summary-groups dl > div { min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 13px; background: var(--surface-soft); }
.cash-summary-groups dt { color: var(--muted); font-weight: 800; }
.cash-summary-groups dd { margin: 0; font-weight: 950; }
.cash-recent-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cash-recent-head a { min-height: 44px; display: inline-flex; align-items: center; padding: 9px 13px; border-radius: 14px; color: #5f49d4; background: var(--primary-soft); font-weight: 900; text-decoration: none; }
.cash-recent-card table { min-width: 720px; }
.cash-focused-card { max-width: 1120px; width: 100%; margin-inline: auto; }
.cash-state-panel { min-height: 190px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 18px; padding: 26px; border: 1px solid rgba(103,202,140,.28); border-radius: 28px; background: linear-gradient(135deg,rgba(199,240,210,.48),rgba(255,255,255,.94)); }
.cash-state-panel h3 { margin: 3px 0; font-size: 28px; }.cash-state-panel p { margin: 0; color: var(--muted); font-weight: 750; }.cash-state-panel small { color: #247a4b; font-weight: 950; text-transform: uppercase; letter-spacing: .06em; }
.cash-state-actions { display: grid; gap: 8px; }.cash-state-actions a { min-height: 48px; display: flex; align-items: center; justify-content: center; padding: 9px 15px; border-radius: 15px; color: var(--text); background: #fff; border: 1px solid var(--line); font-weight: 900; text-decoration: none; }
.cash-impact-strip,.cash-close-context,.cash-expected-before-count { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.cash-impact-strip > div,.cash-close-context > div,.cash-expected-before-count > div { min-height: 82px; display: grid; align-content: center; gap: 5px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 19px; background: #fff; }
.cash-impact-strip small,.cash-close-context small,.cash-expected-before-count span { color: var(--muted); font-weight: 850; }.cash-impact-strip strong,.cash-close-context strong,.cash-expected-before-count strong { font-size: 20px; }
.cash-movements-page-grid { grid-template-columns: minmax(330px,.72fr) minmax(0,1.28fr); }
.cash-expected-before-count { grid-template-columns: repeat(3,minmax(0,1fr)); }.cash-expected-before-count > div { background: linear-gradient(135deg,rgba(240,236,255,.66),rgba(238,249,242,.68)); }
.cash-close-step { margin-top: 22px; }
.cash-eyebrow {
  display: inline-block;
  margin-bottom: 4px;
  color: #6a57e8;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cash-opening-card,
.cash-flow-section,
.cash-close-workflow,
.cash-movement-form,
.cash-movements-card,
.cash-denomination-card,
.cash-count-detail-card,
.cash-detail-note {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 40px rgba(32,50,66,.07);
}
.cash-opening-card,
.cash-flow-section,
.cash-close-workflow { padding: 22px; }
.cash-opening-copy,
.cash-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.cash-section-heading.compact { margin-bottom: 12px; }
.cash-opening-copy h3,
.cash-section-heading h3,
.cash-count-detail-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
}
.cash-opening-copy p,
.cash-section-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-weight: 700;
}
.cash-step {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: white;
  background: linear-gradient(135deg, #755fff, #83d7e7);
  font-size: 18px;
  font-weight: 950;
}
.cash-opening-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.cash-opening-form label,
.cash-movement-form > label,
.movement-fields label,
.cash-card-check label,
.cash-close-notes {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 900;
}
.cash-opening-form input,
.cash-opening-form select,
.cash-opening-form textarea,
.cash-movement-form input,
.cash-movement-form select,
.cash-movement-form textarea,
.cash-card-check input,
.cash-close-notes textarea {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 11px 14px;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-weight: 800;
}
.cash-opening-form textarea,
.cash-movement-form textarea,
.cash-close-notes textarea { min-height: 84px; resize: vertical; }
.cash-form-wide { grid-column: 1 / -1; }
.cash-primary-action,
.cash-secondary-action,
.cash-danger-action {
  min-height: 56px;
  border: 0;
  border-radius: 18px;
  padding: 12px 18px;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 950;
  cursor: pointer;
}
.cash-primary-action,
.cash-danger-action {
  color: #fff;
  background: linear-gradient(135deg, #745cff, #84d9e8);
  box-shadow: 0 14px 28px rgba(116,92,255,.2);
}
.cash-secondary-action { background: var(--surface-soft); border: 1px solid var(--line); }
.cash-danger-action:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; }
.cash-session-hero,
.cash-detail-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(116,92,255,.15);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(240,236,255,.88), rgba(238,249,242,.9));
}
.cash-session-hero > div,
.cash-detail-hero > div {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 14px;
  border-radius: 17px;
  background: rgba(255,255,255,.76);
}
.cash-session-hero small,
.cash-detail-hero small,
.cash-summary-grid span,
.cash-summary-grid small,
.cash-count-head small,
.cash-difference-grid span,
.cash-difference-grid small,
.cash-card-check span,
.cash-detail-totals small,
.cash-detail-note span {
  color: var(--muted);
  font-weight: 850;
}
.cash-session-hero strong,
.cash-detail-hero strong { font-size: 18px; }
.cash-session-title { grid-template-columns: 12px 1fr; }
.cash-session-title > div { min-width: 0; display: grid; gap: 4px; }
.cash-state-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #67ca8c;
  box-shadow: 0 0 0 6px rgba(103,202,140,.14);
}
.cash-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.cash-summary-grid article {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-soft);
}
.cash-summary-grid article.is-primary { background: linear-gradient(135deg, rgba(216,199,255,.55), rgba(200,237,255,.42)); }
.cash-summary-grid strong { color: var(--text); font-size: 25px; }
.cash-movement-grid {
  display: grid;
  grid-template-columns: minmax(320px, .8fr) minmax(0, 1.2fr);
  gap: 14px;
}
.cash-movement-form,
.cash-movements-card { padding: 18px; }
.cash-movement-form { display: grid; gap: 12px; }
.cash-movements-card { overflow: hidden; }
.cash-movements-card table { min-width: 680px; }
.cash-history-table table { min-width: 1120px; }
.cash-count-layout,
.cash-count-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.cash-denomination-card { overflow: hidden; }
.cash-count-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  background: linear-gradient(135deg, rgba(240,236,255,.85), rgba(238,248,251,.9));
}
.cash-count-head h4 { margin: 0 0 3px; font-size: 19px; }
.cash-count-head span { color: var(--muted); font-weight: 800; }
.cash-count-head > div:last-child { text-align: right; }
.cash-count-head > div:last-child strong { display: block; margin-top: 3px; font-size: 25px; }
.cash-denomination-list { display: grid; }
.cash-denomination-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 98px minmax(100px, .8fr);
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
}
.cash-denomination-row > span { display: grid; gap: 2px; }
.cash-denomination-row small { color: var(--muted); font-weight: 800; }
.cash-denomination-row input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 8px 10px;
  color: var(--text);
  background: #fff;
  font-size: 19px;
  font-weight: 950;
  text-align: center;
}
.cash-denomination-row output { color: var(--text); font-size: 16px; font-weight: 950; text-align: right; }
.cash-card-check {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  margin-top: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--surface-soft);
}
.cash-card-check > div { min-height: 70px; display: grid; align-content: center; gap: 6px; padding: 10px 12px; border-radius: 16px; background: #fff; }
.cash-card-check strong { font-size: 22px; }
.cash-difference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.cash-difference-grid article {
  display: grid;
  gap: 6px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.cash-difference-grid strong { font-size: 22px; }
.cash-difference-grid em { font-style: normal; font-weight: 950; }
.cash-close-notes { margin-top: 14px; }
.cash-count-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(116,92,255,.18);
  border-radius: 18px;
  background: rgba(240,236,255,.56);
  color: var(--text);
  font-weight: 850;
}
.cash-count-confirmation input { width: 28px; height: 28px; flex: 0 0 28px; }
.cash-positive { color: #247a4b !important; }
.cash-negative { color: #b52f5b !important; }
.cash-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(32,50,66,.35);
  backdrop-filter: blur(5px);
}
.cash-confirm-modal.open { display: grid; }
.cash-confirm-dialog {
  width: min(620px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(32,50,66,.24);
}
.cash-confirm-dialog h3 { margin: 3px 0 8px; font-size: 28px; }
.cash-confirm-dialog > p { color: var(--muted); font-weight: 750; }
.cash-confirm-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 16px 0; }
.cash-confirm-summary div { display: grid; gap: 5px; padding: 13px; border-radius: 17px; background: var(--surface-soft); }
.cash-confirm-summary span { color: var(--muted); font-weight: 800; }
.cash-confirm-summary strong { font-size: 20px; }
.cash-confirm-actions { display: grid; grid-template-columns: .7fr 1fr; gap: 10px; }
.cash-status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 999px;
  color: #355166;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 950;
}
.cash-status-badge.is-balanced,
.cash-status-badge.is-approved { color: #247a4b; background: rgba(199,240,210,.58); }
.cash-status-badge.is-difference { color: #8b641e; background: rgba(255,225,160,.52); }
.cash-status-badge.is-review_required { color: #a12f59; background: rgba(255,214,227,.68); }
.cash-history-table td span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.cash-detail-hero { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }
.cash-detail-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.cash-detail-totals article { display: grid; gap: 9px; padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: #fff; }
.cash-detail-totals article > span { color: #6a57e8; font-weight: 950; }
.cash-detail-totals article > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cash-detail-totals em { font-style: normal; font-weight: 950; }
.cash-count-detail-card { padding: 16px; overflow: hidden; }
.cash-count-detail-card table { width: 100%; border-collapse: collapse; }
.cash-count-detail-card th,
.cash-count-detail-card td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.cash-detail-note { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; padding: 16px; }
.cash-detail-note p { margin: 5px 0 0; font-weight: 850; }
.cash-detail-openings { margin-top: -4px; }
.cash-detail-movements { margin: 14px 0; padding: 16px; }
.cash-detail-movements table { min-width: 980px; }
.cash-review-alert { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 16px; border: 1px solid rgba(181,47,91,.18); border-radius: 20px; background: rgba(255,214,227,.45); }
.cash-review-alert div { display: grid; gap: 4px; }
.cash-review-alert span { color: var(--muted); font-weight: 750; }
.cash-review-alert button { min-height: 48px; border: 0; border-radius: 16px; padding: 10px 16px; color: #fff; background: #a12f59; font-weight: 950; cursor: pointer; }

@media (max-width: 1100px) {
  .cash-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cash-summary-groups { grid-template-columns: 1fr; }
  .cash-impact-strip,
  .cash-close-context { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cash-movements-page-grid { grid-template-columns: 1fr; }
  .cash-movement-grid,
  .cash-count-layout,
  .cash-count-detail-grid { grid-template-columns: 1fr; }
  .cash-session-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* POS tablet landscape: el carrito pasa a panel deslizable y conserva un
   boton visible en la barra superior para abrirlo. */
@media (min-width: 901px) and (max-width: 1100px) {
  /* Selectores con `body` para ganar a las reglas posteriores `.is-pos .main` /
     `.is-pos .topbar` (60px, 4 columnas): sin esto la barra de dos filas no
     tenía altura y el buscador quedaba encima de las categorías (1024x768). */
  body.is-pos { --topbar-h: 108px; }
  body.is-pos .main { grid-template-rows: 108px minmax(0, 1fr); }
  body.is-pos .topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: 48px 48px;
    padding-inline: 10px;
  }
  body.is-pos .topbar-title { grid-column: 1; grid-row: 1; }
  body.is-pos .pos-search { grid-column: 1 / -1; grid-row: 2; }
  body.is-pos .cart-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    grid-column: 2;
    grid-row: 1;
  }
  body.is-pos .logout-form { grid-column: 3; grid-row: 1; }
  body.is-pos .logout-button { min-height: 48px; padding: 0 10px; }
  .is-pos .cashier-pill { display: none; }
}

@media (max-width: 900px) {
  .cash-workspace,
  .cash-page-header,
  .cash-module-nav { min-width: 0; max-width: 100%; }
  .cash-workspace > * { min-width: 0; }
  .cash-recent-card { min-width: 0; overflow-x: auto; }
  .cash-module-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }
  .cash-module-nav a {
    min-width: 0;
    padding-inline: 8px;
    gap: 6px;
    font-size: clamp(13px, 3.7vw, 15px);
    text-align: center;
    white-space: nowrap;
  }
  .cash-module-nav a > span { width: 28px; height: 28px; flex: 0 0 28px; }
  .cash-module-nav a b { min-width: 0; white-space: nowrap; overflow-wrap: normal; }
}

@media (max-width: 720px) {
  .cash-page-header .primary-link { width: 100%; max-width: 100%; }
  .cash-workspace .responsive-table table { min-width: 0; }
  .cash-opening-card,
  .cash-flow-section,
  .cash-close-workflow { padding: 14px; border-radius: 20px; }
  .cash-opening-form,
  .cash-overview-kpis,
  .cash-impact-strip,
  .cash-close-context,
  .cash-expected-before-count,
  .cash-summary-grid,
  .cash-session-hero,
  .cash-detail-hero,
  .cash-detail-totals,
  .cash-card-check,
  .cash-difference-grid,
  .cash-detail-note { grid-template-columns: 1fr; }
  .cash-denomination-row { grid-template-columns: minmax(92px, 1fr) 82px minmax(86px, .8fr); padding: 8px 10px; }
  .cash-confirm-summary,
  .cash-confirm-actions { grid-template-columns: 1fr; }
  .cash-review-alert { align-items: stretch; flex-direction: column; }
  .cash-empty-state,
  .cash-state-panel { grid-template-columns: 1fr; align-items: start; }
  .cash-empty-state { min-height: 0; padding: 20px; }
  .cash-state-actions { width: 100%; }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { min-width: 320px; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  background:
    linear-gradient(135deg, rgba(255, 79, 161, .08), transparent 24%),
    linear-gradient(225deg, rgba(183, 232, 0, .08), transparent 28%),
    var(--bg);
  overflow: hidden;
}
body.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: auto;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,79,161,.95) 0 10px, transparent 11px),
    radial-gradient(circle at 84% 12%, rgba(183,232,0,.95) 0 14px, transparent 15px),
    radial-gradient(circle at 76% 84%, rgba(255,210,77,.95) 0 12px, transparent 13px),
    linear-gradient(135deg, #0B2E6D 0 60%, #123b7c 60% 100%);
}
h1, h2, h3, h4, .topbar-order-badge, .catalog-toolbar strong, .nav b,
.category-chip, .product-name, .product-price, .login-button, .eyebrow {
  font-family: var(--font-display);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { touch-action: manipulation; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.touch-target, .nav a, .category-chip, .product-card, .qty-controls button, .ghost-button {
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease, background .12s ease;
}
.touch-target:active, .touch-target.is-pressed,
.nav a:active, .nav a.is-pressed,
.category-chip:active, .category-chip.is-pressed,
.product-card:active, .product-card.is-pressed,
.qty-controls button:active, .qty-controls button.is-pressed,
.ghost-button:active, .ghost-button.is-pressed {
  transform: scale(.96);
  filter: saturate(1.08) brightness(.98);
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-closed) minmax(0, 1fr);
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}
.app-shell.sidebar-expanded { grid-template-columns: var(--sidebar-open) minmax(0, 1fr); }

.sidebar {
  position: relative;
  z-index: 20;
  height: 100dvh;
  padding: 10px 9px;
  border-right: 0;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(18px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.brand { display: flex; align-items: center; gap: 12px; min-height: 54px; margin-bottom: 8px; }
.sidebar-toggle-slot {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
}
.brand-copy, .nav b {
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity .18s ease;
}
.app-shell.sidebar-expanded .brand-copy,
.app-shell.sidebar-expanded .nav b {
  opacity: 1;
  width: auto;
}
.brand-copy strong, .brand-copy span { display: block; }
.brand-copy span, .eyebrow { color: var(--muted); font-size: 13px; font-weight: 700; }
.nav { display: grid; gap: 6px; }
.menu-switcher { margin: 0 8px 8px; padding: 10px 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.06); }
.menu-switcher-label { display: block; margin-bottom: 7px; color: #aab6c5; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.menu-switcher-options { display: grid; gap: 5px; }
.menu-switcher-option { display: block; padding: 8px 9px; border-radius: 9px; color: #dbe7f5; font-size: 13px; font-weight: 800; text-decoration: none; }
.menu-switcher-option:hover, .menu-switcher-option:focus-visible { background: rgba(255,255,255,.1); color: #fff; }
.menu-switcher-option.active { background: #fff; color: var(--primary); }
.nav a {
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 18px;
  color: #50606f;
  font-weight: 850;
}
.nav a .nav-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--surface-soft);
  color: #7b8a99;
  font-size: 12px;
}
.nav-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav a::after {
  content: attr(title);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  z-index: 50;
  transform: translateY(-50%) scale(.96);
  transform-origin: left center;
  opacity: 0;
  pointer-events: none;
  padding: 9px 11px;
  border-radius: 12px;
  background: #203242;
  color: white;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  box-shadow: 0 12px 24px rgba(32,50,66,.18);
  transition: opacity .12s ease, transform .12s ease;
}
.app-shell:not(.sidebar-expanded) .nav a:hover::after,
.app-shell:not(.sidebar-expanded) .nav a:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}
.app-shell.sidebar-expanded .nav a::after { display: none; }
.nav a.active {
  background: var(--brand-sunshine);
  box-shadow: inset 5px 0 0 var(--brand-pink);
  color: var(--brand-blue);
}
.nav a.active .nav-icon { background: white; color: var(--primary); }
.nav a.muted { color: #a1aab4; }

.main {
  min-width: 0;
  height: 100dvh;
  display: grid;
  grid-template-rows: var(--topbar-h) minmax(0, 1fr);
}
.topbar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
}
.is-admin .topbar { grid-template-columns: minmax(180px, 1fr) auto auto; }
.icon-button {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 0;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}
.sidebar-toggle {
  position: fixed;
  top: 10px;
  left: 9px;
  z-index: 30;
}
.icon-button span {
  width: 22px;
  height: 2px;
  display: block;
  border-radius: 2px;
  background: var(--text);
}
.topbar-title h1 { margin: 0; font-size: clamp(24px, 2vw, 30px); letter-spacing: 0; line-height: 1; }
.topbar-brand-logo {
  width: 64px;
  height: 58px;
  display: block;
  object-fit: contain;
  object-position: left center;
}
.pos-search {
  height: 54px;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 12px 28px rgba(32, 50, 66, .05);
}
.pos-search input {
  min-width: 0;
  height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-weight: 750;
}
.cart-fab {
  min-height: 54px;
  border: 0;
  border-radius: 21px;
  padding: 0 18px;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}
.cart-fab { display: none; background: var(--primary); color: white; }
.cart-fab span {
  min-width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  margin-right: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
}
.cashier-pill {
  position: relative;
  min-height: 54px;
  display: grid;
  align-content: center;
  padding: 0 88px 0 16px;
  border-radius: 21px;
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
}
.cashier-pill span { color: var(--muted); font-size: 12px; font-weight: 800; }
.cashier-pill strong { white-space: nowrap; }
.language-switcher {
  position: absolute;
  right: 7px;
  top: 50%;
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 3px;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.language-switcher button {
  min-width: 30px;
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
}
.language-switcher button[aria-current="true"] { color: #fff; background: var(--brand-blue); }
.language-switcher--mobile { display: none; }
.login-language-switcher { position: fixed; top: 12px; right: 12px; z-index: 5; transform: none; }
.logout-form { margin: 0; }
.logout-button {
  min-height: 54px;
  border: 0;
  border-radius: 20px;
  padding: 0 14px;
  color: #5f6d78;
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
  font-weight: 950;
  cursor: pointer;
}
.content {
  min-height: 0;
  padding: 0 18px 18px;
  overflow: hidden;
}
.is-pos .app-shell { grid-template-columns: 68px minmax(0, 1fr); }
.is-pos .app-shell.sidebar-expanded { grid-template-columns: var(--sidebar-open) minmax(0, 1fr); }
.is-pos .sidebar { padding: 7px 6px; }
.is-pos .brand { min-height: 48px; margin-bottom: 5px; }
.is-pos .sidebar-toggle-slot { width: 48px; height: 48px; flex-basis: 48px; }
.is-pos .nav { gap: 4px; }
.is-pos .nav a { min-height: 50px; padding: 6px 7px; border-radius: 16px; }
.is-pos .nav a .nav-icon { width: 34px; height: 34px; flex-basis: 34px; }
.is-pos .main { grid-template-rows: 60px minmax(0, 1fr); }
.is-pos .topbar { grid-template-columns: minmax(140px, auto) minmax(240px, 1fr) auto auto; gap: 9px; padding: 5px 10px; }
.is-pos .icon-button { width: 48px; height: 48px; border-radius: 17px; }
.is-pos .sidebar-toggle { top: 7px; left: 6px; }
.is-pos .topbar-title h1 { font-size: clamp(22px, 1.8vw, 27px); }
.is-pos .pos-search { height: 48px; padding-inline: 15px; border-radius: 18px; }
.is-pos .pos-search input { height: 44px; }
.is-pos .cashier-pill,
.is-pos .logout-button { min-height: 48px; border-radius: 17px; }
.is-pos .cashier-pill { padding-left: 13px; padding-right: 88px; }
.is-pos .content { padding: 0 10px 10px; }
.is-admin .content {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.admin-header p { color: var(--muted); margin: 0; }
.primary-link, .form-actions button {
  min-height: 56px;
  border: 0;
  border-radius: 18px;
  padding: 0 20px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}
.table-card, .form-card {
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}
.table-card { overflow: auto; max-height: calc(100dvh - 160px); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 18px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 13px; }
td span { color: var(--muted); font-size: 13px; }
.table-subline {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--primary); font-weight: 900; }
.actions form { margin: 0; }
.actions a,
.actions button,
.link-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(123, 97, 255, .18);
  border-radius: 14px;
  background: rgba(248, 251, 255, .92);
  color: var(--primary);
  line-height: 1;
  touch-action: manipulation;
}
.link-action {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 900;
  cursor: pointer;
}
.danger-action {
  color: #a42f60 !important;
  border-color: rgba(164, 47, 96, .22) !important;
  background: rgba(255, 240, 246, .92) !important;
}
.order-actions { align-items: center; }
.order-voided-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #9f2f5b !important;
  background: rgba(255, 210, 225, .48);
  font-size: 12px !important;
  font-weight: 950;
  text-transform: uppercase;
}
.order-void-modal form { display: grid; gap: 10px; }
.order-void-modal label { color: var(--text); font-weight: 900; }
.order-void-modal textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 12px 14px;
  color: var(--text);
  background: #fff;
  font: inherit;
}
.order-void-modal form > small { margin-top: -4px; color: var(--muted); font-weight: 750; }
.order-void-modal .cash-confirm-actions { margin-top: 6px; }
body.has-blocking-modal { overflow: hidden; }
.swatch { display: inline-block; width: 38px; height: 24px; border-radius: 999px; border: 1px solid var(--line); }
.form-card {
  width: 100%;
  max-width: none;
  padding: 22px;
  display: grid;
  gap: 14px;
  overflow: auto;
  max-height: calc(100dvh - 130px);
}
.management-form {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
.category-form {
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, .75fr);
  column-gap: 22px;
}
.management-form .form-alert,
.management-form .form-actions {
  grid-column: 1 / -1;
}
.form-fields {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}
.field-wide {
  grid-column: 1 / -1;
}
.form-alert {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(123, 97, 255, .2);
  border-radius: 16px;
  background: rgba(200, 237, 255, .58);
  color: #24435c;
  font-weight: 900;
  animation: formAlertIn .28s ease both;
}
.form-card .form-alert {
  margin-bottom: 0;
}
.form-alert-error {
  border-color: rgba(239, 127, 169, .35);
  background: rgba(255, 210, 225, .38);
  color: #9f2f5b;
}
.form-alert-success {
  border-color: rgba(82, 184, 116, .35);
  background: linear-gradient(135deg, rgba(199, 240, 210, .72), rgba(200, 237, 255, .62));
  color: #23553b;
}
.form-card label { display: grid; gap: 8px; font-weight: 850; color: var(--text); }
.form-card input, .form-card select, .form-card textarea {
  min-height: 54px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 12px 14px;
  background: white;
}
.form-card textarea { min-height: 110px; resize: vertical; }
.form-card input[type="color"] {
  min-height: 62px;
  padding: 8px 12px;
  cursor: pointer;
}
.form-preview {
  min-height: 100%;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(248, 251, 255, .78);
}
.form-preview > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.category-preview-card {
  min-height: 170px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 20px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 82% 22%, rgba(255,255,255,.78) 0 34px, transparent 35px),
    linear-gradient(135deg, var(--preview-color), rgba(255,255,255,.88));
  box-shadow: 0 18px 34px rgba(32, 50, 66, .08);
}
.category-preview-card strong {
  font-size: 22px;
  line-height: 1.05;
}
.category-preview-card small {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.74);
  color: #50606f;
  font-weight: 900;
}
.image-preview {
  width: fit-content;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}
.image-preview img {
  width: 140px;
  height: 92px;
  display: block;
  border-radius: 12px;
  object-fit: cover;
}
.image-preview small {
  color: var(--muted);
  font-weight: 800;
}
.form-card .check { min-height: 48px; display: flex; align-items: center; gap: 12px; }
.form-card .check input { width: 28px; min-height: 28px; }
.product-extras-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(248,251,255,.96), rgba(216,199,255,.18));
}
.product-extras-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.product-extras-head h3 { margin: 4px 0 6px; font-size: 20px; }
.product-extras-head p { margin: 0; color: var(--muted); font-weight: 750; }
.product-extra-options { display: grid; gap: 10px; }
.product-extra-option {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}
.product-extra-check { min-height: 48px; display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 12px; cursor: pointer; }
.product-extra-option input { width: 30px; min-height: 30px; accent-color: var(--accent-purple); }
.product-extra-option span { display: grid; gap: 3px; }
.product-extra-option small { color: var(--muted); }
.product-extra-option b { white-space: nowrap; }
.product-extra-option a,
.extras-catalog-link { color: var(--primary); font-weight: 900; }
.product-extra-option a,
.extras-catalog-link,
.form-actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 13px;
}
.product-extra-option.is-inactive { opacity: .62; }
.extras-catalog-link { width: fit-content; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; }
.form-actions a { color: var(--muted); font-weight: 900; }
.form-actions button.is-saving {
  opacity: .78;
  cursor: wait;
}
.sidebar-overlay { display: none; }

.login-shell {
  width: min(920px, calc(100vw - 28px));
  min-height: min(680px, calc(100dvh - 28px));
  display: grid;
  grid-template-columns: minmax(260px, .85fr) minmax(320px, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 28px;
  background: rgba(255,255,255,.22);
  box-shadow: 0 28px 70px rgba(32,50,66,.18);
  backdrop-filter: blur(18px);
}
.login-brand {
  display: grid;
  place-items: center;
  padding: 36px;
  background: #fff;
  border-right: 1px solid var(--line);
}
.login-logo-image {
  display: block;
  width: min(88%, 340px);
  max-height: 430px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 28px rgba(32,50,66,.14));
}
.login-card {
  margin: 18px;
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 24px;
  background: rgba(255,255,255,.92);
}
.login-card h1 {
  margin: 4px 0 0;
  font-size: 34px;
  line-height: 1;
}
.login-card label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 900;
}
.login-card input {
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 16px;
  background: white;
  color: var(--text);
  font-size: 18px;
}
.login-check {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px !important;
  color: var(--muted) !important;
}
.login-check input {
  width: 22px;
  min-height: 22px;
}
.login-button {
  min-height: 62px;
  border: 0;
  border-radius: 21px;
  color: white;
  background: var(--brand-pink);
  font-size: 20px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(11, 46, 109, .24);
}

/* Brandkit system-wide guardrails: no inherited purple/cyan UI accents. */
.cash-module-nav a > span,
.cash-module-nav a.active > span { color: var(--brand-blue); }
.cash-module-nav a.active { color: var(--brand-blue); background: var(--brand-sunshine); }
.cash-module-nav a.active > span { background: var(--brand-pink); }
.category-chip.active { outline-color: rgba(255, 79, 161, .36); box-shadow: 0 16px 36px rgba(11, 46, 109, .14); }
.product-card:focus-visible { outline-color: rgba(255, 79, 161, .5); }
.cash-open-button { background: var(--brand-green); color: var(--brand-blue); }
.topbar-order-badge { border-color: var(--brand-blue); }
.ghost-button { border-color: var(--brand-blue); color: var(--brand-blue); }
.main { background: transparent; }
.content { background: transparent; }
.topbar { border-bottom: 0; }
.topbar-title h1 { color: var(--brand-blue); }
.topbar-brand-logo { width: 104px; height: 76px; margin: -8px 0; object-fit: contain; }
.cashier-pill { border: 1px solid var(--brand-blue); background: #fff; }
.logout-button { border: 2px solid var(--brand-pink); color: var(--brand-blue); background: #fff; }
.form-card, .table-card, .panel, .empty-admin-state { border-color: var(--line); box-shadow: var(--shadow-soft); }
.form-card h2, .table-card h2, .page-header h1, .page-header h2 { color: var(--brand-blue); }
.nav a:hover, .nav a:focus-visible { background: var(--accent-pink); color: var(--brand-blue); }
.nav a .nav-icon { color: var(--brand-blue); background: var(--accent-blue); }
.nav a.active .nav-icon { color: #fff; background: var(--brand-pink); }
.button-primary, .primary-button, .save-button { background: var(--brand-pink); color: #fff; }
.button-primary:hover, .primary-button:hover, .save-button:hover { background: var(--brand-blue); }

/* Keep the authenticated action visible beside the cashier identity. */
.is-pos .topbar {
  grid-template-columns: minmax(104px, auto) minmax(220px, 1fr) auto auto;
}
.is-pos .logout-form { display: block; }
.is-pos .logout-button { min-width: 92px; white-space: nowrap; }

@media (max-width: 1365px) and (min-width: 1024px) {
  .is-pos .topbar { grid-template-columns: minmax(104px, auto) minmax(170px, 1fr) auto auto; }
  .is-pos .cashier-pill { padding: 0 88px 0 10px; }
  .is-pos .logout-button { min-width: 82px; padding: 0 10px; }
}

@media (max-width: 1023px) {
  .is-pos .topbar { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-rows: 54px 54px; }
  .is-pos .topbar-title { grid-column: 1; grid-row: 1; }
  .is-pos .cart-fab { grid-column: 2; grid-row: 1; }
  .is-pos .logout-form { grid-column: 3; grid-row: 1; }
  .is-pos .logout-button { min-height: 48px; padding: 0 10px; }
  .is-pos .pos-search { grid-column: 1 / -1; grid-row: 2; }
}

.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  overflow: auto;
  max-height: calc(100dvh - 150px);
  padding: 2px 2px 12px;
}
.table-card-shell {
  display: grid;
  gap: 8px;
}
.table-card-link {
  min-height: 170px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-soft);
}
.table-release-button {
  min-height: 46px;
  border: 1px solid rgba(164, 47, 96, .22);
  border-radius: 15px;
  color: #a42f60;
  background: rgba(255, 240, 246, .92);
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
}
.table-release-button:hover { transform: translateY(-1px); }
.table-release-button:disabled { opacity: .55; cursor: wait; transform: none; }
.table-card-link span {
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  color: #23553b;
  background: rgba(199, 240, 210, .74);
  font-size: 12px;
  font-weight: 950;
}
.table-card-link.is-busy span {
  color: #9f2f5b;
  background: rgba(255, 210, 225, .7);
}
.table-card-link strong {
  font-size: 30px;
  line-height: 1;
}
.table-card-link b {
  color: var(--brand-pink);
  font-size: 18px;
  font-weight: 950;
}
.table-card-link small {
  color: var(--muted);
  font-weight: 900;
}
.empty-admin-state {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.88);
  color: var(--muted);
}
.empty-admin-state strong {
  color: var(--text);
  font-size: 22px;
}
.settings-table-card {
  margin-top: 16px;
  max-height: calc(100dvh - 430px);
}
.settings-actions {
  display: flex;
  gap: 10px;
}
.settings-actions form { margin: 0; }
.topbar-order-badge {
  min-width: 150px;
  padding: 9px 16px;
  border: 2px solid var(--brand-pink);
  border-radius: 15px;
  color: var(--brand-blue);
  background: var(--brand-sunshine);
  font-size: 17px;
  font-weight: 950;
  text-align: center;
  letter-spacing: .025em;
}
.modifier-option-editor { display: grid; gap: 10px; }
.modifier-option-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(120px, .7fr) minmax(90px, .5fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}
.sync-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.25fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px 18px 18px 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-soft);
}
.sync-panel-main {
  display: grid;
  gap: 4px;
}
.sync-eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}
.sync-panel h3 {
  margin: 0;
  font-size: 20px;
}
.sync-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.sync-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.sync-metrics div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(248,251,255,.86);
}
.sync-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.sync-metrics strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sync-panel::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #d89d36;
  box-shadow: 0 0 0 7px rgba(216,157,54,.12);
}
.sync-panel.is-online::before {
  background: #2f9f65;
  box-shadow: 0 0 0 7px rgba(47,159,101,.12);
}
.sync-panel.is-offline::before {
  background: #c94f64;
  box-shadow: 0 0 0 7px rgba(201,79,100,.12);
}
.sync-run-button {
  min-width: 172px;
}
.sync-run-button:disabled {
  cursor: wait;
  opacity: .7;
}
.users-table-card {
  max-height: calc(100dvh - 220px);
}
.secondary-link,
.back-link,
.table-action-link {
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}
.secondary-link,
.table-action-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.9);
}
.back-link {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--muted);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 900;
}
.status-active {
  background: rgba(80, 195, 130, .14);
  color: #26724a;
}
.status-inactive {
  background: rgba(225, 89, 112, .13);
  color: #a12f4b;
}
.users-table-card td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}
.module-access-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(248,251,255,.84);
}
.module-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.module-check {
  min-height: 54px;
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}
.module-check input {
  width: 22px;
  min-height: 22px;
}
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 12px 28px rgba(32,50,66,.05);
}
.filter-bar button,
.filter-bar input,
.filter-bar select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0 14px;
  background: white;
  color: var(--text);
  font-weight: 900;
}
.filter-bar button {
  cursor: pointer;
}
.filter-bar button.active {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-color: rgba(123,97,255,.24);
}
.filter-bar label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}
.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.analytics-kpis article {
  min-height: 132px;
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-soft);
}
.analytics-kpis article.kpi-primary {
  background: linear-gradient(135deg, rgba(200, 237, 255, .86), rgba(216, 199, 255, .7));
  border-color: rgba(123, 97, 255, .22);
}
.analytics-kpis span {
  color: var(--muted);
  font-weight: 900;
}
.analytics-kpis strong {
  font-size: 34px;
  line-height: 1;
}
.analytics-kpis small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}
.report-header {
  margin-bottom: 12px;
}
.report-live-pill {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: #23553b;
  background: linear-gradient(135deg, rgba(199, 240, 210, .82), rgba(200, 237, 255, .72));
  font-weight: 950;
}
.report-executive {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 12px;
  margin-bottom: 14px;
}
.report-executive div {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.92);
}
.report-executive span {
  color: var(--muted);
  font-weight: 900;
}
.report-executive strong {
  font-size: 20px;
  line-height: 1.2;
}
.bi-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
  overflow: auto;
  max-height: calc(100dvh - 386px);
  padding-bottom: 12px;
}
.bi-panel {
  min-height: 250px;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-soft);
}
.bi-panel-wide {
  grid-column: 1 / -1;
}
.bi-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.bi-panel-head div {
  display: grid;
  gap: 4px;
}
.bi-panel-head strong {
  font-size: 20px;
}
.bi-panel-head span {
  color: var(--muted);
  font-weight: 800;
}
.daily-bars,
.rank-list,
.category-report-list {
  display: grid;
  gap: 10px;
}
.daily-bar-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 130px;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}
.daily-bar-track,
.rank-bar {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}
.daily-bar-track b,
.rank-bar b {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
}
.rank-item {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(233,238,244,.72);
}
.rank-item strong,
.rank-item span {
  display: block;
}
.rank-item span {
  color: var(--muted);
  font-weight: 850;
}
.category-report-list div {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: var(--surface-soft);
  font-weight: 900;
}
.order-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.order-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .35fr);
  gap: 14px;
}
.order-detail-card {
  max-height: calc(100dvh - 160px);
}
.order-summary-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-soft);
}
.order-summary-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.order-summary-card span {
  color: var(--muted);
  font-weight: 900;
}
.order-summary-card strong {
  font-size: 20px;
}
.order-summary-card .grand strong {
  font-size: 32px;
}
.order-summary-card hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
}
.cash-close-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .38fr);
  gap: 14px;
}
.cash-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-soft);
}
.cash-panel-head {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.cash-panel-head div,
.cash-expected-grid article,
.cash-breakdown div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface-soft);
}
.cash-panel span,
.cash-close-form h3 {
  color: var(--muted);
  font-weight: 900;
}
.cash-panel strong {
  font-size: 20px;
  line-height: 1.1;
}
.cash-expected-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.cash-expected-grid article:first-child {
  background: linear-gradient(135deg, rgba(200,237,255,.82), rgba(216,199,255,.62));
}
.cash-expected-grid strong {
  font-size: 30px;
}
.cash-expected-grid small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.25;
}
.cash-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.cash-breakdown div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cash-close-form {
  max-height: none;
}
.cash-close-form h3 {
  margin: 0;
  font-size: 20px;
}
.cash-close-form button {
  min-height: 62px;
  border: 0;
  border-radius: 21px;
  color: white;
  background: linear-gradient(135deg, #ff4fa1, #ffd24d);
  font-weight: 950;
  cursor: pointer;
}
.cash-movement-grid {
  display: grid;
  grid-template-columns: minmax(320px, .42fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}
.cash-movement-form {
  max-height: none;
}
.cash-movement-form h3,
.cash-section-title h3 {
  margin: 0;
  font-size: 20px;
}
.movement-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.movement-type-grid label {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  cursor: pointer;
}
.movement-type-grid input {
  width: 28px;
  min-height: 28px;
}
.movement-type-grid span {
  font-weight: 950;
}
.movement-fields {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
  gap: 12px;
}
.cash-movement-form button {
  min-height: 58px;
  border: 0;
  border-radius: 20px;
  color: var(--text);
  background: linear-gradient(135deg, #c8edff, #dcc7ff);
  font-weight: 950;
  cursor: pointer;
}
.cash-movements-card {
  max-height: 430px;
}
.cash-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.cash-section-title span {
  color: var(--muted);
  font-weight: 850;
}

@keyframes formAlertIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 1366px) {
  .app-shell { grid-template-columns: var(--sidebar-closed) minmax(0, 1fr); }
  .app-shell.sidebar-expanded { grid-template-columns: var(--sidebar-open) minmax(0, 1fr); }
}

@media (max-width: 1365px) {
  :root { --topbar-h: 66px; --sidebar-closed: 72px; }
  .topbar { grid-template-columns: minmax(120px, auto) minmax(190px, 1fr) auto auto; gap: 9px; padding: 7px 12px; }
  .content { padding: 0 12px 12px; }
  .category-form { grid-template-columns: minmax(0, 1fr) minmax(235px, .58fr); }
}

@media (max-width: 1023px) {
  body { overflow: hidden; }
  .app-shell,
  .app-shell.sidebar-expanded,
  .is-pos .app-shell,
  .is-pos .app-shell.sidebar-expanded { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(84vw, 300px);
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 26px 0 55px rgba(32, 50, 66, .16);
  }
  .sidebar.open { transform: translateX(0); }
  .brand-copy, .nav b { opacity: 1; width: auto; }
  .sidebar-overlay.open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 15;
    background: rgba(32, 50, 66, .24);
    backdrop-filter: blur(3px);
  }
  .topbar {
    grid-template-columns: minmax(116px, auto) minmax(180px, 1fr) auto;
    padding-left: 72px;
  }
  .is-pos .topbar,
  .is-admin .topbar { padding-left: 72px; }
  .cashier-pill { display: none; }
  .language-switcher--mobile { position: static; display: flex; width: max-content; margin: 8px 0 12px 7px; transform: none; }
  /* "Salir" debe seguir disponible en tablet/móvil también en las pantallas
     administrativas (Caja, Órdenes, Reportes...): antes quedaba oculto y el
     usuario no podía cerrar sesión sin volver al POS. */
  .is-admin .logout-form { display: block; justify-self: end; }
  .is-admin .logout-button { min-height: 48px; padding: 0 14px; white-space: nowrap; }
  .category-form { grid-template-columns: 1fr; }
  .form-fields { grid-template-columns: 1fr; }
  .form-preview { min-height: auto; }
}

/* En tablet vertical el carrito del POS funciona como panel tactil y deja el
   catalogo con todo el ancho util. */
@media (max-width: 900px) {
  body.is-pos { --topbar-h: 132px; }
  .is-pos .main { grid-template-rows: 132px minmax(0, 1fr); }
  .is-pos .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 54px 54px;
  }
  .is-pos .pos-search { grid-column: 1 / -1; grid-row: 2; }
  .is-pos .cart-fab {
    display: block;
    min-width: 108px;
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 767px) {
  :root { --topbar-h: 132px; }
  body.is-admin { --topbar-h: 72px; }
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 54px 54px;
  }
  .pos-search { grid-column: 1 / -1; grid-row: 2; }
  .cart-fab { display: block; min-width: 108px; grid-column: 2; grid-row: 1; }
  /* Título + botón Salir en una sola fila (el botón antes caía a una segunda fila implícita y se solapaba con el contenido). */
  .is-admin .topbar { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 58px; align-items: center; }
  .is-admin .logout-form { grid-column: 2; grid-row: 1; }
  .form-card { padding: 16px; max-height: calc(100dvh - 102px); }
  .product-extras-section { padding: 14px; }
  .product-extras-head { align-items: stretch; flex-direction: column; }
  .product-extra-option { grid-template-columns: minmax(0, 1fr) auto; }
  .product-extra-option a { grid-column: 1 / -1; min-height: 44px; display: flex; align-items: center; }
  .form-actions {
    position: sticky;
    bottom: -16px;
    margin: 0 -16px -16px;
    padding: 12px 16px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
  }
  .admin-header {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
  }
  .admin-header .primary-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .settings-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }
  .settings-actions .primary-link,
  .settings-actions .secondary-link,
  .settings-actions button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .sync-panel {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    padding: 16px 16px 16px 38px;
  }
  .sync-panel::before {
    left: 16px;
    top: 24px;
    transform: none;
  }
  .sync-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
  .sync-run-button {
    width: 100%;
  }
  .cash-section-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .is-admin .content {
    padding: 0 10px 14px;
    scrollbar-gutter: auto;
  }
  .table-card,
  .settings-table-card,
  .order-detail-card,
  .cash-movements-card {
    max-height: none;
    overflow: visible;
  }
  .responsive-table {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .responsive-table table,
  .responsive-table tbody {
    width: 100%;
    display: grid;
    gap: 10px;
  }
  .responsive-table thead { display: none; }
  .responsive-table tr {
    min-width: 0;
    display: grid;
    gap: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 12px 26px rgba(32, 50, 66, .06);
  }
  .responsive-table td {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(92px, .38fr) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(233,238,244,.78);
    overflow-wrap: anywhere;
  }
  .responsive-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
  }
  .responsive-table td:last-child { border-bottom: 0; }
  .responsive-table td[colspan] {
    grid-template-columns: 1fr;
    min-height: 88px;
    place-items: center;
    text-align: center;
  }
  .responsive-table td[colspan]::before { display: none; }
  .responsive-table td.actions {
    display: flex;
    align-items: center;
    padding-top: 12px;
  }
  .responsive-table td.actions::before {
    width: 100%;
    flex: 0 0 100%;
  }
  .responsive-table td.actions a,
  .responsive-table td.actions form,
  .responsive-table td.actions button {
    flex: 1 1 120px;
  }
  .responsive-table td.actions button { width: 100%; }
  .filter-bar {
    align-items: stretch;
  }
  .filter-bar > *,
  .filter-bar label,
  .filter-bar input,
  .filter-bar select,
  .filter-bar button {
    width: 100%;
  }
  .filter-bar label { align-items: stretch; flex-direction: column; gap: 6px; }
  .analytics-kpis article { min-height: 112px; }
  .analytics-kpis strong { font-size: 30px; }
  .analytics-kpis,
  .bi-grid,
  .report-executive,
  .order-detail-grid,
  .cash-close-grid,
  .cash-movement-grid,
  .cash-panel-head,
  .cash-expected-grid,
  .cash-breakdown {
    grid-template-columns: 1fr;
  }
  .movement-fields {
    grid-template-columns: 1fr;
  }
  .bi-grid {
    max-height: none;
    overflow: visible;
  }
  .daily-bar-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .daily-bar-row strong {
    grid-column: 2;
  }
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-brand {
    min-height: 220px;
    padding: 26px;
  }
  .login-card {
    margin: 0;
    border-radius: 24px 24px 0 0;
  }
}

/* Pantallas tactiles de baja altura, comunes en 15.6 pulgadas a 1366x768. */
@media (min-width: 768px) and (max-height: 800px) {
  .is-admin .content { padding-bottom: 12px; }
  .admin-header { margin-bottom: 12px; }
  .analytics-kpis article { min-height: 116px; padding: 14px 16px; }
  .analytics-kpis strong { font-size: 30px; }
  .cash-panel { padding: 14px; gap: 10px; }
  .cash-panel-head div,
  .cash-expected-grid article,
  .cash-breakdown div { padding: 11px 12px; }
  .cash-expected-grid strong { font-size: 26px; }
}

@media (max-height: 700px) {
  .login-shell { min-height: calc(100dvh - 20px); }
  .login-brand { padding: 20px; }
  .login-card { gap: 10px; padding-block: 20px; }
  .login-card input { min-height: 50px; }
  .login-button { min-height: 54px; }
}

@media (max-width: 767px) and (max-height: 700px) {
  body.login-page { place-items: start center; }
  .login-shell {
    min-height: auto;
    margin: 10px auto;
  }
  .login-brand {
    min-height: 126px;
    padding: 12px;
  }
  .login-logo-image { width: min(62%, 210px); max-height: 190px; }
  .login-card {
    gap: 8px;
    padding: 18px;
  }
  .login-card h1 { font-size: 29px; }
  .login-card input { min-height: 48px; }
}

/* Refactored management and reporting surfaces. */
.admin-header { margin-bottom: 12px; }
.admin-header h2 { margin: 0 0 5px; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.02em; }
.admin-header p { max-width: 720px; line-height: 1.4; }
.primary-link, .form-actions button { min-height: 48px; border-radius: 14px; background: var(--brand-blue); color: #fff; }
/* Los enlaces-botón de cabecera son <a>: sin flex el texto quedaba pegado al borde
   superior del botón (min-height sin centrado vertical). */
.primary-link { display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.primary-link:hover, .form-actions button:hover { background: var(--brand-pink); }
.report-live-pill { border: 1px solid var(--brand-green); background: var(--accent-green); color: var(--brand-blue); }
.filter-bar { gap: 8px; padding: 8px; border-color: var(--line); box-shadow: 0 8px 20px rgba(11,46,109,.06); }
.filter-bar button { min-height: 46px; border-radius: 13px; color: var(--brand-blue); background: #fff; }
.filter-bar button.active, .filter-bar button[type="submit"] { background: var(--brand-pink); color: #fff; }
.analytics-kpis { gap: 12px; }
.analytics-kpis article { min-height: 128px; border-radius: 18px; box-shadow: 0 12px 28px rgba(11,46,109,.08); }
.analytics-kpis article.kpi-primary { background: var(--brand-blue); color: #fff; }
.analytics-kpis article.kpi-primary span, .analytics-kpis article.kpi-primary small { color: rgba(255,255,255,.82); }
.report-executive, .bi-panel { border-radius: 18px; box-shadow: 0 10px 24px rgba(11,46,109,.06); }
.bi-panel-head strong, .report-executive strong { color: var(--brand-blue); }
.daily-bar-track b, .rank-bar b { background: var(--brand-pink); }
.category-report-list strong { color: var(--brand-blue); }
.empty-admin-state { min-height: 110px; border-radius: 14px; }
.table-card { border-radius: 18px; }
.table-card thead th { background: var(--brand-blue); color: #fff; }
.actions a, .actions button, .link-action { border-color: rgba(255,79,161,.28); color: var(--brand-pink); }

/* Balance cromatico Taco Vibez: el azul estructura la operacion; el rosa queda como acento. */
.nav a.active { box-shadow: inset 5px 0 0 var(--brand-blue); }
.nav a.active .nav-icon { color: var(--brand-blue); background: #fff; }
.nav a:hover, .nav a:focus-visible { background: var(--accent-blue); }
.login-button { background: var(--brand-blue); }
.login-button:hover { background: var(--brand-pink); }
.logout-button { border-color: var(--brand-blue); }
.button-primary, .primary-button, .save-button { background: var(--brand-blue); }
.button-primary:hover, .primary-button:hover, .save-button:hover { background: var(--brand-sunshine); color: var(--brand-blue); }
.filter-bar button.active { background: var(--brand-blue); color: #fff; }
.filter-bar button[type="submit"] { background: var(--brand-sunshine); color: var(--brand-blue); }
.primary-link:hover, .form-actions button:hover { background: var(--brand-sunshine); color: var(--brand-blue); }
.daily-bar-track b, .rank-bar b { background: var(--brand-blue); }
.actions a, .actions button, .link-action { border-color: var(--line); color: var(--brand-blue); }
.actions a:hover, .actions button:hover, .link-action:hover { border-color: var(--brand-blue); background: var(--accent-blue); }
.danger-action { color: #b52f5b !important; border-color: rgba(181,47,91,.22) !important; }
.danger-action:hover { color: #fff !important; border-color: #b52f5b !important; background: #b52f5b !important; }
.cash-module-nav a.active > span { background: var(--brand-green); }
.cash-module-nav a:hover, .cash-module-nav a:focus-visible { background: var(--accent-blue); }
.cash-empty-icon { background: linear-gradient(135deg, var(--brand-blue), var(--brand-green)); }
.cash-overview-kpis article.is-main,
.cash-summary-grid article.is-primary { background: linear-gradient(135deg, #e8eef8, #fff); }
.cash-expected-before-count > div { background: linear-gradient(135deg, #f4f8ff, #f2fae8); }
.cash-detail-totals article > span { color: var(--brand-blue); }

/* Reportes: jerarquia mas compacta y orientada a lectura fiscal. */
.report-header { align-items: flex-start; }
.report-header { margin-bottom: 8px; }
.report-header h2 { margin-bottom: 2px; font-size: clamp(26px, 2.3vw, 34px); }
.report-header p { margin: 0; font-size: 14px; }
.report-eyebrow, .report-section-kicker { display: block; color: var(--brand-green); font-size: 11px; font-weight: 950; letter-spacing: .1em; }
.report-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.report-export-button { min-width: 190px; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 9px; padding: 8px 12px; border-radius: 14px; color: #fff; background: var(--brand-blue); text-decoration: none; box-shadow: 0 8px 18px rgba(11,46,109,.16); }
.report-export-button span { grid-row: span 2; font-size: 25px; line-height: 1; color: var(--brand-sunshine); }
.report-export-button b { font-size: 14px; }
.report-export-button small { color: rgba(255,255,255,.76); font-size: 10px; }
.report-export-button:hover { background: var(--brand-green); color: var(--brand-blue); }
.report-export-button:hover small { color: rgba(11,46,109,.78); }
.report-period-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 2px; color: var(--muted); font-size: 12px; }
.report-period-line strong { color: var(--brand-blue); }
.report-filters { align-items: center; }
.report-filter-presets { display: flex; align-items: center; gap: 6px; margin-right: auto; }
.report-filter-presets > span { margin-right: 4px; color: var(--muted); font-size: 12px; font-weight: 900; }
.report-filters .report-apply { background: var(--brand-sunshine); color: var(--brand-blue); }
.report-kpis article { min-height: 104px; padding: 15px 18px; }
.report-kpis article:not(.kpi-primary) { background: #fff; }
.bi-grid { gap: 14px; }
.bi-panel { background: rgba(255,255,255,.92); }
.bi-panel-wide { min-height: 220px; }
.bi-panel-head strong { font-size: 20px; }
.bi-panel-head span { margin-top: 4px; }
.rank-bar, .daily-bar-track { background: #edf3fb; }
.category-report-list div, .rank-item { border-color: var(--line); }
.report-executive { margin-top: 12px; }
.report-executive > div { padding: 15px 18px; }
.report-executive strong { font-size: 20px; }
@media (max-width: 900px) {
  .report-header-actions { justify-items: stretch; }
  .report-export-button { min-width: 0; }
  .report-filter-presets { width: 100%; overflow-x: auto; }
}

/* El logo nunca debe sobrepasar la primera fila de la cabecera, incluso en
   tablet o en el formato 1366x768 usado habitualmente en caja. */
@media (max-width: 1023px) {
  body.is-pos .topbar-brand-logo {
    width: 88px;
    height: 50px;
    margin: 0;
  }
}

@media (min-width: 1024px) and (max-height: 800px) {
  body.is-pos .topbar-brand-logo {
    width: 90px;
    height: 56px;
    margin: 0;
  }
}

/* POS de escritorio con poca altura util (por ejemplo 1920x800 a 150% =
   1280x533 CSS). Conserva el diseno y los blancos tactiles, pero evita que la
   cabecera y el logo consuman una proporcion excesiva de la pantalla. */
@media (min-width: 1024px) and (max-height: 700px) {
  body.is-pos { --topbar-h: 52px; }
  body.is-pos .main { grid-template-rows: 52px minmax(0, 1fr); }
  body.is-pos .topbar {
    grid-template-columns: minmax(92px, auto) minmax(220px, 1fr) auto auto;
    gap: 7px;
    padding: 4px 8px;
  }
  body.is-pos .topbar-brand-logo {
    width: 82px;
    height: 48px;
    margin: 0;
  }
  body.is-pos .pos-search {
    height: 44px;
    padding-inline: 13px;
    border-radius: 16px;
  }
  body.is-pos .pos-search input { height: 40px; }
  body.is-pos .cashier-pill,
  body.is-pos .logout-button {
    min-height: 44px;
    border-radius: 15px;
  }
  body.is-pos .logout-button { min-width: 80px; padding-inline: 10px; }
  body.is-pos .sidebar { padding-block: 4px; }
  body.is-pos .brand { min-height: 44px; margin-bottom: 3px; }
  body.is-pos .sidebar-toggle-slot { width: 44px; height: 44px; flex-basis: 44px; }
  body.is-pos .sidebar-toggle { top: 4px; }
  body.is-pos .icon-button { width: 44px; height: 44px; border-radius: 15px; }
  body.is-pos .nav { gap: 2px; }
  body.is-pos .nav a { min-height: 44px; padding-block: 4px; }
  body.is-pos .nav a .nav-icon { width: 30px; height: 30px; flex-basis: 30px; }
  body.is-pos .content { padding: 0 8px 8px; }
}

/* ==========================================================================
   UX 2026-10-03 · Administración
   ========================================================================== */
/* El título de la barra superior repetía el encabezado de la página: se vuelve una miga discreta. */
body.is-admin .topbar-title h1 { font-size: 17px; font-weight: 800; color: var(--muted); }

/* "Eliminar" separado del resto de acciones y sin relleno rojo agresivo al pasar el mouse. */
.actions form:has(> .danger-action) { margin-left: 10px; padding-left: 12px; border-left: 1px solid var(--line); }
.actions .danger-action:hover,
.actions .danger-action:focus-visible { color: #b52f5b !important; border-color: rgba(181,47,91,.35) !important; background: #fde8ef !important; }
@media (max-width: 767px) {
  .actions form:has(> .danger-action) { margin-left: 0; padding-left: 0; border-left: 0; margin-top: 6px; }
}

/* Caja: aviso cuando el efectivo esperado queda negativo */
.cash-negative-alert strong { display: block; margin-bottom: 2px; }
.cash-overview-kpis article.is-negative { box-shadow: inset 0 0 0 2px #b52f5b; }
.cash-overview-kpis article.is-negative strong { color: #b52f5b; }
/* ===== fin UX 2026-10-03 ===== */

/* ==========================================================================
   UX 2026-10-03 (2) · Filtros de listados y reporte de sabores
   ========================================================================== */
.list-filters {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 8px 20px rgba(11, 46, 109, .06);
}
.list-filter-search { flex: 1 1 280px; min-width: 0; display: flex; }
.list-filter-search input,
.list-filters select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-weight: 700;
}
.list-filter-search input { width: 100%; padding-left: 38px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%2349658e' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat 12px center; }
.list-filter-search input:focus,
.list-filters select:focus { outline: 0; border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(11, 46, 109, .12); }
.list-filters select { flex: 0 1 220px; min-width: 0; }
.list-filter-count { color: var(--muted); font-size: 13px; font-weight: 800; white-space: nowrap; }
.list-filter-clear,
.list-filter-submit {
  min-height: 46px;
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--brand-blue);
  background: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.list-filter-submit { color: #fff; background: var(--brand-blue); border-color: var(--brand-blue); }
.list-filter-empty { padding: 28px 12px !important; color: var(--muted); text-align: center; font-weight: 700; }
/* Las filas ocultas por el filtro no deben reaparecer por estilos de tarjeta en móvil */
[data-filter-row][hidden],
[data-filter-empty][hidden],
.list-filter-clear[hidden] { display: none !important; }
@media (max-width: 767px) {
  .list-filters { padding: 8px; border-radius: 14px; }
  .list-filter-search { flex-basis: 100%; }
  .list-filters select { flex: 1 1 calc(50% - 4px); }
  .list-filter-count { flex: 1 1 auto; }
}

/* Reporte: sabores y opciones por grupo */
.option-report-group + .option-report-group { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.option-report-group h4 { margin: 0 0 8px; color: var(--brand-blue); font-size: 15px; }
/* ===== fin UX 2026-10-03 (2) ===== */

/* ==========================================================================
   UX 2026-10-03 (3) · Caja, Configuración, Formularios, Mesas, Login
   ========================================================================== */
/* --- ronda 3: caja.css --- */
/* Caja ronda 3: apertura simple, tarjeta pendiente, motivos rápidos y anulación de movimientos.
   Agregar al final de public_html/assets/css/app.css (después de las reglas de caja existentes). */

/* Apertura: cajero, fecha y caja única como texto, no como inputs de solo lectura. */
.cash-opening-fact {
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface-soft);
}
.cash-opening-fact small { color: var(--muted); font-weight: 850; }
.cash-opening-fact strong { color: var(--text); font-size: 17px; overflow-wrap: anywhere; }
.cash-opening-hint { margin: 0; color: var(--muted); font-size: 13px; font-weight: 750; }

/* Cierre: botón pequeño para copiar la tarjeta esperada. */
.cash-card-check .cash-card-match {
  justify-self: start;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid rgba(116,92,255,.25);
  border-radius: 12px;
  color: #5f49d4;
  background: var(--primary-soft, rgba(240,236,255,.9));
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.cash-close-review { width: 100%; margin-top: 14px; }
.cash-confirm-declaration {
  margin: 0 0 14px;
  padding: 11px 13px;
  border-radius: 15px;
  color: var(--text) !important;
  background: rgba(240,236,255,.56);
  font-weight: 850 !important;
}

/* Movimientos: ayuda por tipo, motivos rápidos y observación plegada. */
.cash-movement-help { margin: 0; color: var(--muted); font-size: 13px; font-weight: 750; }
.cash-movements-card > .cash-movement-help { margin-top: 12px; }
.cash-reason-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cash-movement-form .cash-reason-chips button {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: #fff;
  font-size: 13px;
  font-weight: 850;
}
.cash-movement-form .cash-reason-chips button:hover,
.cash-movement-form .cash-reason-chips button:focus-visible { border-color: #745cff; color: #5f49d4; }
.cash-movement-form button.cash-primary-action {
  color: #fff;
  background: linear-gradient(135deg, #745cff, #84d9e8);
  box-shadow: 0 14px 28px rgba(116,92,255,.2);
}
.cash-optional-notes summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  color: #5f49d4;
  font-weight: 900;
  cursor: pointer;
}
.cash-optional-notes label { display: grid; gap: 7px; margin-top: 6px; color: var(--text); font-weight: 900; }

/* Lista de movimientos: marcas de anulación y acción Anular. */
.cash-movements-card { overflow: auto; }
.cash-movement-tag {
  display: inline-flex;
  margin-left: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  vertical-align: middle;
}
.cash-movement-tag.is-voided { color: #a12f59; background: rgba(255,214,227,.68); }
.cash-movement-tag.is-void { color: #355166; background: var(--surface-soft); border: 1px solid var(--line); }
.cash-movement-voided td:not([data-label="Tipo"]):not([data-label="Acción"]) { color: var(--muted); text-decoration: line-through; }
.cash-void-button {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid rgba(181,47,91,.3);
  border-radius: 12px;
  color: #b52f5b;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.cash-confirm-dialog form > p { color: var(--muted); font-weight: 750; }
.cash-confirm-dialog form > p[data-void-summary] { color: var(--text); font-weight: 900; }
.cash-confirm-dialog form .cash-confirm-actions { margin-top: 14px; }

/* Celular: las tablas de caja pasan a tarjetas y no deben forzar ancho mínimo. */
@media (max-width: 767px) {
  .cash-history-table table,
  .cash-movements-card table { min-width: 0; }
  .cash-movements-card { overflow: visible; }
}


/* --- ronda 3: config.css --- */
/* Configuración > Mesas: edición en línea por fila (renombrar y posición). */
.settings-table-edit { position: relative; }
.settings-table-edit > summary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(248, 251, 255, .92);
  color: var(--brand-blue, var(--primary));
  font-weight: 900;
  line-height: 1;
  list-style: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}
.settings-table-edit > summary::-webkit-details-marker { display: none; }
.settings-table-edit > summary:hover,
.settings-table-edit[open] > summary { border-color: var(--brand-blue, var(--primary)); background: var(--accent-blue, #e6edfa); }
.settings-table-edit > summary:focus-visible { outline: 3px solid var(--brand-blue, var(--primary)); outline-offset: 2px; }
.settings-table-edit form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 10px !important;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.settings-table-edit label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.settings-table-edit input { min-height: 44px; }
.settings-table-edit input[name="name"] { min-width: 180px; }
.settings-table-edit input[name="sort_order"] { width: 96px; }
.settings-tables-list .actions { align-items: flex-start; }
.settings-tables-list .actions button { min-height: 44px; }

/* Configuración > Usuarios: aviso de permisos sugeridos al elegir un rol. */
.role-modules-hint {
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--accent-blue, #e6edfa);
  color: var(--muted);
  font-weight: 800;
}
.role-modules-hint[hidden] { display: none; }

@media (max-width: 767px) {
  .settings-table-edit,
  .settings-table-edit > summary { width: 100%; }
  .settings-table-edit form { flex-direction: column; align-items: stretch; }
  .settings-table-edit input[name="name"],
  .settings-table-edit input[name="sort_order"] { width: 100%; min-width: 0; }
}


/* --- ronda 3: forms.css --- */
/* Formularios de administración (ronda 3): ayudas, opciones avanzadas y secciones plegables. */

/* Grupos de modificadores */
.forms-example {
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 210, 77, .24);
  color: var(--text);
  font-weight: 800;
}
.modifier-group-form label small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}
.forms-check-help span { display: grid; gap: 2px; }
.modifier-option-row.forms-option-row {
  grid-template-columns: minmax(160px, 1.5fr) minmax(110px, .7fr) auto auto;
}
.forms-option-advanced { grid-column: 1 / -1; }
.forms-option-advanced > summary {
  width: fit-content;
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
}
.forms-option-advanced-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 10px;
  padding-top: 4px;
}
.forms-add-option {
  justify-self: start;
  min-height: 48px;
  padding: 0 18px;
  border: 2px dashed var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}
.forms-add-option[hidden] { display: none; }

/* Producto: secciones secundarias plegables */
.product-extras-section.forms-fold { display: block; }
.forms-fold > * + * { margin-top: 14px; }
.forms-fold-summary {
  position: relative;
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding-right: 48px;
  list-style: none;
  cursor: pointer;
}
.forms-fold-summary::-webkit-details-marker { display: none; }
.forms-fold-summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  transform: translateY(-50%);
}
.forms-fold[open] > .forms-fold-summary::after { content: "\2212"; }
.forms-fold-summary h3 { margin: 2px 0 0; font-size: 20px; }
.forms-fold-intro { margin: 0; color: var(--muted); font-weight: 750; }

/* Categoría: el nombre de la vista previa se lee bien aunque el color sea oscuro */
.category-form .category-preview-card strong {
  width: fit-content;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .86);
}

@media (max-width: 760px) {
  .modifier-option-row.forms-option-row,
  .forms-option-advanced-fields { grid-template-columns: 1fr; }
}


/* --- ronda 3: mio.css --- */

/* --- Mesas: resumen libres/ocupadas y tiempo de cuenta --- */
.tables-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 12px; }
.tables-summary span { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 800; color: var(--muted); }
.tables-summary b { font-size: 18px; color: var(--brand-blue); }
.tables-summary-busy b { color: #b52f5b; }
.tables-summary small { color: var(--muted); font-size: 12px; font-weight: 700; }
.table-open-time { font-weight: 800; opacity: .85; }

/* --- Detalle de orden: reimpresión corregida plegada --- */
.reprint-correction-card > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--brand-blue); font-weight: 800; }
.reprint-correction-card[open] > summary { margin-bottom: 10px; }

/* --- Login: botón para ver la contraseña --- */
.login-password-field { position: relative; display: block; }
.login-password-field input { width: 100%; padding-right: 84px; }
.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  min-width: 72px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--brand-blue);
  background: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

/* --- Listados: el "slug" es un dato técnico, se oculta en celular --- */
@media (max-width: 767px) {
  .table-slug { display: none !important; }
}

/* ===== fin UX 2026-10-03 (3) ===== */

/* ==========================================================================
   PedidosYa 2026-10-04 · Órdenes, reportes y caja
   ========================================================================== */
.pedidosya-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #c4003f;
  background: #ffe3ec;
  font-size: 12px;
  font-weight: 800;
}
.pedidosya-detail strong { color: #c4003f; }
.cash-pedidosya-note {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-left: 4px solid #fa0050;
  border-radius: 12px;
  background: #fff5f8;
  color: var(--text);
  font-weight: 700;
}
.pedidosya-report { border-top: 4px solid #fa0050; }
.pedidosya-report-link { color: #c4003f; font-weight: 800; text-decoration: underline; white-space: nowrap; }
.pedidosya-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.pedidosya-kpis > div { display: grid; gap: 4px; padding: 10px 12px; border-radius: 14px; background: var(--surface-soft); }
.pedidosya-kpis span { color: var(--muted); font-size: 12px; font-weight: 800; }
.pedidosya-kpis strong { font-size: 20px; }
.pedidosya-kpis .is-net { background: #dff5e6; }
.pedidosya-kpis .is-net strong { color: #17663a; }
.pedidosya-orders { display: grid; gap: 6px; max-height: 420px; overflow-y: auto; }
.pedidosya-order-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: #fff;
}
.pedidosya-order-row:hover { border-color: #fa0050; }
.pedidosya-order-code { color: #c4003f; font-weight: 900; }
.pedidosya-order-row small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.pedidosya-order-row strong { text-align: right; }
@media (max-width: 767px) {
  .pedidosya-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pedidosya-order-row { grid-template-columns: 56px minmax(0, 1fr); }
  .pedidosya-order-row strong { grid-column: 2; text-align: left; }
}
/* ===== fin PedidosYa ===== */

/* ==========================================================================
   Una sola barra de desplazamiento por pantalla (4 oct 2026)
   Tablas, formularios y reportes ya no tienen scroll propio dentro de la página:
   se desplaza la página completa (.content). Las tablas anchas conservan scroll horizontal.
   ========================================================================== */
.is-admin .table-card,
.is-admin .form-card,
.is-admin .bi-grid,
.is-admin .tables-grid,
.is-admin .settings-table-card,
.is-admin .users-table-card,
.is-admin .order-detail-card,
.is-admin .cash-movements-card {
  max-height: none !important;
  overflow-y: visible !important;
}
.is-admin .table-card,
.is-admin .cash-movements-card { overflow-x: auto; }
/* ===== fin una sola barra ===== */
