:root {
  color-scheme: light;
  --bg: #f1ebdf;
  --bg-accent: #d8c39c;
  --surface: #fffdf8;
  --surface-strong: #fffefa;
  --surface-soft: #f4ecde;
  --ink: #243028;
  --muted: #677065;
  --line: rgba(36, 48, 40, 0.12);
  --line-strong: rgba(36, 48, 40, 0.24);
  --green: #1e6d50;
  --green-deep: #14372c;
  --gold: #a97d2f;
  --warning: #a3492f;
  --info: #e8f0eb;
  --shadow: 0 12px 30px rgba(44, 31, 9, 0.08);
  --radius: 8px;
  --radius-sm: 6px;
  --foundation-bg: #f4f6f8;
  --foundation-surface: #ffffff;
  --foundation-soft: #f8fafb;
  --foundation-line: #dfe4e8;
  --foundation-line-strong: #c8d1d7;
  --foundation-text: #24313a;
  --foundation-muted: #66737c;
  --foundation-quiet: #8a969e;
  --foundation-brand: #176f5b;
  --foundation-brand-dark: #105949;
  --foundation-brand-soft: #eaf5f1;
  --foundation-danger: #b43d3d;
  --foundation-radius: 7px;
  --foundation-shadow: 0 1px 2px rgba(25, 40, 50, 0.05), 0 8px 24px rgba(25, 40, 50, 0.04);
  --foundation-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --foundation-base-size: 13px;
  --foundation-base-line: 1.45;
  --foundation-card-width: 800px;
  --foundation-workspace-top: 28px;
  --foundation-control-height: 35px;
  --foundation-control-padding: 7px 9px;
  --foundation-space-2: 8px;
  --foundation-space-3: 12px;
  --foundation-space-4: 16px;
  --foundation-space-5: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  width: 100%;
}

body {
  min-height: 100vh;
  background: linear-gradient(180deg, #f5f2ec 0%, #eee9df 100%);
  color: var(--ink);
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

textarea {
  min-height: 72px;
  resize: vertical;
}

img {
  display: block;
  max-width: 100%;
}

.is-hidden {
  display: none !important;
}

.auth-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card,
.surface-card,
.entity-card,
.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card {
  max-width: 430px;
  padding: 28px;
  width: 100%;
}

.app-shell {
  display: grid;
  grid-template-columns: 72px 248px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 78px;
  padding: 14px 24px;
}

.topbar h1 {
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.2;
}

.topbar-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.global-rail {
  align-items: center;
  background: #fbfaf7;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 18px 10px;
}

.rail-mark {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-deep);
  display: grid;
  font-weight: 800;
  height: 38px;
  place-items: center;
  width: 38px;
}

.rail-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  color: var(--muted);
  display: grid;
  font-size: 1.45rem;
  height: 54px;
  place-items: center;
  width: 100%;
}

.rail-button.is-active {
  border-left-color: var(--green);
  color: var(--green);
}

.module-nav {
  background: #f8f7f3;
  border-right: 1px solid var(--line);
  min-height: 0;
  overflow-y: auto;
  padding: 26px 18px;
  scrollbar-gutter: stable;
}

.module-title {
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  padding-bottom: 18px;
}

.settings-nav-tree {
  display: grid;
  gap: 10px;
}

.settings-nav-row {
  align-items: center;
  background: transparent;
  border: 0;
  color: #465365;
  display: flex;
  font-size: 0.94rem;
  gap: 8px;
  justify-content: space-between;
  min-height: 34px;
  padding: 5px 0;
  text-align: left;
  width: 100%;
}

.settings-nav-row.is-active {
  color: #f27f14;
  font-weight: 700;
}

.settings-nav-row.is-active::before {
  background: #f27f14;
  border-radius: 999px;
  content: "";
  height: 8px;
  margin-left: -12px;
  width: 8px;
}

.settings-nav-row:disabled {
  color: #7b8490;
}

.nav-parent {
  color: #2f3b4d;
  font-weight: 600;
  margin-top: 8px;
}

.settings-nav-children {
  border-left: 1px solid var(--line);
  display: grid;
  gap: 6px;
  margin: -2px 0 4px;
  padding-left: 18px;
}

.nav-badge {
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 800;
}

.admin-workspace-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.workspace-root {
  display: grid;
  flex: 1 1 auto;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  padding: 22px 24px;
  width: 100%;
}

.workspace-root.is-menu-view {
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
}

.workspace-root.is-foundation-settings {
  align-items: flex-start;
  background: var(--foundation-bg);
  color: var(--foundation-text);
  font-family: var(--foundation-font);
  font-size: var(--foundation-base-size);
  font-weight: 400;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  line-height: var(--foundation-base-line);
  overflow-anchor: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--foundation-workspace-top) var(--foundation-space-5) 76px;
}

@media (min-width: 861px) {
  html.admin-app-active {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.admin-app-active {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.admin-app-active .app-shell {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    max-width: 100vw;
    overflow: hidden;
  }

  body.admin-app-active .admin-workspace-shell,
  body.admin-app-active .workspace-root {
    min-height: 0;
    min-width: 0;
    overflow: hidden;
  }

  body.admin-app-active .module-nav {
    overscroll-behavior: contain;
  }

  body.admin-app-active .workspace-root.is-foundation-settings {
    overscroll-behavior: contain;
    overflow-x: hidden;
    overflow-y: auto;
  }
}

.workspace-root.is-foundation-settings #leftColumn,
.workspace-root.is-foundation-settings #rightColumn {
  display: none;
}

.workspace-root.is-foundation-settings #centerColumn {
  max-width: var(--foundation-card-width);
  overflow: visible;
  padding-right: 0;
  width: min(100%, var(--foundation-card-width));
}

.suko-address-new-page {
  display: grid;
  gap: 14px;
  margin: 0 auto;
  max-width: var(--foundation-card-width);
  width: min(100%, var(--foundation-card-width));
}

.suko-address-new-page > .suko-action-row {
  justify-content: flex-end;
}

.suko-address-phone-list {
  display: grid;
  gap: 10px;
}

.suko-address-phone-list > .suko-button {
  justify-self: start;
}

.suko-address-phone-row {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(110px, 0.7fr) minmax(180px, 1fr) auto;
}

.suko-settings-new-page {
  display: grid;
  gap: 14px;
  margin: 0 auto;
  max-width: var(--foundation-card-width);
  width: min(100%, var(--foundation-card-width));
}

.suko-hidden-control {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  min-width: 0;
}

.suko-visually-hidden-input,
.suko-hidden-values {
  display: none !important;
}

