:root {
  color-scheme: light;
  --leaf: oklch(47.73% 0.0364 137.9);
  --leaf-strong: oklch(41.23% 0.0363 139.1);
  --leaf-soft: oklch(91.6% 0.021 139);
  --sand: oklch(71.12% 0.0638 76.3);
  --ivory: oklch(96.5% 0.0114 84.6);
  --paper: oklch(93.07% 0.0194 80.1);
  --mist: oklch(91.14% 0.0109 158.8);
  --surface: oklch(98.4% 0.006 87);
  --ink: oklch(29.63% 0.0225 145);
  --muted: oklch(48% 0.016 145);
  --line: oklch(84% 0.012 145);
  --line-strong: oklch(68% 0.018 145);
  --danger: oklch(52.26% 0.1562 28);
  --danger-soft: oklch(94% 0.025 28);
  --warning: oklch(56.98% 0.1135 64);
  --warning-soft: oklch(94% 0.032 76);
  --success: oklch(50.41% 0.0829 161.2);
  --success-soft: oklch(93% 0.026 161);
  --info: oklch(49.77% 0.0657 227.8);
  --info-soft: oklch(93% 0.022 228);
  --shadow-low: 0 1px 2px oklch(29.63% 0.0225 145 / 0.08), 0 8px 24px oklch(29.63% 0.0225 145 / 0.05);
  --shadow-drawer: 12px 0 36px oklch(29.63% 0.0225 145 / 0.18);
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --radius: 0.25rem;
  --sidebar-width: 17rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }

html { min-width: 20rem; background: var(--ivory); scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--ivory);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled, select:disabled, input:disabled { cursor: not-allowed; opacity: 0.58; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--info);
  outline-offset: 2px;
}

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

.skip-link {
  position: fixed;
  z-index: 200;
  top: var(--space-md);
  left: var(--space-md);
  padding: 0.75rem 1rem;
  color: var(--ivory);
  background: var(--leaf-strong);
  transform: translateY(-180%);
  transition: transform 160ms var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0.5rem; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.018em; }
h2 { margin-bottom: 0; font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.012em; }
h3 { font-size: 1rem; line-height: 1.35; }
p { max-width: 72ch; }

.eyebrow, .nav-label {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.brand-seal {
  display: grid;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}
.brand-seal-small { width: 2rem; height: 2rem; font-size: 0.625rem; }
.brand-logo {
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}
.brand-logo-auth { width: 4rem; height: 4rem; }
.brand-logo-mobile { width: 2rem; height: 2rem; }

.button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.68rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 680;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out), color 140ms var(--ease-out), transform 100ms var(--ease-out);
}
.button:active:not(:disabled) { transform: translateY(1px); }
.button-primary { color: var(--ivory); background: var(--leaf); border-color: var(--leaf); }
.button-primary:hover:not(:disabled) { background: var(--leaf-strong); border-color: var(--leaf-strong); }
.button-secondary { color: var(--ink); background: var(--surface); border-color: var(--line-strong); }
.button-secondary:hover:not(:disabled) { background: var(--mist); border-color: var(--ink); }
.button-danger { color: var(--danger); background: var(--surface); border-color: color-mix(in oklch, var(--danger), var(--surface) 35%); }
.button-danger:hover:not(:disabled) { color: var(--surface); background: var(--danger); border-color: var(--danger); }
.button-compact { min-height: 2.25rem; padding: 0.45rem 0.75rem; font-size: 0.875rem; }
.button-full { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }

.text-action {
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  color: var(--leaf-strong);
  background: transparent;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.text-action:hover { color: var(--ink); }
.text-action-light { min-height: 2.25rem; color: var(--paper); text-align: left; }
.text-action-light:hover { color: var(--ivory); }

label { display: grid; gap: 0.4rem; color: var(--ink); font-size: 0.875rem; font-weight: 650; }
input, select, textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.58rem 0.72rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
}
input:hover, select:hover, textarea:hover { border-color: var(--ink); }
input[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-soft); }

.notice {
  width: 100%;
  max-width: none;
  margin: 0 0 var(--space-lg);
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.875rem;
}
.notice-info { color: color-mix(in oklch, var(--info), var(--ink) 30%); background: var(--info-soft); border-color: color-mix(in oklch, var(--info), var(--surface) 70%); }
.notice-warning { color: color-mix(in oklch, var(--warning), var(--ink) 35%); background: var(--warning-soft); border-color: color-mix(in oklch, var(--warning), var(--surface) 67%); }
.notice-danger { color: color-mix(in oklch, var(--danger), var(--ink) 25%); background: var(--danger-soft); border-color: color-mix(in oklch, var(--danger), var(--surface) 67%); }
.notice-success { color: color-mix(in oklch, var(--success), var(--ink) 30%); background: var(--success-soft); border-color: color-mix(in oklch, var(--success), var(--surface) 67%); }
.document-conflict .conflict-reload { margin: 0.6rem 0 0 0.5rem; }

/* Authentication */
.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 4rem);
  background: var(--paper);
}
.auth-panel {
  width: min(100%, 37rem);
  min-height: 32rem;
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
  box-shadow: var(--shadow-low);
}
.auth-brand { display: flex; align-items: center; gap: var(--space-sm); }
.auth-brand strong, .sidebar-brand strong { display: block; line-height: 1.2; }
.auth-brand small, .sidebar-brand small { display: block; margin-top: 0.15rem; color: var(--muted); font-size: 0.75rem; }
.auth-language { align-self: flex-end; width: 8rem; margin-top: -2.75rem; }
.auth-language label { font-size: 0.75rem; }
.auth-language select { min-height: 2.25rem; }
.auth-state { display: flex; flex: 1; flex-direction: column; justify-content: center; align-items: flex-start; padding: 3.5rem 0 2rem; }
.auth-state h1 { max-width: 18ch; font-size: clamp(1.75rem, 5vw, 2.5rem); line-height: 1.08; }
.auth-description { max-width: 52ch; color: var(--muted); }
.auth-footer { display: flex; flex-wrap: wrap; gap: 0.45rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.75rem; }
.preview-explanation { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.8125rem; }
.status-orbit {
  width: 2rem;
  height: 2rem;
  margin-bottom: 1rem;
  border: 3px solid var(--mist);
  border-top-color: var(--leaf);
  border-radius: 50%;
  animation: rotate 800ms linear infinite;
}
@keyframes rotate { to { transform: rotate(360deg); } }

/* Shell */
.dashboard { min-height: 100vh; background: var(--ivory); }
.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  color: var(--paper);
  background: var(--ink);
}
.sidebar-brand { display: flex; align-items: center; gap: var(--space-sm); min-height: 5.25rem; padding: 1rem 1.25rem; border-bottom: 1px solid oklch(62% 0.015 145 / 0.35); }
.sidebar-brand small { color: oklch(81% 0.013 145); }
.primary-nav { min-height: 0; flex: 1; padding: 1.25rem 0.75rem; overflow-y: auto; }
.nav-label { margin: 1.25rem 0.75rem 0.4rem; color: oklch(72% 0.015 145); }
.nav-label:first-child { margin-top: 0; }
.nav-item {
  position: relative;
  width: 100%;
  min-height: 2.75rem;
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: oklch(86% 0.011 145);
  background: transparent;
  font-size: 0.875rem;
  text-align: left;
  transition: color 140ms var(--ease-out), background-color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}
