:root {
  --bg: #fcfbfa;
  --background: #fcfbfa;
  --surface: #ffffff;
  --surface-soft: #f3efec;
  --text: #1c1005;
  --muted: #68564d;
  --on-primary: #ffffff;
  --primary: #e10303;
  --primary-700: #a11909;
  --primary-dark: #a11909;
  --primary-hover: #a11909;
  --primary-active: #861307;
  --primary-light: #fff1f1;
  --btn-primary: #e10303;
  --btn-primary-700: #a11909;
  --secondary: #e76415;
  --secondary-dark: #a11909;
  --secondary-light: #f3efec;
  --accent: #f39b25;
  --danger: #b91c1c;
  --danger-bg: #fff1f1;
  --success: #268a3a;
  --success-bg: #edf8ef;
  --warning: #f59e0b;
  --warning-bg: #fff7e6;
  --border: #e7e1dc;
  --header: #e10303;
  --sidebar: #1c1005;
  --input-background: #ffffff;
  --disabled-bg: #d8d2ce;
  --disabled-background: #d8d2ce;
  --disabled-text: #8a817c;
  --focus-ring: rgba(225, 3, 3, 0.18);
  --font-heading: "Roboto Slab", Georgia, serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.10);
  --shadow: var(--shadow-md);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

[data-theme="dark"] {
  --bg: #140e0b;
  --background: #140e0b;
  --surface: #211814;
  --surface-soft: #2a1e19;
  --text: #fff9f5;
  --muted: #c9b9b0;
  --on-primary: #ffffff;
  --primary: #f21d1d;
  --primary-700: #c51616;
  --primary-dark: #c51616;
  --primary-hover: #c51616;
  --primary-active: #a11909;
  --primary-light: #3a1715;
  --btn-primary: #f21d1d;
  --btn-primary-700: #c51616;
  --secondary: #f07824;
  --secondary-dark: #c51616;
  --secondary-light: #3a2b25;
  --accent: #f5ad3d;
  --danger: #ef4444;
  --danger-bg: #3c2020;
  --success: #4caf62;
  --success-bg: #183326;
  --warning: #f5ad3d;
  --warning-bg: #3d2d13;
  --border: #3a2b25;
  --header: #c51616;
  --sidebar: #211814;
  --input-background: #211814;
  --disabled-bg: #3a2b25;
  --disabled-background: #3a2b25;
  --disabled-text: #8a817c;
  --focus-ring: rgba(242, 29, 29, 0.24);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.34);
  --shadow: var(--shadow-md);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--primary-light) 72%, transparent) 0, transparent 30rem),
    radial-gradient(circle at 96% 16%, color-mix(in srgb, var(--secondary-light) 78%, transparent) 0, transparent 28rem),
    var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.app-shell { min-height: 100dvh; padding-bottom: 110px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header);
  color: #ffffff;
  backdrop-filter: blur(10px) saturate(130%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand img { width: 42px; height: 42px; border-radius: 12px; object-fit: contain; background: var(--surface); }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: var(--on-primary);
  border: 1px solid var(--primary);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
}
.brand-heading, .hero-title, h1, h2, h3, h4, .dlv-product-foot strong { font-family: var(--font-heading); }
.collaborators-menu-hero {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  overflow: hidden;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary-light) 72%, var(--surface)) 0%, var(--surface) 58%, color-mix(in srgb, var(--secondary-light) 68%, var(--surface)) 100%);
}
.collaborators-menu-qr {
  display: grid;
  place-items: center;
}
.collaborators-menu-qr img {
  display: block;
  width: min(180px, 100%);
  height: auto;
  aspect-ratio: 1;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.collaborators-menu-copy h3 { margin: 10px 0 6px; }
.collaborators-menu-copy p { margin: 0; color: var(--muted); line-height: 1.5; }
.collaborators-menu-url-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 16px;
}
.collaborators-menu-url-row code {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  overflow-wrap: anywhere;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
}
.collaborators-menu-url-row .btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
@media (max-width: 680px) {
  .collaborators-menu-hero { grid-template-columns: 1fr; text-align: center; gap: 14px; }
  .collaborators-menu-url-row { flex-direction: column; }
  .collaborators-menu-url-row code { justify-content: center; }
  .collaborators-menu-url-row .btn { width: 100%; }
}
.action-row { display: flex; gap: 8px; }