.suko-duration-control,
.suko-inline-stack {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.suko-duration-control .suko-input {
  max-width: 110px;
}

.suko-duration-control .suko-select {
  width: auto;
}

.suko-service-specific-hours {
  display: grid;
  gap: 12px;
}

.suko-tax-category-form-new {
  display: grid;
  gap: 14px;
}

.suko-legacy-panel {
  display: grid;
  gap: 12px;
}

.suko-legacy-panel .settings-subview-form {
  border: 0;
  box-shadow: none;
  padding: 0;
}

.workspace-root.is-restaurant-location-view,
.workspace-root.is-restaurant-website-view,
.workspace-root.is-pickup-view,
.workspace-root.is-delivery-view,
.workspace-root.is-reservation-view,
.workspace-root.is-dine-in-view,
.workspace-root.is-opening-hours-view,
.workspace-root.is-planned-orders-view,
.workspace-root.is-tax-view,
.workspace-root.is-payment-methods-view,
.workspace-root.is-tip-settings-view,
.workspace-root.is-trash-view {
  align-items: flex-start;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: clamp(45px, 5vh, 65px);
}

.workspace-root.is-menu-view #leftColumn,
.workspace-root.is-restaurant-location-view #leftColumn,
.workspace-root.is-restaurant-location-view #rightColumn,
.workspace-root.is-restaurant-website-view #leftColumn,
.workspace-root.is-restaurant-website-view #rightColumn,
.workspace-root.is-pickup-view #leftColumn,
.workspace-root.is-pickup-view #rightColumn,
.workspace-root.is-delivery-view #leftColumn,
.workspace-root.is-delivery-view #rightColumn,
.workspace-root.is-reservation-view #leftColumn,
.workspace-root.is-reservation-view #rightColumn,
.workspace-root.is-dine-in-view #leftColumn,
.workspace-root.is-dine-in-view #rightColumn,
.workspace-root.is-opening-hours-view #leftColumn,
.workspace-root.is-opening-hours-view #rightColumn,
.workspace-root.is-planned-orders-view #leftColumn,
.workspace-root.is-planned-orders-view #rightColumn,
.workspace-root.is-tax-view #leftColumn,
.workspace-root.is-tax-view #rightColumn,
.workspace-root.is-payment-methods-view #leftColumn,
.workspace-root.is-payment-methods-view #rightColumn,
.workspace-root.is-tip-settings-view #leftColumn,
.workspace-root.is-tip-settings-view #rightColumn,
.workspace-root.is-trash-view #leftColumn,
.workspace-root.is-trash-view #rightColumn {
  display: none;
}

.workspace-root.is-restaurant-location-view #centerColumn,
.workspace-root.is-restaurant-website-view #centerColumn,
.workspace-root.is-pickup-view #centerColumn,
.workspace-root.is-delivery-view #centerColumn,
.workspace-root.is-reservation-view #centerColumn,
.workspace-root.is-dine-in-view #centerColumn,
.workspace-root.is-opening-hours-view #centerColumn,
.workspace-root.is-planned-orders-view #centerColumn,
.workspace-root.is-tax-view #centerColumn,
.workspace-root.is-payment-methods-view #centerColumn,
.workspace-root.is-tip-settings-view #centerColumn,
.workspace-root.is-trash-view #centerColumn {
  max-width: 760px;
  overflow: visible;
  padding-right: 0;
  width: min(100%, 760px);
}

.column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-gutter: stable;
}

/* Suko Admin UI Foundation - reusable settings primitives.
   Scope new primitives through .foundation-* so Admin Menu remains untouched. */
.foundation-page {
  width: 100%;
}

.foundation-page form {
  display: block;
}

.foundation-page-head {
  align-items: flex-start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 15px;
}

.foundation-page-head h1 {
  color: var(--foundation-text);
  font-family: var(--foundation-font);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0;
}

.foundation-page-head p {
  color: var(--foundation-muted);
  font-family: var(--foundation-font);
  font-size: 12.5px;
  font-weight: 400;
  line-height: var(--foundation-base-line);
  margin: 4px 0 0;
}

.foundation-card {
  background: var(--foundation-surface);
  border: 1px solid var(--foundation-line);
  border-radius: var(--foundation-radius);
  box-shadow: var(--foundation-shadow);
  color: var(--foundation-text);
  font-family: var(--foundation-font);
  overflow: hidden;
  width: 100%;
}

.foundation-card + .foundation-card {
  margin-top: 14px;
}

.foundation-card-head {
  align-items: center;
  background: var(--foundation-surface);
  border-bottom: 1px solid var(--foundation-line);
  border-left: 0;
  border-right: 0;
  border-top: 0;
  color: var(--foundation-text);
  cursor: pointer;
  display: flex;
  font-family: var(--foundation-font);
  gap: 16px;
  justify-content: space-between;
  min-height: 0;
  padding: 14px 17px;
  text-align: left;
  width: 100%;
}

.foundation-card-head h2 {
  color: var(--foundation-text);
  font-family: var(--foundation-font);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.foundation-card-toggle {
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--foundation-brand-dark);
  font-size: 12px;
  font-weight: 550;
  min-height: 28px;
  padding: 4px 9px;
}

.foundation-card-body {
  padding: 17px;
}

.foundation-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--foundation-line-strong);
  border-radius: 6px;
  color: #34434c;
  display: inline-flex;
  font-family: var(--foundation-font);
  font-size: 12.5px;
  font-weight: 550;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
}

.foundation-button:hover {
  background: #fafcfc;
  border-color: #aeb9c0;
}

.foundation-button-primary {
  background: var(--foundation-brand);
  border-color: var(--foundation-brand);
  color: #fff;
  font-weight: 550;
}

.foundation-button-primary:hover {
  background: var(--foundation-brand-dark);
  border-color: var(--foundation-brand-dark);
}

.foundation-button-secondary {
  background: var(--foundation-surface);
  border-color: var(--foundation-line-strong);
  color: var(--foundation-text);
}

.foundation-button-small {
  font-size: 12px;
  min-height: 28px;
  padding: 4px 9px;
  width: max-content;
}

.foundation-button-icon {
  min-height: 30px;
  padding: 0;
  width: 30px;
}

.foundation-form-grid {
  display: grid;
  gap: 14px 16px;
  grid-template-columns: 1fr 1fr;
}

.foundation-field {
  min-width: 0;
}

.foundation-field.is-full {
  grid-column: 1 / -1;
}

.foundation-field-label {
  color: #46545d;
  display: block;
  font-family: var(--foundation-font);
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.35;
  margin: 0 0 5px;
}

