:root {
  --zos-ink: #0f172a;
  --zos-text: #1e293b;
  --zos-muted: #64748b;
  --zos-muted-2: #94a3b8;
  --zos-line: #e2e8f0;
  --zos-soft: #f8fafc;
  --zos-soft-2: #f1f5f9;
  --zos-panel: #ffffff;
  --zos-panel-2: #f8fafc;
  --zos-green: #16a34a;
  --zos-teal: #14b8a6;
  --zos-teal-dark: #0d9488;
  --zos-blue: #2563eb;
  --zos-red: #ef4444;
  --zos-yellow: #ca8a04;
  --zos-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.02);
  --zos-shadow-soft: 0 2px 10px -2px rgba(15, 23, 42, 0.05), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --zos-radius: 16px;
}

html,
body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.app-shell,
body.app-frame {
  background: var(--zos-soft);
  color: var(--zos-text);
}

body.app-shell {
  overflow: hidden;
}

.site-header--menu-first {
  min-height: 64px;
  height: 64px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 26px;
  background: #ffffff;
  border-bottom: 1px solid var(--zos-line);
  box-shadow: none;
  backdrop-filter: none;
}

.ops-product-brand {
  display: inline-grid;
  grid-template-columns: 38px auto;
  align-items: center;
  gap: 10px;
  min-width: 150px;
}

.ops-product-brand__mark,
.auth-standard__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--zos-ink);
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: none;
}

.ops-product-brand__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}

.ops-product-brand__copy strong {
  color: #020617;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.ops-product-brand__copy small {
  margin-top: 4px;
  color: var(--zos-teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

.site-header--menu-first .nav-toggle {
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid var(--zos-line);
  background: #ffffff;
  color: var(--zos-ink);
  font-weight: 800;
}

.main-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.main-nav .nav-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav .nav-group--primary {
  padding: 4px;
  border: 1px solid var(--zos-line);
  border-radius: 999px;
  background: var(--zos-soft-2);
  box-shadow: none;
}

.main-nav .nav-group--secondary {
  padding-left: 4px;
}

.main-nav .nav-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.main-nav a,
.main-nav button,
.sound-toggle,
.ops-shell-fullscreen {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--zos-muted);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0;
}

.main-nav .nav-group--primary a {
  min-width: 96px;
}

.main-nav a:hover,
.main-nav button:hover,
.sound-toggle:hover,
.ops-shell-fullscreen:hover {
  background: #ffffff;
  border-color: var(--zos-line);
}

.main-nav a.is-active {
  background: #ffffff;
  color: #020617;
  border-color: rgba(15, 23, 42, 0.06);
  box-shadow: var(--zos-shadow-soft);
  font-weight: 850;
}

.main-nav .nav-group--secondary a {
  padding-inline: 10px;
  color: var(--zos-muted);
  font-size: 12px;
}

.main-nav .nav-meta {
  margin-left: auto;
  padding-left: 10px;
  border-left: 1px solid var(--zos-line);
  gap: 6px;
}

.nav-meta .chip,
.context-bar__item,
.call-pop {
  border: 1px solid var(--zos-line);
  background: #ffffff;
  color: var(--zos-ink);
  box-shadow: var(--zos-shadow-soft);
}

.sound-toggle {
  background: #ffffff;
}

.sound-toggle::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--zos-green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.sound-toggle.is-off::before {
  background: var(--zos-red);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.ops-shell-fullscreen {
  background: var(--zos-ink);
  color: #ffffff;
}

.ops-shell-fullscreen:hover {
  background: #020617;
  border-color: #020617;
}

.app-shell-main {
  height: calc(100vh - 64px);
  padding: 0;
  background: var(--zos-soft);
}

.app-shell-frames,
.app-shell-frame {
  width: 100%;
  height: 100%;
}

.app-shell-frame {
  border: 0;
  background: var(--zos-soft);
}

/* Internal navigation should reveal content immediately, not fade each page. */
body.app-shell .app-shell-main,
body.app-frame .content {
  animation: none;
}

body.app-shell .app-shell-frames {
  position: relative;
}

body.app-shell .app-shell-loading {
  position: absolute;
  z-index: 10;
  top: 12px;
  right: 12px;
  max-width: calc(100% - 24px);
  padding: 10px 14px;
  border: 1px solid var(--zos-line);
  border-radius: 12px;
  background: var(--zos-panel);
  color: var(--zos-ink);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  pointer-events: none;
}

body.app-shell .app-shell-loading[hidden] {
  display: none !important;
}

body.app-frame .content {
  max-width: none;
  padding: 24px;
  background: var(--zos-soft);
}

body.app-frame .content > section:first-child,
body.app-frame .content > .card:first-child,
body.app-frame .content > .stack:first-child {
  margin-top: 0;
}

/* In the embedded workspace the Zestia OS shell is the only navigation. */
body.app-frame .dashboard-shell {
  display: flex;
  min-height: calc(100vh - 48px);
  flex-direction: column;
  gap: 18px;
}

body.app-frame .dashboard-hero,
body.app-frame .work-start-panel,
body.app-frame .ops-workbar {
  display: none !important;
}

body.app-frame .ops-view-section {
  margin-top: 0;
  scroll-margin-top: 16px;
}

body.app-frame h1,
body.app-frame h2,
body.app-frame h3 {
  color: #020617;
  letter-spacing: 0;
}

body.app-frame .card,
body.app-frame .panel,
body.app-frame article,
body.app-frame fieldset,
body.app-frame .telephony-card,
body.app-frame .dashboard-card,
body.app-frame .order-card,
body.app-frame .map-card,
body.app-frame .ledger-card {
  border: 1px solid var(--zos-line);
  border-radius: var(--zos-radius);
  background: var(--zos-panel);
  box-shadow: var(--zos-shadow-soft);
}

body.app-frame .card .card,
body.app-frame .panel .card {
  box-shadow: none;
}

body.app-frame button,
body.app-frame .button,
body.app-frame .ghost-button,
body.app-frame .secondary-button {
  border-radius: 10px;
  font-weight: 850;
  letter-spacing: 0;
}

body.app-frame input,
body.app-frame select,
body.app-frame textarea {
  border-radius: 10px;
  border-color: var(--zos-line);
  background: #ffffff;
}

body.app-frame input:focus,
body.app-frame select:focus,
body.app-frame textarea:focus {
  border-color: var(--zos-teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16);
  outline: none;
}

body.app-frame .page-header,
body.app-frame .page-header--compact {
  margin: 0 0 18px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--zos-line);
  background: transparent;
}

body.app-frame .section-kicker {
  color: var(--zos-teal-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.app-frame .page-header h1,
body.app-frame h1 {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: -0.02em;
}

body.app-frame .chip,
body.app-frame .filter-chip,
body.app-frame .status-pill {
  border-radius: 999px;
  border-color: var(--zos-line);
  font-weight: 800;
  letter-spacing: 0;
}

body.app-frame .button,
body.app-frame button:not(.link),
body.app-frame .ghost-button,
body.app-frame .secondary-button {
  min-height: 38px;
  border-radius: 999px;
}

body.app-frame .button,
body.app-frame button:not(.ghost-button):not(.secondary-button):not(.link) {
  background: var(--zos-ink);
  color: #ffffff;
  border-color: var(--zos-ink);
}

body.app-frame .ghost-button,
body.app-frame .secondary-button {
  background: #ffffff;
  color: var(--zos-text);
  border: 1px solid var(--zos-line);
}

body.app-frame .danger,
body.app-frame button.danger {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

body.app-frame .dashboard-grid,
body.app-frame .dashboard-cards,
body.app-frame .telephony-kpis,
body.app-frame .telephony-summary,
body.app-frame .telephony-grid {
  gap: 18px;
}

body.app-frame .dashboard-card,
body.app-frame .order-card,
body.app-frame .telephony-row,
body.app-frame .ledger-card,
body.app-frame .map-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body.app-frame .dashboard-card:hover,
body.app-frame .order-card:hover,
body.app-frame .telephony-row:hover,
body.app-frame .map-card:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.55);
  box-shadow: var(--zos-shadow);
}

#ops-center,
#future-orders,
#dispatch-map,
#cash,
#telefonia-asistente,
#telefonia-activas,
#telefonia-perdidas,
#telefonia-equipo {
  scroll-margin-top: 18px;
}

#orders-map {
  min-height: 620px;
  height: min(72vh, 780px);
  border-radius: 0;
  border: 1px solid var(--zos-line);
  overflow: hidden;
  background: #dfe7ef;
  box-shadow: none;
}

body.app-frame #dispatch-map {
  border: 1px solid var(--zos-line);
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--zos-shadow-soft);
}

body.app-frame #dispatch-map h2,
body.app-frame #cash h2,
body.app-frame #ops-center h2 {
  font-size: clamp(20px, 2vw, 28px);
}

body.app-frame table {
  border-collapse: separate;
  border-spacing: 0;
}

body.app-frame th {
  color: var(--zos-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.app-frame .alert,
body.app-frame .warning,
body.app-frame [class*="over"],
body.app-frame [class*="danger"] {
  border-color: rgba(220, 38, 38, 0.22);
}

.ops-assistant__toggle {
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: var(--zos-ink);
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
}

.telephony-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  margin-bottom: 18px;
}

.telephony-kpi {
  min-height: 86px;
  border: 1px solid var(--zos-line);
  border-radius: 16px;
  background: #ffffff;
  padding: 16px;
  box-shadow: var(--zos-shadow-soft);
}

.telephony-kpi span,
.telephony-kpi small,
.telephony-assistant-rules span {
  color: var(--zos-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.telephony-kpi strong {
  display: block;
  margin-top: 4px;
  color: var(--zos-ink);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.telephony-kpi.is-live strong,
.telephony-kpi.is-live small {
  color: var(--zos-teal-dark);
}

.telephony-kpi.is-warn {
  border-color: #fed7aa;
  background: #fff7ed;
}

.telephony-kpi.is-danger {
  border-color: #fecdd3;
  background: #fff1f2;
}

.telephony-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.telephony-search {
  flex: 1 1 280px;
}

.telephony-search input {
  width: 100%;
  min-height: 40px;
  border-radius: 999px;
  padding-inline: 18px;
  box-shadow: var(--zos-shadow-soft);
}

.telephony-assistant-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 28px;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 30px;
  border: 1px solid #1e293b;
  border-radius: 22px;
  background: radial-gradient(circle at 30% 0%, rgba(20, 184, 166, 0.26), transparent 34%), var(--zos-ink);
  color: #ffffff;
  box-shadow: var(--zos-shadow);
}

.telephony-assistant-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), transparent 48%);
}

.telephony-assistant-panel > * {
  position: relative;
  z-index: 1;
}

.telephony-assistant-panel h2 {
  margin: 4px 0 8px;
  color: #ffffff;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
}

.telephony-assistant-panel p,
.telephony-assistant-panel .telephony-footnote {
  color: #cbd5e1;
}

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

.telephony-assistant-rules article {
  min-height: 92px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.66);
  padding: 16px;
  box-shadow: none;
  backdrop-filter: blur(8px);
}

.telephony-assistant-rules strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 850;
}

.telephony-card,
.telephony-row {
  border-radius: 16px;
}

.telephony-row {
  border: 1px solid var(--zos-line);
  background: #ffffff;
  box-shadow: var(--zos-shadow-soft);
}

.call-pop {
  border-radius: 18px;
  box-shadow: var(--zos-shadow);
}

.call-pop__title {
  color: var(--zos-ink);
  font-weight: 900;
}

.call-pop__dot {
  background: var(--zos-red);
  box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.12);
}

.ops-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.ops-modal[hidden] {
  display: none;
}

.ops-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(10px);
}

.ops-modal__card {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 22px;
  background: #ffffff;
  padding: 22px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

.ops-modal__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--zos-ink);
  color: #ffffff;
  font-weight: 900;
}

.ops-modal__eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--zos-teal-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ops-modal__body h2 {
  margin: 0 0 8px;
  color: var(--zos-ink);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.ops-modal__body p {
  margin: 0;
  color: var(--zos-muted);
  font-size: 14px;
  line-height: 1.5;
}

.ops-modal__actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.ops-modal__btn {
  min-height: 40px;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 850;
}

.ops-modal__btn--ghost {
  border: 1px solid var(--zos-line);
  background: #ffffff;
  color: var(--zos-text);
}

.ops-modal__btn--primary {
  border: 1px solid var(--zos-ink);
  background: var(--zos-ink);
  color: #ffffff;
}

.ops-modal[data-variant="danger"] .ops-modal__icon,
.ops-modal[data-variant="danger"] .ops-modal__btn--primary {
  border-color: var(--zos-red);
  background: var(--zos-red);
}

.ops-modal[data-variant="notice"] .ops-modal__btn--ghost {
  display: none;
}

.ops-modal-open {
  overflow: hidden;
}

.ops-assistant__panel {
  border: 1px solid var(--zos-line);
  border-radius: 18px;
  box-shadow: var(--zos-shadow);
}

body.app-frame .ops-shell {
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

body.app-frame .ops-header {
  padding: 0 0 14px;
  border-bottom: 1px solid var(--zos-line);
}

body.app-frame .ops-header h1,
body.app-frame .ops-header h2 {
  margin: 0;
  color: var(--zos-ink);
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 900;
  letter-spacing: -0.02em;
}

body.app-frame .ops-header .ops-actions {
  display: none;
}

body.app-frame .ops-toolbar {
  position: sticky;
  top: 0;
  z-index: 12;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--zos-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--zos-shadow-soft);
  backdrop-filter: blur(12px);
}

body.app-frame .ops-filters {
  align-items: center;
}

body.app-frame .ops-filters .chip,
body.app-frame .ops-toolbar .chip {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  background: #eef3f9;
  color: #334155;
  font-weight: 850;
}

body.app-frame .ops-filters .chip.is-active,
body.app-frame .ops-toolbar .chip.is-active {
  background: var(--zos-ink);
  color: #ffffff;
}

body.app-frame .ops-search {
  min-height: 38px;
  min-width: min(360px, 100%);
  border-radius: 999px;
  padding-inline: 16px;
  background: #ffffff;
  box-shadow: none;
}

body.app-frame .ops-board {
  flex: 1 1 auto;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 18px;
  align-items: stretch;
}

body.app-frame .ops-column {
  width: 330px;
  min-width: 330px;
  max-height: calc(100vh - 240px);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--zos-line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--zos-shadow-soft);
}

body.app-frame .ops-column__head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--zos-line);
  background: #f8fafc;
  color: var(--zos-ink);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.app-frame .ops-column__head span,
body.app-frame .ops-column__head strong {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--zos-ink);
  box-shadow: var(--zos-shadow-soft);
  letter-spacing: 0;
}

body.app-frame .ops-column__list,
body.app-frame .ops-column .order-grid {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px;
  background: #f8fafc;
}

body.app-frame .order-grid {
  display: grid;
  gap: 12px;
}

body.app-frame .order-card {
  border-radius: 16px;
  padding: 14px;
  background: #ffffff;
  box-shadow: var(--zos-shadow-soft);
  border-left: 4px solid transparent;
}

body.app-frame .order-card.compact {
  border-radius: 16px;
  padding: 14px;
}

body.app-frame .order-card__head {
  align-items: flex-start;
}

body.app-frame .order-card__head h3 {
  color: var(--zos-ink);
  font-size: 18px;
  font-weight: 900;
}

body.app-frame .order-card__meta,
body.app-frame .order-card__details {
  color: var(--zos-muted);
  font-size: 12px;
  font-weight: 650;
}

body.app-frame .order-card__actions {
  gap: 10px;
}

body.app-frame .primary-actions {
  gap: 8px;
}

body.app-frame .primary-actions button,
body.app-frame .order-card__links a,
body.app-frame .order-card__links button {
  min-height: 34px;
  border-radius: 999px;
}