.container { padding: 14px; max-width: 980px; margin: 0 auto; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 12px;
}
.grid { display: grid; gap: 10px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 680px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
  min-height: 46px;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
.btn-primary { background: var(--btn-primary); color: var(--on-primary); border: 1px solid var(--btn-primary); }
.btn-primary:hover { background: var(--btn-primary-700); }
.btn-primary:active { background: var(--primary-active); transform: translateY(1px); }
.btn:disabled, .btn[disabled] { background: var(--disabled-background); color: var(--disabled-text); cursor: not-allowed; opacity: 1; }
.btn-muted { background: var(--surface); color: var(--primary); border: 1px solid var(--primary); }
.btn-muted:hover { background: var(--primary-light); color: var(--primary-hover); }
.btn-danger { background: var(--danger); color: #fff; }

.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  min-height: 44px;
  background: var(--input-background);
  color: var(--text);
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: .82; }
.textarea { min-height: 88px; resize: vertical; }
label { display: block; font-size: 0.9rem; font-weight: 700; margin-bottom: 6px; }

form .input + label,
form .select + label,
form .textarea + label {
  margin-top: 10px;
}

form .grid {
  margin-bottom: 10px;
}

input[type="file"].input::file-selector-button {
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  margin-right: 10px;
  background: var(--btn-primary);
  color: var(--on-primary);
  font-weight: 700;
  cursor: pointer;
}
input[type="file"].input::-webkit-file-upload-button {
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  margin-right: 10px;
  background: var(--btn-primary);
  color: var(--on-primary);
  font-weight: 700;
  cursor: pointer;
}
input[type="file"].input:hover::file-selector-button,
input[type="file"].input:hover::-webkit-file-upload-button {
  background: var(--btn-primary-700);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--primary) 18%, var(--surface));
  color: var(--primary-700);
}
.badge-fila { background: #dbeafe; color: #1e40af; }
.badge-preparo { background: #bfdbfe; color: #1d4ed8; }
.badge-pronto { background: #dcfce7; color: #166534; }
.badge-cancelado { background: #fee2e2; color: #991b1b; }
.badge-saiu_para_entrega { background: #ede9fe; color: #5b21b6; }
.badge-concluido { background: #dcfce7; color: #166534; }
.badge-recebido { background: #dbeafe; color: #1e40af; }
.badge-em_preparo { background: #bfdbfe; color: #1d4ed8; }
.badge-aguardando_pagamento { background: var(--warning-bg); color: var(--text); }

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 30px;
  z-index: 1000;
  margin: 0 auto;
  max-width: 980px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 97%, var(--bg));
  backdrop-filter: blur(10px) saturate(130%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}
.bottom-nav a {
  font-size: 0.7rem;
  border-radius: 10px;
  padding: 7px 3px;
  text-align: center;
  font-weight: 700;
  color: var(--muted);
}
.bottom-nav a.active { background: var(--primary); color: var(--on-primary); }
.bottom-nav .desktop-extra { display: none; }
.more-trigger {
  border: none;
  border-radius: 10px;
  padding: 7px 3px;
  text-align: center;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  font-size: 0.7rem;
}
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1050;
  pointer-events: none;
}
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.26);
  opacity: 0;
  transition: opacity 180ms ease;
  z-index: 1;
}
.drawer-panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(82vw, 320px);
  background: var(--sidebar);
  color: #ffffff;
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(-104%);
  transition: transform 220ms ease;
  z-index: 2;
}
.drawer-overlay.show {
  pointer-events: auto;
}
.drawer-overlay.show .drawer-backdrop {
  opacity: 1;
}
.drawer-overlay.show .drawer-panel {
  transform: translateX(0);
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.drawer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  border-radius: 12px;
  padding: 12px;
  background: transparent;
  font-weight: 700;
  opacity: 0;
  transform: translateX(-14px);
}
.drawer-link:hover,
.drawer-link.active {
  background: var(--primary);
  color: var(--on-primary);
}
.drawer-overlay.show .drawer-link {
  animation: drawerLinkIn 280ms ease forwards;
}
.drawer-overlay.show .drawer-link:nth-of-type(1) { animation-delay: 180ms; }
.drawer-overlay.show .drawer-link:nth-of-type(2) { animation-delay: 240ms; }
.drawer-overlay.show .drawer-link:nth-of-type(3) { animation-delay: 300ms; }
.drawer-overlay.show .drawer-link:nth-of-type(4) { animation-delay: 360ms; }
.drawer-overlay.show .drawer-link:nth-of-type(5) { animation-delay: 420ms; }
.drawer-overlay.show .drawer-link:nth-of-type(6) { animation-delay: 480ms; }

@keyframes drawerLinkIn {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fixed-credit {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 990;
  text-align: center;
  padding: 6px;
  font-size: 0.72rem;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-top: 1px solid var(--border);
}
.clean-link,
.clean-link:visited,
.clean-link:hover,
.clean-link:focus,
.clean-link:active {
  color: inherit;
  text-decoration: none;
}
.credit-brand {
  font-weight: 800;
}

.kpi { font-size: 1.4rem; font-weight: 800; margin-top: 6px; }
.item-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.hide { display: none !important; }
.prod-row {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 12px;
  padding: 8px;
  color: var(--text);
}
.prod-row:hover { background: color-mix(in srgb, var(--surface) 84%, var(--border)); }
.prod-row strong { color: var(--text); }
.prod-row small { color: var(--muted); }
.prod-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.prod-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}
.prod-preview {
  width: 100%;
  max-height: 180px;
  margin-top: 8px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.prod-thumb-inactive {
  filter: grayscale(100%);
  opacity: 0.78;
}

/* Products page */
.products-page {
  display: grid;
  gap: 12px;
}
.products-hero-card {
  margin-bottom: 0;
}
.products-hero-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.products-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.products-hero-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.products-list {
  display: grid;
  gap: 8px;
}
.products-row {
  border: 1px solid var(--border);
}
.products-row-inactive {
  background: color-mix(in srgb, var(--surface) 82%, #101827);
}
.products-row-inactive strong {
  color: color-mix(in srgb, var(--text) 82%, #9ca3af);
}
.products-categories-list {
  display: grid;
  gap: 8px;
}
.products-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
}
.products-category-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.products-mini-btn {
  min-height: 34px;
  min-width: 34px;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pizza-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: color-mix(in srgb, var(--surface) 90%, #fff);
}
.pizza-size-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 110px 110px;
  gap: 8px;
  align-items: center;
}
@media (max-width: 680px) {
  .pizza-size-row {
    grid-template-columns: 1fr;
  }
}
.settings-form {
  display: grid;
  gap: 12px;
}
.settings-banner-guide {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--surface) 94%, #fff);
  display: grid;
  gap: 4px;
}
.settings-banner-guide small {
  color: var(--muted);
}
.settings-media-stack {
  display: grid;
  gap: 10px;
}
.mesa-extra-rows {
  display: grid;
  gap: 10px;
}
.mesa-extra-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: color-mix(in srgb, var(--surface) 93%, #fff);
}
.mesa-extra-remove-btn {
  min-height: 40px;
}

.toast-wrap { position: fixed; top: 12px; right: 12px; display: grid; gap: 8px; z-index: 10000; }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary); padding: 10px 12px; border-radius: 12px; box-shadow: var(--shadow); }
.ui-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(0, 0, 0, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ui-dialog-card {
  width: min(100%, 420px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px;
}
.ui-dialog-card h4 { margin: 0 0 8px; }
.ui-dialog-card p { margin: 0 0 10px; color: var(--muted); }
.ui-dialog-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.cash-open-orders-confirm {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(31, 22, 17, 0.62);
  backdrop-filter: blur(4px);
}
.cash-open-orders-confirm.show {
  display: flex;
}
.cash-open-orders-confirm-card {
  width: min(100%, 430px);
  padding: 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(31, 22, 17, 0.38);
  animation: cash-confirm-enter 180ms ease-out both;
}
.cash-open-orders-confirm-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  color: var(--danger);
  background: var(--danger-bg);
  border-radius: 50%;
}
.cash-open-orders-confirm-card h3 {
  margin: 0 0 8px;
}
.cash-open-orders-confirm-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.cash-open-orders-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}
@keyframes cash-confirm-enter {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45);
  display: none; align-items: flex-end; justify-content: center; z-index: 1300;
  overflow-y: auto;
  padding: 12px 12px 28px;
}
.modal.show { display: flex; }
.modal-content {
  width: 100%;
  max-width: 560px;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 14px;
}

.skeleton { border-radius: 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--surface) 92%, #ddd), color-mix(in srgb, var(--surface) 70%, #ddd), color-mix(in srgb, var(--surface) 92%, #ddd)); background-size: 200% 100%; animation: sk 1.5s linear infinite; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.flash-new { animation: blink 0.8s linear 2; }
@keyframes blink { 0%,100% { outline: 0; } 50% { outline: 2px solid var(--primary); } }

.banner { border-radius: 16px; width: 100%; max-height: 180px; object-fit: cover; border: 1px solid var(--border); }
.menu-list { display: grid; gap: 10px; }
.menu-product { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: center; }
.menu-product img { width: 70px; height: 70px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); }
.mesa-product-card {
  grid-template-columns: 70px minmax(0, 1fr);
  width: 100%;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.mesa-product-card-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.mesa-product-stock {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}
.mesa-product-stock.is-low {
  color: #991b1b;
  background: rgba(220, 38, 38, 0.11);
  font-weight: 700;
}
.mesa-product-card:not(:disabled):hover {
  border-color: var(--primary);
}
.mesa-product-card:not(:disabled):active {
  transform: scale(0.99);
}
.mesa-product-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent);
  outline-offset: 2px;
}
.mesa-product-card:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