.foundation-field-control {
  display: grid;
  gap: 0;
  min-width: 0;
}

.foundation-field-control input,
.foundation-field-control select,
.foundation-field-control textarea {
  background: #fff;
  border: 1px solid var(--foundation-line-strong);
  border-radius: 5px;
  color: var(--foundation-text);
  font-family: var(--foundation-font);
  font-size: 13px;
  font-weight: 400;
  line-height: var(--foundation-base-line);
  min-height: var(--foundation-control-height);
  padding: var(--foundation-control-padding);
  width: 100%;
}

.foundation-field-control input:focus,
.foundation-field-control select:focus,
.foundation-field-control textarea:focus {
  border-color: var(--foundation-brand);
  box-shadow: 0 0 0 3px rgba(23, 111, 91, 0.11);
  outline: none;
}

.foundation-field-help {
  color: var(--foundation-quiet);
  font-family: var(--foundation-font);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.35;
  margin: 4px 0 0;
}

.foundation-required {
  color: var(--foundation-danger);
  font-weight: 800;
}

.foundation-phone-list.phone-list {
  display: grid;
  gap: 8px;
}

.foundation-phone-row.phone-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(80px, 0.55fr) minmax(160px, 1fr) 32px;
}

.foundation-phone-row.phone-row input {
  min-height: var(--foundation-control-height);
  padding: var(--foundation-control-padding);
}

/* Foundation rollout compatibility skin for existing Settings pages.
   This keeps established form/action hooks intact while matching the accepted
   Adresse density. It is scoped away from Admin Menu internals. */
.topbar {
  background: var(--foundation-surface);
  border-bottom-color: var(--foundation-line);
  font-family: var(--foundation-font);
  min-height: 70px;
  padding: 11px 24px;
}

.topbar h1 {
  color: var(--foundation-text);
  font-size: 15px;
  font-weight: 600;
}

.global-rail {
  background: var(--foundation-surface);
  border-right-color: var(--foundation-line);
  font-family: var(--foundation-font);
  gap: 10px;
  padding: 20px 10px;
}

.rail-mark {
  border-color: var(--foundation-line);
  border-radius: 7px;
  color: var(--foundation-brand-dark);
  font-size: 13px;
  font-weight: 650;
}

.rail-button {
  border-left-color: transparent;
  color: var(--foundation-muted);
  font-size: 18px;
  height: 42px;
}

.rail-button.is-active {
  border-left-color: var(--foundation-brand);
  color: var(--foundation-brand);
}

.module-nav {
  background: var(--foundation-surface);
  border-right-color: var(--foundation-line);
  font-family: var(--foundation-font);
  padding: 20px 14px 28px;
}

.module-title {
  border-bottom-color: var(--foundation-line);
  margin: 0 8px 15px;
  padding-bottom: 15px;
}

