:root {
  color-scheme: light;
  font-family: var(--brand-font, "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif);
  font-synthesis: none;
  --brand-primary: #2563eb;
  --brand-secondary: #0f172a;
  --brand-accent: #f59e0b;
  --brand-on-primary: #fff;
  --bg: #f5f6f7;
  --surface: #fff;
  --surface-subtle: #f8f9fa;
  --surface-hover: #f1f3f5;
  --sidebar: #fff;
  --sidebar-hover: #f1f3f5;
  --sidebar-text: #181a1f;
  --sidebar-soft: #747b86;
  --text: #181a1f;
  --text-soft: #626873;
  --text-faint: #8f96a3;
  --border: #e2e5e9;
  --border-strong: #cfd4da;
  --danger: #c52c45;
  --success: #168254;
  --warning: #9a6700;
  --shadow-menu: 0 16px 36px rgba(20, 24, 32, .14);
  --shadow-panel: -18px 0 48px rgba(20, 24, 32, .16);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1114;
  --surface: #181a1e;
  --surface-subtle: #1e2126;
  --surface-hover: #25282e;
  --sidebar: #0a0b0e;
  --sidebar-hover: #17191e;
  --sidebar-text: #f5f6f7;
  --sidebar-soft: #878e9b;
  --text: #f2f3f5;
  --text-soft: #a6abb4;
  --text-faint: #777e89;
  --border: #2b2e34;
  --border-strong: #3b3f47;
  --danger: #ff7187;
  --success: #56c88f;
  --warning: #f0b429;
  --shadow-menu: 0 18px 42px rgba(0, 0, 0, .38);
  --shadow-panel: -18px 0 54px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }
html { min-width: 0; min-height: 100%; background: var(--bg); }
body { margin: 0; min-width: 0; min-height: 100vh; color: var(--text); background: var(--bg); }
body.support-open { overflow: hidden; }
html, body, #app { width: 100%; max-width: none; }
#app { min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-primary) 28%, transparent);
  outline-offset: 2px;
}
::selection { color: var(--brand-on-primary); background: var(--brand-primary); }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-faint) 55%, var(--border)) transparent; }
svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hidden, [hidden] { display: none !important; }
.loading { padding: 5rem 1rem; color: var(--text-soft); text-align: center; }

.control-help {
  display: inline-grid;
  width: 28px;
  height: 28px;
  min-width: 28px;
  place-items: center;
  border: 0;
  padding: 0;
  color: var(--text-faint);
  background: transparent;
  vertical-align: middle;
  transition: color .15s, transform .15s;
}
.control-help svg { width: 1rem; height: 1rem; stroke-width: 1.75; }
.control-help:hover, .control-help:focus-visible, .control-help[aria-expanded="true"] { color: var(--brand-primary); }
.control-help:active { transform: scale(.92); }
.control-help-tooltip {
  position: fixed;
  z-index: 100;
  width: max-content;
  max-width: min(300px, calc(100vw - 24px));
  border-radius: 8px;
  padding: .58rem .68rem;
  color: var(--surface);
  background: var(--text);
  box-shadow: 0 10px 28px rgba(15, 20, 28, .2);
  font-size: .72rem;
  font-weight: 580;
  line-height: 1.45;
  pointer-events: none;
}
.field-label-row, .inline-label-help, .compact-check-help, .availability-label-help, .search-help-row, .inline-control-help { min-width: 0; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.field-label-row > label { min-width: 0; }
.check-help-row { display: flex; align-items: flex-start; gap: .2rem; margin: 1rem 0; }
.check-help-row > .check { min-width: 0; flex: 1; margin: 0; }
.check-help-row > .control-help { margin-top: -.28rem; }
.compact-check-help, .availability-label-help { display: flex; align-items: center; gap: .15rem; }
.compact-check-help > .control-help, .availability-label-help > .control-help { flex: 0 0 28px; }
.service-checklist legend { display: flex; align-items: center; gap: .2rem; }
.inline-label-help { display: flex; align-items: flex-start; gap: .2rem; }
.inline-label-help > :first-child { min-width: 0; flex: 1; }
.search-help-row { display: flex; width: min(466px, 100%); align-items: center; gap: .2rem; }
.search-help-row > .collection-search { width: 100%; }
.inline-control-help { display: inline-flex; align-items: center; gap: .2rem; }
.inline-control-help > input, .inline-control-help > select, .inline-control-help > textarea { min-width: 0; flex: 1; }
.app-shell { min-height: 100vh; }
.admin-layout { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.app-main { min-width: 0; }

.side-nav {
  position: sticky;
  top: 0;
  display: flex;
  width: 256px;
  height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  padding: 1.25rem .85rem 1rem;
  border-right: 1px solid var(--border);
  color: var(--sidebar-text);
  background: var(--sidebar);
}
.side-brand { display: flex; min-height: 70px; align-items: center; padding: .35rem .55rem 1.35rem; }
.business-identity { display: flex; min-width: 0; align-items: center; gap: .85rem; }
.business-identity > div { display: grid; min-width: 0; gap: .16rem; }
.business-identity strong { overflow: hidden; font-size: .93rem; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.business-identity span { color: var(--sidebar-soft); font-size: .68rem; font-weight: 600; }
.brand-logo-set { display: inline-flex; position: relative; width: auto; min-width: 0; height: 40px; flex: 0 0 auto; align-items: center; }
.brand-logo { display: block; width: auto; height: 36px; max-width: 145px; object-fit: contain; border: 0; border-radius: 0; background: transparent; padding: 0; }
.brand-logo-set .brand-logo-fallback { display: none; }
html:not([data-theme="dark"]) .brand-logo-set.logo-light-missing .brand-logo-fallback,
html[data-theme="dark"] .brand-logo-set.logo-dark-missing .brand-logo-fallback { display: grid; }
.theme-logo-dark { display: none; }
html[data-theme="dark"] .theme-logo-light { display: none; }
html[data-theme="dark"] .theme-logo-dark { display: block; }
.side-brand .brand-logo-set { width: 100%; height: 46px; }
.side-brand .brand-logo { height: 42px; max-width: 190px; }
.brand-monogram { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 10px; color: var(--brand-on-primary); background: var(--brand-primary); font-size: .78rem; font-weight: 800; }

.side-nav nav { display: grid; gap: .18rem; }
.nav-group { display: grid; gap: .16rem; }
.nav-label { margin: 1.3rem .7rem .45rem; color: var(--sidebar-soft); font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.side-link {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  min-height: 42px;
  align-items: center;
  gap: .7rem;
  border: 0;
  border-radius: 9px;
  padding: .58rem .7rem;
  color: var(--sidebar-soft);
  background: transparent;
  text-align: left;
  font-size: .84rem;
  font-weight: 600;
  transition: color .16s, background .16s;
}
.side-link svg { width: 1rem; height: 1rem; }
.side-link:hover { color: var(--sidebar-text); background: var(--sidebar-hover); }
.side-link.active { color: var(--sidebar-text); background: var(--sidebar-hover); }
.side-link.active svg { color: var(--brand-primary); }
html[data-theme="dark"] .side-link.active svg { color: color-mix(in srgb, var(--brand-primary) 72%, white); }
.side-link b { min-width: 1.55rem; border-radius: 999px; padding: .12rem .4rem; color: var(--sidebar-text); background: var(--sidebar-hover); font-size: .66rem; font-variant-numeric: tabular-nums; text-align: center; }
.side-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 1.5rem .55rem 0; padding-top: 1rem; border-top: 1px solid var(--border); }
.side-footer img { display: block; width: auto; height: 18px; max-width: 105px; filter: brightness(0); opacity: .72; }
html[data-theme="dark"] .side-footer img { filter: brightness(0) invert(1); opacity: .82; }
.side-footer span { max-width: 85px; overflow: hidden; color: var(--sidebar-soft); font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }

.navbar {
  position: sticky;
  z-index: 12;
  top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 64px;
  align-items: center;
  gap: 1rem;
  padding: 0 clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
}
.menu-button { display: none !important; }
.mobile-identity { display: none; }
.page-context { display: grid; min-width: 0; line-height: 1.15; }
.page-context span { overflow: hidden; color: var(--text-faint); font-size: .66rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.page-context strong { font-size: .86rem; font-weight: 700; }
.nav-actions { display: flex; align-items: center; justify-content: flex-end; gap: .55rem; }
.user-chip { display: flex; min-width: 0; align-items: center; gap: .55rem; margin-left: .15rem; }
.user-chip > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: var(--brand-on-primary); background: var(--brand-primary); font-size: .68rem; font-weight: 800; }
.user-chip > div { display: grid; line-height: 1.18; }
.user-chip small { color: var(--text-faint); font-size: .62rem; }
.user-chip strong { max-width: 120px; overflow: hidden; font-size: .76rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--border); border-radius: 9px; color: var(--text-soft); background: var(--surface); transition: color .15s, border-color .15s, background .15s; }
.icon-button:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }

.theme-picker { position: relative; flex: 0 0 auto; }
.theme-trigger { display: flex; height: 38px; align-items: center; gap: .45rem; border: 1px solid var(--border); border-radius: 9px; padding: 0 .7rem; color: var(--text-soft); background: var(--surface); font-size: .76rem; font-weight: 650; }
.theme-trigger:hover { color: var(--text); border-color: var(--border-strong); }
.theme-trigger svg:last-child { width: .82rem; height: .82rem; color: var(--text-faint); transition: transform .15s; }
.theme-trigger[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }
.theme-menu { position: absolute; z-index: 40; top: calc(100% + .45rem); right: 0; width: 250px; border: 1px solid var(--border); border-radius: 11px; padding: .35rem; background: var(--surface); box-shadow: var(--shadow-menu); }
.theme-menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .75rem; border: 0; border-radius: 8px; padding: .65rem .7rem; color: var(--text); background: transparent; text-align: left; }
.theme-menu button:hover, .theme-menu button.selected { background: var(--surface-hover); }
.theme-menu button > span { display: grid; gap: .1rem; }
.theme-menu strong { font-size: .79rem; }
.theme-menu small { color: var(--text-soft); font-size: .68rem; }
.theme-menu button > svg { visibility: hidden; color: var(--brand-primary); }
.theme-menu button.selected > svg { visibility: visible; }

.app-picker { position: relative; flex: 0 0 auto; }
.app-trigger { display: flex; height: 38px; align-items: center; gap: .42rem; border: 1px solid var(--border); border-radius: 9px; padding: 0 .68rem; color: var(--text-soft); background: var(--surface); font-size: .76rem; font-weight: 700; }
.app-trigger:hover, .app-trigger[aria-expanded="true"] { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }
.app-menu { position: absolute; z-index: 42; top: calc(100% + .45rem); right: 0; width: min(360px, calc(100vw - 1.5rem)); overflow: hidden; border: 1px solid var(--border); border-radius: 12px; padding: .85rem; background: var(--surface); box-shadow: var(--shadow-menu); }
.app-menu-heading { display: grid; gap: .2rem; padding: .1rem .1rem .75rem; border-bottom: 1px solid var(--border); }
.app-menu-heading strong { font-size: .87rem; }
.app-menu-heading small { color: var(--text-soft); font-size: .69rem; line-height: 1.45; }
.app-status { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .78rem .1rem; border-bottom: 1px solid var(--border); }
.app-status > span { display: flex; min-width: 0; align-items: center; gap: .6rem; }
.app-status > span > svg { flex: 0 0 auto; color: var(--brand-primary); }
.app-status > span > span { display: grid; min-width: 0; gap: .08rem; }
.app-status small { color: var(--text-faint); font-size: .62rem; }
.app-status strong { overflow: hidden; font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; }
.app-status .btn svg { width: .9rem; height: .9rem; }
.app-message { margin: .75rem .1rem .1rem; color: var(--text-soft); font-size: .68rem; line-height: 1.45; }
.app-message[data-tone="success"] { color: var(--success); }
.app-message[data-tone="error"] { color: var(--danger); }
.app-message[data-tone="notice"] { color: var(--warning); }

.workspace { width: min(1160px, 100%); margin: 0 auto; padding: 2.4rem clamp(1rem, 4vw, 3rem) 5rem; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.8rem; }
.page-heading h1 { margin: 0 0 .38rem; font-size: 1.75rem; line-height: 1.18; letter-spacing: -.025em; }
.page-heading > div > p { max-width: 64ch; margin: 0; color: var(--text-soft); font-size: .91rem; line-height: 1.55; }
.page-actions { display: flex; align-items: center; gap: .55rem; }
.activity-heading { margin-bottom: 1.4rem; }

.collection-toolbar { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.collection-search { display: grid; width: min(430px, 100%); min-height: 42px; grid-template-columns: 20px minmax(0, 1fr) 32px; align-items: center; gap: .35rem; border: 1px solid var(--border); border-radius: 9px; padding: 0 .35rem 0 .7rem; color: var(--text-faint); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.collection-search:focus-within { border-color: var(--brand-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 14%, transparent); }
.collection-search > svg { width: 1rem; height: 1rem; }
.collection-search input { width: 100%; height: 40px; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: .82rem; }
.collection-search input::-webkit-search-cancel-button { display: none; }
.collection-search input::placeholder { color: var(--text-faint); }
.collection-search button { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 7px; color: var(--text-soft); background: transparent; }
.collection-search button:hover { color: var(--text); background: var(--surface-hover); }
.collection-count { flex: 0 0 auto; color: var(--text-soft); font-size: .73rem; font-variant-numeric: tabular-nums; }
.pagination-bar { display: grid; grid-template-columns: auto minmax(130px, 1fr) auto; align-items: center; gap: 1rem; margin-top: .75rem; color: var(--text-soft); font-size: .72rem; }
.pagination-bar > label { display: flex; align-items: center; gap: .45rem; }
.pagination-bar .inline-label-help > label { display: flex; align-items: center; gap: .45rem; }
.pagination-bar select { height: 34px; border: 1px solid var(--border); border-radius: 8px; padding: 0 1.7rem 0 .55rem; color: var(--text); background: var(--surface); font-size: .74rem; }
.pagination-bar > span { text-align: center; font-variant-numeric: tabular-nums; }
.page-controls { display: flex; align-items: center; justify-content: flex-end; gap: .28rem; }
.page-controls button { min-width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 8px; padding: 0 .58rem; color: var(--text-soft); background: var(--surface); font-size: .72rem; font-weight: 680; }
.page-controls button:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }
.page-controls button:disabled { cursor: not-allowed; opacity: .42; }
.page-controls .page-number { padding: 0; }
.page-controls .page-number.active { color: var(--brand-on-primary); border-color: var(--brand-primary); background: var(--brand-primary); }
.page-gap { min-width: 18px; color: var(--text-faint); text-align: center; }
.search-empty { min-height: 290px; }

.btn { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: .45rem; border: 1px solid transparent; border-radius: 9px; padding: .6rem .9rem; font-size: .82rem; font-weight: 700; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.btn:disabled { cursor: not-allowed; opacity: .5; }
.primary { color: var(--brand-on-primary); background: var(--brand-primary); }
.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--brand-primary) 88%, black); }
.secondary { color: var(--text); border-color: var(--border); background: var(--surface); }
.secondary:hover:not(:disabled) { border-color: var(--border-strong); background: var(--surface-hover); }
.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 28%, var(--border)); background: transparent; }
.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.small { min-height: 34px; padding: .42rem .68rem; font-size: .76rem; }
.wide { width: 100%; }

