:root {
  --bg: #f7f7f5;
  --background: #f7f7f5;
  --surface: #ffffff;
  --surface-soft: #f4f4f2;
  --text: #171717;
  --muted: #666666;
  --on-primary: #111111;
  --primary: #fec513;
  --primary-700: #a77d00;
  --primary-dark: #d7a510;
  --primary-hover: #d7a510;
  --primary-light: #fff5cf;
  --btn-primary: #fec513;
  --btn-primary-700: #d7a510;
  --secondary: #0a0a0a;
  --secondary-dark: #000000;
  --secondary-light: #eeeeeb;
  --accent: #ffcf32;
  --danger: #c62828;
  --danger-bg: #fbe9e9;
  --success: #198754;
  --success-bg: #eaf6ef;
  --warning: #d98e04;
  --warning-bg: #fff4dc;
  --border: #e3e3e0;
  --header: #0a0a0a;
  --sidebar: #111111;
  --input-background: #ffffff;
  --disabled-background: #e6e6e3;
  --disabled-text: #929292;
  --focus-ring: rgba(254, 197, 19, 0.25);
  --font-heading: "Oswald", sans-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: #0b0b0b;
  --background: #0b0b0b;
  --surface: #161616;
  --surface-soft: #1d1d1d;
  --text: #f6f6f6;
  --muted: #a7a7a7;
  --on-primary: #111111;
  --primary: #fec513;
  --primary-700: #ffcf32;
  --primary-dark: #d7a510;
  --primary-hover: #d7a510;
  --primary-light: #332a0c;
  --btn-primary: #fec513;
  --btn-primary-700: #d7a510;
  --secondary: #ffffff;
  --secondary-dark: #ffffff;
  --secondary-light: #292929;
  --accent: #ffcf32;
  --danger: #e15757;
  --danger-bg: #3c2020;
  --success: #3eb875;
  --success-bg: #183326;
  --warning: #f2ab27;
  --warning-bg: #3d2d13;
  --border: #303030;
  --header: #000000;
  --sidebar: #050505;
  --input-background: #1d1d1d;
  --disabled-background: #292929;
  --disabled-text: #757575;
  --focus-ring: rgba(254, 197, 19, 0.30);
  --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: #111111;
  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)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

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

@media (min-width: 681px) and (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 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-dark); transform: translateY(1px); }
.btn:disabled, .btn[disabled] { background: var(--disabled-background); color: var(--disabled-text); cursor: not-allowed; opacity: 1; }
.btn-muted { background: color-mix(in srgb, var(--surface) 65%, var(--border)); color: var(--text); }
.btn-muted:hover { background: var(--primary-light); color: var(--primary-dark); }
.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-pronto_local { 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-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }

#customersList button.item-row {
  border: 0;
  border-bottom: 1px dashed var(--border);
  background: transparent;
  color: var(--text);
  padding: 11px 4px;
}
#customersList button.item-row:hover { background: var(--primary-light); }

.sidebar-heading { display: none; }
.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: #111111; }
.bottom-nav .desktop-extra { display: none; }
.nav-icon-wrap {
  position: relative;
  display: block;
  width: max-content;
  margin: 0 auto 4px;
  line-height: 0;
}
.nav-icon-wrap > svg { display: block; }
.nav-unread-badge {
  position: absolute;
  top: -9px;
  right: -13px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.61rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
}
.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: #d7d7d7;
  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 {
  background: var(--primary);
  color: #111111;
}
.drawer-link .nav-icon-wrap {
  display: inline-flex;
  flex: 0 0 auto;
  margin: 0;
}
.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; }

/* Manual do sistema */
.manual-page {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 1120px;
  min-width: 0;
  margin: 0 auto;
  overflow-x: hidden;
  overflow-x: clip;
}
.manual-page > *,
.manual-hero > *,
.manual-layout > *,
.manual-content > *,
.manual-flow > div > span,
.manual-section-heading > div,
.manual-callout > span {
  min-width: 0;
  max-width: 100%;
}
.manual-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
  align-items: center;
  gap: 28px;
  padding: clamp(22px, 4vw, 38px);
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--primary) 28%, transparent) 0 90px, transparent 91px),
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 96%, var(--primary)) 0%, var(--surface) 68%);
}
.manual-hero-copy { position: relative; z-index: 1; overflow-wrap: anywhere; }
.manual-eyebrow,
.manual-role {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
}
.manual-eyebrow {
  color: var(--primary-700);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .76rem;
}
.manual-eyebrow svg,
.manual-role svg { width: 16px; height: 16px; }
.manual-hero h1 {
  margin: 7px 0 6px;
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 1;
}
.manual-hero p {
  max-width: 650px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
}
.manual-role {
  max-width: 100%;
  flex-wrap: wrap;
  padding: 7px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 17%, var(--surface));
  font-size: .78rem;
}
.manual-search-box {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 91%, transparent);
  box-shadow: var(--shadow-sm);
}
.manual-search-box label { margin-bottom: 8px; }
.manual-search-box small { display: block; margin-top: 8px; color: var(--muted); line-height: 1.35; }
.manual-search-input {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0 8px 0 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--input-background);
}
.manual-search-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.manual-search-input > svg { width: 19px; height: 19px; color: var(--muted); }
.manual-search-input input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}
.manual-search-input button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
}
.manual-search-input button svg { width: 16px; height: 16px; }
.manual-start { padding: clamp(18px, 3vw, 26px); }
.manual-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr) auto) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
.manual-flow > div {
  min-width: 0;
  max-width: 100%;
  min-height: 112px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}