.module-title .eyebrow {
  color: var(--foundation-quiet);
  font-family: var(--foundation-font);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.settings-nav-tree {
  gap: 1px;
}

.settings-nav-row {
  border-radius: 6px;
  color: #38464f;
  font-family: var(--foundation-font);
  font-size: 12.5px;
  font-weight: 400;
  min-height: 31px;
  padding: 7px 9px;
}

.settings-nav-row:hover {
  background: #f3f6f7;
}

.settings-nav-row.is-active {
  background: var(--foundation-brand-soft, #eaf5f1);
  color: var(--foundation-brand-dark);
  font-weight: 600;
}

.settings-nav-row.is-active::before {
  display: none;
}

.settings-nav-row.nav-parent {
  color: #38464f;
  font-weight: 550;
  margin-top: 10px;
}

.settings-nav-children {
  border-left-color: var(--foundation-line);
  gap: 1px;
  margin: 1px 0 4px 8px;
  padding-left: 12px;
}

.nav-badge {
  color: var(--foundation-brand-dark);
  font-size: 11px;
  font-weight: 600;
}

.workspace-root.is-foundation-settings .settings-card {
  background: var(--foundation-surface);
  border: 1px solid var(--foundation-line);
  border-radius: var(--foundation-radius);
  box-shadow: var(--foundation-shadow);
  color: var(--foundation-text);
  font-family: var(--foundation-font);
  overflow: hidden;
}

.workspace-root.is-foundation-settings .settings-card-head {
  border-bottom-color: var(--foundation-line);
  gap: 16px;
  min-height: 0;
  padding: 14px 17px;
}

.workspace-root.is-foundation-settings .settings-card-head h2 {
  color: var(--foundation-text);
  font-family: var(--foundation-font);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
}

.workspace-root.is-foundation-settings .settings-card-head .help {
  color: var(--foundation-muted);
  font-size: 12.5px;
  font-weight: 400;
  line-height: var(--foundation-base-line);
  margin-top: 4px;
}

.workspace-root.is-foundation-settings .settings-section {
  border: 1px solid var(--foundation-line);
  border-radius: var(--foundation-radius);
  box-shadow: var(--foundation-shadow);
  margin: 14px 17px;
  overflow: hidden;
}

.workspace-root.is-foundation-settings .settings-section:last-child {
  margin-bottom: 17px;
}

.workspace-root.is-foundation-settings .settings-section-title {
  background: var(--foundation-surface);
  min-height: 0;
  padding: 14px 17px;
}

.workspace-root.is-foundation-settings .settings-section-title h3 {
  color: var(--foundation-text);
  font-family: var(--foundation-font);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
}

.workspace-root.is-foundation-settings .settings-section-body {
  border-top: 1px solid var(--foundation-line);
}

.workspace-root.is-foundation-settings .settings-form-grid {
  border-top: 0;
  gap: 14px 16px;
  grid-template-columns: 1fr 1fr;
  padding: 17px;
}

.workspace-root.is-foundation-settings .settings-form-grid label,
.workspace-root.is-foundation-settings .setting-row > label,
.workspace-root.is-foundation-settings .label {
  color: #46545d;
  font-family: var(--foundation-font);
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.35;
}

.workspace-root.is-foundation-settings .settings-form-grid input,
.workspace-root.is-foundation-settings .settings-form-grid select,
.workspace-root.is-foundation-settings .settings-form-grid textarea,
.workspace-root.is-foundation-settings .settings-rows input,
.workspace-root.is-foundation-settings .settings-rows select,
.workspace-root.is-foundation-settings .settings-rows textarea,
.workspace-root.is-foundation-settings .readonly-grid,
.workspace-root.is-foundation-settings .inline-ops-form input,
.workspace-root.is-foundation-settings .inline-ops-form select,
.workspace-root.is-foundation-settings .phone-row input,
.workspace-root.is-foundation-settings .special-service-editor-head select {
  background: #fff;
  border: 1px solid var(--foundation-line-strong);
  border-radius: 5px;
  color: var(--foundation-text);
  font-family: var(--foundation-font);
  font-size: 13px;
  font-weight: 400;
  line-height: var(--foundation-base-line);
  min-height: var(--foundation-control-height);
  padding: var(--foundation-control-padding);
}

.workspace-root.is-foundation-settings input:focus,
.workspace-root.is-foundation-settings select:focus,
.workspace-root.is-foundation-settings textarea:focus {
  border-color: var(--foundation-brand);
  box-shadow: 0 0 0 3px rgba(23, 111, 91, 0.11);
  outline: none;
}

.workspace-root.is-foundation-settings .settings-rows {
  gap: 0;
  padding: 17px;
}

.workspace-root.is-foundation-settings .setting-row {
  border-top-color: var(--foundation-line);
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.72fr);
  min-height: 43px;
  padding: 11px 0;
}

.workspace-root.is-foundation-settings .setting-control {
  gap: 8px;
}

.workspace-root.is-foundation-settings .settings-note,
.workspace-root.is-foundation-settings .field-hint,
.workspace-root.is-foundation-settings .map-summary span,
.workspace-root.is-foundation-settings .row-main span,
.workspace-root.is-foundation-settings .ops-row span {
  color: var(--foundation-muted);
  font-family: var(--foundation-font);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.35;
}

.workspace-root.is-foundation-settings .settings-note {
  border-top-color: var(--foundation-line);
  padding: 0 17px 17px;
}

.workspace-root.is-foundation-settings .primary-button,
.workspace-root.is-foundation-settings .ghost-button,
.workspace-root.is-foundation-settings .danger-button,
.workspace-root.is-foundation-settings .link-button,
.workspace-root.is-foundation-settings .icon-button {
  font-family: var(--foundation-font);
}

.workspace-root.is-foundation-settings .primary-button,
.workspace-root.is-foundation-settings .ghost-button,
.workspace-root.is-foundation-settings .danger-button {
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 550;
  min-height: 32px;
  padding: 6px 12px;
}

.workspace-root.is-foundation-settings .primary-button,
.workspace-root.is-foundation-settings .settings-primary {
  background: var(--foundation-brand);
  border-color: var(--foundation-brand);
  color: #fff;
  font-weight: 550;
}

.workspace-root.is-foundation-settings .primary-button:hover,
.workspace-root.is-foundation-settings .settings-primary:hover {
  background: var(--foundation-brand-dark);
  border-color: var(--foundation-brand-dark);
}

.workspace-root.is-foundation-settings .ghost-button {
  background: #fff;
  border-color: var(--foundation-line-strong);
  color: #34434c;
}

.workspace-root.is-foundation-settings .ghost-button:hover {
  background: #fafcfc;
  border-color: #aeb9c0;
  transform: none;
}

.workspace-root.is-foundation-settings .danger-button {
  background: #fff;
  border: 1px solid #e0baba;
  color: var(--foundation-danger);
}

.workspace-root.is-foundation-settings .segmented-toggle {
  border-color: var(--foundation-line-strong);
  border-radius: 6px;
}

.workspace-root.is-foundation-settings .segmented-toggle span {
  color: var(--foundation-text);
  font-size: 12px;
  font-weight: 500;
  min-height: 31px;
  min-width: 52px;
  padding: 5px 13px;
}

.workspace-root.is-foundation-settings .segmented-toggle label:has(input:checked) span {
  background: var(--foundation-brand);
  color: #fff;
}

.workspace-root.is-foundation-settings .switch-control {
  height: 19px;
  width: 34px;
}

.workspace-root.is-foundation-settings .switch-control::after {
  height: 15px;
  left: 2px;
  top: 2px;
  width: 15px;
}

.workspace-root.is-foundation-settings .switch-row input:checked + .switch-control {
  background: var(--foundation-brand);
}

.workspace-root.is-foundation-settings .switch-row input:checked + .switch-control::after {
  transform: translateX(15px);
}

.workspace-root.is-foundation-settings .unit-box {
  background: var(--foundation-soft);
  border-color: var(--foundation-line-strong);
  color: var(--foundation-muted);
  font-size: 12px;
  min-height: var(--foundation-control-height);
  padding: 0 9px;
}

.workspace-root.is-foundation-settings .value-unit-control,
.workspace-root.is-foundation-settings .time-pair,
.workspace-root.is-foundation-settings .pause-duration {
  gap: 6px;
}

.workspace-root.is-foundation-settings .ops-group {
  padding: 8px 17px 16px;
}

.workspace-root.is-foundation-settings .ops-group-head h4,
.workspace-root.is-foundation-settings .special-day-box h4,
.workspace-root.is-foundation-settings .subview-head h3 {
  color: var(--foundation-text);
  font-family: var(--foundation-font);
  font-size: 13px;
  font-weight: 600;
}

.workspace-root.is-foundation-settings .ops-row,
.workspace-root.is-foundation-settings .special-service-row {
  border-color: var(--foundation-line);
  border-radius: 6px;
  font-family: var(--foundation-font);
  min-height: 43px;
  padding: 8px 11px;
}

.workspace-root.is-foundation-settings .summary-row strong,
.workspace-root.is-foundation-settings .row-main strong,
.workspace-root.is-foundation-settings .ops-row strong {
  color: var(--foundation-text);
  font-size: 12.5px;
  font-weight: 550;
}

.workspace-root.is-foundation-settings .icon-button {
  border: 1px solid transparent;
  color: var(--foundation-muted);
  font-size: 16px;
  height: 30px;
  width: 30px;
}

.workspace-root.is-foundation-settings .icon-button:hover {
  background: var(--foundation-soft);
  color: var(--foundation-brand-dark);
}

.workspace-root.is-foundation-settings .subview-head.inline,
.workspace-root.is-foundation-settings .special-day-box,
.workspace-root.is-foundation-settings .google-map-wrap,
.workspace-root.is-foundation-settings .summary-block,
.workspace-root.is-foundation-settings .top-toggle-row {
  border-color: var(--foundation-line);
}

.workspace-root.is-foundation-settings .subview-head.inline {
  min-height: 0;
  padding: 14px 17px;
}

.workspace-root.is-foundation-settings .weekday-picker {
  gap: 5px;
  padding: 17px 17px 4px;
}

.workspace-root.is-foundation-settings .weekday-picker span {
  border-color: var(--foundation-line-strong);
  font-size: 11.5px;
  min-height: 30px;
  min-width: 34px;
}

.workspace-root.is-foundation-settings .weekday-picker label:has(input:checked) span {
  background: var(--foundation-brand);
  border-color: var(--foundation-brand);
}

.workspace-root.is-foundation-settings .add-row-button {
  margin: 14px 17px 10px;
}

.workspace-root.is-foundation-settings .map-settings-card {
  max-width: var(--foundation-card-width);
}

.workspace-root.is-foundation-settings .map-summary {
  padding: 17px 17px 0;
}

.workspace-root.is-foundation-settings .google-map-wrap {
  padding: 17px 17px 0;
}

.workspace-root.is-foundation-settings .google-map-stage {
  border-color: var(--foundation-line-strong);
  border-radius: 6px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(1.35rem, 2vw, 1.95rem);
  line-height: 1.05;
}

h2 {
  font-size: 1.05rem;
  line-height: 1.15;
}

h3 {
  font-size: 0.95rem;
  line-height: 1.25;
}

.muted,
.auth-status,
.help {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.auth-status.is-error,
.danger-text {
  color: var(--warning);
}

.session-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.connection-dot {
  border-radius: 999px;
  display: inline-flex;
  height: 12px;
  width: 12px;
}

.connection-dot.is-idle {
  background: #98a29a;
}

.connection-dot.is-ok {
  background: #2f9d66;
  box-shadow: 0 0 0 5px rgba(47, 157, 102, 0.16);
}

.connection-dot.is-error {
  background: #c45139;
  box-shadow: 0 0 0 5px rgba(196, 81, 57, 0.16);
}

.banner {
  background: #fff5f0;
  border: 1px solid rgba(163, 73, 47, 0.26);
  border-radius: 12px;
  margin-bottom: 10px;
  padding: 9px 12px;
}

.stack {
  display: grid;
  gap: 6px;
}

.surface-card,
.panel-header-card {
  padding: 9px 10px;
}

.settings-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 3px 12px rgba(34, 27, 14, 0.16);
  color: #454545;
  width: 100%;
}

.settings-card-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 72px;
  padding: 18px 28px;
}