.nav-item:hover { color: var(--ivory); background: oklch(36% 0.022 145); }
.nav-item.is-current { color: var(--ivory); background: var(--leaf); border-color: oklch(68% 0.026 139); }
.nav-index { color: oklch(74% 0.018 145); font-size: 0.625rem; font-variant-numeric: tabular-nums; }
.nav-item.is-current .nav-index { color: var(--paper); }
.nav-status { color: oklch(82% 0.023 139); font-size: 0.625rem; font-weight: 700; text-transform: uppercase; }
.nav-alert { display: grid; width: 1.25rem; height: 1.25rem; place-items: center; border-radius: 50%; color: var(--ink); background: var(--sand); font-size: 0.6875rem; font-weight: 800; }
.sidebar-footer { flex: 0 0 auto; display: grid; gap: 0.75rem; padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid oklch(62% 0.015 145 / 0.35); }
.session-identity { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.7rem; align-items: center; }
.session-identity strong, .session-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-identity strong { font-size: 0.875rem; }
.session-identity small { color: oklch(76% 0.013 145); font-size: 0.75rem; }
.avatar { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; color: var(--ink); background: var(--sand); font-size: 0.6875rem; font-weight: 800; }
.sidebar-return {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.75rem;
  border: 1px solid oklch(72% 0.015 145 / 0.55);
  border-radius: var(--radius);
  color: var(--ivory);
  font-size: 0.8125rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.sidebar-return:hover { border-color: var(--ivory); background: oklch(36% 0.022 145); }
.mobile-header { display: none; }
.nav-scrim { display: none; }

.dashboard-main { min-height: 100vh; margin-left: var(--sidebar-width); }
.environment-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.7rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid color-mix(in oklch, var(--info), var(--surface) 65%);
  color: color-mix(in oklch, var(--info), var(--ink) 35%);
  background: var(--info-soft);
  font-size: 0.8125rem;
}
.environment-banner-warning { color: color-mix(in oklch, var(--warning), var(--ink) 35%); background: var(--warning-soft); border-color: color-mix(in oklch, var(--warning), var(--surface) 65%); }
.page-topbar { min-height: 3.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem clamp(1rem, 3vw, 2.5rem); border-bottom: 1px solid var(--line); background: var(--surface); }
.breadcrumb { display: flex; gap: 0.5rem; align-items: center; color: var(--muted); font-size: 0.8125rem; }
.breadcrumb strong { color: var(--ink); }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; }
.system-state { display: inline-flex; gap: 0.45rem; align-items: center; color: var(--muted); font-size: 0.75rem; font-weight: 650; }
.refresh-state { color: var(--muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.refresh-state.is-stale { color: color-mix(in oklch, var(--warning), var(--ink) 35%); font-weight: 700; }
.connection-dot { width: 0.6rem; height: 0.6rem; display: inline-block; border: 1px solid var(--muted); border-radius: 50%; background: var(--paper); }
.system-state.is-online .connection-dot, .connection-dot.is-online { border-color: var(--success); background: var(--success); }
.system-state.is-offline .connection-dot, .connection-dot.is-offline { border-color: var(--warning); background: var(--warning); }
.compact-select select { min-width: 4.2rem; min-height: 2.25rem; padding: 0.35rem 1.6rem 0.35rem 0.55rem; font-size: 0.75rem; font-weight: 700; }

.module { padding: clamp(1.5rem, 3.5vw, 3rem) clamp(1rem, 3vw, 2.5rem) 5rem; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.page-header > div:first-child { max-width: 58rem; }
.page-header p:last-child { margin: 0; color: var(--muted); }
.page-header-actions .document-actions { justify-content: flex-end; }
.title-with-state { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.title-with-state h1 { margin-bottom: 0; }

.document-state, .state-badge, .count-badge {
  display: inline-flex;
  min-height: 1.6rem;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 750;
  line-height: 1.2;
}
.document-state-published, .state-success { color: var(--success); background: var(--success-soft); border-color: color-mix(in oklch, var(--success), var(--surface) 72%); }
.document-state-draft, .state-warning { color: color-mix(in oklch, var(--warning), var(--ink) 22%); background: var(--warning-soft); border-color: color-mix(in oklch, var(--warning), var(--surface) 68%); }
.state-danger { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in oklch, var(--danger), var(--surface) 72%); }
.state-info { color: var(--info); background: var(--info-soft); border-color: color-mix(in oklch, var(--info), var(--surface) 72%); }
.state-neutral { color: var(--muted); background: var(--paper); }
.count-badge { min-width: 1.75rem; color: var(--ink); background: var(--paper); font-variant-numeric: tabular-nums; }

/* Overview */
.overview-section { margin-bottom: 2.5rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.exception-list { border-top: 1px solid var(--line); }
.exception-row { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; min-height: 4.75rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.exception-symbol { display: grid; width: 2rem; height: 2rem; place-items: center; border: 1px solid currentColor; border-radius: 50%; color: var(--warning); font-weight: 800; }
.exception-copy strong, .exception-copy span { display: block; }
.exception-copy span { margin-top: 0.15rem; color: var(--muted); font-size: 0.875rem; }
.overview-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 4rem); }
.status-list { margin: 0; border-top: 1px solid var(--line); }
.status-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.status-list dt { color: var(--muted); }
.status-list dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0 0 2.5rem; border: 1px solid var(--line); background: var(--line); }
.metric-card { min-height: 8rem; display: grid; align-content: space-between; gap: 1rem; padding: 1rem; background: var(--surface); }
.metric-card span { color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.035em; text-transform: uppercase; }
.metric-card strong { font-family: var(--font-display); font-size: clamp(1.35rem, 2.5vw, 2rem); font-variant-numeric: tabular-nums; line-height: 1; }
.metric-card small { color: var(--muted); font-size: 0.75rem; }

.marketing-control-panel { margin-bottom: 1.5rem; padding: 1rem; border: 1px solid var(--line-strong); background: var(--paper); }
.marketing-control-heading { align-items: flex-start; }
.marketing-control-heading h2 { margin-bottom: 0.2rem; }
.marketing-control-heading .field-help { max-width: 68ch; margin: 0; }
.marketing-control-panel .empty-state { min-height: 7rem; padding: 1rem; }
.marketing-selection-form { display: grid; grid-template-columns: repeat(3, minmax(12rem, 1fr)); gap: 1rem; align-items: end; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.marketing-selection-form .button-row { grid-column: 1 / -1; }

/* Data and filters */
.filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; margin-bottom: 1.25rem; padding: 1rem; border: 1px solid var(--line); background: var(--paper); }
.filter-bar label { min-width: 12rem; }
.filter-bar .search-field { flex: 1 1 18rem; }
.data-frame, .data-section { border-top: 1px solid var(--line); }
.empty-state { display: grid; min-height: 15rem; place-items: center; padding: 2rem; text-align: center; }
.empty-state > div { max-width: 34rem; }
.empty-mark { width: 3.5rem; height: 3.5rem; margin: 0 auto 1rem; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--paper); }
.empty-state p { margin: 0.5rem auto 0; color: var(--muted); }
.table-scroll { width: 100%; overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th { padding: 0.75rem; color: var(--muted); background: var(--paper); font-size: 0.75rem; letter-spacing: 0.03em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 0.7rem 0.75rem; border-top: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:hover { background: color-mix(in oklch, var(--mist), var(--surface) 50%); }
.data-table input, .data-table select { min-height: 2.4rem; padding: 0.4rem 0.55rem; font-size: 0.875rem; }
.data-table .item-name-input { min-width: 13rem; }
.data-table .price-field { width: 8rem; }
.data-table .route-field { min-width: 8rem; }
.checkbox-cell { text-align: center; }
.checkbox-cell input { width: 1.15rem; min-height: 1.15rem; accent-color: var(--leaf); }
.field-note { display: block; margin-top: 0.25rem; color: var(--muted); font-size: 0.6875rem; line-height: 1.3; }
.field-note.is-error { color: var(--danger); }
.pagination-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 0; color: var(--muted); font-size: 0.8125rem; }

.menu-toolbar { align-items: end; }
.menu-editor-actions { margin-left: auto; }
.menu-validation-summary { margin-bottom: 1rem; }
.menu-validation-summary ul, .menu-dialog-errors ul { margin: 0.6rem 0 0; padding-left: 1.2rem; }
.menu-validation-summary li + li, .menu-dialog-errors li + li { margin-top: 0.25rem; }
.menu-product-identity { min-width: 13rem; }
.menu-product-identity strong, .menu-product-identity small { display: block; }
.menu-product-identity small { margin-top: 0.2rem; color: var(--muted); }
.menu-row-action { min-height: 2.5rem; }
.menu-table .state-badge { white-space: nowrap; }

.menu-editor-dialog { width: min(78rem, calc(100vw - 2rem)); }
.menu-editor-dialog .detail-dialog-header p:last-child { max-width: 68ch; margin: 0.35rem 0 0; color: var(--muted); font-size: 0.8125rem; }
.menu-product-dialog { width: min(84rem, calc(100vw - 2rem)); }
.menu-category-manager, .product-editor { display: grid; gap: 1.75rem; }
.catalog-create-form { display: grid; gap: 1rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line-strong); }
.catalog-form-grid { display: grid; grid-template-columns: repeat(3, minmax(10rem, 1fr)); gap: 1rem; align-items: end; }
.catalog-form-grid label, .localized-editor-row { min-width: 0; }
.catalog-form-grid small, .product-identity-grid small { display: block; margin-top: 0.25rem; color: var(--muted); font-size: 0.75rem; }
.catalog-category-groups { display: grid; gap: 2rem; }
.catalog-category-group { display: grid; gap: 0.75rem; }
.catalog-category-group > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 0.65rem; border-bottom: 1px solid var(--line-strong); }
.catalog-category-group > header h3 { margin: 0; }
.category-editor-row { display: grid; grid-template-columns: minmax(10rem, 1.25fr) minmax(8rem, 0.55fr) 6rem minmax(17rem, auto); gap: 0.75rem; align-items: end; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.category-name-fields { display: grid; grid-template-columns: repeat(2, minmax(8rem, 1fr)); gap: 0.5rem; }
.category-name-fields label span, .category-editor-row > label > span { display: block; margin-bottom: 0.25rem; color: var(--muted); font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; }
.category-editor-row .record-actions { align-self: center; }
.category-editor-row .button { min-height: 2.5rem; }
.category-assignment-note { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.75rem; }

.product-editor-section { padding-top: 0.25rem; }
.product-editor-section + .product-editor-section { padding-top: 1.5rem; border-top: 1px solid var(--line-strong); }
.product-editor-section > h3 { margin-bottom: 1rem; }
.menu-media-editor { display: grid; grid-template-columns: minmax(0, 1fr) 11rem; gap: 1rem; align-items: start; margin-bottom: 1rem; }
.menu-media-fields { display: grid; grid-template-columns: repeat(2, minmax(12rem, 1fr)); gap: 1rem; }
.menu-media-fields label > span { display: block; margin-bottom: 0.35rem; font-weight: 700; }
.menu-media-fields small { display: block; margin-top: 0.25rem; color: var(--muted); font-size: 0.75rem; }
.menu-media-preview-frame { display: grid; place-items: center; min-height: 7.75rem; overflow: hidden; border: 1px solid var(--line-strong); background: var(--paper); color: var(--muted); font-size: 0.75rem; text-align: center; }
.menu-media-preview-frame img { width: 100%; height: 7.75rem; object-fit: cover; }
.menu-media-status { grid-column: 1 / -1; margin: -0.35rem 0 0; }
.menu-media-status.is-error { color: var(--danger); }
.product-identity-grid { grid-template-columns: minmax(12rem, 1.2fr) minmax(12rem, 1.2fr) minmax(10rem, 0.8fr) minmax(8rem, 0.5fr); }
.localized-editor { margin-top: 1rem; border-top: 1px solid var(--line); }
.localized-editor-row { display: grid; grid-template-columns: 7rem minmax(12rem, 0.8fr) minmax(18rem, 1.4fr); gap: 0.75rem; align-items: center; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.localized-editor-row strong { font-size: 0.8125rem; }
.localized-editor-row textarea { resize: vertical; }
.localized-editor-head { color: var(--muted); font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; }
.preparation-editor .localized-editor-row { grid-template-columns: 7rem minmax(18rem, 1fr) 0; }
.catalog-switch-grid { display: grid; grid-template-columns: repeat(3, minmax(12rem, 1fr)); border-top: 1px solid var(--line); }
.catalog-switch-grid label { min-height: 4.5rem; display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); gap: 0.75rem; align-items: start; padding: 0.85rem; border-bottom: 1px solid var(--line); }
.catalog-switch-grid label:nth-child(3n + 1), .catalog-switch-grid label:nth-child(3n + 2) { border-right: 1px solid var(--line); }
.catalog-switch-grid input { width: 1.25rem; min-height: 1.25rem; margin-top: 0.1rem; accent-color: var(--leaf); }
.catalog-switch-grid strong, .catalog-switch-grid small { display: block; }
.catalog-switch-grid small { margin-top: 0.25rem; color: var(--muted); font-size: 0.75rem; line-height: 1.35; }
.compact-template-field select { min-height: 2.75rem; }
.repeater-stack { display: grid; gap: 1rem; }
.repeater-panel { border: 1px solid var(--line-strong); background: var(--surface); }
.repeater-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); background: var(--paper); }
.repeater-panel > header strong { overflow-wrap: anywhere; }
.repeater-body { display: grid; gap: 1rem; padding: 1rem; }
.repeater-controls { display: grid; grid-template-columns: repeat(5, minmax(8rem, 1fr)); gap: 0.75rem; align-items: end; }
.repeater-controls .checkbox-field { min-height: 2.75rem; display: flex; align-items: center; gap: 0.5rem; }
.repeater-controls input[type="checkbox"] { width: 1.2rem; min-height: 1.2rem; accent-color: var(--leaf); }
.repeater-locales { display: grid; grid-template-columns: repeat(4, minmax(8rem, 1fr)); gap: 0.75rem; }
.modifier-options { display: grid; gap: 0.5rem; }
.modifier-option-row { display: grid; grid-template-columns: minmax(8rem, 0.7fr) repeat(4, minmax(8rem, 1fr)) 8rem 5rem auto; gap: 0.5rem; align-items: end; padding-top: 0.65rem; border-top: 1px solid var(--line); }
.modifier-option-row .checkbox-field { min-height: 2.75rem; display: flex; align-items: center; gap: 0.45rem; }
.modifier-option-row .button { min-height: 2.5rem; }
.weekday-choices { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; border: 0; }
.weekday-choices legend { width: 100%; margin-bottom: 0.25rem; font-size: 0.75rem; font-weight: 700; }
.weekday-choices label { min-height: 2.5rem; display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.5rem; border: 1px solid var(--line); }
.weekday-choices input { width: 1.1rem; min-height: 1.1rem; accent-color: var(--leaf); }
.product-editor-footer { position: sticky; z-index: 2; bottom: -1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 -1.5rem -1.5rem; padding: 1rem 1.5rem calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-strong); background: var(--surface); }

