:root {
  --ink: #111214;
  --ink-2: #1c1d20;
  --panel: #f7f3eb;
  --paper: #fffaf0;
  --orange: #ff6f00;
  --orange-dark: #cc5200;
  --mint: #18a999;
  --blue: #2f5f98;
  --line: rgba(17, 18, 20, 0.14);
  --muted: #706a61;
  --danger: #bd2c2c;
  --shadow: 0 18px 44px rgba(17, 18, 20, 0.16);
  --display-font: Impact, "Arial Black", "Franklin Gothic Heavy", "Segoe UI", Arial, sans-serif;
  --text-font: "Segoe UI", Arial, sans-serif;
  font-family: var(--text-font);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(17, 18, 20, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(17, 18, 20, 0.05) 1px, transparent 1px),
    var(--panel);
  background-size: 28px 28px;
}

body,
button,
input,
select {
  font: 500 1rem/1.4 var(--text-font);
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 46px);
  color: var(--paper);
  background: rgba(17, 18, 20, 0.96);
  border-bottom: 4px solid var(--orange);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: var(--ink);
  background: var(--orange);
  border: 2px solid var(--paper);
  font: 900 1.15rem/1 var(--display-font);
}

.brand-logo {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font: 900 1.35rem/1 var(--display-font);
  text-transform: uppercase;
}

.brand small,
.eyebrow {
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(12px, 3vw, 34px);
  justify-content: center;
}

.topnav a {
  color: var(--paper);
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.topnav a:hover {
  color: var(--orange);
}

.topnav .staff-login-link {
  color: rgba(255, 247, 232, 0.58);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.topnav .staff-login-link:hover {
  color: var(--orange);
}

.cart-pill,
.primary-action,
.secondary-action,
.ghost-button,
.category-tab,
.payment-option,
.add-button,
.quantity-controls button,
.ticket-actions button {
  min-height: 42px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-weight: 900;
  text-transform: uppercase;
}

.cart-pill {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 6px 14px;
  color: var(--ink);
  background: var(--paper);
}

.cart-pill span {
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  color: var(--paper);
  background: var(--mint);
  border-radius: 50%;
}

main {
  padding-bottom: 44px;
}

.promo-strip {
  width: min(1480px, calc(100% - 28px));
  margin: 18px auto 0;
}

.promo-strip-inner {
  position: relative;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.promo-strip img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  object-position: center;
}

.promo-dots {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: flex;
  gap: 6px;
}

.promo-dots span {
  width: 10px;
  height: 10px;
  border: 1px solid var(--paper);
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.48);
}

.promo-dots span.active {
  background: var(--orange);
}

.tracking-panel {
  display: grid;
  gap: 14px;
  width: min(1480px, calc(100% - 28px));
  margin: 18px auto 0;
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.tracking-panel h2 {
  margin: 0;
  color: var(--orange-dark);
  font: 900 clamp(2rem, 5vw, 3.2rem)/1 var(--display-font);
  text-transform: uppercase;
}

.tracking-panel p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.tracking-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.tracking-result {
  margin-top: 0;
}

.kiosk-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  width: min(1480px, calc(100% - 28px));
  margin: 18px auto;
  align-items: start;
}

.catalog-panel,
.order-panel,
.kitchen-section {
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.catalog-panel {
  overflow: hidden;
}

.intro-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
  padding: clamp(14px, 3vw, 28px);
  color: var(--paper);
  background:
    linear-gradient(90deg, rgba(17, 18, 20, 0.96), rgba(17, 18, 20, 0.82) 54%, rgba(17, 18, 20, 0.4)),
    url("../menu/cabecera-desayunos.png") center / cover no-repeat;
  border-bottom: 3px solid var(--ink);
  min-height: 156px;
}

.intro-band h1 {
  max-width: 720px;
  margin: 0;
  font: 900 clamp(1.8rem, 4.8vw, 4.2rem)/0.9 var(--display-font);
  text-transform: uppercase;
}

.intro-band p:not(.eyebrow) {
  max-width: 680px;
  margin: 7px 0 0;
  color: #fff6e6;
  font-size: 0.95rem;
}

.menu-search {
  display: grid;
  gap: 6px;
  width: min(300px, 100%);
  padding: 8px;
  color: var(--paper);
  background: rgba(17, 18, 20, 0.74);
  border: 2px solid rgba(255, 247, 232, 0.28);
  border-radius: 12px;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.55);
}