/* Home KPI */
.home-kpi {
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
}
.home-kpi::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 90px;
  height: 90px;
  border-radius: 999px;
  opacity: 0.18;
  background: var(--home-kpi-accent, #f59e0b);
  pointer-events: none;
  z-index: 0;
}
.home-kpi > * {
  position: relative;
  z-index: 1;
}
.home-kpi-queue { --home-kpi-accent: #f59e0b; }
.home-kpi-prep { --home-kpi-accent: #3b82f6; }
.home-kpi-delivery-waiting { --home-kpi-accent: #fb7185; }
.home-kpi-deliveries-today { --home-kpi-accent: #22c55e; }
.home-kpi-revenue { --home-kpi-accent: #06b6d4; }
.home-kpi-menus { --home-kpi-accent: #a855f7; }

/* Finance */
.finance-page {
  display: grid;
  gap: 12px;
}
.finance-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.finance-kpi {
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}
.finance-kpi::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 90px;
  height: 90px;
  border-radius: 999px;
  opacity: 0.18;
}
.finance-kpi-day::after { background: #f59e0b; }
.finance-kpi-month::after { background: #22c55e; }
.finance-kpi-year::after { background: #0ea5e9; }
.finance-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}
.finance-kpi-value {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  line-height: 1.1;
}
.finance-kpi small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.finance-filter-card {
  margin-bottom: 0;
}
.finance-panels-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 10px;
}
.finance-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.finance-panel {
  margin-bottom: 0;
}
.finance-list {
  display: grid;
  gap: 8px;
}
.finance-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
}
.finance-list-row small {
  color: var(--muted);
}
.finance-rank-pos {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--primary) 18%, var(--surface));
  color: var(--primary);
}
.finance-mini-bar {
  width: 88px;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 85%, var(--border));
  overflow: hidden;
  flex: 0 0 auto;
}
.finance-mini-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 58%, var(--secondary-dark) 100%);
}
.finance-stats-grid {
  display: grid;
  gap: 8px;
}
.finance-channel-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 93%, #09111f);
}
.finance-channel-card small {
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.finance-channel-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.1rem;
}
.finance-history-list {
  display: grid;
  gap: 8px;
}
.finance-history-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: color-mix(in srgb, var(--surface) 94%, #0b1220);
}
.finance-history-row p {
  margin: 6px 0;
  font-weight: 700;
}
.finance-history-row small {
  color: var(--muted);
}
.finance-promo-list {
  display: grid;
  gap: 10px;
}
.finance-promo-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: color-mix(in srgb, var(--surface) 95%, #0b1220);
}
.finance-promo-card small {
  color: var(--muted);
}
.finance-promo-actions {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}
.finance-promo-btn {
  width: 100%;
  text-align: left;
}