.preview-pane { margin-top: 2rem; padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--shadow-low); }
.guest-menu-preview { columns: 2 22rem; column-gap: 3rem; }
.preview-category { break-inside: avoid; margin-bottom: 2rem; }
.preview-category h3 { margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--sand); }
.preview-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.preview-item span:last-child { font-variant-numeric: tabular-nums; font-weight: 700; }

/* Independent POS services catalog */
.services-category-section, .services-catalog-section { margin-top: 2rem; }
.services-category-list { display: grid; gap: 1px; border: 1px solid var(--line); background: var(--line); }
.service-category-row { display: grid; grid-template-columns: minmax(10rem, 0.45fr) minmax(0, 1.55fr) auto; gap: 1rem; align-items: center; padding: 1rem; background: var(--surface); }
.service-category-identity strong, .service-category-identity small { display: block; }
.service-category-identity small { margin-top: 0.2rem; color: var(--muted); }
.service-category-names { display: grid; grid-template-columns: repeat(4, minmax(8rem, 1fr)); gap: 0.65rem; }
.service-category-names label span { display: block; margin-bottom: 0.25rem; color: var(--muted); font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; }
.service-category-active { min-height: 2.75rem; display: flex; align-items: center; gap: 0.55rem; color: var(--muted); font-size: 0.8125rem; }
.service-category-active input, .service-switch-grid input { width: 1.2rem; min-height: 1.2rem; accent-color: var(--leaf); }
.services-table td:last-child, .services-table th:last-child { text-align: right; }
.services-table tr.is-disabled td { color: var(--muted); }
.service-sale-state { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.service-item-editor { margin-top: 2rem; padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--shadow-low); }
.service-item-editor .section-heading { align-items: flex-start; }
.service-localized-editor { margin-block: 1.25rem; }
.service-switch-grid { margin-top: 1rem; }
.service-editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line-strong); }
#service-saleability-help { min-height: 1.25rem; margin-top: 0.75rem; }