.manual-flow > div > strong {
  flex: 0 0 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #111;
}
.manual-flow b,
.manual-flow small { display: block; }
.manual-flow small { margin-top: 5px; color: var(--muted); line-height: 1.35; }
.manual-flow > svg { width: 17px; height: 17px; color: var(--muted); }
.manual-layout {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: 245px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}
.manual-index {
  position: sticky;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  top: 12px;
  max-height: calc(100dvh - 150px);
  overflow-y: auto;
  padding: 14px;
}
.manual-index > strong {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 7px 10px;
}
.manual-index > strong svg { width: 17px; height: 17px; }
.manual-index nav { display: grid; gap: 3px; }
.manual-index a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}
.manual-index a:hover {
  background: var(--primary-light);
  color: var(--text);
}
.manual-index a svg { flex: 0 0 auto; width: 16px; height: 16px; }
.manual-content { width: 100%; min-width: 0; max-width: 100%; display: grid; gap: 16px; }
.manual-section {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  scroll-margin-top: 14px;
  padding: clamp(18px, 3vw, 26px);
}
.manual-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.manual-section-heading > div > span {
  display: block;
  margin-bottom: 2px;
  color: var(--primary-700);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.manual-section-heading h2 { margin: 0; font-size: clamp(1.3rem, 3vw, 1.7rem); }
.manual-section-icon {
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--primary);
  color: #111;
}
.manual-section-icon svg { width: 21px; height: 21px; }
.manual-section > p { color: var(--muted); line-height: 1.6; }
.manual-section p,
.manual-section li,
.manual-section summary,
.manual-section a { overflow-wrap: anywhere; }
.manual-section h3 { margin: 20px 0 8px; font-size: 1rem; }
.manual-section-heading + h3 { margin-top: 0; }
.manual-steps {
  list-style: none;
  counter-reset: manual-step;
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 14px 0;
}
.manual-steps li {
  counter-increment: manual-step;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
}
.manual-steps li::before {
  content: counter(manual-step);
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: color-mix(in srgb, var(--primary) 22%, var(--surface));
  color: var(--primary-700);
  font-weight: 800;
  font-size: .78rem;
}
.manual-steps li b { display: block; padding-top: 2px; }
.manual-steps li span { grid-column: 2; color: var(--muted); line-height: 1.5; }
.manual-list { margin: 12px 0; padding-left: 21px; color: var(--muted); }
.manual-list li { margin: 8px 0; padding-left: 3px; line-height: 1.5; }
.manual-columns,
.manual-optional-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.manual-columns > div,
.manual-optional-grid > div {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}
.manual-columns h3,
.manual-optional-grid h3 { margin: 0 0 6px; }
.manual-columns p,
.manual-optional-grid p { margin: 0; color: var(--muted); line-height: 1.5; }
.manual-optional-grid > div > svg { width: 24px; height: 24px; margin-bottom: 9px; color: var(--primary-700); }
.manual-optional-grid a { display: inline-block; margin-top: 10px; color: var(--primary-700); font-weight: 800; }
.manual-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 38%, var(--border));
  border-radius: 13px;
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  line-height: 1.5;
}
.manual-callout > svg { flex: 0 0 auto; width: 19px; height: 19px; margin-top: 2px; color: var(--primary-700); }
.manual-callout-warning { border-color: color-mix(in srgb, var(--warning) 42%, var(--border)); background: color-mix(in srgb, var(--warning) 10%, var(--surface)); }
.manual-callout-warning > svg { color: var(--warning); }
.manual-callout-danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.manual-callout-danger > svg { color: var(--danger); }
.manual-module-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  margin-top: 16px;
  padding: 9px 13px;
  border-radius: 11px;
  background: var(--primary);
  color: #111;
  font-size: .84rem;
  font-weight: 800;
}
.manual-module-link:hover { background: var(--primary-dark); }
.manual-module-link svg { width: 15px; height: 15px; }
.manual-module-link-muted { background: var(--surface-soft); color: var(--text); border: 1px solid var(--border); }
.manual-module-link-muted:hover { background: var(--primary-light); }
.manual-link-row { display: flex; flex-wrap: wrap; gap: 8px; }
.manual-faq { display: grid; gap: 8px; }
.manual-faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}
.manual-faq summary {
  padding: 13px 15px;
  cursor: pointer;
  font-weight: 800;
}
.manual-faq details[open] summary { color: var(--primary-700); }
.manual-faq p { margin: 0; padding: 0 15px 14px; color: var(--muted); line-height: 1.55; }
.manual-empty { padding: 34px 20px; text-align: center; }
.manual-empty > svg { width: 34px; height: 34px; color: var(--muted); }
.manual-empty h3 { margin: 10px 0 5px; }
.manual-empty p { margin: 0; color: var(--muted); }