@media (min-width: 900px) {
  .container { padding-bottom: 130px; }
}

@media (min-width: 681px) {
  .bottom-nav { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .bottom-nav .desktop-extra { display: block; }
  .more-trigger { display: none; }
  .drawer-overlay { display: none; }
}

@media (max-width: 680px) {
  .modal { padding: 8px 8px 24px; }
  .modal-content { max-height: calc(100dvh - 16px); }
  .finance-kpi-grid { grid-template-columns: 1fr; }
  .finance-panels-grid { grid-template-columns: 1fr; }
  .finance-actions-grid { grid-template-columns: 1fr; }
  .finance-mini-bar { width: 72px; }
}

/* Delivery menu */
.dlv-page { padding-bottom: 10px; }
.dlv-banner-card {
  padding: 0;
  overflow: hidden;
  position: relative;
}
.dlv-banner-track {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 6;
  min-height: 140px;
}
.dlv-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 420ms ease;
}
.dlv-banner-slide.active {
  opacity: 1;
}
.dlv-banner-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, var(--bg));
}
.dlv-banner-dot {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 40%, var(--surface));
  padding: 0;
}
.dlv-banner-dot.active {
  background: var(--primary);
}
.dlv-banner-placeholder {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 94%, var(--bg));
  border: 1px dashed var(--border);
  border-radius: 16px;
}
.dlv-hero {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, #fff) 0%, color-mix(in srgb, var(--bg) 85%, var(--surface)) 100%);
  color: var(--text);
  border: 1px solid var(--border);
}
.dlv-hero h1 { margin: 0 0 6px; font-size: clamp(1.4rem, 4vw, 2.1rem); line-height: 1.1; }
.dlv-hero-top { display: flex; gap: 12px; justify-content: space-between; align-items: start; }
.dlv-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); }
.dlv-status-actions { align-items: center; }
.dlv-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.dlv-profile-link svg { width: 17px; height: 17px; }
.dlv-store-profile-card { max-width: 720px; max-height: min(88dvh, 850px); overflow-y: auto; }
.dlv-store-profile-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dlv-store-profile-brand img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; background: #000; }
.dlv-store-profile-brand h3 { margin: 0; }
.dlv-store-profile-brand p { margin: 4px 0 0; color: var(--muted); }
.dlv-profile-section { padding: 16px 0; border-top: 1px solid var(--border); }
.dlv-profile-section h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.dlv-profile-section h4 svg { width: 18px; height: 18px; color: var(--primary); }
.dlv-profile-section p { margin: 0; color: var(--muted); }
.dlv-profile-hours > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.dlv-profile-hours > div:last-child { border-bottom: 0; }
.dlv-profile-hours span { color: var(--muted); text-align: right; }
.dlv-profile-payments { display: flex; flex-wrap: wrap; gap: 8px; }
.dlv-profile-payments > span { padding: 8px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.dlv-profile-address { line-height: 1.5; overflow-wrap: anywhere; }
.dlv-profile-map-actions { display: flex; align-items: center; margin: 12px 0 16px; }
.dlv-profile-map-button { position: static; display: inline-flex; width: auto; margin: 0; }
.dlv-profile-map { width: 100%; min-height: 320px; border: 0; border-radius: 14px; display: block; }
.store-profile-admin { max-width: 920px; margin: 0 auto; }
.store-profile-admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.store-profile-admin-head h3 { margin: 0; }
.store-profile-admin-head p { color: var(--muted); margin: 5px 0 0; }
.store-profile-admin form > h4 { margin: 24px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.store-profile-help { display: block; color: var(--muted); margin-top: 6px; }
.store-profile-hours { display: grid; gap: 8px; }
.store-profile-hour-row { display: grid; grid-template-columns: minmax(145px, 1fr) 135px auto 135px; align-items: center; gap: 10px; }
.store-profile-day { display: flex; align-items: center; gap: 8px; margin: 0; }
.store-profile-payments { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.store-profile-payments label { display: flex; align-items: center; gap: 7px; margin: 0; }
@media (max-width: 640px) {
  .store-profile-admin-head { flex-direction: column; }
  .store-profile-hour-row { grid-template-columns: 1fr 1fr; }
  .store-profile-hour-row > span { display: none; }
  .store-profile-day { grid-column: 1 / -1; }
  .dlv-profile-map { min-height: 250px; }
}
.dlv-open { color: var(--success); }
.dlv-closed-text { color: var(--danger); }
.dlv-search-wrap {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 8px;
  background: color-mix(in srgb, var(--surface) 90%, #fff);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 10px;
}
.dlv-search-wrap .input {
  background: transparent;
  border: none;
  color: var(--text);
}
.dlv-search-wrap .btn { min-height: 38px; padding: 8px 12px; }
.dlv-clear-search-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 8px;
  min-width: 38px;
}
.dlv-clear-search-btn:hover {
  background: transparent;
  color: var(--text);
}
.dlv-closed {
  margin-top: 10px;
  border: 1px solid color-mix(in srgb, var(--danger) 60%, var(--border));
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 15%, var(--surface));
  border-radius: 12px;
  padding: 10px;
}
.dlv-cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  min-height: 44px;
  padding: 8px 14px;
}
.dlv-cart-pill span {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--text);
  font-weight: 800;
}
.fly-to-cart-ghost {
  position: fixed;
  z-index: 9999;
  border-radius: 12px;
  object-fit: cover;
  pointer-events: none;
  transition: transform .55s cubic-bezier(.34,0,.24,1), opacity .55s ease;
  will-change: transform, opacity;
}
.cart-pill-bump {
  animation: dlvCartPillBump .35s ease;
}
@keyframes dlvCartPillBump {
  0% { transform: scale(1); }
  45% { transform: scale(1.22); }
  100% { transform: scale(1); }
}
.dlv-categories {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  margin: 12px 0;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--primary) 78%, #6f4b3d) color-mix(in srgb, var(--surface) 72%, transparent);
}
.dlv-categories::-webkit-scrollbar {
  height: 9px;
}
.dlv-categories::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  border-radius: 999px;
}
.dlv-categories::-webkit-scrollbar-thumb {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--primary) 82%, #6f4b3d),
    var(--primary)
  );
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}
.dlv-categories::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
  border: 2px solid transparent;
  background-clip: padding-box;
}
.dlv-categories::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
.dlv-chip {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
}
.dlv-chip.active {
  background: var(--btn-primary);
  color: var(--on-primary);
  border-color: var(--btn-primary);
}
@media (max-width: 680px) {
  .dlv-categories {
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-bottom: 0;
  }
  .dlv-categories::-webkit-scrollbar {
    display: none;
  }
}
.dlv-products {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
}
.dlv-product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.dlv-product-card img {
  width: 100%;
  height: 174px;
  object-fit: cover;
  display: block;
}
.dlv-product-body { padding: 12px; }
.dlv-product-body h3 { margin: 0 0 6px; font-size: 1.35rem; }
.dlv-product-body p { margin: 0; color: var(--muted); min-height: 42px; }
.dlv-product-foot { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dlv-product-foot strong { color: var(--primary); font-size: 1.5rem; }

.dlv-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
}
.dlv-modal.show { display: block; }
.dlv-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 28, 22, 0.42);
}
.dlv-modal-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(95vw, 700px);
  max-height: 92dvh;
  overflow: auto;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 95%, #fff) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--text);
  padding: 14px;
}
.dlv-modal-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.dlv-modal-head h3 { margin: 0; font-size: 2rem; line-height: 1; }
.dlv-modal-head p { margin: 6px 0 0; color: var(--muted); font-size: 1.6rem; font-weight: 700; }
.dlv-item-photo {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 14px;
  margin: 8px 0 10px;
}
.dlv-qty-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.dlv-qty-row strong { font-size: 1.8rem; min-width: 40px; text-align: center; }
.dlv-qty-row .btn { min-width: 52px; }
.dlv-save-item { width: 100%; margin-top: 12px; background: var(--btn-primary); color: var(--on-primary); }