/* Floor editor */
.floor-plan-manager { margin-bottom: 1rem; padding: 1rem; border: 1px solid var(--line); background: var(--surface); }
.floor-plan-manager-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.floor-plan-manager-heading .eyebrow { margin-bottom: 0.25rem; }
.floor-plan-actions { justify-content: flex-end; }
.floor-plan-tabs { display: flex; max-width: 100%; gap: 0.35rem; margin-top: 1rem; overflow-x: auto; padding: 0 0 0.5rem; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.floor-plan-tab {
  min-width: 10rem;
  min-height: 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface);
  text-align: left;
}
.floor-plan-tab:hover { color: var(--ink); background: var(--mist); border-color: var(--ink); }
.floor-plan-tab[aria-selected="true"] { color: var(--surface); background: var(--leaf); border-color: var(--leaf); }
.floor-plan-tab-name { min-width: 0; overflow: hidden; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.floor-plan-tab-badge { font-size: 0.625rem; font-weight: 750; letter-spacing: 0.025em; text-transform: uppercase; }
.floor-plan-settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.3fr); gap: 1rem; align-items: end; padding-top: 1rem; }
.floor-plan-name-grid { display: grid; grid-template-columns: repeat(4, minmax(9rem, 1fr)); gap: 0.75rem; }
.floor-plan-visibility { min-width: 12rem; }
.floor-plan-empty { min-height: 8rem; display: grid; place-content: center; justify-items: center; padding: 1rem; text-align: center; }
.floor-plan-empty p { margin: 0.35rem 0 0; color: var(--muted); }
.floor-plan-delete-hint { min-height: 1.25rem; margin: 0.65rem 0 0; color: var(--muted); font-size: 0.75rem; }
.floor-workspace { min-height: 37rem; display: grid; grid-template-columns: 11.5rem minmax(28rem, 1fr) 15rem; border: 1px solid var(--line); background: var(--surface); }
.floor-tools, .properties-panel { padding: 1rem; background: var(--paper); }
.floor-tools { border-right: 1px solid var(--line); }
.properties-panel { border-left: 1px solid var(--line); }
.floor-tools h2, .properties-panel h2 { margin-bottom: 1rem; font-size: 1rem; }
.tool-button { width: 100%; min-height: 4.5rem; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.5rem; align-items: center; padding: 0.7rem; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); background: var(--surface); text-align: left; }
.tool-button:hover { border-color: var(--leaf); background: var(--leaf-soft); }
.tool-button > span:first-child { font-size: 1.5rem; }
.tool-button strong, .tool-button small { display: block; }
.tool-button small { margin-top: 0.15rem; color: var(--muted); font-size: 0.6875rem; line-height: 1.3; }
.tool-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: 0.75rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 0.8125rem; }
.tool-summary strong { font-variant-numeric: tabular-nums; }
.tool-help { margin: 1rem 0 0; color: var(--muted); font-size: 0.75rem; }
.floor-canvas-panel { min-width: 0; display: flex; flex-direction: column; padding: 1rem; background: var(--mist); }
.canvas-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.canvas-heading h2 { font-size: 1rem; }
.canvas-heading span { color: var(--muted); font-size: 0.75rem; }
.floor-canvas {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 32rem;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background-color: var(--surface);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 2.5% 3.846%;
  touch-action: none;
}
.floor-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; padding: 2rem; text-align: center; }
.floor-empty p { max-width: 33rem; margin: 0.5rem auto 1rem; color: var(--muted); }
.empty-plan-mark { width: 4.5rem; height: 3rem; margin-bottom: 1rem; border: 1px solid var(--line-strong); border-radius: 1.5rem; box-shadow: inset 0 0 0 0.5rem var(--paper); }
.floor-table {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.35rem;
  border: 1px solid var(--leaf-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--leaf-soft);
  box-shadow: 0 1px 2px oklch(29.63% 0.0225 145 / 0.12);
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  touch-action: none;
  user-select: none;
  transition: box-shadow 120ms var(--ease-out), background-color 120ms var(--ease-out);
}
.floor-table[data-shape="round"] { border-radius: 999px; }
.floor-table[data-shape="square"] { aspect-ratio: 1; }
.floor-table[data-kind="bar"] { border-style: dashed; color: var(--surface); background: var(--leaf); }
.floor-table:hover { background: var(--mist); }
.floor-table[data-kind="bar"]:hover { color: var(--ink); background: var(--sand); }
.floor-table.is-selected { box-shadow: 0 0 0 3px var(--info), 0 0 0 5px var(--surface); }
.floor-table.is-dragging { cursor: grabbing; box-shadow: 0 10px 24px oklch(29.63% 0.0225 145 / 0.18); transition: none; }
.floor-table span { pointer-events: none; }
.floor-table small { display: block; margin-top: 0.1rem; font-size: 0.625rem; font-weight: 600; }
.properties-empty { display: grid; min-height: 8rem; place-items: center; color: var(--muted); font-size: 0.8125rem; text-align: center; }
.properties-panel form { display: grid; gap: 0.9rem; }
.table-visibility-controls { display: grid; gap: 0.45rem; margin: 0; padding: 0.75rem 0 0; border: 0; border-top: 1px solid var(--line); }
.table-visibility-controls legend { padding-right: 0.5rem; font-size: 0.875rem; font-weight: 700; }
.table-visibility-controls label { min-height: 2.5rem; display: flex; align-items: center; gap: 0.55rem; font-size: 0.75rem; }
.table-visibility-controls input { width: 1.15rem; min-height: 1.15rem; accent-color: var(--leaf); }
.table-visibility-controls .field-help { margin-top: 0.2rem; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.nudge-controls { margin: 0; padding: 0; border: 0; }
.nudge-controls legend { margin-bottom: 0.45rem; font-size: 0.875rem; font-weight: 650; }
.nudge-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.35rem; }
.nudge-grid button { min-height: 2.75rem; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); background: var(--surface); font-weight: 800; }
.nudge-grid button:hover { background: var(--mist); border-color: var(--ink); }

/* Services, staff, settings */
.settings-tabs { display: flex; max-width: 100%; gap: 0.25rem; margin: 0 0 1.25rem; overflow-x: auto; padding-bottom: 0.35rem; border-bottom: 1px solid var(--line); }
.settings-tabs button { min-width: max-content; min-height: 2.75rem; padding: 0.55rem 0.9rem; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-weight: 700; }
.settings-tabs button:hover { color: var(--ink); background: var(--paper); }
.settings-tabs button.is-current { border-bottom-color: var(--leaf); color: var(--ink); }
.staff-form { display: grid; gap: 1rem; margin-bottom: 2rem; padding: 1rem; border: 1px solid var(--line); background: var(--paper); }
.staff-form-grid { display: grid; grid-template-columns: repeat(3, minmax(10rem, 1fr)); gap: 1rem; align-items: end; }
.expense-form { margin-top: 1rem; }
.expense-form-grid { align-items: start; }
.form-field-wide { grid-column: 1 / -1; }
.form-field-wide textarea { width: 100%; resize: vertical; }
.expense-filter-bar { margin: 1rem 0 0.25rem; }
.expense-filter-bar label { max-width: 15rem; }
.expense-intake-heading { align-items: flex-start; }
.expense-intake-heading .field-help { max-width: 48rem; margin-top: 0.35rem; }
.expense-intake-row { grid-template-columns: minmax(13rem, 1.3fr) minmax(11rem, 1fr) minmax(8rem, 0.65fr) minmax(14rem, auto); }
.expense-intake-identity, .expense-intake-extraction { min-width: 0; }
.expense-intake-identity strong, .expense-intake-identity small, .expense-intake-extraction span, .expense-intake-extraction small { overflow-wrap: anywhere; }
.expense-intake-error-summary { color: var(--danger) !important; }
.expense-intake-loading { border-top: 1px solid var(--line); }
.expense-intake-skeleton-list { display: grid; }
.expense-intake-skeleton-row { min-height: 4.8rem; display: grid; grid-template-columns: 1.3fr 1fr 0.55fr; gap: 1rem; align-items: center; border-bottom: 1px solid var(--line); }
.expense-intake-skeleton-line { min-height: 0.8rem; border-radius: var(--radius); background: var(--mist); }
.expense-intake-skeleton-line.is-wide { width: 80%; }
.expense-intake-skeleton-line.is-short { width: 55%; }
.expense-intake-dialog .detail-dialog-body { display: block; }
.expense-intake-dialog .detail-actions { margin-top: 1rem; }
.expense-intake-form { margin: 1rem 0 0; }
.suggestion-list { margin: 1rem 0 0; border-top: 1px solid var(--line); }
.suggestion-row { display: grid; grid-template-columns: minmax(8rem, 0.7fr) minmax(10rem, 1.3fr) minmax(9rem, 0.6fr); gap: 1rem; align-items: baseline; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.suggestion-row dt { color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.025em; text-transform: uppercase; }
.suggestion-row dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-weight: 650; }
.suggestion-row .suggestion-confidence { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.staff-form .checkbox-field { min-height: 2.75rem; display: flex; align-items: center; gap: 0.65rem; padding: 0.5rem 0; }
.staff-form input[type="checkbox"], .permission-grid input { width: 1.25rem; min-height: 1.25rem; accent-color: var(--leaf); }
.field-help { margin: 0; color: var(--muted); font-size: 0.75rem; }
.permission-grid { display: grid; grid-template-columns: repeat(4, minmax(10rem, 1fr)); gap: 0.75rem 1rem; margin: 0; padding: 1rem 0 0; border: 0; border-top: 1px solid var(--line); }
.permission-grid legend { padding: 0 0.5rem 0 0; font-size: 0.875rem; font-weight: 750; }
.permission-grid label { min-height: 2.75rem; display: flex; align-items: center; gap: 0.55rem; color: var(--muted); font-size: 0.8125rem; }
.record-list { border-top: 1px solid var(--line); }
.record-row { display: grid; grid-template-columns: minmax(12rem, 1.2fr) minmax(8rem, 0.8fr) minmax(8rem, 0.8fr) auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.record-row strong, .record-row small { display: block; }
.record-row small { margin-top: 0.2rem; color: var(--muted); }
.record-value { color: var(--muted); font-variant-numeric: tabular-nums; }
.record-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem; }
.record-details { grid-column: 1 / -1; padding: 0.5rem 0; }
.record-details summary { cursor: pointer; color: var(--leaf); font-weight: 700; }
.record-details .definition-grid { margin-top: 1rem; }
.financial-activity-heading { align-items: flex-start; }
.financial-activity-heading .field-help { max-width: 50rem; margin-top: 0.35rem; }
.financial-activity-toolbar label { min-width: 9rem; }
.financial-activity-actions { margin-left: auto; }
.financial-activity-source { margin-bottom: 0.75rem; }
.financial-activity-row { grid-template-columns: minmax(15rem, 1.25fr) minmax(12rem, 0.9fr) minmax(10rem, 0.75fr) auto; }
.financial-activity-identity, .financial-activity-values, .financial-activity-actor { min-width: 0; }
.financial-activity-identity strong, .financial-activity-identity small, .financial-activity-actor span, .financial-activity-actor small { overflow-wrap: anywhere; }
.financial-activity-values { display: grid; gap: 0.35rem; }
.financial-activity-value { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.65rem; align-items: baseline; }
.financial-activity-value small { margin: 0; }
.financial-activity-value.is-primary strong { font-variant-numeric: tabular-nums; }
.financial-activity-kind { white-space: nowrap; }
.financial-activity-details { padding-top: 0; }
.financial-activity-definition-grid dd { overflow-wrap: anywhere; }
.financial-activity-loading { border-top: 1px solid var(--line); }
.financial-activity-loading > .field-help { padding: 0.75rem 0; }
.audit-toolbar label:first-child { flex: 1 1 18rem; }
.audit-toolbar label { min-width: 9rem; }
.audit-filter-actions { margin-left: auto; }
.audit-details { padding-top: 0; }
.audit-definition-grid dd { overflow-wrap: anywhere; }
.update-control-list { display: grid; gap: 0.75rem; }
.update-control-card { display: grid; gap: 0.65rem; padding: 0.9rem; border: 1px solid var(--line); background: var(--paper); }
.update-control-card strong, .update-control-card small { display: block; }
.update-control-card small { margin-top: 0.2rem; color: var(--muted); overflow-wrap: anywhere; }
.update-control-card .record-actions { justify-content: flex-start; }
.compact-operational-form { margin-top: 0.75rem; margin-bottom: 1rem; }
.split-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 4rem); }
.data-section .empty-state { min-height: 18rem; }