.dashboard-heading { margin-bottom: 1.55rem; padding-bottom: 1.55rem; border-bottom: 1px solid var(--border); }
.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: start; gap: 2rem; }
.overview-section { min-width: 0; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.section-heading h2, .summary-panel h2, .publish-note h2 { margin: 0 0 .25rem; font-size: .95rem; font-weight: 750; }
.section-heading p { margin: 0; color: var(--text-soft); font-size: .8rem; }
.module-list { border-top: 1px solid var(--border); }
.module-entry { display: grid; width: 100%; grid-template-columns: 24px minmax(0, 1fr) auto 22px; align-items: center; gap: .85rem; border: 0; border-bottom: 1px solid var(--border); padding: .88rem .2rem; color: var(--text); background: transparent; text-align: left; transition: background .15s; }
.module-entry:hover { background: var(--surface-subtle); }
.module-icon { display: grid; width: 24px; height: 24px; place-items: center; color: var(--brand-primary); }
.module-copy { display: grid; min-width: 0; gap: .16rem; }
.module-copy strong { font-size: .86rem; font-weight: 700; }
.module-copy small { overflow: hidden; color: var(--text-soft); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.module-count { border-radius: 999px; padding: .2rem .5rem; color: var(--text-soft); background: var(--surface-hover); font-size: .68rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.module-arrow { display: grid; color: var(--text-faint); }
.module-entry:hover .module-arrow { color: var(--brand-primary); }
.overview-aside { display: grid; gap: 1.4rem; }
.summary-panel, .publish-note { padding: 1rem 0; border-top: 1px solid var(--border); }
.summary-panel dl { display: grid; gap: 0; margin: .6rem 0 0; }
.summary-panel dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .58rem 0; border-bottom: 1px solid var(--border); }
.summary-panel dt { color: var(--text-soft); font-size: .75rem; }
.summary-panel dd { max-width: 120px; margin: 0; overflow: hidden; font-size: .78rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.publish-note p { margin: .42rem 0 0; color: var(--text-soft); font-size: .76rem; line-height: 1.55; }

.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 1.15rem; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.summary-grid article { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label value" "meta value"; align-items: center; padding: .8rem 1rem; border-left: 1px solid var(--border); }
.summary-grid article:first-child { border-left: 0; }
.summary-grid span { grid-area: label; color: var(--text-soft); font-size: .72rem; font-weight: 650; }
.summary-grid strong { grid-area: value; font-size: 1.35rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.summary-grid small { grid-area: meta; color: var(--text-faint); font-size: .65rem; }
.catalog-kind-tabs { display: flex; width: max-content; max-width: 100%; gap: .2rem; margin: 0 0 1rem; border: 1px solid var(--border); border-radius: 10px; padding: .25rem; background: var(--surface); }
.catalog-kind-tabs button { display: flex; min-height: 36px; align-items: center; gap: .5rem; border: 0; border-radius: 7px; padding: .45rem .8rem; color: var(--text-soft); background: transparent; font-size: .76rem; font-weight: 680; }
.catalog-kind-tabs button:hover { color: var(--text); background: var(--surface-subtle); }
.catalog-kind-tabs button.active { color: var(--text); background: var(--surface-hover); box-shadow: inset 0 0 0 1px var(--border); }
.catalog-kind-tabs button span { min-width: 20px; border-radius: 999px; padding: .12rem .38rem; color: var(--text-faint); background: var(--surface); font-size: .62rem; font-variant-numeric: tabular-nums; text-align: center; }

.card { border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.items, .record-list { overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.list-head { display: grid; grid-template-columns: 62px minmax(175px, 1fr) 135px 125px 155px; gap: 1rem; padding: .66rem 1rem; border-bottom: 1px solid var(--border); color: var(--text-faint); background: var(--surface-subtle); font-size: .64rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.list-head span:first-child { grid-column: 1 / 3; }
.row { display: grid; grid-template-columns: 62px minmax(175px, 1fr) 135px 125px 155px; align-items: center; gap: 1rem; min-height: 78px; padding: .72rem 1rem; border-top: 1px solid var(--border); transition: background .15s; }
.row:first-of-type { border-top: 0; }
.row:hover { background: var(--surface-subtle); }
.thumb { width: 54px; height: 54px; border-radius: 9px; object-fit: cover; background: var(--surface-hover); }
.thumb.empty { display: grid; place-items: center; color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 8%, var(--surface)); font-size: .69rem; font-weight: 800; }
.item-copy { min-width: 0; }
.name { overflow: hidden; font-size: .87rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.category { margin-top: .15rem; color: var(--text-soft); font-size: .73rem; }
.price { font-size: .83rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.visibility, .status-label { display: inline-flex; width: max-content; align-items: center; gap: .38rem; border-radius: 999px; padding: .3rem .55rem; color: var(--success); background: color-mix(in srgb, var(--success) 9%, var(--surface)); font-size: .68rem; font-weight: 700; }
.visibility i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.visibility.off { color: var(--text-soft); background: var(--surface-hover); }
.actions { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; }
.order-buttons { display: flex; gap: .22rem; }
.order-buttons button { display: grid; width: 32px; height: 34px; place-items: center; border: 1px solid var(--border); border-radius: 8px; color: var(--text-soft); background: var(--surface); }
.order-buttons button:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }
.order-buttons button:disabled { cursor: not-allowed; opacity: .3; }
.order-buttons svg { width: .9rem; height: .9rem; }

.record-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto auto; min-height: 76px; align-items: center; gap: 1rem; padding: .75rem 1rem; border-top: 1px solid var(--border); }
.record-row:first-child { border-top: 0; }
.record-row:hover { background: var(--surface-subtle); }
.record-row > div:nth-child(2), .record-row > div:first-child { display: grid; min-width: 0; gap: .18rem; }
.record-row strong { font-size: .84rem; }
.record-row small { overflow: hidden; color: var(--text-soft); font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; }
.record-row p { max-width: 72ch; margin: .3rem 0 0; color: var(--text-soft); font-size: .78rem; line-height: 1.5; }
.quote-row { grid-template-columns: minmax(0, 1fr) auto auto; }
.quote-row > div:first-child strong { overflow-wrap: anywhere; line-height: 1.35; }
.lead-row { grid-template-columns: minmax(0, 1fr) auto; padding: .95rem 1rem; }
.status-label { color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 8%, var(--surface)); text-transform: none; }
.record-row select, .hours-row input[type="time"] { min-height: 40px; border: 1px solid var(--border); border-radius: 8px; padding: .48rem .65rem; color: var(--text); background: var(--surface); }

.empty-state { display: grid; justify-items: center; padding: 4rem 1.25rem; color: var(--text-soft); text-align: center; }
.empty-state strong { color: var(--text); font-size: .93rem; }
.empty-state p { margin: .35rem 0 1.1rem; font-size: .8rem; }
.empty-icon { display: grid; width: 28px; height: 28px; margin-bottom: .8rem; place-items: center; color: var(--brand-primary); }
.empty-icon svg { width: 1.4rem; height: 1.4rem; }
.activity { display: grid; border-top: 1px solid var(--border); }
.event { display: grid; grid-template-columns: 20px 1fr; align-items: start; gap: .8rem; padding: .9rem .2rem; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; }
.event-mark { display: grid; width: 20px; height: 20px; margin-top: .08rem; place-items: center; color: var(--brand-primary); }
.event-mark svg { width: 1rem; height: 1rem; }
.event time { color: var(--text-faint); font-size: .69rem; }
.event p { margin: .25rem 0 0; font-size: .82rem; line-height: 1.5; }

.editor-page { display: grid; max-width: 920px; gap: 1rem; }
.editor-page > section { padding: 1.3rem; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.editor-page h2 { margin: 0 0 .9rem; font-size: .98rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.field { display: grid; gap: .38rem; margin: .85rem 0; }
.field label { font-size: .79rem; font-weight: 680; }
.field input, .field textarea, .field select { width: 100%; min-height: 42px; border: 1px solid var(--border); border-radius: 8px; padding: .66rem .72rem; color: var(--text); background: var(--surface); font-size: .88rem; transition: border-color .15s, background .15s; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--border-strong); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand-primary); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field textarea { min-height: 104px; resize: vertical; }
.field small, .check small { color: var(--text-faint); font-size: .69rem; }
.social-input { position: relative; }
.social-input input { padding-left: 2.65rem; }
.social-brand { position: absolute; z-index: 1; top: 50%; left: .75rem; display: grid; width: 18px; height: 18px; place-items: center; color: var(--text); transform: translateY(-50%); pointer-events: none; }
.social-brand svg { width: 18px; height: 18px; stroke: none; }
.social-brand-website svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.check { display: flex; align-items: flex-start; gap: .65rem; margin: 1rem 0; }
.check input { width: 18px; height: 18px; margin-top: .08rem; accent-color: var(--brand-primary); }
.check span { display: grid; gap: .12rem; }
.check strong { font-size: .79rem; }
.compact-check { display: flex; align-items: center; gap: .38rem; color: var(--text-soft); font-size: .75rem; }
.compact-check input { accent-color: var(--brand-primary); }
.hours-list { display: grid; }
.hours-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: center; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--border); }
.hours-row:first-child { border-top: 0; }
.hours-day { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: .75rem; }
.hours-day strong { font-size: .79rem; }
.hours-times { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.hours-time { display: grid; min-width: 0; gap: .35rem; }
.hours-time > span { color: var(--text-soft); font-size: .72rem; font-weight: 650; }
.hours-time > input[type="time"] { width: 100%; min-width: 0; max-width: 100%; }
.sticky-save { position: sticky; z-index: 4; bottom: 1rem; display: flex; justify-content: flex-end; padding: .65rem; border: 1px solid var(--border); border-radius: 11px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: 0 12px 28px rgba(20, 24, 32, .1); backdrop-filter: blur(12px); }

.upload-drop { display: flex !important; min-height: 82px; align-items: center; gap: .75rem; border: 1px dashed var(--border-strong); border-radius: 9px; padding: .8rem; color: var(--text); background: var(--surface-subtle); cursor: pointer; transition: border-color .15s, background .15s; }
.upload-drop:hover, .upload-drop.selected { border-color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 5%, var(--surface)); }
.upload-drop input { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; opacity: 0 !important; pointer-events: none; }
.upload-symbol { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; color: var(--brand-primary); }
.upload-drop > span:last-child { display: grid; min-width: 0; gap: .16rem; }
.upload-drop strong { overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.upload-drop small { color: var(--text-soft); font-size: .69rem; }
.current-photo { display: flex; align-items: center; gap: .6rem; margin-top: .55rem; color: var(--text-soft); font-size: .7rem; }
.current-photo .preview { width: 64px; height: 48px; margin: 0; border: 0; border-radius: 8px; object-fit: cover; }
.preview { display: block; max-width: 180px; max-height: 125px; margin-top: .3rem; border-radius: 8px; object-fit: contain; }

.modal-bg { position: fixed; z-index: 30; inset: 0; display: grid; justify-items: end; background: rgba(9, 11, 15, .48); }
.modal { width: min(680px, 100%); height: 100dvh; max-height: none; overflow: auto; border: 0; border-radius: 0; padding: 1.6rem 1.75rem 2rem; background: var(--surface); box-shadow: var(--shadow-panel); }
.modal-head { position: sticky; z-index: 3; top: -1.6rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin: -1.6rem -1.75rem 1.2rem; padding: 1.35rem 1.75rem 1rem; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(12px); }
.modal h2 { margin: 0; font-size: 1.22rem; letter-spacing: -.015em; }
.modal-head p { margin: .25rem 0 0; color: var(--text-soft); font-size: .76rem; }
.modal h3 { margin: 1.4rem 0 .2rem; font-size: .92rem; }
.close { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border: 1px solid var(--border); border-radius: 8px; color: var(--text-soft); background: var(--surface); }
.close:hover { color: var(--text); background: var(--surface-hover); }
.modal-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.modal-actions > div { display: flex; gap: .5rem; }
.error { margin: .8rem 0; border: 1px solid color-mix(in srgb, var(--danger) 28%, var(--border)); border-radius: 8px; padding: .65rem .75rem; color: var(--danger); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); font-size: .79rem; }
.fatal-error { width: min(520px, calc(100% - 2rem)); margin: 12vh auto; }
.fatal-error .btn { margin-left: .75rem; }

.danger-icon { color: var(--danger); }

.quote-modal { width: min(1080px, calc(100vw - 72px)); padding-bottom: 0; }
.quote-customer { padding-bottom: 1.15rem; border-bottom: 1px solid var(--border); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.section-title h3 { margin: 0; }
.section-title span { color: var(--text-faint); font-size: .7rem; }
.quote-customer-grid { display: grid; grid-template-columns: 1.2fr 1.2fr .9fr .85fr; gap: .75rem; }
.quote-customer-grid .field { margin: 0; }
.quote-workbench { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 1.5rem; padding-top: 1.25rem; }
.quote-builder { display: grid; min-width: 0; gap: 1.5rem; }
.quote-products, .quote-options { min-width: 0; }
.catalog-combobox { position: relative; z-index: 4; margin-bottom: .8rem; }
.catalog-combobox > label { display: block; margin-bottom: .38rem; font-size: .79rem; font-weight: 680; }
.catalog-search-box { display: grid; grid-template-columns: 20px minmax(0, 1fr); min-height: 44px; align-items: center; gap: .45rem; border: 1px solid var(--border-strong); border-radius: 9px; padding: 0 .7rem; color: var(--text-faint); background: var(--surface); }
.catalog-search-box:focus-within { border-color: var(--brand-primary); outline: 3px solid color-mix(in srgb, var(--brand-primary) 16%, transparent); }
.catalog-search-box input { width: 100%; height: 42px; border: 0; outline: 0; color: var(--text); background: transparent; font-size: .86rem; }
.catalog-search-box input::placeholder { color: var(--text-faint); }
.catalog-results { position: absolute; z-index: 8; top: calc(100% + .35rem); left: 0; width: 100%; max-height: 330px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: .3rem; background: var(--surface); box-shadow: var(--shadow-menu); }
.catalog-results button { display: grid; width: 100%; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: .65rem; border: 0; border-radius: 7px; padding: .55rem; color: var(--text); background: transparent; text-align: left; }
.catalog-results button:hover, .catalog-results button:focus-visible { background: var(--surface-hover); }
.catalog-results img, .catalog-result-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 7px; object-fit: cover; color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 8%, var(--surface)); font-size: .65rem; font-weight: 800; }
.catalog-results button > span:nth-child(2) { display: grid; min-width: 0; gap: .1rem; }
.catalog-results button strong { overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.catalog-results button small { color: var(--text-soft); font-size: .68rem; }
.catalog-results button > b { color: var(--text); font-size: .74rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.catalog-results > p { margin: .2rem .55rem .45rem; color: var(--text-faint); font-size: .67rem; }
.catalog-no-results { padding: 1.2rem .75rem; color: var(--text-soft); font-size: .76rem; text-align: center; }
.quote-line-list { display: grid; margin-bottom: .7rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.quote-sale-line { padding: .8rem; border-top: 1px solid var(--border); }
.quote-sale-line:first-child { border-top: 0; }
.sale-line-main { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: end; gap: .5rem; }
.sale-line-number { display: grid; width: 24px; height: 24px; margin-bottom: .55rem; place-items: center; border-radius: 6px; color: var(--text-soft); background: var(--surface-hover); font-size: .66rem; font-weight: 750; }
.sale-line-main .field, .sale-line-numbers .field { margin: 0; }
.sale-line-numbers { display: grid; grid-template-columns: 90px 125px minmax(110px, 1fr) 38px; align-items: end; gap: .55rem; margin: .55rem 0 0 2rem; }
.line-amount { display: grid; min-height: 42px; align-content: center; justify-items: end; gap: .08rem; padding-right: .25rem; }
.line-amount span { color: var(--text-faint); font-size: .65rem; }
.line-amount strong { font-size: .82rem; font-variant-numeric: tabular-nums; }
.quote-lines-empty { display: grid; justify-items: center; padding: 2.2rem 1rem; color: var(--text-soft); text-align: center; }
.quote-lines-empty > span { display: grid; width: 26px; height: 26px; margin-bottom: .6rem; place-items: center; color: var(--brand-primary); }
.quote-lines-empty strong { color: var(--text); font-size: .82rem; }
.quote-lines-empty p { margin: .25rem 0 0; font-size: .7rem; }
.quote-options { padding-top: 1.2rem; border-top: 1px solid var(--border); }
.quote-options-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: .65rem; }
.quote-options-grid .field { margin: 0; }
.quote-tax { min-height: 42px; align-items: center; margin: 0; }
.quote-preview { position: sticky; top: 4.4rem; overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-subtle); }
.preview-heading { display: flex; align-items: center; gap: .65rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface); }
.preview-heading > span { display: grid; width: 22px; height: 22px; place-items: center; color: var(--brand-primary); }
.preview-heading > div { display: grid; gap: .08rem; }
.preview-heading strong { font-size: .8rem; }
.preview-heading small { color: var(--text-faint); font-size: .65rem; }
.preview-client { display: grid; gap: .14rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
.preview-client span { color: var(--text-faint); font-size: .65rem; }
.preview-client strong { overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.preview-lines { display: grid; max-height: 300px; overflow-y: auto; padding: .55rem 1rem; }
.preview-lines > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .7rem; padding: .42rem 0; color: var(--text-soft); font-size: .7rem; }
.preview-lines > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-lines > div b { color: var(--text); }
.preview-lines > div strong { color: var(--text); font-size: .72rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.preview-lines > p { margin: .7rem 0; color: var(--text-faint); font-size: .7rem; line-height: 1.5; text-align: center; }
.preview-totals { display: grid; gap: .38rem; margin: 0; padding: .8rem 1rem 1rem; border-top: 1px dashed var(--border-strong); }
.preview-totals > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.preview-totals dt { color: var(--text-soft); font-size: .7rem; }
.preview-totals dd { margin: 0; font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.preview-totals .preview-total { margin-top: .35rem; padding-top: .6rem; border-top: 1px solid var(--border); }
.preview-totals .preview-total dt, .preview-totals .preview-total dd { color: var(--text); font-size: .92rem; font-weight: 800; }
.quote-actions { position: sticky; z-index: 5; bottom: 0; margin: 1.5rem -1.75rem 0; padding: .85rem 1.75rem; background: color-mix(in srgb, var(--surface) 97%, transparent); backdrop-filter: blur(12px); }

.login-page { position: relative; min-height: 100vh; overflow: hidden; background: var(--surface); }
.login-topbar { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; height: 76px; align-items: center; justify-content: space-between; padding: 1.15rem clamp(1.2rem, 4vw, 3.5rem); pointer-events: none; }
.login-topbar > * { pointer-events: auto; }
.soloenlace-logo { display: block; width: auto; height: 25px; max-width: 165px; }
html[data-theme="dark"] .soloenlace-logo { filter: brightness(0) invert(1); }
.login-stage { display: grid; grid-template-columns: minmax(0, .9fr) minmax(430px, 1.1fr); min-height: 100vh; }
.login-story, .login-access { display: flex; min-width: 0; align-items: center; padding: 7rem clamp(2rem, 7vw, 6.5rem) 4rem; }
.login-story { position: relative; color: var(--text); background: var(--surface-subtle); }
.login-business { position: absolute; top: 7.2rem; left: clamp(2rem, 7vw, 6.5rem); display: flex; align-items: center; gap: .9rem; color: var(--text-soft); font-size: .78rem; font-weight: 650; }
.login-business .brand-logo-set { height: 48px; }
.login-business .brand-logo { height: 44px; max-width: min(260px, 30vw); }
.login-business .brand-monogram { width: 44px; height: 44px; flex-basis: 44px; }
.login-copy { max-width: 600px; margin-top: 5.5rem; }
.login-copy .accent-line, .login-copy .eyebrow { display: none; }
.login-copy h1 { max-width: 9ch; margin: 0 0 1.1rem; font-size: clamp(3rem, 5vw, 5rem); line-height: .98; letter-spacing: -.04em; }
.login-copy > p:last-child { max-width: 52ch; margin: 0; color: var(--text-soft); font-size: .98rem; line-height: 1.65; }
.login-access { position: relative; justify-content: center; color: var(--text); background: var(--surface); }
.login-form-wrap { width: min(400px, 100%); }
.login-form-wrap > .eyebrow { display: none; }
.login-form-wrap h2 { margin: 0 0 .45rem; font-size: 2rem; line-height: 1.15; letter-spacing: -.025em; }
.login-intro { margin: 0 0 1.7rem; color: var(--text-soft); font-size: .87rem; }
.login-form-wrap .field { margin: .9rem 0; }
.login-button { margin-top: .5rem; }
.login-foot { margin: 1.2rem 0 0; color: var(--text-faint); font-size: .68rem; text-align: center; }
.login-theme .theme-trigger { background: var(--surface); }
.login-form-wrap .error { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 28%, var(--border)); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.nav-scrim { position: fixed; z-index: 17; inset: 0; background: rgba(5, 7, 10, .55); }

@media (max-width: 1000px) {
  .admin-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .side-nav { width: 220px; }
  .dashboard-layout { grid-template-columns: 1fr 230px; gap: 1.5rem; }
  .user-chip > div { display: none; }
  .list-head { display: none; }
  .row { grid-template-columns: 58px minmax(150px, 1fr) auto; }
  .row .price { grid-column: 2; }
  .row .visible-cell { grid-column: 3; grid-row: 1; }
  .row .actions { grid-column: 1 / -1; justify-content: flex-start; padding-top: .2rem; }
  .quote-modal { width: min(900px, calc(100vw - 32px)); }
  .quote-customer-grid { grid-template-columns: 1fr 1fr; }
  .quote-workbench { grid-template-columns: minmax(0, 1fr) 270px; gap: 1rem; }
}

@media (max-width: 760px) {
  .admin-layout { display: block; }
  .side-nav { position: fixed; z-index: 18; top: 0; bottom: 0; left: 0; width: min(310px, 86vw); height: 100dvh; transform: translateX(-102%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); box-shadow: 16px 0 50px rgba(0, 0, 0, .25); }
  .side-nav.open { transform: none; }
  .navbar { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 62px; padding: 0 .8rem; }
  .menu-button { display: grid !important; }
  .mobile-identity { display: flex; min-width: 0; align-items: center; gap: .55rem; }
  .mobile-identity .brand-logo-set { height: 34px; }
  .mobile-identity .brand-logo { height: 30px; max-width: 105px; }
  .mobile-identity .brand-monogram { width: 32px; height: 32px; flex-basis: 32px; border-radius: 8px; }
  .mobile-identity strong { display: none; }
  .page-context { display: none; }
  .workspace { padding: 1.35rem .85rem 3.5rem; }
  .page-heading { align-items: stretch; flex-direction: column; margin-bottom: 1.25rem; }
  .page-heading h1 { font-size: 1.55rem; }
  .page-actions { display: grid; grid-template-columns: auto 1fr; }
  .page-heading > .primary { width: 100%; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .overview-aside { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .record-row { grid-template-columns: 52px minmax(0, 1fr); gap: .7rem; }
  .record-row > .visibility, .record-row > .status-label { grid-column: 2; }
  .record-row > .actions { grid-column: 1 / -1; justify-content: flex-start; }
  .quote-row { grid-template-columns: minmax(0, 1fr) auto; }
  .lead-row { grid-template-columns: 1fr; }
  .hours-row { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .sticky-save .btn { width: 100%; }
  .login-stage { grid-template-columns: 1fr; }
  .login-story { min-height: 42vh; padding: 7rem 1.5rem 3rem; }
  .login-access { min-height: 58vh; padding: 3.25rem 1.5rem; }
  .login-business { top: 6.2rem; left: 1.5rem; }
  .login-copy { margin-top: 5.5rem; }
  .login-copy h1 { font-size: clamp(2.6rem, 10vw, 4.5rem); }
  .quote-modal { width: 100%; }
  .quote-workbench { grid-template-columns: 1fr; }
  .quote-preview { position: static; }
}

@media (max-width: 520px) {
  .user-chip { display: none; }
  .app-trigger { width: 38px; justify-content: center; padding: 0; }
  .app-trigger span { display: none; }
  .app-menu { position: fixed; top: 3.9rem; right: .75rem; left: .75rem; width: auto; }
  .theme-trigger { width: 38px; justify-content: center; padding: 0; }
  .theme-trigger span, .theme-trigger svg:last-child { display: none; }
  .theme-menu { position: fixed; top: 3.9rem; right: .75rem; left: .75rem; width: auto; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-grid article { border-bottom: 1px solid var(--border); }
  .summary-grid article:last-child { grid-column: 1 / -1; border-bottom: 0; border-left: 0; }
  .collection-toolbar { align-items: stretch; flex-direction: column; gap: .45rem; }
  .collection-search { width: 100%; }
  .collection-search input { font-size: 1rem; }
  .collection-count { align-self: flex-end; }
  .pagination-bar { grid-template-columns: 1fr auto; gap: .65rem; }
  .pagination-bar > span { text-align: right; }
  .page-controls { grid-column: 1 / -1; justify-content: center; }
  .page-controls > button:first-child, .page-controls > button:last-child { flex: 1; }
  .row { gap: .65rem; padding: .75rem; }
  .grid2 { grid-template-columns: 1fr; }
  .overview-aside { grid-template-columns: 1fr; }
  .module-entry { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .module-count { display: none; }
  .module-arrow { grid-column: 3; }
  .modal { padding: 1.15rem; }
  .modal-head { top: -1.15rem; margin: -1.15rem -1.15rem 1rem; padding: 1rem 1.15rem .85rem; }
  .modal-actions { align-items: stretch; flex-direction: column-reverse; }
  .modal-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .modal-actions > .danger { width: 100%; }
  .quote-customer-grid, .quote-options-grid { grid-template-columns: 1fr; }
  .sale-line-numbers { grid-template-columns: 1fr 1fr 38px; margin-left: 2rem; }
  .line-amount { grid-column: 1 / 3; grid-row: 2; justify-items: start; }
  .sale-line-numbers .danger-icon { grid-column: 3; grid-row: 2; }
  .quote-actions { margin: 1.25rem -1.15rem 0; padding: .8rem 1.15rem; }
  .login-topbar { height: 68px; padding: 1rem; }
  .soloenlace-logo { height: 22px; max-width: 140px; }
  .login-story { min-height: 128px; padding: 4.9rem 1rem 1rem; }
  .login-copy { display: none; }
  .login-business { position: static; }
  .login-business .brand-logo-set { height: 40px; }
  .login-business .brand-logo { height: 36px; max-width: 190px; }
  .login-access { min-height: calc(100vh - 128px); padding: 2.2rem 1rem; }
  .login-form-wrap h2 { font-size: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Citas y reservas */
.booking-page { width: 100%; max-width: 100%; min-width: 0; overflow-x: hidden; }
.booking-heading { align-items: flex-end; }
.booking-heading > div:first-child { min-width: 0; }
.booking-heading p { overflow-wrap: anywhere; }
.heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.heading-actions .btn svg, .booking-section-head .btn svg, .professional-actions .btn svg { width: 1rem; height: 1rem; }
.booking-notice { position: fixed; z-index: 45; right: 1.25rem; bottom: 1.25rem; max-width: min(420px, calc(100% - 2rem)); border: 1px solid color-mix(in srgb, var(--success) 30%, var(--border)); border-radius: 10px; padding: .8rem 1rem; color: var(--text); background: var(--surface); box-shadow: var(--shadow-menu); font-size: .8rem; font-weight: 650; }
.booking-notice.error { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.booking-tabs { display: flex; width: max-content; max-width: 100%; gap: .2rem; margin-bottom: 1rem; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; padding: .25rem; background: var(--surface); }
.booking-tabs button { min-height: 34px; border: 0; border-radius: 7px; padding: .45rem .8rem; color: var(--text-soft); background: transparent; font-size: .74rem; font-weight: 680; white-space: nowrap; }
.booking-tabs button:hover { color: var(--text); background: var(--surface-subtle); }
.booking-tabs button.active { color: var(--text); background: var(--surface-hover); box-shadow: inset 0 0 0 1px var(--border); }
.booking-setup { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 1rem; border: 1px solid var(--border); border-radius: 12px; padding: 1.2rem; background: var(--surface); }
.booking-setup > span { display: grid; width: 28px; height: 28px; place-items: center; color: var(--brand-primary); }
.booking-setup > span svg { width: 1.35rem; height: 1.35rem; }
.booking-setup h2, .booking-setup p { margin: 0; }
.booking-setup h2 { font-size: 1rem; }
.booking-setup p { margin-top: .25rem; color: var(--text-soft); font-size: .78rem; }
.calendar-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.calendar-period { display: flex; min-width: 0; align-items: center; gap: .4rem; }
.calendar-period > div:last-child { display: grid; min-width: 0; gap: .08rem; margin-left: .35rem; }
.calendar-period strong { overflow: hidden; font-size: .86rem; text-transform: capitalize; text-overflow: ellipsis; white-space: nowrap; }
.calendar-period span { color: var(--text-faint); font-size: .65rem; }
.calendar-period [data-week="-7"] svg { transform: rotate(-90deg); }
.calendar-period [data-week="7"] svg { transform: rotate(-90deg); }
.calendar-filter { display: grid; min-width: 190px; gap: .3rem; color: var(--text-soft); font-size: .68rem; font-weight: 680; }
.calendar-toolbar > .inline-label-help { min-width: 220px; align-items: center; }
.calendar-filter select { min-height: 38px; border: 1px solid var(--border); border-radius: 8px; padding: 0 .65rem; color: var(--text); background: var(--surface); }
.booking-calendar { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.calendar-days-head { position: sticky; z-index: 8; top: 0; display: grid; grid-template-columns: 62px repeat(7, minmax(112px, 1fr)); min-width: 846px; border-bottom: 1px solid var(--border); background: var(--surface); }
.calendar-days-head > span:first-child { position: sticky; z-index: 9; left: 0; border-right: 1px solid var(--border); background: var(--surface-subtle); }
.calendar-days-head > div { display: flex; min-height: 58px; align-items: center; justify-content: center; gap: .42rem; border-left: 1px solid var(--border); }
.calendar-days-head span { color: var(--text-soft); font-size: .68rem; font-weight: 650; text-transform: capitalize; }
.calendar-days-head strong { font-size: .86rem; font-variant-numeric: tabular-nums; }
.calendar-days-head .today strong { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--brand-on-primary); background: var(--brand-primary); }
.calendar-scroll { max-height: min(68vh, 780px); overflow: auto; scrollbar-gutter: stable; }
.calendar-grid { display: grid; min-width: 846px; grid-template-columns: 62px repeat(7, minmax(112px, 1fr)); height: var(--calendar-height, 768px); }
.time-rail { position: sticky; z-index: 4; left: 0; display: grid; grid-auto-rows: 64px; border-right: 1px solid var(--border); background: var(--surface-subtle); }
.time-rail time { justify-self: end; margin: .55rem .65rem 0 0; color: var(--text-soft); font-size: .68rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.time-rail time:last-child { display: none; }
.booking-day-track { position: relative; display: grid; grid-auto-rows: 64px; border-right: 1px solid var(--border); background: var(--surface); }
.booking-day-track.today { background: color-mix(in srgb, var(--brand-primary) 2.5%, var(--surface)); }
.booking-day-track.drop-target { background: color-mix(in srgb, var(--brand-primary) 7%, var(--surface)); outline: 2px solid color-mix(in srgb, var(--brand-primary) 55%, transparent); outline-offset: -2px; }
.hour-rule { border-bottom: 1px solid var(--border); pointer-events: none; }
.calendar-event, .calendar-block { position: absolute; z-index: 2; top: var(--event-top, 0); left: 4px; right: 4px; min-height: 24px; height: var(--event-height, 24px); overflow: hidden; border: 0; border-radius: 7px; padding: .38rem .42rem; color: var(--text); background: color-mix(in srgb, var(--event-color) 16%, var(--surface)); box-shadow: inset 3px 0 0 var(--event-color); text-align: left; cursor: pointer; }
.calendar-event:hover { z-index: 5; background: color-mix(in srgb, var(--event-color) 23%, var(--surface)); }
.calendar-event[draggable="true"] { cursor: grab; }
.calendar-event.dragging { opacity: .45; cursor: grabbing; }
.calendar-event time, .calendar-block time { display: block; margin-bottom: .1rem; color: color-mix(in srgb, var(--event-color, var(--text-soft)) 72%, var(--text)); font-size: .66rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.event-topline { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: .25rem; }
.event-topline time { margin: 0; }
.event-topline em { overflow: hidden; color: var(--text-soft); font-size: .56rem; font-style: normal; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event strong, .calendar-event span, .calendar-event small, .calendar-block strong, .calendar-block span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event strong, .calendar-block strong { font-size: .7rem; }
.calendar-event span, .calendar-block span { margin-top: .08rem; color: var(--text-soft); font-size: .66rem; }
.calendar-event small { margin-top: .14rem; color: var(--text-soft); font-size: .63rem; }
.calendar-event.status-cancelled, .calendar-event.status-no_show, .calendar-event.status-completed { opacity: .58; }
.calendar-event.status-pending { outline: 1px dashed color-mix(in srgb, var(--event-color) 55%, var(--border)); outline-offset: -2px; }
.calendar-block { --event-color: var(--text-faint); z-index: 1; color: var(--text-soft); background: var(--surface-hover); box-shadow: inset 3px 0 0 var(--text-faint); }
.booking-agenda { display: none; }
.booking-section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 1.2rem 0 .8rem; }
.booking-section-head h2, .booking-section-head p { margin: 0; }
.booking-section-head h2 { font-size: 1.05rem; }
.booking-section-head p { max-width: 68ch; margin-top: .3rem; color: var(--text-soft); font-size: .77rem; }
.booking-records, .professional-list { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.booking-record { display: grid; width: 100%; min-height: 76px; grid-template-columns: 54px minmax(180px, 1fr) minmax(210px, auto) auto; align-items: center; gap: 1rem; border: 0; border-top: 1px solid var(--border); padding: .8rem 1rem; color: var(--text); background: transparent; text-align: left; }
.booking-record:first-child { border-top: 0; }
.booking-record:hover { background: var(--surface-subtle); }
.booking-record.inactive, .professional-row.inactive { opacity: .58; }
.booking-record > span:nth-child(2) { display: grid; min-width: 0; gap: .2rem; }
.booking-record strong { font-size: .83rem; }
.booking-record small { overflow: hidden; color: var(--text-soft); font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.booking-source-thumb { display: grid; width: 50px; height: 50px; flex: 0 0 auto; place-items: center; border-radius: 10px; object-fit: cover; color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 8%, var(--surface)); font-size: .68rem; font-weight: 780; }
.service-meta { color: var(--text-soft); font-size: .72rem; }
.service-meta b { color: var(--text); font-weight: 720; font-variant-numeric: tabular-nums; }
.booking-record em { border-radius: 999px; padding: .28rem .5rem; color: var(--success); background: color-mix(in srgb, var(--success) 8%, var(--surface)); font-size: .64rem; font-style: normal; font-weight: 700; }
.booking-record.inactive em { color: var(--text-soft); background: var(--surface-hover); }
.professional-row { display: grid; min-height: 76px; grid-template-columns: 8px 50px minmax(210px, 1fr) 130px auto; align-items: center; gap: .85rem; border-top: 1px solid var(--border); padding: .85rem 1rem; }
.professional-row:first-child { border-top: 0; }
.professional-color { width: 8px; height: 42px; border-radius: 999px; }
.professional-copy, .schedule-summary { display: grid; min-width: 0; gap: .18rem; }
.professional-row strong { font-size: .82rem; }
.professional-row small { overflow: hidden; color: var(--text-soft); font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.professional-actions { display: flex; justify-content: flex-end; gap: .4rem; }
.booking-source-card { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: .8rem; margin-bottom: 1rem; border: 1px solid var(--border); border-radius: 11px; padding: .75rem; background: var(--surface-subtle); }
.booking-source-card > img, .booking-source-card > span { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 9px; object-fit: cover; color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 8%, var(--surface)); font-size: .72rem; font-weight: 800; }
.booking-source-card > div { display: grid; min-width: 0; gap: .12rem; }
.booking-source-card small { color: var(--text-faint); font-size: .64rem; font-weight: 650; }
.booking-source-card strong { overflow: hidden; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.booking-source-card p { overflow: hidden; margin: 0; color: var(--text-soft); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.booking-link-empty { display: grid; place-items: center; gap: .45rem; padding: 1.4rem .5rem 1.8rem; text-align: center; }
.booking-link-empty > span { display: grid; width: 30px; height: 30px; place-items: center; color: var(--brand-primary); }
.booking-link-empty > span svg { width: 22px; height: 22px; }
.booking-link-empty strong { font-size: .9rem; }
.booking-link-empty p { max-width: 42ch; margin: 0; color: var(--text-soft); font-size: .75rem; }
.field-help { display: block; margin-top: .3rem; color: var(--text-faint); font-size: .66rem; }
.number-with-unit { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); }
.number-with-unit:focus-within { border-color: var(--brand-primary); outline: 3px solid color-mix(in srgb, var(--brand-primary) 16%, transparent); }
.number-with-unit input { border: 0; outline: 0; }
.number-with-unit span { padding: 0 .75rem; color: var(--text-soft); font-size: .72rem; font-weight: 650; }
.appointment-modal { width: min(940px, 100%); }
.appointment-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.appointment-form-grid > section { min-width: 0; }
.appointment-form-grid h3 { margin-top: .2rem; }
.block-summary { display: flex; align-items: center; gap: .85rem; border: 1px solid var(--border); border-radius: 10px; padding: 1rem; background: var(--surface-subtle); }
.block-summary > span { display: grid; width: 38px; height: 38px; place-items: center; color: var(--text-soft); }
.block-summary p { margin: .2rem 0 0; color: var(--text-soft); font-size: .76rem; }
.service-checklist { display: grid; gap: .45rem; margin: 1rem 0; border: 0; padding: 0; }
.service-checklist legend { margin-bottom: .5rem; font-size: .8rem; font-weight: 680; }
.service-checklist > label,.service-checklist [data-assignment-list] > label { display: flex; align-items: center; gap: .65rem; border: 1px solid var(--border); border-radius: 12px; padding: .65rem .75rem; min-height:44px; }
.service-checklist [data-assignment-list] { display:grid; gap:.4rem; }
.service-checklist input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand-primary); }
.service-checklist label span:not(.ui-choice-icon) { display: grid; gap: .1rem; }
.service-checklist label .control-help-trigger { margin-inline-start:auto; flex:none; }
.service-checklist strong { font-size: .78rem; }
.service-checklist small, .service-checklist p { color: var(--text-soft); font-size: .68rem; }
.availability-list { display: grid; }
.availability-row { display: grid; grid-template-columns: minmax(130px, 1fr) 120px 16px 120px; align-items: center; gap: .55rem; border-top: 1px solid var(--border); padding: .65rem 0; }
.availability-row:first-child { border-top: 0; }
.availability-row label { display: flex; align-items: center; gap: .55rem; font-size: .78rem; }
.availability-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand-primary); }
.availability-row input[type="time"] { min-height: 40px; border: 1px solid var(--border); border-radius: 8px; padding: .4rem .55rem; color: var(--text); background: var(--surface); }
.availability-row > span { color: var(--text-faint); font-size: .7rem; text-align: center; }
.booking-settings { display: grid; max-width: 880px; gap: 1rem; }
.booking-settings > section { border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; background: var(--surface); }
.booking-settings h2, .booking-settings section > p { margin: 0; }
.booking-settings h2 { font-size: 1rem; }
.booking-settings section > p { margin-top: .3rem; color: var(--text-soft); font-size: .76rem; }
.agenda-entry .status-label.status-pending { color: var(--warning); }
.agenda-entry .status-label.status-cancelled, .agenda-entry .status-label.status-no_show { color: var(--danger); }

/* Soporte del cliente. Vive fuera del shell para no alterar la navegación ni el branding. */
#support-root { position: relative; z-index: 90; }
/* The register and checkout own the viewport; support must not cover the cashier. */
body:has(.pos-workspace-layer) #support-root { display: none; }
.support-admin-preview { display: grid; gap: 16px; padding: 24px; }
.support-admin-preview p { margin: 0; color: var(--text-soft); font-size: .85rem; line-height: 1.6; }
.support-launcher {
  position: fixed;
  right: max(1.35rem, env(safe-area-inset-right));
  bottom: max(1.35rem, env(safe-area-inset-bottom));
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: .55rem;
  border: 0;
  border-radius: 999px;
  padding: .7rem 1rem;
  color: var(--brand-on-primary);
  background: var(--brand-primary);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--brand-primary) 28%, transparent);
  font-size: .78rem;
  font-weight: 750;
}
.support-launcher:hover { filter: brightness(1.05); transform: translateY(-1px); }
.support-launcher-logo { display: block; width: 26px; height: 26px; flex: 0 0 26px; background: currentColor; -webkit-mask: url('soloenlace-support-logo.svg') center / contain no-repeat; mask: url('soloenlace-support-logo.svg') center / contain no-repeat; }
.support-launcher b { display: grid; min-width: 20px; height: 20px; place-items: center; border-radius: 999px; color: var(--brand-primary); background: var(--brand-on-primary); font-size: .62rem; }
.support-scrim { position: fixed; z-index: 90; inset: 0; background: rgba(12, 16, 24, .52); }
.support-drawer {
  position: fixed;
  z-index: 91;
  top: 0;
  right: 0;
  display: grid;
  width: min(460px, calc(100vw - 32px));
  height: 100dvh;
  grid-template-rows: auto minmax(0, 1fr);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}
.support-drawer > header { display: flex; min-height: 72px; align-items: center; gap: .75rem; border-bottom: 1px solid var(--border); padding: .85rem 1rem; }
.support-brand-logo { display: block; width: 38px; height: 38px; flex: 0 0 38px; object-fit: contain; }
.support-drawer > header > div { display: grid; min-width: 0; flex: 1; gap: .08rem; }
.support-drawer > header strong { font-size: .86rem; }
.support-drawer > header small { color: var(--text-soft); font-size: .68rem; }
.support-drawer > header > button, .support-back { display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 9px; color: var(--text-soft); background: transparent; }
.support-drawer > header > button:hover, .support-back:hover { color: var(--text); background: var(--surface-hover); }
.support-drawer > main { min-width: 0; min-height: 0; overflow: auto; overflow-x: hidden; }
.support-inbox-head { display: grid; gap: 1rem; border-bottom: 1px solid var(--border); padding: 1.35rem 1.1rem 1.1rem; }
.support-inbox-head h3, .support-inbox-head p, .support-new h3, .support-new p { margin: 0; }
.support-inbox-head h3, .support-new h3 { font-size: 1.12rem; }
.support-inbox-head p, .support-new p { margin-top: .3rem; color: var(--text-soft); font-size: .75rem; line-height: 1.55; }
.support-inbox-head .btn { width: max-content; }
.support-ticket-list { display: grid; }
.support-ticket-list > button { position: relative; display: grid; gap: .38rem; border: 0; border-bottom: 1px solid var(--border); padding: 1rem 1.1rem; color: var(--text); background: transparent; text-align: left; }
.support-ticket-list > button:hover { background: var(--surface-hover); }
.support-ticket-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.support-ticket-top strong { overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.support-ticket-list > button > span:not(.support-ticket-top) { overflow: hidden; color: var(--text-soft); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.support-ticket-list time { color: var(--text-faint); font-size: .64rem; }
.support-ticket-list > button > b { position: absolute; right: 1.1rem; bottom: .9rem; display: grid; min-width: 20px; height: 20px; place-items: center; border-radius: 999px; color: var(--brand-on-primary); background: var(--brand-primary); font-size: .6rem; }
.support-status { display: inline-flex; border-radius: 999px; padding: .24rem .48rem; font-size: .59rem; font-style: normal; font-weight: 740; }
.support-status.open { color: var(--success); background: color-mix(in srgb, var(--success) 11%, transparent); }
.support-status.closed { color: var(--text-soft); background: var(--surface-hover); }
.support-empty, .support-placeholder { margin: 0; padding: 3.5rem 1.5rem; color: var(--text-soft); text-align: center; }
.support-empty { display: grid; justify-items: center; gap: .5rem; }
.support-empty > svg { width: 26px; height: 26px; color: var(--brand-primary); }
.support-empty strong { color: var(--text); font-size: .84rem; }
.support-empty span, .support-placeholder { font-size: .72rem; line-height: 1.55; }
.support-new { display: grid; gap: 1rem; padding: 1.25rem 1.1rem; }
.support-new label { display: grid; gap: .42rem; color: var(--text); font-size: .72rem; font-weight: 680; }
.support-new input, .support-new textarea, .support-composer textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: 9px; padding: .72rem .78rem; color: var(--text); background: var(--surface); outline: 0; resize: vertical; }
.support-new input:focus, .support-new textarea:focus, .support-composer textarea:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 15%, transparent); }
.support-form-actions { display: flex; justify-content: flex-end; gap: .55rem; }
.support-error { margin: 0; color: var(--danger); font-size: .7rem; }
.support-thread-head { position: sticky; z-index: 2; top: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: .65rem; border-bottom: 1px solid var(--border); padding: .8rem 1rem; background: var(--surface); }
.support-thread-head > div { min-width: 0; }
.support-back { transform: none; }
.support-thread-head h3, .support-thread-head p { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.support-thread-head h3 { font-size: .84rem; }
.support-thread-head p { margin-top: .12rem; color: var(--text-soft); font-size: .64rem; }
.support-messages { display: flex; min-height: calc(100dvh - 270px); flex-direction: column; gap: .85rem; padding: 1rem; background: var(--surface-subtle); }
.support-message { display: grid; min-width: 0; max-width: 86%; gap: .25rem; }
.support-message > div { display: grid; min-width: 0; max-width: 100%; gap: .42rem; border: 1px solid var(--border); border-radius: 12px 12px 12px 4px; padding: .75rem .8rem; background: var(--surface); }
.support-message.client { align-self: flex-end; }
.support-message.client > div { border-color: color-mix(in srgb, var(--brand-primary) 24%, var(--border)); border-radius: 12px 12px 4px 12px; background: color-mix(in srgb, var(--brand-primary) 8%, var(--surface)); }
.support-message small { color: var(--text-soft); font-size: .6rem; font-weight: 720; }
.support-message p { margin: 0; font-size: .75rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-message > time { color: var(--text-faint); font-size: .58rem; }
.support-message.client > time { text-align: right; }
.support-system { align-self: center; display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; padding: .38rem .65rem; color: var(--text-soft); background: var(--surface-hover); font-size: .62rem; }
.support-system svg { width: 13px; height: 13px; }
.support-attachment { display: flex; width: 100%; min-width: 0; max-width: 100%; align-items: center; justify-content: space-between; gap: .65rem; border: 1px solid var(--border); border-radius: 8px; padding: .55rem; color: var(--text); background: var(--surface-subtle); text-align: left; }
.support-attachment > span { display: flex; min-width: 0; align-items: center; gap: .5rem; }
.support-attachment > span > span { display: grid; min-width: 0; gap: .08rem; }
.support-attachment strong { overflow: hidden; font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.support-attachment small { color: var(--text-faint); font-size: .58rem; }
.support-composer { position: sticky; bottom: 0; display: grid; gap: .65rem; border-top: 1px solid var(--border); padding: .8rem; background: var(--surface); }
.support-composer-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.support-composer-tools { display: flex; align-items: center; gap: .15rem; }
.support-icon-action, .support-send-action { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border: 0; border-radius: 9px; padding: 0; }
.support-icon-action { color: var(--text-soft); background: transparent; }
.support-icon-action:hover { color: var(--text); background: var(--surface-hover); }
.support-send-action { color: var(--brand-on-primary); background: var(--brand-primary); }
.support-send-action:hover { filter: brightness(1.05); }
.support-icon-action:active, .support-send-action:active { transform: scale(.94); }
.support-icon-action:disabled, .support-send-action:disabled { cursor: wait; opacity: .55; transform: none; }
.support-icon-action svg, .support-send-action svg { width: 1.08rem; height: 1.08rem; }
.support-capture-note { margin: -.2rem 0 0; color: var(--text-faint); font-size: .6rem; line-height: 1.4; }
.support-pending { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .55rem; border: 1px solid var(--border); border-radius: 8px; padding: .5rem .6rem; background: var(--surface-subtle); }
.support-pending > span { display: grid; min-width: 0; gap: .08rem; }
.support-pending strong { overflow: hidden; font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.support-pending small { color: var(--text-faint); font-size: .58rem; }
.support-pending button { display: grid; width: 30px; height: 30px; place-items: center; border: 0; color: var(--text-soft); background: transparent; }
.support-closed { display: grid; gap: .2rem; border-top: 1px solid var(--border); padding: 1rem; text-align: center; }
.support-closed strong { font-size: .76rem; }
.support-closed span { color: var(--text-soft); font-size: .66rem; }

@media (max-width: 760px) {
  .workspace { width: 100%; max-width: 100vw; overflow-x: hidden; }
  .booking-heading { align-items: stretch; }
  .heading-actions { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .heading-actions .btn { width: 100%; }
  .booking-page > * { max-width: 100%; min-width: 0; }
  .booking-tabs { width: 100%; }
  .booking-tabs button { min-height: 44px; flex: 0 0 auto; }
  .calendar-toolbar { align-items: stretch; flex-direction: column; }
  .calendar-period { display: grid; width: 100%; min-width: 0; grid-template-columns: 44px auto 44px minmax(0, 1fr); }
  .calendar-period > div:last-child { min-width: 0; margin-left: .25rem; }
  .calendar-period .icon-button { width: 44px; height: 44px; }
  .calendar-period .btn { min-height: 44px; }
  .calendar-toolbar > .inline-label-help, .calendar-filter { width: 100%; }
  .calendar-filter select { min-height: 44px; }
  .booking-page .btn { min-height: 44px; }
  .modal-bg .close { width: 44px; height: 44px; }
  .booking-calendar { display: none; }
  .booking-agenda { display: grid; gap: .75rem; }
  .booking-agenda article { overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
  .booking-agenda article > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); padding: .72rem .85rem; }
  .booking-agenda article > header strong { font-size: .78rem; text-transform: capitalize; }
  .booking-agenda article > header span { color: var(--text-faint); font-size: .65rem; }
  .booking-agenda article > p { margin: 0; padding: 1rem .85rem; color: var(--text-faint); font-size: .74rem; }
  .agenda-entry { display: grid; width: 100%; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: .65rem; border: 0; border-top: 1px solid var(--border); padding: .72rem .85rem; color: var(--text); background: transparent; text-align: left; }
  .agenda-entry:first-of-type { border-top: 0; }
  .agenda-entry:hover { background: var(--surface-subtle); }
  .agenda-entry > time { font-size: .72rem; font-weight: 750; font-variant-numeric: tabular-nums; }
  .agenda-entry > span { display: grid; min-width: 0; gap: .12rem; }
  .agenda-entry strong, .agenda-entry small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .agenda-entry strong { font-size: .77rem; }
  .agenda-entry small { color: var(--text-soft); font-size: .65rem; }
  .agenda-entry em { font-size: .58rem; }
  .agenda-entry.blocked { color: var(--text-soft); }
  .booking-section-head { align-items: stretch; flex-direction: column; }
  .booking-record { grid-template-columns: 50px minmax(0, 1fr) auto; gap: .75rem; }
  .service-meta { display: none; }
  .professional-row { grid-template-columns: 8px 50px minmax(0, 1fr); }
  .schedule-summary { display: none; }
  .professional-actions { grid-column: 3; justify-content: stretch; }
  .professional-actions .btn { min-width: 0; flex: 1; }
  .appointment-form-grid { grid-template-columns: 1fr; gap: .5rem; }
  .availability-row { grid-template-columns: 1fr 1fr 14px 1fr; }
  .booking-source-card { grid-template-columns: 52px minmax(0, 1fr); }
  .booking-source-card > img, .booking-source-card > span { width: 52px; height: 52px; }
  .booking-source-card .btn { grid-column: 1 / -1; width: 100%; }
  .modal-actions { align-items: stretch; flex-direction: column; }
  .modal-actions > div { width: 100%; }
  .modal-actions > div .btn { min-width: 0; flex: 1; }
}

@media (max-width: 640px) {
  .support-launcher { right: max(.85rem, env(safe-area-inset-right)); bottom: max(.85rem, env(safe-area-inset-bottom)); width: 48px; height: 48px; min-height: 48px; justify-content: center; padding: 0; }
  .support-launcher span { display: none; }
  .support-launcher b { position: absolute; top: -4px; right: -4px; }
  .support-drawer { width: 100vw; }
  .support-message { max-width: 92%; }
  .support-scrim { display: none; }
  .support-drawer > header { padding-top: max(.85rem, env(safe-area-inset-top)); }
  .support-composer { padding-bottom: max(.8rem, env(safe-area-inset-bottom)); }
  .support-icon-action, .support-send-action { width: 42px; height: 42px; flex-basis: 42px; }
}

@media (max-width: 520px) {
  .quote-row { grid-template-columns: minmax(0, 1fr); }
  .quote-row > .status-label { grid-column: 1; }
  .heading-actions { grid-template-columns: 1fr; }
  .booking-tabs { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .booking-tabs button { width: 100%; }
  .booking-setup { grid-template-columns: 28px 1fr; }
  .booking-setup .btn { grid-column: 1 / -1; width: 100%; }
  .booking-record { grid-template-columns: 46px minmax(0, 1fr); }
  .booking-record em { grid-column: 2; width: max-content; }
  .agenda-entry { grid-template-columns: 42px minmax(0, 1fr); }
  .agenda-entry em { grid-column: 2; width: max-content; }
  .availability-row { grid-template-columns: 1fr 1fr; }
  .availability-row label, .availability-label-help { grid-column: 1 / -1; }
  .availability-row > span { display: none; }
  .catalog-kind-tabs { width: 100%; }
  .catalog-kind-tabs button { flex: 1; justify-content: center; }
}

/* --------------------------------------------------------------------------
   SoloEnlace Admin 2026 — capa visual neutral. El branding del backend sigue
   controlando tipografía, logos y los tres colores de marca; la interfaz usa
   el primario únicamente para acción, foco y selección.
   -------------------------------------------------------------------------- */
:root {
  --bg: rgb(246, 247, 248);
  --surface: rgb(255, 255, 255);
  --surface-subtle: rgb(248, 249, 250);
  --surface-hover: rgb(240, 242, 244);
  --sidebar: rgb(251, 251, 252);
  --sidebar-hover: rgb(239, 241, 243);
  --sidebar-text: rgb(23, 25, 28);
  --sidebar-soft: rgb(109, 115, 124);
  --text: rgb(23, 25, 28);
  --text-soft: rgb(96, 103, 113);
  --text-faint: rgb(138, 145, 155);
  --border: rgb(228, 231, 235);
  --border-strong: rgb(207, 212, 218);
  --radius-control: 14px;
  --radius-panel: 20px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --shadow-menu: 0 18px 50px rgba(17, 24, 39, .12);
  --shadow-panel: -24px 0 70px rgba(17, 24, 39, .18);
}

html[data-theme="dark"] {
  --bg: rgb(16, 17, 19);
  --surface: rgb(24, 26, 29);
  --surface-subtle: rgb(29, 31, 35);
  --surface-hover: rgb(36, 39, 44);
  --sidebar: rgb(20, 21, 24);
  --sidebar-hover: rgb(32, 34, 39);
  --sidebar-text: rgb(244, 245, 246);
  --sidebar-soft: rgb(153, 159, 168);
  --text: rgb(243, 244, 245);
  --text-soft: rgb(177, 181, 188);
  --text-faint: rgb(127, 133, 142);
  --border: rgb(43, 46, 51);
  --border-strong: rgb(59, 63, 70);
  --shadow-menu: 0 20px 54px rgba(0, 0, 0, .38);
  --shadow-panel: -24px 0 74px rgba(0, 0, 0, .48);
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, .btn, a.btn { -webkit-tap-highlight-color: transparent; }
button:active:not(:disabled), .btn:active:not(:disabled) { transform: scale(.97); }
.support-back:active:not(:disabled) { transform: scale(.97); }

.admin-layout { grid-template-columns: 272px minmax(0, 1fr); }
.side-nav {
  width: 272px;
  padding: 1.3rem 1rem 1rem;
  border-right-color: color-mix(in srgb, var(--border) 84%, transparent);
}
.side-brand { min-height: 76px; padding: .4rem .65rem 1.5rem; }
.side-link { min-height: 44px; border-radius: 999px; padding: .62rem .8rem; }
.side-link.active { font-weight: 720; }
.side-footer { margin-inline: .7rem; }

.navbar {
  min-height: 70px;
  padding-inline: clamp(1rem, 3vw, 2.5rem);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(22px) saturate(140%);
}
.workspace { width: min(1280px, 100%); padding: 3rem clamp(1.25rem, 4vw, 3.75rem) 6rem; }
.page-heading { align-items: center; margin-bottom: 2rem; }
.page-heading h1 { font-size: clamp(1.75rem, 2.6vw, 2.25rem); font-weight: 760; letter-spacing: -.035em; }
.page-heading > div > p { font-size: .89rem; }

.btn {
  min-height: 42px;
  border-radius: 999px;
  padding-inline: 1rem;
  transition: transform 100ms ease-out, background .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease;
}
.btn svg { flex: 0 0 auto; }
.btn.icon-only, a.btn.icon-only {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 999px;
  padding: 0;
}
.btn.icon-only.small, a.btn.icon-only.small { width: 36px; min-width: 36px; height: 36px; min-height: 36px; }
.btn.icon-only svg, a.btn.icon-only svg { width: 1.05rem; height: 1.05rem; }
.icon-button, .close, .support-icon-action, .support-send-action {
  border-radius: 999px;
  transition: transform 100ms ease-out, color .15s, border-color .15s, background .15s;
}
.theme-trigger, .app-trigger { border-radius: 999px; }
.theme-menu, .app-menu { border-radius: 18px; }
.theme-menu button { border-radius: 12px; }
.page-controls button, .order-buttons button { border-radius: 999px; }

.card, .items, .record-list, .summary-grid, .editor-page > section,
.booking-settings > section, .booking-setup, .booking-record-list,
.booking-source-card, .booking-calendar { border-radius: var(--radius-panel); }
.editor-page { max-width: 980px; gap: 1.25rem; }
.editor-page > section, .booking-settings > section { padding: 1.5rem; }
.editor-page h2, .booking-settings h2 { font-size: 1.05rem; letter-spacing: -.015em; }

.dashboard-heading { border-bottom: 0; margin-bottom: 1.25rem; padding-bottom: 0; }
.dashboard-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 2.25rem; }
.module-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  border-top: 0;
}
.module-entry {
  min-height: 84px;
  grid-template-columns: 28px minmax(0, 1fr) auto 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: .9rem 1rem;
  background: var(--surface);
}
.module-entry:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.module-copy small { white-space: normal; line-height: 1.35; }
.summary-panel, .publish-note {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem;
  background: var(--surface);
}
.summary-panel dl > div:last-child { border-bottom: 0; }

.summary-grid { overflow: hidden; }
.catalog-kind-tabs { border-radius: 999px; }
.catalog-kind-tabs button { border-radius: 999px; }
.booking-tabs { border-radius: 999px; }
.booking-tabs button { border-radius: 999px; }
.collection-search { min-height: 44px; border-radius: 999px; padding-left: .85rem; }
.collection-search button { border-radius: 999px; }
.pagination-bar select, .record-row select, .hours-row input[type="time"],
.availability-row input[type="time"], .calendar-filter select { border-radius: var(--radius-control); }

.row { min-height: 82px; }
.row:first-of-type { border-top: 0; }
.thumb { width: 56px; height: 56px; border-radius: 14px; }
.record-row { min-height: 80px; }
.visibility, .status-label { padding: .34rem .62rem; }

.field { gap: .45rem; }
.field label { font-size: .76rem; font-weight: 700; }
.field input, .field textarea, .field select,
.support-new input, .support-new textarea, .support-composer textarea {
  min-height: 46px;
  border-radius: var(--radius-control);
  padding: .72rem .8rem;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus,
.support-new input:focus, .support-new textarea:focus, .support-composer textarea:focus {
  outline: 0;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-primary) 12%, transparent);
  background: var(--surface);
}
.input-with-icon { position: relative; color: var(--text-faint); }
.input-with-icon > svg {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: .85rem;
  width: 1rem;
  height: 1rem;
  transform: translateY(-50%);
  pointer-events: none;
}
.input-with-icon > input, .input-with-icon > textarea { padding-left: 2.65rem; }
.input-with-icon:focus-within { color: var(--brand-primary); }
.input-with-icon.textarea-icon > svg { top: .95rem; transform: none; }
.password-field > input { padding-right: 3.15rem; }
.password-toggle { position: absolute; top: 50%; right: .125rem; display: grid; width: 44px; height: 44px; place-items: center; transform: translateY(-50%); border: 0; border-radius: 999px; color: var(--text-soft); background: transparent; cursor: pointer; transition: none; }
.password-toggle svg { width: 1.1rem; height: 1.1rem; }
.password-toggle:hover, .password-toggle[aria-pressed="true"] { color: var(--text); background: var(--surface-hover); }
.password-toggle:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: -2px; }
button.password-toggle:active:not(:disabled) { transform: translateY(-50%); }
.social-input input { padding-left: 2.75rem; }
.check input, .compact-check input, .service-checklist input,
.availability-row input[type="checkbox"] { accent-color: var(--brand-primary); }

.sticky-save {
  bottom: 1.25rem;
  width: max-content;
  justify-self: end;
  border-radius: 999px;
  padding: .42rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 14px 38px rgba(17, 24, 39, .12);
  backdrop-filter: blur(18px) saturate(140%);
}

.upload-drop {
  min-height: 132px;
  justify-content: center;
  flex-direction: column;
  gap: .6rem;
  border-width: 1.5px;
  border-radius: 18px;
  padding: 1.25rem;
  text-align: center;
}
.upload-drop strong::after { content: " o arrastra aquí"; font-weight: 540; color: var(--text-soft); }
.upload-drop.selected strong::after { content: none; }
.upload-drop:hover, .upload-drop.selected, .upload-drop.drag-active {
  border-color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 6%, var(--surface));
}
.upload-drop.drag-active { box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--brand-primary) 12%, transparent); }
.upload-drop:focus-within { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.upload-symbol { width: 32px; height: 32px; }
.upload-symbol svg { width: 1.35rem; height: 1.35rem; }
.support-composer.drag-active { box-shadow: inset 0 0 0 2px var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 5%, var(--surface)); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.gallery-grid > .empty-state { grid-column: 1 / -1; border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--surface); }
.gallery-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--surface); }
.gallery-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-subtle); }
.gallery-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .24s ease; }
.gallery-card:hover .gallery-media img { transform: scale(1.025); }
.gallery-placeholder { display: grid; width: 100%; height: 100%; place-content: center; justify-items: center; gap: .55rem; color: var(--text-faint); font-size: .72rem; }
.gallery-placeholder svg { width: 1.6rem; height: 1.6rem; }
.gallery-card-body { display: grid; gap: 1rem; padding: 1rem; }
.gallery-card-copy { display: grid; min-width: 0; gap: .28rem; }
.gallery-card-copy strong { overflow: hidden; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.gallery-card-copy small { min-height: 2.5em; overflow: hidden; color: var(--text-soft); font-size: .72rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gallery-card-footer { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: .6rem; }

.modal-bg { background: rgba(8, 10, 14, .55); backdrop-filter: blur(5px); }
.modal { border-radius: 24px 0 0 24px; padding: 1.8rem 2rem 2.25rem; }
.modal-head { top: -1.8rem; margin: -1.8rem -2rem 1.35rem; padding: 1.5rem 2rem 1.15rem; }
.modal-actions { position: sticky; bottom: -2.25rem; z-index: 3; margin: 1.4rem -2rem -2.25rem; padding: 1rem 2rem max(1rem, env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(18px); }

.login-form-wrap { width: min(420px, 100%); }
.login-form-wrap h2 { letter-spacing: -.035em; }
.login-button { min-height: 48px; }
.support-launcher { border-radius: 999px; }
.support-drawer { border-radius: 24px 0 0 24px; overflow: hidden; }

/* Follows the open editor without covering its action bar. */
body:has(> .modal-bg) .support-launcher {
  right: auto;
  left: max(1.35rem, env(safe-area-inset-left));
}

.user-chip > img { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 999px; object-fit: cover; background: var(--surface-subtle); }
.login-business .brand-logo-set { height: 68px; }
.login-business .brand-logo { height: 64px; max-width: min(360px, 35vw); }
.login-business .brand-monogram { width: 64px; height: 64px; flex-basis: 64px; border-radius: 18px; }
.dashboard-layout { display: block; }
.module-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-media .gallery-placeholder-image { width: 100%; height: 100%; padding: 3rem; object-fit: contain; background: var(--surface-subtle); }
html[data-theme="dark"] .gallery-media .gallery-placeholder-image { background: transparent; filter: invert(1) brightness(3); mix-blend-mode: lighten; }
.gallery-grid.team-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 280px)); }
.team-card .gallery-media { aspect-ratio: 1 / 1; }
.team-card .gallery-card-body { gap: .75rem; padding: .75rem; }
.team-card .gallery-card-copy small { min-height: 2.8em; }
img.thumb.empty, img.booking-source-thumb.empty, img.catalog-result-mark { display: block; padding: .35rem; object-fit: contain; background: var(--surface-subtle); }

.business-location { display: grid; gap: .85rem; margin-top: 1.4rem; }
.business-location-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.business-location-heading h3 { margin: 0 0 .25rem; font-size: .95rem; }
.business-location-heading p, .business-map-status { margin: 0; color: var(--text-soft); font-size: .76rem; line-height: 1.5; }
.business-location-actions { display: flex; align-items: center; gap: .6rem; white-space: nowrap; }
.business-location-actions a { color: var(--brand-primary); font-size: .74rem; text-decoration: underline; text-underline-offset: 3px; }
.business-map { position: relative; z-index: 0; width: 100%; height: 330px; overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--surface-subtle); }
.business-map-marker { --pin-red: rgb(229 57 53); border: 0; background: transparent; }
.business-map-marker svg { display: block; width: 44px; height: 44px; overflow: visible; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.business-map-marker svg path { fill: var(--pin-red); stroke: #fff; stroke-width: 1.2; }
.business-map-marker svg circle { fill: #fff; stroke: var(--pin-red); stroke-width: 1.2; }
.business-coordinates { max-width: 560px; }
.business-coordinates input { font-variant-numeric: tabular-nums; }
#business-form.editor-page { width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); }
#business-form > section, #business-form .grid2, #business-form .field { min-width: 0; }

@media (max-width: 1080px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-layout { grid-template-columns: 1fr; }
  .overview-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .admin-layout { display: block; }
  .side-nav { width: min(310px, calc(100vw - 48px)); }
  .workspace { padding-top: 2rem; }
  .module-list { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .property-upload-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-property-record { grid-template-columns: minmax(0, 1fr); }
  .lead-followup { grid-column: 1; }
  .workspace { padding: 1.5rem 1rem 5rem; }
  #business-form > section { padding: 1.2rem 1rem; }
  #business-form .business-save { position: static; width: 100%; justify-self: stretch; justify-content: flex-end; margin: 0; padding: .25rem 0; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
  #business-form .business-save .btn.icon-only { width: 48px; min-width: 48px; height: 48px; min-height: 48px; }
  .page-heading { align-items: flex-start; }
  .gallery-grid { grid-template-columns: 1fr; }
  .overview-aside { grid-template-columns: 1fr; }
  .summary-grid { border-radius: 16px; }
  .modal { width: 100%; border-radius: 22px 22px 0 0; padding-inline: 1rem; }
  .modal-bg { align-items: end; }
  .modal-head { margin-inline: -1rem; padding-inline: 1rem; }
  .modal-actions { margin-inline: -1rem; padding-inline: 1rem; }
  .upload-drop { min-height: 118px; }
  .login-business .brand-logo-set { height: 48px; }
  .login-business .brand-logo { height: 44px; max-width: min(260px, 70vw); }
  .business-location-heading { flex-direction: column; }
  .business-map { height: 270px; }
  body:has(> .modal-bg) .support-launcher { left: max(.85rem, env(safe-area-inset-left)); bottom: max(6rem, env(safe-area-inset-bottom)); width: 42px; height: 42px; justify-content: center; padding: 0; }
  body:has(> .modal-bg) .support-launcher span { display: none; }
  .input-with-icon > input, .input-with-icon > textarea { font-size: 16px; }
}

@media (max-width: 520px) {
  .booking-tabs { border-radius: 20px; }
  #business-form .hours-times { grid-template-columns: minmax(0, 1fr); }
  #business-form .hours-time > input[type="time"] { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .gallery-card:hover .gallery-media img { transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .navbar, .sticky-save, .modal-head, .modal-actions { background: var(--surface); backdrop-filter: none; }
  .modal-bg { backdrop-filter: none; }
}

@media (prefers-contrast: more) {
  :root { --border: rgb(174, 180, 188); --border-strong: rgb(112, 119, 128); }
  html[data-theme="dark"] { --border: rgb(98, 104, 115); --border-strong: rgb(164, 169, 176); }
}

.admin-toast-stack { position: fixed; z-index: 120; top: max(1rem, env(safe-area-inset-top)); right: max(1rem, env(safe-area-inset-right)); display: flex; width: min(400px, calc(100vw - 2rem)); flex-direction: column; gap: .6rem; pointer-events: none; }
.admin-toast { display: grid; grid-template-columns: 22px minmax(0, 1fr) 30px; align-items: start; gap: .65rem; min-height: 52px; border: 0; border-radius: var(--radius-control); padding: .7rem .65rem .7rem .85rem; color: var(--toast-foreground); background: var(--toast-background); box-shadow: var(--shadow-menu); opacity: 0; transform: translateX(calc(100% + 1rem)); transition: transform 200ms var(--ease-out), opacity 200ms var(--ease-out); pointer-events: auto; }
.admin-toast.is-visible { opacity: 1; transform: translateX(0); }
.admin-toast.is-leaving { opacity: 0; transform: translateX(calc(100% + 1rem)); pointer-events: none; }
.admin-toast-info { --toast-background: var(--brand-primary); --toast-foreground: var(--brand-on-primary); }
.admin-toast-success { --toast-background: var(--success); --toast-foreground: var(--surface); }
.admin-toast-warning { --toast-background: var(--warning); --toast-foreground: var(--surface); }
.admin-toast-error { --toast-background: var(--danger); --toast-foreground: var(--surface); }
.admin-toast-icon { display: grid; width: 22px; height: 22px; place-items: center; color: currentColor; }
.admin-toast-icon svg { width: 19px; height: 19px; }
.admin-toast-message { min-width: 0; padding-top: .1rem; font-size: .8rem; line-height: 1.45; overflow-wrap: anywhere; }
.admin-toast-close { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 999px; color: currentColor; background: transparent; }
.admin-toast-close:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.admin-toast-close svg { width: 16px; height: 16px; }

@media (max-width: 520px) {
  .login-page { min-height: 100dvh; overflow-x: hidden; overflow-y: auto; }
  .login-stage { min-height: 100dvh; grid-template-rows: auto 1fr; }
  .login-story { min-height: 185px; justify-content: center; padding: 5.75rem 1rem 1.35rem; }
  .login-business { width: 100%; justify-content: center; }
  .login-business .brand-logo-set { height: 68px; max-width: 100%; }
  .login-business .brand-logo { height: 64px; max-width: min(290px, calc(100vw - 2rem)); }
  .login-business .brand-monogram { width: 64px; height: 64px; flex-basis: 64px; }
  .login-access { min-height: 0; align-items: flex-start; padding: 2.25rem 1rem max(2.5rem, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .admin-toast, .admin-toast.is-visible, .admin-toast.is-leaving { transform: none !important; transition: opacity 150ms var(--ease-out) !important; }
}

.login-loading { display: grid; width: min(420px, 100%); min-height: 340px; place-items: center; }
.login-spinner { display: block; width: 46px; height: 46px; border: 3px solid var(--border-strong); border-top-color: var(--brand-primary); border-radius: 999px; animation: login-spin .8s linear infinite; }
@keyframes login-spin { to { transform: rotate(360deg); } }

/* Inventario inmobiliario: hereda tipografía, colores y controles del panel. */
.property-page { min-width: 0; }
.property-heading { align-items: flex-start; }
.property-heading .btn { white-space: nowrap; }
.property-heading-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.property-overview { display: flex; align-items: baseline; gap: .4rem; margin: -.4rem 0 1.2rem; color: var(--text-soft); font-size: .8rem; }
.property-overview strong { color: var(--text); font-size: 1.28rem; font-variant-numeric: tabular-nums; }
.property-filters { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(124px, 1fr)) auto; gap: .55rem; align-items: center; margin-bottom: 1rem; }
.property-filters label { display: block; min-width: 0; }
.property-filters .inline-control-help { display: flex; width: 100%; }
.property-filters input, .property-filters select { width: 100%; height: 42px; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-control, 9px); padding: .55rem .65rem; color: var(--text); background: var(--surface); font-size: .78rem; }
.property-filters .property-search { position: relative; }
.property-search svg { position: absolute; top: 50%; left: .75rem; width: 1rem; height: 1rem; color: var(--text-faint); transform: translateY(-50%); }
.property-search input { padding-left: 2.15rem; }
.property-filters input::placeholder { color: var(--text-faint); }
.property-filters .btn { min-height: 42px; }
.property-records { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.property-record { display: grid; grid-template-columns: 88px minmax(200px, 1fr) minmax(120px, auto) 100px auto; gap: 1rem; align-items: center; min-height: 112px; padding: .7rem 1rem; border-top: 1px solid var(--border); }
.property-record:first-child { border-top: 0; }
.property-record:hover { background: var(--surface-subtle); }
.property-record-image { display: grid; width: 88px; height: 72px; place-items: center; overflow: hidden; border-radius: 7px; color: var(--text-faint); background: var(--surface-hover); }
.property-record-image img { width: 100%; height: 100%; object-fit: cover; }
.property-record-image svg { width: 1.5rem; height: 1.5rem; }
.property-record-main, .property-record-price, .property-record-status { display: grid; min-width: 0; gap: .28rem; }
.property-record-main strong { overflow: hidden; color: var(--text); font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.property-record-main span, .property-record-main small, .property-record-price span, .property-record-status small { overflow: hidden; color: var(--text-soft); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.property-record-price strong { color: var(--text); font-size: .86rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.property-record-status { justify-items: start; }
.property-badge { display: inline-flex; width: max-content; align-items: center; border-radius: 999px; padding: .22rem .52rem; color: var(--text-soft); background: var(--surface-hover); font-size: .68rem; font-weight: 700; }
.property-badge.published { color: var(--success); background: color-mix(in srgb, var(--success) 12%, var(--surface)); }
.property-badge.hidden { color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, var(--surface)); }
.property-record-edit { justify-self: end; }
.property-empty { display: grid; justify-items: center; gap: .6rem; padding: 4rem 1.2rem; text-align: center; }
.property-empty > span { color: var(--text-faint); }
.property-empty > span svg { width: 2rem; height: 2rem; }
.property-empty h2 { margin: .2rem 0 0; font-size: 1.1rem; }
.property-empty p { max-width: 42ch; margin: 0 0 .65rem; color: var(--text-soft); font-size: .82rem; }
.property-pagination { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1rem; }
.property-pagination span { color: var(--text-soft); font-size: .76rem; font-variant-numeric: tabular-nums; }

.property-editor-heading { margin-bottom: 1.5rem; }
.property-back { display: inline-flex; align-items: center; gap: .35rem; border: 0; padding: .2rem 0; color: var(--text-soft); background: transparent; font-size: .76rem; font-weight: 650; }
.property-back svg { width: 1rem; height: 1rem; }
.property-back:hover { color: var(--brand-primary); }
.property-editor-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-top: .85rem; }
.property-editor-title h1 { margin: 0; font-size: 1.75rem; letter-spacing: -.03em; }
.property-editor-title p { margin: .3rem 0 0; color: var(--text-soft); font-size: .82rem; }
.property-editor-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.property-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 1.3rem; align-items: start; }
.property-editor-main { display: grid; min-width: 0; gap: 1rem; }
.property-section, .property-aside-panel { min-width: 0; border: 1px solid var(--border); border-radius: 12px; padding: 1.3rem; background: var(--surface); }
.property-section-heading { margin-bottom: 1.1rem; }
.property-section-heading h2, .property-aside-panel h2 { margin: 0; font-size: 1rem; letter-spacing: -.02em; }
.property-section-heading p { margin: .3rem 0 0; color: var(--text-soft); font-size: .76rem; line-height: 1.45; }
.property-section .field { min-width: 0; margin: 0 0 .85rem; }
.property-section .field:last-child { margin-bottom: 0; }
.property-section .field textarea { min-height: 120px; }
.property-section .field small { color: var(--text-soft); font-size: .71rem; }
.property-grid-two, .property-grid-three { display: grid; gap: .8rem; }
.property-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.property-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.property-inline-note { color: var(--text-soft); font-size: .75rem; }
.property-editor-aside { position: sticky; top: 5rem; }
.property-aside-panel .field { margin: 1rem 0 .55rem; }
.property-aside-panel > p { margin: .3rem 0 1rem; color: var(--text-soft); font-size: .72rem; line-height: 1.45; }
.property-checklist { border-top: 1px solid var(--border); padding-top: 1rem; }
.property-checklist > strong { font-size: .75rem; }
.property-checklist ul { display: grid; gap: .6rem; margin: .8rem 0 1.1rem; padding: 0; list-style: none; }
.property-checklist li { display: flex; align-items: center; gap: .5rem; color: var(--text-soft); font-size: .73rem; }
.property-checklist li svg { width: .95rem; height: .95rem; color: var(--text-faint); }
.property-checklist li.complete svg { color: var(--success); }
.property-save-actions { display: grid; gap: .5rem; }
.property-save-actions .btn { width: 100%; }
.property-save-actions .danger { border: 0; color: var(--danger); background: transparent; }
.property-save-actions .danger:hover { background: color-mix(in srgb, var(--danger) 9%, var(--surface)); }

.property-upload-pair { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.property-upload { display: grid; min-height: 128px; align-content: center; justify-items: center; gap: .28rem; border: 1px dashed var(--border-strong); border-radius: 9px; padding: 1rem; color: var(--text); background: var(--surface-subtle); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.property-upload:hover, .property-upload:focus-within, .property-upload.drag-active { border-color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 5%, var(--surface)); }
.property-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.property-upload > span { color: var(--brand-primary); }
.property-upload > span svg { width: 1.35rem; height: 1.35rem; }
.property-upload strong { font-size: .78rem; }
.property-upload small { color: var(--text-soft); font-size: .68rem; }
.property-queue-head { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin: 1.3rem 0 .5rem; }
.property-queue-head strong { font-size: .78rem; }
.property-queue-head small { color: var(--text-soft); font-size: .7rem; }
.property-queue-list { display: grid; gap: .45rem; }
.property-queue-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) 30px; align-items: center; gap: .65rem; border: 1px solid var(--border); border-radius: 8px; padding: .35rem; }
.property-queue-item img, .property-queue-item video { width: 48px; height: 44px; border-radius: 5px; object-fit: cover; }
.property-queue-item > span { display: grid; min-width: 0; gap: .18rem; }
.property-queue-item strong, .property-queue-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.property-queue-item strong { font-size: .72rem; }
.property-queue-item small { color: var(--text-soft); font-size: .67rem; }
.property-queue-item progress { width: 100%; height: 5px; accent-color: var(--brand-primary); }
.property-queue-item button { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 999px; color: var(--text-soft); background: transparent; }
.property-queue-item button:hover { color: var(--danger); background: var(--surface-hover); }
.property-media-group { margin-top: 1.4rem; }
.property-media-heading { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .7rem; }
.property-media-heading h3 { margin: 0; font-size: .82rem; }
.property-media-heading span, .property-media-empty { color: var(--text-soft); font-size: .73rem; }
.property-media-empty { margin: 0; padding: .5rem 0; }
.property-media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.property-media-card { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.property-media-card.drag-target { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.property-media-preview { position: relative; aspect-ratio: 4 / 3; background: var(--surface-subtle); }
.property-media-preview img, .property-media-preview video { width: 100%; height: 100%; object-fit: cover; }
.property-media-preview video { background: #111; }
.property-media-preview > span { position: absolute; bottom: .4rem; left: .4rem; border-radius: 999px; padding: .2rem .45rem; color: var(--brand-on-primary); background: var(--brand-primary); font-size: .63rem; font-weight: 700; }
.property-media-preview .property-video-badge { position: absolute; top: .4rem; left: .4rem; border-radius: 4px; padding: .18rem .4rem; background: rgba(0, 0, 0, .72); color: #fff; font-size: .62rem; }
.property-media-actions { display: grid; gap: .45rem; padding: .65rem; }
.property-media-actions label { display: grid; gap: .25rem; color: var(--text-soft); font-size: .67rem; }
.property-media-actions .inline-control-help { display: flex; width: 100%; }
.property-media-actions input, .property-media-actions textarea { width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 6px; padding: .45rem .5rem; color: var(--text); background: var(--surface); font: inherit; font-size: .72rem; line-height: 1.4; }
.property-media-actions input { height: 34px; }
.property-media-actions textarea { min-height: 58px; resize: vertical; }
.property-media-actions input:focus-visible, .property-media-actions textarea:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 1px; }
.property-media-buttons { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .25rem; }
.property-media-buttons button { display: inline-flex; min-width: 28px; height: 28px; align-items: center; justify-content: center; border: 0; border-radius: 6px; padding: .2rem .35rem; color: var(--text-soft); background: transparent; font-size: .66rem; }
.property-media-buttons button:hover:not(:disabled) { color: var(--brand-primary); background: var(--surface-hover); }
.property-media-buttons button:disabled { opacity: .35; }
.property-media-buttons .property-remove:hover { color: var(--danger) !important; }
.property-media-buttons .property-media-save { margin-right: auto; color: var(--brand-primary); font-weight: 700; }
.property-media-buttons svg { width: .86rem; height: .86rem; }
.property-media-section [data-property-media].busy { opacity: .6; pointer-events: none; }
.property-media-links { margin-top: 1.3rem; }
.property-map-block { display: grid; gap: .8rem; margin: .5rem 0 1.3rem; border-top: 1px solid var(--border); padding-top: 1.2rem; }
.property-map-intro strong { font-size: .82rem; }
.property-map-intro p, .property-map-status { margin: .25rem 0 0; color: var(--text-soft); font-size: .73rem; line-height: 1.5; }
.property-map { height: 290px; border-radius: 9px; }
.property-map-controls { display: flex; align-items: end; gap: .7rem; }
.property-map-controls .property-grid-two { flex: 1; min-width: 0; }
.property-map-controls .field { margin-bottom: 0; }
.property-map-controls .btn { flex: none; min-height: 42px; }
.property-map-controls input { font-variant-numeric: tabular-nums; }
.property-doc-upload { min-height: 104px; }
.property-doc-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin: 1.35rem 0 .65rem; }
.property-doc-heading h3 { margin: 0; font-size: .82rem; }
.property-doc-heading span { color: var(--text-soft); font-size: .7rem; font-variant-numeric: tabular-nums; }
.property-doc-list, .property-doc-queue-list { display: grid; gap: .6rem; }
.property-doc-row, .property-doc-queue-row { min-width: 0; border: 1px solid var(--border); border-radius: 9px; padding: .85rem; background: var(--surface); }
.property-doc-summary, .property-doc-queue-row { display: flex; align-items: flex-start; gap: .65rem; }
.property-doc-summary > span, .property-doc-queue-row > span { flex: none; color: var(--brand-primary); }
.property-doc-summary svg, .property-doc-queue-row svg { width: 1.1rem; height: 1.1rem; }
.property-doc-summary > div, .property-doc-queue-row > div { display: grid; flex: 1; min-width: 0; gap: .15rem; }
.property-doc-summary strong, .property-doc-queue-row strong { overflow: hidden; font-size: .77rem; text-overflow: ellipsis; white-space: nowrap; }
.property-doc-summary small, .property-doc-queue-row small { color: var(--text-soft); font-size: .67rem; line-height: 1.45; }
.property-doc-edit { display: grid; grid-template-columns: minmax(0, 1fr) 125px; gap: .7rem; margin: .9rem 0 .65rem; }
.property-doc-edit label, .property-doc-queue-row label { display: grid; min-width: 0; gap: .3rem; color: var(--text-soft); font-size: .68rem; }
.property-doc-edit input, .property-doc-edit select, .property-doc-queue-row input { width: 100%; min-width: 0; min-height: 36px; border: 1px solid var(--border); border-radius: 7px; padding: .45rem .55rem; color: var(--text); background: var(--surface); font-size: .76rem; }
.property-doc-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.property-doc-actions .btn { min-height: 44px; padding: .55rem .8rem; font-size: .72rem; }
.property-doc-actions .danger { margin-left: auto; }
.property-doc-queue-row { align-items: center; }
.property-doc-queue-row label { margin-top: .55rem; }
.property-doc-queue-row progress { width: 100%; height: 5px; accent-color: var(--brand-primary); }
.property-doc-queue-row > button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 999px; color: var(--text-soft); background: transparent; }
.property-doc-queue-row > button:hover { color: var(--danger); background: var(--surface-hover); }
.property-doc-queue-row > button svg { width: .9rem; height: .9rem; }
.lead-property-record { grid-template-columns: minmax(0, 1fr) auto; }
.lead-main { min-width: 0; }
.lead-property-link { display: inline-flex; align-items: center; gap: .25rem; border: 0; padding: .35rem 0 .1rem; color: var(--brand-primary); background: transparent; font-size: .73rem; font-weight: 650; text-align: left; }
.lead-property-link svg { width: .92rem; height: .92rem; }
.lead-property-link:hover { text-decoration: underline; text-underline-offset: .2rem; }
.lead-stage { display: block; margin-top: .5rem; color: var(--text-soft); font-size: .69rem; }
.lead-followup { grid-column: 1 / -1; border-top: 1px solid var(--border); padding: .55rem 0 .15rem; }
.lead-followup summary { width: max-content; color: var(--brand-primary); cursor: pointer; font-size: .73rem; font-weight: 680; }
.lead-followup form { max-width: 720px; padding: .7rem 0 .3rem; }
.lead-followup .field { min-width: 0; }
.lead-followup textarea { min-height: 76px; }
.property-showings-page { max-width: 780px; }
.property-showings-page > .page-heading { margin-top: 1rem; }
.property-showings-page .property-section { margin-bottom: 1rem; }
.property-showings-page .property-section .check { margin: 1.1rem 0 1.35rem; }
.property-showing-actions { display: flex; align-items: center; gap: .8rem; margin-top: 1.3rem; }
.property-showing-actions span { color: var(--text-soft); font-size: .74rem; }
.property-showing-next { border-top: 1px solid var(--border); padding-top: 1.4rem; }
.property-showing-next h2 { margin: 0 0 .6rem; font-size: 1rem; }
.property-showing-next ol { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--text-soft); font-size: .78rem; line-height: 1.75; }
.property-showing-next > div { display: flex; flex-wrap: wrap; gap: .5rem; }
.property-showing-context { display: flex; align-items: center; gap: .5rem; margin: .45rem 0 1rem; color: var(--text); font-size: .79rem; font-weight: 650; }

@media (max-width: 1180px) {
  .property-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .property-filters .property-search { grid-column: span 2; }
  .property-filters .btn { width: 100%; }
  .property-record { grid-template-columns: 72px minmax(150px, 1fr) minmax(100px, auto) auto; }
  .property-record-image { width: 72px; height: 66px; }
  .property-record-status { display: none; }
  .property-editor-layout { grid-template-columns: minmax(0, 1fr); }
  .property-editor-aside { position: static; grid-row: 1; }
  .property-aside-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1.2rem; }
  .property-aside-panel h2, .property-aside-panel > .field, .property-aside-panel > p { grid-column: 1; }
  .property-aside-panel .property-checklist, .property-aside-panel .property-save-actions { grid-column: 2; }
  .property-aside-panel .property-checklist { grid-row: 1 / span 3; border: 0; padding-top: 0; }
}
@media (max-width: 680px) {
  .property-heading-actions { width: 100%; }
  .property-heading .btn { flex: 1; }
  .property-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .property-filters .property-search { grid-column: 1 / -1; }
  .property-filters .btn { grid-column: 1 / -1; }
  .property-record { grid-template-columns: 66px minmax(0, 1fr) auto; gap: .7rem; padding: .7rem; }
  .property-record-image { width: 66px; height: 66px; }
  .property-record-price { grid-column: 2; }
  .property-record-edit { grid-column: 3; grid-row: 1 / span 2; }
  .property-editor-title { align-items: flex-start; flex-direction: column; }
  .property-editor-links { width: 100%; }
  .property-editor-links .btn { flex: 1; }
  .property-aside-panel { display: block; }
  .property-aside-panel .property-checklist { border-top: 1px solid var(--border); padding-top: 1rem; }
  .property-grid-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .property-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .property-map-controls { align-items: stretch; flex-direction: column; }
  .property-map-controls .property-grid-two { width: 100%; }
  .property-map-controls .btn { align-self: flex-start; }
}
@media (max-width: 480px) {
  .property-editor-page { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
  body:has(.property-editor-page) .support-launcher { right: auto; left: max(.85rem, env(safe-area-inset-left)); width: 44px; min-height: 44px; justify-content: center; padding: 0; }
  body:has(.property-editor-page) .support-launcher span { display: none; }
  .property-heading-actions { display: grid; }
  .property-record { grid-template-columns: 62px minmax(0, 1fr); }
  .property-record-image { width: 62px; height: 62px; }
  .property-record-edit { grid-column: 2; grid-row: auto; width: 100%; }
  .property-grid-two, .property-grid-three, .property-upload-pair { grid-template-columns: minmax(0, 1fr); }
  .property-section, .property-aside-panel { padding: 1rem; }
  .property-media-grid { grid-template-columns: minmax(0, 1fr); }
  .property-media-buttons button { min-width: 40px; min-height: 40px; }
  .property-map { height: 240px; }
  .property-doc-edit { grid-template-columns: minmax(0, 1fr); }
  .property-doc-actions .btn { flex: 1; }
  .property-doc-actions .danger { margin-left: 0; }
}

.users-page-heading { max-width: 1000px; }
.users-list { max-width: 1000px; overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
.users-list-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); background: var(--surface-subtle); }
.users-list-heading strong { font-size: .84rem; }
.users-list-heading span { color: var(--text-soft); font-size: .76rem; }
.user-account { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: .85rem; min-height: 82px; padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); }
.user-account:last-child { border-bottom: 0; }
.user-account-avatar { display: block; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 999px; object-fit: cover; background: var(--surface-subtle); }
.user-account-main { display: grid; min-width: 0; gap: .15rem; }
.user-account-main strong { overflow-wrap: anywhere; font-size: .87rem; }
.user-account-main small, .users-edit-identity small { color: var(--text-soft); font-size: .75rem; }
.user-account-status { color: var(--text-soft); font-size: .75rem; white-space: nowrap; }
.user-account-status.inactive { color: var(--danger); }
.users-empty { padding: 2.5rem 1.25rem; text-align: center; }
.users-empty strong { font-size: .9rem; }
.users-empty p { margin: .4rem 0 0; color: var(--text-soft); font-size: .8rem; }
.users-editor-page { width: min(900px, 100%); margin: 0 auto; }
.users-back { display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; margin: -.45rem 0 1rem; border: 0; padding: .2rem 0; color: var(--text-soft); background: transparent; font-size: .79rem; font-weight: 700; }
.users-back:hover { color: var(--text); }
.users-back svg { width: .9rem; height: .9rem; }
.users-editor-form { display: grid; gap: 1.1rem; }
.users-form-section { border: 1px solid var(--border); border-radius: 13px; padding: 1.4rem; background: var(--surface); }
.users-form-section h2, .users-account-settings h2 { margin: 0; font-size: 1rem; }
.users-form-section-heading { margin-bottom: 1rem; }
.users-form-section-heading p { margin: .35rem 0 0; color: var(--text-soft); font-size: .8rem; }
.users-credentials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: .85rem; }
.users-credentials .field { margin: 0; }
.users-edit-identity { display: flex; align-items: center; gap: .8rem; }
.users-edit-identity > div { display: grid; gap: .2rem; }
.users-permission-grid { display: grid; gap: 1.2rem; }
.users-permission-group { min-width: 0; margin: 0; border: 0; padding: 0; }
.users-permission-group legend { width: 100%; padding: 0 0 .3rem; color: var(--text-soft); font-size: .76rem; font-weight: 750; }
.users-permission-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, 165px); align-items: center; gap: .75rem; min-height: 50px; border-bottom: 1px solid var(--border); font-size: .8rem; }
.users-permission-row label { font-weight: 650; }
.users-permission-row select { width: 100%; min-width: 0; min-height: 36px; border: 1px solid var(--border); border-radius: 8px; padding: .4rem .55rem; background: var(--surface); color: var(--text); font: inherit; }
.users-security-note, .read-only-notice { color: var(--text-soft); font-size: .78rem; line-height: 1.5; }
.users-security-note { margin: 1rem 0 0; }
.users-form-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.users-form-footer span { color: var(--text-soft); font-size: .78rem; }
.users-account-settings { margin-top: 2.4rem; border-top: 1px solid var(--border); padding-top: 1.25rem; }
.users-account-settings > div { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: .85rem; }
.read-only-notice { margin: 0 0 1rem; padding: .7rem .9rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.users-editor-form input:focus-visible, .users-editor-form select:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.user-confirm-dialog { width: min(440px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; margin: auto; border: 1px solid var(--border); border-radius: 14px; padding: 1.25rem; background: var(--surface); color: var(--text); box-shadow: var(--shadow-panel); }
.user-confirm-dialog::backdrop { background: rgba(8, 10, 14, .62); }
.user-confirm-dialog form { display: grid; gap: 1rem; }
.user-confirm-dialog h2 { margin: 0; font-size: 1.15rem; }
.user-confirm-dialog p { margin: 0; color: var(--text-soft); font-size: .82rem; line-height: 1.5; }
.user-confirm-actions { display: flex; justify-content: flex-end; gap: .55rem; }
@media (max-width: 680px) {
  .user-account { grid-template-columns: 44px minmax(0, 1fr) auto; gap: .7rem; padding: .85rem 1rem; }
  .user-account-status { grid-column: 2; grid-row: 2; }
  .user-account > .btn { grid-column: 3; grid-row: 1 / 3; }
  .users-list-heading { padding: .85rem 1rem; }
  .users-credentials { grid-template-columns: minmax(0, 1fr); }
  .users-form-footer { align-items: stretch; flex-direction: column; }
  .users-form-footer .btn { width: 100%; }
}
@media (max-width: 420px) {
  .users-page-heading { align-items: stretch; flex-direction: column; }
  .users-page-heading .btn { width: 100%; }
  .users-form-section { padding: 1rem; }
  .users-permission-row { grid-template-columns: minmax(0, 1fr) minmax(118px, 140px); gap: .5rem; }
  .users-account-settings .btn { width: 100%; }
}

.plans-heading { max-width: 1100px; }
.plans-toolbar { display: flex; flex-wrap: wrap; gap: .55rem; margin: -.55rem 0 1.1rem; }
.plans-list { width: min(1100px, 100%); overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
.plan-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto auto; align-items: center; gap: 1rem; padding: .9rem 1.15rem; border-bottom: 1px solid var(--border); }
.plan-row:last-child { border-bottom: 0; }
.plan-row-visual { display: grid; width: 58px; height: 58px; place-items: center; overflow: hidden; border-radius: 9px; background: var(--surface-subtle); }
.plan-row-visual img { width: 100%; height: 100%; object-fit: cover; }
.plan-row-visual svg { width: 21px; height: 21px; color: var(--text-soft); }
.plan-row-copy { display: grid; min-width: 0; gap: .25rem; }
.plan-row-copy > strong { font-size: .92rem; }
.plan-row-copy small { color: var(--text-soft); font-size: .78rem; }
.plan-row-copy > span { display: flex; flex-wrap: wrap; gap: .5rem; color: var(--text-soft); font-size: .72rem; }
.plan-row-copy b { color: var(--brand-primary); }
.plans-editor { width: min(980px, 100%); margin: 0 auto; }
.plans-form { display: grid; gap: 1rem; }
.plans-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.plans-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.plans-section-head p { margin: .35rem 0 0; color: var(--text-soft); font-size: .78rem; }
.plans-repeat-list { display: grid; gap: .55rem; }
.plans-repeat-row { display: flex; align-items: center; gap: .5rem; }
.plans-repeat-row input, .plans-repeat-row select { min-width: 0; min-height: 40px; border: 1px solid var(--border); border-radius: 8px; padding: .55rem .65rem; color: var(--text); background: var(--surface); font: inherit; font-size: .83rem; }
.plans-repeat-row input { flex: 1; }
.plans-repeat-row select { flex: 0 1 180px; }
.plans-repeat-row .btn { flex: 0 0 auto; }
.plans-image-upload { display: grid; gap: .75rem; }
.plans-image-upload.has-preview { grid-template-columns: minmax(0, 1fr) minmax(160px, 210px); }
.plans-image-upload .upload-drop { min-height: 168px; }
.plans-image-preview { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-subtle); }
.plans-image-preview img { display: block; width: 100%; height: 132px; object-fit: cover; }
.plans-image-preview figcaption { padding: .65rem .75rem; color: var(--text-soft); font-size: .72rem; }
.plans-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.plans-checks .check { margin: 0; }
.plans-footer { display: flex; justify-content: space-between; gap: .7rem; padding: .25rem 0 2rem; }
.plans-form [hidden] { display: none !important; }
@media (max-width: 700px) {
  .plan-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: .7rem; }
  .plan-row-visual { width: 48px; height: 48px; }
  .plan-row .visibility { grid-column: 2; grid-row: 2; }
  .plan-row > .btn { grid-column: 3; grid-row: 1 / 3; }
  .plans-grid, .plans-checks { grid-template-columns: minmax(0, 1fr); }
  .plans-image-upload.has-preview { grid-template-columns: minmax(0, 1fr); }
  .plans-section-head { flex-direction: column; }
  .plans-section-head .btn { width: 100%; }
  .plans-repeat-row { flex-wrap: wrap; }
  .plans-repeat-row input { flex-basis: 45%; }
  .plans-repeat-row select { flex: 1 1 45%; }
  .plans-repeat-row [data-plan-remove-benefit] { margin-left: auto; }
}
 .ui-icon-action{min-width:44px!important;width:44px!important;min-height:44px!important;padding:10px!important;flex:none!important}.ui-icon-action>svg{width:20px;height:20px}.ui-icon-action .sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
 :root{--control-radius:9999px}
 /* Product buttons are rectangular record cards, not pill-shaped controls. */
 button:not(.pos-product),.btn,.pos-button,input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea,.collection-search{border-radius:var(--control-radius)!important}
 /* Multi-line fields retain a usable text area rather than an elliptical clipping edge. */
 textarea{border-radius:24px!important}
 .calendar-event,.calendar-block{box-shadow:none;border:1px solid var(--border)}
 .catalog-kind-tabs button.active,.booking-tabs button.active{box-shadow:none}
 .pos-button.selected,.pos-checkout-delivery-method [aria-pressed=true],.pos-checkout-discounts .selected{border-color:var(--border-strong);background:var(--surface-hover);box-shadow:none}
 button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--primary);outline-offset:3px}
 .ui-field-shell{position:relative;display:block;min-width:0;width:100%;flex:1 1 auto}
 .ui-field-shell input,.ui-field-shell select,.ui-field-shell textarea{width:100%;padding-inline-start:40px!important;margin:0}
 .ui-field-icon{position:absolute;inset-inline-start:12px;top:50%;display:flex;transform:translateY(-50%);color:var(--text-soft);pointer-events:none}
 .ui-field-icon svg{width:18px;height:18px}
 .ui-field-shell.multiline>.ui-field-icon{top:13px;transform:none}
 .ui-field-shell [data-quantity]{width:116px!important;min-width:116px!important}
 .ui-choice-icon{display:inline-flex;flex:none;color:var(--text-soft);vertical-align:middle;pointer-events:none}
 .ui-choice-icon svg{width:16px;height:16px}
 .modal,.ui-lookup-panel{font-family:var(--brand-font,ui-sans-serif,system-ui,sans-serif)}
 .field:has(>input[type=color]){display:grid;grid-template-columns:20px 1fr;align-items:center;gap:8px}
 .field:has(>input[type=color])>label,.field:has(>input[type=color])>.field-label-row{grid-column:1/-1;min-width:0}.field>input[type=color]{grid-column:2;grid-row:2;width:100%}.field>input[type=color]+.ui-choice-icon{grid-column:1;grid-row:2}
 .admin-load-error{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px;margin-bottom:20px;border:1px solid var(--danger);border-radius:12px;background:var(--surface);color:var(--text);font-size:.85rem}.admin-load-error .btn{flex:none;min-height:44px}@media(max-width:640px){.admin-load-error{align-items:flex-start;flex-direction:column}}
 .pos-button:has(>svg+span:not(.sr-only)){min-height:44px;gap:8px}
 .collection-toolbar,.pagination-bar,.page-heading{min-width:0}
 .collection-search{min-width:0}.collection-search input{min-width:0}
 .record-row,.plan-row,.user-account,.lead-row{overflow-wrap:anywhere}
 .pagination-bar .ui-field-shell{width:auto;flex:0 1 auto}
 .pagination-bar select{min-width:86px}
 .pagination-bar button,.order-buttons button{min-width:44px;min-height:44px}
 .ui-lookup-value{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;opacity:0;pointer-events:none}
 .ui-field-shell:has(.ui-lookup-trigger)>.ui-field-icon{display:none}
 .ui-lookup-trigger{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--border);background:var(--surface);color:var(--text);text-align:start;font:inherit}
 .ui-lookup-trigger span{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-lookup-trigger svg{flex:none;width:18px;height:18px}
 .ui-lookup-panel{position:fixed;inset:auto;margin:0;padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--surface);color:var(--text);box-shadow:0 12px 36px rgba(0,0,0,.18);z-index:5000;max-height:min(420px,calc(100dvh - 24px));overflow:auto}
 .ui-lookup-panel>input{width:100%;min-height:44px;border:1px solid var(--border);padding:10px;background:var(--surface);color:var(--text);font:inherit}
 .ui-lookup-results{margin-top:8px}.ui-lookup-option{display:block;width:100%;min-height:44px;padding:10px;border:0;background:transparent;color:var(--text);text-align:start;font:inherit;overflow-wrap:anywhere}.ui-lookup-option:hover,.ui-lookup-option.active{background:var(--surface-subtle)}
 .ui-lookup-pages{display:flex;align-items:center;gap:8px;margin-top:8px}.ui-lookup-pages span{margin-inline-start:auto;font-size:.8rem}
 @media(max-width:640px){input,select,textarea{font-size:16px!important}.pagination-bar{flex-wrap:wrap;gap:12px}.page-controls{max-width:100%;flex-wrap:wrap}.ui-field-shell{min-width:0}}
/* Module configuration inherits the native administrator's control vocabulary. */
.configuration-page { max-width:960px; margin-inline:auto; }
.configuration-group { margin:32px 0; }
.configuration-group>h2 { font-size:1rem; margin:0 0 12px; }
.configuration-links { border-block:1px solid var(--border); }
.configuration-link { display:flex; align-items:center; gap:16px; min-height:80px; width:100%; padding:16px 4px; border:0; border-bottom:1px solid var(--border); background:transparent; color:var(--text); text-align:left; cursor:pointer; }
.configuration-link:last-child { border-bottom:0; }
.configuration-link:hover { background:var(--surface-hover); }
.configuration-link>span:nth-child(2) { flex:1; min-width:0; }
.configuration-link strong,.configuration-link small { display:block; }
.configuration-link strong { font-weight:650; }
.configuration-link small { color:var(--text-soft); font-size:.8rem; margin-top:4px; line-height:1.45; }
.configuration-link svg { width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.8; flex:none; }
.configuration-link-icon { color:var(--text-soft); }
.configuration-link>svg { color:var(--text-soft); width:16px; }
.configuration-heading { max-width:960px; margin-inline:auto; }
.configuration-title { display:flex; gap:16px; align-items:flex-start; }
.configuration-back { flex:none; min-width:44px; min-height:44px; }
.configuration-back svg { transform:none; }
.configuration-form { max-width:760px; margin-inline:auto; }
.configuration-form>section { margin-bottom:28px; }
.configuration-form h2 { font-size:1rem; margin:0 0 16px; }
.configuration-save { display:flex; justify-content:flex-end; padding-top:16px; border-top:1px solid var(--border); }
[data-configuration-pos] { max-width:900px; margin-inline:auto; }
@media(max-width:600px) {
 .configuration-group { margin:24px 0; }
 .configuration-link { min-height:88px; gap:12px; }
 .configuration-title { gap:12px; }
}