.dlv-cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 1250;
  pointer-events: none;
}
.dlv-cart-drawer.show { pointer-events: auto; }
.dlv-cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 28, 22, 0.4);
  opacity: 0;
  transition: opacity 180ms ease;
}
.dlv-cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100vw, 540px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 95%, #fff) 0%, var(--surface) 100%);
  color: var(--text);
  border-left: 1px solid var(--border);
  transform: translateX(102%);
  transition: transform 230ms ease;
  display: flex;
  flex-direction: column;
}
.dlv-cart-drawer.show .dlv-cart-backdrop { opacity: 1; }
.dlv-cart-drawer.show .dlv-cart-panel { transform: translateX(0); }
.dlv-cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}
.dlv-cart-head h3 { margin: 0; font-size: 2rem; }
.dlv-cart-body {
  overflow: auto;
  padding: 14px;
  display: grid;
  gap: 8px;
}

/* Safari/iOS may ignore min-height on native form controls and crop the
   selected value. Keep the checkout fields at a stable touch-friendly size. */
@supports (-webkit-touch-callout: none) {
  .dlv-cart-body .input,
  .dlv-cart-body .select {
    box-sizing: border-box;
    height: 48px;
    min-height: 48px;
    font-size: 16px;
    line-height: normal;
  }

  .dlv-cart-body .select {
    -webkit-appearance: menulist;
    appearance: auto;
    padding-top: 0;
    padding-bottom: 0;
    color: var(--text);
    -webkit-text-fill-color: var(--text);
    opacity: 1;
  }

  .dlv-cart-body .textarea {
    min-height: 96px;
    font-size: 16px;
    line-height: 1.4;
  }
}
.dlv-cart-items { margin-top: 6px; display: grid; gap: 8px; }
.dlv-cart-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dlv-cart-item p { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; }
.dlv-mini-qty { display: inline-flex; align-items: center; gap: 8px; }
.dlv-mini-qty button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, #fff);
  color: var(--text);
}
.dlv-totals {
  border-top: 2px solid var(--primary);
  padding-top: 8px;
  display: grid;
  gap: 6px;
}
.dlv-totals div { display: flex; justify-content: space-between; font-size: 1.05rem; }
.dlv-total { font-size: 1.35rem !important; font-weight: 800; }
.dlv-submit {
  margin-top: 6px;
  background: var(--btn-primary);
  color: var(--on-primary);
}
.dlv-card-notice {
  margin: 2px 0 4px;
  color: var(--primary-700);
  font-weight: 800;
  font-size: 0.92rem;
}
.dlv-pix-card { width: min(94vw, 520px); }
.dlv-pix-card .dlv-modal-head p { color: var(--primary); }
.dlv-pix-status { display:flex;align-items:center;gap:8px;margin:14px 0;padding:10px 12px;border-radius:12px;background:var(--warning-bg);color:var(--text); }
.dlv-pix-status svg, .dlv-pix-warning svg { width:20px;height:20px;flex:0 0 auto; }
.dlv-pix-qr { width:272px;max-width:100%;margin:12px auto 18px;padding:16px;background:#fff;border:1px solid var(--border);border-radius:14px; }
.dlv-pix-qr img, .dlv-pix-qr canvas { display:block;width:100% !important;height:auto !important;aspect-ratio:1; }
.dlv-pix-card #dlvCopyPix, .dlv-pix-card #dlvPixTracking { width:100%;display:flex;align-items:center;justify-content:center;gap:8px;margin-top:10px; }
.dlv-pix-receiver { margin:14px 0 8px;color:var(--muted); }
.dlv-pix-warning { display:flex;align-items:flex-start;gap:8px;margin:0;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft);line-height:1.45; }