body.app-frame .order-timer {
  color: var(--zos-ink);
  font-weight: 900;
}

body.app-frame .order-timer.is-late {
  color: #be123c;
}

body.app-frame .pill {
  border: 1px solid rgba(226, 232, 240, 0.9);
  font-size: 11px;
  font-weight: 850;
}

body.app-frame .pill-delivery,
body.app-frame .pill-ok {
  background: #ecfdf5;
  color: #047857;
}

body.app-frame .pill-pickup {
  background: #eff6ff;
  color: #1d4ed8;
}

body.app-frame .pill-warn {
  background: #fff7ed;
  color: #c2410c;
}

body.app-frame .map-layout {
  gap: 18px;
  align-items: stretch;
}

body.app-frame .map-panel,
body.app-frame .rider-panel {
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--zos-shadow-soft);
}

body.app-frame .map-panel h2,
body.app-frame .rider-panel h3 {
  color: var(--zos-ink);
  font-weight: 900;
  letter-spacing: -0.01em;
}

body.app-frame .rider-list {
  gap: 12px;
}

body.app-frame .rider-card {
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
  box-shadow: var(--zos-shadow-soft);
}

body.app-frame .rider-card__top h4 {
  color: var(--zos-ink);
  font-size: 20px;
  font-weight: 900;
}

body.app-frame .rider-card__meta {
  color: var(--zos-muted);
  font-weight: 700;
}

body.app-frame .rider-cash-form {
  gap: 10px;
}

body.app-frame .rider-cash-form button {
  border-radius: 999px;
}

body.app-frame .ops-delivery-map,
body.app-frame .delivery-cash-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.app-frame .ops-delivery-layout,
body.app-frame .ops-delivery-layout--control {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(520px, 1.4fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

body.app-frame .ops-route-panel,
body.app-frame .ops-delivery-card,
body.app-frame .delivery-cash-card {
  min-width: 0;
  border: 1px solid var(--zos-line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--zos-shadow-soft);
}

body.app-frame .ops-route-panel {
  padding: 18px;
}

body.app-frame .ops-route-panel h2,
body.app-frame .ops-route-panel h3,
body.app-frame .delivery-cash-panel h2,
body.app-frame .delivery-cash-card h3 {
  color: var(--zos-ink);
  font-weight: 900;
  letter-spacing: -0.01em;
}

body.app-frame .ops-route-list {
  display: grid;
  gap: 12px;
}

body.app-frame .ops-route-card {
  border: 1px solid var(--zos-line);
  border-radius: 16px;
  padding: 14px;
  background: #f8fafc;
}

body.app-frame .ops-route-card__head,
body.app-frame .delivery-cash-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.app-frame .ops-route-row__id {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--zos-ink);
  color: #ffffff;
  font-weight: 900;
}

body.app-frame .delivery-cash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

body.app-frame .delivery-cash-card {
  padding: 18px;
}

body.app-frame .delivery-cash-card strong {
  color: var(--zos-ink);
  font-size: 24px;
  font-weight: 900;
}

body.app-frame .order-builder {
  grid-template-columns: minmax(300px, 360px) minmax(520px, 1fr) minmax(320px, 360px);
  gap: 18px;
  align-items: start;
}

body.app-frame .order-panel,
body.app-frame .order-menu,
body.app-frame .order-cart {
  min-width: 0;
}

body.app-frame .order-panel,
body.app-frame .order-cart {
  top: 18px;
}

body.app-frame .order-panel .form-section,
body.app-frame .order-cart,
body.app-frame .menu-toolbar,
body.app-frame .category-nav {
  border-radius: 18px;
  border: 1px solid var(--zos-line);
  background: #ffffff;
  box-shadow: var(--zos-shadow-soft);
}

body.app-frame .form-section {
  padding: 16px;
  background: #f8fafc;
}

body.app-frame .form-section__title {
  color: var(--zos-muted);
  font-weight: 900;
  letter-spacing: 0.16em;
}

body.app-frame .menu-toolbar {
  padding: 16px;
  margin-bottom: 14px;
}

body.app-frame .menu-toolbar h1,
body.app-frame .menu-toolbar h2 {
  color: var(--zos-ink);
  font-weight: 900;
  letter-spacing: -0.02em;
}

body.app-frame .menu-search input {
  min-height: 42px;
  border-radius: 999px;
}

body.app-frame .category-nav {
  top: 0;
  padding: 8px;
}

body.app-frame .category-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 0;
  background: #eef3f9;
  color: #334155;
  font-weight: 850;
}

body.app-frame .category-pill.is-active {
  background: var(--zos-ink);
  color: #ffffff;
}

body.app-frame .product-grid {
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

body.app-frame .product-card {
  border-radius: 18px;
  box-shadow: var(--zos-shadow-soft);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

body.app-frame .product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.55);
  box-shadow: var(--zos-shadow);
}

body.app-frame .product-body {
  padding: 18px;
  gap: 12px;
}

body.app-frame .product-title h3 {
  color: var(--zos-ink);
  font-size: 20px;
  font-weight: 900;
}

body.app-frame .price {
  color: var(--zos-teal-dark);
  font-size: 19px;
  font-weight: 900;
}

body.app-frame .qty-stepper {
  min-height: 46px;
  border-radius: 12px;
  background: #f8fafc;
}

body.app-frame .qty-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--zos-ink);
  color: #ffffff;
}

body.app-frame .ingredient-control {
  border-radius: 16px;
  background: #f8fafc;
}

body.app-frame .ingredient-thumb {
  border-radius: 12px;
}

body.app-frame .ingredient-name {
  color: var(--zos-ink);
  font-weight: 900;
}

body.app-frame .order-cart {
  padding: 20px;
}

body.app-frame .order-cart .cart-total {
  padding-top: 12px;
  border-top: 1px solid var(--zos-line);
  font-size: 20px;
}

.cash-ops-hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.cash-ops-hero__main,
.cash-ops-hero__form,
.cash-register-card {
  border: 1px solid var(--zos-line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--zos-shadow-soft);
}

.cash-ops-hero__main {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  background: radial-gradient(circle at 25% 0%, rgba(20, 184, 166, 0.22), transparent 34%), var(--zos-ink);
  color: #ffffff;
}

.cash-ops-hero__main .section-kicker {
  color: var(--zos-teal);
}

.cash-ops-hero__main strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.cash-ops-hero__main p {
  margin: 8px 0 0;
  color: #cbd5e1;
  font-weight: 650;
}

.cash-ops-hero__form {
  padding: 22px;
}

.cash-ops-hero__form h2,
.cash-registers-section h2,
.cash-register-card h3 {
  color: var(--zos-ink);
  font-weight: 900;
  letter-spacing: -0.01em;
}

.cash-create-form,
.cash-register-card__settings {
  display: grid;
  gap: 12px;
}

.cash-create-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.cash-create-form .cash-checkbox,
.cash-create-form button {
  align-self: end;
}

.cash-register-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 18px;
}

.cash-register-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 20px;
  overflow: hidden;
}

.cash-register-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--zos-muted-2);
}

.cash-register-card.is-open::before {
  background: var(--zos-teal);
}

.cash-register-card__top,
.cash-register-card__money,
.cash-register-card__action {
  display: flex;
  gap: 12px;
}

.cash-register-card__top {
  align-items: flex-start;
  justify-content: space-between;
}

.cash-register-card__top h3 {
  margin: 4px 0 0;
}