.menu-search label {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu-search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 6px;
}

.menu-search input {
  min-height: 36px;
  color: var(--ink);
  background: var(--paper);
  border-color: var(--orange);
  font-weight: 800;
}

.menu-search button {
  min-height: 36px;
  color: var(--paper);
  background: var(--orange);
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}

.menu-empty {
  grid-column: 1 / -1;
  padding: 24px;
  color: var(--muted);
  background: var(--paper);
  border: 2px dashed rgba(17, 18, 20, 0.25);
  border-radius: 8px;
  font-weight: 800;
}

.primary-action {
  padding: 0 20px;
  color: var(--paper);
  background: var(--orange);
  box-shadow: 5px 5px 0 var(--ink);
}

.primary-action:hover {
  background: var(--orange-dark);
}

.primary-action.full {
  width: 100%;
}

.secondary-action.full {
  width: 100%;
}

.primary-action:disabled,
.ghost-button:disabled,
.danger-action:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.55;
  box-shadow: none;
}

.ghost-button {
  padding: 0 12px;
  color: var(--ink);
  background: transparent;
}

.secondary-action {
  padding: 0 16px;
  color: #075f56;
  background: rgba(24, 169, 153, 0.14);
  border-color: rgba(24, 169, 153, 0.42);
}

.danger-action {
  min-height: 42px;
  padding: 0 12px;
  color: var(--paper);
  background: var(--danger);
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 5px 5px 0 var(--ink);
}

.secondary-action:hover {
  color: var(--ink);
  background: rgba(24, 169, 153, 0.24);
}

.ghost-button:hover,
.ticket-actions button:hover {
  color: var(--paper);
  background: var(--ink);
}

.category-tabs {
  display: flex;
  gap: 10px;
  padding: 14px;
  overflow-x: auto;
  background: var(--ink);
}

.category-tab {
  flex: 0 0 auto;
  padding: 0 16px;
  color: var(--paper);
  background: transparent;
  border-color: rgba(255, 250, 240, 0.42);
}

.category-tab.active {
  color: var(--ink);
  background: var(--orange);
  border-color: var(--orange);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
}

.menu-card {
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #ffffff;
}

.menu-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  object-position: center;
  border-bottom: 2px solid var(--ink);
}

.menu-card-body {
  padding: 14px;
}

.menu-card-title {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 10px;
}

.menu-card h3 {
  margin: 0;
  color: var(--orange-dark);
  font: 900 2rem/1 var(--display-font);
  text-transform: uppercase;
}

.menu-card-title span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.menu-lines {
  display: grid;
  gap: 8px;
}

.menu-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 36px;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.menu-line strong,
.menu-line small {
  display: block;
}

.menu-line strong {
  font-size: 0.96rem;
}

.menu-line small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.menu-line .menu-alert {
  display: inline-block;
  width: fit-content;
  margin-top: 6px;
  padding: 4px 7px;
  color: #075f56;
  background: rgba(24, 169, 153, 0.14);
  border: 1px solid rgba(24, 169, 153, 0.36);
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.menu-line .menu-alert.danger {
  color: var(--danger);
  background: rgba(189, 44, 44, 0.1);
  border-color: rgba(189, 44, 44, 0.28);
}

.contorno-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(122px, 1fr));
  gap: 12px 18px;
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.contorno-options legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.contorno-options label {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  color: var(--ink);
  font-size: 0.75rem;
  line-height: 1.1;
}

.contorno-options label.unavailable {
  color: var(--danger);
  opacity: 0.78;
}