/* Operational detail layers */
.reservation-link {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  color: var(--leaf-strong);
  background: transparent;
  font-weight: 750;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
.reservation-link:hover { color: var(--ink); }

.overview-floor-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.overview-floor-tab {
  min-height: 2.75rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface);
  font-weight: 700;
}
.overview-floor-tab[aria-selected="true"] { color: var(--surface); background: var(--leaf); border-color: var(--leaf); }
.overview-floor-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0 0 0.75rem; color: var(--muted); font-size: 0.75rem; }
.overview-floor-key { display: inline-flex; align-items: center; gap: 0.4rem; }
.overview-floor-key::before { width: 0.75rem; height: 0.75rem; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--paper); content: ""; }
.overview-floor-key.is-open::before { border-color: var(--leaf-strong); background: var(--leaf-soft); }
.overview-floor-canvas {
  position: relative;
  width: 100%;
  min-height: 21rem;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  aspect-ratio: 1000 / 650;
}
.overview-floor-table {
  position: absolute;
  min-width: 2.5rem;
  min-height: 2.5rem;
  display: grid;
  place-items: center;
  padding: 0.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--paper);
  font-size: clamp(0.625rem, 1vw, 0.75rem);
  font-weight: 750;
  line-height: 1.1;
  text-align: center;
  transform-origin: center;
}
button.overview-floor-table { color: var(--ink); background: var(--leaf-soft); border-color: var(--leaf-strong); box-shadow: var(--shadow-low); }
button.overview-floor-table:hover { background: var(--mist); border-color: var(--ink); }
.overview-floor-table[data-shape="round"] { border-radius: 999px; }
.overview-floor-table small { display: block; margin-top: 0.1rem; font-size: 0.55rem; font-weight: 650; }

