:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #0ea5e9;
  --background: #f3f7f4;
  --surface: #ffffff;
  --surface-muted: #f5f9f7;
  --border: #e2e8e4;
  --text: #0f172a;
  --muted: #64748b;
  --shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.05);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-width: 230px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1200px 500px at 50% -120px, #e6f3ec 0%, rgba(230, 243, 236, 0) 70%),
    var(--background);
  color: var(--text);
}

/* Hide protected shells until auth pre-check finishes to avoid login shell flash. */
.auth-pending .app-shell,
.auth-pending .kitchen-shell {
  visibility: hidden;
}

h1,
h2,
h3 {
  letter-spacing: -0.015em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-rows: 80px minmax(0, 1fr);
  grid-template-areas:
    "header header"
    "sidebar main";
}

.app-header {
  grid-area: header;
  background: #0071ce;
  border-bottom: 1px solid #005fb0;
  box-shadow: 0 2px 8px rgba(0, 51, 102, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  color: #ffffff;
}

.app-brand {
  display: grid;
  gap: 2px;
}

.brand-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #059669;
}

.app-header .brand-kicker {
  color: #ffffff;
}

#brandTitle {
  font-size: 24px;
  font-weight: 800;
}

#restaurantName {
  font-size: 13px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inline-field {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  min-width: 220px;
}

.app-header .inline-field {
  color: rgba(255, 255, 255, 0.92);
}

.inline-field select {
  min-width: 220px;
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.92);
}

.app-header .muted {
  color: rgba(255, 255, 255, 0.92);
}

.app-sidebar {
  grid-area: sidebar;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcf9 100%);
  border-right: 1px solid var(--border);
  padding: 18px 10px;
}

.app-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.nav-btn:hover {
  background: var(--surface-muted);
  transform: translateX(2px);
}

.nav-btn.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
}