.settings-card-head h2 {
  font-size: 1.05rem;
  font-weight: 650;
}

.settings-primary {
  background: #f28a16;
  border-color: #f28a16;
  min-width: 86px;
}

.settings-primary:hover {
  background: #db790d;
  border-color: #db790d;
}

.settings-section {
  border: 1px solid var(--line);
  border-radius: 5px;
  margin: 12px 28px;
}

.settings-section:last-child {
  margin-bottom: 28px;
}

.settings-section-title {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  min-height: 50px;
  padding: 14px 26px;
  text-align: left;
  width: 100%;
}

.settings-section-title h3 {
  color: #626262;
  font-size: 0.94rem;
  font-weight: 650;
}

.settings-section-title.static-title {
  cursor: default;
}

.readonly-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.settings-inline-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-hint {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.section-chevron {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.settings-form-grid {
  border-top: 1px solid rgba(36, 48, 40, 0.08);
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(260px, 1.15fr);
  gap: 18px 24px;
  padding: 22px 26px 26px;
}

.settings-form-grid label {
  align-self: center;
  color: #626262;
  font-size: 0.92rem;
}

.settings-form-grid input,
.settings-form-grid select,
.settings-rows textarea,
.settings-rows input,
.settings-rows select,
.readonly-grid {
  background: #fff;
  border: 1px solid #cfd3d6;
  border-radius: 5px;
  color: #626262;
  min-height: 44px;
  padding: 10px 14px;
  width: 100%;
}

.settings-rows textarea {
  min-height: 88px;
  resize: vertical;
}

.settings-rows {
  display: grid;
  gap: 0;
  padding: 16px 26px 18px;
}

.setting-row {
  align-items: center;
  border-top: 1px solid rgba(36, 48, 40, 0.08);
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(230px, 1fr) minmax(220px, 0.9fr);
  min-height: 62px;
  padding: 12px 0;
}

.setting-row:first-child {
  border-top: 0;
}

.setting-row > label {
  color: #565d58;
  font-size: 0.93rem;
}

.setting-control {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.segmented-toggle {
  align-items: center;
  border: 1px solid #cfd3d6;
  border-radius: 5px;
  display: inline-flex;
  overflow: hidden;
}

.segmented-toggle label {
  cursor: pointer;
  margin: 0;
}

.segmented-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-toggle span {
  background: #fff;
  color: #626262;
  display: block;
  font-weight: 650;
  min-width: 58px;
  padding: 10px 16px;
  text-align: center;
}

.segmented-toggle label:has(input:checked) span {
  background: #51b85d;
  color: #fff;
}

.switch-row {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  gap: 10px;
}

.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-control {
  background: #cfd3d6;
  border-radius: 999px;
  display: inline-block;
  height: 28px;
  position: relative;
  width: 50px;
}

.switch-control::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  content: "";
  height: 22px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: transform 0.15s ease;
  width: 22px;
}

.switch-row input:checked + .switch-control {
  background: #51b85d;
}

.switch-row input:checked + .switch-control::after {
  transform: translateX(22px);
}

.value-unit-control,
.time-pair,
.pause-duration {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.pause-duration select:disabled {
  opacity: 0.5;
}

.value-unit-control input {
  max-width: 110px;
}

.value-unit-control select {
  max-width: 140px;
}

.unit-box {
  align-items: center;
  background: #f4f4f2;
  border: 1px solid #cfd3d6;
  border-radius: 5px;
  color: #777;
  display: inline-flex;
  min-height: 44px;
  padding: 0 14px;
}

.settings-note.inline {
  border: 0;
  padding: 0;
}

.inline-ops-form {
  border-top: 1px solid rgba(36, 48, 40, 0.08);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) 90px 120px 120px auto;
  padding: 22px 26px 10px;
}

.inline-ops-form input,
.inline-ops-form select {
  background: #fff;
  border: 1px solid #cfd3d6;
  border-radius: 5px;
  color: #626262;
  min-height: 38px;
  padding: 8px 10px;
}

.ops-group {
  padding: 8px 26px 16px;
}

.ops-group-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ops-group h4 {
  color: #626262;
  font-size: 0.88rem;
  margin-bottom: 0;
}

.ops-list {
  display: grid;
  gap: 7px;
}

.ops-row {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(36, 48, 40, 0.1);
  border-radius: 5px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(70px, 0.35fr) minmax(160px, 1fr) auto;
  min-height: 42px;
  padding: 8px 10px;
}

.summary-row {
  grid-template-columns: minmax(230px, 1fr) minmax(120px, 0.45fr) auto;
}

.summary-row strong {
  font-weight: 650;
}

.row-actions {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  justify-content: flex-end;
}

.icon-actions {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  justify-content: flex-end;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #6b6f6c;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 700;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.icon-button:hover {
  background: rgba(31, 118, 92, 0.08);
  color: #1f765c;
}

.link-button {
  background: transparent;
  border: 0;
  color: #48ad55;
  cursor: pointer;
  font-weight: 650;
  padding: 6px 0;
  text-decoration: underline;
}

.summary-block {
  border-top: 1px solid rgba(36, 48, 40, 0.08);
  padding-top: 16px;
}

.summary-block:first-child {
  border-top: 0;
}

.service-specific-switch {
  margin: 0 26px;
}

.service-specific-hours.is-hidden {
  display: none;
}

.add-row-button {
  margin: 16px 26px 10px;
}

.settings-subview-form {
  padding: 0 0 18px;
}

.subview-head.inline {
  align-items: center;
  border-bottom: 1px solid rgba(36, 48, 40, 0.08);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  min-height: 60px;
  padding: 14px 26px;
}

.subview-head h3 {
  color: #4a4f4b;
  font-size: 1rem;
  font-weight: 650;
}

.weekday-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 26px 4px;
}

.weekday-picker label {
  cursor: pointer;
}

.weekday-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.weekday-picker span {
  align-items: center;
  border: 1px solid #cfd3d6;
  border-radius: 5px;
  display: inline-flex;
  font-weight: 650;
  justify-content: center;
  min-height: 38px;
  min-width: 44px;
  padding: 0 10px;
}

.weekday-picker label:has(input:checked) span {
  background: #1f765c;
  border-color: #1f765c;
  color: #fff;
}

.radio-stack.compact,
.checkbox-stack.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-stack.compact label,
.checkbox-stack.compact label {
  align-items: center;
  border: 1px solid #d7dbd8;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
}

.radio-stack.compact input,
.checkbox-stack.compact input {
  min-height: auto;
  width: auto;
}

.date-range-control,
.special-service-editor-head,
.range-editor-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.date-range-control input {
  max-width: 180px;
}

.special-day-box {
  border-top: 1px solid rgba(36, 48, 40, 0.08);
  display: grid;
  gap: 12px;
  padding: 18px 26px;
}

.special-day-box h4 {
  color: #4a4f4b;
  font-size: 0.94rem;
  font-weight: 650;
}

.special-service-summary {
  display: grid;
  gap: 8px;
}

.special-service-row {
  align-items: start;
  border-bottom: 1px solid rgba(36, 48, 40, 0.08);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(160px, 0.45fr) minmax(180px, 1fr) auto;
  padding: 8px 0;
}

.special-service-row:last-child {
  border-bottom: 0;
}

.special-service-editor {
  border: 1px solid #d7dbd8;
  border-radius: 5px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.special-service-editor-head {
  align-items: stretch;
}

.special-service-editor-head select {
  max-width: 360px;
}

.range-editor-list {
  display: grid;
  gap: 10px;
}

.range-editor-row input {
  max-width: 110px;
}

.settings-card-actions.compact {
  border-top: 0;
  justify-content: flex-start;
  padding: 0;
}

.add-service-button {
  justify-self: start;
}

.top-toggle-row {
  border-bottom: 1px solid rgba(36, 48, 40, 0.08);
}


.checkbox-stack {
  display: grid;
  gap: 8px;
}

.readonly-grid {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.settings-note {
  border-top: 1px solid rgba(36, 48, 40, 0.08);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 0 26px 18px;
}

.required-mark {
  color: #cf3f2f;
  font-weight: 800;
}

.phone-list {
  display: grid;
  gap: 8px;
}

.phone-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(80px, 0.55fr) minmax(160px, 1fr) 32px;
}

.phone-row input {
  background: #fff;
  border: 1px solid #cfd3d6;
  border-radius: 5px;
  color: #626262;
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
}

.map-settings-card {
  max-width: 860px;
}

.map-summary {
  display: grid;
  gap: 5px;
  padding: 18px 28px 0;
}

.map-summary span {
  color: var(--muted);
  font-size: 0.88rem;
}

.google-map-wrap {
  border-top: 1px solid rgba(36, 48, 40, 0.08);
  padding: 22px 26px 0;
}

.google-map-stage {
  background: #edf0ec;
  border: 1px solid #cfd8cf;
  border-radius: 6px;
  display: block;
  height: 320px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.map-status {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 10px;
}

.map-empty-state {
  border-top: 1px solid rgba(36, 48, 40, 0.08);
  color: var(--muted);
  display: grid;
  gap: 6px;
  padding: 22px 26px 4px;
}

.map-empty-state strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.compact-location-grid {
  margin: 0;
}

.settings-card-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 26px 22px;
}

.trash-workspace .trash-panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: 22px 28px 28px;
}

.compact-pane {
  gap: 8px;
}

.sidebar-brand {
  padding-bottom: 11px;
}

.side-nav {
  display: grid;
  gap: 5px;
}

.nav-row {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.84rem;
  padding: 7px 9px;
  text-align: left;
}

.nav-row.is-active {
  background: rgba(30, 109, 80, 0.08);
  border-color: rgba(30, 109, 80, 0.28);
  color: var(--green-deep);
  font-weight: 700;
}

.selection-list {
  display: grid;
  gap: 5px;
}

.selection-list div {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.selection-list span {
  color: var(--muted);
  font-size: 0.77rem;
}

.primary-button,
.ghost-button,
.tool-button,
.menu-button,
.nav-row,
.drag-handle,
.modal-section-toggle {
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.primary-button,
.ghost-button,
.menu-button {
  border-radius: 6px;
  min-height: 32px;
  padding: 7px 10px;
}

.primary-button {
  background: var(--green);
  border: 1px solid var(--green);
  color: #fff;
  font-weight: 700;
}

.primary-button:hover {
  background: var(--green-deep);
  border-color: var(--green-deep);
}

.ghost-button,
.menu-button {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  color: var(--ink);
}

.ghost-button:hover,
.menu-button:hover,
.tool-button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.tiny-button {
  min-height: 28px;
  padding: 5px 9px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button-row select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  min-height: 28px;
  padding: 5px 8px;
}

.danger-button {
  border: 1px solid #d9534f;
  background: #fff4f3;
  color: #a82824;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.danger-button:hover {
  background: #ffe4e1;
}

.trash-panel {
  border-color: #ffd8d2;
}

.trash-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.trash-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf9;
}

.trash-row strong {
  display: block;
  margin-top: 4px;
}

.section-list,
.group-list,
.item-list,
.member-list {
  display: grid;
  gap: 6px;
}

.entity-card {
  overflow: visible;
  padding: 7px 8px;
  position: relative;
}

.entity-card.is-selected {
  border-color: rgba(30, 109, 80, 0.28);
  box-shadow: 0 8px 24px rgba(20, 55, 44, 0.1);
}

.group-card.is-selected {
  background: linear-gradient(90deg, rgba(30, 109, 80, 0.08), var(--surface) 42%);
}

.entity-card.is-drop-hover {
  border-color: rgba(169, 125, 47, 0.48);
  box-shadow: inset 0 0 0 2px rgba(169, 125, 47, 0.16);
}

.entity-card.is-menu-open {
  z-index: 5;
}

.row-shell {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
}

.drag-handle {
  align-self: center;
  background: transparent;
  border: 1px dashed transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
  height: 28px;
  min-width: 24px;
  opacity: 0;
  padding: 0;
  width: 24px;
}

.entity-card:hover .drag-handle,
.entity-card:focus-within .drag-handle,
.entity-card.is-selected .drag-handle {
  border-color: var(--line-strong);
  opacity: 1;
}

.entity-main {
  align-items: center;
  background: transparent;
  border: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  padding: 0;
  text-align: left;
}

.entity-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.entity-copy p,
.member-copy p {
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.32;
}

.entity-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.entity-title-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hover-tools {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
}

.group-card .row-shell {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.group-card .entity-main {
  min-width: 0;
}

.group-card .entity-title-row {
  flex-wrap: nowrap;
  min-width: 0;
}

.group-card .entity-title-row strong {
  display: block;
  white-space: nowrap;
}

.group-card .hover-tools {
  flex-wrap: nowrap;
  max-width: 100%;
}

.group-card:hover .hover-tools,
.group-card:focus-within .hover-tools,
.group-card.is-expanded .hover-tools,
.group-card.is-selected .hover-tools,
.group-card.is-menu-open .hover-tools {
  opacity: 1;
  pointer-events: auto;
}

.usage-count-row {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.78rem;
}

.group-card > .usage-count-row {
  margin: 3px 0 0 30px;
  min-width: 0;
}

.usage-link {
  background: transparent;
  border: 0;
  color: var(--green);
  font: inherit;
  font-weight: 800;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.usage-popover {
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 32px rgba(44, 31, 9, 0.14);
  display: grid;
  gap: 8px;
  margin-top: 6px;
  max-width: 100%;
  padding: 9px;
  position: relative;
  z-index: 12;
}

.usage-list {
  display: grid;
  gap: 4px;
}

.usage-popover-row {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  text-align: left;
}

.usage-popover-row span,
.usage-popover-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-popover-row small {
  color: var(--muted);
}

.compact-empty {
  padding: 8px;
}

.entity-card:hover .hover-tools,
.entity-card:focus-within .hover-tools,
.entity-card.is-selected .hover-tools,
.entity-card.is-menu-open .hover-tools {
  opacity: 1;
  pointer-events: auto;
}

.tool-button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  height: 26px;
  min-height: 26px;
  min-width: 26px;
  padding: 0;
}

.row-menu {
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 32px rgba(44, 31, 9, 0.14);
  display: grid;
  gap: 6px;
  padding: 8px;
  position: absolute;
  right: 8px;
  top: 32px;
  width: min(280px, calc(100vw - 24px));
  z-index: 15;
}

.menu-group {
  display: grid;
  gap: 5px;
}

.menu-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.menu-note {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.attached-row {
  margin-left: 32px;
  margin-top: 6px;
}

.subhead-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.tight-row {
  margin-bottom: 8px;
}

.section-body,
.group-body {
  display: grid;
  gap: 6px;
  margin-left: 32px;
  margin-top: 6px;
}

.meta-pill,
.chip {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-deep);
  display: inline-flex;
  font-size: 0.7rem;
  gap: 5px;
  min-height: 20px;
  padding: 1px 7px;
}

.warning-pill,
.warning-chip {
  background: #fff4ef;
  border-color: rgba(163, 73, 47, 0.2);
  color: var(--warning);
}

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

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-close {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 0.78rem;
  line-height: 1;
  padding: 0;
}

.price-line {
  color: var(--green-deep);
  font-size: 0.78rem;
  font-weight: 700;
}

.thumb {
  background: linear-gradient(135deg, rgba(30, 109, 80, 0.15), rgba(169, 125, 47, 0.18));
  border: 1px solid var(--line);
  border-radius: 10px;
  height: 46px;
  overflow: hidden;
  width: 46px;
}

.media-entry-thumb {
  cursor: pointer;
  padding: 0;
}

.media-entry-thumb:hover,
.media-entry-thumb:focus-visible {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(30, 109, 80, 0.12);
  outline: none;
}

.thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.thumb-empty {
  align-items: center;
  display: flex;
  justify-content: center;
}

.thumb-empty span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
}

.inline-editor {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding: 10px;
}

.compact-editor {
  margin-top: 8px;
}

.right-column-editor {
  gap: 10px;
  margin-left: 0;
}

.right-column-editor .editor-head {
  align-items: stretch;
  display: grid;
  grid-template-columns: 1fr;
}

.right-column-editor .editor-actions {
  justify-content: flex-start;
}

.right-column-editor .editor-grid.two-col,
.right-column-editor .editor-grid.three-col,
.right-column-editor .availability-grid,
.right-column-editor .status-action-grid {
  grid-template-columns: 1fr;
}

.right-column-editor .field textarea {
  min-height: 74px;
}

.right-column-editor .button-row {
  justify-content: flex-start;
}

.rules-panel {
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  padding: 9px;
}

.help-dot {
  background: rgba(30, 109, 80, 0.08);
  border: 1px solid rgba(30, 109, 80, 0.22);
  border-radius: 999px;
  color: var(--green-deep);
  font-size: 0.68rem;
  font-weight: 800;
  height: 18px;
  line-height: 1;
  margin-left: 3px;
  padding: 0;
  width: 18px;
}

.validation-message {
  background: #fff4ef;
  border: 1px solid rgba(163, 73, 47, 0.22);
  border-radius: 10px;
  color: var(--warning);
  font-size: 0.76rem;
  margin: 0;
  padding: 7px 9px;
}

.canonical-editor {
  border-color: rgba(30, 109, 80, 0.22);
}

.relation-editor {
  border-color: rgba(169, 125, 47, 0.22);
}

.editor-head {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.editor-grid {
  display: grid;
  gap: 8px;
}

.editor-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editor-grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.variant-grid {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(120px, 0.8fr);
}

.field {
  display: grid;
  gap: 4px;
}

.field span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  min-height: 32px;
  padding: 7px 9px;
  width: 100%;
}

.field select[data-role="option-select"] {
  min-height: 124px;
}

.field select[data-role="pi-source-select"] {
  min-height: 152px;
}

.checkbox-inline {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.warning-inline {
  background: #fff8f2;
  border: 1px dashed rgba(163, 73, 47, 0.22);
  border-radius: 10px;
  padding: 8px 10px;
}

.inline-note {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.editor-block {
  display: grid;
  gap: 8px;
}

.variant-row {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 6px;
  padding: 8px;
}

.variant-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.price-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.equal-price-field {
  display: none;
}

.price-grid.is-equal-mode {
  grid-template-columns: minmax(0, 1fr);
}

.price-grid.is-equal-mode .equal-price-field {
  display: grid;
}

.price-grid.is-equal-mode .split-price-field {
  display: none;
}

.placement-editor {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.placement-list {
  display: grid;
  gap: 6px;
}

.placement-row {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 7px 8px;
}

.placement-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.placement-copy span {
  color: var(--muted);
  font-size: 0.75rem;
}

.placement-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.group-body .member-list {
  gap: 6px;
}

.member-row {
  align-items: flex-start;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 8px;
}

.member-copy {
  display: grid;
  gap: 5px;
}

.member-side {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.member-tools {
  opacity: 1;
  pointer-events: auto;
}

.inline-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-pill {
  display: inline-flex;
}

.tab-pill input {
  display: none;
}

.tab-pill span {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  min-height: 34px;
  padding: 8px 14px;
}

.tab-pill input:checked + span {
  background: rgba(30, 109, 80, 0.08);
  border-color: rgba(30, 109, 80, 0.28);
  color: var(--green-deep);
  font-weight: 700;
}

.copy-row {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.modal-backdrop {
  align-items: center;
  background: rgba(20, 34, 28, 0.45);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 16px;
  position: fixed;
  z-index: 20;
}

.modal-card {
  max-height: calc(100vh - 44px);
  max-width: 680px;
  overflow: auto;
  padding: 14px;
  width: min(680px, 100%);
}

.modal-stack {
  display: grid;
  gap: 6px;
}

.modal-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.modal-section-toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.8);
  border: 0;
  color: var(--ink);
  display: flex;
  font-weight: 700;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

.modal-section-body {
  background: var(--surface-strong);
  border-top: 1px solid var(--line);
  padding: 8px 10px 10px;
}

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

.checkbox-card {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  gap: 8px;
  min-height: 36px;
  padding: 7px 9px;
}

.definition-copy {
  display: grid;
  gap: 2px;
}

.definition-code {
  color: var(--green-deep);
  font-size: 0.72rem;
  line-height: 1;
}

.definition-label {
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.25;
}

.empty-state {
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  padding: 10px;
  text-align: center;
}

.media-modal-card {
  max-width: calc(100vw - 32px);
  padding: 0;
  width: 640px;
}

.media-modal-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 16px 24px;
}

.media-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  margin: 0;
}

.media-modal-body {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.media-loading-state {
  align-items: center;
  background: #f4f5f6;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  justify-items: center;
  min-height: 220px;
  padding: 28px;
  text-align: center;
}

.media-loading-state strong {
  color: var(--ink);
}

.media-drop-zone {
  align-items: center;
  border: 1px dashed #b8c3cc;
  border-radius: 10px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  justify-items: center;
  min-height: 220px;
  padding: 28px;
  text-align: center;
}

.media-drop-zone.is-drop-hover {
  background: rgba(30, 109, 80, 0.06);
  border-color: var(--green);
  color: var(--green-deep);
}

.media-drop-zone input {
  max-width: 340px;
}

.crop-stage-wrap {
  background: #eef1f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.crop-canvas {
  display: block;
  max-width: 100%;
  width: 100%;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.zoom-field {
  margin: 0;
}

@media (max-width: 1240px) {
  .app-shell {
    grid-template-columns: 56px minmax(180px, 230px) minmax(0, 1fr);
    min-height: 100vh;
  }

  .workspace-root,
  .workspace-root.is-menu-view {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .workspace-root.is-menu-view #leftColumn {
    display: none;
  }

  .column {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

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

  .editor-grid.two-col,
  .editor-grid.three-col,
  .variant-grid,
  .price-grid,
  .copy-row {
    grid-template-columns: 1fr;
  }

  .section-body,
  .group-body,
  .attached-row {
    margin-left: 0;
  }

  .row-menu {
    left: 0;
    margin-top: 8px;
    position: static;
    right: auto;
    top: auto;
    width: 100%;
  }

  .row-shell {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .drag-handle {
    display: none;
  }

  .group-card > .usage-count-row {
    margin-left: 0;
  }

  .entity-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .thumb {
    height: 42px;
    width: 42px;
  }
}

@media (max-width: 860px) {
  .app-shell {
    height: auto;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .global-rail {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    flex-direction: row;
    justify-content: flex-start;
    padding: 10px 14px;
  }

  .rail-button {
    border-left: 0;
    border-bottom: 3px solid transparent;
    height: 42px;
    width: 48px;
  }

  .rail-button.is-active {
    border-bottom-color: var(--green);
  }

  .module-nav {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    max-height: none;
    padding: 18px;
  }

  .admin-workspace-shell,
  .workspace-root {
    overflow: visible;
  }

  .workspace-root.is-foundation-settings {
    padding: 22px 18px 44px;
  }

  .workspace-root.is-foundation-settings #centerColumn {
    max-width: 100%;
    width: 100%;
  }

  .settings-form-grid {
    grid-template-columns: 1fr;
  }

  .foundation-form-grid {
    grid-template-columns: 1fr;
  }

  .suko-address-phone-row {
    align-items: start;
    grid-template-columns: 1fr auto;
  }

  .suko-address-phone-row .suko-field {
    grid-column: 1 / -1;
  }

  .suko-address-phone-row .suko-icon-button {
    justify-self: start;
  }

  .setting-row,
  .summary-row,
  .subview-head.inline {
    grid-template-columns: 1fr;
  }

  .setting-control,
  .row-actions {
    justify-content: flex-start;
  }

  .settings-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .foundation-page-head,
  .foundation-card-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