.detail-dialog {
  width: min(52rem, calc(100vw - 2rem));
  max-height: min(52rem, calc(100vh - 2rem));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 18px 54px oklch(29.63% 0.0225 145 / 0.24);
}
.detail-dialog::backdrop { background: oklch(29.63% 0.0225 145 / 0.48); }
.detail-dialog-shell { max-height: min(52rem, calc(100vh - 2rem)); display: flex; flex-direction: column; }
.detail-dialog-header { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line); background: var(--paper); }
.detail-dialog-header .eyebrow { margin-bottom: 0.25rem; }
.icon-close { flex: 0 0 auto; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); background: var(--surface); font-size: 1.5rem; line-height: 1; }
.icon-close:hover { background: var(--mist); border-color: var(--ink); }
.detail-dialog-body { min-height: 10rem; padding: 1.5rem; overflow-y: auto; }
.detail-section + .detail-section { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.detail-section h3 { margin-bottom: 0.75rem; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
.detail-grid > div { min-width: 0; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.detail-grid > div:nth-child(odd) { padding-right: 1rem; }
.detail-grid > div:nth-child(even) { padding-left: 1rem; border-left: 1px solid var(--line); }
.detail-grid dt { color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.025em; text-transform: uppercase; }
.detail-grid dd { margin: 0.2rem 0 0; overflow-wrap: anywhere; font-weight: 650; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.detail-action-panel { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line-strong); background: var(--paper); }
.detail-action-panel form { display: grid; gap: 1rem; }
.detail-action-panel h3 { margin: 0; }
.table-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; padding: 0; border: 0; }
.table-choice-grid legend { margin-bottom: 0.5rem; font-size: 0.875rem; font-weight: 750; }
.table-choice-grid label { min-height: 2.75rem; display: flex; align-items: center; gap: 0.55rem; padding: 0.5rem 0.65rem; border: 1px solid var(--line); background: var(--surface); }
.table-choice-grid input { width: 1.2rem; min-height: 1.2rem; accent-color: var(--leaf); }
.permission-note { margin: 0; color: var(--muted); font-size: 0.8125rem; }
.line-items-table td:first-child { width: 5rem; font-variant-numeric: tabular-nums; }
.line-items-table td:nth-child(n + 3), .line-items-table th:nth-child(n + 3) { text-align: right; font-variant-numeric: tabular-nums; }
.detail-summary { margin-top: 1rem; margin-left: auto; width: min(100%, 23rem); }
.detail-summary > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.detail-summary dt { color: var(--muted); }
.detail-summary dd { margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; }
.settings-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.settings-section { padding-top: 1rem; border-top: 1px solid var(--line-strong); }
.settings-section-wide { grid-column: 1 / -1; }
.settings-section h2 { margin-bottom: 1rem; }
.settings-editor { display: block; }
.settings-field-stack { display: grid; gap: 0.75rem; }
.settings-field-stack .field-help { margin-top: -0.35rem; }
.printer-route-grid { display: grid; grid-template-columns: repeat(3, minmax(12rem, 1fr)); gap: 1rem; }
.printer-route-grid label { min-width: 0; }
.deferred-control-grid { display: grid; grid-template-columns: repeat(3, minmax(13rem, 1fr)); gap: 1rem; }
.deferred-control-grid fieldset { min-width: 0; margin: 0; padding: 1rem; border: 1px solid var(--line); background: var(--paper); }
.deferred-control-grid fieldset:disabled { opacity: 1; }
.deferred-control-grid legend { padding: 0 0.35rem; font-weight: 750; }
.deferred-control-grid label { min-height: 2.75rem; display: flex; grid-template-columns: none; flex-direction: row; align-items: center; gap: 0.55rem; color: var(--muted); }
.deferred-control-grid input { width: 1.2rem; min-height: 1.2rem; flex: 0 0 auto; }
.deferred-control-grid p { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.8125rem; }
.definition-grid { display: grid; grid-template-columns: minmax(9rem, 0.8fr) minmax(10rem, 1.2fr); margin: 0; }
.definition-grid dt, .definition-grid dd { margin: 0; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.definition-grid dt { color: var(--muted); }
.definition-grid dd { font-weight: 650; overflow-wrap: anywhere; }
.input-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.input-check { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: 0.75rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.input-check:nth-child(odd) { border-right: 1px solid var(--line); }
.input-check-symbol { display: grid; width: 1.5rem; height: 1.5rem; place-items: center; border: 1px solid var(--warning); border-radius: 50%; color: var(--warning); font-size: 0.75rem; font-weight: 800; }
.input-check strong, .input-check small { display: block; }
.input-check small { margin-top: 0.2rem; color: var(--muted); }

/* Toast */
.toast-region { position: fixed; z-index: 120; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); width: min(24rem, calc(100vw - 2rem)); display: grid; gap: 0.6rem; pointer-events: none; }
.toast { padding: 0.85rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-low); font-size: 0.875rem; pointer-events: auto; animation: toast-in 180ms var(--ease-out); }
.toast.is-error { border-color: var(--danger); background: var(--danger-soft); }
.toast.is-success { border-color: var(--success); background: var(--success-soft); }
@keyframes toast-in { from { opacity: 0; transform: translateY(0.5rem); } }

@media (max-width: 1180px) {
  .service-category-row { grid-template-columns: 12rem minmax(0, 1fr); }
  .service-category-active { grid-column: 1 / -1; }
  .service-category-names { grid-template-columns: repeat(2, minmax(10rem, 1fr)); }
  .category-editor-row { grid-template-columns: minmax(18rem, 1fr) minmax(8rem, 0.45fr); }
  .category-editor-row .record-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .repeater-controls { grid-template-columns: repeat(3, minmax(8rem, 1fr)); }
  .repeater-locales { grid-template-columns: repeat(2, minmax(10rem, 1fr)); }
  .modifier-option-row { grid-template-columns: repeat(3, minmax(8rem, 1fr)); }
  .printer-route-grid { grid-template-columns: repeat(2, minmax(12rem, 1fr)); }
  .deferred-control-grid { grid-template-columns: 1fr; }
  .modifier-option-row > :nth-last-child(-n + 2) { align-self: end; }
  .floor-plan-settings { grid-template-columns: 1fr; }
  .floor-plan-name-grid { grid-template-columns: repeat(2, minmax(10rem, 1fr)); }
  .floor-workspace { grid-template-columns: 10rem minmax(25rem, 1fr); }
  .properties-panel { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0; }
  .properties-panel form { grid-template-columns: repeat(5, minmax(7rem, 1fr)); align-items: end; }
  .properties-panel .field-pair { display: contents; }
  .properties-panel .table-visibility-controls { grid-column: span 2; }
  .properties-panel .nudge-controls { grid-column: span 2; }
  .properties-panel .button-danger { align-self: end; }
}

@media (max-width: 920px) {
  .catalog-form-grid, .catalog-switch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-switch-grid label:nth-child(n) { border-right: 0; }
  .catalog-switch-grid label:nth-child(odd) { border-right: 1px solid var(--line); }
  .product-identity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .localized-editor-row { grid-template-columns: 5.5rem minmax(10rem, 0.8fr) minmax(14rem, 1.2fr); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .marketing-selection-form { grid-template-columns: 1fr; }
  .marketing-selection-form .button-row { grid-column: auto; }
  .staff-form-grid, .permission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-header { position: sticky; z-index: 35; top: 0; height: 3.75rem; display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface); }
  .mobile-brand { display: flex; align-items: center; gap: 0.55rem; }
  .icon-button { width: 2.75rem; height: 2.75rem; display: grid; place-content: center; gap: 0.25rem; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: var(--surface); }
  .icon-button span { width: 1.15rem; height: 1px; background: currentColor; }
  .sidebar { transform: translateX(-105%); box-shadow: none; transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out); }
  .sidebar.is-open { transform: translateX(0); box-shadow: var(--shadow-drawer); }
  .nav-scrim { position: fixed; z-index: 38; inset: 0; width: 100%; height: 100%; border: 0; background: oklch(29.63% 0.0225 145 / 0.36); }
  .nav-scrim:not([hidden]) { display: block; }
  .dashboard-main { margin-left: 0; }
  .page-topbar { min-height: 3rem; }
  .floor-workspace { grid-template-columns: 9.5rem minmax(24rem, 1fr); overflow-x: auto; }
  .properties-panel { min-width: 34rem; }
}

@media (max-width: 720px) {
  .button-compact,
  .compact-select select {
    min-height: 2.75rem;
  }
  .menu-media-editor, .menu-media-fields { grid-template-columns: 1fr; }
  .menu-media-preview-frame { width: min(100%, 18rem); }
  .service-category-row, .service-category-names { grid-template-columns: 1fr; }
  .service-category-active { grid-column: auto; }
  .service-editor-footer { align-items: stretch; flex-direction: column-reverse; }
  .service-editor-footer .button-row { width: 100%; }
  .menu-editor-actions { width: 100%; margin-left: 0; }
  .printer-route-grid { grid-template-columns: 1fr; }
  .catalog-form-grid, .catalog-switch-grid, .category-editor-row, .repeater-controls, .repeater-locales, .modifier-option-row { grid-template-columns: 1fr; }
  .catalog-switch-grid label:nth-child(n) { border-right: 0; }
  .category-name-fields { grid-template-columns: 1fr; }
  .localized-editor-row, .localized-editor-head, .preparation-editor .localized-editor-row { grid-template-columns: 1fr; }
  .localized-editor-head { display: none; }
  .product-editor-section .section-heading { align-items: flex-start; flex-direction: column; }
  .product-editor-footer { bottom: -1rem; margin: 0 -1rem -1rem; padding: 1rem; align-items: stretch; flex-direction: column; }
  .product-editor-footer .button-row { width: 100%; }
  .staff-form-grid, .permission-grid { grid-template-columns: 1fr; }
  .auth-panel { min-height: calc(100vh - 2rem); }
  .auth-language { width: 7rem; margin-top: 1rem; align-self: flex-start; }
  .page-topbar { flex-wrap: wrap; padding-inline: 1rem; }
  .topbar-actions { min-width: 0; flex: 1; gap: 0.75rem; }
  .refresh-state { min-width: 0; line-height: 1.25; }
  .breadcrumb > span:first-child, .breadcrumb > span:nth-child(2) { display: none; }
  .system-state span:last-child { display: none; }
  .module { padding-top: 1.5rem; }
  .page-header { display: block; margin-bottom: 1.5rem; }
  .page-header > .button, .page-header .document-actions { margin-top: 1rem; }
  .page-header-actions .document-actions { justify-content: flex-start; }
  .marketing-control-heading { align-items: stretch; flex-direction: column; }
  .overview-columns, .split-data, .settings-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .settings-section-wide { grid-column: auto; }
  .exception-row { grid-template-columns: 2rem minmax(0, 1fr); }
  .exception-row .button { grid-column: 2; justify-self: start; }
  .filter-bar { display: grid; grid-template-columns: 1fr; }
  .filter-bar label { min-width: 0; }
  .menu-table thead { display: none; }
  .menu-table, .menu-table tbody, .menu-table tr, .menu-table td { display: block; width: 100%; }
  .menu-table tr { padding: 1rem; border-top: 1px solid var(--line); }
  .menu-table tr:first-child { border-top: 0; }
  .menu-table td { display: grid; grid-template-columns: minmax(6rem, 0.35fr) minmax(0, 1fr); gap: 0.75rem; align-items: center; padding: 0.35rem 0; border: 0; }
  .menu-table td::before { content: attr(data-label); color: var(--muted); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
  .menu-table .checkbox-cell { text-align: left; }
  .menu-table .item-name-input, .menu-table .price-field, .menu-table .route-field { width: 100%; min-width: 0; }
  .menu-table .menu-row-action { width: 100%; }
  .guest-menu-preview { columns: 1; }
  .floor-plan-manager-heading { display: grid; }
  .floor-plan-actions { justify-content: flex-start; }
  .floor-plan-name-grid { grid-template-columns: 1fr; }
  .floor-workspace { display: flex; flex-direction: column; min-height: auto; overflow: visible; }
  .floor-tools, .properties-panel { border: 0; }
  .floor-tools { border-bottom: 1px solid var(--line); }
  .floor-canvas-panel { min-height: 29rem; }
  .floor-canvas { min-height: 25rem; }
  .properties-panel { min-width: 0; border-top: 1px solid var(--line); }
  .properties-panel form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .properties-panel form > label:first-child, .properties-panel .nudge-controls, .properties-panel .button-danger { grid-column: 1 / -1; }
  .properties-panel .table-visibility-controls { grid-column: 1 / -1; }
  .record-row { grid-template-columns: 1fr auto; }
  .record-row > :nth-child(2), .record-row > :nth-child(3) { grid-column: 1; }
  .record-row > :last-child { grid-column: 2; grid-row: 1; }
  .financial-activity-row > .financial-activity-kind { grid-column: 2; grid-row: 1; }
  .financial-activity-row > .financial-activity-details { grid-column: 1 / -1; grid-row: auto; }
  .expense-intake-row > :nth-child(2), .expense-intake-row > :nth-child(3) { grid-column: 1 / -1; }
  .expense-intake-row > :last-child { grid-column: 2; grid-row: 1; }
  .input-checklist { grid-template-columns: 1fr; }
  .input-check:nth-child(odd) { border-right: 0; }
  .overview-floor-canvas { min-height: 17rem; }
  .detail-dialog { width: calc(100vw - 1rem); max-height: calc(100vh - 1rem); }
  .detail-dialog-shell { max-height: calc(100vh - 1rem); }
  .detail-dialog-header, .detail-dialog-body { padding: 1rem; }
}

@media (max-width: 440px) {
  .metric-grid { grid-template-columns: 1fr; }
  .auth-gate { padding: 0.5rem; }
  .auth-panel { min-height: calc(100vh - 1rem); padding: 1rem; }
  .auth-state h1 { font-size: 1.75rem; }
  .button-row .button { flex: 1 1 100%; }
  .document-actions .button { flex: 1 1 calc(50% - 0.75rem); }
  .page-header .document-actions { width: 100%; }
  .pagination-bar { align-items: flex-start; flex-direction: column; }
  .definition-grid { grid-template-columns: 1fr; }
  .definition-grid dt { padding-bottom: 0.15rem; border-bottom: 0; }
  .definition-grid dd { padding-top: 0; }
  .properties-panel form { grid-template-columns: 1fr; }
  .properties-panel form > *, .properties-panel form > label:first-child { grid-column: 1; }
  .field-pair { grid-template-columns: 1fr; }
  .floor-plan-actions .button { flex: 1 1 100%; }
  .floor-plan-tab { min-width: 9rem; }
  .detail-grid, .table-choice-grid { grid-template-columns: 1fr; }
  .detail-grid > div:nth-child(odd), .detail-grid > div:nth-child(even) { padding-inline: 0; border-left: 0; }
  .expense-intake-heading { align-items: stretch; flex-direction: column; }
  .expense-intake-heading .button { width: 100%; }
  .expense-intake-skeleton-row, .suggestion-row { grid-template-columns: 1fr; gap: 0.35rem; padding: 0.85rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media (forced-colors: active) {
  .connection-dot, .document-state, .state-badge, .count-badge, .nav-alert { forced-color-adjust: none; }
  .floor-table.is-selected { outline: 3px solid Highlight; outline-offset: 2px; }
}

@media print {
  .sidebar, .mobile-header, .page-topbar, .environment-banner, .button, .text-action, .toast-region { display: none !important; }
  .dashboard-main { margin: 0; }
  .module { padding: 0; }
}

/*
 * Restaurant Builder v0.2.10 presentation contract.
 *
 * Los Vivos keeps its production API, permissions, persistence, and additional
 * POS Admin surface. This final cascade maps that production DOM to the frozen
 * builder dashboard geometry instead of importing its demo-only localStorage.
 */
:root {
  --sidebar-width: 238px;
  --restaurant-builder-green: #41503d;
  --restaurant-builder-green-deep: #344331;
  --restaurant-builder-ivory: #f7f3eb;
  --restaurant-builder-surface: #fffdf8;
  --restaurant-builder-line: #dce2dd;
  --restaurant-builder-muted: #66756b;
}

.dashboard { background: var(--restaurant-builder-ivory); }

.sidebar {
  width: var(--sidebar-width);
  padding: 26px 18px 20px;
  background: var(--restaurant-builder-green);
  color: #fffdf8;
}

.sidebar-brand {
  min-height: 0;
  padding: 0 0 22px;
  border-bottom: 1px solid rgb(255 255 255 / 18%);
}

.brand-logo-sidebar {
  width: 58px;
  height: 58px;
  padding: 5px;
  background: rgb(255 255 255 / 10%);
}

.sidebar-brand strong { color: #fffdf8; font-family: Georgia, "Times New Roman", serif; font-size: 1rem; }
.sidebar-brand small { color: #d6e1d7; }

.primary-nav {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 26px 0 18px;
}

.primary-nav .nav-label { margin: 0 12px 7px; color: #c4d2c5; }

.nav-item {
  min-height: 48px;
  padding: 12px;
  border: 0;
  border-radius: 0;
  color: #e2eadf;
  font-size: 0.84rem;
  font-weight: 650;
}

.nav-item:hover { background: rgb(0 0 0 / 10%); }
.nav-item.is-current { background: var(--restaurant-builder-green-deep); border-color: transparent; }
.nav-index { color: #bdcbbc; }
.nav-item.is-current .nav-index { color: #fffdf8; }

.sidebar-footer {
  gap: 10px;
  padding: 18px 0 0;
  border-top: 1px solid rgb(255 255 255 / 18%);
}

.sidebar-return {
  border-color: rgb(255 255 255 / 35%);
  border-radius: 0;
  color: #fffdf8;
}

.sidebar-return:hover { background: var(--restaurant-builder-green-deep); }

.dashboard-main { margin-left: var(--sidebar-width); background: var(--restaurant-builder-ivory); }

.page-topbar {
  position: absolute;
  z-index: 4;
  top: 20px;
  right: clamp(24px, 4vw, 62px);
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}

.page-topbar .breadcrumb { display: none; }
.page-topbar .topbar-actions { gap: 12px; }
.page-topbar .system-state,
.page-topbar .refresh-state { font-size: 0.7rem; }
.page-topbar .compact-select select { background: var(--restaurant-builder-surface); }

.module { padding: 44px clamp(24px, 4vw, 62px) 72px; }

.restaurant-builder-header {
  min-height: 75px;
  align-items: flex-start;
  margin: 0 0 38px;
  padding: 0 26rem 0 0;
  border: 0;
}

.restaurant-builder-header .eyebrow { margin-bottom: 4px; }
.restaurant-builder-header h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4vw, 3.65rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}
.restaurant-builder-header > .button { display: none; }

.restaurant-builder-overview-lead {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #d5dcd7;
}

.restaurant-builder-overview-lead h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
}

.restaurant-builder-overview-lead p:last-child {
  max-width: 56ch;
  margin: 13px 0 0;
  color: var(--restaurant-builder-muted);
}

.restaurant-builder-shift-sales { min-width: 220px; text-align: right; }
.restaurant-builder-shift-sales span,
.restaurant-builder-shift-sales small { display: block; color: var(--restaurant-builder-muted); font-size: 0.72rem; }
.restaurant-builder-shift-sales span { font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.restaurant-builder-shift-sales strong {
  display: block;
  margin: 5px 0 2px;
  color: var(--restaurant-builder-green-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3.4vw, 3.35rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.restaurant-builder-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.7fr);
  gap: 15px;
  align-items: start;
}

.restaurant-builder-overview-service,
.restaurant-builder-overview-card,
.restaurant-builder-overview-checkins {
  border: 1px solid var(--restaurant-builder-line);
  background: var(--restaurant-builder-surface);
}

.restaurant-builder-overview-service,
.restaurant-builder-overview-card,
.restaurant-builder-overview-checkins { padding: 20px; }

.restaurant-builder-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.restaurant-builder-panel-heading > div { display: flex; align-items: center; gap: 12px; }
.restaurant-builder-panel-heading .eyebrow { margin: 0; color: var(--restaurant-builder-green-deep); }
.restaurant-builder-panel-heading > strong,
.restaurant-builder-panel-heading > span { color: var(--restaurant-builder-green-deep); font-size: 0.76rem; font-weight: 750; }

.restaurant-builder-live { display: inline-flex; align-items: center; gap: 5px; color: #31735f; font-size: 0.65rem; font-weight: 700; }
.restaurant-builder-live i { width: 7px; height: 7px; border-radius: 50%; background: #4a9a7c; box-shadow: 0 0 0 4px #e0f0e8; }

.restaurant-builder-overview-service #live-tabs-frame { margin-top: 15px; }
.restaurant-builder-overview-service .overview-floor-canvas {
  min-height: 380px;
  border-color: #b8c5c6;
  border-radius: 12px;
  background-color: var(--restaurant-builder-surface);
  background-image: linear-gradient(90deg, rgb(48 74 56 / 4%) 1px, transparent 1px), linear-gradient(rgb(48 74 56 / 4%) 1px, transparent 1px);
  background-size: 24px 24px;
}
.restaurant-builder-overview-service .overview-floor-table { background: var(--restaurant-builder-surface); box-shadow: 0 4px 0 rgb(29 66 70 / 10%); }
.restaurant-builder-overview-service button.overview-floor-table { border-color: var(--restaurant-builder-green); background: var(--restaurant-builder-green); color: #fffdf8; }
.restaurant-builder-overview-service .empty-state { min-height: 380px; border: 1px solid #b8c5c6; border-radius: 12px; }
.restaurant-builder-floor-help { margin: 11px 0 0; color: var(--restaurant-builder-muted); font-size: 0.72rem; }

.restaurant-builder-overview-side { display: grid; gap: 15px; }
.restaurant-builder-reservation-count {
  color: var(--restaurant-builder-green-deep) !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.15rem !important;
  line-height: 1;
}
.restaurant-builder-overview-card > p { margin: 18px 0; color: var(--restaurant-builder-muted); font-size: 0.78rem; }
.restaurant-builder-overview-card .button { border-radius: 0; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.68rem; }

.restaurant-builder-team-list { margin-top: 8px; }
.restaurant-builder-team-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid #e4e8e3;
}
.restaurant-builder-avatar { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #e5eee8; color: #53624e; font-size: 0.58rem; font-weight: 800; }
.restaurant-builder-team-row strong,
.restaurant-builder-team-row small { display: block; }
.restaurant-builder-team-row strong { font-size: 0.76rem; }
.restaurant-builder-team-row small { color: var(--restaurant-builder-muted); font-size: 0.64rem; }
.restaurant-builder-team-row i { color: var(--restaurant-builder-green); font-size: 0.58rem; font-style: normal; font-weight: 700; }
.restaurant-builder-empty { margin: 16px 0 0; color: var(--restaurant-builder-muted); font-size: 0.76rem; }

.restaurant-builder-overview-checkins { margin-top: 15px; }
.restaurant-builder-checkin-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 13px; border-top: 1px solid #e2e7e2; }
.restaurant-builder-checkin-row { display: grid; grid-template-columns: 35px minmax(0, 1fr); gap: 9px; padding: 15px 16px 4px 0; }
.restaurant-builder-checkin-row + .restaurant-builder-checkin-row { padding-left: 16px; border-left: 1px solid #e2e7e2; }
.restaurant-builder-checkin-row strong,
.restaurant-builder-checkin-row small { display: block; }
.restaurant-builder-checkin-row strong { overflow: hidden; font-size: 0.75rem; text-overflow: ellipsis; white-space: nowrap; }
.restaurant-builder-checkin-row small { color: var(--restaurant-builder-muted); font-size: 0.62rem; }
.restaurant-builder-checkin-row time,
.restaurant-builder-checkin-row b { grid-column: 2; font-size: 0.63rem; }
.restaurant-builder-checkin-row time { color: var(--restaurant-builder-green-deep); font-weight: 700; }
.restaurant-builder-checkin-row b { color: var(--restaurant-builder-green); }

.restaurant-builder-production-section { margin-top: 42px; }
.restaurant-builder-production-section + .restaurant-builder-production-section { margin-top: 12px; }

@media (max-width: 1050px) {
  .restaurant-builder-overview-layout { grid-template-columns: minmax(0, 1.35fr) minmax(245px, 0.65fr); }
  .restaurant-builder-checkin-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .restaurant-builder-checkin-row:nth-child(3) { padding-left: 0; border-left: 0; }
}

@media (max-width: 920px) and (min-width: 641px) {
  .restaurant-builder-header { padding-right: 0; }
  .page-topbar { position: static; min-height: 3rem; padding: 0.6rem 1rem; border-bottom: 1px solid var(--line); background: var(--restaurant-builder-surface); }
  .restaurant-builder-overview-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .mobile-header { display: none; }
  .sidebar {
    position: fixed;
    z-index: 80;
    inset: auto 0 0;
    width: 100%;
    height: 72px;
    min-height: 72px;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    transform: none !important;
    box-shadow: 0 -8px 24px rgb(38 48 38 / 12%);
  }
  .sidebar-brand,
  .sidebar-footer .session-identity,
  .sidebar-footer .text-action,
  .primary-nav .nav-label { display: none; }
  .primary-nav {
    display: flex;
    flex: 1 1 auto;
    gap: 2px;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .primary-nav::-webkit-scrollbar { display: none; }
  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    min-height: 48px;
    display: block;
    padding: 8px 10px;
    font-size: 0.61rem;
  }
  .nav-index,
  .nav-alert { display: none; }
  .sidebar-footer {
    flex: 0 0 55px;
    width: 55px;
    display: block;
    padding: 0;
    border: 0;
    border-left: 1px solid rgb(255 255 255 / 20%);
  }
  .sidebar-return {
    width: 55px;
    min-height: 48px;
    overflow: hidden;
    border: 0;
    padding: 6px;
    font-size: 0;
  }
  .sidebar-return::after { content: '\2190 Site'; font-size: 0.62rem; font-weight: 700; }
  .nav-scrim { display: none !important; }
  .dashboard-main { margin-left: 0; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .page-topbar {
    position: static;
    min-height: 52px;
    padding: 6px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--restaurant-builder-surface);
  }
  .page-topbar .refresh-state { display: none; }
  .page-topbar .topbar-actions { width: 100%; justify-content: space-between; }
  .page-topbar .system-state span:last-child { display: inline; }
  .module { padding: 24px 16px 42px; }
  .restaurant-builder-header { min-height: 0; display: block; margin-bottom: 28px; padding: 0; }
  .restaurant-builder-header h1 { font-size: 2.6rem; }
  .restaurant-builder-header > .button { display: inline-flex; margin-top: 18px; }
  .restaurant-builder-overview-lead { align-items: stretch; flex-direction: column; gap: 20px; }
  .restaurant-builder-overview-lead h2 { font-size: 2.35rem; }
  .restaurant-builder-shift-sales { min-width: 0; text-align: left; }
  .restaurant-builder-shift-sales strong { font-size: 2.3rem; }
  .restaurant-builder-overview-layout { grid-template-columns: 1fr; }
  .restaurant-builder-overview-service,
  .restaurant-builder-overview-card,
  .restaurant-builder-overview-checkins { padding: 15px; }
  .restaurant-builder-overview-service .overview-floor-canvas,
  .restaurant-builder-overview-service .empty-state { min-height: 330px; }
  .restaurant-builder-checkin-list { grid-template-columns: 1fr; }
  .restaurant-builder-checkin-row + .restaurant-builder-checkin-row { padding-left: 0; border-left: 0; }
  .restaurant-builder-production-section { margin-top: 32px; }
}

/* Hacienda v4.4 configuration workspace. Legal identity may be stored in the
   protected settings document; certificates and API credentials never enter this UI. */
.fiscal-page-header { align-items: flex-start; }
.fiscal-readiness {
  min-width: 17rem;
  display: grid;
  grid-template-columns: 0.8rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
}
.fiscal-readiness-mark { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--warning); }
.fiscal-readiness.is-configured .fiscal-readiness-mark { background: var(--success); }
.fiscal-readiness strong, .fiscal-readiness small { display: block; }
.fiscal-readiness strong { font-size: 0.84rem; }
.fiscal-readiness small { margin-top: 0.15rem; color: var(--muted); font-size: 0.72rem; }
.fiscal-metric-grid { margin: 1.25rem 0; }
.fiscal-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(17rem, 0.7fr);
  gap: 1.25rem;
  align-items: start;
}
.fiscal-settings-form { display: grid; gap: 1px; border: 1px solid var(--line); background: var(--line); }
.fiscal-settings-form fieldset { min-width: 0; margin: 0; padding: 1.15rem; border: 0; background: var(--surface); }
.fiscal-settings-form legend { padding: 0 0 0.8rem; color: var(--ink); font-size: 0.82rem; font-weight: 760; letter-spacing: 0.05em; text-transform: uppercase; }
.fiscal-settings-form label { display: grid; gap: 0.35rem; color: var(--ink); font-size: 0.78rem; font-weight: 680; }
.fiscal-settings-form label small { color: var(--muted); font-size: 0.7rem; font-weight: 450; }
.fiscal-settings-form input, .fiscal-settings-form select, .fiscal-settings-form textarea {
  width: 100%; min-height: 2.75rem; padding: 0.62rem 0.72rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--ivory); color: var(--ink);
}
.fiscal-settings-form textarea { resize: vertical; }
.fiscal-toggle { grid-template-columns: auto minmax(0, 1fr); align-items: start; margin-bottom: 1rem; }
.fiscal-toggle input { width: 1.1rem; min-height: 1.1rem; margin-top: 0.2rem; }
.fiscal-toggle b, .fiscal-toggle small { display: block; }
.fiscal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.fiscal-span-2 { grid-column: 1 / -1; }
.fiscal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 1rem 1.15rem; background: var(--surface); }
.fiscal-actions .save-note { flex: 1 1 100%; margin: 0; color: var(--muted); font-size: 0.76rem; }
.fiscal-readiness-panel { position: sticky; top: 5.5rem; padding: 1.15rem; border: 1px solid var(--line); background: var(--surface); }
.fiscal-gate-list { display: grid; gap: 0; margin: 0.8rem 0 1rem; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.fiscal-gate-list li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) auto; gap: 0.55rem; align-items: center; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.fiscal-gate-list strong { font-size: 0.76rem; line-height: 1.35; }
.fiscal-gate-list small { color: var(--warning); font-size: 0.68rem; font-weight: 750; text-transform: uppercase; }
.fiscal-gate-list .is-ready small, .fiscal-gate-list .is-ready .fiscal-gate-mark { color: var(--success); }
.fiscal-gate-mark { color: var(--warning); font-weight: 800; }

@media (max-width: 980px) {
  .fiscal-workspace { grid-template-columns: 1fr; }
  .fiscal-readiness-panel { position: static; }
}

@media (max-width: 640px) {
  .fiscal-readiness { width: 100%; min-width: 0; }
  .fiscal-grid { grid-template-columns: 1fr; }
  .fiscal-span-2 { grid-column: auto; }
  .fiscal-actions .button { width: 100%; }
}