@media (min-width: 760px) {
  .dlv-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1160px) {
  .dlv-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Barcode scanner */
.bs-overlay {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.bs-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 7, 16, 0.75);
}
.bs-card {
  position: relative;
  width: min(100%, 720px);
  background: #06101d;
  color: #e5edf8;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  padding: 12px;
}
.bs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.bs-video-wrap {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #020812;
  min-height: 260px;
}
.bs-video-wrap video,
.bs-video-wrap .bs-quagga,
.bs-video-wrap canvas {
  width: 100% !important;
  height: min(56vh, 420px) !important;
  object-fit: cover;
  display: block;
}
.bs-guide {
  pointer-events: none;
  position: absolute;
  inset: 16% 10%;
  border: 2px solid #f59e0b;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.2) inset;
}
.bs-help {
  margin: 10px 0 0;
  color: #b9c8de;
}
.bs-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.mesa-join-option {
  min-width: 0;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.mesa-join-option:has(input:checked) {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 16%, transparent);
}

.mesa-join-option.is-joined {
  border-color: color-mix(in srgb, var(--primary) 48%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, var(--surface)), var(--surface));
}

.mesa-join-option-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.mesa-join-badge {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  font-size: 11px;
  font-weight: 800;
}

.mesa-join-badge svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.mesa-join-account-state,
.mesa-join-group {
  display: block;
  overflow-wrap: anywhere;
}