.contorno-options input {
  width: 14px;
  min-height: 14px;
  flex: 0 0 auto;
}

.contorno-options label small {
  grid-column: 2;
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contorno-options label.unavailable small {
  color: var(--danger);
}

.item-options {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 12px 24px;
  padding: 10px 12px;
}

.item-options label {
  gap: 8px;
  padding: 2px 0;
}

.price {
  color: var(--blue);
  font-weight: 950;
  white-space: nowrap;
}

.price.consult-price {
  color: var(--orange-dark);
  text-transform: uppercase;
}

.price-stack {
  display: grid;
  gap: 2px;
  justify-items: end;
  white-space: nowrap;
}

.original-price {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: line-through;
}

.discounted-price {
  color: var(--ink);
  font-size: 1.05rem;
}

.discount-badge {
  display: inline-block;
  width: fit-content;
  margin-top: 6px;
  padding: 2px 7px;
  color: var(--ink);
  background: #eeeeee;
  border: 1px solid #cfcfcf;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.add-button {
  display: grid;
  width: 36px;
  padding: 0;
  place-items: center;
  color: var(--paper);
  background: var(--mint);
}

.add-button:hover {
  background: var(--orange);
}

.add-button.unavailable {
  background: var(--danger);
}

.order-panel {
  position: sticky;
  top: 94px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
}

.order-panel::-webkit-scrollbar {
  width: 10px;
}

.order-panel::-webkit-scrollbar-thumb {
  background: rgba(17, 18, 20, 0.22);
  border: 3px solid var(--paper);
  border-radius: 999px;
}

.panel-heading,
.section-heading,
.kitchen-top,
.ticket-top,
.cart-line,
.totals div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.panel-heading,
.kitchen-top {
  align-items: end;
}

.panel-heading h2,
.section-heading h2 {
  margin: 0;
  font: 900 2.5rem/1 var(--display-font);
  text-transform: uppercase;
}

.cart-payment-label {
  display: inline-block;
  margin-left: 8px;
  padding: 6px 9px;
  vertical-align: middle;
  color: #075f56;
  background: rgba(24, 169, 153, 0.16);
  border: 2px solid rgba(24, 169, 153, 0.38);
  border-radius: 999px;
  font: 900 0.72rem/1 var(--text-font);
  text-transform: uppercase;
}

.cart-list {
  display: grid;
  gap: 10px;
  min-height: 84px;
  margin: 16px 0;
}

.empty-state {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.cart-line {
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line strong,
.cart-line span {
  display: block;
}

.cart-line span {
  color: var(--muted);
  font-size: 0.84rem;
}

.quantity-controls {
  display: grid;
  grid-template-columns: 32px 34px 32px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
}

.quantity-controls button {
  min-height: 32px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.quantity-controls output {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-weight: 900;
}

.totals {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
}

.totals dd {
  margin: 0;
  font-weight: 950;
}

.grand-total {
  padding-top: 10px;
  border-top: 2px solid var(--ink);
  color: var(--orange-dark);
  font-size: 1.25rem;
}

.checkout-form {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
  border: 2px solid var(--line);
  border-radius: 6px;
}

input:focus,
select:focus {
  border-color: var(--mint);
  outline: 3px solid rgba(24, 169, 153, 0.18);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 88px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-height: 30px;
  padding: 0 10px;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  transform: translateY(-50%);
}

.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.payment-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.payment-option {
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
}

.payment-option.active {
  color: var(--paper);
  background: var(--ink);
}

.payment-fields {
  display: grid;
  gap: 10px;
}

.payment-fields[hidden] {
  display: none;
}

.mobile-payment-help {
  display: grid;
  gap: 3px;
  padding: 10px;
  color: var(--ink);
  background: rgba(24, 169, 153, 0.14);
  border: 2px solid rgba(24, 169, 153, 0.36);
  border-radius: 6px;
  font-size: 0.84rem;
}

.mobile-payment-help span {
  color: var(--muted);
}

.mobile-pay-card {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  margin-top: 14px;
  padding: 18px;
  color: #17202a;
  background: #ffffff;
  border: 1px solid rgba(17, 18, 20, 0.1);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(17, 18, 20, 0.18);
  overflow: hidden;
}

.mobile-pay-card[hidden],
[data-mobile-view][hidden] {
  display: none;
}

[data-mobile-view] {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.mobile-pay-top {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
  min-width: 0;
}

.mobile-pay-top > div {
  min-width: 0;
}

.mobile-pay-top h3 {
  margin: 0;
  color: var(--ink);
  font: 900 2.1rem/1 var(--display-font);
  text-transform: uppercase;
}

.mobile-pay-badge {
  flex: 0 0 auto;
  padding: 7px 11px;
  color: #075f56;
  background: rgba(24, 169, 153, 0.16);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.mobile-pay-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  padding: 5px;
  background: #eef2f6;
  border-radius: 999px;
}

.mobile-pay-toggle button {
  min-height: 40px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-weight: 950;
  text-transform: uppercase;
}

.mobile-pay-toggle button.active {
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(17, 18, 20, 0.12);
}

.mobile-amount-box {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  padding: 12px;
  background: #f7fafc;
  border: 1px solid rgba(17, 18, 20, 0.08);
  border-radius: 14px;
}

.mobile-amount-box div,
.merchant-data div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) min-content;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.copy-chip {
  min-height: 28px;
  padding: 0 7px;
  color: var(--ink);
  background: #ffffff;
  border: 2px solid rgba(17, 18, 20, 0.24);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.copy-chip:hover {
  color: var(--paper);
  background: var(--ink);
}

.mobile-amount-box span,
.merchant-data span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.mobile-amount-box strong,
.merchant-data strong {
  min-width: 0;
  text-align: left;
  white-space: nowrap;
}

.mobile-amount-total {
  padding-top: 10px;
  border-top: 1px solid rgba(17, 18, 20, 0.1);
}

.mobile-amount-total strong {
  color: #075f56;
  font-size: 1.25rem;
}

.rate-error {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 850;
}

.merchant-data {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbfb);
  border: 1px solid rgba(24, 169, 153, 0.28);
  border-radius: 14px;
}

.merchant-data + .rounded-action,
.rounded-action + .rounded-action {
  margin-top: 10px;
}

.order-status-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: #f7fafc;
  border: 1px solid rgba(17, 18, 20, 0.1);
  border-radius: 14px;
}

.order-status-card[hidden] {
  display: none;
}

.order-status-top {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.order-status-top span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.order-status-top strong {
  color: var(--orange-dark);
  font: 900 1.4rem/1 var(--display-font);
}

.order-status-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 6px;
}

.order-status-track[hidden] {
  display: none;
}

.order-status-track span {
  min-height: 34px;
  padding: 7px 6px;
  color: var(--muted);
  background: #ffffff;
  border: 2px solid var(--line);
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-align: center;
  text-transform: uppercase;
}

.order-status-track span.active {
  color: var(--paper);
  background: var(--orange);
  border-color: var(--ink);
}

.order-status-track span.done {
  color: var(--ink);
  background: rgba(24, 169, 153, 0.22);
  border-color: rgba(24, 169, 153, 0.5);
}

.order-rejected-box {
  padding: 12px;
  color: var(--paper);
  background: var(--danger);
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.order-rejected-box[hidden] {
  display: none;
}

.order-status-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.rounded-action {
  min-height: 48px;
  border-radius: 999px;
  box-shadow: none;
}

.payment-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-weight: 900;
}

.order-status-inline {
  margin: -6px 0 4px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
}

.order-status-inline[hidden] {
  display: none;
}

.kitchen-section {
  width: min(1480px, calc(100% - 28px));
  margin: 18px auto;
  padding: 18px;
}

.section-heading {
  align-items: end;
  margin-bottom: 14px;
}

.kitchen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.kitchen-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.kitchen-history {
  grid-column: 1 / -1;
  width: 100%;
}

.kitchen-history-table {
  min-width: 980px;
}

.history-detail-row[hidden] {
  display: none;
}

.history-detail {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: #fffaf0;
  border: 2px solid var(--orange);
  border-radius: 8px;
}

.history-detail h3 {
  margin: 0;
  color: var(--orange-dark);
  font: 900 1.6rem/1 var(--display-font);
}

.history-detail p {
  margin: 0;
}

.history-detail ul {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
  padding-left: 20px;
}

.history-detail li span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.order-ticket {
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #ffffff;
}

.order-ticket h3 {
  margin: 0;
  color: var(--orange-dark);
  font: 900 1.6rem/1 var(--display-font);
}

.ticket-top p,
.customer,
.ticket-total {
  margin: 4px 0 0;
}

.status {
  align-self: start;
  padding: 6px 10px;
  color: var(--paper);
  background: var(--blue);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.status.preparando {
  background: var(--orange-dark);
}

.status.listo {
  background: var(--mint);
  color: var(--ink);
}

.status.entregado {
  background: var(--muted);
}

.status.rechazado {
  color: var(--paper);
  background: var(--danger);
}

.order-ticket ul {
  margin: 12px 0;
  padding-left: 20px;
}

.order-ticket li span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.ticket-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ticket-actions button {
  padding: 0 8px;
  background: transparent;
  font-size: 0.78rem;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  pointer-events: none;
  max-width: min(360px, calc(100vw - 36px));
  padding: 14px 16px;
  color: var(--paper);
  background: var(--ink);
  border: 3px solid var(--orange);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.internal-page {
  min-height: 100vh;
}

.login-shell,
.admin-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 28px auto 44px;
}

.login-shell {
  display: grid;
  min-height: calc(100vh - 56px);
  place-items: center;
}

.login-card,
.admin-panel,
.detail-panel,
.dashboard-card {
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.login-card {
  width: min(460px, 100%);
}

.login-brand {
  margin-bottom: 18px;
  color: var(--ink);
}

.admin-tabs,
.dashboard-controls,
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.admin-tabs {
  padding: 12px;
  background: var(--ink);
  border-radius: 8px;
}

.admin-tab {
  display: none;
  margin-top: 16px;
}

.admin-tab.active {
  display: block;
}

.admin-toolbar {
  margin-bottom: 14px;
}

.admin-toolbar label {
  min-width: min(420px, 100%);
  flex: 1 1 260px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  background: #ffffff;
}

.admin-table th,
.admin-table td {
  padding: 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--paper);
  background: var(--ink);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.compact {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.detail-panel {
  margin-top: 14px;
}

.order-row-open td {
  background: #fff8ec;
}

.order-detail-row td {
  padding: 0;
  background: #fff8ec;
}

.order-detail-row[hidden] {
  display: none;
}

.inline-order-detail {
  margin: 0;
  border-width: 0 0 3px;
  border-radius: 0;
  box-shadow: none;
}

.dashboard-card {
  margin: 14px 0;
}

.dashboard-controls .category-tab {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--ink);
}

.dashboard-controls .category-tab.active {
  color: var(--ink);
  background: var(--orange);
  border-color: var(--orange);
}

.dashboard-card h3,
.detail-panel h3 {
  margin: 0 0 10px;
  color: var(--orange-dark);
  font: 900 2rem/1 var(--display-font);
  text-transform: uppercase;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.visits-header {
  margin-top: 24px;
}

.dashboard-metric {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #ffffff;
  border: 2px solid var(--line);
  border-radius: 8px;
}

.dashboard-metric > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-metric > strong {
  color: var(--ink);
  font: 900 2rem/1 var(--display-font);
}

.mini-histogram {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20px, 1fr));
  gap: 4px;
  min-height: 104px;
  align-items: end;
}

.mini-histogram button {
  display: grid;
  gap: 5px;
  align-items: end;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 0.66rem;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}

.mini-histogram i {
  display: block;
  width: 100%;
  min-height: 12px;
  background: rgba(17, 18, 20, 0.18);
  border: 2px solid rgba(17, 18, 20, 0.18);
  border-radius: 6px 6px 2px 2px;
}

.mini-histogram button.active {
  color: var(--orange-dark);
}

.mini-histogram button.active i {
  background: var(--orange);
  border-color: var(--ink);
}

.dashboard-top-header {
  margin-top: 18px;
}

.dashboard-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.dashboard-top-table h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1rem;
  text-transform: uppercase;
}

.dashboard-category-total {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
  padding: 8px 10px;
  background: #ffffff;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 900;
}

.dashboard-category-total span {
  color: var(--muted);
  text-transform: uppercase;
}

.dashboard-category-total strong {
  color: var(--ink);
}

.dashboard-top-table .admin-table {
  min-width: 520px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.stats-grid span {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #ffffff;
  border: 2px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
}

.stats-grid strong {
  color: var(--ink);
  font-size: 1.25rem;
}

.toggle-line {
  display: inline-flex;
  grid-template-columns: none;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: 0.84rem;
}

.toggle-line input {
  width: 18px;
  min-height: 18px;
}

.price-edit {
  display: inline-flex;
  grid-template-columns: none;
  gap: 6px;
  align-items: center;
  color: var(--ink);
  font-weight: 900;
}

.price-edit input {
  width: 90px;
  min-height: 34px;
  padding: 6px 8px;
}

.stock-edit {
  width: 80px;
}

.pedido.nuevo {
  position: relative;
  z-index: 2;
  transform: scale(1.25);
  transform-origin: top left;
  border-color: var(--orange);
  box-shadow: 8px 8px 0 var(--ink);
}

.pedido.nuevo + .pedido {
  margin-top: 54px;
}

@media (max-width: 1180px) {
  .kiosk-shell {
    grid-template-columns: 1fr;
  }

  .order-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  .intro-band,
  .menu-grid,
  .form-grid,
  .tracking-form,
  .two-fields,
  .payment-switch,
  .mobile-pay-toggle {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    gap: 10px;
    width: 100%;
    padding: 10px 8px;
  }

  .promo-strip,
  .kiosk-shell,
  .tracking-panel {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .mobile-amount-box div,
  .merchant-data div,
  .order-status-top {
    display: grid;
    gap: 3px;
  }

  .mobile-amount-box strong,
  .merchant-data strong,
  .order-status-top strong {
    text-align: left;
  }

  .topnav {
    grid-column: 1;
    justify-content: start;
  }

  .cart-pill {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: center;
  }

  .intro-band {
    min-height: 228px;
    align-items: end;
    background:
      linear-gradient(180deg, rgba(17, 18, 20, 0.96), rgba(17, 18, 20, 0.68)),
      url("../menu/cabecera-desayunos.png") center / cover no-repeat;
  }

  .menu-card img {
    height: clamp(110px, 24vw, 140px);
    object-position: center;
  }

  .menu-line {
    grid-template-columns: minmax(0, 1fr) 36px;
  }

  .menu-line .price,
  .menu-line .price-stack {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }

  .ticket-actions {
    grid-template-columns: 1fr;
  }

  .pedido.nuevo {
    transform: none;
    border-width: 4px;
    box-shadow: 0 0 0 4px rgba(255, 111, 0, 0.22);
  }

  .pedido.nuevo + .pedido {
    margin-top: 0;
  }

  .android-app .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 14px;
  }

  .android-app .topnav {
    display: none;
  }

  .android-app .brand-logo {
    width: 44px;
    height: 44px;
  }

  .android-app .brand small {
    display: none;
  }

  .android-app .cart-pill {
    justify-self: end;
  }

  .android-app .kiosk-shell {
    width: min(100% - 18px, 1480px);
    margin-top: 10px;
  }

  .android-app .intro-band {
    min-height: 168px;
  }
}