.app-main {
  grid-area: main;
  padding: 24px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.view-section {
  display: none;
  gap: 14px;
}

.view-section.active {
  display: grid;
}

.view-section > h2 {
  font-size: 28px;
  font-weight: 800;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
}

.section-header .actions {
  display: flex;
  gap: 8px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 12px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.panel:hover {
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

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

.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 6px;
}

.summary-card .label {
  font-size: 13px;
  color: var(--muted);
}

.summary-card .value {
  font-size: 28px;
  font-weight: 700;
}

.summary-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
}

.waiter-summary-card-ready {
  border-color: #fde68a;
  background: #fffbeb;
}

.analytics-kpi-card {
  gap: 10px;
}

.analytics-kpi-change {
  font-size: 13px;
  font-weight: 600;
}

.analytics-kpi-change.positive {
  color: var(--success);
}

.analytics-kpi-change.negative {
  color: var(--danger);
}

.analytics-kpi-change.neutral {
  color: var(--muted);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

label {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
  font-size: 13px;
  color: var(--muted);
}

input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: #fff;
  font: inherit;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

input.input-invalid,
select.input-invalid,
textarea.input-invalid {
  border-color: var(--danger);
}

button,
.button-link {
  border: 1px solid var(--primary);
  background: linear-gradient(180deg, #3b82f6 0%, var(--primary) 100%);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.22);
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

button:hover,
.button-link:hover {
  background: var(--primary-dark);
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.25);
}

button:active,
.button-link:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

button.ghost {
  background: #f8fafc;
  color: var(--primary);
  border-color: #cbd5e1;
  box-shadow: none;
}

button.ghost.icon-button {
  padding: 8px 12px;
  font-size: 18px;
  border: 1px solid #e2e8e4;
  background: #fff;
  color: var(--danger);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

button.ghost.icon-button:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

button.danger {
  border-color: var(--danger);
  background: linear-gradient(180deg, #f87171 0%, var(--danger) 100%);
  box-shadow: 0 6px 14px rgba(239, 68, 68, 0.2);
}

button.danger:hover {
  background: #dc2626;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

th {
  color: var(--muted);
  background: #f8fcfa;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #f6fbf8;
}

tbody tr:nth-child(even) {
  background: #fcfefd;
}

tbody tr:nth-child(even):hover {
  background: #f6fbf8;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge.OPEN,
.badge.PREPARING {
  background: #fef3c7;
  color: #92400e;
}

.badge.READY,
.badge.PAID,
.badge.ACTIVE,
.badge.TRUE {
  background: #dcfce7;
  color: #166534;
}

.badge.CANCELLED,
.badge.FALSE {
  background: #fee2e2;
  color: #991b1b;
}

.badge.COMPLETED {
  background: #dbeafe;
  color: #1e3a8a;
}

.badge.PENDING,
.badge.IN_PROGRESS,
.badge.SENT_TO_KITCHEN {
  background: #ffedd5;
  color: #9a3412;
}

.badge.STOREFRONT {
  background: #ede9fe;
  color: #5b21b6;
}

.badge.POS {
  background: #dbeafe;
  color: #1e40af;
}

.badge.APPROVED,
.badge.FULFILLED,
.badge.PARTIALLY_FULFILLED {
  background: #dcfce7;
  color: #14532d;
}

.empty-state {
  text-align: center;
  padding: 32px;
}

.storefront-summary {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.storefront-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.storefront-summary-item {
  display: grid;
  gap: 4px;
}

.storefront-summary-item .label {
  font-size: 12px;
  color: var(--muted);
}

.storefront-summary-item .value {
  font-size: 14px;
  font-weight: 600;
  word-break: break-word;
}

.help-search-field {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 100%;
}

.help-search-field > span {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.help-search-field::after {
  content: "\1F50D";
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 14px;
  color: #64748b;
  pointer-events: none;
}

.help-search-field input {
  min-height: 42px;
  padding-left: 36px;
}

.help-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.help-topic-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.help-topic-card {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-icon-wrapper {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.help-topic-card h3 {
  margin: 0;
  font-size: 15px;
}

.card-description {
  margin: 0;
  color: var(--muted);
}

.help-card-actions {
  display: flex;
  justify-content: flex-end;
}

.help-results,
.help-result-group,
.help-topic-view,
.help-article-view,
 .help-link-list {
  display: grid;
  gap: 10px;
}

.help-link-btn,
.help-article-link {
  justify-self: start;
}

.help-steps-list,
.help-notes-list {
  margin: 0;
  display: grid;
  gap: 10px;
}

.help-steps-list {
  padding-left: 22px;
  list-style: decimal;
}

.help-notes-list {
  padding-left: 0;
  list-style: none;
}

.help-notes {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.help-steps {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}

.help-steps-list li {
  padding-left: 0;
  line-height: 1.5;
}

.help-notes-list li,
.help-notes li {
  position: relative;
  padding-left: 18px;
  line-height: 1.5;
}

.help-notes-list li::before,
.help-notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #3b82f6;
}

.help-steps li {
  padding-left: 0;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.analytics-toolbar {
  align-items: flex-start;
}

.analytics-toolbar-controls {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.analytics-period-tabs,
.analytics-nav-controls,
.analytics-grid {
  display: grid;
  gap: 10px;
}

.analytics-period-tabs {
  grid-template-columns: repeat(3, minmax(90px, 1fr));
}

.analytics-period-btn.active {
  background: #dbeafe;
  color: var(--primary-dark);
  border-color: #93c5fd;
}

.analytics-nav-controls {
  grid-auto-flow: column;
  align-items: center;
}

.analytics-current-label {
  min-width: 180px;
  text-align: center;
  font-weight: 600;
}

.analytics-chart-panel {
  min-height: 380px;
}

.analytics-chart-wrap {
  position: relative;
  min-height: 300px;
}

.analytics-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.analytics-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.analytics-summary-item {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.analytics-summary-label {
  color: var(--muted);
  font-size: 13px;
}

.analytics-summary-value {
  font-size: 20px;
}

.analytics-item-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.analytics-item-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #dbeafe;
  display: inline-grid;
  place-items: center;
  font-size: 18px;
}


.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.2);
  display: grid;
  place-items: center;
  z-index: 1000;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #dbeafe;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.45);
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal {
  width: min(680px, 95vw);
  max-height: 90vh;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.modal > .section-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal > div:nth-child(2) {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Kitchen request modal uses standalone markup but same visual behavior. */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.45);
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-panel {
  width: min(680px, 95vw);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-body {
  display: grid;
  gap: 12px;
}

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

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
  flex-shrink: 0;
}

.form-error {
  color: var(--danger);
  font-size: 13px;
}

.toast-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 10px 12px;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

.clickable-row {
  cursor: pointer;
}

.auth-page {
  min-height: calc(100vh - 64px);
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 20px;
  padding: 32px 18px 44px;
  background: #f5f8fc;
}

.landing-page {
  background: #f5f8fc;
}

.landing-page .landing-page-container {
  max-width: 1200px;
  width: 92%;
  margin: 0 auto;
  padding: 48px 0;
  justify-items: stretch;
}

.public-hero {
  width: min(1180px, 100%);
  display: grid;
  gap: 24px;
}

.landing-page .public-hero,
.landing-page #productsSection,
.landing-page .onboarding-section,
.landing-page .auth-page > .panel:not(.public-hero) {
  width: 100%;
}

.public-hero.public-hero-split {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  padding-top: 6px;
  padding-bottom: 6px;
}

.landing-page .hero-split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 64px;
}

.public-hero.public-hero-split h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 16ch;
}

.public-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #0866c6;
  border-bottom: 1px solid #0753a1;
  box-shadow: 0 2px 8px rgba(0, 51, 102, 0.18);
}

.public-topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 64px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.public-logo {
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 18px;
}

.public-nav-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  background: transparent;
  color: #ffffff;
  font-weight: 600;
  padding: 8px 12px;
}

.public-nav-cluster {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.public-nav {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.public-link {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-weight: 600;
}

.public-link:hover {
  color: #ffffff;
}

.public-link-btn {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 14px;
  text-decoration: none;
  font-weight: 600;
  background: var(--surface-muted);
}

.public-link-btn:hover {
  background: #e8f0fa;
}

.public-topbar .lang-select-wrap select {
  border-color: #d7e8ff;
  background: #ffffff;
  color: #0f172a;
}

.public-topbar .public-topbar-actions button {
  box-shadow: none;
}

.public-topbar .public-topbar-actions .button-link {
  box-shadow: none;
}

.public-topbar .public-topbar-actions button.ghost {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
}

.public-topbar .public-topbar-actions .button-link.ghost {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
}

.public-topbar .public-topbar-actions button.ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.public-topbar .public-topbar-actions .button-link.ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.public-topbar .public-topbar-actions button:not(.ghost) {
  background: #ffffff;
  color: #005cb2;
  border-color: #ffffff;
}

.public-topbar .public-topbar-actions .button-link:not(.ghost) {
  background: #ffffff;
  color: #005cb2;
  border-color: #ffffff;
}

.public-topbar .public-topbar-actions button:not(.ghost):hover {
  background: #f3f8ff;
}

.public-topbar .public-topbar-actions .button-link:not(.ghost):hover {
  background: #f3f8ff;
}

.public-topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.public-hero-copy {
  display: grid;
  gap: 16px;
}

.public-hero-actions {
  flex-wrap: wrap;
}

.public-hero-preview {
  border: 1px solid #d8e4f2;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(8, 49, 97, 0.08);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.demo-badge {
  justify-self: start;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1d4f85;
  background: #e6f1fd;
  border: 1px solid #cce3fb;
  border-radius: 999px;
  padding: 4px 8px;
}

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

.preview-stat {
  border: 1px solid #dbe7f4;
  border-radius: 12px;
  padding: 12px;
  background: #f9fcff;
}

.preview-stat p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

.preview-stat strong {
  font-size: 20px;
  color: #111827;
}

.preview-list {
  border: 1px solid #dbe7f4;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

.preview-list h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.preview-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.preview-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid #edf3fa;
  border-radius: 10px;
  padding: 8px 10px;
}

.preview-list li:first-child {
  border-top: 1px solid #edf3fa;
  padding: 8px 10px;
}

.preview-row {
  border-left-width: 4px;
}

.preview-row-preparing {
  border-left-color: #d4a528;
  background: #fffdf7;
}

.preview-row-ready {
  border-left-color: #2f8a55;
  background: #f7fdf9;
}

.preview-row-open {
  border-left-color: #2f67b6;
  background: #f7faff;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
}

.status.preparing {
  background: #fff8e7;
  color: #8a5b08;
}

.status.ready {
  background: #e8f8ef;
  color: #187a3f;
}

.status.open {
  background: #e8f1ff;
  color: #174a9c;
}

#productsSection,
.public-cta,
.auth-card,
.auth-page > .panel:not(.public-hero) {
  width: min(1180px, 100%);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
  align-items: stretch;
}

.landing-page .feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  padding: 16px;
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 176px;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.feature-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid #d9e7f8;
  background: #edf5ff;
  font-size: 17px;
}

.feature-card h3 {
  margin: 0;
  font-size: 16px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.feature-card:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
  box-shadow: var(--shadow);
}

.onboarding-section {
  margin-top: 56px;
  margin-bottom: 56px;
}

.onboarding-header {
  font-size: 22px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 10px;
}

.onboarding-subtitle {
  margin-bottom: 24px;
}

.launch-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.onboarding-step-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.01);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding-step-card:hover {
  transform: translateX(6px);
  border-color: rgba(0, 102, 255, 0.15);
  box-shadow: 0 8px 20px rgba(0, 102, 255, 0.04);
}

.onboarding-step-row {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.015);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding-step-row:hover {
  transform: translateX(6px);
  border-color: rgba(0, 102, 255, 0.2);
  box-shadow: 0 10px 24px rgba(0, 102, 255, 0.05);
}

.step-sequence-badge {
  width: 32px;
  height: 32px;
  background: rgba(0, 102, 255, 0.08);
  color: #0066ff;
  font-weight: 600;
  font-size: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-details-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-header-text {
  font-size: 15.5px;
  font-weight: 600;
  color: #0f172a;
}

.step-supporting-copy {
  font-size: 14px;
  color: #5a6a85;
  line-height: 1.5;
}

.step-number-badge {
  width: 28px;
  height: 28px;
  background: rgba(0, 102, 255, 0.08);
  color: #0066ff;
  font-weight: 600;
  font-size: 13px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-title {
  font-size: 15px;
  font-weight: 600;
  color: #2d3748;
}

.step-description {
  font-size: 13.5px;
  color: #5a6a85;
  line-height: 1.4;
}

.onboarding-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: #0066ff;
  font-weight: 500;
  text-decoration: none;
  font-size: 14px;
  transition: opacity 0.2s ease;
}

.onboarding-footer-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

.public-cta {
  text-align: center;
  justify-items: center;
  gap: 10px;
  background: linear-gradient(180deg, #ffffff, #f9fcff);
}

.public-footer {
  border-top: 1px solid #d8e4f2;
  background: #ffffff;
  padding: 26px 18px;
}

.public-footer-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  align-items: start;
}

.public-footer section {
  display: grid;
  align-content: start;
  gap: 4px;
}

.public-footer h3,
.public-footer h4 {
  margin: 0 0 8px;
}

.public-footer-link {
  display: block;
  color: #1f2f45;
  text-decoration: none;
  margin-bottom: 6px;
}

.public-footer-link:hover {
  text-decoration: underline;
}

.public-footer-copy {
  width: min(1180px, 100%);
  margin: 14px auto 0;
  color: #64748b;
  font-size: 13px;
}

.public-footer button {
  justify-self: start;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.public-topbar button:focus-visible,
.public-topbar a:focus-visible,
.public-link-btn:focus-visible,
.public-footer a:focus-visible,
.public-footer button:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

.auth-card {
  width: min(680px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.landing-page #authCard {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background: #ffffff;
  border-radius: 16px;
  padding: 36px;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12), 0 1px 4px rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.landing-page #authCard .auth-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #475569;
  border-color: #dbe5f1;
}

.landing-page #authCard .auth-modal-close:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.auth-overlay-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 999;
}

.landing-page.auth-modal-open {
  overflow: hidden;
}

.help-panel {
  width: min(960px, 100%);
}

.help-page .auth-page {
  gap: 22px;
  padding-top: 28px;
}

.help-page .public-hero-help {
  gap: 10px;
  padding: 24px;
}

.help-page.help-topic-active .public-hero-help {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.help-hero-breadcrumb {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #5f738a;
}

.help-page .public-hero-help h1 {
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.help-page .public-hero-help .muted {
  max-width: 70ch;
  color: #55657a;
  font-weight: 500;
}

.help-page .help-card {
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 22px;
  gap: 12px;
}

.help-page .help-card h2,
.help-page .help-detail h2 {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.help-page .help-card > .muted {
  color: #5f738a;
  line-height: 1.55;
}

.help-page .doc-viewer-container {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 40px;
  margin-top: 32px;
}

.help-page .doc-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  padding-right: 20px;
  align-self: start;
  position: sticky;
  top: 88px;
}

.help-page .sidebar-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #5a6a85;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.help-page .sidebar-link-icon {
  flex: 0 0 18px;
  width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.help-page .sidebar-link-label {
  line-height: 1.3;
}

.help-page .sidebar-link:hover:not(.active) {
  background: #f8fafc;
  color: #1a202c;
}

.help-page .sidebar-link.active {
  background: rgba(0, 102, 255, 0.06);
  color: #0066ff;
  font-weight: 600;
}

.help-page .active-article-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.help-page .active-topic-header {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.help-page .active-topic-title {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  color: #0f172a;
}

.help-page .active-topic-subtitle {
  margin: 0;
  color: #5a6a85;
}

.help-page .active-article-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.help-page .article-row-link {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #1a202c;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow, color, border-color;
}

.help-page .article-row-link:hover {
  transform: translateX(4px);
  border-color: rgba(0, 102, 255, 0.2);
  color: #0066ff;
  box-shadow: 0 6px 16px rgba(0, 102, 255, 0.04), 0 2px 6px rgba(0, 0, 0, 0.03);
}

.help-page .article-row-link:focus-visible {
  outline: 3px solid rgba(0, 102, 255, 0.25);
  outline-offset: 2px;
}

.help-page .article-row-chevron {
  color: #a0aec0;
  font-size: 16px;
  transition: color 0.2s ease;
}

.help-page .article-row-link:hover .article-row-chevron {
  color: #0066ff;
}

.help-page .active-article-content {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.help-page .article-main-title {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
  color: #1a202c;
}

.help-page .article-intro {
  font-size: 15px;
  line-height: 1.6;
  color: #4a5568;
}

.help-page .article-step-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  counter-reset: step-counter;
}

.help-page .article-step-item {
  position: relative;
  padding-left: 36px;
  margin-bottom: 18px;
  font-size: 15px;
  line-height: 1.6;
  color: #4a5568;
}

.help-page .article-step-item::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  background: rgba(0, 102, 255, 0.08);
  color: #0066ff;
  font-weight: 600;
  font-size: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-page .article-step-lead {
  font-weight: 600;
  color: #2d3748;
}

.help-page .article-callout-note {
  background: #fffaf0;
  border-left: 4px solid #dd6b20;
  padding: 16px 20px;
  border-radius: 4px 8px 8px 4px;
  margin: 24px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #744210;
}

.help-page .article-callout-label {
  font-weight: 700;
}

.help-page .related-articles-section {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 32px;
  padding-top: 24px;
}

.help-page .related-articles-section .help-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.help-page .related-link-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0066ff;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.help-page .related-link-item:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.help-page .related-link-icon {
  font-size: 12px;
}

.help-page .help-search-field {
  margin-bottom: 40px;
}

.help-page .help-topic-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.help-page .help-topic-link {
  height: 100%;
}

.help-page .help-topic-card {
  background: #ffffff;
  border: 0;
  border-radius: 12px;
  padding: 28px 24px;
  min-height: 180px;
  height: 100%;
  display: grid;
  align-content: start;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.help-page .card-header {
  gap: 12px;
  min-height: 40px;
  margin-bottom: 2px;
}

.help-page .card-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 20px;
  flex-shrink: 0;
  background: var(--topic-accent-soft, rgba(11, 99, 196, 0.08));
  color: var(--topic-accent, #0b63c4);
}

.help-page .help-topic-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--topic-accent, #0b63c4);
  line-height: 1.25;
}

.help-page .card-description {
  font-size: 14px;
  line-height: 1.5;
  color: #5a6a85;
}

.help-page .help-topic-grid > .help-topic-link:nth-child(6n + 1) {
  --topic-accent: #0b63c4;
  --topic-accent-soft: rgba(11, 99, 196, 0.08);
}

.help-page .help-topic-grid > .help-topic-link:nth-child(6n + 2) {
  --topic-accent: #8b5cf6;
  --topic-accent-soft: rgba(139, 92, 246, 0.08);
}

.help-page .help-topic-grid > .help-topic-link:nth-child(6n + 3) {
  --topic-accent: #0891b2;
  --topic-accent-soft: rgba(8, 145, 178, 0.08);
}

.help-page .help-topic-grid > .help-topic-link:nth-child(6n + 4) {
  --topic-accent: #ea580c;
  --topic-accent-soft: rgba(234, 88, 12, 0.08);
}

.help-page .help-topic-grid > .help-topic-link:nth-child(6n + 5) {
  --topic-accent: #0f766e;
  --topic-accent-soft: rgba(15, 118, 110, 0.08);
}

.help-page .help-topic-grid > .help-topic-link:nth-child(6n + 6) {
  --topic-accent: #be185d;
  --topic-accent-soft: rgba(190, 24, 93, 0.08);
}

.help-page a.help-link-item,
.help-page a.help-back-link,
.help-page .help-card a {
  color: #0b63c4;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.help-page a.help-link-item.related-link-item {
  color: #0066ff;
}

.help-page .help-topic-link:hover .help-topic-card,
.help-page .help-topic-link:focus-visible .help-topic-card,
.help-page .help-topic-link:focus-within .help-topic-card {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.08), 0 4px 8px rgba(17, 24, 39, 0.05);
}

.help-page .help-topic-link:focus-visible {
  outline: none;
}

.help-page .help-topic-link:focus-visible .help-topic-card {
  outline: 3px solid rgba(11, 99, 196, 0.35);
  outline-offset: 2px;
  border-radius: 12px;
}

.help-page a.help-link-item:not(.related-link-item):hover,
.help-page a.help-back-link:hover,
.help-page .help-card a:hover {
  color: #084f9f;
}

.help-page a.help-link-item.related-link-item:hover {
  color: #0066ff;
}

.help-page a.help-link-item:focus-visible,
.help-page a.help-back-link:focus-visible,
.help-page .help-card a:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
  border-radius: 6px;
}

.help-page .help-link-list {
  gap: 12px;
}

.help-page .help-detail,
.help-page .help-results,
.help-page .help-result-group {
  gap: 14px;
}

.help-page .help-topic-card {
  height: 100%;
}

.auth-header {
  display: grid;
  gap: 6px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tab-btn {
  border: 0;
  background: var(--surface-muted);
  color: var(--text);
  padding: 10px 12px;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
}

.tab-panel {
  display: none;
}

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

.auth-form {
  display: grid;
  gap: 12px;
}

@media (max-width: 980px) {
  .landing-page .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .help-page .doc-viewer-container {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .help-page .doc-sidebar-nav {
    position: static;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-right: 0;
    padding-bottom: 12px;
  }

  .help-page .help-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-hero.public-hero-split {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .public-hero.public-hero-split h1 {
    max-width: 100%;
  }

  .public-footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 981px) and (max-width: 1240px) {
  .help-page .help-topic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .landing-page .feature-grid {
    grid-template-columns: 1fr;
  }

  .public-topbar-inner {
    min-height: 58px;
    position: relative;
  }

  .public-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .public-nav-cluster {
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 8px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    background: #0b62bc;
    border: 1px solid #0e4b8b;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(2, 30, 62, 0.24);
  }

  .public-nav-cluster.open {
    display: flex;
  }

  .public-nav,
  .public-topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .public-topbar-actions {
    gap: 10px;
  }

  .auth-page {
    padding-top: 20px;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  .public-footer-inner {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feature-card,
  .public-link-btn,
  .public-topbar button,
  .public-topbar a {
    transition: none !important;
  }
}

.menu-image-field {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.menu-image-dropzone {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  min-height: 180px;
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
}

.menu-image-dropzone.dragging {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.menu-image-preview {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 8px;
}

.menu-image-placeholder {
  color: var(--muted);
  font-size: 13px;
}

.menu-image-progress {
  width: 100%;
  height: 8px;
}

.menu-image-status {
  margin: 0;
}

.menu-image-status.error {
  color: var(--danger);
}

.waiter-order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.waiter-order-group {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.waiter-order-group-title {
  margin: 0;
}

.waiter-order-card {
  gap: 14px;
}

.waiter-order-card-ready {
  border-color: #f59e0b;
  background: #fffbeb;
}

.waiter-order-meta,
.waiter-order-items,
.waiter-order-modifiers {
  display: grid;
  gap: 8px;
}

.waiter-ready-indicator {
  color: #92400e;
  font-weight: 700;
}

.waiter-order-actions {
  justify-content: flex-start;
}

.waiter-order-item-card {
  gap: 10px;
}

.waiter-order-builder-modal {
  width: min(1180px, 96vw);
}

.waiter-order-builder,
.waiter-item-customization {
  display: grid;
  gap: 16px;
}

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

.waiter-order-builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: start;
}

.waiter-menu-pane {
  display: grid;
  gap: 14px;
}

.waiter-category-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.waiter-category-chip {
  white-space: nowrap;
  border-color: var(--border);
}

.waiter-category-chip.active {
  background: #dbeafe;
  border-color: #93c5fd;
  color: var(--primary-dark);
}

.waiter-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.waiter-menu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.18s, transform 0.12s;
}

.waiter-menu-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.waiter-menu-card-media {
  width: 100%;
  height: 80px;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  display: grid;
  place-items: center;
  font-size: 32px;
  flex-shrink: 0;
}

.waiter-menu-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  flex: 1;
}

.waiter-menu-card-info h3 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.waiter-menu-card-info p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.waiter-menu-card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

.waiter-menu-card-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.waiter-menu-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.waiter-menu-qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.waiter-menu-qty-controls button {
  min-width: 30px;
  min-height: 30px;
  border-radius: 999px;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
}

.waiter-menu-qty-controls span {
  min-width: 20px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
}

.waiter-menu-card-add-btn {
  flex: 1;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
  white-space: nowrap;
  text-align: center;
}

.waiter-menu-card-add-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.waiter-menu-card-add-btn:active {
  transform: translateY(0);
}

.waiter-menu-card-customize-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.waiter-menu-card-customize-link:hover {
  color: var(--primary);
}


@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .public-topbar-inner {
    min-height: auto;
    padding: 10px 14px;
    flex-wrap: wrap;
  }

  .public-nav {
    margin-left: 0;
    order: 3;
    width: 100%;
  }

  .public-topbar-actions {
    margin-left: auto;
    flex-wrap: wrap;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "header"
      "sidebar"
      "main";
  }

  .app-header {
    height: auto;
    min-height: 80px;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
  }

  #brandTitle {
    font-size: 22px;
  }

  .app-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
  }

  .app-sidebar nav {
    flex-direction: row;
  }

  .nav-btn {
    min-width: 120px;
  }

  .app-main {
    padding: 16px;
  }

  .header-right {
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    width: 100%;
  }

  .inline-field,
  .inline-field select {
    min-width: 180px;
  }

  .user-meta {
    align-items: flex-start;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-header .actions {
    flex-wrap: wrap;
  }

  .panel {
    padding: 14px;
  }

  .analytics-toolbar-controls,
  .analytics-nav-controls {
    width: 100%;
    justify-items: stretch;
  }

  .analytics-nav-controls {
    grid-auto-flow: row;
  }

  .analytics-current-label {
    min-width: 0;
  }

  label {
    width: 100%;
    min-width: 100%;
  }

  input,
  select,
  textarea {
    width: 100%;
  }

  table {
    min-width: 560px;
  }

  .kitchen-header,
  .kitchen-header-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .kitchen-board {
    grid-template-columns: 1fr;
  }

  .waiter-order-builder-toolbar,
  .waiter-order-builder-layout {
    grid-template-columns: 1fr;
  }

  .waiter-menu-card {
    grid-template-columns: 1fr;
  }

  .waiter-discovery-card {
    grid-template-columns: 1fr;
  }

  .waiter-discovery-media {
    min-height: 96px;
  }

  .waiter-menu-card-media {
    width: 100%;
    height: 120px;
  }
}

@media (max-width: 640px) {
  .public-topbar-inner {
    padding: 10px 12px;
  }

  .public-topbar-actions {
    width: 100%;
    margin-left: 0;
  }

  .public-topbar-actions button,
  .public-topbar-actions .button-link {
    flex: 1 1 140px;
    text-align: center;
  }

  .auth-page {
    align-content: start;
    padding: 12px;
  }

  .auth-card {
    padding: 14px;
  }

  .help-panel {
    width: 100%;
  }

  .help-page .help-topic-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .help-page .article-row-link {
    padding: 14px 16px;
  }

  .help-page .public-hero-help,
  .help-page .help-card {
    padding: 16px;
  }

  .help-page .public-hero-help h1 {
    font-size: clamp(28px, 9vw, 34px);
  }

  .app-header {
    padding: 12px;
  }

  #brandTitle {
    font-size: 20px;
  }

  #restaurantName {
    font-size: 12px;
  }

  .header-right {
    justify-content: flex-start;
    gap: 8px;
  }

  .inline-field,
  .inline-field select {
    min-width: 100%;
    width: 100%;
  }

  .app-sidebar {
    padding: 10px 8px;
  }

  .app-sidebar nav {
    gap: 6px;
  }

  .nav-btn {
    min-width: 96px;
    padding: 10px;
    font-size: 13px;
  }

  .app-main {
    padding: 12px;
    gap: 12px;
  }

  .view-section > h2 {
    font-size: 24px;
  }

  .section-header .actions {
    width: 100%;
  }

  .section-header .actions > * {
    flex: 1 1 100%;
  }

  .analytics-period-tabs {
    grid-template-columns: 1fr;
  }

  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .analytics-chart-panel,
  .analytics-chart-wrap {
    min-height: 240px;
  }

  .waiter-menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .waiter-order-builder-modal {
    width: 100%;
  }

  .modal-backdrop,
  .modal-overlay {
    padding: 8px;
  }

  .modal,
  .modal-panel {
    width: 100%;
    max-height: 94vh;
  }

  .modal > .section-header,
  .modal > div:nth-child(2),
  .modal-footer,
  .modal-panel {
    padding: 12px;
  }

  .modal-actions,
  .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-actions button,
  .modal-footer button {
    width: 100%;
  }

  .toast-root {
    right: 10px;
    left: 10px;
    bottom: 10px;
  }

  .toast {
    min-width: 0;
    width: 100%;
  }
}