.mesa-join-account-state {
  color: var(--muted);
}

.mesa-join-group {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.ice-choice-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.ice-option-group {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border);
}

.ice-option-groups-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  margin-top: 12px;
}

.ice-option-groups-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
}

.ice-group-items {
  display: grid;
  gap: 8px;
}

.ice-option-group legend {
  padding: 0 8px;
  color: var(--primary);
  font-weight: 800;
}

.ice-check-choice,
.ice-quantity-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--surface-soft, #fff8f7);
}

.ice-quantity-choice .input {
  width: 78px;
}

.ice-flavor-stepper {
  display: grid;
  grid-template-columns: 42px minmax(58px, 76px) 42px;
  gap: 6px;
  align-items: center;
}

.ice-flavor-stepper .btn {
  min-height: 42px;
  padding: 7px;
  font-size: 1.15rem;
}

.ice-flavor-stepper .input {
  min-width: 0;
  text-align: center;
}

.ice-builder-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.ice-builder-heading h4 {
  margin: 0;
}

.ice-admin-group {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.ice-ingredients-admin-card {
  grid-column: 1 / -1;
}

.ice-ingredients-admin-card #iceComplementForm {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ice-ingredients-admin-card #iceComplementForm > button,
.ice-ingredients-admin-card #iceComplementForm > div {
  grid-column: span 1;
}

#iceComplementsList {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}

#iceComplementsList .ice-admin-group {
  margin-top: 0;
}

@media (max-width: 680px) {
  .ice-option-groups-grid {
    grid-template-columns: 1fr;
  }

  .ice-option-groups-column {
    display: contents;
  }

  .ice-option-group {
    order: var(--ice-group-order);
  }

  .ice-ingredients-admin-card #iceComplementForm,
  #iceComplementsList {
    grid-template-columns: 1fr;
  }
}