@media (max-width: 900px) {
  .manual-hero { grid-template-columns: 1fr; gap: 20px; }
  .manual-layout { grid-template-columns: 1fr; }
  .manual-index {
    position: static;
    max-height: none;
    overflow: hidden;
  }
  .manual-index nav {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }
  .manual-index a {
    flex: 0 0 auto;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    scroll-snap-align: start;
  }
  .manual-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-flow > svg { display: none; }
}

@media (max-width: 560px) {
  .manual-page { gap: 10px; }
  .manual-page > .card { margin-bottom: 0; }
  .manual-hero { gap: 16px; padding: 18px 13px; }
  .manual-hero h1 { font-size: clamp(1.85rem, 9vw, 2.25rem); }
  .manual-hero p { font-size: .93rem; line-height: 1.45; }
  .manual-role { font-size: .72rem; }
  .manual-search-box { padding: 12px; border-radius: 14px; }
  .manual-search-input {
    grid-template-columns: 18px minmax(0, 1fr) 30px;
    gap: 6px;
    min-height: 46px;
    padding: 0 6px 0 10px;
  }
  .manual-search-input input {
    height: 44px;
    font-size: 16px;
    text-overflow: ellipsis;
  }
  .manual-search-input button { width: 30px; height: 30px; }
  .manual-search-box small { font-size: .76rem; }
  .manual-start { padding: 16px 13px; }
  .manual-flow,
  .manual-columns,
  .manual-optional-grid { grid-template-columns: 1fr; }
  .manual-flow { gap: 8px; margin-top: 14px; }
  .manual-flow > div { min-height: auto; padding: 12px; }
  .manual-index { padding: 11px; }
  .manual-index > strong { padding: 2px 4px 9px; }
  .manual-index a { padding: 8px 9px; font-size: .78rem; }
  .manual-content { gap: 10px; }
  .manual-section { padding: 16px 13px; }
  .manual-section-heading { align-items: flex-start; }
  .manual-section-icon { flex-basis: 39px; width: 39px; height: 39px; }
  .manual-steps li { grid-template-columns: 28px minmax(0, 1fr); column-gap: 8px; }
  .manual-columns > div,
  .manual-optional-grid > div { padding: 12px; }
  .manual-callout { padding: 11px 12px; }
  .manual-module-link { width: 100%; }
  .manual-link-row { display: grid; grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .manual-hero,
  .manual-start,
  .manual-section { padding-left: 11px; padding-right: 11px; }
  .manual-section-heading { gap: 9px; }
  .manual-section-icon { flex-basis: 36px; width: 36px; height: 36px; border-radius: 11px; }
  .manual-section-heading h2 { font-size: 1.2rem; }
}

@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;
}
#complementForm .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#complementModal .modal-content { width: 100%; }
#complementModal .grid > div { min-width: 0; }
#complementModal label { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  #complementForm .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
.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; }
}

/* Navegação lateral no desktop; mantém a mesma lista e permissões do mobile. */
@media (min-width: 1024px) {
  .app-with-sidebar {
    --sidebar-width: 232px;
    padding-left: var(--sidebar-width);
    padding-bottom: 44px;
  }
  .app-with-sidebar > .container {
    width: 100%;
    min-width: 0;
    max-width: 1440px;
    padding: 22px 24px;
  }
  .app-with-sidebar > .topbar { padding: 14px 24px; }
  .app-with-sidebar > .bottom-nav {
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 20px 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 0;
    border-right: 1px solid var(--border);
    box-shadow: 3px 0 16px rgba(0, 0, 0, .05);
  }
  .app-with-sidebar .sidebar-heading {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    gap: 4px;
    padding: 4px 12px 20px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-heading > span { font-family: var(--font-heading); font-size: 1.5rem; }
  .sidebar-heading > small { color: var(--muted); font-size: .78rem; }
  .app-with-sidebar .bottom-nav > a {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 16px;
    min-height: 44px;
    padding: 12px;
    text-align: left;
    font-size: .85rem;
    line-height: 1.3;
  }
  .app-with-sidebar .bottom-nav > a:hover { background: var(--primary-light); color: var(--text); }
  .app-with-sidebar .bottom-nav > a.active { background: var(--primary); color: #111; }
  .app-with-sidebar .bottom-nav > a:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: -2px; }
  .app-with-sidebar .bottom-nav .nav-icon-wrap { flex: 0 0 20px; margin: 0; }
  .app-with-sidebar .bottom-nav .more-trigger { display: none; }
  .app-with-sidebar > .fixed-credit { left: var(--sidebar-width); }
}

/* 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: #111111;
  color: #ffffff;
  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(--primary);
  color: #111111;
  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: color-mix(in srgb, var(--surface) 90%, var(--bg));
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
}
.dlv-chip.active {
  background: var(--btn-primary);
  color: #111111;
  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: color-mix(in srgb, var(--surface) 95%, #fff);
  border: 1px solid var(--border);
  border-radius: 18px;
  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 { 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;
}

@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;
  }
}