.cash-register-card__money {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cash-register-card__money div {
  border: 1px solid var(--zos-line);
  border-radius: 16px;
  padding: 14px;
  background: #f8fafc;
}

.cash-register-card__money span {
  display: block;
  color: var(--zos-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cash-register-card__money strong {
  display: block;
  margin-top: 6px;
  color: var(--zos-ink);
  font-size: 22px;
  font-weight: 900;
}

.cash-register-card__action {
  align-items: center;
}

.cash-register-card__action input {
  flex: 1 1 auto;
}

.cash-register-card__settings {
  padding-top: 14px;
  border-top: 1px dashed var(--zos-line);
}

.cash-register-card .inline-form {
  margin: 0;
}

.auth-standard {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(239, 246, 255, 0.96)),
    var(--zos-soft);
}

.auth-standard__card {
  border: 1px solid var(--zos-line);
  border-radius: 18px;
  box-shadow: var(--zos-shadow);
}

.auth-standard__brand span {
  color: var(--zos-teal);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-standard__brand strong {
  color: #020617;
}

@media (max-width: 1180px) {
  .site-header--menu-first {
    grid-template-columns: auto auto;
    height: auto;
    min-height: 64px;
    padding-block: 10px;
  }

  .main-nav {
    grid-column: 1 / -1;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .main-nav .nav-meta {
    margin-left: 0;
  }

  .telephony-kpis {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .telephony-assistant-panel {
    grid-template-columns: 1fr;
  }

  body.app-frame .order-builder {
    grid-template-columns: 1fr;
  }

  body.app-frame .ops-delivery-layout,
  body.app-frame .ops-delivery-layout--control {
    grid-template-columns: 1fr;
  }

  body.app-frame .order-panel,
  body.app-frame .order-cart {
    position: static;
    max-height: none;
  }

  body.app-frame .ops-column {
    max-height: none;
  }

  .cash-ops-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header--menu-first {
    min-height: 58px;
    padding: 8px;
  }

  .ops-product-brand {
    grid-template-columns: 34px minmax(0, 1fr);
    min-width: 0;
  }

  .ops-product-brand__mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .ops-product-brand__copy small {
    max-width: 140px;
  }

  .main-nav {
    gap: 8px;
  }

  .main-nav .nav-group--primary {
    border-radius: 16px;
  }

  .main-nav .nav-group--primary a {
    min-width: auto;
  }

  .main-nav a,
  .main-nav button,
  .sound-toggle,
  .ops-shell-fullscreen {
    min-height: 36px;
    padding-inline: 10px;
    font-size: 12px;
  }

  body.app-frame .content {
    padding: 14px;
  }

  .telephony-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .telephony-kpis,
  .telephony-assistant-rules {
    grid-template-columns: 1fr;
  }

  .telephony-assistant-panel {
    padding: 22px;
    border-radius: 18px;
  }

  body.app-frame .ops-board {
    flex-direction: column;
    overflow-x: visible;
    overflow-y: visible;
  }

  body.app-frame .ops-column {
    width: 100%;
    min-width: 0;
  }

  body.app-frame .product-grid,
  .cash-register-grid,
  .cash-create-form {
    grid-template-columns: 1fr;
  }

  .cash-ops-hero__main {
    min-height: 180px;
    padding: 22px;
  }

  #orders-map {
    min-height: 480px;
    height: 66vh;
    border-radius: 12px;
  }
}

/* UX reference alignment: ux.html */
:root {
  --zos-bg: #f3f4f6;
  --zos-surface: #ffffff;
  --zos-ink: #0f172a;
  --zos-text: #334155;
  --zos-muted: #64748b;
  --zos-muted-2: #94a3b8;
  --zos-border: #e2e8f0;
  --zos-soft: #f8fafc;
  --zos-soft-2: #f1f5f9;
  --zos-primary: #10b981;
  --zos-primary-dark: #059669;
  --zos-danger: #ef4444;
  --zos-warning: #f59e0b;
  --zos-blue: #3b82f6;
  --zos-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --zos-card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.10);
  --zos-radius: 12px;
}

html,
body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.font-mono,
body.app-frame .cash-register-card__money strong,
body.app-frame .delivery-cash-card strong,
body.app-frame .rider-card__top h4 {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

body.app-shell,
body.app-frame {
  background: var(--zos-bg);
  color: var(--zos-text);
}

body.app-frame .content {
  padding: 24px;
  background: var(--zos-bg);
}

body.app-frame .content::-webkit-scrollbar,
body.app-frame .ops-board::-webkit-scrollbar,
body.app-frame .ops-column__list::-webkit-scrollbar,
body.app-frame .order-panel::-webkit-scrollbar,
body.app-frame .order-cart::-webkit-scrollbar,
body.app-frame .telephony-card::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

body.app-frame .content::-webkit-scrollbar-track,
body.app-frame .ops-board::-webkit-scrollbar-track,
body.app-frame .ops-column__list::-webkit-scrollbar-track,
body.app-frame .order-panel::-webkit-scrollbar-track,
body.app-frame .order-cart::-webkit-scrollbar-track,
body.app-frame .telephony-card::-webkit-scrollbar-track {
  background: transparent;
}

body.app-frame .content::-webkit-scrollbar-thumb,
body.app-frame .ops-board::-webkit-scrollbar-thumb,
body.app-frame .ops-column__list::-webkit-scrollbar-thumb,
body.app-frame .order-panel::-webkit-scrollbar-thumb,
body.app-frame .order-cart::-webkit-scrollbar-thumb,
body.app-frame .telephony-card::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

.site-header--menu-first {
  height: 64px;
  min-height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: #ffffff;
  border-bottom: 1px solid var(--zos-border);
  box-shadow: none;
}

.ops-product-brand {
  min-width: 172px;
  display: flex;
  align-items: center;
}

.ops-product-brand__mark {
  display: none;
}

.ops-product-brand__copy {
  line-height: 1;
}

.ops-product-brand__wordmark {
  display: block;
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ops-product-brand__wordmark span {
  color: var(--zos-primary);
}

.ops-product-brand__wordmark em {
  color: #cbd5e1;
  font-style: normal;
}

.ops-product-brand__copy small {
  display: block;
  margin-top: 4px;
  max-width: none;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.site-header--menu-first .nav-toggle {
  display: none;
}

.main-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.main-nav .nav-group--primary {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--zos-border);
  border-radius: 10px;
  background: #f1f5f9;
  box-shadow: none;
}

.main-nav .nav-group--primary a {
  min-width: auto;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--zos-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.main-nav .nav-group--primary a:hover {
  background: #ffffff;
  color: var(--zos-ink);
}

.main-nav .nav-group--primary a.is-active {
  background: var(--zos-ink);
  color: #ffffff;
  border-color: var(--zos-ink);
  box-shadow: none;
}

.main-nav .nav-group--secondary {
  flex: 0 1 auto;
  margin-left: auto;
  padding: 0;
  display: flex;
  gap: 2px;
}

.main-nav .nav-group--secondary a {
  min-height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.main-nav .nav-group--secondary a:hover,
.main-nav .nav-group--secondary a.is-active {
  background: #f1f5f9;
  color: #0f172a;
  box-shadow: none;
}

.main-nav .nav-meta {
  flex: 0 0 auto;
  margin-left: 0;
  padding-left: 0;
  border-left: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-nav .nav-meta .chip:not(#ext-status) {
  display: none;
}

#ext-status {
  min-height: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  border: 0;
  background: transparent;
  color: #0f172a;
  box-shadow: none;
  font-size: 0;
  text-transform: none;
}

#ext-status::before {
  content: "Puesto";
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

#ext-status::after {
  content: "En linea";
  margin-top: 4px;
  color: var(--zos-primary);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.sound-toggle {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--zos-border);
  border-radius: 8px;
  background: #f8fafc;
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.sound-toggle::before {
  width: 8px;
  height: 8px;
  background: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.ops-shell-fullscreen {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--zos-ink);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.main-nav .nav-meta a {
  min-height: 30px;
  padding: 0 6px;
  border-radius: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.app-shell-main {
  height: calc(100vh - 64px);
  background: var(--zos-bg);
}

body.app-frame .card,
body.app-frame .panel,
body.app-frame article,
body.app-frame fieldset,
body.app-frame .telephony-card,
body.app-frame .dashboard-card,
body.app-frame .order-card,
body.app-frame .map-card,
body.app-frame .ledger-card,
body.app-frame .order-panel .form-section,
body.app-frame .order-cart,
body.app-frame .menu-toolbar,
body.app-frame .category-nav,
body.app-frame .ops-route-panel,
body.app-frame .ops-delivery-card,
body.app-frame .delivery-cash-card,
.cash-ops-hero__main,
.cash-ops-hero__form,
.cash-register-card {
  border: 1px solid var(--zos-border);
  border-radius: 12px;
  background: var(--zos-surface);
  box-shadow: var(--zos-card-shadow);
}

body.app-frame .page-header,
body.app-frame .page-header--compact,
body.app-frame .ops-header {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
}

body.app-frame .page-header h1,
body.app-frame h1,
body.app-frame .ops-header h1 {
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

body.app-frame .page-header p,
body.app-frame .ops-header p,
body.app-frame .muted {
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
}

body.app-frame .dashboard-shell,
body.app-frame .ops-shell,
body.app-frame .ops-shell--primary {
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.app-frame .dashboard-hero,
body.app-frame .work-start-panel,
body.app-frame .ops-workbar {
  display: none !important;
}

body.app-frame .ops-toolbar {
  position: relative;
  top: auto;
  z-index: 1;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--zos-border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--zos-card-shadow);
  backdrop-filter: none;
}

body.app-frame .ops-filters .chip,
body.app-frame .ops-toolbar .chip,
body.app-frame .filter-chip,
body.app-frame .status-pill,
body.app-frame .pill {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.app-frame .ops-filters .chip.is-active,
body.app-frame .ops-toolbar .chip.is-active,
body.app-frame .filter-chip.is-active {
  background: var(--zos-ink);
  color: #ffffff;
}

body.app-frame .ops-search,
body.app-frame input,
body.app-frame select,
body.app-frame textarea {
  border-radius: 8px;
  border-color: var(--zos-border);
  background: #ffffff;
}

body.app-frame .ops-board {
  flex: 1 1 auto;
  display: flex;
  gap: 16px;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 8px;
}

body.app-frame .ops-column {
  width: 300px;
  min-width: 300px;
  max-width: 320px;
  max-height: none;
  min-height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.app-frame .ops-column__head {
  min-height: 28px;
  padding: 0 4px 10px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.app-frame .ops-column__head span,
body.app-frame .ops-column__head strong {
  min-width: auto;
  height: auto;
  display: inline;
  border-radius: 0;
  background: transparent;
  color: #0f172a;
  box-shadow: none;
}

body.app-frame .ops-column__list,
body.app-frame .ops-column .order-grid {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 0 8px 0 0;
  background: transparent;
}

body.app-frame .order-card {
  position: relative;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--zos-border);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

body.app-frame .order-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--zos-card-shadow-hover);
}

body.app-frame .order-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--zos-primary);
}

body.app-frame .order-card__head h3 {
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}

body.app-frame .order-card__meta,
body.app-frame .order-card__details {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

body.app-frame .primary-actions button,
body.app-frame .order-card__links a,
body.app-frame .order-card__links button,
body.app-frame .button,
body.app-frame button:not(.link),
body.app-frame .ghost-button,
body.app-frame .secondary-button {
  min-height: 34px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

body.app-frame .button,
body.app-frame button:not(.ghost-button):not(.secondary-button):not(.link) {
  background: var(--zos-ink);
  border-color: var(--zos-ink);
  color: #ffffff;
}

body.app-frame .ghost-button,
body.app-frame .secondary-button {
  background: #ffffff;
  border: 1px solid var(--zos-border);
  color: #334155;
}

body.app-frame .order-builder {
  grid-template-columns: minmax(320px, 400px) minmax(520px, 1fr) minmax(340px, 420px);
  gap: 24px;
  align-items: start;
}

body.app-frame .order-panel .form-section,
body.app-frame .order-cart,
body.app-frame .menu-toolbar,
body.app-frame .category-nav,
body.app-frame .product-card,
body.app-frame .ingredient-control {
  border-radius: 12px;
  box-shadow: var(--zos-card-shadow);
}

body.app-frame .form-section {
  background: #ffffff;
}

body.app-frame .form-section__title,
body.app-frame .section-kicker {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.app-frame .menu-toolbar h1,
body.app-frame .menu-toolbar h2,
body.app-frame .product-title h3,
body.app-frame .order-cart h2,
body.app-frame .order-cart h3 {
  color: #0f172a;
  font-weight: 900;
  letter-spacing: -0.02em;
}

body.app-frame .category-pill {
  min-height: 30px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

body.app-frame .category-pill.is-active {
  background: #0f172a;
  color: #ffffff;
}

body.app-frame .product-card {
  border-radius: 10px;
  box-shadow: none;
}

body.app-frame .product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: var(--zos-card-shadow-hover);
}

body.app-frame .price {
  color: #0f766e;
  font-weight: 900;
}

body.app-frame .qty-btn {
  background: #0f172a;
}

body.app-frame .ingredient-thumb {
  border-radius: 12px;
}

body.app-frame .ops-delivery-layout,
body.app-frame .ops-delivery-layout--control,
body.app-frame .map-layout {
  gap: 24px;
}

body.app-frame .ops-route-panel,
body.app-frame .ops-route-card,
body.app-frame .map-panel,
body.app-frame .rider-panel,
body.app-frame .rider-card {
  border-radius: 12px;
  box-shadow: var(--zos-card-shadow);
}

body.app-frame .ops-route-row__id {
  border-radius: 8px;
  background: #0f172a;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

body.app-frame #orders-map,
body.app-frame #leaflet-map,
body.app-frame .map-canvas {
  border-radius: 12px;
  border: 2px solid #e2e8f0;
}

.cash-ops-hero {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.cash-ops-hero__main {
  min-height: 160px;
  justify-content: center;
  padding: 22px;
  border-left: 4px solid #0f172a;
  background: #ffffff;
  color: #334155;
}

.cash-ops-hero__main .section-kicker {
  color: #64748b;
}

.cash-ops-hero__main strong {
  color: #0f172a;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.04em;
}

.cash-ops-hero__main p {
  color: #64748b;
}

.cash-register-card,
body.app-frame .delivery-cash-card {
  border-radius: 12px;
  box-shadow: var(--zos-card-shadow);
}

.cash-register-card::before {
  width: 4px;
  background: #0f172a;
}

.cash-register-card.is-open::before {
  background: var(--zos-primary);
}

.cash-register-card__money div {
  border-radius: 10px;
  background: #f8fafc;
}

.telephony-assistant-panel {
  border-radius: 12px;
  border-color: #1e293b;
  background: #0f172a;
  box-shadow: var(--zos-card-shadow);
}

.telephony-assistant-panel h2,
.telephony-assistant-panel strong {
  color: #ffffff;
}

.telephony-assistant-panel p,
.telephony-assistant-panel .muted {
  color: #cbd5e1;
}

.telephony-card,
.telephony-kpis article,
.telephony-summary article,
.telephony-grid article {
  border-radius: 12px;
  box-shadow: var(--zos-card-shadow);
}

.ops-assistant__toggle {
  border-radius: 999px;
  background: #0f172a;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
}

.ops-assistant__toggle span {
  border-radius: 999px;
  background: #bbf7d0;
  color: #166534;
}

.ops-modal__card {
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

@media (max-width: 1320px) {
  .site-header--menu-first {
    gap: 14px;
    padding-inline: 16px;
  }

  .ops-product-brand {
    min-width: 132px;
  }

  .ops-product-brand__wordmark {
    font-size: 18px;
  }

  .main-nav {
    gap: 10px;
  }

  .main-nav .nav-group--primary a {
    padding-inline: 9px;
    font-size: 12px;
  }

  .main-nav .nav-group--secondary {
    display: none;
  }
}

@media (max-width: 1180px) {
  .site-header--menu-first {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding-block: 10px;
  }

  .site-header--menu-first .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .main-nav {
    order: 3;
    width: 100%;
    flex-basis: 100%;
    overflow-x: auto;
  }

  .main-nav .nav-group--primary {
    flex: 0 0 auto;
  }

  .main-nav .nav-meta {
    margin-left: auto;
  }

  .app-shell-main {
    height: calc(100vh - 118px);
  }

  body.app-frame .order-builder {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header--menu-first {
    padding: 8px;
  }

  .ops-product-brand {
    min-width: 120px;
  }

  .ops-product-brand__copy small {
    max-width: none;
  }

  .main-nav .nav-meta {
    display: none;
  }

  body.app-frame .content {
    padding: 14px;
  }

  body.app-frame .ops-board {
    flex-direction: column;
    overflow-x: visible;
  }

  body.app-frame .ops-column {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .cash-ops-hero {
    grid-template-columns: 1fr;
  }
}

/* Centralita aligned with ux.html reference */
body.app-frame .inline-call-audio {
  height: 34px;
  max-width: 260px;
  min-width: 200px;
  width: 24vw;
}

body.app-frame .voice-console {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 24px;
  min-height: calc(100vh - 150px);
  padding: 4px 0 28px;
  color: #111827;
}

body.app-frame .voice-console__rail,
body.app-frame .voice-console__main {
  min-width: 0;
}

body.app-frame .voice-console__rail {
  display: grid;
  align-content: start;
  gap: 20px;
}

body.app-frame .voice-console__main {
  display: grid;
  align-content: start;
  gap: 18px;
}

body.app-frame .voice-agent-card,
body.app-frame .voice-card,
body.app-frame .voice-monitor-card,
body.app-frame .voice-history-card {
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body.app-frame .voice-agent-card {
  min-height: 330px;
  padding: 28px;
  border-color: #1f2a44;
  background:
    radial-gradient(circle at 18% 78%, rgba(20, 184, 166, 0.22), transparent 34%),
    linear-gradient(135deg, #111827 0%, #172554 100%);
  color: #ffffff;
}

body.app-frame .voice-agent-card__head,
body.app-frame .voice-monitor-card__head,
body.app-frame .voice-history-card header,
body.app-frame .voice-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

body.app-frame .voice-agent-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.app-frame .voice-agent-card h1,
body.app-frame .voice-monitor-card h1 {
  margin: 0;
  color: inherit;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: 0;
}

body.app-frame .voice-agent-card__title span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(96, 165, 250, 0.45);
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.22);
  color: #93c5fd;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.app-frame .voice-agent-card p,
body.app-frame .voice-agent-card blockquote {
  color: rgba(226, 232, 240, 0.86);
}

body.app-frame .voice-status-pill,
body.app-frame .voice-count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

body.app-frame .voice-status-pill.is-online {
  border: 1px solid rgba(45, 212, 191, 0.4);
  background: rgba(20, 184, 166, 0.18);
  color: #5eead4;
}

body.app-frame .voice-count-pill.is-danger {
  background: #fef2f2;
  color: #dc2626;
}

body.app-frame .voice-count-pill.is-warn {
  background: #fff7ed;
  color: #ea580c;
}

body.app-frame .voice-waveform {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 82px;
  margin: 48px 0 40px;
}

body.app-frame .voice-waveform span {
  display: block;
  width: 8px;
  height: var(--level);
  min-height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3b82f6 0%, #2dd4bf 100%);
  box-shadow: 0 0 22px rgba(59, 130, 246, 0.2);
}

body.app-frame .voice-agent-card blockquote {
  margin: 0;
  padding: 12px 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.42);
  color: #e2e8f0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
}

body.app-frame .voice-agent-card__health {
  margin: 12px 0 0;
  font-size: 13px;
}

body.app-frame .voice-card,
body.app-frame .voice-history-card,
body.app-frame .voice-monitor-card {
  padding: 22px;
}

body.app-frame .voice-card h2,
body.app-frame .voice-history-card h2,
body.app-frame .voice-monitor-card h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

body.app-frame .voice-performance-card__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

body.app-frame .voice-performance-card__stats span,
body.app-frame .voice-resolution span,
body.app-frame .voice-rules-grid span {
  display: block;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

body.app-frame .voice-performance-card__stats strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0;
}

body.app-frame .voice-performance-card__stats div:nth-child(2) strong {
  color: #059669;
}

body.app-frame .voice-resolution {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  margin-top: 22px;
}

body.app-frame .voice-resolution__bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

body.app-frame .voice-resolution__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

body.app-frame .voice-resolution strong {
  color: #334155;
  font-size: 18px;
}

body.app-frame .voice-card--compact {
  padding: 18px 20px;
}

body.app-frame .voice-monitor-card {
  min-height: 575px;
}

body.app-frame .voice-monitor-card__head {
  padding-bottom: 18px;
  border-bottom: 1px solid #e2e8f0;
}

body.app-frame .voice-monitor-card__head p,
body.app-frame .voice-history-card header p {
  margin: 6px 0 0;
  color: #64748b;
  font-weight: 700;
}

body.app-frame .voice-monitor-card__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

body.app-frame .voice-config-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

body.app-frame .telephony-soft-alert {
  margin: 10px 0;
  padding: 12px 14px;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 800;
}

body.app-frame .voice-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

body.app-frame:has(.order-form) .order-builder {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 380px);
  grid-template-areas:
    "details details"
    "menu cart";
  grid-auto-rows: auto minmax(0, 1fr);
  min-height: calc(100dvh - 128px);
}

body.app-frame:has(.order-form) .order-panel {
  grid-area: details;
  max-height: 32dvh;
}

body.app-frame:has(.order-form) .order-menu {
  grid-area: menu;
}

body.app-frame:has(.order-form) .order-cart {
  grid-area: cart;
}

body.app-frame:has(.order-form) .order-panel .order-details {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(250px, 1fr) minmax(320px, 1.25fr) minmax(300px, 1.1fr);
  gap: 10px;
}

body.app-frame:has(.order-form) .order-panel .form-section {
  padding: 10px;
}

body.app-frame:has(.order-form) .order-panel .manual-address {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.app-frame:has(.order-form) .order-cart .cart-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

body.app-frame:has(.order-form) .quick-extras {
  max-height: 150px;
}

body.app-frame .voice-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(112px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

body.app-frame .voice-kpi-strip .telephony-kpi {
  min-height: 82px;
  padding: 13px 14px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #f8fafc;
  box-shadow: none;
}

body.app-frame .voice-kpi-strip .telephony-kpi span,
body.app-frame .voice-kpi-strip .telephony-kpi small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.app-frame .voice-kpi-strip .telephony-kpi strong {
  display: block;
  margin-top: 4px;
  color: #111827;
  font-size: 26px;
  line-height: 1;
}

body.app-frame .voice-kpi-strip .telephony-kpi.is-live {
  border-color: #86efac;
  background: #ecfdf5;
}

body.app-frame .voice-kpi-strip .telephony-kpi.is-warn {
  border-color: #fed7aa;
  background: #fff7ed;
}

body.app-frame .voice-kpi-strip .telephony-kpi.is-danger {
  border-color: #fecaca;
  background: #fef2f2;
}

body.app-frame .voice-console-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

body.app-frame .voice-console-tools .telephony-search input {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid #dbe3ee;
  background: #ffffff;
}

body.app-frame .voice-monitor-card__subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 0 10px;
}

body.app-frame .voice-monitor-card__subhead--queue {
  margin-top: 22px;
}

body.app-frame .voice-line-list {
  display: grid;
  gap: 10px;
}

body.app-frame .voice-line-list--compact {
  margin-top: 14px;
}

body.app-frame .voice-line-list .telephony-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: none;
}

body.app-frame .voice-line-list .telephony-row.is-live,
body.app-frame .voice-line-list .telephony-row[data-state="IN_CALL"] {
  border-color: #bfdbfe;
  background: #eff6ff;
  box-shadow: inset 4px 0 0 #2563eb;
}

body.app-frame .voice-line-row__identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

body.app-frame .voice-line-row__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
}

body.app-frame .voice-line-list .telephony-row strong {
  color: #111827;
  font-size: 17px;
}

body.app-frame .voice-line-list .telephony-row__meta {
  margin-top: 3px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

body.app-frame .voice-line-list .telephony-row__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

body.app-frame .voice-line-list .telephony-pill {
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}

body.app-frame .voice-line-list--queue .telephony-row {
  background: #f8fafc;
}

body.app-frame .voice-history-card header {
  margin-bottom: 12px;
}

body.app-frame .voice-history-card .telephony-row {
  min-height: 64px;
}

body.app-frame .voice-ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

body.app-frame .voice-card header .section-kicker,
body.app-frame .voice-history-card header .section-kicker {
  color: #94a3b8;
}

body.app-frame .voice-card header > strong,
body.app-frame .voice-card--status header > strong {
  color: #0f172a;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 20px;
}

body.app-frame .voice-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

body.app-frame .voice-rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

body.app-frame .voice-rules-grid div {
  min-height: 78px;
  padding: 14px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #f8fafc;
}

body.app-frame .voice-rules-grid strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 17px;
}

body.app-frame .voice-debug-card {
  padding: 18px 22px;
}

body.app-frame .voice-debug-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: #111827;
  font-weight: 900;
}

@media (max-width: 1380px) {
  body.app-frame .voice-console {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  }

  body.app-frame .voice-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  body.app-frame .voice-console {
    grid-template-columns: 1fr;
  }

  body.app-frame .voice-console__rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.app-frame .voice-agent-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  body.app-frame .voice-console__rail,
  body.app-frame .voice-ops-grid,
  body.app-frame .voice-console-tools {
    grid-template-columns: 1fr;
  }

  body.app-frame .voice-monitor-card__head,
  body.app-frame .voice-monitor-card__subhead,
  body.app-frame .voice-line-list .telephony-row {
    align-items: stretch;
    flex-direction: column;
  }

  body.app-frame .voice-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.app-frame .voice-monitor-card__badges,
  body.app-frame .voice-line-list .telephony-row__actions {
    justify-content: flex-start;
  }
}

/* Main operative screens aligned with ux.html reference */
body.app-frame .dashboard-hero,
body.app-frame .work-start-panel {
  display: none;
}

body.app-frame #ops-center,
body.app-frame #delivery-work-map,
body.app-frame #cash {
  scroll-margin-top: 18px;
}

body.app-frame .ops-workbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -4px 0 18px;
  padding: 16px 18px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

body.app-frame .ops-workbar__main {
  flex: 1 1 auto;
  min-width: 0;
}

body.app-frame .ops-workbar__main > div:first-child {
  display: none;
}

body.app-frame .ops-workbar__tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px;
}

body.app-frame .ops-workbar__tabs button,
body.app-frame .ops-workbar__tabs a {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

body.app-frame .ops-workbar__tabs button.is-active,
body.app-frame .ops-workbar__tabs a.is-active {
  border-color: #0f172a;
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.28);
}

body.app-frame .ops-workbar__metrics {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: min(640px, 45vw);
}

body.app-frame .ops-workbar__metrics span,
body.app-frame .ops-focus-toggle {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  background: #eef3f9;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

body.app-frame .ops-workbar__metrics span b {
  color: #0f172a;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

body.app-frame .ops-workbar__metrics .ops-live-state {
  border-color: #86efac;
  background: #dcfce7;
  color: #047857;
}

body.app-frame .ops-focus-toggle {
  border-color: #0f172a;
  background: #0f172a;
  color: #ffffff;
}

body.app-frame .ops-shell--primary {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.app-frame .ops-shell--primary .ops-header {
  margin-bottom: 14px;
  padding: 16px 0 0;
}

body.app-frame .ops-shell--primary .ops-header h2 {
  margin: 0;
  color: #111827;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

body.app-frame .ops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.app-frame .ops-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #ffffff;
}

body.app-frame .ops-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

body.app-frame .ops-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

body.app-frame .ops-search {
  border-radius: 8px;
  border: 1px solid #dbe3ee;
}

body.app-frame .rush-panel {
  margin-bottom: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.app-frame .rush-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

body.app-frame .rush-panel__head h3 {
  margin: 0;
  color: #111827;
  font-size: 16px;
}

body.app-frame .rush-table {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #ffffff;
}

body.app-frame .rush-row {
  display: grid;
  grid-template-columns: 70px 120px minmax(180px, 1fr) minmax(160px, 0.9fr) minmax(170px, 1fr) minmax(160px, 0.8fr);
  gap: 14px;
  align-items: center;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  text-decoration: none;
}

body.app-frame .rush-row--head {
  min-height: 38px;
  border-color: #0f172a;
  background: #0f172a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

body.app-frame .rush-row strong {
  color: inherit;
}

body.app-frame .rush-row small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

body.app-frame .rush-row--head small,
body.app-frame .rush-row--head span {
  color: #ffffff;
}

body.app-frame .ops-group-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

body.app-frame .ops-group-card {
  padding: 14px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

body.app-frame .ops-group-card__head,
body.app-frame .ops-group-row {
  gap: 10px;
}

body.app-frame .ops-group-row {
  padding: 10px;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #f8fafc;
}

body.app-frame .ops-board {
  gap: 28px;
  padding: 0 0 18px;
}

body.app-frame .ops-column {
  width: 320px;
  min-width: 320px;
  max-height: calc(100vh - 250px);
  min-height: 360px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.app-frame .ops-column__head {
  padding: 0 4px 10px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  letter-spacing: 0.08em;
}

body.app-frame .ops-column__head span:first-child {
  display: inline-flex;
  width: auto;
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
}

body.app-frame .ops-column__head .badge,
body.app-frame .ops-column__head span:last-child {
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
}

body.app-frame .ops-column__list,
body.app-frame .ops-column .order-grid {
  padding: 0;
  background: transparent;
}

body.app-frame .order-card,
body.app-frame .order-card.compact {
  border-radius: 8px;
  border: 1px solid #dbe3ee;
  border-left: 4px solid #e11d48;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

body.app-frame .order-card[data-status="IN_PREPARATION"],
body.app-frame .order-card[data-status="COOKED"] {
  border-left-color: #f97316;
}

body.app-frame .order-card[data-status="READY_FOR_PICKUP"],
body.app-frame .order-card[data-status="COURIER_ASSIGNED"] {
  border-left-color: #10b981;
}

body.app-frame .order-card[data-status="PICKED_UP"] {
  border-left-color: #94a3b8;
}

body.app-frame .ops-delivery-layout--control {
  grid-template-columns: minmax(300px, 360px) minmax(560px, 1fr) minmax(300px, 360px);
  gap: 22px;
}

body.app-frame .ops-rider-control-panel {
  order: 1;
  min-width: 0;
  padding: 20px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body.app-frame .ops-map-panel--main {
  order: 2;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body.app-frame .ops-route-panel--planner {
  order: 3;
  border-radius: 12px;
}

body.app-frame .ops-map-panel__head {
  padding: 18px 20px;
  border-bottom: 1px solid #e2e8f0;
}

body.app-frame .ops-map-panel--main #orders-map {
  min-height: 680px;
  height: calc(100vh - 265px);
  border: 0;
  border-radius: 0;
}

body.app-frame .ops-rider-control-list,
body.app-frame .ops-route-list {
  display: grid;
  gap: 12px;
}

body.app-frame .ops-rider-control-card,
body.app-frame .ops-route-card,
body.app-frame .ops-route-row {
  border-radius: 8px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  box-shadow: none;
}

body.app-frame .ops-route-card--active {
  border-color: #bfdbfe;
  background: #eff6ff;
}

body.app-frame .ops-route-card__action {
  border-color: #bae6fd;
  border-radius: 8px;
  background: #ecfeff;
  color: #0f766e;
  font-weight: 900;
}

body.app-frame .ops-route-card__insertions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #8ab8a7;
  border-radius: 8px;
  background: #eef9f5;
  color: #173d35;
}

body.app-frame .ops-route-card__insertions > strong {
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .03em;
}

body.app-frame .ops-route-card__insertions form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 8px;
  margin: 0;
  padding: 8px;
  border-radius: 7px;
  background: #fff;
}

body.app-frame .ops-route-card__insertions form small {
  grid-column: 1;
  color: #4c665f;
}

body.app-frame .ops-route-card__insertions form button {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 38px;
  padding: 6px 10px;
}

@media (max-width: 760px) {
  body.app-frame .ops-route-card__insertions form {
    grid-template-columns: minmax(0, 1fr);
  }

  body.app-frame .ops-route-card__insertions form button {
    grid-column: 1;
    grid-row: auto;
  }
}

body.app-frame .delivery-cash-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

body.app-frame .delivery-cash-panel .section-header {
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  background: transparent;
}

body.app-frame .delivery-cash-panel .section-header h2,
body.app-frame .cash-page-header h1 {
  color: #111827;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: 0;
}

body.app-frame .delivery-cash-card {
  border-radius: 12px;
  border-left: 4px solid #0f172a;
}

body.app-frame .delivery-cash-card.needs-drop {
  border-color: #fed7aa;
  border-left-color: #f97316;
  background: #fff7ed;
}

@media (max-width: 1320px) {
  body.app-frame .ops-workbar {
    align-items: stretch;
    flex-direction: column;
  }

  body.app-frame .ops-workbar__metrics {
    min-width: 0;
    justify-content: flex-start;
  }

  body.app-frame .ops-delivery-layout--control {
    grid-template-columns: minmax(280px, 340px) minmax(520px, 1fr);
  }

  body.app-frame .ops-route-panel--planner {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  body.app-frame .ops-toolbar,
  body.app-frame .ops-group-strip {
    grid-template-columns: 1fr;
  }

  body.app-frame .ops-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  body.app-frame .ops-tools {
    flex-wrap: wrap;
  }

  body.app-frame .rush-row {
    grid-template-columns: 60px minmax(150px, 1fr);
  }

  body.app-frame .rush-row span:nth-child(n + 3) {
    display: none;
  }

  body.app-frame .ops-delivery-layout--control {
    grid-template-columns: 1fr;
  }

  body.app-frame .ops-route-panel--planner {
    grid-column: auto;
  }

  body.app-frame .ops-map-panel--main #orders-map {
    min-height: 540px;
    height: 62vh;
  }
}

/* Zestia OS terminal visual parity with ux.html */
:root {
  --zos-demo-bg: #f8f7f4;
  --zos-demo-ink: #111827;
  --zos-demo-blue: #3454e8;
  --zos-demo-orange: #f97316;
  --zos-demo-green: #22c55e;
  --zos-demo-line: #e5e7eb;
  --zos-demo-muted: #6b7280;
  --zos-demo-card: #ffffff;
  --zos-demo-dark: #11161f;
}

html,
body {
  font-family: "Outfit", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.app-shell,
body.app-frame {
  background: var(--zos-demo-bg);
  color: var(--zos-demo-ink);
}

.site-header--menu-first {
  height: 76px;
  min-height: 76px;
  padding: 0 28px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  background: #ffffff;
  border-bottom: 1px solid #dfe3ea;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.06);
}

.ops-product-brand {
  display: block;
  min-width: 146px;
}

.ops-product-brand__mark {
  display: none;
}

.ops-product-brand__copy {
  display: block;
}

.ops-product-brand__wordmark {
  display: block;
  color: #111827 !important;
  font-size: 26px !important;
  font-style: italic;
  font-weight: 900 !important;
  letter-spacing: -0.04em !important;
  line-height: 0.9;
}

.ops-product-brand__wordmark span {
  color: var(--zos-demo-blue);
}

.ops-product-brand__wordmark em {
  display: none;
}

.ops-product-brand__copy small {
  display: block;
  max-width: 280px;
  margin-top: 5px;
  color: #6b7280;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ops-lucia-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #16a34a;
}

.ops-lucia-pill strong {
  color: #16a34a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.ops-lucia-wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 18px;
}

.ops-lucia-wave i {
  display: block;
  width: 4px;
  height: 12px;
  border-radius: 999px;
  background: var(--zos-demo-green);
  animation: zos-wave 1.1s infinite ease-in-out;
}

.ops-lucia-wave i:nth-child(2) { animation-delay: 0.12s; }
.ops-lucia-wave i:nth-child(3) { animation-delay: 0.24s; }
.ops-lucia-wave i:nth-child(4) { animation-delay: 0.36s; }

@keyframes zos-wave {
  0%,
  100% { height: 5px; }
  50% { height: 18px; }
}

.main-nav {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.nav-cluster {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.nav-cluster--center {
  justify-content: center;
}

.nav-cluster--right {
  justify-content: flex-end;
}

.main-nav .nav-group--primary {
  gap: 3px;
  padding: 6px;
  border: 1px solid #d7dde7;
  border-radius: 16px;
  background: #f1f5f9;
}

.main-nav .nav-group--secondary {
  gap: 2px;
  padding: 6px;
  border-left: 1px solid #d7dde7;
}

.main-nav a,
.main-nav button,
.sound-toggle,
.ops-shell-fullscreen {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
}

.main-nav .nav-group--primary a {
  min-width: 0;
  color: #4b5563;
}

.main-nav a.is-active {
  border-color: var(--zos-demo-ink);
  background: var(--zos-demo-ink);
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(52, 84, 232, 0.22);
}

.main-nav .nav-group--secondary a {
  color: #6b7280;
  font-size: 12px;
}

.nav-group--status {
  gap: 8px;
}

.ops-status-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.ops-status-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
}

.ops-status-chip--kitchen {
  background: var(--zos-demo-blue);
}

.ops-status-chip--route {
  background: var(--zos-demo-orange);
}

.nav-meta {
  gap: 6px;
}

.nav-meta .chip {
  min-height: 34px;
  border-radius: 10px;
  box-shadow: none;
}

.nav-meta__identity {
  display: none !important;
}

#ext-status {
  border-color: var(--zos-demo-ink);
  background: var(--zos-demo-ink);
  color: #ffffff;
  font-weight: 900;
}

#ext-status::after {
  content: "ON";
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--zos-demo-green);
  color: #ffffff;
  font-size: 10px;
}

.sound-toggle,
.ops-shell-fullscreen,
.nav-meta a {
  min-height: 34px;
  padding: 0 10px;
  font-size: 11px;
}

.sound-toggle,
.nav-meta a {
  background: #f8fafc;
}

.ops-shell-fullscreen {
  background: var(--zos-demo-ink);
}

.app-shell-main {
  height: calc(100vh - 76px);
  background: var(--zos-demo-bg);
}

body.app-frame .content {
  min-height: 100vh;
  padding: 18px;
  background: var(--zos-demo-bg);
}

body.app-frame .page-header,
body.app-frame .page-header--compact {
  margin: 0 0 16px;
}

body.app-frame .dashboard-shell {
  min-height: calc(100vh - 36px);
  gap: 16px;
}

body.app-frame .dashboard-hero,
body.app-frame .work-start-panel {
  display: none !important;
}

body.app-frame .ops-workbar {
  position: static;
  display: flex !important;
  justify-content: flex-end;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.app-frame .ops-workbar__main {
  display: none;
}

body.app-frame .ops-workbar__metrics {
  min-width: 0;
  gap: 8px;
}

body.app-frame .ops-workbar__metrics span,
body.app-frame .ops-focus-toggle {
  min-height: 31px;
  border: 0;
  border-radius: 10px;
  background: #eef2f7;
  color: #334155;
}

body.app-frame .ops-workbar__metrics .ops-live-state {
  background: #dcfce7;
}

body.app-frame .ops-shell--primary .ops-header {
  display: none;
}

body.app-frame .ops-toolbar {
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: none;
}

body.app-frame .ops-filters .chip,
body.app-frame .ops-toolbar .chip {
  min-height: 34px;
  border-radius: 10px;
  background: #f1f5f9;
}

body.app-frame .ops-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(330px, 1fr);
  gap: 18px;
  min-height: calc(100vh - 145px);
  overflow-x: auto;
}

body.app-frame .ops-column {
  width: auto;
  min-width: 330px;
  max-height: calc(100vh - 150px);
  min-height: calc(100vh - 170px);
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

body.app-frame .ops-column__head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 16px;
  border-bottom: 2px solid var(--zos-demo-bg);
  background: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

body.app-frame .ops-column__list {
  padding: 16px;
  overflow-y: auto;
}

body.app-frame .order-card,
body.app-frame .order-card.compact {
  border-width: 2px;
  border-left-width: 4px;
  border-radius: 16px;
  box-shadow: none;
}

body.app-frame .order-card__head h3,
body.app-frame .turn-number {
  font-style: italic;
  font-weight: 900;
}

body.app-frame .rush-panel,
body.app-frame .ops-group-strip {
  display: none;
}

body.app-frame .ops-delivery-layout--control {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(620px, 1fr) minmax(300px, 380px);
  gap: 18px;
  min-height: calc(100vh - 36px);
  align-items: stretch;
}

body.app-frame .ops-rider-control-panel {
  order: 1;
  border-radius: 20px;
}

body.app-frame .ops-map-panel--main {
  order: 2;
  border-radius: 20px;
}

body.app-frame .ops-route-panel--planner {
  order: 3;
  grid-column: auto;
  border-radius: 20px;
}

body.app-frame .ops-map-panel--main #orders-map {
  height: calc(100vh - 166px);
  min-height: 620px;
}

body.app-frame .ops-map-road-status {
  padding: 10px 18px;
  border-bottom: 1px solid #e2e8f0;
}

@media (max-width: 1320px) {
  body.app-frame .ops-delivery-layout--control {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  }

  body.app-frame .ops-route-panel--planner {
    grid-column: 1 / -1;
  }
}

body.app-frame:has(.order-form) .page-header,
body.app-frame:has(.order-form) .order-lookup,
body.app-frame:has(.order-form) .mobile-order-wizard {
  display: none !important;
}

body.app-frame .order-form,
body.app-frame .order-builder {
  min-height: calc(100vh - 36px);
}

body.app-frame .order-builder {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: stretch;
}

body.app-frame .order-panel,
body.app-frame .order-menu,
body.app-frame .order-cart {
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

body.app-frame .order-panel {
  padding: 26px;
}

body.app-frame .order-panel .order-details {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.app-frame .order-panel .form-section {
  margin: 0;
  padding: 0 0 22px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.app-frame .order-panel .form-section + .form-section {
  padding-top: 22px;
}

body.app-frame .form-section__title,
body.app-frame .cash-os-title span,
body.app-frame .cash-rider-liquidation h2,
body.app-frame .cash-os-metrics span,
body.app-frame .cash-rider-row small,
body.app-frame .cash-rider-row span {
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.app-frame .order-panel input,
body.app-frame .order-panel select,
body.app-frame .order-panel textarea,
body.app-frame .menu-search input {
  min-height: 52px;
  border-radius: 14px;
  background: #f8fafc;
  font-weight: 800;
}

body.app-frame .order-menu {
  padding: 28px;
}

body.app-frame .menu-toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  margin: 0 0 16px;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  box-shadow: none;
}

body.app-frame .menu-toolbar h2 {
  margin: 0;
  font-size: 28px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

body.app-frame .category-nav {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

body.app-frame .category-pill {
  min-height: 40px;
  border-radius: 10px;
  background: #eef0f4;
  color: #4b5563;
  font-size: 12px;
  text-transform: uppercase;
}

body.app-frame .category-pill.is-active {
  background: var(--zos-demo-ink);
}

body.app-frame .product-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

body.app-frame .product-card {
  border: 2px solid #eef2f7;
  border-radius: 16px;
  box-shadow: none;
}

body.app-frame .product-card:hover {
  border-color: var(--zos-demo-blue);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

body.app-frame .product-media {
  max-height: 120px;
  border-radius: 14px 14px 0 0;
  background: #f8fafc;
}

body.app-frame .product-image,
body.app-frame .product-placeholder {
  object-fit: contain;
}

body.app-frame .product-title h3 {
  font-size: 16px;
  font-style: italic;
  text-transform: uppercase;
}

body.app-frame .price {
  color: #16a34a;
}

body.app-frame .add-selection {
  background: var(--zos-demo-blue) !important;
  border-color: var(--zos-demo-blue) !important;
}

body.app-frame .ingredient-control {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
}

body.app-frame .ingredient-thumb {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: #ffffff;
}

body.app-frame .ingredient-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.app-frame .order-cart {
  display: flex;
  flex-direction: column;
  padding: 28px;
}

body.app-frame .order-cart h2 {
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 24px;
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
}

body.app-frame .order-cart .cart-list {
  flex: 0 1 auto;
  align-content: start;
}

body.app-frame .order-cart .cart-item {
  align-items: flex-start;
}

body.app-frame .order-cart .cart-item__controls {
  width: auto;
  flex: 0 0 auto;
  align-self: flex-start;
  align-items: center;
}

body.app-frame .order-cart .cart-item__controls button {
  min-height: 30px;
  height: 30px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
}

body.app-frame .order-cart .cart-total {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid #e5e7eb;
}

body.app-frame .order-cart .cart-total-value {
  color: #16a34a;
  font-size: 30px;
}

body.app-frame .order-cart .order-footer button {
  width: 100%;
  min-height: 58px;
  border-radius: 14px;
  background: #22c55e;
  border-color: #22c55e;
}

body.app-frame .cash-os-layout {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(480px, 0.98fr);
  gap: 18px;
  min-height: calc(100vh - 36px);
}

body.app-frame .cash-os-registers,
body.app-frame .cash-rider-liquidation {
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

body.app-frame .cash-os-registers {
  padding: 36px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  overflow: auto;
}

body.app-frame .cash-os-title {
  margin-bottom: 28px;
}

body.app-frame .cash-os-title span {
  color: #9ca3af;
  font-size: 12px;
}

body.app-frame .cash-os-title h1 {
  margin: 8px 0 0;
  color: #111827;
  font-size: 42px;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

body.app-frame .cash-os-title h1 strong {
  color: var(--zos-demo-blue);
}

body.app-frame .cash-os-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

body.app-frame .cash-os-metrics article {
  min-height: 150px;
  padding: 28px;
  border: 1px solid #eef2f7;
  border-radius: 18px;
  background: #f8fafc;
}

body.app-frame .cash-os-metrics article.is-card {
  border-color: #dbeafe;
  background: #eff6ff;
}

body.app-frame .cash-os-metrics span {
  display: block;
  color: #6b7280;
  font-size: 12px;
}

body.app-frame .cash-os-metrics strong {
  display: block;
  margin-top: 12px;
  color: #111827;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

body.app-frame .cash-os-metrics article.is-card strong {
  color: #1d4ed8;
}

body.app-frame .cash-os-metrics small {
  display: block;
  margin-top: 16px;
  color: #16a34a;
  font-weight: 900;
}

body.app-frame .cash-os-create {
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
}

body.app-frame .cash-os-create h2 {
  margin: 0;
  font-size: 20px;
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
}

body.app-frame .cash-rider-liquidation {
  padding: 36px;
  background: var(--zos-demo-dark);
  color: #ffffff;
  overflow: auto;
}

body.app-frame .cash-rider-liquidation h2 {
  margin: 0 0 30px;
  color: #9ca3af;
  font-size: 22px;
}

body.app-frame .cash-rider-liquidation h2 strong {
  color: #ffffff;
}

body.app-frame .cash-rider-list {
  display: grid;
  gap: 18px;
}

body.app-frame .cash-rider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(31, 41, 55, 0.72);
}

body.app-frame .cash-rider-row.needs-drop {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(31, 41, 55, 0.95);
}

body.app-frame .cash-rider-row h3 {
  margin: 0;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
}

body.app-frame .cash-rider-row span {
  display: block;
  margin-top: 8px;
  color: #22c55e;
  font-size: 11px;
}

body.app-frame .cash-rider-row.needs-drop span {
  color: #f87171;
}

body.app-frame .cash-rider-row__amount {
  text-align: right;
}

body.app-frame .cash-rider-row small {
  color: #6b7280;
  font-size: 11px;
}

body.app-frame .cash-rider-row__amount strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
}

body.app-frame .cash-rider-row__form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.app-frame .cash-rider-row__form select {
  max-width: 130px;
  min-height: 36px;
  border-color: rgba(148, 163, 184, 0.35);
  background: #1f2937;
  color: #ffffff;
}

body.app-frame .cash-rider-row__form button {
  min-height: 40px;
  border-radius: 10px;
  background: #22c55e !important;
  border-color: #22c55e !important;
  color: #0f172a !important;
}

body.app-frame .cash-rider-row__form button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body.app-frame .cash-register-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

body.app-frame .cash-register-card {
  border-radius: 16px;
  box-shadow: none;
}

/* Hardening presentacion: F3 debe poder rellenarse sin pelearse con el layout. */
body.app-frame:has(.order-form) .order-builder,
body.app-frame.ops-fullscreen:has(.order-form) .order-builder {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 380px) !important;
  grid-template-areas:
    "details details"
    "menu cart" !important;
  grid-auto-rows: auto minmax(0, 1fr) !important;
  height: auto !important;
  min-height: calc(100dvh - 120px) !important;
  align-items: start !important;
}

body.app-frame:has(.order-form) .content,
body.app-frame.ops-fullscreen:has(.order-form) .content {
  overflow: auto !important;
}

body.app-frame:has(.order-form) .order-panel,
body.app-frame.ops-fullscreen:has(.order-form) .order-panel {
  grid-area: details !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 14px !important;
}

body.app-frame:has(.order-form) .order-menu,
body.app-frame.ops-fullscreen:has(.order-form) .order-menu {
  grid-area: menu !important;
  height: auto !important;
  min-height: calc(100dvh - 390px);
}

body.app-frame:has(.order-form) .order-cart,
body.app-frame.ops-fullscreen:has(.order-form) .order-cart {
  grid-area: cart !important;
  height: calc(100dvh - 390px) !important;
  min-height: 520px;
  max-height: none !important;
}

body.app-frame:has(.order-form) .order-panel .order-details,
body.app-frame.ops-fullscreen:has(.order-form) .order-panel .order-details {
  display: grid !important;
  grid-template-columns: minmax(180px, .65fr) minmax(270px, 1fr) minmax(460px, 1.55fr) minmax(340px, 1.2fr) !important;
  gap: 10px !important;
  align-items: stretch !important;
}

body.app-frame:has(.order-form) .order-panel .form-section,
body.app-frame.ops-fullscreen:has(.order-form) .order-panel .form-section {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 10px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
}

/* La quinta sección ya no abre una fila alta con tres columnas vacías. */
body.app-frame:has(.order-form) .order-panel .order-details__operations,
body.app-frame.ops-fullscreen:has(.order-form) .order-panel .order-details__operations {
  grid-column: 1 / -1;
  grid-template-columns: minmax(260px, 1.45fr) minmax(170px, .65fr) minmax(300px, 1.2fr);
  align-items: start;
}

body.app-frame:has(.order-form) .order-panel .order-details__operations .form-section__title,
body.app-frame.ops-fullscreen:has(.order-form) .order-panel .order-details__operations .form-section__title {
  grid-column: 1 / -1;
}

body.app-frame:has(.order-form) .order-panel label,
body.app-frame.ops-fullscreen:has(.order-form) .order-panel label {
  display: grid;
  gap: 4px;
  margin: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

body.app-frame:has(.order-form) .order-panel input,
body.app-frame:has(.order-form) .order-panel select,
body.app-frame:has(.order-form) .order-panel textarea,
body.app-frame.ops-fullscreen:has(.order-form) .order-panel input,
body.app-frame.ops-fullscreen:has(.order-form) .order-panel select,
body.app-frame.ops-fullscreen:has(.order-form) .order-panel textarea {
  min-height: 38px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
}

body.app-frame:has(.order-form) .order-panel textarea,
body.app-frame.ops-fullscreen:has(.order-form) .order-panel textarea {
  min-height: 46px !important;
  max-height: 64px;
}

body.app-frame:has(.order-form) .order-panel .manual-address,
body.app-frame.ops-fullscreen:has(.order-form) .order-panel .manual-address {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

body.app-frame:has(.order-form) .order-panel .manual-address label:first-child,
body.app-frame.ops-fullscreen:has(.order-form) .order-panel .manual-address label:first-child {
  grid-column: span 2;
}

body.app-frame:has(.order-form) .order-panel .ops-print-choice,
body.app-frame.ops-fullscreen:has(.order-form) .order-panel .ops-print-choice {
  display: none;
}

body.app-frame:has(.order-form) .order-panel .muted,
body.app-frame.ops-fullscreen:has(.order-form) .order-panel .muted {
  margin: 0;
  font-size: 11px;
  line-height: 1.25;
}

/* F4: si no hay riders no queremos media pantalla negra vacia. */
body.app-frame.page-admin-cash-registers .cash-os-layout,
body.app-frame.ops-fullscreen.page-admin-cash-registers .cash-os-layout {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px;
  min-height: auto;
}

body.app-frame.page-admin-cash-registers .cash-os-registers {
  padding: 26px;
}

body.app-frame.page-admin-cash-registers .cash-rider-liquidation {
  padding: 22px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
}

body.app-frame.page-admin-cash-registers .cash-rider-liquidation h2,
body.app-frame.page-admin-cash-registers .cash-rider-liquidation h2 strong {
  color: #111827;
}

body.app-frame.page-admin-cash-registers .cash-rider-liquidation .empty-state {
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
}

body.app-frame .ops-congestion-strip {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(150px, .8fr));
  gap: 10px;
  margin: 0 0 12px;
}

body.app-frame .ops-congestion-strip article {
  padding: 12px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #ffffff;
}

body.app-frame .ops-congestion-strip span,
body.app-frame .ops-congestion-strip small {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

body.app-frame .ops-congestion-strip strong {
  display: block;
  margin: 4px 0;
  color: #0f172a;
  font-size: 22px;
  font-weight: 950;
}

body.app-frame .ops-congestion-strip--high article:first-child {
  border-color: #fed7aa;
  background: #fff7ed;
}

body.app-frame .ops-congestion-strip--critical article:first-child {
  border-color: #fecaca;
  background: #fef2f2;
}

body.app-frame .order-card--rush-compact {
  padding: 10px !important;
  gap: 8px !important;
}

body.app-frame .order-card--rush-compact .order-card__head {
  gap: 8px;
}

body.app-frame .order-card--rush-compact .order-due-stack {
  grid-template-columns: 1fr;
  gap: 6px;
}

body.app-frame .order-card--rush-compact .order-card__items {
  max-height: 58px !important;
  overflow: hidden !important;
}

body.app-frame .order-card--rush-compact .order-card__meta .pill:nth-child(n+5) {
  display: none;
}

body.app-frame .order-card--rush-compact .order-card__details {
  font-size: 12px;
  line-height: 1.25;
}

@media (max-width: 1380px) {
  body.app-frame:has(.order-form) .order-panel .order-details,
  body.app-frame.ops-fullscreen:has(.order-form) .order-panel .order-details {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.app-frame:has(.order-form) .order-cart,
  body.app-frame.ops-fullscreen:has(.order-form) .order-cart {
    min-height: 420px;
  }
}

@media (max-width: 1080px) {
  body.app-frame:has(.order-form) .order-builder,
  body.app-frame.ops-fullscreen:has(.order-form) .order-builder {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "details"
      "menu"
      "cart" !important;
  }

  body.app-frame .ops-congestion-strip {
    grid-template-columns: 1fr !important;
  }

  body.app-frame:has(.order-form) .order-panel .order-details,
  body.app-frame.ops-fullscreen:has(.order-form) .order-panel .order-details,
  body.app-frame:has(.order-form) .order-panel .manual-address,
  body.app-frame.ops-fullscreen:has(.order-form) .order-panel .manual-address {
    grid-template-columns: 1fr !important;
  }

  body.app-frame:has(.order-form) .order-panel .manual-address label:first-child,
  body.app-frame.ops-fullscreen:has(.order-form) .order-panel .manual-address label:first-child {
    grid-column: auto;
  }

  body.app-frame:has(.order-form) .order-panel .order-details__operations,
  body.app-frame.ops-fullscreen:has(.order-form) .order-panel .order-details__operations {
    grid-template-columns: 1fr;
  }

  body.app-frame:has(.order-form) .order-panel .order-details__operations .form-section__title,
  body.app-frame.ops-fullscreen:has(.order-form) .order-panel .order-details__operations .form-section__title {
    grid-column: auto;
  }

}

@media (max-width: 1500px) {
  .site-header--menu-first {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
  }

  .ops-lucia-pill {
    display: none;
  }

  .main-nav {
    grid-column: 2;
  }

  .nav-meta a:not([data-no-shell="1"]),
  .sound-toggle {
    display: none;
  }
}

@media (max-width: 1240px) {
  .main-nav {
    display: flex;
    overflow-x: auto;
  }

  .nav-cluster--center,
  .nav-cluster--right {
    flex: 0 0 auto;
  }

  body.app-frame .order-builder,
  body.app-frame .cash-os-layout,
  body.app-frame .ops-delivery-layout--control {
    grid-template-columns: 1fr;
  }

  body.app-frame .order-panel,
  body.app-frame .order-menu,
  body.app-frame .order-cart {
    max-height: none;
  }
}

@media (max-width: 760px) {
  .site-header--menu-first {
    height: auto;
    min-height: 68px;
    padding: 10px;
  }

  .ops-product-brand__wordmark {
    font-size: 22px !important;
  }

  .nav-group--status,
  .nav-meta {
    display: none !important;
  }

  body.app-frame .content {
    padding: 12px;
  }

  body.app-frame .ops-board {
    grid-auto-columns: minmax(285px, 88vw);
  }

  body.app-frame .cash-os-registers,
  body.app-frame .cash-rider-liquidation,
  body.app-frame .order-panel,
  body.app-frame .order-menu,
  body.app-frame .order-cart {
    padding: 18px;
  }

  body.app-frame .cash-os-metrics,
  body.app-frame .menu-toolbar,
  body.app-frame .cash-rider-row {
    grid-template-columns: 1fr;
  }

body.app-frame .cash-rider-row__amount,
body.app-frame .cash-rider-row__form {
  text-align: left;
  justify-content: flex-start;
}
}

/* Pantalla completa universal para superficies operativas. */
.ops-shell-fullscreen.is-active {
  background: var(--zos-demo-blue);
  color: #ffffff;
}

.app-shell.app-shell-focus .app-shell-main {
  height: 100vh;
  height: 100dvh;
  padding: 0;
  background: var(--zos-demo-bg);
}

.app-shell.app-shell-focus .app-shell-frames,
.app-shell.app-shell-focus .app-shell-frame {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}

body.app-frame.ops-fullscreen {
  overflow: hidden;
  background: var(--zos-demo-bg);
}

body.app-frame.ops-fullscreen .content {
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  padding: 8px;
  overflow: auto;
}

body.app-frame.ops-fullscreen .dashboard-shell,
body.app-frame.ops-fullscreen .cash-os-layout,
body.app-frame.ops-fullscreen .ops-delivery-layout--control,
body.app-frame.ops-fullscreen .telephony-layout,
body.app-frame.ops-fullscreen .orders-layout,
body.app-frame.ops-fullscreen .admin-layout {
  min-height: calc(100dvh - 16px);
}

body.app-frame.ops-fullscreen:has(.order-form) .content {
  overflow: hidden;
}

body.app-frame.ops-fullscreen:has(.order-form) .order-form,
body.app-frame.ops-fullscreen:has(.order-form) .order-builder {
  height: calc(100dvh - 16px);
  min-height: 0;
}

body.app-frame.ops-fullscreen:has(.order-form) .order-builder {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 380px);
  grid-template-areas:
    "details details"
    "menu cart";
  grid-auto-rows: auto minmax(0, 1fr);
  gap: 10px;
}

body.app-frame.ops-fullscreen:has(.order-form) .order-panel,
body.app-frame.ops-fullscreen:has(.order-form) .order-menu,
body.app-frame.ops-fullscreen:has(.order-form) .order-cart {
  height: 100%;
  max-height: 100%;
  padding: 14px;
  border-radius: 10px;
}

body.app-frame.ops-fullscreen:has(.order-form) .order-panel {
  grid-area: details;
  height: auto;
  max-height: 30dvh;
}

body.app-frame.ops-fullscreen:has(.order-form) .order-menu {
  grid-area: menu;
}

body.app-frame.ops-fullscreen:has(.order-form) .order-cart {
  grid-area: cart;
}

body.app-frame.ops-fullscreen:has(.order-form) .order-panel .order-details {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(250px, 1fr) minmax(320px, 1.25fr) minmax(300px, 1.1fr);
  gap: 10px;
}

body.app-frame.ops-fullscreen:has(.order-form) .order-panel .form-section {
  padding: 10px;
}

body.app-frame.ops-fullscreen:has(.order-form) .order-panel .manual-address {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.app-frame.ops-fullscreen:has(.order-form) .order-cart .cart-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

body.app-frame.ops-fullscreen:has(.order-form) .quick-extras {
  max-height: 145px;
}

body.app-frame.ops-fullscreen:has(.order-form) .menu-toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(220px, .72fr) auto;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

body.app-frame.ops-fullscreen:has(.order-form) .menu-toolbar h2 {
  font-size: 24px;
  letter-spacing: 0;
}

body.app-frame.ops-fullscreen:has(.order-form) .category-nav {
  margin-bottom: 10px;
  padding-bottom: 8px;
}

body.app-frame.ops-fullscreen:has(.order-form) .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

body.app-frame.ops-fullscreen:has(.order-form) .product-card {
  border-radius: 10px;
}

body.app-frame.ops-fullscreen:has(.order-form) .product-body {
  padding: 10px;
  gap: 7px;
}

body.app-frame.ops-fullscreen:has(.order-form) .product-title h3 {
  font-size: 15px;
  letter-spacing: 0;
}

body.app-frame.ops-fullscreen:has(.order-form) .order-cart h2 {
  margin-bottom: 14px;
  padding-bottom: 12px;
  font-size: 21px;
}

body.app-frame.ops-fullscreen:has(.order-form) .order-cart .cart-total-value {
  font-size: 26px;
}

@media (max-width: 1220px) {
  body.app-frame.ops-fullscreen:has(.order-form) .order-builder {
    grid-template-columns: 1fr;
    grid-template-areas:
      "details"
      "menu"
      "cart";
    overflow: auto;
  }

  body.app-frame.ops-fullscreen:has(.order-form) .order-panel {
    max-height: none;
  }

  body.app-frame.ops-fullscreen:has(.order-form) .order-cart {
    height: auto;
    max-height: none;
  }
}

@media (max-width: 860px) {
  body.app-frame.ops-fullscreen:has(.order-form) {
    overflow: auto;
  }

  body.app-frame.ops-fullscreen:has(.order-form) .content {
    overflow: auto;
  }

  body.app-frame.ops-fullscreen:has(.order-form) .order-form,
  body.app-frame.ops-fullscreen:has(.order-form) .order-builder {
    height: auto;
  }

  body.app-frame.ops-fullscreen:has(.order-form) .order-builder,
  body.app-frame.ops-fullscreen:has(.order-form) .menu-toolbar {
    grid-template-columns: 1fr;
  }

  body.app-frame.ops-fullscreen:has(.order-form) .order-panel,
  body.app-frame.ops-fullscreen:has(.order-form) .order-menu,
  body.app-frame.ops-fullscreen:has(.order-form) .order-cart {
    height: auto;
    max-height: none;
  }
}

/* Fullscreen de negocio: conserva el mismo shell operativo, sin menu paralelo. */
body.app-shell.app-shell-focus,
body.app-shell.ops-fullscreen {
  --ops-focus-header-height: 58px;
  overflow: hidden;
  background: var(--zos-demo-bg);
}

body.app-shell.app-shell-focus .site-header,
body.app-shell.ops-fullscreen .site-header {
  display: grid !important;
}

body.app-shell.app-shell-focus .site-header--menu-first,
body.app-shell.ops-fullscreen .site-header--menu-first {
  position: relative;
  z-index: 1100;
  height: var(--ops-focus-header-height);
  min-height: var(--ops-focus-header-height);
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 6px 12px;
  overflow: hidden;
  border-bottom-color: #d7dde7;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}

body.app-shell.app-shell-focus .ops-product-brand,
body.app-shell.ops-fullscreen .ops-product-brand {
  min-width: 132px;
}

body.app-shell.app-shell-focus .ops-product-brand__wordmark,
body.app-shell.ops-fullscreen .ops-product-brand__wordmark {
  font-size: 20px !important;
}

body.app-shell.app-shell-focus .ops-product-brand__copy small,
body.app-shell.ops-fullscreen .ops-product-brand__copy small {
  max-width: 172px;
  margin-top: 3px;
  font-size: 9px;
}

body.app-shell.app-shell-focus .ops-lucia-pill,
body.app-shell.ops-fullscreen .ops-lucia-pill,
body.app-shell.app-shell-focus .nav-group--secondary,
body.app-shell.ops-fullscreen .nav-group--secondary,
body.app-shell.app-shell-focus .nav-group--status,
body.app-shell.ops-fullscreen .nav-group--status,
body.app-shell.app-shell-focus .nav-meta .chip,
body.app-shell.ops-fullscreen .nav-meta .chip,
body.app-shell.app-shell-focus .sound-toggle,
body.app-shell.ops-fullscreen .sound-toggle,
body.app-shell.app-shell-focus .nav-meta a:not([data-no-shell="1"]),
body.app-shell.ops-fullscreen .nav-meta a:not([data-no-shell="1"]) {
  display: none !important;
}

body.app-shell.app-shell-focus .main-nav,
body.app-shell.ops-fullscreen .main-nav {
  grid-column: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

body.app-shell.app-shell-focus .nav-cluster,
body.app-shell.ops-fullscreen .nav-cluster {
  min-width: 0;
}

body.app-shell.app-shell-focus .nav-cluster--center,
body.app-shell.ops-fullscreen .nav-cluster--center {
  justify-content: flex-start;
  overflow-x: auto;
  scrollbar-width: none;
}

body.app-shell.app-shell-focus .nav-cluster--center::-webkit-scrollbar,
body.app-shell.ops-fullscreen .nav-cluster--center::-webkit-scrollbar {
  display: none;
}

body.app-shell.app-shell-focus .nav-cluster--right,
body.app-shell.ops-fullscreen .nav-cluster--right {
  justify-content: flex-end;
}

body.app-shell.app-shell-focus .main-nav .nav-group--primary,
body.app-shell.ops-fullscreen .main-nav .nav-group--primary {
  flex: 0 0 auto;
  padding: 4px;
  border-radius: 12px;
}

body.app-shell.app-shell-focus .main-nav .nav-group--primary a,
body.app-shell.ops-fullscreen .main-nav .nav-group--primary a {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
}

body.app-shell.app-shell-focus .nav-meta,
body.app-shell.ops-fullscreen .nav-meta {
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
}

body.app-shell.app-shell-focus .ops-shell-fullscreen,
body.app-shell.ops-fullscreen .ops-shell-fullscreen {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 11px;
}

body.app-shell.app-shell-focus .context-bar[hidden],
body.app-shell.ops-fullscreen .context-bar[hidden] {
  display: none !important;
}

body.app-shell.app-shell-focus .context-bar:not([hidden]),
body.app-shell.ops-fullscreen .context-bar:not([hidden]) {
  display: flex !important;
  min-height: 42px;
  padding: 5px 12px;
  border-bottom: 1px solid #d7dde7;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
}

.app-shell.app-shell-focus .app-shell-main {
  height: calc(100vh - var(--ops-focus-header-height));
  height: calc(100dvh - var(--ops-focus-header-height));
  padding: 0;
  background: var(--zos-demo-bg);
}

.app-shell.app-shell-focus:has(.context-bar:not([hidden])) .app-shell-main {
  height: calc(100vh - var(--ops-focus-header-height) - 42px);
  height: calc(100dvh - var(--ops-focus-header-height) - 42px);
}

body.app-shell.app-shell-focus .app-shell-frames,
body.app-shell.ops-fullscreen .app-shell-frames,
body.app-shell.app-shell-focus .app-shell-frame,
body.app-shell.ops-fullscreen .app-shell-frame {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}

@media (max-width: 1180px) {
  body.app-shell.app-shell-focus,
  body.app-shell.ops-fullscreen {
    --ops-focus-header-height: 96px;
  }

  body.app-shell.app-shell-focus .site-header--menu-first,
  body.app-shell.ops-fullscreen .site-header--menu-first {
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: center;
  }

  body.app-shell.app-shell-focus .main-nav,
  body.app-shell.ops-fullscreen .main-nav {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body.app-shell.app-shell-focus,
  body.app-shell.ops-fullscreen {
    --ops-focus-header-height: 92px;
  }

  body.app-shell.app-shell-focus .ops-product-brand__copy small,
  body.app-shell.ops-fullscreen .ops-product-brand__copy small {
    max-width: 150px;
  }
}

/* TPV pedido: categorias legibles y tactiles dentro del shell operativo. */
body.app-frame:has(.order-form) .order-menu {
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

body.app-frame:has(.order-form) .menu-toolbar {
  position: sticky;
  top: 0;
  z-index: 42;
  background: #ffffff;
}

body.app-frame:has(.order-form) .category-nav {
  position: sticky;
  top: 86px;
  z-index: 41;
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  margin: 0 0 18px;
  padding: 8px 4px 10px;
  overflow-x: auto;
  overflow-y: visible;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

body.app-frame:has(.order-form) .category-nav::-webkit-scrollbar {
  height: 8px;
}

body.app-frame:has(.order-form) .category-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

body.app-frame:has(.order-form) .category-pill {
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid #dfe3ea;
  border-radius: 12px;
  background: #f3f6fb;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  scroll-snap-align: start;
  touch-action: manipulation;
}

body.app-frame:has(.order-form) .category-pill:hover,
body.app-frame:has(.order-form) .category-pill:focus-visible {
  border-color: var(--zos-demo-blue);
  color: var(--zos-demo-blue);
}

body.app-frame:has(.order-form) .category-pill.is-active {
  border-color: var(--zos-demo-ink);
  background: var(--zos-demo-ink);
  color: #ffffff;
}

body.app-frame:has(.order-form) .menu-section {
  scroll-margin-top: 166px;
}

body.app-frame.ops-fullscreen:has(.order-form) .category-nav {
  top: 72px;
  min-height: 58px;
  margin-bottom: 12px;
  padding: 6px 2px 8px;
}

body.app-frame.ops-fullscreen:has(.order-form) .category-pill {
  min-height: 46px;
  padding: 0 16px;
  font-size: 13px;
}

body.app-frame.ops-fullscreen:has(.order-form) .menu-section {
  scroll-margin-top: 142px;
}

@media (max-width: 1180px) {
  body.app-frame:has(.order-form) .category-nav,
  body.app-frame.ops-fullscreen:has(.order-form) .category-nav {
    top: 0;
    min-height: 58px;
    padding: 6px 2px 8px;
  }

  body.app-frame:has(.order-form) .category-pill,
  body.app-frame.ops-fullscreen:has(.order-form) .category-pill {
    min-height: 46px;
    padding: 0 15px;
    font-size: 13px;
  }
}

/* Command board: keep active stages readable and never clip order content. */
body.app-frame .dashboard-shell .ops-board {
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)) !important;
  grid-auto-flow: row;
  grid-auto-columns: unset;
  align-items: start;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

body.app-frame .ops-column:not(.has-visible-cards) {
  display: none !important;
}

body.app-frame .ops-column {
  width: auto;
  min-width: 0;
  min-height: 180px;
  max-height: calc(100vh - 220px);
}

body.app-frame .ops-column__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  align-content: start;
  gap: 12px;
}

body.app-frame:not(.ops-compact) .order-card,
body.app-frame:not(.ops-compact) .order-card__items {
  max-height: none !important;
  overflow: visible !important;
}

body.app-frame:not(.ops-compact) .order-card {
  padding: 12px;
  gap: 10px;
}

body.app-frame.ops-fullscreen .dashboard-shell .ops-board {
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)) !important;
}

body.app-frame.ops-fullscreen .ops-column__list {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

/* Capa final anti-desbordes: mapa/caja/riders no deben cambiar de tamaño por contenido lateral. */
body.app-frame .ops-delivery-layout--control {
  grid-template-columns: clamp(300px, 21vw, 380px) minmax(620px, 1fr) clamp(300px, 21vw, 380px);
  height: calc(100vh - 118px);
  height: calc(100dvh - 118px);
  min-height: 620px;
  overflow: hidden;
  align-items: stretch;
}

body.app-frame .ops-route-panel--planner,
body.app-frame .ops-rider-control-panel {
  display: flex !important;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  contain: layout paint;
}

body.app-frame .ops-route-panel--planner > .ops-panel-title,
body.app-frame .ops-route-panel--planner > .ops-pickup-rescue,
body.app-frame .ops-route-panel--planner > .ops-route-card__form,
body.app-frame .ops-rider-control-panel > .ops-panel-title,
body.app-frame .ops-rider-control-panel > .ops-quick-rider-form {
  flex: 0 0 auto;
}

body.app-frame .ops-route-panel--planner .ops-route-list,
body.app-frame .ops-route-panel--planner .ops-route-list--routes,
body.app-frame .ops-rider-control-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

body.app-frame .ops-map-panel--main {
  display: flex !important;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  contain: layout paint;
}

body.app-frame .ops-map-panel__head,
body.app-frame .ops-map-road-status,
body.app-frame .ops-map-panel--main .map-hint {
  flex: 0 0 auto;
}

body.app-frame .ops-map-panel--main #orders-map {
  flex: 1 1 auto;
  height: auto !important;
  min-height: 0;
  border-radius: 0;
}

body.app-frame.page-admin-cash-registers .cash-os-layout,
body.app-frame.ops-fullscreen.page-admin-cash-registers .cash-os-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 28vw, 440px) !important;
  gap: 18px;
  height: calc(100vh - 118px);
  height: calc(100dvh - 118px);
  min-height: 620px;
  overflow: hidden;
  align-items: stretch;
}

body.app-frame.page-admin-cash-registers .cash-os-registers,
body.app-frame.page-admin-cash-registers .cash-rider-liquidation {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

body.app-frame.page-admin-cash-registers .cash-rider-liquidation {
  border: 1px solid #dbe3ee;
  background: #ffffff !important;
  color: #111827 !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body.app-frame.page-admin-cash-registers .cash-rider-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  background: #f8fafc !important;
  color: #111827 !important;
  border-color: #dbe3ee;
}

body.app-frame.page-admin-cash-registers .cash-rider-row h3,
body.app-frame.page-admin-cash-registers .cash-rider-row__amount strong {
  color: #111827 !important;
}

body.app-frame.page-admin-cash-registers .cash-rider-row span,
body.app-frame.page-admin-cash-registers .cash-rider-row small {
  color: #64748b !important;
}

body.app-frame.page-admin-riders .admin-riders-page,
body.app-frame.page-admin-riders .rider-card--admin {
  min-width: 0;
}

body.app-frame.page-admin-riders .rider-grid--admin {
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
}

@media (max-width: 1320px) {
  body.app-frame .ops-delivery-layout--control,
  body.app-frame.page-admin-cash-registers .cash-os-layout,
  body.app-frame.ops-fullscreen.page-admin-cash-registers .cash-os-layout {
    grid-template-columns: 1fr !important;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  body.app-frame .ops-map-panel--main #orders-map {
    min-height: 620px;
  }
}

/* Reparto reducido: empezar por el mapa y después decidir ruta y rider. */
@media (max-width: 1180px) {
  body.app-frame .ops-delivery-layout--control {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.app-frame .ops-map-panel--main {
    order: 1;
  }

  body.app-frame .ops-route-panel--planner {
    order: 2;
    grid-column: auto;
  }

  body.app-frame .ops-rider-control-panel {
    order: 3;
  }
}

@media (max-width: 640px) {
  body.app-frame .ops-map-panel--main #orders-map {
    min-height: 58dvh;
  }
}

/* Tablet shell: keep operational navigation reachable without one cluster
   sitting on top of another.  Each row can scroll independently when the
   available width is genuinely smaller than its actions. */
@media (min-width: 761px) and (max-width: 1180px) {
  .site-header--menu-first {
    position: relative;
    height: 64px;
    min-height: 64px;
    flex-wrap: nowrap;
    overflow: visible;
  }

  .site-header--menu-first .nav-toggle {
    position: relative;
    z-index: 5;
    min-width: 72px;
    min-height: 44px;
  }

  .site-header--menu-first .main-nav {
    position: absolute;
    z-index: 320;
    top: calc(100% + 8px);
    right: 16px;
    display: none;
    flex-wrap: wrap;
    width: min(820px, calc(100vw - 32px));
    max-height: calc(100dvh - 88px);
    padding: 10px;
    overflow: auto;
    background: #ffffff;
    border: 1px solid var(--zos-border);
    border-radius: 14px;
    box-shadow: 0 22px 56px rgba(15, 23, 42, 0.22);
  }

  body.app-shell.nav-open .site-header--menu-first .main-nav {
    display: flex;
  }

  .site-header--menu-first .nav-cluster--center {
    flex: 1 1 calc(100% - 90px);
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .site-header--menu-first .nav-cluster--right {
    flex: 1 0 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .site-header--menu-first .nav-cluster--right > *,
  .site-header--menu-first .nav-meta > * {
    flex: 0 0 auto;
  }

  .site-header--menu-first .nav-group a,
  .site-header--menu-first .nav-group button,
  .site-header--menu-first .nav-group .chip,
  .site-header--menu-first .ops-status-chip {
    min-height: 44px;
  }

  .site-header--menu-first .nav-group a,
  .site-header--menu-first .nav-group button {
    min-width: 44px;
  }

  .app-shell-main {
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
  }
}

/* Call workspace drawer ---------------------------------------------------
   It stays above every F1-F5 surface without replacing the operator's work.
   Asterisk remains authoritative: this panel only exposes context/actions. */
.call-pop {
  position: fixed;
  z-index: 2147482500;
  inset: 86px 18px 18px auto;
  width: min(470px, calc(100vw - 36px));
  max-width: none;
  max-height: calc(100dvh - 104px);
  padding: 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--zos-ink);
  box-shadow: -18px 28px 64px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(18px);
}

.call-pop[hidden] {
  display: none !important;
}

.call-pop__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 18px;
  border-bottom: 1px solid var(--zos-line);
  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, 0.13), transparent 44%),
    linear-gradient(145deg, #ffffff, #f7f9fc);
}

.call-pop__eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--zos-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.call-pop__title {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--zos-ink);
  font-size: 20px;
  font-weight: 900;
}

.call-pop[data-state="RINGING"] .call-pop__dot {
  background: #f59e0b;
  box-shadow: 0 0 0 7px rgba(245, 158, 11, 0.16), 0 0 20px rgba(245, 158, 11, 0.38);
  animation: zestia-call-pulse 1.35s ease-in-out infinite;
}

.call-pop[data-state="IN_CALL"] .call-pop__dot {
  background: #16a34a;
  box-shadow: 0 0 0 7px rgba(22, 163, 74, 0.14), 0 0 20px rgba(22, 163, 74, 0.3);
}

@keyframes zestia-call-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.78); opacity: 0.62; }
}

.call-pop__meta {
  min-height: 0;
  max-height: none;
  padding: 20px 22px;
  overflow: auto;
  color: var(--zos-ink);
  background: #ffffff;
}

.call-pop__identity {
  color: var(--zos-ink);
  font-size: 24px;
  letter-spacing: -0.025em;
}

.call-pop__line,
.call-pop__subline,
.call-pop__note {
  color: #526078;
}

.call-pop__section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--zos-line);
  color: var(--zos-ink);
}

.call-pop__draft,
.call-pop__match {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 850;
}

.call-pop__draft {
  border: 1px solid #f5d48b;
  background: #fff8e8;
  color: #8a4c00;
}

.call-pop__match {
  border: 1px solid #a7e3c1;
  background: #ecfbf2;
  color: #08733b;
}

.call-pop__warning {
  padding: 10px 12px;
  border: 1px solid #f3ca78;
  border-radius: 12px;
  background: #fff8e7;
  color: #8a4c00;
}

.call-pop__order,
.call-pop__customer-link {
  display: block;
  width: fit-content;
  margin-top: 5px;
  color: #1d4ed8;
}

.call-pop__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 9px;
  padding: 16px 22px;
  border-top: 1px solid var(--zos-line);
  background: #f8fafc;
}

.call-pop__btn,
.call-pop__order-btn,
.call-pop__snooze,
.call-pop__dismiss {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 850;
}

.call-pop__btn {
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #ffffff;
}

.call-pop__order-btn {
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.call-pop__snooze,
.call-pop__dismiss {
  border: 1px solid var(--zos-line);
  background: #ffffff;
  color: var(--zos-ink);
}

.call-pop__snooze {
  grid-column: 1 / -1;
}

.call-pop__dismiss {
  min-height: 38px;
  padding: 7px 11px;
}

.call-pop__footnote {
  margin: 0;
  padding: 0 22px 18px;
  background: #f8fafc;
  color: var(--zos-muted);
  font-size: 11px;
  line-height: 1.45;
}

.call-customer-draft {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #f3ca78;
  border-radius: 16px;
  background: #fff8e7;
  color: #713f12;
}

.call-customer-draft p {
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .call-pop {
    inset: auto 10px 10px;
    width: auto;
    max-height: min(82dvh, 720px);
    border-radius: 20px;
  }

  .call-pop__header,
  .call-pop__meta,
  .call-pop__actions {
    padding-inline: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .call-pop[data-state="RINGING"] .call-pop__dot {
    animation: none;
  }
}

/* Call workspace: one operational surface for customer, order and SIP state. */
.call-workspace {
  display: grid;
  gap: 16px;
  width: min(100%, 1760px);
  margin-inline: auto;
}

.call-workspace__hero {
  display: grid;
  grid-template-columns: minmax(270px, 0.9fr) minmax(460px, 1.45fr) auto;
  gap: 22px;
  align-items: center;
  padding: 22px 24px;
  border: 1px solid #dbe4ef;
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.1), transparent 34%),
    linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.call-workspace__eyebrow {
  display: block;
  margin-bottom: 10px;
  color: #52637a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.call-workspace__title-row {
  display: flex;
  gap: 13px;
  align-items: center;
}

.call-workspace__title-row h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(24px, 2.3vw, 38px);
  line-height: 1.05;
}

.call-workspace__title-row p {
  margin: 6px 0 0;
  color: #52637a;
  font-size: 15px;
  font-weight: 800;
}

.call-workspace__live-dot {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 4px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  background: #2563eb;
  background-clip: padding-box;
}

.call-workspace__hero[data-call-state="CONNECTED"] .call-workspace__live-dot {
  border-color: rgba(16, 185, 129, 0.2);
  background: #10b981;
  animation: zestia-call-pulse 1.35s ease-in-out infinite;
}

.call-workspace__hero[data-call-state="RINGING"] .call-workspace__live-dot {
  border-color: rgba(245, 158, 11, 0.2);
  background: #f59e0b;
  animation: zestia-call-pulse 1.1s ease-in-out infinite;
}

.call-workspace__hero[data-call-state="ENDED"] .call-workspace__live-dot {
  border-color: rgba(100, 116, 139, 0.18);
  background: #64748b;
}

.call-workspace__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.call-workspace__facts > div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
}

.call-workspace__facts dt {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.call-workspace__facts dd {
  margin: 5px 0 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-workspace__actions {
  display: grid;
  gap: 9px;
  min-width: 180px;
}

.call-workspace__actions form,
.call-workspace__actions .button,
.call-workspace__actions button {
  width: 100%;
  margin: 0;
}

.call-workspace__primary-action {
  border-color: #2563eb !important;
  background: #2563eb !important;
  color: #ffffff !important;
}

.call-workspace__steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dbe4ef;
  border-radius: 18px;
  background: #ffffff;
  list-style: none;
}

.call-workspace__steps li {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 14px 16px;
  color: #64748b;
}

.call-workspace__steps li + li {
  border-left: 1px solid #e2e8f0;
}

.call-workspace__steps li > span {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 900;
}

.call-workspace__steps strong,
.call-workspace__steps small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-workspace__steps strong {
  color: #334155;
  font-size: 12px;
}

.call-workspace__steps small {
  margin-top: 2px;
  font-size: 10px;
}

.call-workspace__steps .is-complete {
  background: #f0fdf7;
  color: #047857;
}

.call-workspace__steps .is-complete > span {
  border-color: #a7f3d0;
  background: #10b981;
  color: #ffffff;
}

.call-workspace__steps .is-current {
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 0 -3px 0 #2563eb;
}

.call-workspace__steps .is-current > span {
  border-color: #93c5fd;
  background: #2563eb;
  color: #ffffff;
}

.call-workspace__grid {
  align-items: start;
}

.call-workspace__grid .telephony-card {
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
}

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

  .call-workspace__actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .call-workspace__steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .call-workspace__steps li:nth-child(4) {
    border-left: 0;
    border-top: 1px solid #e2e8f0;
  }

  .call-workspace__steps li:nth-child(5) {
    border-top: 1px solid #e2e8f0;
  }
}

@media (max-width: 720px) {
  .call-workspace__hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .call-workspace__facts,
  .call-workspace__actions,
  .call-workspace__steps {
    grid-template-columns: 1fr;
  }

  .call-workspace__actions {
    grid-column: auto;
  }

  .call-workspace__steps li + li,
  .call-workspace__steps li:nth-child(4),
  .call-workspace__steps li:nth-child(5) {
    border-top: 1px solid #e2e8f0;
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .call-workspace__live-dot {
    animation: none !important;
  }
}

/* Toma interna: un único desplazamiento del documento conserva el scroll
   existente del iframe, los campos completos y todos los productos del carro. */
body.app-frame:has(.order-form) .order-form {
  height: auto !important;
  min-height: 0 !important;
}

body.app-frame:has(.order-form) .order-form > .order-builder {
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) !important;
  grid-template-areas:
    "details menu"
    "details cart" !important;
  grid-template-rows: auto auto !important;
  grid-auto-rows: auto !important;
  gap: 12px !important;
  height: auto !important;
  min-height: 0 !important;
  align-items: start !important;
  overflow: visible;
}

body.app-frame:has(.order-form) .order-form .order-panel,
body.app-frame:has(.order-form) .order-form .order-menu,
body.app-frame:has(.order-form) .order-form .order-cart {
  min-width: 0;
  min-height: 0 !important;
  margin: 0;
  padding: 12px !important;
  border-color: var(--zos-line);
  border-radius: var(--zos-radius);
  background: var(--zos-panel);
  box-shadow: var(--zos-shadow-soft);
}

body.app-frame:has(.order-form) .order-form .order-panel {
  grid-area: details !important;
  position: static;
  align-self: start;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  scrollbar-gutter: auto;
}

body.app-frame:has(.order-form) .order-form .order-panel .order-details {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: start !important;
  margin: 0;
  padding: 0 !important;
  min-width: 0;
}

body.app-frame:has(.order-form) .order-form .order-panel .form-section {
  grid-column: auto !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 7px;
  margin: 0;
  padding: 10px !important;
  min-width: 0;
  background: var(--zos-panel-2) !important;
}

body.app-frame:has(.order-form) .order-form .order-panel .form-section__title {
  grid-column: auto !important;
  margin: 0;
  font-size: 12px;
  letter-spacing: .04em;
  overflow-wrap: anywhere;
}

body.app-frame:has(.order-form) .order-form .order-panel details.form-section > summary {
  min-height: 44px;
  padding: 8px 0;
  color: var(--zos-ink);
  font-weight: 800;
  cursor: pointer;
  overflow-wrap: anywhere;
}

body.app-frame:has(.order-form) .order-form .order-panel details.form-section > summary:focus-visible {
  outline: 3px solid var(--zos-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

body.app-frame:has(.order-form) .order-form .order-panel input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body.app-frame:has(.order-form) .order-form .order-panel select,
body.app-frame:has(.order-form) .order-form .order-panel textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px !important;
  font-size: 14px !important;
}

body.app-frame:has(.order-form) .order-form .order-panel textarea {
  max-height: none;
  resize: vertical;
}

body.app-frame:has(.order-form) .order-form .order-panel label:has(input[type="checkbox"]),
body.app-frame:has(.order-form) .order-form .order-panel label:has(input[type="radio"]) {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
  white-space: normal;
}

body.app-frame:has(.order-form) .order-form .order-panel input[type="checkbox"],
body.app-frame:has(.order-form) .order-form .order-panel input[type="radio"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-height: 0 !important;
}

body.app-frame:has(.order-form) .order-form .order-panel .manual-address {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.app-frame:has(.order-form) .order-form .order-panel .manual-address label:first-child {
  grid-column: 1 / -1;
}

body.app-frame:has(.order-form) .order-form .order-panel .order-food-safety__allergens {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
}

body.app-frame:has(.order-form) .order-form .order-menu {
  grid-area: menu !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  scrollbar-gutter: auto;
}

body.app-frame:has(.order-form) .order-form .order-menu .menu-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-width: 0;
  margin-bottom: 10px;
  padding: 10px;
  position: static;
}

body.app-frame:has(.order-form) .order-form .order-menu .menu-toolbar > :first-child {
  grid-column: 1 / -1;
}

body.app-frame:has(.order-form) .order-form .order-menu .menu-search {
  min-width: 0;
}

body.app-frame:has(.order-form) .order-form .order-menu .menu-search input {
  width: 100%;
  min-width: 0;
}

body.app-frame:has(.order-form) .order-form .order-menu .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 10px;
}

body.app-frame:has(.order-form) .order-form .order-cart {
  grid-area: cart !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 64px;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

body.app-frame:has(.order-form) .order-form .order-cart.is-cart-tall {
  position: static;
}

body.app-frame:has(.order-form) .order-form .order-cart h2,
body.app-frame:has(.order-form) .order-form .order-cart > .muted {
  flex: 0 0 auto;
  margin: 0;
}

body.app-frame:has(.order-form) .order-form .order-cart h2 {
  padding-bottom: 8px;
  font-size: 22px;
}

body.app-frame:has(.order-form) .order-form .order-cart .cart-list {
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

body.app-frame:has(.order-form) .order-form .order-cart .cart-total,
body.app-frame:has(.order-form) .order-form .order-cart .order-footer {
  flex: 0 0 auto;
  margin: 0;
}

body.app-frame:has(.order-form) .order-form .order-cart .cart-total {
  padding-top: 12px;
}

body.app-frame:has(.order-form) .order-form .order-cart .order-footer button {
  min-height: 48px;
}

/* Preserve the existing wizard/JS state rather than showing a hidden step. */
body.app-frame:has(.order-form) .order-form > .order-builder > [data-mobile-step][hidden] {
  display: none !important;
}

body.app-frame:has(.order-form) .order-form [data-preorder-next][hidden],
body.app-frame:has(.order-form) .order-form [data-preorder-label][hidden],
body.app-frame:has(.order-form) .order-form [data-preorder-closed][hidden],
body.app-frame:has(.order-form) .order-form [data-internal-shift-notice][hidden] {
  display: none !important;
}

/* Choices follow the panel's actual width, including the narrow desktop rail. */
body.app-frame:has(.order-form) .order-form .order-panel .order-food-safety__scopes,
body.app-frame:has(.order-form) .order-form .order-panel .order-fulfillment-options {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)) !important;
  gap: 6px;
}

body.app-frame:has(.order-form) .order-form .order-panel .order-food-safety__scopes > label {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  min-height: 44px;
  padding: 8px;
  gap: 6px;
  font-size: 13px;
  line-height: 1.25;
  text-align: left;
}

@media (min-width: 1200px) {
  body.app-frame:has(.order-form) .order-form > .order-builder {
    grid-template-columns: minmax(220px, 240px) minmax(0, 1fr) minmax(260px, 290px) !important;
    grid-template-areas: "details menu cart" !important;
    grid-template-rows: auto !important;
  }
}

@media (max-width: 980px) {
  body.app-frame:has(.order-form) .order-form > .order-builder {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "details" "menu" "cart" !important;
    grid-template-rows: auto !important;
    height: auto !important;
  }

  body.app-frame:has(.order-form) .order-form .order-panel,
  body.app-frame:has(.order-form) .order-form .order-menu,
  body.app-frame:has(.order-form) .order-form .order-cart {
    position: static;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    scrollbar-gutter: auto;
  }

  body.app-frame:has(.order-form) .order-form.is-mobile-wizard .mobile-order-wizard {
    display: grid !important;
  }

  /* Keep the three steps in one row without shrinking their touch targets. */
  body.app-frame:has(.order-form) .order-form .mobile-order-wizard__steps {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px;
  }

  body.app-frame:has(.order-form) .order-form .mobile-order-wizard__step {
    width: auto !important;
    min-width: 0;
    min-height: 44px;
    padding: 8px 3px;
    white-space: normal;
    font-size: 13px;
  }
}

@media (max-width: 560px) {
  body.app-frame:has(.order-form) .order-form .order-panel .manual-address,
  body.app-frame:has(.order-form) .order-form .order-menu .menu-toolbar {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.app-frame:has(.order-form) .order-form .order-menu .menu-actions {
    justify-self: start;
  }

  body.app-frame:has(.order-form) .order-form .order-panel input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  body.app-frame:has(.order-form) .order-form .order-panel select,
  body.app-frame:has(.order-form) .order-form .order-panel textarea {
    font-size: 16px !important;
  }
}

/* Direct access remains available when the summary is below a long menu. */
.order-entry-shortcuts {
  display: none;
}

body.app-frame:has(.order-form) .order-entry-shortcuts {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  margin-bottom: 12px;
  padding: 6px;
  border: 1px solid var(--zos-line);
  border-radius: var(--zos-radius);
  background: var(--zos-panel);
}

body.app-frame:has(.order-form) .order-entry-shortcuts button {
  min-height: 36px;
  white-space: normal;
  overflow-wrap: normal;
}

body.app-frame:has(.order-form) :is(#order-entry-details, #order-entry-summary) {
  scroll-margin-top: 72px;
}

body.app-frame:has(.order-form) :is(#order-entry-details, #order-entry-summary):focus-visible {
  outline: 3px solid var(--zos-blue);
  outline-offset: 3px;
}

body.app-frame:has(.order-form) .category-nav {
  top: 64px;
}

body.app-frame:has(.order-form) .quick-extras {
  max-height: none !important;
  overflow: visible;
}

body.app-frame:has(.order-form) .quick-extras__options {
  flex-wrap: wrap !important;
  overflow: visible !important;
}

/* Mobile form-wide rules must not turn inline choices into full-width inputs
   or divide a quantity row between two expanding buttons. */
body.app-frame:has(.order-form) .order-form .order-menu label:has(input[type="checkbox"]) {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: auto;
  max-width: 100%;
  min-height: 44px;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

body.app-frame:has(.order-form) .order-form .order-menu input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  min-height: 0 !important;
  padding: 0;
}

body.app-frame:has(.order-form) .order-form .order-menu .qty-stepper {
  display: grid;
  grid-template-columns: 44px 64px 44px;
  justify-content: start;
  align-items: center;
  width: max-content;
  max-width: 100%;
  gap: 6px;
}

body.app-frame:has(.order-form) .order-form .order-menu .qty-stepper .qty-btn {
  width: 44px !important;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 4px;
}

body.app-frame:has(.order-form) .order-form .order-menu .qty-stepper .qty-input {
  width: 64px !important;
  min-width: 64px;
  min-height: 44px;
  padding: 4px;
  text-align: center;
  font-size: 16px;
}

body.app-frame:has(.order-form) .order-form .order-cart .cart-item__controls {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  flex: 1 0 100%;
}

body.app-frame:has(.order-form) .order-form .order-cart .cart-item__controls button {
  flex: 0 0 auto;
  width: 44px !important;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 6px 10px;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

body.app-frame:has(.order-form) .order-form .order-cart .cart-item__controls button[data-cart-action="remove"] {
  width: auto !important;
  min-width: 64px;
}

/* Headings, states and actions wrap between words instead of shrinking into
   single-letter columns. Keep long customer/product text within its card. */
body.app-frame[data-zestia-os-surface="light"] :is(.order-detail-shell, .pack-hero, .pack-layout, .admin-riders-page) {
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}

body.app-frame[data-zestia-os-surface="light"] :is(.order-detail-hero__main, .pack-hero > div, .admin-riders-head > div, .rider-card__top > div) {
  min-width: 0;
}

body.app-frame[data-zestia-os-surface="light"] :is(.order-detail-shell, .pack-hero, .pack-layout, .admin-riders-page) :is(p, .rider-card__meta, .order-line-pro__title) {
  overflow-wrap: break-word;
}

body.app-frame[data-zestia-os-surface="light"] :is(.order-detail-hero__stats, .package-summary-grid, .pack-hero__metrics) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr));
  min-width: 0;
}

/* Detalle: keep the full customer/state and operational actions, but show the
   actual products before a large mobile summary consumes the first screen. */
body.app-frame[data-zestia-os-surface="light"] .order-detail-hero { padding: 12px; gap: 10px; box-shadow: none; }
body.app-frame[data-zestia-os-surface="light"] .order-detail-hero__main h1 { font-size: clamp(24px, 2.3vw, 32px); line-height: 1.15; }
body.app-frame[data-zestia-os-surface="light"] .order-detail-hero__main p { font-size: 13px; font-weight: 650; line-height: 1.4; }
body.app-frame[data-zestia-os-surface="light"] .order-detail-hero__stats article { padding: 8px; box-shadow: none; }
body.app-frame[data-zestia-os-surface="light"] .order-detail-hero__stats strong { font-size: 17px; line-height: 1.25; }
body.app-frame[data-zestia-os-surface="light"] .order-detail-actions { align-content: start; }
body.app-frame[data-zestia-os-surface="light"] .order-detail-actions :is(a,span) { min-height: 44px; display: flex; align-items: center; padding: 8px 10px; font-size: 12px; line-height: 1.35; }
body.app-frame[data-zestia-os-surface="light"] .order-detail-actions [aria-disabled="true"] { background: #f3f6fa; color: #526176; }
@media (max-width: 980px) {
  body.app-frame[data-zestia-os-surface="light"] .order-detail-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; gap: 6px; }
  body.app-frame[data-zestia-os-surface="light"] .order-detail-hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

body.app-frame[data-zestia-os-surface="light"] .pack-stepper {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

/* Montaje: the summary must not push every product below the mobile fold.
   All three steps and descriptions remain visible; links jump in one scroller. */
body.app-frame[data-zestia-os-surface="light"] .pack-hero__metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
}
body.app-frame[data-zestia-os-surface="light"] .pack-hero__metrics span { padding: 8px; min-width: 0; }
body.app-frame[data-zestia-os-surface="light"] .pack-hero__metrics strong { font-size: clamp(16px, 2vw, 20px); }
body.app-frame[data-zestia-os-surface="light"] .pack-stepper li { position: relative; padding: 8px 6px; gap: 4px; align-items: flex-start; }
body.app-frame[data-zestia-os-surface="light"] .pack-stepper li > span { flex-basis: 20px; width: 20px; height: 20px; font-size: 11px; }
body.app-frame[data-zestia-os-surface="light"] .pack-stepper :is(strong,small) { white-space: normal; overflow: visible; text-overflow: clip; }
body.app-frame[data-zestia-os-surface="light"] .pack-stepper a { color: inherit; text-decoration: none; }
body.app-frame[data-zestia-os-surface="light"] .pack-stepper a::after { content: ""; position: absolute; inset: 0; }
body.app-frame[data-zestia-os-surface="light"] .pack-stepper li:has(a:focus-visible) { outline: 3px solid #247d75; outline-offset: 3px; }
body.app-frame[data-zestia-os-surface="light"] :is(#pack-products,#pack-build,#pack-output) { scroll-margin-block-start: 12px; }

body.app-frame[data-zestia-os-surface="light"] :is(.order-detail-card__head, .rider-card__top, .admin-riders-head, .admin-riders-list__head) {
  flex-wrap: wrap;
}

body.app-frame[data-zestia-os-surface="light"] :is(.order-detail-card__head, .rider-card__top, .admin-riders-head, .admin-riders-list__head) > div:first-child {
  flex: 1 1 180px;
  min-width: 0;
}

body.app-frame[data-zestia-os-surface="light"] :is(.order-detail-shell, .pack-hero, .pack-layout, .admin-riders-page) :is(.badge, .status-pill, .ledger-badge, button, .ghost-button) {
  flex-shrink: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

body.app-frame[data-zestia-os-surface="light"] .rider-snapshot-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr));
}

@media (max-width: 980px) {
  body.app-frame:has(.order-form) .order-entry-shortcuts {
    display: none;
  }

  body.app-frame:has(.order-form) .category-nav {
    top: 0;
  }

  /* The later desktop Montaje grid previously restored a 340px side track
     after its mobile rule. Every card remains in this single document flow. */
  body.app-frame[data-zestia-os-surface="light"] .pack-layout {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
  }

  body.app-frame[data-zestia-os-surface="light"] .pack-main,
  body.app-frame[data-zestia-os-surface="light"] .pack-side,
  body.app-frame[data-zestia-os-surface="light"] .pack-card {
    min-width: 0;
    max-width: 100%;
  }

  body.app-frame[data-zestia-os-surface="light"] .pack-side {
    position: static;
  }

  body.app-frame[data-zestia-os-surface="light"] .pack-card__head {
    flex-wrap: wrap;
  }

  body.app-frame[data-zestia-os-surface="light"] .pack-pay-form {
    grid-template-columns: minmax(0, 1fr);
  }

  body.app-frame[data-zestia-os-surface="light"] .pack-card--finish #bag-item-pool {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
  }

  body.app-frame[data-zestia-os-surface="light"] .pack-print-options {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 110px), 1fr));
  }

  body.app-frame[data-zestia-os-surface="light"] .pack-layout input:not([type="checkbox"]):not([type="radio"]),
  body.app-frame[data-zestia-os-surface="light"] .pack-layout select,
  body.app-frame[data-zestia-os-surface="light"] .pack-layout textarea {
    min-width: 0;
    max-width: 100%;
  }
}
