/* Focused settings editor. Tenant colors remain owned by the configuration API. */
:root {
  --page-space: 32px;
  --section-space: 30px;
  --section-label-width: 230px;
  --control-height: 42px;
  --control-radius: 7px;
  --page-radius: 10px;
  --page-elevation: 0 8px 24px #0312340d;
}
body {
  font-size: 14px;
  line-height: 1.5;
}
::selection {
  background: var(--primary);
  color: var(--on-primary);
}
input,
textarea {
  caret-color: var(--primary);
}
* {
  scrollbar-color: var(--muted) transparent;
  scrollbar-width: thin;
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.app-body > main#main.page-surface {
  padding: var(--page-space);
}
.page-surface {
  min-width: 0;
}
.page-heading {
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.page-heading-copy {
  min-width: 0;
  flex: 1 1 280px;
}
.page-heading h1 {
  font-size: clamp(23px, 2.2vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
  margin: 0;
}
.page-heading p {
  font-size: 14px;
  line-height: 1.6;
  margin: 10px 0 0;
  max-width: 70ch;
}
.heading-actions {
  flex-wrap: wrap;
  flex-shrink: 1;
  gap: 8px;
}
.button,
.text-button {
  font-size: 14px;
}
.button {
  min-height: var(--control-height);
  border-radius: var(--control-radius);
}
.button.primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}
.page-frame {
  min-width: 0;
}
.page-frame-rail {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.page-content {
  min-width: 0;
}
.workspace-tabs.page-navigation {
  display: block;
  padding: 0;
  margin: 0 0 24px;
  border: 0;
  background: transparent;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
}
.page-navigation-links {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.page-navigation .tab {
  display: flex;
  grid-template-columns: none;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 0;
  font-size: 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  justify-content: start;
  text-align: left;
}
.page-navigation .tab.active,
.page-navigation .tab.active:hover {
  color: var(--ink);
  background: transparent;
  border-bottom-color: var(--primary);
}
.page-navigation .tab:hover {
  color: var(--ink);
  background: var(--raised);
}
.page-navigation-rail .page-navigation-links {
  flex-direction: column;
  gap: 3px;
  border: 0;
  overflow: visible;
}
.page-navigation-rail .tab {
  padding: 10px 12px;
  white-space: normal;
  border: 0;
  border-radius: var(--control-radius);
}
.page-navigation-rail .tab.active {
  background: var(--surface);
  box-shadow: inset 2px 0 var(--primary);
}
.page-navigation-overflow {
  display: none;
}
.focused-editor.settings-workbench {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--surface);
}
.focused-editor .settings-searchbar {
  padding: 18px 24px;
  gap: 12px;
}
.focused-editor .settings-searchbar [role='status'] {
  font-size: 13px;
}
.focused-editor .settings-categories {
  gap: 24px;
  padding: 0 24px;
  flex-wrap: nowrap;
  overflow-x: auto;
}
.focused-editor .settings-category {
  border-radius: 0;
  padding: 14px 0;
  background: transparent;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.focused-editor .settings-category.selected {
  border-bottom-color: var(--primary);
  color: var(--ink);
  background: transparent;
}
.focused-editor .settings-category .icon {
  display: none;
}
.focused-editor .settings-category.has-changes::after {
  background: var(--primary);
}
.focused-editor .settings-form {
  padding: 0 24px;
}
.focused-editor .settings-form-heading {
  padding: 26px 0 0;
  margin: 0;
}
.focused-editor .settings-form-heading h2 {
  font-size: 20px;
  margin: 0 0 8px;
}
.focused-editor .settings-form-heading p {
  font-size: 14px;
}
.focused-editor .settings-form-fields > .form-grid {
  display: block;
}
.section-split {
  display: grid;
  grid-template-columns: minmax(170px, var(--section-label-width)) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.page-section,
.field-section {
  padding: var(--section-space) 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.page-section:first-child {
  padding-top: 0;
}
.page-section:last-child,
.field-section:last-child {
  border-bottom: 0;
}
.section-description {
  min-width: 0;
}
.section-description h2,
.section-description h3 {
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}
.section-description p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  max-width: 65ch;
}
.section-content,
.section-controls,
.setting-control {
  min-width: 0;
}
.section-controls.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 20px;
}
.setting-control-wide {
  grid-column: 1 / -1;
}
.field {
  gap: 8px;
  font-size: 14px;
}
.field > span {
  font-size: 14px;
  font-weight: 600;
}
.field input:not([type='checkbox']):not([type='color']),
.field select,
.field textarea {
  min-height: var(--control-height);
  font-size: 15px;
  border-radius: var(--control-radius);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  outline-color: var(--primary);
}
.field small,
.field-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.focused-editor .settings-form .field:not(.switch-field):not(.image-upload-field) {
  padding: 0;
  border: 0;
  border-radius: 0;
}
.focused-editor .settings-form .field > span {
  font-size: 14px;
}
.focused-editor
  .settings-form
  .field
  > input:is([type='text'], [type='email'], [type='url'], [type='number'], [type='time']),
.focused-editor .settings-form .field > textarea {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--control-radius);
  padding: 10px 12px;
}
.focused-editor .settings-form .field > input:focus,
.focused-editor .settings-form .field > textarea:focus {
  border-color: var(--primary);
}
.focused-editor .switch-field {
  min-height: 62px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}
.focused-editor .switch-field:has(input:checked) {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.focused-editor .switch-title {
  font-size: 14px;
}
.focused-editor .switch-description {
  font-size: 13px;
}
.focused-editor .repeat-field {
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}
.focused-editor .repeat-row {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 20px 0;
  margin: 0;
}
.focused-editor .image-upload-field {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}
.page-advanced {
  padding: 22px 0;
}
.page-advanced > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  min-height: 32px;
}
.page-advanced[open] > summary {
  margin-bottom: 20px;
}
.page-savebar.settings-save {
  position: sticky;
  z-index: 5;
  bottom: 0;
  padding: 16px 0;
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 -8px 20px #03123406;
}
.savebar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-savebar [role='status'] {
  font-size: 14px;
}
.focused-editor .form-error:not(:empty) {
  padding: 16px 0;
  margin: 0;
}
.page-records {
  background: var(--surface);
  min-width: 0;
}
.page-records .filterbar {
  padding: 18px 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.page-records .pagination {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}
.page-surface table {
  font-size: 14px;
}
.page-surface th,
.page-surface td {
  padding: 14px 16px;
}
.page-surface th {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  font-weight: 600;
}
.page-surface tbody tr:hover {
  background: var(--raised);
}
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.record-list {
  display: grid;
  padding: 0 24px;
}
.record-list .record-list-item {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr) auto;
  gap: 24px;
  align-items: start;
  padding: 24px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.record-list-item:last-child {
  border-bottom: 0;
}
.record-list-item dl {
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.record-list-item > footer {
  border: 0;
  padding: 0;
}
.record-list-item > footer .button {
  width: auto;
}
.page-surface .info-grid {
  gap: 0 28px;
  background: transparent;
}
.page-surface .info-card {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 16px 0;
  background: transparent;
}
.page-surface .info-card dt {
  font-size: 13px;
}
.page-surface .info-card dd {
  font-size: 14px;
}
.page-surface .info-expanded {
  padding: 12px 0 0;
}
.page-surface .info-grid-nested .info-card {
  background: transparent;
}
.page-surface .stats {
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin: 0 0 28px;
}
.page-surface .stat {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 20px 22px;
  min-height: 100px;
}
.page-surface .stat:first-child {
  padding-left: 0;
}
.page-surface .stat + .stat {
  border-left: 1px solid var(--line);
}
.page-surface .stat-icon {
  display: none;
}
.page-surface .stat strong {
  font-size: 26px;
  letter-spacing: -0.025em;
}
.page-surface .stat > div > span,
.page-surface .stat small {
  font-size: 13px;
}
.page-surface .panel {
  box-shadow: none;
  border-radius: var(--page-radius);
}
.page-surface .panel-title h2 {
  font-size: 17px;
}
.page-surface .panel-title p,
.page-surface .panel-title a {
  font-size: 13px;
}
.page-dashboard .dashboard-grid {
  grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr);
}
.page-dashboard .dashboard-grid > section {
  border: 0;
  border-radius: 0;
}
.page-dashboard .shortcuts > a {
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.page-section-stack {
  background: var(--surface);
  padding: 28px;
}
.page-section .settings-content {
  padding: 0;
}
.page-section .panel-title {
  padding: 0 0 16px;
}
.page-section .section-content > p:first-child {
  margin-top: 0;
}
.page-information {
  background: var(--surface);
  padding: 24px;
}
.page-surface .empty {
  padding: 42px 24px;
}
.page-surface .empty h2,
.page-surface .empty h3 {
  font-size: 19px;
}
.page-surface .empty p {
  font-size: 14px;
  max-width: 60ch;
}
.page-surface .notice {
  font-size: 13px;
  border-radius: var(--control-radius);
}
.page-surface .toolbar {
  gap: 12px;
  flex-wrap: wrap;
}
.page-surface .website-studio-grid {
  display: block;
}
.page-surface .website-studio-grid > .page-section {
  margin: 0;
}
.page-display {
  --page-space: 24px;
}
.page-pos {
  --page-space: 0px;
}
.page-kitchen {
  --page-space: 22px;
}
.page-diner {
  font-size: 14px;
}
.page-auth .login-form > h2 {
  font-size: 28px;
  letter-spacing: -0.025em;
}
html[data-theme='dark'] .page-savebar {
  box-shadow: 0 -8px 20px #00000018;
}
@media (max-width: 1200px) {
  :root {
    --page-space: 24px;
    --section-label-width: 190px;
  }
  .page-frame-rail {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 20px;
  }
  .section-split {
    gap: 24px;
  }
  .page-frame-rail .field-section.section-split {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .record-list .record-list-item {
    grid-template-columns: 1fr auto;
  }
  .record-list-item dl {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
@media (max-width: 900px) {
  .page-frame-rail {
    display: block;
  }
  .page-navigation-rail .page-navigation-links {
    display: none;
  }
  .page-navigation-overflow {
    display: block;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }
  .page-navigation-overflow > summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
  }
  .page-navigation-overflow > summary span:last-child {
    color: var(--muted);
    font-size: 13px;
  }
  .page-navigation-overflow > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
  }
  .page-navigation-overflow .tab {
    min-width: 0;
  }
  .section-split {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-dashboard .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  :root {
    --page-space: 16px;
    --section-space: 24px;
  }
  .page-heading {
    gap: 16px;
    margin-bottom: 24px;
  }
  .page-heading-copy {
    flex-basis: 100%;
  }
  .heading-actions {
    width: 100%;
  }
  .heading-actions > .button {
    flex: 1 1 auto;
  }
  .focused-editor .settings-searchbar,
  .focused-editor .settings-categories {
    padding-left: 16px;
    padding-right: 16px;
  }
  .focused-editor .settings-form {
    padding: 0 16px;
  }
  .focused-editor .settings-category {
    font-size: 13px;
  }
  .section-controls.form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-surface .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 0;
  }
  .page-surface .stat {
    padding: 0 12px 16px;
    min-height: 0;
  }
  .page-surface .stat:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
  .page-surface .stat strong {
    font-size: 23px;
  }
  .page-section-stack,
  .page-information {
    padding: 20px 16px;
  }
  .page-savebar.settings-save {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .savebar-actions {
    margin-left: auto;
  }
  .record-list {
    padding: 0 16px;
  }
  .record-list .record-list-item {
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
  }
  .record-list-item > footer {
    grid-row: 3;
  }
  .page-surface .info-grid {
    grid-template-columns: 1fr;
  }
  .page-navigation-links {
    gap: 18px;
  }
  .page-navigation .tab {
    display: flex;
    grid-template-columns: none;
    flex: 0 0 auto;
    font-size: 13px;
  }
  .page-surface table {
    font-size: 13px;
  }
  .page-surface th,
  .page-surface td {
    padding: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
/* Shared shell and purpose-specific high frequency surfaces. */
.sidebar .nav-link {
  min-height: 38px;
  font-size: 13px;
  padding: 9px 10px;
}
.sidebar .nav-group > p {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #a8bad2;
}
.sidebar .nav-link:focus-visible {
  outline-color: var(--primary);
}
.page-queue {
  min-width: 0;
  background: var(--surface);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.page-service .qr-grid {
  gap: 24px;
}
.page-service .qr-card-grid {
  padding: 0 18px;
}
.page-service .qr-card {
  box-shadow: none;
  border-radius: var(--control-radius);
}
.page-service .visit-panel {
  margin-top: 28px;
}
.page-service .visits {
  padding: 0 18px;
}
.page-toolbar {
  padding: 12px 0 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.page-kitchen .kitchen-ticket {
  border-radius: var(--page-radius);
  background: var(--surface);
}
.page-kitchen .kitchen-food {
  font-size: 17px;
}
.page-kitchen .kitchen-toolbar {
  font-size: 14px;
}
.page-kitchen .kitchen-ticket > p {
  font-size: 13px;
}
.page-conversation {
  background: var(--surface);
  border: 0;
  border-radius: 0;
}
.page-conversation #chat-form {
  border-top: 1px solid var(--line);
}
.page-conversation .chat-welcome p {
  font-size: 14px;
}
.editor-section-title {
  margin: 28px 0 16px;
  font-size: 17px;
}
#website-editor > .form-grid {
  display: block;
}
#website-editor .field-section {
  display: block;
}
#website-editor .section-description {
  margin-bottom: 20px;
}
#website-editor .section-controls {
  display: grid;
}
#record-form > .form-grid {
  display: block;
}
.calm-panel .field-section.section-split {
  display: block;
}
.calm-panel .field-section:first-child {
  padding-top: 0;
}
.calm-panel .field-section .section-description {
  margin-bottom: 18px;
}
.calm-panel .field-section .section-controls {
  display: grid;
}
.calm-panel .setting-control .field {
  width: 100%;
}

.statistics-overview { margin-bottom: 24px; }
.statistics-overview h2 { margin: 0 0 12px; font-size: 16px; }
.statistics-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; margin: 0; }
.statistics-metrics > div { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--control-radius); min-width: 0; }
.statistics-metrics dt { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.statistics-metrics dd { margin: 8px 0 0; color: var(--ink); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.statistics-chart { margin-top: 20px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--control-radius); }
.statistics-chart h3 { margin: 0 0 16px; font-size: 15px; }
.statistics-chart ul { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.statistics-chart li { display: grid; grid-template-columns: minmax(100px, 180px) minmax(60px, 1fr) auto; gap: 12px; align-items: center; font-size: 13px; }
.statistics-chart li > span:first-child { overflow-wrap: anywhere; }
.statistics-bar { height: 8px; background: var(--raised); border-radius: 8px; overflow: hidden; }
.statistics-bar > span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.statistics-filters { display:flex; flex-wrap:wrap; align-items:end; gap:12px; margin-bottom:24px; }
.statistics-filters .field { flex:1 1 180px; }
.statistics-filters .form-error { flex-basis:100%; }
.statistics-collection { margin:24px 0; min-width:0; }
.statistics-collection h2 { font-size:16px; margin-bottom:12px; }
