:root {
  --font-ui: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-page-title: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --brand-graphite: #2D363B;
  --brand-primary: #126C78;
  --brand-primary-hover: #0D5661;
  --brand-primary-soft: #EDF7F8;
  --brand-primary-selected: #D7EBEE;
  --birsuol-icon-fill: 88%;
  --birsuol-lockup-gap: 6px;
  --birsuol-icon-optical-offset: 1px;
  --bg-main: #F7F9FC;
  --surface: #FFFFFF;
  --border: #E0E6EB;
  --success: #337251;
  --success-soft: #E5F4EB;
  --text-primary: var(--brand-graphite);
  --text-secondary: #66737B;
  --text-tertiary: #7a8494;
  --text-disabled: #98a2b3;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  /* Stable product palette; tenant branding is kept out of the admin shell. */
  --green-950: var(--brand-graphite);
  --green-900: var(--brand-graphite);
  --green-800: var(--brand-primary);
  --green-700: var(--brand-primary);
  --green-100: var(--border);
  --green-50: var(--brand-primary-soft);
  --sidebar-bg:     #ffffff;
  --sidebar-border: var(--border);
  --sidebar-width:  248px;
  --ink:    var(--brand-graphite);
  --muted:  var(--text-secondary);
  --gold:   var(--brand-primary);
  --line:   var(--border);
  --paper:  var(--surface);
  --canvas: var(--bg-main);
  --danger: #b5473c;
  --interactive-hover-bg: var(--brand-primary-soft);
  --interactive-selected-bg: var(--brand-primary-selected);
  --interactive-selected-hover-bg: var(--brand-primary-soft);
  --shadow-sm: 0 2px 8px rgba(16,24,40,.05);
  --shadow:    0 8px 28px rgba(16,24,40,.06);
}

/* Courses and subscriptions */
.products-heading { align-items: center; }
.products-tabs { display: flex; gap: 6px; margin: 20px 0; padding: 4px; border-radius: 12px; background: #f2f6f4; width: max-content; }
.products-tabs button { padding: 9px 16px; border: 0; border-radius: 9px; color: var(--text-secondary); background: transparent; }
.products-tabs button.active { color: #174f3b; background: #fff; box-shadow: var(--shadow-sm); font-weight: 600; }
.product-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.product-card { display: grid; min-width: 0; gap: 6px; padding: 14px; border: 1px solid #e2e9e6; border-radius: 13px; background: #fff; }
.product-card > div:first-child, .product-card-actions { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.product-card h3, .product-card p { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.product-card h3 { display: -webkit-box; max-height: 2.6em; overflow: hidden; font-size: 16px; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-card p { overflow: hidden; font-size: 13px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.product-card p, .product-card small { color: var(--text-secondary); }
.product-kind { color: #23634c; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.product-price { display: grid; gap: 2px; }
.product-price strong { font-size: 22px; }
.product-card-actions { margin-top: 2px; }
.product-card-actions .secondary { min-height: 32px; padding: 5px 9px; border-color: #e0e8e4; background: transparent; }
.product-card-actions .secondary:hover { border-color: #b9d2c7; background: #f3f8f5; }
.product-dialog { width: min(820px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 0; border-radius: 16px; padding: 0; color: var(--ink); box-shadow: 0 28px 90px rgba(16,24,40,.3); }
.product-dialog::backdrop, .sale-dialog::backdrop { background: rgba(16,24,40,.58); backdrop-filter: blur(2px); }
.product-dialog form, .sale-dialog form { display: grid; gap: 11px; padding: 16px 18px; }
.product-dialog header, .sale-dialog header, .product-dialog footer, .sale-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-dialog h2, .product-dialog h3, .sale-dialog h2 { margin: 0; }
.product-dialog footer, .sale-dialog footer { justify-content: flex-end; }
.product-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
.product-form-grid label, .sale-dialog label { display: grid; min-width: 0; gap: 4px; color: var(--text-secondary); font-size: 12.5px; font-weight: 500; }
.product-form-grid input:not([type="checkbox"]), .product-form-grid select, .product-form-grid textarea, .sale-dialog input, .sale-dialog select { width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.product-form-grid textarea { min-height: 58px; max-height: 120px; resize: vertical; }
.product-wide { grid-column: 1 / -1; }
.product-check { display: flex !important; min-height: 30px; flex-direction: row; align-items: center; gap: 7px !important; color: var(--ink) !important; line-height: 1.25; }
.product-check input[role="switch"] { position: relative; appearance: none; width: 31px; height: 17px; min-width: 31px; min-height: 17px; flex: 0 0 31px; margin: 0; padding: 0; border: 1px solid #aebfb8; border-radius: 999px; outline: 0; background: #dce5e1; box-shadow: none; cursor: pointer; transition: border-color .14s ease, background .14s ease; }
.product-check input[role="switch"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.2); transition: transform .14s ease; }
.product-check input[role="switch"]:hover { border-color: #6aa68e; }
.product-check input[role="switch"]:checked { border-color: #43876d; background: #4f9578; }
.product-check input[role="switch"]:checked::after { transform: translateX(14px); }
.product-check input[role="switch"]:focus-visible { outline: 2px solid rgba(79,149,120,.28); outline-offset: 2px; }
.product-items-editor { display: grid; gap: 5px; padding: 8px 9px; border: 1px solid #dce9e3; border-radius: 10px; background: #f7faf8; }
.product-items-editor > div:first-child { display: grid; gap: 1px; }
.product-items-editor p { margin: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.3; }
.product-item-row { position: relative; display: grid; grid-template-columns: 24px minmax(180px, 1fr) 78px auto; gap: 5px; margin-bottom: 2px; align-items: center; padding: 2px 4px; border: 1px solid #e1e9e5; border-radius: 7px; background: #fff; transition: border-color .14s ease, box-shadow .14s ease, opacity .14s ease; }
.product-item-row:hover { border-color: #a9cdbd; }
.product-item-row.is-dragging { opacity: .58; border-color: #4d9477; box-shadow: 0 8px 20px rgba(35,99,76,.16); }
.product-item-row.drop-before::before, .product-item-row.drop-after::after { content: ""; position: absolute; z-index: 2; right: 5px; left: 5px; height: 3px; border-radius: 999px; background: #69a88f; box-shadow: 0 0 0 2px rgba(105,168,143,.15); pointer-events: none; }
.product-item-row.drop-before::before { top: -4px; }
.product-item-row.drop-after::after { bottom: -4px; }
.product-item-row select, .product-item-row input { min-width: 0; min-height: 30px; padding: 4px 7px; border: 1px solid #d7e1dc; border-radius: 6px; background: #fff; font-size: 13px; }
.product-drag-handle { width: 22px; min-width: 22px; height: 26px; padding: 0; border: 0; border-radius: 5px; color: #527267; background: transparent; font-size: 17px; line-height: 1; cursor: grab; }
.product-item-row [data-item-remove] { min-height: 28px; padding: 3px 5px; font-size: 12px; }
.product-drag-handle:hover { color: #245f4d; background: #e3f2ea; }
.product-drag-handle:active { cursor: grabbing; }
.product-price-preview { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--text-secondary); }
.product-price-preview strong { color: var(--text-primary); }
.product-discount-settings { grid-column: 1 / -1; }
.product-discount-settings > div:first-child p { margin-bottom: 0; }
#product-discount-matrix { display: grid; gap: 6px; }
.discount-matrix-scroll { overflow-x: auto; border: 1px solid #dce7e2; border-radius: 10px; }
.discount-matrix-table { width: 100%; border-collapse: collapse; background: #fff; }
.discount-matrix-table th, .discount-matrix-table td { min-width: 82px; height: 28px; padding: 0 3px; border-right: 1px solid #e5ece8; border-bottom: 1px solid #e5ece8; text-align: center; vertical-align: middle; line-height: 1; }
.discount-matrix-table th:first-child { width: 58px; min-width: 58px; max-width: 58px; text-align: center; }
.discount-matrix-table tr:last-child > * { border-bottom: 0; }
.discount-matrix-table tr > *:last-child { min-width: 30px; width: 30px; border-right: 0; }
.discount-matrix-table thead tr { height: 42px; }
.discount-matrix-table thead th { position: relative; height: 42px; padding-top: 4px; padding-bottom: 4px; color: #174f3b; background: #dcefe6; font-size: 11px; font-weight: 700; line-height: 1.05; text-align: center; vertical-align: middle; }
.discount-matrix-table thead th:first-child { font-size: 10px; letter-spacing: -.15px; }
.discount-matrix-table input { width: 50px; min-width: 0; height: 22px; min-height: 22px; max-height: 22px; padding: 0 3px; border: 1px solid transparent; border-radius: 4px; color: var(--ink); background: transparent; font-size: 12px !important; line-height: 20px; text-align: center; appearance: textfield; }
.discount-matrix-table input::-webkit-inner-spin-button, .discount-matrix-table input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.discount-matrix-table input:hover { border-color: rgba(36,95,77,.2); background: #f7fbf9; }
.discount-matrix-table input:focus { border-color: #75aa94; outline: 2px solid rgba(79,149,120,.16); background: #fff; }
.discount-matrix-table thead th:not(:first-child):not(:last-child) { width: 112px; min-width: 100px; max-width: 124px; }
.discount-matrix-table thead textarea { display: block; width: calc(100% - 12px); min-width: 74px; max-width: 112px; height: auto; min-height: 13px; max-height: 26px; margin: 0 auto; padding: 0 2px; overflow: hidden; border: 1px solid transparent; border-radius: 4px; color: #174f3b; background: transparent; font-size: 11px !important; font-weight: 650 !important; line-height: 13px; text-align: center; white-space: pre-wrap; word-break: normal; overflow-wrap: normal; resize: none; field-sizing: content; }
.discount-matrix-table thead textarea:hover { border-color: rgba(36,95,77,.22); background: rgba(255,255,255,.42); }
.discount-matrix-table thead textarea:focus { border-color: #75aa94; outline: 2px solid rgba(79,149,120,.18); background: #fff; }
.discount-matrix-table [data-matrix-count] { width: 38px; }
.discount-matrix-table [data-matrix-remove-group] { position: absolute; top: 50%; right: 1px; min-width: 14px; min-height: 18px; padding: 0 2px; opacity: .62; transform: translateY(-50%); }
.product-discount-settings .form-actions, #product-discount-matrix { gap: 6px; }
.product-discount-settings button { min-height: 30px; padding: 4px 8px; }
.discount-matrix-table td span { display: inline-flex; align-items: center; gap: 4px; }
.discount-matrix-table td small { color: var(--muted); }
input[type="checkbox"], input[type="radio"] { accent-color: #2f7d5d; }
.products-panel :focus-visible, .product-dialog :focus-visible, .product-discount-settings :focus-visible { outline-color: #2f7d5d; }
.client-products-compact { margin-top: 20px; }
.client-products-compact h3 { margin: 0 0 10px; }
.client-products-compact article { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid #d9e9e1; border-radius: 11px; background: #f8fcfa; }
.client-products-compact article + article { margin-top: 8px; }
.client-products-compact article > div { display: flex; justify-content: space-between; gap: 12px; }
.client-products-compact p { margin: 0; }
.client-products-compact small, .muted-copy { color: var(--text-secondary); }
@media (max-width: 800px) { .product-form-grid { grid-template-columns: 1fr; } .product-wide { grid-column: auto; } .product-item-row { grid-template-columns: 30px minmax(0,1fr) auto; } .product-item-row [data-item-quantity] { grid-column: 2; } }

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); font-family: var(--font-ui); font-size: 16px; line-height: 1.45; background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ─── App Shell ─────────────────────────────────────────────── */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
}

/* ─── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 20px 12px 16px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  /* Subtle shadow to lift sidebar from content */
  box-shadow: 2px 0 12px rgba(0,0,0,.04);
}

/* Brand / logo area */
.brand, .login-brand {
  display: flex;
  gap: var(--birsuol-lockup-gap);
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}
.brand {
  padding: 4px 8px 24px;
}
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  border: 1.5px solid var(--green-100);
  border-radius: 10px;
  background: var(--green-50);
  color: var(--green-800);
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -1px;
}
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; background: white; border-radius: 8px; }
.brand-full-logo { display: block; width: 128px; height: 28px; object-fit: contain; object-position: left center; }
.brand-name {
  display: block;
  color: #182230;
  font-family: Inter, system-ui, sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

/* Navigation */
.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

/* Nav section label */
.nav-section-label {
  padding: 16px 10px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  user-select: none;
}
.nav-section-label:first-child { padding-top: 0; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  transition: color .15s ease, background .15s ease;
}
.nav-item:hover {
  color: var(--ink);
  background: var(--canvas);
}
.nav-item.active {
  color: var(--green-800);
  background: var(--green-50);
  font-weight: 600;
}
/* Green left accent stripe for active item */
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--green-700);
}

/* Nav icon */
.nav-icon {
  display: flex;
  flex: 0 0 auto;
  width: 20px;
  align-items: center;
  justify-content: center;
  color: inherit;
  opacity: .7;
}
.nav-item.active .nav-icon { opacity: 1; }

/* Legacy: nav-group (details/summary) — kept for JS compatibility but visually flattened */
.nav-group { border-radius: 8px; }
.nav-group summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary:hover, .nav-group[open] > summary {
  color: var(--ink);
  background: var(--canvas);
}
.nav-group summary span { display: inline-block; width: 20px; }
.nav-group summary b {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  transition: transform .15s ease;
}
.nav-group[open] summary b { transform: rotate(180deg); }
.nav-group-items { display: flex; flex-direction: column; gap: 2px; padding: 3px 0 3px 16px; }
.nav-group-items .nav-item { padding-top: 9px; padding-bottom: 9px; font-size: 13.5px; }

/* Sidebar footer */
.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--sidebar-border);
}
.user-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px 10px;
  border-radius: 8px;
}
.user-card strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.user-card small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}
.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--green-900);
  background: var(--green-100);
  font-size: 13px;
  font-weight: 500;
}
.text-button {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: none;
  font-size: 13px;
  text-align: left;
  transition: color .15s ease, background .15s ease;
}
.text-button:hover { color: var(--danger); background: #fdf2f1; }

/* ─── Main content area ─────────────────────────────────────── */
.main { min-width: 0; padding: 0 36px 56px; }

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.topbar h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
}
/* Hide legacy eyebrow in topbar — redundant with sidebar active item */
.topbar .eyebrow { display: none; }

.eyebrow { margin: 0; color: var(--gold); font-size: 12px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; }
.connection { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.connection span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4caf50; box-shadow: 0 0 0 3px rgba(76,175,80,.15); }
.connection.offline span { background: var(--danger); box-shadow: 0 0 0 3px rgba(167,66,55,.15); }
.menu-button { display: none; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: transparent; font-size: 20px; line-height: 1; }

/* Login brand — light theme since login is on its own overlay */
.login-brand { color: white; }
.login-brand strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 500; }
.login-brand small { display: block; margin-top: 3px; color: rgba(255,255,255,.7); font-size: 13px; }

.view { display: none; max-width: 1240px; margin: 30px auto 0; }
.view.active { display: block; }
.welcome-card { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding: 34px; border-radius: 18px; color: white; background: var(--green-800); box-shadow: var(--shadow); }
.welcome-card h2 { max-width: 620px; margin: 9px 0; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.welcome-card p:not(.eyebrow) { max-width: 650px; margin: 0; color: rgba(255,255,255,.74); line-height: 1.6; }
.welcome-card .primary { color: var(--green-950); background: #e4c47e; }

.primary { padding: 12px 18px; border: 0; border-radius: 10px; color: white; background: var(--green-800); font-size: 15px; font-weight: 500; transition: .18s ease; }
.primary:hover { transform: translateY(-1px); filter: brightness(1.06); }
.primary:disabled { cursor: wait; opacity: .55; transform: none; }
.primary.large { min-height: 48px; font-size: 16px; }
.secondary, .danger-secondary, .icon-button { padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--green-900); background: white; font-size: 15px; font-weight: 500; }
.action-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.danger-secondary { color: var(--danger); }
.icon-button { width: 42px; padding: 7px; font-size: 24px; line-height: 1; }
.danger-link { padding: 7px 9px; border: 0; color: var(--danger); background: transparent; font-size: 12px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin: 22px 0; }
.stat-card { padding: 22px; border: 1px solid var(--line); border-radius: 15px; color: inherit; background: var(--paper); text-align: left; transition: .16s ease; }
.stat-card:hover { border-color: rgba(183, 138, 60, .65); transform: translateY(-2px); box-shadow: 0 9px 22px rgba(18, 63, 53, .08); }
.stat-card:focus-visible { outline: 3px solid rgba(183, 138, 60, .35); outline-offset: 2px; }
.stat-card span, .stat-card small { display: block; color: var(--muted); font-size: 13px; }
.stat-card strong { display: block; margin: 7px 0 3px; color: var(--green-900); font-family: Georgia, serif; font-size: 34px; font-weight: 500; }
.stat-card em { display: block; margin-top: 12px; color: var(--gold); font-size: 12px; font-style: normal; font-weight: 500; }
.panel, .form-card, .list-panel { border: 1px solid var(--line); border-radius: 17px; background: var(--paper); box-shadow: 0 8px 30px rgba(18, 63, 53, .04); }
.panel { padding: 26px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-heading h2, .form-card h2 { margin: 5px 0 0; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.badge { min-width: 32px; padding: 6px 10px; border-radius: 999px; color: var(--green-800); background: var(--green-50); text-align: center; font-weight: 500; }
.optional-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 22px; }
.optional-panel h2 { margin: 5px 0 6px; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.optional-panel p:not(.eyebrow) { max-width: 700px; margin: 0; color: var(--muted); line-height: 1.5; }
.optional-actions { display: flex; flex: 0 0 auto; gap: 9px; }

.section-grid { display: grid; grid-template-columns: minmax(270px, 360px) minmax(0, 1fr); gap: 22px; align-items: start; }
.form-card { display: grid; gap: 17px; padding: 25px; }
label { display: grid; gap: 7px; color: #43514c; font-size: 14px; font-weight: 500; }
input, textarea, select { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #cfd9d4; border-radius: 9px; outline: 0; color: var(--ink); background: white; font-weight: 400; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--green-800); box-shadow: 0 0 0 3px rgba(24, 84, 71, .09); }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.list-panel { min-height: 350px; padding: 25px; }
.cards { display: grid; gap: 11px; }
.item-card { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.item-card-button { width: 100%; color: inherit; background: white; text-align: left; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.item-card-button:hover { border-color: rgba(183, 138, 60, .65); transform: translateY(-1px); box-shadow: 0 7px 18px rgba(18, 63, 53, .08); }
.item-card-button:focus-visible { outline: 3px solid rgba(183, 138, 60, .3); outline-offset: 2px; }
.item-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--green-800); background: var(--green-50); font-family: Georgia, serif; font-size: 18px; }
.item-card .content { min-width: 0; flex: 1; }
.item-card strong, .item-card small { display: block; }
.item-card strong { margin-bottom: 4px; }
.item-card small { overflow: hidden; color: var(--muted); line-height: 1.45; text-overflow: ellipsis; }
.item-card .card-edit-hint { margin-top: 3px; color: var(--gold); font-size: 12px; font-weight: 500; }
.form-actions { display: flex; align-items: center; gap: 10px; }
.field-hint { margin-top: -8px; color: var(--muted); line-height: 1.5; }
.upload-status { min-height: 22px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.upload-status.success { color: #24704b; font-weight: 600; }
.upload-status.error { color: var(--danger); font-weight: 600; }
.settings-link { width: max-content; max-width: 100%; margin-top: -7px; color: var(--green-800); font-size: 13px; font-weight: 500; }
.settings-grid { grid-template-columns: minmax(300px, 430px) minmax(0, 1fr); }
.logo-preview { display: grid; width: 160px; height: 160px; overflow: hidden; place-items: center; justify-self: center; border: 1px solid var(--line); border-radius: 50%; color: var(--gold); background: var(--green-950); font-family: Georgia, serif; font-size: 42px; letter-spacing: -4px; box-shadow: var(--shadow); }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; background: white; }
.settings-help h2 { margin: 5px 0 12px; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.settings-help p:not(.eyebrow) { color: var(--muted); line-height: 1.65; }
.backup-help { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr); gap: 22px; align-items: start; }
.backup-help h2 { margin: 5px 0 10px; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.backup-help p { color: var(--muted); line-height: 1.6; }
.backup-steps { display: grid; gap: 9px; margin: 0; padding-left: 22px; color: var(--ink); line-height: 1.5; }
.backup-warning { grid-column: 1 / -1; margin: 0; padding: 13px 15px; border: 1px solid #ead9aa; border-radius: 10px; background: #fffaf0; }
.services-panel { min-height: 0; }
.service-heading { align-items: end; }
.service-heading p:not(.eyebrow) { max-width: 690px; margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.catalog-actions { display: flex; flex: 0 0 auto; gap: 10px; align-items: center; }
.catalog-actions select { min-width: 220px; }
.dialog-description { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.gis-selection-dialog { width: min(900px, calc(100% - 28px)); }
.gis-selection-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .45fr); gap: 12px; }
.gis-selection-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.gis-selection-actions strong { margin-left: auto; color: var(--green-900); }
.gis-service-list { display: grid; max-height: min(52vh, 580px); overflow: auto; gap: 8px; padding-right: 4px; }
.gis-service-option { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; cursor: pointer; }
.gis-service-option:hover { border-color: rgba(183, 138, 60, .55); background: white; }
.gis-service-option:has(input:checked) { border-color: #7eaa99; background: var(--green-50); }
.gis-service-option input { width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; accent-color: var(--green-800); }
.gis-service-option span { min-width: 0; }
.gis-service-option strong, .gis-service-option small { display: block; }
.gis-service-option small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.gis-service-option em { color: var(--muted); font-size: 12px; font-style: normal; white-space: nowrap; }
.gis-service-option.unavailable { opacity: .58; cursor: not-allowed; }
@media (max-width: 720px) {
  .gis-selection-tools { grid-template-columns: 1fr; }
  .gis-service-option { grid-template-columns: 22px minmax(0, 1fr); }
  .gis-service-option em { grid-column: 2; }
  .gis-selection-actions strong { width: 100%; margin-left: 0; }
}
.service-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); align-items: stretch; gap: 17px; }
.service-card { display: grid; grid-template-rows: auto 1fr; min-width: 0; height: 100%; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 14px; color: inherit; background: white; text-align: left; transition: .18s ease; }
.service-card:hover { border-color: rgba(183, 138, 60, .55); transform: translateY(-2px); box-shadow: var(--shadow); }
.service-card:focus-visible { outline: 3px solid rgba(183, 138, 60, .45); outline-offset: 2px; }
.service-image { position: relative; isolation: isolate; display: grid; aspect-ratio: 3 / 4; overflow: hidden; place-items: center; color: #e3c579; background: #f7f4ed; font-family: Georgia, serif; font-size: 42px; }
.service-image-backdrop { position: absolute; z-index: 0; inset: -18px; overflow: hidden; pointer-events: none; }
.service-image-backdrop img { width: 100%; height: 100%; opacity: .22; object-fit: cover; filter: blur(16px) saturate(.78); transform: scale(1.08); }
.service-image > .service-image-main { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.service-image-fallback { position: relative; z-index: 1; letter-spacing: -4px; }
.service-content { display: grid; grid-template-rows: 18px 58px 68px auto; padding: 18px; }
.service-category { display: block; overflow: hidden; color: var(--gold); font-size: 12px; font-weight: 500; letter-spacing: .05em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.service-content h3 { display: -webkit-box; align-self: start; overflow: hidden; margin: 7px 0 8px; font-family: var(--font-ui); font-size: 18px; font-weight: 500; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.service-content p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.service-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 13px; border-top: 1px solid var(--line); }
.service-meta > span:first-child { display: flex; gap: 7px; align-items: baseline; color: var(--green-900); }
.old-price { color: var(--muted); font-size: 13px; text-decoration: line-through; }
.service-unavailable { opacity: .68; }
.service-dialog { width: min(820px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 18px; color: var(--ink); background: white; box-shadow: 0 28px 90px rgba(0,0,0,.3); }
.service-dialog::backdrop { background: rgba(11, 44, 38, .72); backdrop-filter: blur(2px); }
.service-editor { display: grid; gap: 18px; padding: 26px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.dialog-heading h2 { margin: 5px 0 0; font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.dialog-close { width: 40px; height: 40px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: white; font-size: 25px; line-height: 1; }
.service-editor-source { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 18px; align-items: start; padding: 15px; border-radius: 13px; background: var(--green-50); }
.service-editor-image { display: grid; aspect-ratio: 3 / 4; overflow: hidden; place-items: center; border-radius: 9px; color: var(--gold); background: white; font-family: Georgia, serif; font-size: 28px; }
.service-editor-image img { width: 100%; height: 100%; object-fit: contain; }
.service-editor-source small { color: var(--gold); font-weight: 500; text-transform: uppercase; }
.service-editor-source p { max-height: 125px; overflow: auto; margin: 8px 0; color: var(--muted); font-size: 14px; line-height: 1.55; white-space: pre-line; }
.source-note { margin: -8px 0 0; color: var(--muted); font-size: 13px; }
.editor-section { margin: 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; }
.editor-section legend { padding: 0 7px; color: var(--green-900); font-weight: 500; }
.time-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.choice-option { display: flex; min-width: 0; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fbfcfb; cursor: pointer; font-size: 14px; }
.choice-option:hover { border-color: rgba(183, 138, 60, .55); background: #fff; }
.choice-option:has(input:checked) { border-color: #7eaa99; background: var(--green-50); }
.choice-option input { width: 20px; height: 20px; min-height: 0; flex: 0 0 20px; margin: 0; padding: 0; accent-color: var(--green-800); }
.choice-option span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.choice-option small { display: block; overflow: hidden; margin-top: 2px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.choice-empty { margin: 0; color: var(--muted); font-size: 13px; }
.optional-service-settings { border: 1px solid var(--line); border-radius: 12px; }
.optional-service-settings summary { padding: 14px 16px; color: var(--green-900); cursor: pointer; font-weight: 500; }
.optional-service-settings .editor-section { margin: 0 15px 15px; }
.booking-toggle { display: flex; gap: 11px; align-items: start; padding: 15px; border: 1px solid #b9d9cd; border-radius: 12px; background: var(--green-50); }
.booking-toggle input { width: 19px; height: 19px; margin: 1px 0 0; }
.booking-toggle strong, .booking-toggle small { display: block; }
.booking-toggle small { margin-top: 4px; color: var(--muted); }
.dialog-actions { justify-content: flex-end; }
.bookings-heading { align-items: end; }
.booking-heading-actions { display: flex; flex: 0 0 auto; gap: 10px; align-items: center; }
.bookings-heading p:not(.eyebrow) { max-width: 680px; margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.booking-filters { display: grid; grid-template-columns: repeat(5, minmax(135px, 1fr)); gap: 12px; margin-bottom: 20px; padding: 15px; border-radius: 12px; background: var(--green-50); }
.operational-panel { margin-top: 22px; }
.operational-panel .panel-heading p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); }
.dashboard-clear { display: flex; align-items: center; gap: 13px; padding: 17px 18px; border: 1px solid #cfe2da; border-radius: 13px; background: var(--green-50); }
.dashboard-clear > span { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: white; background: var(--green-800); font-weight: 900; }
.dashboard-clear strong, .dashboard-clear small { display: block; }
.dashboard-clear small { margin-top: 3px; color: var(--muted); }
.dashboard-setup-status { display: grid; gap: 10px; margin-top: 16px; padding: 14px 16px; border: 1px solid #cfe2da; border-radius: 12px; background: #fbfdfc; }
.dashboard-setup-status.has-issues { border-color: #ead9af; background: #fffdf8; }
.dashboard-setup-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dashboard-setup-heading h2 { margin: 2px 0 0; font-family: Inter,"Segoe UI",Arial,sans-serif; font-size: 17px; font-weight: 650; }
.dashboard-setup-open { flex: 0 0 auto; padding: 5px 0; border: 0; color: #28735d; background: transparent; font-size: 13px; font-weight: 600; }
.dashboard-setup-open:hover { color: #1e604d; text-decoration: underline; text-underline-offset: 3px; }
.dashboard-setup-content { display: grid; gap: 6px; }
.dashboard-setup-ready { display: flex; align-items: baseline; gap: 8px; color: #286b56; font-size: 14px; }
.dashboard-setup-ready strong { font-weight: 650; }
.dashboard-setup-ready span { color: var(--muted); font-size: 13px; }
.dashboard-setup-issue { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; gap: 9px; min-height: 38px; padding: 6px 9px; border: 1px solid #ead9af; border-radius: 8px; color: #59481f; background: #fffaf0; text-align: left; }
.dashboard-setup-issue > span { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: #755d22; background: #f4e5bc; font-size: 12px; font-weight: 600; }
.dashboard-setup-issue strong { font-size: 14px; font-weight: 550; }
.dashboard-setup-issue b { color: #6e5721; font-size: 12px; font-weight: 600; }
.dashboard-setup-issue:hover, .dashboard-setup-issue:focus-visible { transform: translateY(-1px); border-color: #d8bd79; box-shadow: 0 3px 10px rgba(89,72,31,.06); }
.operational-stats { margin-bottom: 0; }
.attention-card.has-items { border-color: #d49a89; background: #fff9f7; }
.attention-card.has-items strong { color: var(--danger); }
.payment-journal-filters { display: grid; grid-template-columns: repeat(5, minmax(135px, 1fr)); gap: 12px; padding: 15px; border-radius: 12px; background: var(--green-50); }
.payment-period-shortcuts { display: flex; grid-column: 1 / -1; gap: 9px; }
.payment-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin: 18px 0 12px; }
.payment-summary article, .payment-method-summary article { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.payment-summary small, .payment-summary span, .payment-method-summary small, .payment-method-summary span { display: block; color: var(--muted); font-size: 12px; }
.payment-summary strong { display: block; margin: 6px 0 4px; color: var(--green-900); font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.payment-summary .voided strong { color: var(--danger); }
.payment-summary .net { color: white; background: var(--green-900); }
.payment-summary .net strong { color: white; }
.payment-summary .net small, .payment-summary .net span { color: rgba(255,255,255,.7); }
.payment-method-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 24px; }
.payment-method-summary strong { display: block; margin: 5px 0 3px; color: var(--green-900); font-size: 18px; }
.payment-method-details { margin: 4px 0 18px; }
.payment-method-details > summary { display: flex; max-width: 430px; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 12px 10px 14px; border: 1px solid #dce8e3; border-radius: 10px; color: #2f725f; background: #f7faf8; font-size: 15px; cursor: pointer; list-style: none; }
.payment-method-details > summary::-webkit-details-marker { display: none; }
.payment-method-details > summary span small, .payment-method-details > summary span strong { display: block; }
.payment-method-details > summary span small { color: var(--muted); font-size: 11px; font-weight: 500; }
.payment-method-details > summary span strong { margin-top: 1px; color: var(--ink); font-weight: 500; }
.payment-method-details > summary b { min-width: 92px; padding: 7px 10px; border-left: 1px solid #dce8e3; color: #2f725f; font-size: 13px; text-align: center; }
.payment-method-details > summary b::after { content: " ↓"; }
.payment-method-details[open] > summary { margin-bottom: 10px; }
.payment-method-details[open] > summary b { font-size: 0; }
.payment-method-details[open] > summary b::before { content: "Скрыть"; font-size: 13px; }
.payment-method-details[open] > summary b::after { content: " ↑"; font-size: 13px; }
.payment-method-details .payment-method-summary { margin-bottom: 0; }
.payment-journal-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 8px 0 13px; }
.payment-journal-heading h3 { margin: 4px 0 0; font-family: "BirSuol", "Open Sans", "Segoe UI", Arial, sans-serif; font-size: 22px; font-weight: 600; }
.payment-journal-list { display: grid; gap: 9px; }
.payment-operation { width: 100%; border: 1px solid var(--line); border-radius: 12px; color: inherit; background: white; text-align: left; }
.payment-operation > summary { display: grid; grid-template-columns: 34px minmax(0, 1fr) 112px 120px; gap: 13px; align-items: center; min-height: 62px; padding: 10px 14px; cursor: pointer; list-style: none; }
.payment-operation > summary::-webkit-details-marker { display: none; }
.payment-operation:hover { border-color: rgba(183, 138, 60, .65); box-shadow: 0 7px 18px rgba(18, 63, 53, .07); }
.payment-operation-sign { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #2f725f; background: #dceee4; font-size: 20px; font-weight: 800; }
.payment-operation.void .payment-operation-sign { color: #99544c; background: #f4e7e5; }
.payment-operation-main { min-width: 0; flex: 1; }
.payment-operation-main strong, .payment-operation-main small { display: block; }
.payment-operation-main small { margin-top: 3px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; }
.payment-operation-more { width: 112px; color: #39745f; font-size: 14px; font-weight: 500; text-align: center; }
.payment-operation-more::after { content: " ↓"; }
.payment-operation[open] .payment-operation-more::after { content: " ↑"; }
.payment-operation-amount { width: 120px; color: #2f725f; font-variant-numeric: tabular-nums; font-size: 17px; font-weight: 600; text-align: right; white-space: nowrap; }
.payment-operation.void .payment-operation-amount { color: #99544c; }
.payment-operation-details { padding: 4px 14px 14px 61px; }
.payment-operation-details dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 24px; margin: 0 0 11px; }
.payment-operation-details dl div { min-width: 0; }
.payment-operation-details dt { color: var(--muted); font-size: 13px; }
.payment-operation-details dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; }
.payment-operation-booking { min-height: 38px; padding: 7px 12px; border: 0; border-radius: 9px; color: #2f725f; background: #edf6f1; font-weight: 500; }
.booking-list { display: grid; gap: 10px; }
.booking-view-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; }
.booking-view-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #f5f8f7; }
.booking-view-switch button, .booking-calendar-navigation button { min-height: 38px; padding: 7px 12px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-weight: 500; cursor: pointer; }
.booking-view-switch button.is-active { color: white; background: var(--green-800); }
.booking-calendar-navigation { display: flex; align-items: center; gap: 6px; }
.booking-calendar-navigation[hidden] { display: none; }
.booking-calendar-navigation strong { min-width: 230px; color: var(--green-900); text-align: center; text-transform: capitalize; }
.booking-calendar-navigation button:hover { color: var(--green-900); background: var(--green-50); }
.booking-calendar { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); min-width: 1050px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); gap: 1px; }
.booking-calendar[hidden] { display: none; }
.booking-calendar.is-day { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.booking-calendar-day { min-width: 0; min-height: 420px; background: white; }
.booking-calendar-day > header { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 8px 10px; border-bottom: 1px solid var(--line); text-transform: capitalize; }
.booking-calendar-day > header span { color: var(--muted); font-size: 13px; font-weight: 500; }
.booking-calendar-day > header strong { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; }
.booking-calendar-day.is-today > header strong { color: white; background: var(--green-800); }
.booking-calendar-day-list { display: grid; align-content: start; gap: 6px; padding: 7px; }
.booking-calendar-card { display: grid; width: 100%; gap: 2px; padding: 9px; border: 1px solid #d9e7e1; border-radius: 8px; color: var(--text); background: #f2f8f5; text-align: left; cursor: pointer; }
.booking-calendar-card:hover, .booking-calendar-card:focus-visible { border-color: #83b7a3; background: var(--interactive-hover-bg); }
.booking-calendar-card time { color: var(--green-800); font-size: 13px; font-weight: 600; }
.booking-calendar-card strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.booking-calendar-card span, .booking-calendar-card small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.booking-calendar-card.cancelled { opacity: .6; background: #fbf7f6; }
.booking-calendar-card.attended { background: #edf8f2; }
.booking-calendar-card.no-show { background: #fcf0ed; }
.booking-calendar-empty { margin: 12px 4px; color: var(--muted); font-size: 12px; text-align: center; }
.bookings-panel:has(.booking-calendar:not([hidden])) { overflow-x: auto; }
.booking-card { display: flex; width: 100%; gap: 15px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 12px; color: inherit; background: white; text-align: left; transition: .16s ease; }
.booking-card:hover { border-color: rgba(183, 138, 60, .65); transform: translateY(-1px); box-shadow: 0 7px 18px rgba(18, 63, 53, .07); }
.booking-card.cancelled { opacity: .68; background: #fbf7f6; }
.booking-card.attended, .client-visit.attended { border-color: #b6d9c9; background: #f5fbf8; }
.booking-card.no-show, .client-visit.no-show { border-color: #e1c5bd; background: #fcf6f4; }
.client-search { display: grid; max-width: 520px; gap: 7px; margin: 18px 0; }
.client-list, .client-history { display: grid; gap: 10px; }
.client-card { display: grid; width: 100%; grid-template-columns: minmax(280px,1fr) 112px 112px 190px 72px; column-gap: 18px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: inherit; background: white; text-align: left; transition: .16s ease; }
.client-card:hover, .client-visit:hover { border-color: rgba(183, 138, 60, .65); transform: translateY(-1px); box-shadow: 0 7px 18px rgba(18, 63, 53, .07); }
.client-identity { display: grid; min-width: 0; grid-template-columns: 46px minmax(0,1fr); gap: 13px; align-items: center; }
.client-avatar { display: grid; width: 42px; height: 42px; border-radius: 50%; place-items: center; color: white; background: #4f8f73; font-weight: 600; }
.client-main, .client-metric, .client-last { display: grid; gap: 4px; }
.client-main small, .client-metric small, .client-last small, .client-visit small { color: var(--muted); font-size: 11px; }
.client-metric b { font-size: 20px; color: var(--green-800); }
.client-last strong { font-size: 12px; }
.client-dialog { width: min(900px, calc(100% - 28px)); }
.client-history-heading { display: flex; align-items: end; justify-content: space-between; margin: 22px 0 12px; }
.client-history-heading h3 { margin: 3px 0 0; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.client-visit { display: grid; width: 100%; grid-template-columns: minmax(120px, .6fr) minmax(200px, 1.4fr) auto; gap: 14px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 10px; color: inherit; background: #fbfcfb; text-align: left; transition: .16s ease; }
.client-visit > span { display: grid; gap: 4px; }
.client-visit.cancelled { opacity: .68; background: #fbf7f6; }
.status.attended { color: #176548; background: #e2f4eb; }
.status.no-show { color: #8a4233; background: #f8e9e5; }
.booking-date { display: grid; width: 55px; height: 55px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--green-900); background: var(--green-50); }
.booking-date strong { align-self: end; font-family: Georgia, serif; font-size: 24px; line-height: 1; }
.booking-date small { align-self: start; color: var(--gold); font-size: 11px; font-weight: 500; text-transform: uppercase; }
.booking-main { min-width: 0; flex: 1; }
.booking-main strong, .booking-main small { display: block; }
.booking-main strong { margin-bottom: 5px; }
.booking-main small { overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.booking-dialog { width: min(720px, calc(100% - 28px)); }
.create-booking-dialog { width: min(760px, calc(100% - 28px)); }
.create-booking-form { display: grid; gap: 18px; padding: 26px; }
.create-booking-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.create-booking-grid .wide { grid-column: 1 / -1; }
.create-slot-field { display: grid; grid-column: 1 / -1; gap: 7px; color: #43514c; font-size: 13px; font-weight: 500; }
.create-booking-slots { display: flex; min-height: 48px; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--green-50); }
.customer-section { margin: 0; }
.uds-identify { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.uds-identify .secondary { min-height: 42px; }
.uds-identify-actions { display: flex; gap: 8px; }
.uds-customer-result { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 13px; border: 1px solid #b9d9cd; border-radius: 10px; background: var(--green-50); }
.uds-customer-result[hidden] { display: none; }
.uds-customer-result strong { grid-column: 1 / -1; color: var(--green-900); }
.uds-customer-result span { color: var(--muted); font-size: 12px; }
.uds-customer-result span b { display: block; margin-top: 3px; color: var(--green-800); font-size: 14px; }
.booking-details { display: grid; gap: 18px; padding: 26px; }
.booking-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.booking-detail-grid > div, .booking-comment { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; }
.booking-detail-grid small, .booking-comment small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.booking-detail-grid strong { overflow-wrap: anywhere; font-size: 13px; }
.booking-comment p { margin: 0; line-height: 1.55; white-space: pre-line; }
.reschedule-panel { display: grid; gap: 15px; padding: 17px; border: 1px solid #b9d9cd; border-radius: 12px; background: var(--green-50); }
.reschedule-panel[hidden] { display: none; }
.reschedule-panel h3 { margin: 5px 0 0; color: var(--green-900); font-family: Georgia, serif; font-size: 21px; font-weight: 500; }
.reschedule-slots { display: flex; min-height: 43px; flex-wrap: wrap; gap: 8px; align-items: center; }
.reschedule-slot { min-width: 70px; padding: 10px 12px; border: 1px solid #adcbbf; border-radius: 9px; color: var(--green-900); background: white; font-weight: 500; }
.reschedule-slot:hover, .reschedule-slot.selected { border-color: var(--gold); color: white; background: var(--green-800); }
.visit-outcome-actions { display: grid; grid-template-columns: minmax(180px, 1fr) repeat(3, auto); gap: 9px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfb; }
.visit-outcome-actions[hidden] { display: none; }
.visit-outcome-actions > div { display: grid; gap: 4px; }
.visit-outcome-actions small { color: var(--muted); }
.visit-outcome-actions strong { color: var(--green-900); font-size: 13px; }
.outcome-button { min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: white; font-weight: 500; }
.outcome-button.attended:hover, .outcome-button.attended.selected { border-color: #4d9577; color: white; background: #287456; }
.outcome-button.no-show:hover, .outcome-button.no-show.selected { border-color: #a65c4c; color: white; background: #914839; }
.outcome-button.unmarked:hover, .outcome-button.unmarked.selected { border-color: var(--gold); color: white; background: var(--green-800); }
.payment-panel { display: grid; gap: 12px; padding: 15px; border: 1px solid #b9d9cd; border-radius: 12px; background: var(--green-50); }
.payment-panel[hidden] { display: none; }
.payment-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.payment-heading > div { display: grid; gap: 4px; }
.payment-heading small, .payment-panel .source-note { color: var(--muted); }
.payment-heading strong { color: var(--green-900); font-size: 14px; }
.payment-fields { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(150px, 1fr) auto; gap: 10px; align-items: end; }
.payment-fields[hidden] { display: none; }
.mixed-payment-fields { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 10px; padding: 12px; border: 1px solid #b9d9cd; border-radius: 10px; background: white; }
.mixed-payment-fields[hidden] { display: none; }
.mixed-payment-fields > small { grid-column: 1 / -1; color: var(--green-900); font-weight: 500; }
.payment-fields input[readonly] { color: var(--green-900); background: #eef5f2; font-weight: 500; }
.payment-fields .primary { min-height: 42px; }
.payment-panel .source-note { margin: 0; font-size: 12px; line-height: 1.45; }
.payment-panel > .danger-secondary { justify-self: start; }
.uds-close-panel { display: grid; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.uds-close-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.uds-close-heading > div { display: grid; gap: 4px; }
.uds-close-heading small { color: var(--muted); }
.uds-close-heading strong { color: var(--green-900); font-size: 14px; }
.uds-close-panel .source-note, .uds-close-panel .upload-status { margin: 0; }
.uds-payment-calculator { display: grid; gap: 11px; padding: 14px; border: 1px solid #d1b46c; border-radius: 11px; background: #fffaf0; }
.uds-payment-calculator[hidden] { display: none; }
.uds-calculator-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.uds-calculator-heading > div { display: grid; gap: 4px; }
.uds-calculator-heading small { color: var(--muted); }
.uds-calculator-heading strong { color: var(--green-900); font-size: 16px; }
.uds-calculator-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.uds-calculator-summary span { padding: 10px; border: 1px solid #ead9aa; border-radius: 9px; color: var(--muted); font-size: 12px; background: white; }
.uds-calculator-summary b { display: block; margin-top: 4px; color: var(--green-800); font-size: 16px; }
.uds-calculator-controls { display: grid; grid-template-columns: minmax(150px, 1fr) auto minmax(160px, auto); gap: 10px; align-items: end; }
.uds-calculator-controls .secondary { min-height: 42px; }
.uds-amount-due { display: grid; gap: 3px; padding: 10px 14px; border-radius: 10px; color: white; background: var(--green-800); }
.uds-amount-due small { color: #d9ece5; }
.uds-amount-due strong { font-size: 22px; }
.uds-payment-calculator .source-note, .uds-payment-calculator .upload-status { margin: 0; }
.qr-scanner-dialog { width: min(540px, calc(100vw - 24px)); }
.qr-scanner-content { display: grid; gap: 14px; padding: 22px; }
.qr-scanner-content video { width: 100%; min-height: 240px; max-height: 56vh; border-radius: 12px; background: #101512; object-fit: cover; }
.notifications-heading { align-items: end; }
.notifications-heading p:not(.eyebrow) { max-width: 760px; margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.notification-toolbar { display: grid; grid-template-columns: minmax(180px, 260px) 1fr auto; gap: 14px; align-items: end; margin-bottom: 18px; padding: 15px; border-radius: 12px; background: var(--green-50); }
.notification-note { display: flex; gap: 8px 16px; align-items: center; justify-content: flex-end; color: var(--muted); font-size: 12px; }
.notification-note strong { color: var(--green-900); }
.reminder-settings { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(210px, 260px) auto; gap: 14px; align-items: end; margin-bottom: 18px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fbfaf5; }
.reminder-settings .toggle-line { align-self: center; display: flex; flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
.reminder-settings .toggle-line input { width: 20px; height: 20px; margin: 0; }
.reminder-settings > small { grid-column: 1 / -1; color: var(--muted); }
.review-settings-section { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(280px, 1fr) minmax(180px, 230px); gap: 14px; align-items: end; padding-top: 14px; border-top: 1px solid var(--line); }
.review-settings-section > strong, .review-settings-section > small, .review-settings-section .review-message-field { grid-column: 1 / -1; }
.review-settings-section > small { color: var(--muted); line-height: 1.5; }
.review-settings-section textarea { resize: vertical; }
.review-test-panel { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(240px, 1fr) minmax(220px, 300px); gap: 12px 14px; align-items: end; padding: 14px; border: 1px solid #d1b46c; border-radius: 11px; background: #fffaf0; }
.review-test-panel > div { display: grid; gap: 5px; }
.review-test-panel > div small { color: var(--muted); line-height: 1.45; }
.review-test-panel .upload-status { grid-column: 1 / -1; margin: 0; }
.return-visit-settings-section { margin-top: 2px; }
.return-effectiveness-panel { display: grid; gap: 14px; margin: 18px 0; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--green-50); }
.return-effectiveness-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; }
.return-effectiveness-heading h3 { margin: 3px 0 0; }
.return-effectiveness-controls { display: flex; align-items: end; gap: 10px; }
.return-effectiveness-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.return-effectiveness-metrics article { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.return-effectiveness-metrics small, .return-effectiveness-panel > small { color: var(--muted); line-height: 1.45; }
.return-effectiveness-metrics strong { display: block; margin: 5px 0 3px; color: var(--green-900); font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.notification-list { display: grid; gap: 12px; }
.notification-card { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.notification-card.sent { opacity: .75; background: #fafcfb; }
.notification-card.failed { border-color: #ddb9b3; background: #fffafa; }
.notification-card.archived { opacity: .68; border-style: dashed; }
.notification-card-heading, .notification-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.notification-card-heading strong, .notification-card-heading small { display: block; }
.notification-card-heading small { margin-top: 4px; color: var(--muted); }
.notification-card .status.pending { color: #7a5b14; background: #fff5d6; }
.notification-card p { margin: 15px 0; padding: 14px; border-radius: 10px; color: #33443e; background: #f5f8f7; line-height: 1.6; white-space: pre-line; }
.notification-result { display: block; margin: -6px 0 14px; color: #337251; line-height: 1.45; }
.notification-result.error { color: var(--danger); }
.notification-delivery-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; margin: -6px 0 14px; color: var(--muted); font-size: 12px; }
.notification-delivery-meta strong { color: var(--green-800); }
.notification-card-footer > small { color: var(--muted); }
.notification-card-footer > div { display: flex; gap: 8px; }
.slot-message { color: var(--muted); font-size: 13px; }
.resource-manager { max-width: 1040px; min-height: 0; margin: 0 auto; padding: 18px; }
.resource-manager-heading { align-items: flex-start; margin-bottom: 10px; }
.resource-manager-heading h2 { margin-top: 3px; }
.resource-manager-heading p:not(.eyebrow) { max-width: 660px; margin-top: 5px; font-size: 14px; line-height: 1.4; }
.resource-heading-actions { display: flex; align-items: center; gap: 10px; }
.resource-heading-actions .badge { display: inline-grid; min-width: 34px; min-height: 34px; padding: 5px 9px; place-items: center; border-radius: 9px; font-size: 13px; font-weight: 600; }
.resource-heading-actions .primary { min-height: 40px; padding: 9px 13px; border-radius: 9px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.resource-list { gap: 4px; }
.resource-manager .resource-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; width: 100%; min-height: 56px; padding: 8px 11px; border: 1px solid #e4e9e6; border-radius: 9px; color: inherit; background: #fff; text-align: left; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease; }
.resource-row .content { min-width: 0; }
.resource-row strong, .resource-row small { display: block; }
.resource-row strong { overflow: hidden; margin: 0 0 2px; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.resource-row small { overflow: hidden; color: var(--muted); font-size: 13px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.resource-row .status { min-width: 82px; padding: 3px 7px; border-radius: 999px; font-size: 12px; font-weight: 600; text-align: center; }
.resource-manager .resource-row:hover, .resource-manager .resource-row:focus-visible { transform: translateY(-1px); border-color: #bed9cf; background: var(--interactive-hover-bg); box-shadow: 0 4px 12px rgba(16,24,40,.055); }
.resource-manager .resource-row:focus-visible { outline: 2px solid #75b69e; outline-offset: 1px; }
.resource-editor { width: min(560px,calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: hidden; border: 0; border-radius: 15px; background: #fff; box-shadow: 0 28px 80px rgba(16,24,40,.24); }
.resource-editor::backdrop { background: rgba(16,24,40,.56); backdrop-filter: blur(2px); }
.resource-editor .form-card { width: 100%; max-height: calc(100vh - 32px); margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: inherit; box-shadow: none; }
.resource-modal { display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 0; }
.resource-modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 17px 18px 13px; border-bottom: 1px solid var(--line); }
.resource-modal-heading h2 { margin: 3px 0 0; font-family: Inter,"Segoe UI",Arial,sans-serif; font-size: 21px; font-weight: 650; }
.resource-modal-heading small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.resource-modal-body { display: grid; gap: 11px; min-height: 0; padding: 15px 18px; overflow-y: auto; }
.resource-modal-body label { gap: 5px; font-size: 13px; font-weight: 500; }
.resource-modal-body input, .resource-modal-body select { min-height: 40px; }
.resource-modal-body textarea { min-height: 70px; }
.resource-modal-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.resource-modal-footer { justify-content: flex-end; margin: 0; padding: 12px 18px; border-top: 1px solid var(--line); background: #fbfcfb; }
.resource-modal-footer .primary, .resource-modal-footer .secondary { min-width: 92px; min-height: 40px; }
.resource-status-toggle, .resource-modal .booking-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; margin: 0; padding: 7px 2px; border: 0; background: transparent; }
.resource-status-toggle span, .resource-modal .booking-toggle span { min-width: 0; }
.resource-status-toggle strong, .resource-status-toggle small, .resource-modal .booking-toggle strong, .resource-modal .booking-toggle small { display: block; }
.resource-status-toggle strong, .resource-modal .booking-toggle strong { font-size: 14px; font-weight: 600; }
.resource-status-toggle small, .resource-modal .booking-toggle small { margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; }
.resource-status-toggle input, .resource-modal .booking-toggle input { width: 36px; height: 20px; min-height: 20px; flex: 0 0 36px; }
.resource-status-toggle input[role="switch"] { position: relative; appearance: none; margin: 0; padding: 0; border: 1px solid #b9c8c2; border-radius: 999px; outline: 0; background: #dce4e1; box-shadow: none; cursor: pointer; transition: border-color .14s ease, background .14s ease; }
.resource-status-toggle input[role="switch"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.22); transition: transform .14s ease; }
.resource-status-toggle input[role="switch"]:checked { border-color: #5ca98b; background: #5ca98b; }
.resource-status-toggle input[role="switch"]:checked::after { transform: translateX(16px); }
.resource-status-toggle input[role="switch"]:focus-visible { border-color: #3f876d; outline: 2px solid rgba(92,169,139,.32); outline-offset: 2px; box-shadow: none; }
.resource-modal-links { display: grid; border-top: 1px solid var(--line); }
.resource-modal-links a, .resource-modal-links button { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 8px 2px; border-bottom: 1px solid var(--line); color: #286b56; font-size: 14px; font-weight: 550; text-decoration: none; }
.resource-modal-links a:hover, .resource-modal-links button:hover { color: #1f5847; background: #f7faf8; }
.specialist-context-return { display: flex; align-items: center; justify-content: flex-start; width: min(1040px,100%); min-height: 36px; margin: 0 auto 8px; padding: 6px 9px; border: 0; color: #28735d; background: transparent; font-size: 14px; font-weight: 600; }
.specialist-context-return:hover { color: #1f5847; background: #f1f7f4; }
.specialist-context-return[hidden] { display: none; }
.integration-catalog { display: grid; gap: 14px; max-width: 1050px; margin: 0 auto; }
.integration-item { padding: 0; overflow: hidden; }
.integration-catalog-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 20px 22px; cursor: pointer; list-style: none; }
.integration-catalog-row::-webkit-details-marker { display: none; }
.integration-catalog-icon { display: grid; width: 48px; height: 48px; border-radius: 14px; place-items: center; color: white; background: var(--green-800); font-family: Georgia, serif; font-size: 23px; }
.integration-catalog-copy { min-width: 0; }
.integration-catalog-copy small, .integration-catalog-copy strong, .integration-catalog-copy > span { display: block; }
.integration-catalog-copy strong { margin: 3px 0 4px; color: var(--green-900); font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.integration-catalog-copy > span { color: var(--muted); line-height: 1.45; }
.integration-help-toggle { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--green-900); background: white; font-size: 14px; font-weight: 500; }
.integration-help-toggle b { font-size: 17px; transition: transform .18s ease; }
.integration-item[open] .integration-help-toggle b { transform: rotate(180deg); }
.integration-item[open] .integration-catalog-row { background: var(--green-50); }
.integration-item-body { padding: 0 22px 22px; border-top: 1px solid var(--line); }
.integration-expanded-grid { grid-template-columns: minmax(330px, 500px) minmax(0, 1fr); padding-top: 22px; }
.integration-expanded-grid .form-card { box-shadow: none; }
.integration-explanation { align-self: start; padding: 24px; box-shadow: none; }
.integration-explanation h2 { margin: 5px 0 20px; }
.gis-integration-card { align-content: start; }
.integration-status-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 14px; }
.integration-feed-link { overflow-wrap: anywhere; }
.plain-list { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.plain-list li { position: relative; padding-left: 25px; color: var(--muted); line-height: 1.5; }
.plain-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green-800); font-weight: 900; }
.sync-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 22px; padding: 15px; border-radius: 11px; background: var(--green-50); }
.sync-summary strong { grid-column: 1 / -1; color: var(--green-900); }
.sync-summary span { color: var(--muted); font-size: 12px; }
.status { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: #337251; background: #e5f4eb; font-size: 12px; font-weight: 500; }
.status.inactive { color: #667085; background: #eef1f0; }
.empty { padding: 52px 20px; color: var(--muted); text-align: center; }
.empty strong { display: block; margin-bottom: 6px; color: var(--ink); }
.calendar-panel { padding: 26px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); box-shadow: 0 8px 30px rgba(18, 63, 53, .04); }
.calendar-filters { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr); gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 24px 0 18px; }
.calendar-heading h2 { margin: 5px 0 0; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.calendar-navigation { display: flex; gap: 8px; }
.calendar-weekdays, .month-calendar { display: grid; grid-template-columns: repeat(7, minmax(80px, 1fr)); gap: 7px; }
.calendar-weekdays { margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 500; text-align: center; }
.calendar-weekdays button { min-height: 28px; padding: 4px 8px; border: 0; border-radius: 8px; color: inherit; background: transparent; font: inherit; cursor: pointer; }
.calendar-weekdays button:hover { color: var(--green-900); background: var(--interactive-hover-bg); }
.calendar-weekdays button.selected { color: var(--green-900); background: var(--interactive-selected-bg); }
.calendar-day { position: relative; min-height: 88px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fbfcfb; text-align: left; transition: .15s ease; }
.calendar-day:hover { border-color: var(--green-800); transform: translateY(-1px); }
.calendar-day .day-number { display: block; font-weight: 600; }
.calendar-day small { display: block; margin-top: 18px; color: var(--green-800); font-size: 11px; font-weight: 500; line-height: 1.3; }
.calendar-day.working { border-color: #a8cdbf; background: var(--green-50); }
.calendar-day.unavailable { border-color: #d9bbb5; background: #f6eae7; }
.calendar-day.unavailable small { color: #8b4f46; }
.calendar-day.selected { border: 2px solid #2f765f; padding: 9px; box-shadow: 0 0 0 2px rgba(47,118,95,.18); }
.calendar-day.today:not(.selected) { border-color: #7b8fa8; box-shadow: inset 0 0 0 1px rgba(82,106,134,.2); }
.calendar-day.today .day-number { display: inline-grid; min-width: 24px; min-height: 24px; place-items: center; border-radius: 999px; color: #344f6b; background: #e8eef5; font-weight: 600; }
.calendar-day.today::after { content: "Сегодня"; position: absolute; top: 9px; right: 9px; color: #526a86; font-size: 9px; font-weight: 600; text-transform: uppercase; }
.calendar-editor { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, .8fr) auto auto; align-items: end; gap: 14px; margin-top: 20px; padding: 18px; border-radius: 12px; background: var(--green-50); }
.selection-summary { align-self: center; }
.selection-summary strong, .selection-summary small { display: block; }
.selection-summary small { margin-top: 5px; color: var(--muted); }
.calendar-times { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.birsuol-time-control {
  width: 100%;
  min-width: 0;
  padding-right: 38px !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.birsuol-time-picker { position: relative; display: block; width: 116px; max-width: 100%; }
.birsuol-time-toggle { position: absolute; z-index: 1; top: 50%; right: 7px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); transform: translateY(-50%); }
.birsuol-time-toggle:hover { background: #eef6f2; color: var(--gold); }
.birsuol-time-options { position: absolute; z-index: 30; top: calc(100% + 5px); left: 0; width: 100%; max-height: 140px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); box-shadow: var(--shadow); scrollbar-width: thin; }
.birsuol-time-options.opens-up { top: auto; bottom: calc(100% + 5px); }
.calendar-times .birsuol-time-picker[data-time-direction="up"] .birsuol-time-options { top: auto; bottom: 100%; }
.birsuol-time-options button { display: block; width: 100%; min-height: 28px; padding: 4px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); font-family: var(--font-ui); font-size: 14px; font-weight: 400; line-height: 20px; text-align: left; font-variant-numeric: tabular-nums; }
.birsuol-time-options button:hover, .birsuol-time-options button:focus-visible { background: #eef6f2; color: var(--gold); outline: none; }
.birsuol-time-options button.selected { color: #fff; background: #39745f; }
.birsuol-time-control.invalid { border-color: var(--danger) !important; }
.field-error { display: block; min-height: 0; margin-top: 5px; color: var(--danger); font-size: 12px; line-height: 1.3; }
.field-error:empty { display: none; }
.feedback-flow { display: grid; gap: 8px; }
.feedback-flow > div { display: grid; grid-template-columns: 24px 1fr; gap: 2px 9px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--green-50); }
.feedback-flow > div > span { grid-row: 1 / 3; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #e8f3ee; color: var(--gold); font-size: 12px; font-weight: 600; }
.feedback-flow small { color: var(--muted); }
.test-badge { display: inline-flex; margin-left: 6px; padding: 2px 6px; border-radius: 999px; background: #e8f3ee; color: var(--gold); font-size: 11px; font-style: normal; font-weight: 600; vertical-align: middle; }
.calendar-hint { margin: 15px 0 0; color: var(--text-secondary); font-family: var(--font-ui) !important; font-size: 13px; font-weight: 400; opacity: 1; }
.calendar-hint strong { color: var(--text-primary); font-weight: 500; }
.schedule-time-error { grid-column: 1/-1; margin: 0; color: var(--danger); font-size: 13px; }
.calendar-times .birsuol-time-picker { width: 116px; min-width: 108px; }
@media (max-width: 520px) { .birsuol-time-picker { width: 100%; } }
.legend-dot { display: inline-block; width: 10px; height: 10px; margin: 0 5px 0 12px; border-radius: 3px; vertical-align: -1px; }
.legend-dot:first-child { margin-left: 0; }
.legend-dot.working { background: #b9d9cd; }
.legend-dot.unavailable { background: #dfbeb8; }
.legend-dot.selected { border: 2px solid var(--gold); }

.notice { position: fixed; z-index: 20; right: 28px; top: 24px; max-width: 420px; padding: 13px 17px; border-radius: 10px; color: white; background: var(--green-900); box-shadow: var(--shadow); }
.notice.error { background: var(--danger); }
.booking-success-confirmation { position: fixed; z-index: 35; top: 50%; left: 50%; display: grid; width: min(340px,calc(100vw - 32px)); justify-items: center; gap: 7px; padding: 22px 24px; pointer-events: none; color: var(--text-primary); border: 1px solid #d7ebe2; border-radius: 16px; background: #fbfefc; box-shadow: 0 18px 48px rgba(16,51,40,.18); opacity: 0; transform: translate(-50%,-48%) scale(.97); transition: opacity 200ms ease, transform 200ms ease; }
.booking-success-confirmation[hidden] { display: none; }
.booking-success-confirmation.is-visible { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.booking-success-confirmation.is-leaving { opacity: 0; transform: translate(-50%,-52%) scale(.98); }
.booking-success-confirmation .booking-success-icon { display: grid; width: 42px; height: 42px; place-items: center; color: #287456; border-radius: 50%; background: #e5f4ed; font-family: var(--font-ui) !important; font-size: 24px; font-weight: 600; line-height: 1; }
.booking-success-confirmation strong { font-family: var(--font-ui) !important; font-size: 19px; font-weight: 600; line-height: 1.2; }
.booking-success-confirmation #booking-success-detail { color: #667085; font-family: var(--font-ui) !important; font-size: 14px; font-weight: 400; line-height: 1.4; text-align: center; }
@media (prefers-reduced-motion: reduce) {
  .booking-success-confirmation { transition: none; }
}
.login-overlay { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: linear-gradient(140deg, rgba(11,44,38,.98), rgba(24,84,71,.95)); }
.login-overlay.hidden { display: none; }
.login-card { width: min(440px, 100%); display: grid; gap: 18px; padding: 34px; border-radius: 18px; background: white; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.login-brand { width: max-content; margin-bottom: 7px; padding: 9px 12px; border-radius: 12px; color: white; background: var(--green-900); }
.login-card h1 { margin: 5px 0; font-family: Georgia, serif; font-size: 32px; font-weight: 500; }
.login-card p:not(.eyebrow) { margin: 0; color: var(--muted); }
.login-field { display: grid; gap: 7px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 52px; }
.password-toggle { position: absolute; top: 50%; right: 5px; display: grid; width: 38px; height: 36px; padding: 8px; border: 0; border-radius: 7px; place-items: center; color: var(--muted); background: transparent; transform: translateY(-50%); }
.password-toggle:hover { color: var(--green-800); background: var(--green-50); }
.password-toggle:focus-visible { outline: 3px solid rgba(24, 84, 71, .16); }
.password-toggle[aria-pressed="true"] { color: var(--green-800); background: var(--green-50); }
.password-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.form-error { padding: 10px 12px; border-radius: 8px; color: var(--danger) !important; background: #f8e9e7; font-size: 13px; }
.privacy-note { color: var(--muted); text-align: center; line-height: 1.45; }

@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 40; left: calc(-1 * var(--sidebar-width) - 4px); width: var(--sidebar-width); transition: left .22s ease; }
  .sidebar.open { left: 0; box-shadow: 6px 0 32px rgba(0,0,0,.12); }
  .main { padding: 0 18px 35px; }
  .topbar { min-height: 64px; }
  .menu-button { display: flex; }
  .connection { font-size: 0; }
  .section-grid { grid-template-columns: 1fr; }
  .resource-manager { padding: 19px; }
  .resource-manager-heading { align-items: stretch; flex-direction: column; }
  .resource-heading-actions { justify-content: space-between; }
  .resource-heading-actions .primary { width: auto; }
  .integration-catalog-row { grid-template-columns: 42px minmax(0, 1fr); padding: 17px; }
  .integration-catalog-icon { width: 42px; height: 42px; border-radius: 12px; font-size: 20px; }
  .integration-catalog-copy strong { font-size: 21px; }
  .integration-help-toggle { padding: 8px 10px; font-size: 13px; }
  .integration-catalog-row .integration-help-toggle { grid-column: 1 / -1; justify-self: stretch; justify-content: space-between; }
  .integration-item-body { padding: 0 17px 17px; }
  .integration-expanded-grid { padding-top: 17px; }
  .calendar-editor { grid-template-columns: 1fr 1fr; }
  .welcome-card { display: block; padding: 26px; }
  .welcome-card .primary { margin-top: 20px; }
  .service-heading, .catalog-actions { align-items: stretch; flex-direction: column; }
  .bookings-heading { align-items: stretch; }
  .booking-heading-actions { justify-content: space-between; }
  .catalog-actions { width: 100%; }
  .catalog-actions select, .catalog-actions .primary { width: 100%; }
  .service-cards { grid-template-columns: 1fr; }
  .service-editor { padding: 20px; }
  .time-fields { grid-template-columns: 1fr; }
  .booking-filters { grid-template-columns: 1fr 1fr; }
  .payment-journal-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-summary { grid-template-columns: 1fr; }
  .payment-method-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-card { grid-template-columns: minmax(0,1fr) auto; }
  .client-card .client-metric, .client-card .client-last { display: none; }
  .visit-outcome-actions { grid-template-columns: repeat(3, 1fr); }
  .visit-outcome-actions > div { grid-column: 1 / -1; }
  .payment-fields { grid-template-columns: 1fr 1fr; }
  .payment-fields .primary { grid-column: 1 / -1; }
}

@media (max-width: 500px) {
  .main { padding: 0 10px 28px; }
  .backup-help { grid-template-columns: 1fr; }
  .backup-warning { grid-column: auto; }
  .topbar { min-height: 72px; gap: 11px; }
  .stats-grid { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 25px; }
  .welcome-card h2 { font-size: 25px; }
  .form-card, .list-panel, .panel { padding: 19px; }
  .optional-panel, .calendar-heading { align-items: stretch; flex-direction: column; }
  .optional-actions { flex-direction: column; }
  .calendar-panel { padding: 12px 8px; overflow: visible; }
  .calendar-filters, .calendar-editor { grid-template-columns: 1fr; }
  .service-editor-source { grid-template-columns: 95px minmax(0, 1fr); gap: 12px; padding: 11px; }
  .choice-grid { grid-template-columns: 1fr; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions button { width: 100%; }
  .visit-outcome-actions { grid-template-columns: 1fr; }
  .visit-outcome-actions > div { grid-column: auto; }
  .outcome-button { width: 100%; }
  .payment-heading { align-items: stretch; flex-direction: column; }
  .uds-close-heading { align-items: stretch; flex-direction: column; }
  .uds-calculator-heading { align-items: stretch; flex-direction: column; }
  .uds-calculator-summary, .uds-calculator-controls { grid-template-columns: 1fr; }
  .uds-calculator-controls .secondary { width: 100%; }
  .payment-fields { grid-template-columns: 1fr; }
  .mixed-payment-fields { grid-template-columns: 1fr; }
  .mixed-payment-fields > small { grid-column: auto; }
  .payment-fields .primary { grid-column: auto; width: 100%; }
  .payment-panel > .danger-secondary { width: 100%; }
  .calendar-filters { gap: 10px; padding: 0 4px 15px; }
  .calendar-heading { gap: 12px; margin: 18px 4px 14px; }
  .calendar-heading h2 { font-size: 24px; }
  .calendar-navigation { display: grid; grid-template-columns: 42px 1fr 42px; }
  .calendar-navigation .secondary { min-height: 42px; }
  .calendar-weekdays, .month-calendar { width: 100%; min-width: 0; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  .calendar-weekdays { margin-bottom: 4px; font-size: 10px; }
  .calendar-day { min-width: 0; min-height: 59px; padding: 6px 3px; border-radius: 7px; text-align: center; }
  .calendar-day:hover { transform: none; }
  .calendar-day .day-number { font-size: 13px; }
  .calendar-day small { overflow: hidden; margin-top: 10px; font-size: 8px; line-height: 1.15; white-space: nowrap; text-overflow: ellipsis; }
  .calendar-day.selected { padding: 5px 2px; }
  .calendar-day.today::after { content: "•"; top: 3px; right: 4px; font-size: 12px; line-height: 1; }
  .calendar-editor { gap: 11px; margin-top: 15px; padding: 14px 10px; }
  .calendar-editor .primary, .calendar-editor .danger-secondary { width: 100%; min-height: 46px; }
  .calendar-times { gap: 8px; }
  .calendar-times input { padding-right: 5px; padding-left: 7px; }
  .calendar-hint { padding: 0 4px; line-height: 1.55; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .primary, .form-actions .secondary { min-height: 46px; }
  .login-card { padding: 25px; }
  .booking-filters, .payment-journal-filters, .payment-method-summary, .booking-detail-grid, .notification-toolbar, .reminder-settings, .create-booking-grid, .uds-customer-result, .uds-identify { grid-template-columns: 1fr; }
  .uds-identify-actions { display: grid; grid-template-columns: 1fr; }
  .payment-period-shortcuts { display: grid; grid-template-columns: 1fr 1fr; }
  .payment-operation { align-items: start; }
  .payment-operation-amount { font-size: 15px; }
  .reminder-settings > small, .review-settings-section > strong, .review-settings-section > small, .review-settings-section .review-message-field, .review-test-panel, .review-test-panel .upload-status { grid-column: auto; }
  .review-settings-section { grid-column: auto; grid-template-columns: 1fr; }
  .return-effectiveness-heading { align-items: stretch; flex-direction: column; }
  .return-effectiveness-controls { align-items: stretch; flex-direction: column; }
  .return-effectiveness-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-test-panel { grid-template-columns: 1fr; }
  .create-booking-grid .wide { grid-column: auto; }
  .booking-heading-actions { align-items: stretch; flex-direction: column-reverse; }
  .booking-heading-actions .primary { width: 100%; min-height: 46px; }
  .create-booking-form { padding: 20px; }
  .booking-card { align-items: flex-start; padding: 12px; }
  .booking-card > .status { display: none; }
  .booking-details { padding: 20px; }
  .notification-note { display: grid; justify-content: start; }
  .notification-archive-completed { width: 100%; }
  .notification-card-heading, .notification-card-footer { align-items: flex-start; flex-direction: column; }
  .notification-card-footer > div { width: 100%; flex-direction: column; }
  .notification-card-footer button { width: 100%; }
  .client-card { grid-template-columns: minmax(0,1fr); }
  .client-identity { grid-template-columns: 42px minmax(0,1fr); }
  .client-card > .status { display: none; }
  .client-visit { grid-template-columns: 1fr auto; }
  .client-visit > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 350px) {
  .calendar-day { min-height: 54px; padding-right: 1px; padding-left: 1px; }
  .calendar-day small { font-size: 7px; }
  .calendar-day.selected { padding-right: 0; padding-left: 0; }
}

/* Neutral SaaS interface layer. */
body { color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 17px; background: var(--canvas); }
h1, h2, h3, .panel-heading h2, .form-card h2, .welcome-card h2, .stat-card strong,
.dialog-heading h2, .calendar-heading h2, .login-card h1, .dashboard-management > summary strong {
  color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; letter-spacing: -.025em;
}
.topbar h1 { font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 25px; font-weight: 720; }
.panel-heading h2, .form-card h2 { font-size: 23px; font-weight: 720; }
.eyebrow { color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.sidebar { border-color: var(--sidebar-border); background: #fff; }
.brand-mark, .item-icon, .integration-catalog-icon { color: #2f765f; background: #edf7f2; font-family: inherit; }
.nav-item { color: #475467; border-radius: 9px; font-size: 15px; }
.nav-item:hover { color: #182230; background: #f2f4f7; }
.nav-item.active { color: #246b57; background: #edf7f2; box-shadow: none; }
.nav-item.active::before { background: #75b69e; }
.nav-group summary { color: #667085; border-radius: 9px; font-size: 14px; }
.nav-group summary:hover, .nav-group[open] > summary { color: #344054; background: #f8fafc; }
.optional-navigation .nav-group-items { padding-left: 10px; }
.panel, .form-card, .list-panel, .calendar-panel { border-color: var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.panel { padding: 22px; } .form-card, .list-panel { padding: 21px; }
.welcome-card { align-items: center; color: var(--ink); border: 1px solid #dcebe5; background: linear-gradient(135deg,#fff 0%,#f2f8f5 100%); box-shadow: var(--shadow); }
.welcome-card h2 { color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 28px; font-weight: 730; }
.welcome-card p:not(.eyebrow) { color: var(--muted); }
.welcome-card .primary { color: #175844; background: #d8f1e5; }
.welcome-card .primary:hover { background: #c5e7d7; }
button, input, textarea, select { font: inherit; } button { border-radius: 9px; }
:where(button, a, summary, [tabindex]):focus { outline: none; }
:where(button, a, summary, [tabindex]):focus-visible { outline: 2px solid #75b69e; outline-offset: 2px; box-shadow: none; }
.primary { color: #175844; background: #d8f1e5; box-shadow: none; }.primary:hover { background: #c5e7d7; }
.secondary { color: #344054; border-color: #d0d5dd; background: #fff; }.secondary:hover { border-color: #98a2b3; background: #f9fafb; }
input, textarea, select { min-height: 44px; border-color: #d0d5dd; border-radius: 9px; color: var(--ink); font-size: 16px; }
input:focus, textarea:focus, select:focus { border-color: #75b69e; box-shadow: 0 0 0 3px rgba(79,145,120,.12); }
label { color: #344054; font-size: 15px; }
.badge { color: #344054; background: #f2f4f7; }.status { font-size: 13px; }
.item-card .card-edit-hint { display: none; }.item-card strong { font-size: 17px; }.item-card small { color: var(--muted); font-size: 15px; }
.item-card-button:hover, .booking-card:hover, .client-card:hover, .client-visit:hover, .service-card:hover { border-color: #a8d2c2; box-shadow: 0 7px 20px rgba(16,24,40,.07); }
.section-grid { grid-template-columns: minmax(290px,360px) minmax(0,1fr); gap: 18px; }.section-grid > .form-card { align-self: start; }.cards { gap: 9px; }
.booking-filters, .payment-journal-filters, .notification-toolbar { background: #f8fafc; }
.service-cards { display: grid; grid-template-columns: 1fr; gap: 8px; }
.service-group { min-width: 0; background: transparent; }
.service-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border-radius: 10px; cursor: pointer; list-style: none; }
.service-group-heading::-webkit-details-marker { display: none; }
.service-group-heading:hover { background: #f2f7f4; }
.service-group-heading:focus-visible { outline: 2px solid #75b69e; outline-offset: -2px; }
.service-group-title { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.service-group-heading h3 { margin: 0; overflow: hidden; font-size: 18px; font-weight: 500; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.service-group-heading small { color: var(--text-secondary); font-size: 14px; font-weight: 400; white-space: nowrap; }
.service-group-heading > i { color: #667085; font-size: 20px; font-style: normal; transition: transform .18s ease; }
.service-group[open] .service-group-heading > i { transform: rotate(180deg); }
.service-list { overflow: hidden; margin: 0 8px 5px 18px; padding: 0; background: transparent; }
.service-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; min-height: 44px; border-top: 1px solid rgba(208,213,221,.58); background: transparent; transition: background .15s ease; }
.service-card:last-child { border-bottom: 1px solid rgba(208,213,221,.58); }
.service-card:hover, .service-card:focus-within { background: #f5f9f7; }
.service-card-open { display: grid; grid-template-columns: minmax(220px,1fr) auto auto; gap: 10px; align-items: center; min-width: 0; padding: 7px 8px; border: 0; color: inherit; background: transparent; text-align: left; }
.service-card-open:focus-visible, .service-2gis-toggle:focus-visible { z-index: 2; outline: 2px solid #75b69e; outline-offset: -2px; }
.service-row-name { min-width: 0; overflow: hidden; color: var(--ink); font-size: 16px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.service-row-price { display: flex; gap: 7px; align-items: baseline; justify-content: flex-end; color: var(--ink); white-space: nowrap; }
.service-row-statuses { display: flex; gap: 7px; align-items: center; justify-content: flex-end; }
.service-row-action { display: none; }
.service-2gis-toggle { display: inline-grid; grid-template-columns: auto 28px auto; gap: 6px; align-items: center; margin: 0 6px; padding: 6px 8px; border: 0; border-radius: 8px; color: #667085; background: transparent; font: inherit; cursor: pointer; }
.service-2gis-toggle:hover { background: #f0f5f2; }
.service-2gis-toggle span { font-size: 13px; font-weight: 500; }
.service-2gis-toggle i { position: relative; width: 28px; height: 16px; border-radius: 999px; background: #d0d5dd; }
.service-2gis-toggle i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.18); transition: transform .18s ease; }
.service-2gis-toggle em { font-size: 12px; font-style: normal; }
.service-2gis-toggle.is-on { color: #276b55; }
.service-2gis-toggle.is-on i { background: #5ca98b; }
.service-2gis-toggle.is-on i::after { transform: translateX(12px); }
.service-2gis-toggle:disabled { opacity: .48; cursor: not-allowed; }
.service-editor-disclosure { overflow: hidden; border: 0; border-radius: 10px; background: #f7faf8; }
.service-editor-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; cursor: pointer; list-style: none; }
.service-editor-disclosure > summary::-webkit-details-marker { display: none; }
.service-editor-disclosure > summary:hover { background: #f0f6f3; }
.service-editor-disclosure > summary:focus-visible { outline: 2px solid #75b69e; outline-offset: -2px; }
.service-editor-disclosure > summary span, .service-editor-disclosure > summary strong, .service-editor-disclosure > summary small { display: block; }
.service-editor-disclosure > summary strong { color: #263f36; font-size: 15px; }
.service-editor-disclosure > summary small { margin-top: 2px; color: #667085; font-size: 13px; font-weight: 400; }
.service-editor-disclosure > summary i { color: #667085; font-size: 18px; font-style: normal; transition: transform .18s ease; }
.service-editor-disclosure[open] > summary i { transform: rotate(180deg); }
.service-editor-disclosure-body { display: grid; gap: 10px; padding: 4px 13px 13px; }
.service-image, .service-content { display: none; }
.service-dialog { width: min(720px,calc(100% - 32px)); max-height: calc(100vh - 32px); border-radius: 16px; }
.service-dialog::backdrop { background: rgba(16,24,40,.56); backdrop-filter: blur(2px); }
.dialog-heading { position: sticky; top: 0; z-index: 4; padding-bottom: 12px; background: #fff; }.dialog-heading h2 { font-size: 23px; font-weight: 720; }
.dialog-actions { position: sticky; bottom: 0; z-index: 4; margin: 0 -2px -2px; padding: 12px 2px 2px; background: linear-gradient(to top,#fff 75%,rgba(255,255,255,0)); }
.editor-section { padding: 14px; }.client-dialog { width: min(760px,calc(100% - 32px)); }.booking-dialog { width: min(680px,calc(100% - 32px)); }
.calendar-panel { padding: 22px; }.calendar-day { min-height: 74px; border-radius: 8px; background: #fff; }.calendar-day.working { border-color: #a8d2c2; background: #f1f8f5; }.calendar-day.selected { border-color: #5b9f84; box-shadow: inset 0 0 0 1px #5b9f84; }
.schedule-workspace { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; margin-top: 18px; }
.calendar-filters { grid-template-columns: minmax(240px,360px); }
.schedule-specialist-select { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
.calendar-filters { grid-template-columns: minmax(220px,340px); justify-content: end; margin-bottom: 0; padding-bottom: 16px; }
.schedule-specialists { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.schedule-specialists-heading { display: flex; gap: 9px; align-items: center; padding: 13px 14px; border-bottom: 1px solid var(--line); color: #344054; background: #f7f9f8; }
.schedule-specialist-list { display: grid; padding: 6px; }
.schedule-specialist { display: grid; grid-template-columns: 34px minmax(0,1fr) 14px; gap: 10px; align-items: center; width: 100%; padding: 9px; border: 0; color: #475467; background: transparent; text-align: left; }
.schedule-specialist:hover { background: var(--interactive-hover-bg); }
.schedule-specialist.active { color: #245f4d; background: var(--interactive-selected-bg); }
.schedule-specialist.active:hover { background: var(--interactive-selected-hover-bg); }
.schedule-specialist-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #fff; background: #6f8a80; font-size: 14px; font-weight: 600; }
.schedule-specialist.active .schedule-specialist-avatar { background: #4f8f76; }
.schedule-specialist strong, .schedule-specialist small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-specialist strong { font-size: 14px; }.schedule-specialist small { margin-top: 2px; color: #98a2b3; font-size: 12px; }
.schedule-specialist b { color: #98a2b3; font-size: 18px; }
.schedule-calendar-area { min-width: 0; }
.schedule-calendar-area .calendar-heading { margin-bottom: 12px; }
.schedule-calendar-area .calendar-weekdays { margin-bottom: 5px; }
.schedule-calendar-area .month-calendar { gap: 6px; }
.schedule-calendar-area .calendar-day { min-height: 58px; padding: 7px 8px; }
.schedule-calendar-area .calendar-day small { margin-top: 8px; font-size: 10px; }
.schedule-calendar-area .calendar-day:not(.working):not(.unavailable)::before { content: ""; position: absolute; right: 8px; bottom: 8px; width: 6px; height: 6px; border-radius: 50%; background: #d0d5dd; }
.schedule-calendar-area .calendar-day.working::before { content: ""; position: absolute; right: 8px; bottom: 8px; width: 7px; height: 7px; border-radius: 50%; background: #55a884; }
.copy-schedule-form { width: min(440px, calc(100vw - 32px)); }
.copy-schedule-form > p { margin: 0; color: var(--text-secondary); }
.copy-schedule-form > p strong { color: var(--text-primary); font-weight: 500; }
.schedule-copy-warning { display: grid; gap: 9px; padding: 12px; border: 1px solid #d9caa0; border-radius: 10px; background: #fffbeb; }
.schedule-copy-warning[hidden] { display: none; }
.schedule-copy-warning label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
#settings-panel-schedule .settings-form { width: min(560px,100%); }
.resource-editor[open] { display: block; }
.integration-expanded-grid { grid-template-columns: 1fr; }.integration-explanation { display: none; }
.settings-grid { grid-template-columns: minmax(270px,340px) minmax(0,1fr); }
.login-overlay { background: linear-gradient(145deg,#eef2f7 0%,#f8fafc 48%,#e8eef8 100%); }
.login-card { width: min(420px,100%); gap: 16px; padding: 30px; border: 1px solid #e4e7ec; border-radius: 16px; box-shadow: 0 24px 70px rgba(16,24,40,.16); }
.login-brand { color: #344054; background: #f2f4f7; }
.login-brand strong { color: #182230; font-family: inherit; font-weight: 600; }
.login-brand small { color: #667085; }
.login-card h1 { font-size: 30px; font-weight: 730; }
.form-error a { color: #b42318; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.logo-preview { width: 120px; height: 120px; border-color: #d0d5dd; color: #2f765f; background: #edf7f2; font-family: inherit; box-shadow: none; }
@media (max-width: 980px) { .section-grid,.settings-grid { grid-template-columns:1fr; }.service-card-open { grid-template-columns:minmax(180px,1fr) auto; }.service-row-statuses { display:none; }.schedule-workspace { grid-template-columns:1fr; } }
@media (max-width: 760px) { .calendar-filters { grid-template-columns:1fr; } }
@media (max-width: 640px) { body { font-size:16px; }.service-group-heading { padding:12px 10px; }.service-group-title { display:grid; gap:2px; }.service-list { padding:0 8px 4px; }.service-card { grid-template-columns:minmax(0,1fr) auto; }.service-card-open { grid-template-columns:minmax(0,1fr) auto; gap:5px 8px; padding:9px 4px; }.service-row-price { grid-column:2; grid-row:1; }.service-row-action { grid-column:1 / -1; grid-row:2; text-align:left; }.service-2gis-toggle { grid-template-columns:28px; margin:0 2px; padding:7px 5px; }.service-2gis-toggle span,.service-2gis-toggle em { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }.schedule-calendar-area .calendar-day { min-height:52px; padding:5px; }.schedule-calendar-area .calendar-day small { font-size:8px; } }

/* Compact, readable working surfaces. */
.main-content { min-width: 0; }
.topbar { min-width: 0; }
.topbar-status { white-space: nowrap; }
.view { min-width: 0; }
.panel-heading > div, .booking-heading-actions { min-width: 0; }
.panel-heading p:not(.eyebrow) { max-width: 760px; font-size: 16px; line-height: 1.5; }
.form-card { gap: 14px; }
.form-card textarea { min-height: 88px; resize: vertical; }
.form-actions { gap: 9px; }
.item-card { min-height: 68px; padding: 12px 14px; }
.integration-catalog { max-width: 900px; gap: 10px; }
.integration-catalog-row { grid-template-columns: 42px minmax(0,1fr) auto; gap: 13px; padding: 14px 16px; }
.integration-catalog-icon { width: 42px; height: 42px; border-radius: 11px; font-size: 19px; }
.integration-catalog-copy strong { margin: 1px 0 2px; font-family: inherit; font-size: 18px; font-weight: 720; }
.integration-catalog-copy > span { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.integration-item-body { border-top-color: var(--line); }
.integration-expanded-grid .form-card { width: min(620px,100%); margin: 0 auto; }

/* Notification settings are intentionally collapsed into task-sized groups. */
.notifications-panel { max-width: 1120px; margin: 0 auto; }
.notifications-heading { align-items: center; }
.notification-toolbar { grid-template-columns: minmax(190px,240px) minmax(260px,1fr) auto; gap: 10px; margin-bottom: 12px; padding: 12px; }
.notification-note { justify-content: flex-start; font-size: 14px; }
.automation-settings { display: block; margin-bottom: 14px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.automation-settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 16px; background: #f8fafc; }
.automation-settings-heading h3 { margin: 2px 0 0; font-size: 19px; }
.automation-settings-heading > small { max-width: 460px; color: var(--muted); font-size: 14px; text-align: right; }
.automation-group { border-top: 1px solid var(--line); }
.automation-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; cursor: pointer; list-style: none; }
.automation-group > summary::-webkit-details-marker { display: none; }
.automation-group > summary:hover { background: #f9fbfa; }
.automation-group > summary span, .automation-group > summary strong, .automation-group > summary small { display: block; }
.automation-group > summary strong { color: var(--ink); font-size: 16px; }
.automation-group > summary small { margin-top: 2px; color: var(--muted); font-size: 14px; }
.automation-group > summary b { color: #667085; font-size: 18px; transition: transform .16s ease; }
.automation-group[open] > summary b { transform: rotate(180deg); }
.automation-group-body { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 4px 16px 16px; }
.automation-group-body > .toggle-line { grid-column: 1 / -1; min-height: 48px; margin: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; }
.automation-group-body.review-settings-section { margin: 0; border: 0; }
.automation-group-body.review-settings-section > small,
.automation-group-body.review-settings-section .review-message-field,
.automation-group-body .review-test-panel { grid-column: 1 / -1; }
.automation-group-body .review-test-panel { margin-top: 0; padding: 13px; border-radius: 10px; }
.automation-save-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 16px; border-top: 1px solid var(--line); background: #f8fafc; }
.automation-save-row strong, .automation-save-row small { display: block; }
.automation-save-row strong { font-size: 15px; }
.automation-save-row small { margin-top: 2px; color: var(--muted); font-size: 13px; }
.automation-save-row button { flex: 0 0 auto; }
.return-effectiveness-panel { margin-bottom: 14px; padding: 14px 16px; border-radius: 12px; }
.return-effectiveness-heading h3 { font-size: 18px; }
.notification-list { gap: 9px; }
.notification-card { padding: 14px 16px; border-radius: 11px; }
.notification-card p { margin: 11px 0; padding: 11px 12px; font-size: 15px; line-height: 1.5; }

/* Dialogs stay centered and use space only when their content needs it. */
.service-dialog { width: min(680px,calc(100vw - 32px)); max-height: min(820px,calc(100vh - 32px)); padding: 0; overflow: auto; }
.service-editor, .booking-details, .create-booking-form, .qr-scanner-content { gap: 10px; padding: 16px 18px; }
.client-dialog { width: min(720px,calc(100vw - 32px)); }
.booking-dialog { width: min(660px,calc(100vw - 32px)); }
.create-booking-dialog { width: min(700px,calc(100vw - 32px)); }
.gis-selection-dialog { width: min(780px,calc(100vw - 32px)); }
.dialog-close { width: 36px; height: 36px; font-size: 22px; }
.service-editor-source { grid-template-columns: 68px minmax(0,1fr); gap: 12px; padding: 9px 11px; background: #f4f8f6; }
.service-editor-image { width: 68px; height: 68px; aspect-ratio: 1; }
.service-editor-source p { max-height: 68px; margin: 3px 0; font-size: 14px; line-height: 1.4; }
.source-note { margin: -2px 2px 0; }
.editor-section { margin: 0; padding: 10px 12px; border: 0; border-radius: 10px; background: #f7faf8; }
.editor-section legend { font-size: 15px; }
.editor-section legend small { color: var(--muted); font-size: 13px; font-weight: 500; }
.optional-editor-section > .field-hint { margin: 0 0 10px; }
.optional-service-settings { border-radius: 10px; }
.optional-service-settings > summary { padding: 12px 14px; font-size: 15px; }
#service-dialog input[type="checkbox"], #service-dialog input[type="radio"] { accent-color: #5ca98b; }
#service-dialog .choice-option { padding: 9px 10px; border-color: transparent; background: #fff; }
#service-dialog .choice-option:hover { border-color: #a8d2c2; background: #f9fbfa; }
#service-dialog .choice-option:has(input:checked) { border-color: #90c6b1; background: #edf7f2; }
#service-dialog .booking-toggle { padding: 10px 11px; border: 0; background: #edf7f2; }
.booking-detail-grid { gap: 8px; }
.booking-detail-grid > div { padding: 10px 12px; }
.booking-comment { padding: 12px; }
.booking-comment p { font-size: 16px; line-height: 1.5; }
.client-history { max-height: 390px; overflow: auto; }
.client-visit { padding: 11px 12px; }

@media (max-width: 760px) {
  .notification-toolbar { grid-template-columns: 1fr; }
  .notification-note { display: grid; }
  .notification-archive-completed { width: 100%; }
  .automation-settings-heading, .automation-save-row { align-items: stretch; flex-direction: column; }
  .automation-settings-heading > small { max-width: none; text-align: left; }
  .automation-group-body { grid-template-columns: 1fr; }
  .automation-group-body > .toggle-line,
  .automation-group-body.review-settings-section > small,
  .automation-group-body.review-settings-section .review-message-field,
  .automation-group-body .review-test-panel { grid-column: auto; }
  .automation-save-row button { width: 100%; }
  .integration-catalog-copy > span { white-space: normal; }
}

@media (max-width: 520px) {
  .service-kind-field { grid-template-columns: 1fr; }
  .service-kind-field small { grid-column: 1; }
  .panel, .form-card, .list-panel, .calendar-panel { padding: 16px; border-radius: 12px; }
  .service-editor, .booking-details, .create-booking-form, .qr-scanner-content { padding: 16px; }
  .dialog-heading h2 { font-size: 21px; }
  .automation-group > summary, .automation-settings-heading, .automation-save-row { padding-right: 13px; padding-left: 13px; }
  .automation-group-body { padding-right: 13px; padding-left: 13px; }
}

/* Payments: stable action and amount columns. Notifications: task tabs. */
.notification-tabs {
  display: flex;
  gap: 4px;
  margin: 12px 0 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f4f7f5;
}
.notification-tabs > button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 500;
}
.notification-tabs > button.is-active {
  color: #245f4d;
  background: white;
  box-shadow: var(--shadow-sm);
}
.notification-tabs .badge { min-width: 24px; padding: 2px 7px; font-size: 12px; }
.notification-tab-panel { min-height: 0; }
.notification-automation-note {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f4f7f5;
}
#view-notifications .automation-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  overflow: visible;
}
#view-notifications .automation-group {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
}
#view-notifications .automation-group > summary {
  min-height: 112px;
  align-items: flex-start;
  padding: 14px;
}
#view-notifications .automation-group > summary b {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 7px;
  color: #28735d;
  background: #edf6f1;
  font-size: 12px;
  font-weight: 500;
  transform: none;
}
#view-notifications .automation-group[open] {
  grid-column: 1 / -1;
}
#view-notifications .automation-group[open] > summary { min-height: 0; }
#view-notifications .automation-group[open] > summary b { font-size: 0; }
#view-notifications .automation-group[open] > summary b::before { content: "Скрыть"; font-size: 12px; }
#view-notifications .automation-save-row { grid-column: 1 / -1; }
#notification-panel-journal .notification-toolbar {
  grid-template-columns: minmax(190px, 250px) auto auto;
  justify-content: start;
  align-items: end;
}
#notification-panel-results .return-effectiveness-panel { margin: 0; }

@media (max-width: 760px) {
  #view-payments .payment-operation > summary {
    grid-template-columns: 34px minmax(0, 1fr) 34px 102px;
    gap: 8px;
  }
  #view-payments .payment-operation-more { width: 34px; }
  #view-payments .payment-operation-amount { width: 102px; }
  .notification-tabs { overflow-x: auto; }
  .notification-tabs > button { min-width: max-content; flex: 1 0 auto; }
  #view-notifications .automation-settings { grid-template-columns: 1fr; }
  #view-notifications .automation-group[open] { grid-column: auto; }
  #notification-panel-journal .notification-toolbar { grid-template-columns: 1fr; }
}

/* Notifications are a settings workspace, not a full-width landing page. */
#view-notifications input[type="checkbox"],
#view-notifications input[type="radio"] {
  accent-color: #39745f;
}
.notifications-panel {
  max-width: 980px;
  padding: 22px 24px;
}
.notifications-panel label,
.notifications-panel input,
.notifications-panel select,
.notifications-panel textarea,
.notifications-panel button {
  font-size: 16px;
}
.notifications-panel small,
.notifications-panel .notification-note,
.notifications-panel .automation-settings-heading > small,
.notifications-panel .automation-group > summary small {
  font-size: 15px;
  line-height: 1.45;
}
.automation-settings {
  max-width: 860px;
  margin-right: auto;
  margin-left: auto;
}
.automation-settings-heading {
  padding: 12px 16px;
}
.automation-settings-heading h3 {
  font-size: 20px;
}
.automation-group > summary {
  min-height: 64px;
  padding: 10px 16px;
}
.automation-group > summary strong {
  font-size: 17px;
}
.automation-group-body {
  width: min(760px, calc(100% - 32px));
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0 auto;
  padding: 8px 0 16px;
}
.automation-group-body > .toggle-line {
  min-height: 40px;
  padding: 6px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 16px;
}
.automation-group-body input:not([type="checkbox"]):not([type="radio"]),
.automation-group-body select {
  min-height: 44px;
  padding: 9px 12px;
}
.automation-group-body textarea {
  min-height: 76px;
  padding: 10px 12px;
}
.automation-group-body .review-test-panel {
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 280px);
  padding: 12px 14px;
  border-color: #d9dedb;
  background: #f7faf8;
}
.automation-save-row {
  padding: 11px 16px;
}
.return-effectiveness-panel {
  max-width: 860px;
  margin-right: auto;
  margin-left: auto;
}

@media (max-width: 760px) {
  .notifications-panel { padding: 16px; }
  .automation-group-body { width: calc(100% - 26px); grid-template-columns: 1fr; }
  .automation-group-body .review-test-panel { grid-template-columns: 1fr; }
}

/* Typography: readable locally installed Open Sans, without a network dependency. */
body,
button,
input,
select,
textarea {
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
}
.topbar h1,
.welcome-card h2,
.panel-heading h2,
.calendar-heading h2,
.dialog-heading h2,
.login-card h1 {
  font-family: "Unbounded", "Open Sans", "Segoe UI", Arial, sans-serif;
  font-weight: 650;
  letter-spacing: -.025em;
}

/* Expandable navigation follows the same compact hierarchy on every screen. */
.nav {
  gap: 7px;
}
.main-nav-group {
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
}
.main-nav-group > summary {
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #344054;
  font-size: 16px;
  font-weight: 650;
}
.main-nav-group > summary:hover {
  color: #245f4d;
  background: #f4f7f5;
}
.main-nav-group[open] {
  border-color: #d8e1dc;
  background: #fff;
  box-shadow: 0 3px 10px rgba(16, 24, 40, .04);
}
.main-nav-group[open] > summary {
  color: #245f4d;
  background: #eaf5ef;
}
.main-nav-group > summary .nav-icon {
  width: 22px;
  font-size: 17px;
  opacity: .8;
}
.main-nav-group > .nav-group-items {
  gap: 1px;
  padding: 5px 7px 7px;
}
.main-nav-group > .nav-group-items > .nav-item {
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 15px;
}
.main-nav-group > .nav-group-items > .nav-item.active {
  color: #245f4d;
  background: #f0f7f3;
}
.main-nav-group > .nav-group-items > .nav-item.active::before {
  display: none;
}
.main-nav-group .optional-navigation {
  margin: 2px 0 0;
}
.main-nav-group .optional-navigation > summary {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 15px;
}
.main-nav-group .optional-navigation .nav-group-items {
  padding: 3px 0 3px 12px;
}
.main-nav-group .optional-navigation .nav-group-items > .nav-item { min-height: 38px; padding: 7px 10px; }
.main-nav-group .optional-navigation .nav-group-items > .nav-item .nav-icon { width: 18px; flex: 0 0 18px; }
.main-nav-group .optional-navigation .nav-group-items > .nav-item.active { color: #245f4d; background: #edf6f1; }

/* Light navigation and registers: hierarchy comes from spacing and tone,
   not from frames nested inside other frames. */
.sidebar {
  border-right: 0;
  box-shadow: 8px 0 28px rgba(31, 45, 39, 0.035);
  background: #fafcfb;
}
.main-nav-group,
.main-nav-group[open] {
  overflow: visible;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}
.main-nav-group > summary { border: 0; }
.main-nav-group[open] > summary {
  color: #245f4d;
  background: #edf6f1;
}
.main-nav-group > .nav-group-items {
  gap: 1px;
  padding: 5px 8px 7px 36px;
}
.main-nav-group > .nav-group-items > .nav-item {
  min-height: 38px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
}
.main-nav-group > .nav-group-items > .nav-item:hover { background: #f1f6f3; }
.main-nav-group > .nav-group-items > .nav-item.active {
  color: #245f4d;
  background: transparent;
  font-weight: 500;
  box-shadow: none;
}

/* Notifications are a settings workspace, not a stack of bordered cards. */
#view-notifications .notifications-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
}
#view-notifications .automation-settings {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
#view-notifications .automation-settings-heading {
  padding-right: 4px;
  padding-left: 4px;
  border: 0;
  background: transparent;
}
#view-notifications .automation-group {
  margin: 4px 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
}
#view-notifications .automation-group > summary {
  padding: 14px 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}
#view-notifications .automation-group > summary:hover,
#view-notifications .automation-group[open] > summary { background: #f2f7f4; }
#view-notifications .automation-group-body { padding: 8px 16px 18px; }
#view-notifications .automation-group-body > .check-line {
  border: 0;
  background: #f7f9f8;
}
#view-notifications .automation-save-row {
  border: 0;
  background: transparent;
}
#view-notifications .review-test-panel {
  border: 0;
  background: #f6f8f7;
}
#view-notifications .return-effectiveness-panel {
  border: 0;
  background: #f4f7f5;
  box-shadow: none;
}
#view-notifications .return-effectiveness-metrics article {
  border: 0;
  box-shadow: none;
}
#notification-panel-results,
#notification-panel-results button,
#notification-panel-results select { font-family: inherit; }
#notification-panel-results .return-effectiveness-panel { gap: 10px; max-width: 900px; padding: 15px 16px; }
#notification-panel-results .return-effectiveness-heading { align-items: center; }
#notification-panel-results .return-effectiveness-heading h3 { font-family: inherit; font-size: 18px; font-weight: 600; line-height: 1.25; }
#notification-panel-results .return-effectiveness-controls { align-items: end; gap: 8px; }
#notification-panel-results .return-effectiveness-controls label { display: grid; gap: 4px; font-size: 13px; }
#notification-panel-results .return-effectiveness-controls select,
#notification-panel-results .return-effectiveness-controls button { min-height: 38px; padding-top: 7px; padding-bottom: 7px; }
#notification-panel-results .return-effectiveness-metrics { gap: 8px; }
#notification-panel-results .return-effectiveness-metrics article { display: grid; align-content: start; gap: 3px; min-width: 0; padding: 11px 12px; border: 1px solid #e3e9e6; border-radius: 9px; background: #fff; }
#notification-panel-results .return-effectiveness-metrics small { color: #5f6978; font-size: 13px; font-weight: 400; line-height: 1.35; }
#notification-panel-results .return-effectiveness-metrics strong { display: block; margin: 2px 0 0; color: var(--green-900); font-family: inherit; font-size: 23px; font-weight: 600; line-height: 1.15; }
#notification-panel-results .return-effectiveness-metrics span { color: #5f6978; font-size: 12px; line-height: 1.35; }
#notification-panel-results .return-effectiveness-empty { margin: 0; padding: 9px 11px; border-radius: 8px; color: #5f6978; background: #edf3f0; font-size: 13px; line-height: 1.4; }
#notification-panel-results .return-effectiveness-note { display: block; padding: 9px 11px; border-left: 3px solid #9bbcad; border-radius: 0 7px 7px 0; color: #5f6978; background: #f7f9f8; font-size: 13px; line-height: 1.45; }
@media (max-width: 760px) {
  #notification-panel-results .return-effectiveness-heading { align-items: stretch; }
  #notification-panel-results .return-effectiveness-controls { flex-direction: row; align-items: end; }
  #notification-panel-results .return-effectiveness-controls label { flex: 1; }
}
@media (max-width: 520px) {
  #notification-panel-results .return-effectiveness-metrics { grid-template-columns: 1fr; }
}

/* Client register: calm rows on one surface instead of a grid of mini-cards. */
#view-clients .clients-panel {
  max-width: 1160px;
  margin-inline: auto;
  padding: 22px 24px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}
#view-clients .panel-heading { padding-inline: 4px; }
#view-clients .client-search {
  max-width: 680px;
  margin-left: 4px;
}
#view-clients .client-list {
  gap: 2px;
  margin-top: 16px;
}
#view-clients .client-card {
  min-height: 72px;
  padding: 11px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
}
#view-clients .client-card:hover,
#view-clients .client-card:focus-visible {
  border: 0;
  background: var(--interactive-hover-bg);
  box-shadow: none;
  transform: none;
}
#view-clients .client-main strong { font-size: 16px; }
#view-clients .client-main small,
#view-clients .client-metric small,
#view-clients .client-last small {
  font-size: 13px;
  line-height: 1.4;
}
#view-clients .client-metric b,
#view-clients .client-last strong { font-size: 17px; }

/* Booking register: common filters first, less frequent filters on demand. */
#view-bookings .bookings-panel {
  max-width: 1160px;
  margin-inline: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
}
#view-bookings .panel-heading { padding-inline: 4px; }
.booking-primary-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  max-width: 620px;
  margin-top: 18px;
}
.booking-extra-filters { max-width: 760px; margin: 10px 0 16px; }
.booking-extra-filters > summary {
  width: fit-content;
  padding: 8px 2px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.booking-extra-filters > summary::-webkit-details-marker { display: none; }
.booking-extra-filters > summary::before { content: "+ "; }
.booking-extra-filters[open] > summary::before { content: "− "; }
.booking-extra-filters > summary span { margin-left: 6px; font-weight: 400; }
.booking-extra-filters .booking-filters {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 8px 0 4px;
  border: 0;
  background: transparent;
}
#view-bookings .booking-list { gap: 2px; }
#view-bookings .booking-card {
  min-height: 70px;
  padding: 9px 12px;
  border-color: transparent;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
}
#view-bookings .booking-card:hover,
#view-bookings .booking-card:focus-visible {
  border-color: transparent;
  background: var(--interactive-hover-bg);
  box-shadow: none;
  transform: none;
}
#view-bookings .booking-card.cancelled { background: #fbf7f6; }
#view-bookings .booking-card.attended { background: #f5fbf8; }
#view-bookings .booking-card.no-show { background: #fcf6f4; }

/* Payment journal: a compact query first, results only when data exists. */
#view-payments .payments-panel {
  max-width: 1160px;
  margin-inline: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
}
#view-payments .panel-heading { padding-inline: 4px; }
.payment-query-bar {
  display: flex;
  align-items: end;
  gap: 12px;
  max-width: 620px;
  margin-top: 18px;
}
.payment-query-bar label { min-width: 250px; }
.payment-query-bar button { min-height: 48px; }
.payment-custom-period {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 620px;
  margin-top: 12px;
}
.payment-extra-filters {
  max-width: 760px;
  margin-top: 10px;
}
.payment-extra-filters > summary {
  width: fit-content;
  padding: 8px 2px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.payment-extra-filters > summary::-webkit-details-marker { display: none; }
.payment-extra-filters > summary::before { content: "+ "; }
.payment-extra-filters[open] > summary::before { content: "− "; }
.payment-extra-filters .payment-journal-filters {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 12px;
  padding: 8px 0 4px;
  border: 0;
  background: transparent;
}
#payment-journal-status:not(:empty) {
  max-width: 620px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: #f2f7f4;
  font-size: 15px;
}
.payment-journal-result { margin-top: 10px; }
#view-payments .payment-summary article,
#view-payments .payment-method-summary article {
  border: 0;
  background: #f4f7f5;
  box-shadow: none;
}
#view-payments .payment-summary .net {
  color: var(--text);
  background: #dceee4;
}
#view-payments .payment-summary article small,
#view-payments .payment-summary article strong,
#view-payments .payment-summary article span,
#view-payments .payment-summary .net small,
#view-payments .payment-summary .net strong,
#view-payments .payment-summary .net span { color: var(--text); }
#view-payments .payment-summary article strong {
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
#view-payments .payment-summary article small,
#view-payments .payment-method-summary article small { font-weight: 400; }
#view-payments .payment-operation {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
}
#view-payments .payment-operation > summary { padding: 9px 12px; }
#view-payments .payment-journal-list { gap: 2px; }
#view-payments .payment-operation-sign {
  width: 34px;
  height: 34px;
}
#view-payments .payment-operation-main { gap: 1px; }
#view-payments .payment-operation-main strong {
  font-size: 16px;
  line-height: 1.3;
}
#view-payments .payment-operation-main small {
  margin-top: 1px;
  font-size: 14px;
  line-height: 1.35;
}
#view-payments .payment-operation-amount {
  font-size: 17px;
  white-space: nowrap;
}
#view-payments .payment-operation:hover {
  background: var(--interactive-hover-bg);
  box-shadow: none;
}
@media (max-width: 760px) {
  .payment-operation-more { font-size: 0; }
  .payment-operation-more::after { font-size: 14px; }
  .payment-operation-details { padding-left: 12px; }
  .payment-operation-details dl { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .booking-primary-filters,
  .booking-extra-filters .booking-filters { grid-template-columns: 1fr; }
  .booking-extra-filters > summary span { display: none; }
  .payment-query-bar { align-items: stretch; flex-direction: column; }
  .payment-query-bar label { min-width: 0; }
  .payment-custom-period,
  .payment-extra-filters .payment-journal-filters { grid-template-columns: 1fr; }
  .booking-view-toolbar { align-items: stretch; flex-direction: column; }
  .booking-view-switch { align-self: flex-start; }
  .booking-calendar-navigation { justify-content: space-between; }
  .booking-calendar-navigation strong { min-width: 0; flex: 1; font-size: 13px; }
  .booking-calendar { grid-template-columns: repeat(7, 142px); min-width: 994px; }
}

/* Unified, compact service editor and image viewer. */
#service-dialog .service-editor { gap: 0; padding: 16px 20px 0; }
#service-dialog .dialog-heading { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: start; gap: 14px; margin-bottom: 8px; }
.service-editor-heading-copy { min-width: 0; }
.service-editor-heading-copy h2 { margin-bottom: 3px; }
.service-editor-heading-copy small { color: #28735d; font-size: 13px; font-weight: 550; }
.service-editor-heading-price { padding-top: 20px; font-family: "BirSuol", "Open Sans", sans-serif; font-size: 22px; white-space: nowrap; }
#service-dialog .service-editor-source { grid-template-columns: 76px minmax(0,1fr); margin: 0; padding: 8px 0 10px; border: 0; border-radius: 0; background: transparent; }
#service-dialog .service-editor-summary { min-width: 0; }
#service-dialog #service-editor-description { max-height: 5.7em; margin: 2px 0; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.42; }
#service-dialog .service-description-preview p { max-height: none; margin: 0 0 .55em; overflow: visible; white-space: normal; }
.service-description-preview p, .service-description-full p { margin: 0 0 .75em; }
.service-description-preview p:last-child, .service-description-full p:last-child { margin-bottom: 0; }
.service-description-preview ul, .service-description-preview ol, .service-description-full ul, .service-description-full ol { margin: .45em 0 .75em; padding-left: 1.35em; }
#service-dialog .service-description-open { display: inline-flex; margin: 0 0 5px; padding: 2px 0; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; color: #28735d; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.35; cursor: pointer; }
#service-dialog .service-description-open:hover { border-bottom-color: currentColor; color: #1e604d; }
#service-dialog .service-description-open:focus-visible { outline: 3px solid rgba(92,169,139,.28); outline-offset: 3px; }
#service-dialog .service-description-open[hidden] { display: none; }
#service-dialog .source-note { margin: 0; padding: 0 0 10px 80px; border-bottom: 1px solid #e5ebe8; }
.service-kind-field { display: grid; grid-template-columns: minmax(150px,1fr) minmax(220px,280px); align-items: center; gap: 4px 14px; padding: 8px 0; color: var(--ink); font-size: 13px; font-weight: 500; }
.service-kind-field select { min-height: 38px; font-size: 14px; }
.service-kind-field small { grid-column: 1/-1; color: var(--muted); font-size: 12px; font-weight: 400; }
#service-dialog .editor-section { width: 100%; margin: 0; padding: 9px 0; border: 0; border-bottom: 1px solid #e5ebe8; border-radius: 0; background: transparent; }
#service-dialog .editor-section legend { padding: 0 0 5px; font-weight: 600; }
#service-dialog label { font-weight: 500; }
#service-dialog .time-fields { align-items: stretch; gap: 10px; }
#service-dialog .time-fields > label { display: grid; grid-template-rows: minmax(40px,auto) 42px; align-content: end; gap: 5px; }
#service-dialog .time-fields input { min-width: 0; margin: 0; }
#service-dialog .service-editor-disclosure,
#service-dialog .optional-service-settings { width: 100%; margin: 0; border: 0; border-bottom: 1px solid #e5ebe8; border-radius: 0; background: transparent; box-shadow: none; }
#service-dialog .service-editor-disclosure > summary,
#service-dialog .optional-service-settings > summary { min-height: 50px; padding: 7px 2px; border-radius: 7px; font-size: 15px; }
#service-dialog .service-editor-disclosure > summary strong,
#service-dialog .optional-service-settings > summary strong { font-weight: 600; }
.service-disclosure-action { margin-left: auto; color: #28735d; font-size: 13px; font-weight: 550; }
#service-dialog .service-editor-disclosure > summary:hover,
#service-dialog .optional-service-settings > summary:hover { background: #f5f8f7; }
#service-dialog .service-editor-disclosure > summary:focus-visible,
#service-dialog .optional-service-settings > summary:focus-visible { outline: 3px solid rgba(92,169,139,.24); outline-offset: 1px; }
#service-dialog .service-editor-disclosure-body { padding: 0 2px 12px; border: 0; background: transparent; }
#service-dialog .service-resource-sections { display: grid; gap: 14px; }
#service-dialog .service-choice-section { margin: 0; padding: 0; }
#service-dialog .service-choice-section + .service-choice-section { padding-top: 12px; border-top: 1px solid #eef2f0; }
#service-dialog .service-choice-section h3 { margin: 0 0 7px; font-size: 15px; }
#service-dialog .service-choice-section h3 small { color: var(--muted); font-size: 13px; font-weight: 500; }
#service-dialog .service-choice-section .field-hint { margin: -2px 0 8px; }
#service-dialog .choice-grid { gap: 5px; }
#service-dialog .choice-option { min-height: 42px; padding: 7px 9px; border: 1px solid transparent; border-radius: 7px; background: #f7f9f8; }
#service-dialog .choice-option:hover { border-color: transparent; background: var(--interactive-hover-bg); }
#service-dialog .choice-option:focus-within { outline: 3px solid rgba(92,169,139,.22); outline-offset: 1px; }
#service-dialog .choice-option:has(input:checked) { border-color: transparent; background: var(--interactive-selected-bg); }
#service-dialog .choice-option:has(input:checked):hover { background: var(--interactive-selected-hover-bg); }
#service-dialog .choice-option strong { font-weight: 550; }
#service-dialog .choice-option small { font-weight: 400; }
#service-dialog .service-toggle-stack { width: 100%; border-bottom: 1px solid #e5ebe8; }
#service-dialog .service-toggle-row { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 10px; width: 100%; min-height: 52px; margin: 0; padding: 6px 3px; border: 0; border-top: 1px solid #e5ebe8; border-radius: 0; background: transparent; cursor: pointer; }
#service-dialog .service-toggle-row:hover { background: #f5f8f7; }
#service-dialog .service-toggle-row:focus-within { position: relative; z-index: 1; outline: 3px solid rgba(92,169,139,.22); outline-offset: -1px; border-radius: 7px; }
#service-dialog .service-toggle-row input { width: 19px; height: 19px; margin: 0; }
#service-dialog .service-toggle-row strong,
#service-dialog .service-toggle-row small { display: block; }
#service-dialog .service-toggle-row small { margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.35; }
#service-dialog .service-editor-disclosure-body > .service-toggle-row { margin-bottom: 9px; border-bottom: 1px solid #eef2f0; }
#service-dialog .upload-status { margin: 8px 2px 0; }
#service-dialog .dialog-actions { position: sticky; bottom: 0; z-index: 3; margin: 8px -20px 0; padding: 11px 20px; border-top: 1px solid #e5ebe8; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); }
.service-editor-image-button { display: grid; width: 100%; height: 100%; padding: 0; overflow: hidden; place-items: center; border: 0; border-radius: inherit; background: transparent; cursor: zoom-in; }
.service-editor-image-button:hover img { transform: scale(1.03); }
.service-editor-image-button:focus-visible { outline: 3px solid rgba(92,169,139,.42); outline-offset: -3px; }
.service-editor-image-button img { transition: transform .18s ease; }
#service-dialog .service-editor-image { width: 76px; height: auto; min-height: 76px; aspect-ratio: auto; overflow: visible; background: #f4f8f6; }
#service-dialog .service-editor-image-button { height: auto; min-height: 76px; overflow: visible; }
#service-dialog .service-editor-image-button img { width: 100%; height: auto; max-height: 118px; border-radius: 8px; object-fit: contain; }
.service-product-section > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.service-product-section > div:first-child small { color: var(--muted); font-size: 12px; }
.service-product-facts { margin-top: 6px; color: var(--text); font-size: 14px; font-weight: 500; line-height: 1.45; }
.service-product-section .field-hint { display: none; }
.service-image-dialog { width: min(920px,calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: #fff; box-shadow: 0 28px 90px rgba(16,24,40,.32); }
.service-image-dialog::backdrop { background: rgba(16,24,40,.7); backdrop-filter: blur(3px); }
.service-image-viewer { display: grid; grid-template-rows: auto minmax(220px,1fr) auto; max-height: calc(100vh - 32px); padding: 14px 16px 12px; }
.service-image-viewer-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 10px; }
.service-image-viewer-heading h2 { margin: 2px 0 0; font-size: 20px; }
.service-image-viewer-stage { display: grid; min-height: 220px; overflow: hidden; place-items: center; border-radius: 10px; background: #f3f6f5; }
.service-image-viewer-stage img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 180px); object-fit: contain; }
.service-image-viewer-meta { margin: 0; padding-top: 10px; color: var(--muted); font-size: 14px; text-align: center; }
.service-description-dialog { width: min(620px,calc(100vw - 32px)); max-height: min(760px,calc(100vh - 32px)); padding: 0; overflow: hidden; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 28px 90px rgba(16,24,40,.32); }
.service-description-dialog::backdrop { background: rgba(16,24,40,.7); backdrop-filter: blur(3px); }
.service-description-viewer { display: grid; grid-template-rows: auto minmax(0,1fr); height: min(760px,calc(100vh - 32px)); max-height: calc(100vh - 32px); }
.service-description-viewer-heading { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; border-bottom: 1px solid #e5ebe8; }
.service-description-viewer-heading h2 { margin: 3px 0 0; font-size: 22px; line-height: 1.3; }
.service-description-viewer-body { min-height: 0; padding: 18px 20px 24px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.service-description-viewer-body:focus { outline: none; }
.service-description-category { margin: 0 0 12px; color: #28735d; font-size: 14px; font-weight: 500; letter-spacing: .035em; text-transform: uppercase; }
.service-description-full { margin: 0; overflow: visible; color: var(--text); font-size: 16px; line-height: 1.7; white-space: pre-wrap; }

@media (max-width: 520px) {
  #service-dialog .service-editor { padding: 14px 14px 0; }
  #service-dialog .source-note { padding-left: 0; }
  #service-dialog .time-fields { grid-template-columns: 1fr; }
  #service-dialog .time-fields > label { grid-template-rows: auto 42px; }
  #service-dialog .dialog-actions { margin-right: -14px; margin-left: -14px; padding: 10px 14px; }
  .service-image-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .service-image-viewer { max-height: calc(100vh - 16px); padding: 12px; }
  .service-description-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .service-description-viewer { max-height: calc(100vh - 16px); }
  .service-description-viewer-heading { padding: 15px 14px 12px; }
  .service-description-viewer-heading h2 { font-size: 19px; }
  .service-description-viewer-body { padding: 15px 14px 20px; }
}

/* Final notification tab layout overrides the legacy stacked workspace rules. */
#view-notifications .automation-settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}
#view-notifications .automation-group {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
}
#view-notifications .automation-group > summary {
  min-height: 112px;
  align-items: flex-start;
  padding: 14px;
}
#view-notifications .automation-group > summary b {
  padding: 6px 9px;
  border-radius: 7px;
  color: #28735d;
  background: #edf6f1;
  font-size: 12px;
  transform: none;
}
#view-notifications .automation-group[open] { grid-column: 1 / -1; }
#view-notifications .automation-group[open] > summary { min-height: 0; }
#view-notifications .automation-group[open] > summary b { font-size: 0; }
#view-notifications .automation-group[open] > summary b::before { content: "Скрыть"; font-size: 12px; }

@media (max-width: 760px) {
  #view-notifications .automation-settings { grid-template-columns: 1fr; }
  #view-notifications .automation-group[open] { grid-column: auto; }
}

/* Compact communication scenarios: final scoped layout overrides. */
.notifications-panel { max-width: 1040px; }
#view-notifications .automation-settings { gap: 8px; }
#view-notifications .automation-group:not([open]) { order: 0; }
#view-notifications .automation-group[open] { order: 1; }
#view-notifications .automation-save-row { order: 2; }
#view-notifications .automation-group > summary { min-height: 86px; align-items: center; padding: 11px 13px; }
#view-notifications .automation-group > summary strong { font-size: 16px; font-weight: 600; }
#view-notifications .automation-group > summary small { margin-top: 1px; font-size: 13px; line-height: 1.35; }
#view-notifications .automation-group[open] > summary { min-height: 62px; padding: 10px 14px; }
#view-notifications .automation-group-body { width: 100%; gap: 8px 12px; margin: 0; padding: 4px 14px 13px; }
#view-notifications .automation-group-body > .toggle-line,
#view-notifications .scenario-setting-row > .toggle-line { min-height: 34px; padding: 3px 0; font-size: 14px; }
#view-notifications .toggle-line input[type="checkbox"] {
  appearance: none;
  flex: 0 0 18px;
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 0;
  padding: 0 !important;
  border: 1px solid #aebdb7;
  border-radius: 5px;
  outline: 0;
  background-color: #fff;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: none;
  cursor: pointer;
}
#view-notifications .toggle-line input[type="checkbox"]:checked {
  border-color: var(--gold);
  background-color: var(--gold);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3.5 8 3 3 6-7'/%3E%3C/svg%3E");
}
#view-notifications .toggle-line input[type="checkbox"]:hover { border-color: var(--gold); }
#view-notifications .toggle-line input[type="checkbox"]:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(57,116,95,.16); }
#view-notifications .previsit-settings { display: grid; grid-template-columns: 1fr; gap: 0; }
#view-notifications .scenario-setting-row { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(130px, 170px) minmax(230px, 1fr); gap: 10px 16px; align-items: center; padding: 9px 0; border-top: 1px solid #edf0ee; }
#view-notifications .scenario-setting-row:first-child { border-top: 0; }
#view-notifications .scenario-setting-row .automation-capability-note { margin: 0; font-size: 13px; line-height: 1.35; }
#view-notifications .scenario-compact-control { max-width: 180px; }
#view-notifications .scenario-compact-control input,
#view-notifications .scenario-compact-control select { width: 100%; }
#view-notifications .scenario-fields-grid { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(230px, .35fr) minmax(280px, .65fr); gap: 12px; align-items: end; }
#view-notifications .feedback-flow { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#view-notifications .feedback-flow > div { padding: 8px 10px; }
#view-notifications .automation-group-body textarea { min-height: 66px; padding: 8px 10px; }
#view-notifications .review-settings-section > small { line-height: 1.35; }
#view-notifications .review-test-panel { grid-template-columns: minmax(220px, 1fr) auto; grid-template-areas: "title title" "phone action" "hint hint" "extra extra" "status status"; gap: 7px 10px; align-items: end; padding: 10px 12px; }
#view-notifications .review-test-panel > div { grid-area: title; gap: 1px; }
#view-notifications .review-test-panel > label:not(.toggle-line) { grid-area: phone; }
#view-notifications .review-test-panel > button { grid-area: action; white-space: nowrap; }
#view-notifications .review-test-panel > small { grid-area: hint; margin: 0; font-size: 13px; line-height: 1.3; }
#view-notifications .review-test-panel > .toggle-line { grid-area: extra; min-height: 30px; margin: 0; padding: 2px 0; }
#view-notifications .review-test-panel > .upload-status { grid-area: status; }
#view-notifications .automation-save-row { padding: 9px 13px; }
#view-notifications .automation-save-row strong { font-size: 14px; }
#view-notifications .automation-save-row small { font-size: 12px; }

@media (max-width: 760px) {
  #view-notifications .automation-group > summary { min-height: 66px; }
  #view-notifications .automation-group-body { width: 100%; padding-right: 12px; padding-left: 12px; }
  #view-notifications .scenario-setting-row { grid-template-columns: 1fr; gap: 5px; padding: 10px 0; }
  #view-notifications .scenario-compact-control { max-width: none; }
  #view-notifications .scenario-fields-grid,
  #view-notifications .feedback-flow { grid-template-columns: 1fr; }
  #view-notifications .review-test-panel { grid-template-columns: 1fr; grid-template-areas: "title" "phone" "action" "hint" "extra" "status"; }
  #view-notifications .review-test-panel > button { width: 100%; }
}

/* Integration health and focused settings workspace. */
.integration-catalog-actions { display: flex; align-items: center; gap: 12px; }
.integration-state {
  min-width: 118px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #667085;
  background: #f2f4f7;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}
.integration-state.connected { color: #176548; background: #e2f4eb; }
.integration-state.problem { color: #9a3e32; background: #fbeae8; }
.integration-state.verification { color: #725b24; background: #f7f1df; }
.integration-advanced-settings {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8faf9;
}
.integration-advanced-settings > summary {
  padding: 11px 13px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.integration-advanced-settings > div { display: grid; gap: 11px; padding: 2px 13px 13px; }
.settings-workspace {
  max-width: 1040px;
  margin: 0 auto;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.settings-tabs {
  display: flex;
  gap: 4px;
  margin: 12px 0 18px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f4f7f5;
}
.settings-tabs > button {
  min-height: 40px;
  flex: 1 0 max-content;
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 500;
}
.settings-tabs > button.is-active { color: #245f4d; background: white; box-shadow: var(--shadow-sm); }
.settings-tab-panel { min-height: 0; }
.settings-card-header { display: grid; min-width: 0; align-content: start; gap: 0; }
.settings-card-header > .eyebrow { margin: 0 0 11px; }
.settings-card-header > h2 { margin: 0 !important; }
.settings-card-header > p:not(.eyebrow) { margin: 6px 0 0 !important; color: var(--muted); line-height: 1.45; }
.settings-vertical-card { gap: 0 !important; padding: 28px !important; }
.settings-vertical-card > .settings-card-header { margin-bottom: 16px; }
.settings-route-card {
  display: flex;
  min-height: 170px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.settings-route-card h2 { margin: 4px 0 7px; font-size: 22px; }
.settings-route-card p:not(.eyebrow) { max-width: 620px; margin: 0; color: var(--muted); }
.settings-route-card > .action-link { align-self: center; }
#settings-user-email { color: var(--muted); }

@media (max-width: 760px) {
  .integration-catalog-actions { grid-column: 1 / -1; justify-content: space-between; }
  .integration-state { min-width: 108px; }
  .settings-route-card { align-items: stretch; flex-direction: column; }
}

/* Wide BirSuol client profile with one scroll surface and task tabs. */
#client-dialog.client-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow-y: auto;
  border: 0;
  border-radius: 16px;
  background: white;
  box-shadow: 0 28px 90px rgba(16, 24, 40, .3);
}
#client-dialog::backdrop { background: rgba(16, 24, 40, .62); backdrop-filter: blur(2px); }
.client-profile { min-height: 500px; }
.client-profile-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto) auto;
  align-items: center;
  gap: 24px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid var(--line);
}
#client-dialog h2,
#client-dialog h3,
#client-dialog .client-profile-next strong,
#client-dialog .client-tab-empty strong {
  font-family: "BirSuol", "Open Sans", "Segoe UI", Arial, sans-serif;
}
.client-profile-identity h2 { margin: 3px 0 7px; font-size: 25px; font-weight: 650; }
.client-profile-identity > div { display: flex; flex-wrap: wrap; gap: 7px 16px; align-items: center; }
.client-profile-identity a { color: #245f4d; font-weight: 500; text-decoration: none; }
.client-profile-identity #client-header-email { color: var(--muted); }
.client-uds-status { padding: 4px 8px; border-radius: 999px; color: var(--muted); background: #f2f4f7; font-size: 12px; font-weight: 500; }
.client-uds-status.connected { color: #176548; background: #e2f4eb; }
.client-profile-next { display: grid; min-width: 210px; gap: 2px; padding: 10px 12px; border-left: 3px solid #39745f; border-radius: 0 9px 9px 0; background: #f3f8f5; }
.client-profile-next small { color: #527067; font-size: 11px; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; }
.client-profile-next strong { font-size: 17px; font-weight: 750; }
.client-profile-actions { display: flex; align-items: center; gap: 9px; }
.client-profile-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 22px 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.client-profile-tabs button { min-height: 42px; padding: 8px 13px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-weight: 500; white-space: nowrap; }
.client-profile-tabs button.is-active { color: #245f4d; border-bottom-color: #39745f; }
.client-profile-tabs button span { margin-left: 4px; padding: 2px 6px; border-radius: 999px; background: #f2f4f7; font-size: 11px; }
.client-profile-content { padding: 14px 22px 18px; }
.client-overview-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.client-overview-metrics > div { min-height: 58px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfb; }
.client-overview-metrics small, .client-uds-metrics small { display: block; color: var(--muted); font-size: 11px; }
.client-overview-metrics strong, .client-uds-metrics strong { display: block; margin-top: 3px; font-size: 16px; }
.client-uds-details { display: block; }
.client-uds-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--line); }
.client-uds-metrics > div { min-height: 56px; padding: 8px 11px; background: #fbfcfb; }
.client-uds-updated { margin: 7px 2px 0; color: var(--muted); font-size: 11px; }
#client-dialog .client-history { display: grid; max-height: none; gap: 2px; overflow: visible; }
#client-dialog .client-visit {
  grid-template-columns: 100px minmax(0, 1fr) auto;
  min-height: 54px;
  gap: 12px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid #eef1ef;
  border-radius: 0;
  background: white;
  box-shadow: none;
  opacity: 1;
  transform: none;
}
#client-dialog .client-visit:hover { border-color: #eef1ef; background: var(--interactive-hover-bg); box-shadow: none; transform: none; }
#client-dialog .client-visit.attended,
#client-dialog .client-visit.no-show,
#client-dialog .client-visit.cancelled { border-color: #eef1ef; background: white; opacity: 1; }
#client-dialog .client-visit > span { gap: 1px; }
#client-dialog .client-visit strong { font-size: 14px; }
#client-dialog .client-visit small { font-size: 12px; }
.client-visit-date strong { font-weight: 550; }
.client-visit-service strong { font-weight: 750; }
.client-tab-empty { display: grid; min-height: 180px; place-content: center; gap: 5px; padding: 24px; color: var(--muted); text-align: center; }
.client-tab-empty strong { color: var(--ink); font-size: 17px; }

@media (max-width: 760px) {
  #client-dialog.client-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .client-profile-header { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 15px 14px 13px; }
  .client-profile-next { grid-column: 1 / -1; grid-row: 2; }
  .client-profile-actions .primary { font-size: 0; }
  .client-profile-actions .primary::before { content: "+ Запись"; font-size: 14px; }
  .client-profile-tabs { padding-right: 14px; padding-left: 14px; }
  .client-profile-content { padding: 14px; }
  .client-overview-metrics, .client-uds-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #client-dialog .client-visit { grid-template-columns: 74px minmax(0, 1fr) auto; }
}

@media (max-width: 420px) {
  .client-profile-header { grid-template-columns: minmax(0, 1fr); }
  .client-profile-identity > div { min-width: 0; overflow-wrap: anywhere; }
  .client-profile-identity :is(a, #client-header-email) { min-width: 0; overflow-wrap: anywhere; }
  .client-profile-next { min-width: 0; overflow-wrap: anywhere; }
  .client-profile-actions { width: 100%; flex-wrap: wrap; }
  .client-profile-actions > button { flex: 1 1 130px; min-width: 0; }
  #client-dialog .client-visit { grid-template-columns: 62px minmax(0, 1fr); gap: 8px; }
  #client-dialog .client-visit > :last-child { grid-column: 1 / -1; }
}

/* State-first service and specialist lists. */
.specialist-manager { max-width: 1040px; margin: 0 auto; }
.panel.resource-manager { min-height: 0; padding: 18px; }
.panel-heading.resource-manager-heading { align-items: flex-start; margin-bottom: 10px; }
.resource-editor .resource-modal { gap: 0; }
#view-services .services-panel { max-width: 1040px; min-height: 0; margin: 0 auto; padding: 18px; }
#view-services .service-heading { align-items: flex-start; margin-bottom: 10px; }
#view-services .service-heading h2 { margin-top: 3px; }
#view-services .service-heading p:not(.eyebrow) { margin-top: 5px; font-size: 14px; line-height: 1.4; }
.service-quick-filters { display: flex; gap: 6px; margin: 12px 0 16px; overflow-x: auto; }
.service-quick-filters button { min-height: 36px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: white; font-size: 13px; font-weight: 500; white-space: nowrap; }
.service-quick-filters button.is-active { color: #245f4d; border-color: #a9cabe; background: var(--interactive-selected-bg); }
.service-quick-filters button.is-active:hover { background: var(--interactive-selected-hover-bg); }
#view-services .service-list { display: grid; gap: 2px; }
#view-services .service-card { display: block; min-height: 38px; height: auto; border-radius: 9px; }
#view-services .service-card:has(> .service-card-open) { transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease; }
#view-services .service-card:has(> .service-card-open:hover),
#view-services .service-card:has(> .service-card-open:focus-visible) { z-index: 1; background: var(--interactive-hover-bg); box-shadow: 0 3px 10px rgba(16,24,40,.06), inset 0 0 0 1px rgba(92,169,139,.24); transform: none; }
@media (prefers-reduced-motion: reduce) { #view-services .service-card:has(> .service-card-open), .resource-manager .resource-row { transition: none; transform: none; } }
#view-services .service-card-open { grid-template-columns: minmax(0,1fr) minmax(100px,auto) 92px; width: 100%; min-height: 36px; padding: 3px 9px; }
#view-services .service-row-name { font-weight: 550; white-space: normal; overflow-wrap: anywhere; }
#view-services .service-row-price strong { font-weight: 600; }
#view-services .service-row-statuses .status { min-width: 72px; padding: 1px 7px; font-size: 12px; line-height: 18px; text-align: center; }
@media (max-width: 780px) {
  #view-services .service-card { min-height: 44px; }
  #view-services .service-card-open { min-height: 42px; }
}

/* Final dashboard density: status first, working area visually dominant. */
#view-dashboard .welcome-card { gap: 22px; padding: 26px 28px; border-radius: 15px; }
#view-dashboard .welcome-card h2 { margin: 5px 0 6px; font-size: 26px; line-height: 1.25; }
#view-dashboard .welcome-card p:not(.eyebrow) { line-height: 1.45; }
#view-dashboard .welcome-card .primary { min-height: 40px; padding: 9px 13px; white-space: nowrap; }
#view-dashboard .operational-panel { margin-top: 18px; padding: 18px; }
#view-dashboard .operational-panel .panel-heading { margin-bottom: 14px; }
#view-dashboard .operational-panel .panel-heading p:not(.eyebrow) { margin-top: 5px; font-size: 14px; }
#view-dashboard .operational-stats { gap: 10px; }
#view-dashboard .operational-stats .stat-card { min-height: 0; padding: 17px 18px; border-radius: 12px; }
#view-dashboard .operational-stats .stat-card strong { margin: 5px 0 2px; font-size: 30px; }
#view-dashboard .operational-stats .stat-card em { margin-top: 8px; }
#view-dashboard .attention-card.has-items { border-color: #d49a89; background: #fff8f6; box-shadow: 0 3px 12px rgba(167,66,55,.055); }
#view-dashboard .dashboard-setup-status { gap: 8px; margin-top: 13px; padding: 11px 14px; border-color: #d7e5df; background: #fcfefd; }
#view-dashboard .dashboard-setup-status.has-issues { border-color: #e8dfca; background: #fdfcf9; }
#view-dashboard .dashboard-setup-content { gap: 4px; }
#view-dashboard .dashboard-setup-issue { min-height: 34px; padding: 4px 8px; border-color: #e8dfca; color: #5f5540; background: #fdfbf6; }
#view-dashboard .dashboard-setup-issue > span { color: #756849; background: #f1ead9; }
#view-dashboard .dashboard-setup-issue b { color: #6b6047; }
#view-dashboard .dashboard-setup-issue:hover, #view-dashboard .dashboard-setup-issue:focus-visible { border-color: #d9cba9; box-shadow: 0 2px 8px rgba(89,72,31,.045); }

/* Expandable workspace navigation. */
.app-shell { transition: grid-template-columns .18s ease; }
.sidebar { transition: width .18s ease, padding .18s ease, left .22s ease; }
.sidebar-brand-row { display: grid; align-items: center; gap: 6px; }
.sidebar-brand-row .brand { height: 66px; min-height: 66px; min-width: 0; padding: 0 4px 22px; }
.sidebar-brand-row .brand-mark { width: 44px; height: 44px; border-radius: 12px; font-size: 17px; }
.sidebar-brand-row .brand-mark img { border-radius: 10px; }
.sidebar-collapse { position: fixed; z-index: 70; top: 72px; left: calc(var(--sidebar-width) - 15px); display: inline-grid; width: 30px; height: 30px; min-height: 30px; padding: 0; place-items: center; border: 1px solid #cfd9d4; border-radius: 9px; color: #667085; background: #fff; box-shadow: 0 3px 10px rgba(31,45,39,.08); line-height: 1; transition: left .18s ease, color .15s ease, border-color .15s ease, background .15s ease; }
.sidebar-collapse-icon { display: grid; width: 19px; height: 19px; place-items: center; }
.sidebar-collapse-icon svg { display: block; width: 19px; height: 19px; overflow: visible; }
.sidebar-collapse-arrow { transform-box: fill-box; transform-origin: center; transition: transform .18s ease; }
.sidebar-collapsed .sidebar-collapse-arrow { transform: rotate(180deg); }
.sidebar-collapse:hover { color: #245f4d; border-color: #b9d4ca; background: #f1f7f4; }
.sidebar-collapse:focus-visible { outline: 2px solid rgba(47,125,93,.28); outline-offset: 2px; border-color: #2f7d5d; }
.sidebar .nav-icon { display: inline-grid; flex: 0 0 20px; width: 20px; height: 20px; place-items: center; line-height: 1; }
.sidebar .nav-icon svg { display: block; width: 20px; height: 20px; stroke-width: 1.9; vector-effect: non-scaling-stroke; }
.sidebar .main-nav-group > summary { gap: 10px; align-items: center; }
.sidebar .main-nav-group > summary > .nav-icon { flex-basis: 24px; width: 24px; height: 24px; font-size: 21px; }
.sidebar .main-nav-group > summary > .nav-icon svg { width: 22px; height: 22px; }
.sidebar .nav-item { gap: 10px; align-items: center; }
.sidebar .main-nav-group > .nav-group-items > .nav-item.active { color: #245f4d; background: #f3f8f5; font-weight: 600; }
.sidebar-footer .text-button { display: flex; align-items: center; gap: 8px; }
.sidebar-footer .text-button > span:first-child { font-size: 18px; }
.sidebar .user-card .avatar { color: #174f3e; border: 1px solid #9fcab5; background: #c5e5d4; }
.sidebar .user-card small { color: #596579; }
.sidebar-footer .text-button { color: #205f4b; }
.sidebar-footer .text-button:hover { color: #a13f3a; background: #fbeceb; }
.app-shell.sidebar-collapsed { grid-template-columns: 76px minmax(0,1fr); }
.sidebar-collapsed .sidebar { padding: 14px 9px 12px; overflow: visible; }
.sidebar-collapsed .sidebar-brand-row { grid-template-columns: 1fr; justify-items: center; gap: 5px; }
.sidebar-collapsed .sidebar-brand-row .brand { justify-content: flex-start; }
.sidebar-collapsed .sidebar-brand-row .brand-name { display: none; }
.sidebar-collapsed .sidebar-collapse { left: 61px; }
.sidebar-collapsed .nav { gap: 5px; overflow: visible; }
.sidebar-collapsed .main-nav-group { position: relative; margin: 0; padding: 0; overflow: visible; }
.sidebar-collapsed .main-nav-group > summary { display: flex; justify-content: center; width: 48px; min-height: 48px; margin: 0 auto; padding: 9px; border-radius: 10px; font-size: 0; }
.sidebar-collapsed .main-nav-group > summary .nav-icon { flex-basis: 28px; width: 28px; height: 28px; font-size: 22px; }
.sidebar-collapsed .main-nav-group > summary .nav-icon svg { width: 24px; height: 24px; }
.sidebar-collapsed .main-nav-group > summary b { display: none; }
.sidebar-collapsed .main-nav-group:has(.nav-item.active) > summary { color: #245f4d; background: #edf6f1; }
.sidebar-collapsed .main-nav-group[open] > summary { color: #245f4d; background: #e7f3ed; }
.sidebar-collapsed .main-nav-group > .nav-group-items { position: absolute; z-index: 60; top: 0; left: calc(100% + 10px); width: 238px; max-height: min(520px,calc(100vh - 28px)); gap: 2px; overflow-y: auto; padding: 9px; border: 1px solid #dfe7e3; border-radius: 12px; background: #fff; box-shadow: 0 16px 42px rgba(16,24,40,.14); }
.sidebar-collapsed .main-nav-group:nth-last-child(-n+2) > .nav-group-items { top: auto; bottom: 0; }
.sidebar-collapsed .main-nav-group > .nav-group-items > .nav-item { justify-content: flex-start; min-height: 40px; padding: 8px 10px; font-size: 14px; }
.sidebar-collapsed .main-nav-group > .nav-group-items .nav-icon { flex-basis: 20px; width: 20px; height: 20px; }
.sidebar-collapsed .main-nav-group > .nav-group-items .nav-icon svg { width: 20px; height: 20px; }
.sidebar-collapsed .main-nav-group .optional-navigation { margin: 2px 0 0; }
.sidebar-collapsed .main-nav-group .optional-navigation > summary { display: flex; min-height: 38px; padding: 7px 10px; font-size: 14px; }
.sidebar-collapsed .main-nav-group .optional-navigation .nav-group-items { padding: 3px 0 3px 12px; }
.sidebar-collapsed .main-nav-group .optional-navigation .nav-item { justify-content: flex-start; font-size: 13.5px; }
.sidebar-collapsed .sidebar-footer { display: grid; justify-items: center; padding-top: 10px; }
.sidebar-collapsed .user-card { justify-content: center; padding: 6px; }
.sidebar-collapsed .user-card > span:last-child,
.sidebar-collapsed .sidebar-label { display: none; }
.sidebar-collapsed .text-button { justify-content: center; width: 40px; padding: 8px; font-size: 0; }

/* Inter typography pilot: specialists screen and its editor only. */
body[data-active-view="specialists"] #view-specialists,
body[data-active-view="specialists"] #specialist-editor-panel { font-family: Inter, system-ui, sans-serif; font-size: 15px; font-weight: 400; line-height: 1.45; }
body[data-active-view="specialists"] .topbar h1 { font-family: Inter, system-ui, sans-serif; font-size: 28px; font-weight: 625; line-height: 1.2; }
body[data-active-view="specialists"] #view-specialists .resource-manager-heading h2 { font-family: Inter, system-ui, sans-serif; font-size: 20px; font-weight: 600; line-height: 1.2; letter-spacing: -.015em; }
body[data-active-view="specialists"] #view-specialists .resource-manager-heading p:not(.eyebrow) { font-size: 14px; font-weight: 400; line-height: 1.45; }
body[data-active-view="specialists"] #view-specialists .eyebrow { font-size: 12px; font-weight: 500; }
body[data-active-view="specialists"] #view-specialists .resource-heading-actions .badge,
body[data-active-view="specialists"] #view-specialists .resource-heading-actions .primary { font-weight: 500; }
body[data-active-view="specialists"] #view-specialists .resource-row strong { font-size: 15px; font-weight: 500; line-height: 1.4; }
body[data-active-view="specialists"] #view-specialists .resource-row small { font-size: 13px; font-weight: 400; line-height: 1.4; }
body[data-active-view="specialists"] #view-specialists .resource-row .status { font-weight: 500; }
body[data-active-view="specialists"] #specialist-editor-panel .resource-modal-heading h2 { font-family: Inter, system-ui, sans-serif; font-size: 20px; font-weight: 600; line-height: 1.2; }
body[data-active-view="specialists"] #specialist-editor-panel .resource-modal-heading small,
body[data-active-view="specialists"] #specialist-editor-panel .resource-status-toggle small { font-size: 13px; font-weight: 400; line-height: 1.4; }
body[data-active-view="specialists"] #specialist-editor-panel label { font-size: 14px; font-weight: 400; line-height: 1.4; }
body[data-active-view="specialists"] #specialist-editor-panel input,
body[data-active-view="specialists"] #specialist-editor-panel textarea { font-size: 14px; font-weight: 400; }
body[data-active-view="specialists"] #specialist-editor-panel .resource-status-toggle strong,
body[data-active-view="specialists"] #specialist-editor-panel .resource-modal-links a,
body[data-active-view="specialists"] #specialist-editor-panel .resource-modal-links button,
body[data-active-view="specialists"] #specialist-editor-panel .resource-modal-footer button { font-weight: 500; }
.integration-placeholder { margin-top: 14px; padding: 18px; border: 0; background: #f7f9f8; box-shadow: none; }
.integration-placeholder h2 { margin: 0 0 6px; font-family: "BirSuol", "Open Sans", "Segoe UI", Arial, sans-serif; font-size: 19px; }
.integration-placeholder p { color: var(--muted); }

/* BirSuol typography foundation. Inter is intentionally first; the local font asset must be bundled before release. */
body { font-family: Inter, system-ui, sans-serif; font-size: 15px; font-weight: 400; line-height: 1.45; }
strong, b { font-weight: 600; }
button, .nav-item, .main-nav-group > summary, .tab, [role="tab"] { font-weight: 500; }
.topbar h1 { font-family: Inter, system-ui, sans-serif; font-size: 28px; font-weight: 625; line-height: 1.2; letter-spacing: -.025em; }
.panel-heading h2, .form-card h2, .dialog-heading h2, .resource-modal-heading h2,
.settings-help h2, .optional-panel h2, .integration-catalog-copy strong,
.integration-placeholder h2 { font-family: Inter, system-ui, sans-serif; font-weight: 600; line-height: 1.2; letter-spacing: -.015em; }
.panel-heading h2, .form-card h2, .settings-help h2 { font-size: 20px; }
.dialog-heading h2, .resource-modal-heading h2 { font-size: 20px; }
label, .field-hint, small, .muted, .secondary-text { font-weight: 400; }
.contact-field-error { display: block; margin-top: 5px; color: var(--danger); font-size: 12px; line-height: 1.3; }
.contact-field-error[hidden] { display: none; }
input.field-invalid { border-color: #bd756f; }
.field-hint, .secondary-text { font-size: 13px; line-height: 1.4; }
.status, .badge, .integration-state { font-weight: 500; }
.eyebrow { font-weight: 600; }
.settings-link { font-weight: 500; }
#view-settings .settings-help { padding: 18px; }
#view-settings .settings-help h2 { margin: 4px 0 8px; }
#view-settings .settings-help .settings-card-header h2 { margin: 0; }
#settings-panel-company { align-items: start; }
#settings-panel-company > .company-logo-card,
#settings-panel-company > .company-brand-card { align-self: start; width: 100%; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.company-logo-card { gap: 0; }
.company-logo-card h2 { margin-top: 0; }
.company-logo-card > .settings-card-header { margin-bottom: 18px; }
.company-logo-card .logo-preview { margin: 0; }
.company-logo-actions { flex-wrap: wrap; gap: 8px; }
.company-logo-card .logo-preview ~ .company-logo-actions { margin-top: 32px; padding-top: 0; }
.company-logo-actions button { min-height: 38px; padding: 8px 12px; font-size: 14px; }
.company-logo-actions .danger-secondary { border-color: #e2c3c0; color: #a94742; background: #fffafa; }
.company-logo-hint { margin: 11px 0 0; font-size: 12px; line-height: 1.4; }
.company-logo-card .upload-status { min-height: 0; }
.company-logo-card .upload-status[hidden] { display: none; }
#settings-panel-company .company-brand-card { display: grid; gap: 0; padding: 28px !important; }
#settings-panel-company .company-brand-card .action-link { width: max-content; max-width: 100%; margin-top: 0; }
.product-discount-settings.settings-vertical-card { padding-bottom: 24px !important; }
.product-discount-settings > .form-actions { margin-top: 18px; }
.settings-workspace:has(#settings-panel-booking:not([hidden])) { max-width: 1160px; }
.booking-settings-tabs { display: flex; width: max-content; max-width: 100%; gap: 4px; margin-bottom: 7px; padding: 3px; overflow-x: auto; border-radius: 10px; background: #edf4f0; }
.booking-settings-tabs button { min-height: 32px; padding: 5px 10px; border: 0; border-radius: 7px; color: #52645d; background: transparent; font-size: 13px; font-weight: 450; white-space: nowrap; }
.booking-settings-tabs button:hover { color: #245f4d; background: #e2efe9; }
.booking-settings-tabs button.is-active { color: #174f3b; background: #fff; box-shadow: var(--shadow-sm); font-weight: 600; }
.booking-publish-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 28px; }
.booking-publish-card h2, .booking-publish-card p { margin: 0; }
.booking-publish-card h2 { margin: 3px 0 5px; }
.booking-publish-card .action-link { flex: 0 0 auto; align-self: center; }
.online-booking-settings-form { display: block; margin-top: 0; }
.booking-settings-column { display: contents; }
.booking-settings-section { align-self: start; padding: 9px 13px; box-shadow: none; }
.booking-settings-heading { margin-bottom: 2px; }
.booking-settings-heading h3 { margin: 0 0 2px; font-size: 16px; font-weight: 600; line-height: 1.25; }
.booking-settings-heading p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.booking-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; min-height: 38px; margin: 0; padding: 3px 0; border-top: 1px solid var(--line); }
.booking-setting-row:has(small) { min-height: 48px; }
.booking-setting-row > span:first-child { display: grid; flex: 1 1 62%; gap: 1px; min-width: 0; }
.booking-setting-row strong { font-size: 14px; font-weight: 450; }
.booking-setting-row small, .setting-fixed-value { color: var(--muted); font-size: 12.5px; font-weight: 400; line-height: 1.3; }
.booking-prepayment-row > span:first-child { gap: 4px; }
.booking-prepayment-row input, .booking-setting-row select { width: min(210px,38%); min-width: 160px; min-height: 35px; padding: 6px 9px; border: 1px solid #cfd9d4; border-radius: 9px; color: var(--ink); background: #fff; font-family: var(--font-ui); font-size: 13.5px; font-weight: 400; line-height: 1.25; }
.booking-confirmation-control { position: relative; width: 300px; max-width: 100%; min-width: 300px; flex: 0 1 300px; }
.booking-confirmation-native { position: absolute; width: 1px !important; height: 1px; min-width: 0 !important; min-height: 0 !important; overflow: hidden; padding: 0 !important; border: 0; clip-path: inset(50%); }
.booking-confirmation-trigger { display: flex; width: 100%; min-height: 38px; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 30px 7px 10px; border: 1px solid #cfd9d4; border-radius: 9px; color: var(--ink); background: #fff; font-size: 13px; font-weight: 400; line-height: 1.25; text-align: left; white-space: nowrap; }
.booking-confirmation-trigger::after { content: "⌄"; position: absolute; right: 10px; color: var(--muted); }
.booking-confirmation-trigger:focus-visible { border-color: #5ca98b; outline: 2px solid rgba(92,169,139,.25); outline-offset: 1px; }
.booking-confirmation-menu { position: absolute; z-index: 15; top: calc(100% + 4px); right: 0; width: 100%; min-width: 0; overflow: hidden; border: 1px solid #cfd9d4; border-radius: 9px; background: #fff; box-shadow: 0 8px 20px rgba(30,55,46,.12); }
.booking-confirmation-menu[hidden] { display: none; }
.booking-confirmation-menu button { display: block; width: 100%; min-height: 38px; padding: 8px 10px; border: 0; border-radius: 0; color: var(--ink); background: #fff; font-size: 13px; font-weight: 400; line-height: 1.3; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.booking-confirmation-menu button:hover { color: #245f4d; background: var(--interactive-hover-bg); }
.booking-confirmation-menu button[aria-selected="true"] { color: #245f4d; background: var(--interactive-selected-bg); }
.booking-confirmation-menu button[aria-selected="true"]:hover { background: var(--interactive-selected-hover-bg); }
.booking-setting-row input[role="switch"] { position: relative; appearance: none; width: 36px; height: 20px; min-width: 36px; min-height: 20px; flex: 0 0 36px; margin: 0; padding: 0; border: 1px solid #b9c8c2; border-radius: 999px; outline: 0; background: #dce4e1; box-shadow: none; cursor: pointer; transition: border-color .14s ease, background .14s ease; }
.booking-setting-row input[role="switch"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.22); transition: transform .14s ease; }
.booking-setting-row input[role="switch"]:checked { border-color: #5ca98b; background: #5ca98b; }
.booking-setting-row input[role="switch"]:checked::after { transform: translateX(16px); }
.booking-setting-row input[role="switch"]:focus-visible { border-color: #3f876d; outline: 2px solid rgba(92,169,139,.32); outline-offset: 2px; box-shadow: none; }
.switch-label { display: flex !important; flex: 0 0 auto; align-items: center; grid-auto-flow: column; gap: 8px !important; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.online-booking-settings-footer { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 18px; }
#online-booking-settings-status { color: var(--green-dark); font-size: 13px; }
.schedule-time-settings-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.schedule-time-settings-row label { width: 132px; margin: 0; }
.schedule-time-settings-row .birsuol-time-picker { width: 100%; min-width: 0; }
.schedule-time-settings-row .primary { min-height: 38px; }
@media (max-width: 520px) { .schedule-time-settings-row { align-items: stretch; flex-direction: column; } .schedule-time-settings-row label, .schedule-time-settings-row .primary { width: 100%; } }
@media (max-width: 520px) {
  .company-logo-actions { align-items: stretch; flex-direction: column; }
  .company-logo-actions button { width: 100%; }
  #settings-panel-company > * { min-width: 0; }
  .booking-publish-card { align-items: flex-start; flex-direction: column; }
  .booking-setting-row { align-items: stretch; flex-direction: column; gap: 8px; }
  .booking-prepayment-row input, .booking-setting-row select { width: 100%; min-width: 0; }
  .booking-confirmation-control { width: 100%; min-width: 0; flex-basis: auto; }
  .switch-label { justify-content: space-between; white-space: normal; }
  .online-booking-settings-footer { align-items: stretch; flex-direction: column-reverse; }
  .online-booking-settings-footer button { width: 100%; }
}
.integration-catalog { gap: 8px; }
.integration-catalog-row { grid-template-columns: 38px minmax(0,1fr) auto; gap: 11px; padding: 10px 14px; }
.integration-catalog-icon { width: 38px; height: 38px; border-radius: 9px; font-family: inherit; font-size: 17px; font-weight: 600; }
.integration-catalog-icon img { display: block; width: 29px; height: 29px; object-fit: contain; }
.integration-catalog-icon.uds-logo img { width: 32px; height: 24px; }
.integration-catalog-copy strong { margin: 1px 0 2px; font-size: 17px; }
.integration-catalog-copy > span { font-size: 14px; }
.integration-help-toggle { padding: 7px 10px; font-weight: 500; }
.integration-item-body { padding: 0 16px 16px; }
.integration-expanded-grid { padding-top: 16px; }
.channels-panel { max-width: 940px; margin: 0 auto; }
.channel-provider-card { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 13px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.channel-provider-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 11px; color: #245f4d; background: #edf7f2; font-size: 18px; font-weight: 600; }
.channel-provider-copy strong, .channel-provider-copy span, .channel-provider-copy small { display: block; }
.channel-provider-copy strong { font-weight: 600; }
.channel-provider-copy span { margin-top: 2px; color: var(--muted); font-size: 14px; }
.channel-provider-copy small { margin-top: 5px; color: #39745f; font-size: 13px; }
.channel-provider-actions { display: flex; align-items: center; gap: 10px; }
.channel-provider-note { margin: 12px 2px 0; color: var(--muted); font-size: 13px; }
.specialist-photo-field { display: grid; gap: 7px; }
.field-label { color: var(--green-800); font-size: 13px; font-weight: 500; }
.specialist-photo-control { display: flex; align-items: center; gap: 14px; }
.specialist-photo-preview { display: grid; width: 72px; height: 72px; flex: 0 0 72px; overflow: hidden; place-items: center; border: 1px solid var(--line); border-radius: 14px; color: #39745f; background: #edf7f2; font-size: 24px; font-weight: 600; }
.specialist-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.specialist-photo-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.specialist-photo-actions small { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.specialist-photo-actions small.error { color: var(--danger); }
.specialist-photo-crop-dialog, .specialist-child-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: hidden; border: 0; border-radius: 18px; box-shadow: 0 24px 70px rgba(24, 49, 40, .18); }
.specialist-photo-crop-dialog::backdrop, .specialist-child-dialog::backdrop { background: rgba(25, 42, 36, .32); }
.specialist-photo-crop-shell, .specialist-child-shell { display: grid; max-height: calc(100vh - 32px); grid-template-rows: auto minmax(0, 1fr) auto; background: #fff; }
.specialist-photo-crop-shell > header, .specialist-child-shell > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.specialist-photo-crop-shell h2, .specialist-child-shell h2 { margin: 2px 0 0; font-size: 20px; }
.specialist-photo-crop-stage { position: relative; width: 280px; height: 280px; margin: 20px auto 14px; overflow: hidden; border-radius: 14px; background: #edf2ef; box-shadow: inset 0 0 0 1px var(--line); }
.specialist-photo-crop-stage img { position: absolute; max-width: none; object-fit: contain; user-select: none; }
.specialist-photo-crop-controls { display: grid; gap: 9px; padding: 0 22px 18px; }
.specialist-photo-crop-controls label { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 12px; font-size: 13px; }
.specialist-photo-crop-controls input { width: 100%; accent-color: #5ca98b; }
.specialist-service-picker { display: grid; gap: 8px; padding: 14px 18px; overflow-y: auto; }
.specialist-service-option { display: grid; grid-template-columns: 20px 1fr; align-items: start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.specialist-service-option:hover { border-color: #a9cbbf; background: #f7fbf9; }
.specialist-service-option input { width: 18px; height: 18px; margin-top: 2px; accent-color: #5ca98b; }
.specialist-service-option span { display: grid; gap: 2px; }
.specialist-service-option strong { font-size: 14px; font-weight: 500; }
.specialist-service-option small { color: var(--muted); font-size: 12px; }
.specialist-child-shell > .upload-status { margin: 0; padding: 0 22px 10px; }
.resource-modal-links button { width: 100%; border-right: 0; border-left: 0; background: none; text-align: left; cursor: pointer; }
.resource-modal-links button small { margin-left: auto; color: var(--muted); font-size: 12px; }
.specialist-photo-remove { width: auto; padding: 7px 4px; color: var(--danger); font-size: 13px; }
.automation-capability-note { display: block; padding: 9px 10px; border-radius: 8px; color: var(--muted); background: #f7f9f8; font-size: 13px; line-height: 1.4; }
.notification-toolbar { grid-template-columns: repeat(4, minmax(145px,1fr)); }
.notification-toolbar > button { align-self: end; }
.notification-custom-period { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2,minmax(150px,190px)); gap: 6px 10px; align-items: end; justify-content: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.notification-custom-period[hidden] { display: none; }
.notification-custom-period label { display: grid; gap: 4px; margin: 0; }
.notification-custom-period input { width: 100%; min-height: 40px; }
.notification-custom-period .field-error { grid-column: 1 / -1; margin: 0; color: var(--danger); font-size: 12px; }
.notification-card { padding: 0; overflow: hidden; }
.notification-card > summary { display: grid; grid-template-columns: 145px minmax(180px,1.2fr) minmax(170px,1fr) 150px 120px; align-items: center; gap: 12px; min-height: 48px; padding: 9px 12px; cursor: pointer; list-style: none; }
.notification-card > summary::-webkit-details-marker { display: none; }
.notification-card > summary time, .notification-card > summary span { color: var(--muted); font-size: 13px; }
#notification-panel-journal .notification-card:not([open]) > summary:hover { background: var(--interactive-hover-bg); }
#notification-panel-journal .notification-card[open],
#notification-panel-journal .notification-card[open]:hover { border-color: #b9d4ca; background: #e4f1ea; }
#notification-panel-journal .notification-card > summary time,
#notification-panel-journal .notification-card > summary span:not(.status),
#notification-panel-journal .notification-card-details dt,
#notification-panel-journal .notification-card-footer > small { color: #596777; }
.notification-card-details { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.notification-card-details dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 18px; margin: 14px 0; }
.notification-card-details dl div { display: grid; grid-template-columns: 140px minmax(0,1fr); gap: 8px; }
.notification-card-details dt { color: var(--muted); font-size: 13px; }
.notification-card-details dd { margin: 0; overflow-wrap: anywhere; font-size: 13px; }
.notification-message > strong { display: block; margin-top: 12px; font-size: 13px; font-weight: 600; }
.notification-message > p { margin: 6px 0 12px; }
.notification-error { display: grid; gap: 2px; margin: 10px 0; padding: 9px 11px; border-radius: 8px; color: var(--danger); background: #fff4f2; font-size: 13px; }
.notification-empty-state { justify-items: start; gap: 10px; }
.notification-empty-state button { width: auto; }
@media (max-width: 980px) {
  .notification-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .notification-card > summary { grid-template-columns: 130px minmax(160px,1.2fr) minmax(140px,1fr) 120px; }
  .notification-card > summary > span:nth-of-type(2) { display: none; }
}
@media (max-width: 680px) {
  .channel-provider-card { grid-template-columns: 38px minmax(0,1fr); }
  .channel-provider-actions { grid-column: 1 / -1; justify-content: space-between; }
  .notification-toolbar { grid-template-columns: 1fr; }
  .notification-custom-period { grid-template-columns: 1fr; }
  .notification-custom-period .field-error { grid-column: auto; }
  .notification-card > summary { grid-template-columns: minmax(0,1fr) auto; }
  .notification-card > summary time, .notification-card > summary > span:not(.status) { display: none; }
  .notification-card-details dl { grid-template-columns: 1fr; }
}

/* Compact popovers remain anchored menus, never a second sidebar. */
.sidebar-collapsed .main-nav-group > .nav-group-items {
  left: calc(100% + 7px);
  width: max-content;
  min-width: 164px;
  max-width: min(220px, calc(100vw - 92px));
  max-height: min(420px, calc(100vh - 24px));
  gap: 1px;
  padding: 6px;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(16,24,40,.11);
}

/* Compact ordinary date/time controls; availability calendars and slot grids keep their own sizing. */
.birsuol-time-picker,
.calendar-times .birsuol-time-picker { width: 90px; min-width: 90px; }
.calendar-times .birsuol-time-picker { width: 84px; min-width: 84px; }
.calendar-times .birsuol-time-control { height: 38px; min-height: 38px; padding: 6px 14px !important; text-align: center; cursor: pointer; }
.calendar-times .birsuol-time-toggle { display: none; }
.birsuol-date-control,
.notification-custom-period input.birsuol-date-control { width: 136px; max-width: 100%; }
.notification-custom-period { grid-template-columns: repeat(2,136px); }

@media (max-width: 620px) {
  .birsuol-time-picker,
  .calendar-times .birsuol-time-picker { width: 100%; min-width: 0; }
  .birsuol-date-control,
  .notification-custom-period input.birsuol-date-control { width: 100%; max-width: none; }
  .notification-custom-period { grid-template-columns: 1fr; }
}
.sidebar-collapsed .main-nav-group > .nav-group-items > .nav-item { width: 100%; min-height: 36px; padding: 7px 9px; white-space: nowrap; }
.sidebar-collapsed .main-nav-group > .nav-group-items > .nav-item.active { color: #245f4d; background: #f1f7f4; }
.sidebar-collapsed .main-nav-group .optional-navigation > summary { min-height: 34px; padding: 6px 9px; white-space: nowrap; }
.sidebar-collapsed .main-nav-group .optional-navigation .nav-group-items { padding: 2px 0 2px 10px; }
.booking-status-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.booking-uds-details { margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; }
.booking-uds-details > summary { padding: 11px 13px; cursor: pointer; color: var(--ink); font-weight: 750; }
.booking-uds-details-body { padding: 0 13px 13px; }
#booking-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#booking-dialog .dialog-actions { position: sticky; bottom: 0; z-index: 2; margin: 16px -24px -24px; padding: 12px 24px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .96); }

@media (max-width: 900px) {
  #view-services .service-card-open { grid-template-columns: minmax(0,1fr) minmax(90px,auto) 86px; }
}
@media (max-width: 780px) {
  .sidebar-collapse { display: none; }
  .menu-button { width: 40px; height: 40px; align-items: center; justify-content: center; font-size: 23px; }
  .sidebar-collapsed .sidebar { padding: 20px 12px 16px; overflow-y: auto; }
  .sidebar-collapsed .sidebar-brand-row { grid-template-columns: minmax(0,1fr); justify-items: stretch; }
  .sidebar-collapsed .sidebar-brand-row .brand { justify-content: flex-start; }
  .sidebar-collapsed .sidebar-brand-row .brand-name { display: block; }
  .sidebar-collapsed .main-nav-group { padding: 0; border-top: 0; }
  .sidebar-collapsed .main-nav-group > summary,
  .sidebar-collapsed .optional-navigation > summary { display: flex; width: auto; min-height: 46px; margin: 0; padding: 10px 12px; justify-content: flex-start; font-size: 16px; }
  .sidebar-collapsed .main-nav-group > summary .nav-icon { width: 22px; font-size: 17px; }
  .sidebar-collapsed .main-nav-group > summary b { display: block; }
  .sidebar-collapsed .main-nav-group > .nav-group-items { position: static; width: auto; max-height: none; gap: 1px; overflow: visible; padding: 5px 8px 7px 36px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .sidebar-collapsed .main-nav-group .optional-navigation .nav-group-items { padding: 3px 0 3px 12px; }
  .sidebar-collapsed .nav-item { justify-content: flex-start; min-height: 38px; padding: 7px 10px; font-size: 15px; }
  .sidebar-collapsed .nav-item .nav-icon { width: 20px; }
  .sidebar-collapsed .sidebar-footer { display: block; padding-top: 16px; }
  .sidebar-collapsed .user-card { justify-content: flex-start; padding: 8px 10px 10px; }
  .sidebar-collapsed .user-card > span:last-child,
  .sidebar-collapsed .sidebar-label { display: block; }
  .sidebar-collapsed .text-button { justify-content: flex-start; width: 100%; padding: 8px 10px; font-size: 13px; }
}
@media (max-width: 640px) {
  #view-dashboard .welcome-card { padding: 20px; }
  #view-dashboard .welcome-card h2 { font-size: 23px; }
  #view-dashboard .operational-panel { padding: 14px; }
  .panel.resource-manager, #view-services .services-panel { padding: 14px; }
  .resource-heading-actions { width: 100%; }
  .resource-heading-actions .primary { max-width: calc(100% - 44px); overflow: hidden; text-overflow: ellipsis; }
  .resource-manager .resource-row { gap: 9px; }
  .resource-modal-fields { grid-template-columns: 1fr; }
  .dashboard-setup-heading { align-items: flex-start; }
  .dashboard-setup-ready { flex-wrap: wrap; }
  .dashboard-setup-issue { grid-template-columns: 22px minmax(0,1fr); }
  .dashboard-setup-issue b { grid-column: 2; }
  #view-services .service-card-open { grid-template-columns: minmax(0,1fr) auto auto; gap: 6px; }
  #view-services .service-row-name { font-size: 14px; }
  #view-services .service-row-statuses { display: flex; }
  #view-services .service-row-statuses .status { min-width: 0; }
}

/* Compact staff booking flow: searchable services, available dates and optional comment. */
.create-booking-dialog { width: min(760px,calc(100vw - 28px)); }
.create-booking-form { gap: 10px; padding: 16px 18px; }
.create-booking-form .dialog-heading { padding-bottom: 6px; }
.create-booking-form .create-booking-grid { gap: 9px 12px; }
.create-service-picker { position: relative; display: block; }
.create-service-menu { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; max-height: 260px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 12px 30px rgba(16,24,40,.12); }
.create-service-menu[hidden] { display: none; }
.create-service-group { display: grid; gap: 2px; padding: 4px; }
.create-service-group + .create-service-group { border-top: 1px solid var(--line); }
.create-service-group > strong { padding: 5px 7px 3px; color: var(--text-secondary); font-family: var(--font-ui) !important; font-size: 14px; font-weight: 600; line-height: 1.4; }
.create-service-group button { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; min-height: 36px; padding: 7px; border: 0; border-radius: 7px; color: var(--text-primary); background: transparent; text-align: left; }
.create-service-group button:hover,
.create-service-group button:focus-visible { background: #edf6f1; }
.create-service-group button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-ui) !important; font-size: 14px; font-weight: 400; }
.create-service-group button b { color: #39745f; white-space: nowrap; font-family: var(--font-ui) !important; font-size: 14px; font-weight: 500; }
.create-booking-date-field { display: grid; gap: 6px; color: var(--text-primary); font-weight: 500; }
.create-date-navigation { display: grid; grid-template-columns: 32px minmax(0,1fr) 32px; gap: 8px; align-items: center; }
.create-date-navigation .icon-button { width: 32px; height: 32px; min-height: 32px; padding: 0; }
.create-date-navigation strong { font-size: 13px; text-align: center; }
.create-booking-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px; }
.create-booking-days > .slot-message { grid-column: 1/-1; }
.create-date-button { min-height: 43px; padding: 5px 3px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-disabled); background: #f7f8fa; }
.create-date-button small,
.create-date-button strong { display: block; font-size: 11px; line-height: 1.25; }
.create-date-button.available { color: var(--text-primary); border-color: #b7d2c7; background: #fff; }
.create-date-button.available:hover { border-color: #75b69e; background: #f4f9f6; }
.create-date-button.selected { color: #fff; border-color: #39745f; background: #39745f; }
.create-date-button.available:not(.selected):hover { color: #245f4d; border-color: #72a892; background: #edf7f2; }
.create-date-button:disabled { color: #98a2b3; border-color: #e4e7ec; background: #f7f8fa; cursor: not-allowed; opacity: 1; }
.create-booking-form .create-booking-slots { min-height: 42px; padding: 7px; }
.create-booking-slots .reschedule-slot:hover { color: #245f4d; border-color: #72a892; background: #edf7f2; }
.create-booking-slots .reschedule-slot.selected,
.create-booking-slots .reschedule-slot.selected:hover { color: #fff; border-color: #39745f; background: #39745f; }
.create-booking-slots .reschedule-slot:disabled { color: #98a2b3; border-color: #e4e7ec; background: #f7f8fa; cursor: not-allowed; opacity: 1; }
.create-booking-form .customer-section { padding: 8px 10px; }
.create-comment-toggle { justify-self: start; width: auto; min-height: 30px; padding: 4px 0; color: #39745f; }
.create-booking-form .dialog-actions { margin-top: 0; }
@media (max-width: 620px) {
  .create-booking-form .create-booking-grid { grid-template-columns: 1fr; }
  .create-booking-grid .wide { grid-column: auto; }
  .create-booking-days { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
.create-booking-layout { display: grid; gap: 8px; }
.create-booking-layout > .create-form-row:nth-child(5),
.create-booking-layout > .create-form-row:nth-child(6) { margin-top: 4px; }
.create-form-row { display: grid; grid-template-columns: minmax(120px,132px) minmax(0,1fr); gap: 12px; align-items: center; min-width: 0; }
.create-form-row > label,
.create-row-label { margin: 0; color: var(--text-primary); font-size: 14px; font-weight: 500; }
.create-service-picker { min-width: 0; }
.create-specialist-select { width: min(430px,60%); min-width: 260px; }
.create-booking-date-field { min-width: 0; }
.create-date-navigation { max-width: 390px; margin-bottom: 5px; }
.create-booking-days { grid-template-columns: repeat(7,minmax(0,1fr)); }
.create-booking-slots { display: grid; grid-template-columns: repeat(auto-fill,minmax(58px,70px)); align-content: start; justify-content: start; gap: 6px; max-height: 120px; min-height: 42px; overflow-y: auto; padding: 6px; }
.create-booking-slots > .slot-message { grid-column: 1/-1; }
.create-booking-slots .reschedule-slot { width: 100%; min-width: 0; min-height: 36px; padding: 6px 8px; border-radius: 8px; }
.create-customer-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.create-comment-control { display: grid; justify-items: start; min-width: 0; }
.create-comment-control label { width: 100%; }
.create-comment-control textarea { min-height: 64px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 700px) {
  .create-form-row { grid-template-columns: 1fr; gap: 5px; }
  .create-specialist-select { width: 100%; min-width: 0; }
  .create-booking-days { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .create-customer-fields { grid-template-columns: 1fr; }
}

/* Unified BirSuol typography foundation with system fallbacks when Inter is unavailable. */
body,
body * {
  font-family: var(--font-ui) !important;
}
body {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  line-height: 1.45;
}
.topbar h1,
body[data-active-view="specialists"] .topbar h1 {
  color: var(--text-primary);
  font-family: var(--font-page-title) !important;
  font-size: 28px;
  font-weight: var(--font-weight-medium);
  line-height: 1.2;
  letter-spacing: -.02em;
}
h2,
h3,
.form-card h2,
.resource-modal-heading h2,
.dialog-heading h2,
body[data-active-view="specialists"] #specialist-editor-panel .resource-modal-heading h2 {
  color: var(--text-primary);
  font-size: 18px !important;
  font-weight: var(--font-weight-medium) !important;
  line-height: 1.25 !important;
}
.panel-heading h2,
body[data-active-view="specialists"] #view-specialists .resource-manager-heading h2 {
  color: var(--text-primary);
  font-size: 20px !important;
  font-weight: var(--font-weight-medium) !important;
  line-height: 1.25 !important;
}
strong,
b { font-weight: var(--font-weight-semibold) !important; }
.item-card strong,
.resource-row strong,
.schedule-specialist strong,
.client-main strong,
.booking-card strong,
.service-row-name,
.payment-operation-main strong { font-weight: var(--font-weight-medium) !important; }
p,
li,
td,
th,
dt,
dd { color: inherit; font-weight: var(--font-weight-regular); }
button,
.primary,
.secondary,
.danger-secondary,
.text-button,
.action-link,
.notification-tabs button,
.settings-tabs button,
.client-profile-tabs button { font-size: 14px !important; font-weight: var(--font-weight-medium) !important; }
input,
select,
textarea { color: var(--text-primary); font-size: 14px !important; font-weight: var(--font-weight-regular) !important; }
input::placeholder,
textarea::placeholder { color: var(--text-tertiary); opacity: 1; }
label { color: var(--text-primary); font-size: 14px !important; font-weight: var(--font-weight-medium) !important; }
small,
.field-hint,
.source-note,
.upload-status,
.item-card small,
.resource-row small,
.panel-heading p:not(.eyebrow),
.form-card p:not(.eyebrow) { color: var(--text-secondary) !important; font-weight: var(--font-weight-regular) !important; }
.eyebrow,
.nav-section-label { color: var(--text-tertiary) !important; font-size: 12px !important; font-weight: var(--font-weight-medium) !important; }
.panel-heading > div > .eyebrow,
.settings-card-header > .eyebrow { margin: 0 0 11px !important; color: #667085 !important; }
.panel-heading > div > .eyebrow + :is(h2, h3),
.settings-card-header > .eyebrow + :is(h2, h3) { margin: 0 !important; }
.panel-heading > div > :is(h2, h3) + p:not(.eyebrow),
.settings-card-header > :is(h2, h3) + p:not(.eyebrow) { margin: 5px 0 0 !important; }
.nav-item,
.main-nav-group > summary,
.optional-navigation > summary,
.sidebar-collapsed .nav-item { font-size: 14px !important; font-weight: var(--font-weight-medium) !important; }
.badge,
.status,
.client-uds-status { font-size: 13px !important; font-weight: var(--font-weight-medium) !important; }
.stat-card strong,
.payment-summary strong,
#notification-panel-results .return-effectiveness-metrics strong { color: var(--text-primary); font-size: 23px; font-weight: var(--font-weight-semibold); }
#notification-panel-results .return-effectiveness-metrics small,
#notification-panel-results .return-effectiveness-metrics span,
#notification-panel-results .return-effectiveness-empty,
#notification-panel-results .return-effectiveness-note { color: var(--text-secondary); }
:disabled,
[aria-disabled="true"] { color: var(--text-disabled); }
.notification-card.sent,
.notification-card.archived,
.booking-card.cancelled,
.client-visit.cancelled { opacity: 1; }

.booking-uds-details > summary { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px 14px; }
.booking-uds-details > summary > span { display: grid; min-width: 0; gap: 3px; }
.booking-uds-details > summary strong,
.booking-uds-details > summary small { display: block; min-width: 0; }
.booking-uds-details > summary b { align-self: center; color: var(--green-800); font-size: 13px; font-weight: 500; white-space: nowrap; }
.schedule-boundary-note { grid-column: 2 / -1; margin-top: 2px; color: #586474 !important; font-size: 12px; font-weight: 500 !important; line-height: 1.35; }
@media (max-width: 520px) {
  .booking-uds-details > summary { grid-template-columns: minmax(0,1fr); }
  .booking-uds-details > summary b { justify-self: start; }
}

/* Compact schedule action bar: time controls and actions share one baseline. */
.calendar-editor {
  grid-template-columns: minmax(170px,1fr) auto auto auto auto;
  align-items: start;
  column-gap: 10px;
  row-gap: 6px;
  margin-top: 14px;
  padding: 12px 14px 10px;
}
.calendar-times { align-items: start; gap: 8px; }
.calendar-times label { display: grid; justify-items: center; gap: 7px; padding-top: 0; color: var(--text-primary); font-size: 13px; font-weight: 500; line-height: 1.2; text-align: center; }
.calendar-times .schedule-boundary-note { grid-column: 1 / -1; display: grid; justify-items: center; gap: 1px; width: 100%; margin-top: 4px; text-align: center; }
.calendar-times .schedule-boundary-note span { display: block; }
.calendar-times .schedule-boundary-note span:last-child { color: #586474; font-weight: 400; }
.calendar-editor > .primary,
.calendar-editor > .danger-secondary,
.calendar-editor > .secondary { align-self: start; min-height: 38px; margin-top: 22px; white-space: nowrap; }
.calendar-editor > button:disabled { cursor: not-allowed; opacity: .5; filter: saturate(.55); transform: none; }
.calendar-editor .schedule-time-error { grid-column: 2 / -1; }
.calendar-hint { margin-top: 10px; }

@media (max-width: 1100px) {
  .schedule-workspace { grid-template-columns: minmax(0,1fr); }
  .schedule-specialist-list { grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); }
  .schedule-calendar-area .calendar-weekdays,
  .schedule-calendar-area .month-calendar { grid-template-columns: repeat(7,minmax(0,1fr)); }
  .calendar-editor { grid-template-columns: minmax(190px,1fr) auto auto; }
  .calendar-editor .selection-summary { grid-column: 1 / -1; }
  .calendar-editor .schedule-time-error,
  .calendar-editor .schedule-boundary-note { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .calendar-editor { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 11px 10px 9px; }
  .calendar-editor .calendar-times,
  .calendar-editor .selection-summary,
  .calendar-editor .schedule-time-error,
  .calendar-editor .schedule-boundary-note { grid-column: 1 / -1; }
  .calendar-editor > .primary,
  .calendar-editor > .danger-secondary,
  .calendar-editor > .secondary { width: 100%; min-height: 40px; white-space: normal; }
  .calendar-editor .schedule-boundary-note { margin-top: 0; }
  .calendar-hint { margin-top: 8px; }
}

/* Visit workflow: compact, single-axis modal with payment as the primary action. */
#booking-dialog { overflow-x: hidden; }
#booking-dialog .booking-details { gap: 9px; padding: 16px 18px; overflow-x: hidden; }
#booking-dialog .dialog-heading { margin-bottom: 0; }
#booking-dialog .booking-detail-grid { gap: 7px; }
#booking-dialog .booking-detail-grid > div,
#booking-dialog .booking-comment { min-width: 0; padding: 8px 10px; }
#booking-dialog .booking-comment p { margin: 3px 0 0; }
#booking-dialog .dialog-actions { position: static; margin: 4px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); background: transparent; }
#booking-dialog .payment-panel { min-width: 0; gap: 9px; padding: 12px; overflow-x: hidden; }
.payment-context { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.payment-context span { display: grid; min-width: 0; gap: 2px; }
.payment-context small { color: var(--text-secondary); }
.payment-context strong { overflow-wrap: anywhere; font-size: 13px; font-weight: 500; }
.booking-cancel-dialog { width: min(430px,calc(100vw - 28px)); }
.booking-cancel-content { display: grid; gap: 14px; padding: 18px; }
.booking-cancel-summary { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; }
.booking-cancel-summary strong { font-weight: 600; }
.booking-cancel-summary span { color: var(--text-secondary); font-size: 13px; }
@media (max-width: 620px) {
  #booking-dialog .booking-details { padding: 14px; }
  #booking-dialog .booking-detail-grid,
  .payment-context { grid-template-columns: 1fr; }
  #booking-dialog .dialog-actions { grid-template-columns: 1fr; }
}

/* Desktop compact navigation: icon rail with an on-demand flyout submenu. */
@media (min-width: 781px) {
  .app-shell { grid-template-columns: var(--sidebar-width) minmax(0,1fr) !important; }
  .app-shell.sidebar-collapsed { grid-template-columns: 76px minmax(0,1fr) !important; }
  .app-shell > .main { grid-column: 2; min-width: 0; padding-left: 28px; }
  .main { padding-right: 28px; padding-left: 28px; }
  .view,
  .sidebar-collapsed .view { width: 100%; max-width: none; margin-right: 0; margin-left: 0; }
  .resource-manager,
  .specialist-manager,
  #view-services .services-panel,
  .integration-catalog,
  .notifications-panel,
  .channels-panel,
  .settings-workspace,
  #view-clients .clients-panel,
  #view-bookings .bookings-panel,
  #view-payments .payments-panel,
  .specialist-context-return,
  .automation-settings,
  .return-effectiveness-panel,
  .return-effectiveness-metrics,
  .integration-expanded-grid .form-card { margin-right: 0; margin-left: 0; }
  .settings-workspace > .panel-heading,
  .settings-workspace > .settings-tabs,
  .settings-workspace > .settings-tab-panel { margin-right: 0; margin-left: 0; }
  .sidebar > .nav > .main-nav-group:has(.nav-item.active) > summary { color: #174f3e; background: #b8dec9; }
  .app-shell.sidebar-collapsed { grid-template-columns: 76px minmax(0,1fr); }
  .sidebar-collapsed .sidebar { width: 76px; padding: 20px 12px 16px; overflow: visible; }
  .sidebar-collapsed .main { min-width: 0; }
  .sidebar-collapsed .sidebar-brand-row { grid-template-columns: 1fr; justify-items: stretch; gap: 6px; }
  .sidebar-collapsed .sidebar-brand-row .brand { justify-content: flex-start; }
  .sidebar-collapsed .sidebar-brand-row .brand-name { display: none; }
  .sidebar-collapsed .sidebar-collapse { left: 61px; }
  .sidebar-collapsed .nav { align-items: stretch; gap: 7px; overflow: visible; }
  .sidebar-collapsed .main-nav-group,
  .sidebar-collapsed .main-nav-group[open] { width: 100%; margin: 0; padding: 0; overflow: visible; }
  .sidebar-collapsed .main-nav-group > summary {
    display: flex;
    width: 44px;
    height: 46px;
    min-height: 46px;
    margin: 0 auto;
    padding: 10px 0;
    justify-content: center;
    gap: 0;
    overflow: hidden;
    font-size: 0 !important;
    line-height: inherit;
    background: transparent;
    box-shadow: none;
  }
  .sidebar-collapsed .main-nav-group > summary > .nav-icon { flex: 0 0 24px; width: 24px; height: 24px; margin: 0; }
  .sidebar-collapsed .main-nav-group > summary > .nav-icon svg { width: 22px; height: 22px; }
  .sidebar-collapsed .main-nav-group > summary > b { display: none !important; }
  .sidebar-collapsed .main-nav-group > .nav-group-items { display: none; }
  .sidebar-collapsed .main-nav-group[open] > .nav-group-items {
    position: absolute;
    z-index: 80;
    top: 0;
    bottom: auto;
    left: calc(100% + 10px);
    display: flex !important;
    width: max-content;
    min-width: 210px;
    max-width: 280px;
    max-height: min(520px,calc(100vh - 28px));
    gap: 2px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #cfe0d8;
    border-radius: 12px;
    background: var(--paper);
    box-shadow: 0 16px 42px rgba(16,24,40,.14);
  }
  .sidebar-collapsed .main-nav-group.flyout-opens-up[open] > .nav-group-items { top: auto; bottom: 0; }
  .sidebar-collapsed .main-nav-group[open] > .nav-group-items > .nav-item { justify-content: flex-start; width: 100%; min-height: 38px; padding: 8px 10px; font-size: 14px !important; white-space: nowrap; }
  .sidebar-collapsed .main-nav-group[open] .optional-navigation > summary { min-height: 36px; padding: 7px 10px; font-size: 14px; white-space: nowrap; }
  .sidebar-collapsed .main-nav-group[open] .optional-navigation > .nav-group-items { padding: 2px 0 2px 12px; }
  .sidebar .main-nav-group > summary { color: #26313f; font-family: "Unbounded", "Open Sans", "Segoe UI", Arial, sans-serif; font-weight: 600 !important; }
  .sidebar .main-nav-group > .nav-group-items > .nav-item { color: #475467; font-weight: 500 !important; }
  .sidebar .main-nav-group[open] > summary,
  .sidebar-collapsed .main-nav-group[open] > summary { color: #26313f; background: transparent; }
  .sidebar .main-nav-group > summary:hover,
  .sidebar .nav-item:hover { color: #174f3e; background: #e1f1e9; }
  .sidebar .main-nav-group:has(.nav-item.active) > summary,
  .sidebar-collapsed .main-nav-group:has(.nav-item.active) > summary { color: #174f3e; background: #aed9c0; font-weight: 600; }
  .sidebar .main-nav-group > .nav-group-items > .nav-item.active { color: #103c2f; background: #82c39f; font-weight: 600 !important; }
  .sidebar .main-nav-group:has(.nav-item.active) > summary:hover { background: #a2d2b6; }
  .sidebar .main-nav-group > .nav-group-items > .nav-item.active:hover { background: #76b993; }
  .sidebar-collapsed .sidebar-footer { display: grid; justify-items: center; gap: 4px; padding-top: 10px; }
  .sidebar-collapsed .user-card { justify-content: center; width: 44px; padding: 5px; }
  .sidebar-collapsed .user-card > span:last-child,
  .sidebar-collapsed .sidebar-label { display: none; }
  .sidebar-collapsed .sidebar-footer .text-button { justify-content: center; width: 40px; min-height: 40px; padding: 0; gap: 0; font-size: 0 !important; }
  .sidebar-collapsed .sidebar-footer .text-button > span:first-child { font-size: 18px; }
}

/* Desktop sidebar: permanent icon rail plus a separate contextual menu panel. */
@media (min-width: 781px) {
  :root { --sidebar-rail-width: 64px; --sidebar-panel-width: 200px; }
  .app-shell { grid-template-columns: calc(var(--sidebar-rail-width) + var(--sidebar-panel-width)) minmax(0,1fr) !important; }
  .app-shell.sidebar-collapsed { grid-template-columns: var(--sidebar-rail-width) minmax(0,1fr) !important; }
  .sidebar,
  .sidebar-collapsed .sidebar { position: sticky; width: calc(var(--sidebar-rail-width) + var(--sidebar-panel-width)); padding: 14px 6px 12px; overflow: visible; }
  .sidebar-collapsed .sidebar { width: var(--sidebar-rail-width); }
  .sidebar-brand-row,
  .sidebar-collapsed .sidebar-brand-row { width: 52px; justify-items: center; }
  .sidebar-brand-row .brand,
  .sidebar-collapsed .sidebar-brand-row .brand { justify-content: center; width: 52px; padding-right: 0; padding-left: 0; }
  .sidebar-brand-row .brand-name { display: none; }
  .sidebar > .nav,
  .sidebar-collapsed .sidebar > .nav { width: 52px; align-items: stretch; gap: 7px; overflow: visible; }
  .sidebar .main-nav-group,
  .sidebar .main-nav-group[open],
  .sidebar-collapsed .main-nav-group,
  .sidebar-collapsed .main-nav-group[open] { position: static; width: 52px; margin: 0; padding: 0; }
  .sidebar .main-nav-group > summary,
  .sidebar-collapsed .main-nav-group > summary { display: flex; width: 44px; height: 46px; min-height: 46px; margin: 0 auto; padding: 10px 0; justify-content: center; gap: 0; overflow: hidden; font-size: 0 !important; background: transparent; box-shadow: none; }
  .sidebar .main-nav-group > summary > .nav-icon,
  .sidebar-collapsed .main-nav-group > summary > .nav-icon { flex: 0 0 24px; width: 24px; height: 24px; margin: 0; }
  .sidebar .main-nav-group > summary > .nav-icon svg,
  .sidebar-collapsed .main-nav-group > summary > .nav-icon svg { width: 24px; height: 24px; }
  .sidebar .main-nav-group > summary > b { display: none !important; }
  .sidebar .main-nav-group > .nav-group-items,
  .sidebar-collapsed .main-nav-group > .nav-group-items { display: none !important; }
  .sidebar .main-nav-group[open] > .nav-group-items { position: absolute; z-index: 50; top: 0; bottom: 0; left: var(--sidebar-rail-width); display: flex !important; width: var(--sidebar-panel-width); max-width: none; max-height: none; gap: 3px; overflow-y: auto; padding: 24px 12px 142px; border: 0; border-left: 1px solid var(--sidebar-border); border-radius: 0; background: var(--paper); box-shadow: 8px 0 24px rgba(31,45,39,.045); }
  .sidebar .main-nav-group[open] > .nav-group-items::before { display: block; min-height: 28px; margin: 0 4px 10px; color: var(--ink); font-size: 18px; font-weight: 650; line-height: 1.25; }
  .sidebar .main-nav-group:nth-of-type(1) > .nav-group-items::before { content: "Работа"; }
  .sidebar .main-nav-group:nth-of-type(2) > .nav-group-items::before { content: "Клиенты"; }
  .sidebar .main-nav-group:nth-of-type(3) > .nav-group-items::before { content: "Управление центром"; }
  .sidebar .main-nav-group:nth-of-type(4) > .nav-group-items::before { content: "Коммуникации"; }
  .sidebar .main-nav-group[open] > .nav-group-items > .nav-item { justify-content: flex-start; width: 100%; min-height: 40px; padding: 8px 10px; font-size: 14px !important; white-space: normal; }
  .sidebar-collapse,
  .sidebar-collapsed .sidebar-collapse { position: static; width: 44px; height: 46px; min-height: 46px; margin: auto 4px 8px; border-color: transparent; box-shadow: none; }
  .sidebar-collapse-icon { width: 24px; height: 24px; }
  .sidebar-collapse-icon svg { width: 27px; height: 27px; }
  .sidebar-collapse:hover { border-color: #b9d4ca; }
  .sidebar-footer,
  .sidebar-collapsed .sidebar-footer { z-index: 60; display: grid; width: 52px; justify-items: center; gap: 4px; margin-top: 0; padding-top: 10px; }
  .sidebar .user-card,
  .sidebar-collapsed .user-card { justify-content: center; width: 44px; padding: 5px; }
  .sidebar .user-card > span:last-child { position: absolute; left: calc(var(--sidebar-rail-width) + 12px); bottom: 58px; display: block; width: calc(var(--sidebar-panel-width) - 24px); padding-top: 11px; border-top: 1px solid var(--sidebar-border); }
  .sidebar .user-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar .sidebar-footer .sidebar-label { position: absolute; left: calc(var(--sidebar-rail-width) + 12px); bottom: 17px; display: block; width: calc(var(--sidebar-panel-width) - 24px); overflow: hidden; color: #205f4b; font-size: 13px !important; font-weight: 500; line-height: 22px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar-collapsed .user-card > span:last-child,
  .sidebar-collapsed .sidebar-label { display: none; }
  .sidebar .sidebar-footer .text-button,
  .sidebar-collapsed .sidebar-footer .text-button { justify-content: center; width: 40px; min-height: 40px; padding: 0; gap: 0; font-size: 0 !important; }
  .sidebar .sidebar-footer .text-button > span:first-child { font-size: 18px; }
}

/* Compact schedule specialist header; preserve the field and calendar geometry. */
@media (min-width: 761px) {
  #view-schedule .calendar-panel { padding-top: 14px; }
  #view-schedule .calendar-filters { min-height: 0; padding-bottom: 14px; }
  #view-schedule .schedule-specialist-select { gap: 6px; }
}

/* Targeted admin vertical density; keep settings and shared controls unchanged. */
@media (min-width: 781px) {
  #view-bookings .booking-list { gap: 3px; }
  #view-bookings .booking-card { min-height: 64px; padding: 7px 12px; }
  #view-bookings .booking-main strong { margin-bottom: 0; line-height: 18px; }
  #view-bookings .booking-main small { line-height: 1.25; }
  #view-bookings .booking-date { height: 44px; }
  #view-bookings .booking-card > .status { align-self: center; }
  #view-integrations .integration-help-toggle { height: 34px !important; min-height: 34px !important; padding: 0 12px !important; }
  #view-services .service-group-heading { min-height: 42px; padding-top: 6px; padding-bottom: 6px; }
  #view-services .service-group-title { flex-wrap: wrap; row-gap: 2px; }
  #view-services .service-group-heading h3 { white-space: normal; overflow-wrap: anywhere; }
  #view-schedule .calendar-panel { padding-top: 10px; }
  #view-schedule .calendar-filters { padding-bottom: 10px; }
  #view-schedule .schedule-specialist-select { gap: 4px; }
}
@media (max-width: 780px) {
  #view-services .service-group-heading { min-height: 44px; }
  #view-bookings .booking-main small { white-space: normal; overflow-wrap: anywhere; }
}
/* Admin navigation and control density: action buttons only, desktop only. */
:root { --button-height: 36px; --button-height-compact: 32px; --button-radius: 9px; --button-icon-gap: 6px; }
.sidebar-organization-name { display: none; }
@media (min-width: 781px) {
  .sidebar .sidebar-organization-name { position: absolute; z-index: 60; top: 24px; left: calc(var(--sidebar-rail-width) + 16px); display: block; width: calc(var(--sidebar-panel-width) - 32px); overflow: hidden; color: var(--ink); font-size: 19px; line-height: 24px; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar-collapsed .sidebar-organization-name { display: none; }
  .sidebar .main-nav-group[open] > .nav-group-items { padding-top: 66px; }
  .sidebar .main-nav-group[open] > .nav-group-items::before { min-height: 22px; margin-bottom: 8px; font-size: 16px; font-weight: 600; line-height: 22px; }
  body :is(main, dialog) :is(button.primary, button.secondary, button.danger-secondary, a.action-link, button.outcome-button, .integration-help-toggle) {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--button-icon-gap); height: var(--button-height) !important; min-height: var(--button-height) !important; padding: 0 14px !important; border-radius: var(--button-radius); line-height: 20px; white-space: nowrap;
  }
  body :is(main, dialog) :is(button.icon-button, button.dialog-close, .booking-view-switch button, .booking-calendar-navigation button:not([data-booking-calendar-move="today"]), .service-quick-filters button, .settings-tabs > button, .notification-tabs > button, .client-profile-tabs button, .products-tabs button, .booking-settings-tabs button) {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--button-icon-gap); height: var(--button-height-compact) !important; min-height: var(--button-height-compact) !important; padding: 0 10px !important; border-radius: var(--button-radius); line-height: 20px;
  }
  body :is(main, dialog) .booking-calendar-navigation button[data-booking-calendar-move="today"] { height: var(--button-height); min-height: var(--button-height); padding: 0 14px; border-radius: var(--button-radius); line-height: 20px; }
  body :is(main, dialog) :is(button.icon-button, button.dialog-close) { width: var(--button-height-compact); padding: 0 !important; }
  body :is(main, dialog) :is(button.primary, button.secondary, button.danger-secondary, button.icon-button, a.action-link) svg { flex: 0 0 18px; width: 18px; height: 18px; }
}

/* Admin list density and compact dashboard. */
#view-dashboard .welcome-card { gap: 14px; padding: 16px 18px; }
#view-dashboard .welcome-card h2 { font-size: 23px; }
#view-dashboard .welcome-card p { margin-bottom: 0; }
#view-dashboard .operational-panel { margin-top: 12px; padding: 14px; }
#view-dashboard .operational-panel .panel-heading { margin-bottom: 10px; }
#view-dashboard .operational-stats-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
#view-dashboard .operational-stats-compact .stat-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(48px, auto); column-gap: 12px; row-gap: 2px; min-height: 0; padding: 10px 12px; align-content: center; transform: none; }
#view-dashboard .operational-stats-compact .stat-card > :is(span, small, em) { grid-column: 1; min-width: 0; overflow-wrap: anywhere; }
#view-dashboard .operational-stats-compact .stat-card > span { grid-row: 1; }
#view-dashboard .operational-stats-compact .stat-card > small { grid-row: 2; }
#view-dashboard .operational-stats-compact .stat-card > strong { grid-column: 2; grid-row: 1 / 4; align-self: center; margin: 0; font-size: 32px; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
#view-dashboard .operational-stats-compact .stat-card > em { grid-row: 3; margin-top: 3px; }
#view-dashboard .dashboard-setup-status { margin-top: 10px; padding: 10px 12px; }
#view-dashboard .dashboard-setup-content { gap: 2px; }
#view-dashboard .dashboard-setup-issue { grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; min-height: 34px; padding: 3px 8px; transform: none; }
#view-dashboard .dashboard-issue-label { min-width: 0; overflow-wrap: anywhere; }
#view-dashboard .dashboard-issue-metric { color: inherit; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
#view-dashboard .dashboard-issue-action { grid-column: 3; padding-left: 12px; border-left: 1px solid #e8dfca; white-space: nowrap; }
.resource-manager .resource-list { gap: 2px; }
.resource-manager .resource-row:is(:hover, :focus-visible) { transform: none; }
@media (min-width: 781px) {
  .resource-manager .resource-row { min-height: 38px; padding: 3px 9px; gap: 10px; }
  .resource-manager .resource-row .content { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; }
  .resource-manager .resource-row strong { margin: 0; }
  #view-schedule .schedule-specialist-list { gap: 2px; }
  #view-schedule .schedule-specialist { min-height: 38px; padding: 3px 9px; grid-template-columns: 28px minmax(0, 1fr) 14px; }
  #view-schedule .schedule-specialist-avatar { width: 28px; height: 28px; }
  #view-schedule .schedule-specialist :is(strong, small) { margin: 0; line-height: 16px; }
  #view-clients .client-card { min-height: 38px; padding: 3px 10px; }
  #view-clients :is(.client-main, .client-metric, .client-last) > :is(strong, b, small) { margin: 0; line-height: 16px; }
  #view-bookings .booking-list { gap: 2px; }
  #view-bookings .booking-card { min-height: 54px; padding: 3px 10px; }
  #view-bookings .booking-date { height: 40px; }
  body :is(main, dialog) :is(button.secondary, a.secondary.action-link, .integration-help-toggle),
  body #view-integrations .integration-help-toggle,
  body main :is(select[id$="-filter"], #schedule-specialist) { height: 32px !important; min-height: 32px !important; padding: 0 10px !important; line-height: 20px; }
}
@media (max-width: 780px) {
  .resource-manager .resource-row { min-height: 44px; padding: 4px 9px; }
  #view-dashboard .operational-stats-compact { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  #view-dashboard .welcome-card { flex-direction: column; align-items: stretch; }
  #view-dashboard .dashboard-setup-heading { flex-wrap: wrap; gap: 4px; }
  #view-dashboard .dashboard-setup-issue { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; }
  #view-dashboard .dashboard-issue-action { grid-column: 1 / -1; justify-self: start; padding-left: 0; border-left: 0; }
}

.branch-photo-field { display:grid; gap:8px; }
.branch-photo-field > img { display:block; width:100%; max-width:400px; aspect-ratio:16/9; object-fit:cover; border-radius:12px; }
.branch-photo-field > img[hidden] { display:none; }
.branch-photo-field > small { color:var(--muted); }

/* Category, integration and settings time density. */
#view-integrations .integration-catalog { gap: 10px; }
#view-integrations .integration-catalog-actions { align-items: center; }
body #view-integrations .integration-help-toggle { height: 34px !important; min-height: 34px !important; }
#schedule-settings-form { gap: 12px; padding: 18px !important; }
#schedule-settings-form > .settings-card-header { display: grid; gap: 4px; margin-bottom: 0; }
#schedule-settings-form > .settings-card-header > :is(h2, p) { margin: 0 !important; }
#schedule-settings-form .schedule-time-settings-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
#schedule-settings-form .schedule-time-settings-row label { width: auto; margin: 0; }
#schedule-settings-form .birsuol-time-picker { width: 88px; min-width: 88px; }
#schedule-settings-form .birsuol-time-control { width: 100%; height: 38px; min-height: 38px; padding: 6px 10px !important; text-align: center; cursor: pointer; }
#schedule-settings-form .birsuol-time-toggle { display: none; }
#schedule-settings-form .primary { width: auto; height: 36px !important; min-height: 36px !important; padding: 0 14px !important; }
@media (min-width: 781px) {
  #view-services .service-cards { gap: 2px; }
  #view-services .service-group-heading { min-height: 38px; padding-top: 4px; padding-bottom: 4px; }
  #view-services .service-group-title { row-gap: 0; }
  #view-integrations .integration-item { padding-top: 12px; padding-bottom: 12px; }
}
@media (max-width: 780px) {
  #view-services .service-group-heading { min-height: 44px; }
  #schedule-settings-form .birsuol-time-control { height: 44px; min-height: 44px; }
  #schedule-settings-form .birsuol-time-options button { min-height: 40px; }
}
@media (max-width: 520px) {
  #schedule-settings-form .schedule-time-settings-row { align-items: flex-start; }
}

/* Demo-ready finishing layer: shared admin surface, controls and responsive cards. */
:root {
  --canvas: #f6f8f7;
  --paper: #ffffff;
  --line: #e1e8e4;
  --ink: #1d2939;
  --muted: #667085;
  --interactive-hover-bg: #f1f7f3;
  --interactive-selected-bg: #e0f0e7;
  --interactive-selected-hover-bg: #d4e9dc;
  --shadow: 0 10px 30px rgba(16,24,40,.055);
  --shadow-sm: 0 3px 10px rgba(16,24,40,.045);
}
body { background: var(--canvas); }
.main { padding-bottom: 72px; }
.topbar { border-bottom-color: #e5ebe7; background: rgba(255,255,255,.88); backdrop-filter: blur(14px); }
.panel,.form-card,.list-panel,.calendar-panel { border-color: var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.panel-heading { margin-bottom: 18px; }
.panel-heading h2,.form-card h2,.resource-modal-heading h2,.dialog-heading h2 { color: var(--ink); font-family: Inter,system-ui,sans-serif; font-weight: 650; letter-spacing: -.025em; }
.panel-heading p:not(.eyebrow),.form-card p:not(.eyebrow) { line-height: 1.5; }
.eyebrow { color: #638172; font-weight: 600; letter-spacing: .09em; }
body :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) { border-color: #d7e1dc; border-radius: 10px; background: #fff; }
body :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea):focus { border-color: #6aa58b; box-shadow: 0 0 0 3px rgba(57,116,95,.12); }
body :is(button.primary,button.secondary,button.danger-secondary,a.action-link) { font-weight: 550; }
body .primary { color: #fff; background: #39745f; box-shadow: 0 4px 12px rgba(57,116,95,.16); }
body .primary:hover:not(:disabled) { background: #2e624d; filter: none; }
body .secondary,body .action-link { border-color: #d7e1dc; color: #344054; background: #fff; }
body .secondary:hover,body .action-link:hover { border-color: #9dbba9; background: #f5faf7; }
body .danger-secondary { border-color: #ebc8c2; color: #a43d32; background: #fffafa; }
body .danger-secondary:hover { background: #fff1ef; }
body :is(button,a,input,select,textarea):focus-visible { outline: 3px solid rgba(57,116,95,.22); outline-offset: 2px; }
.status,.badge,.integration-state { border: 1px solid rgba(57,116,95,.08); font-size: 12px; font-weight: 550; }
.empty { display: grid; min-height: 180px; place-content: center; gap: 5px; border: 1px dashed #cddcd4; border-radius: 13px; background: #fbfdfc; }
.empty strong { font-size: 16px; font-weight: 600; }
/* Softer navigation: the workspace remains the visual focus. */
.sidebar { box-shadow: 2px 0 18px rgba(16,24,40,.025); }
.sidebar .main-nav-group:has(.nav-item.active) > summary,
.sidebar-collapsed .main-nav-group:has(.nav-item.active) > summary { color: #245f4d; background: #edf6f1; }
.sidebar .main-nav-group > .nav-group-items > .nav-item.active { color: #174f3e; background: #dcefe5; }
.sidebar .main-nav-group:has(.nav-item.active) > summary:hover { background: #e2f2e9; }
.sidebar .main-nav-group > .nav-group-items > .nav-item.active:hover { background: #d1e9db; }
/* Specialist rows become presentable people cards without exposing technical fields. */
#view-specialists .resource-list { display: grid; gap: 8px; }
#view-specialists .specialist-row { grid-template-columns: 46px minmax(0,1fr) auto auto; min-height: 64px; padding: 9px 12px; border-color: #e1e9e4; border-radius: 12px; background: #fff; }
#view-specialists .specialist-row:hover { border-color: #a9cbb9; background: #fbfefc; box-shadow: var(--shadow-sm); }
.specialist-row-avatar { display: grid; width: 42px; height: 42px; place-items: center; overflow: hidden; border-radius: 50%; color: #245f4d; background: #e3f1e9; font-size: 15px; font-weight: 650; }
.specialist-row-avatar img { width: 100%; height: 100%; object-fit: cover; }
.specialist-row-action { color: #658274; font-size: 13px; font-weight: 500; white-space: nowrap; }
/* Client lists and calendar use the same quiet, screenshot-friendly rhythm. */
#view-clients .client-card { border-color: #e1e9e4; border-radius: 12px; background: #fff; }
#view-clients .client-card:hover { border-color: #a9cbb9; background: #fbfefc; box-shadow: var(--shadow-sm); }
#view-schedule .calendar-panel { background: #fff; }
#view-schedule .calendar-day.today { box-shadow: inset 0 0 0 2px #89bfa4; }
#view-schedule .calendar-day.selected { background: #e1f1e8; }
#view-schedule .calendar-times label { min-width: 84px; }
dialog { border-color: #e0e8e3; border-radius: 18px; box-shadow: 0 28px 90px rgba(16,24,40,.24); }
dialog::backdrop { background: rgba(16,24,40,.46); backdrop-filter: blur(2px); }
@media (max-width:780px) {
  .main { padding-right: 16px; padding-left: 16px; }
  .panel,.calendar-panel { padding: 16px; border-radius: 14px; }
  .panel-heading { align-items: flex-start; gap: 12px; }
  #view-specialists .specialist-row { grid-template-columns: 42px minmax(0,1fr) auto; min-height: 62px; padding: 9px 10px; }
  #view-specialists .specialist-row-action { display: none; }
  .specialist-row-avatar { width: 38px; height: 38px; }
}
@media (max-width:420px) {
  .panel-heading,.resource-heading-actions { flex-wrap: wrap; }
  #view-specialists .specialist-row { grid-template-columns: 38px minmax(0,1fr); row-gap: 7px; }
  #view-specialists .specialist-row .status { grid-column: 2; justify-self: start; }
}

/* Final BirSuol brand layer: teal is interactive, green is semantic success only. */
body { color: var(--brand-graphite); background: var(--bg-main); }
body .primary,body .welcome-card .primary,body .booking-view-switch button.is-active,body .birsuol-time-options button.selected,body .create-date-button.selected,body .create-booking-slots .reschedule-slot.selected,body .reschedule-slot.selected,body .outcome-button.unmarked.selected { color:#fff; border-color:var(--brand-primary); background:var(--brand-primary); box-shadow:0 4px 12px rgba(18,108,120,.16); }
body .primary:hover:not(:disabled),body .booking-view-switch button.is-active:hover,body .birsuol-time-options button.selected:hover,body .create-date-button.selected:hover,body .create-booking-slots .reschedule-slot.selected:hover,body .reschedule-slot.selected:hover,body .outcome-button.unmarked.selected:hover { border-color:var(--brand-primary-hover); background:var(--brand-primary-hover); }
body :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea):focus { border-color:var(--brand-primary); box-shadow:0 0 0 3px rgba(18,108,120,.14); }
body :is(button,a,input,select,textarea):focus-visible { outline-color:rgba(18,108,120,.32); }
body .secondary:hover,body .action-link:hover { border-color:var(--brand-primary); background:var(--brand-primary-soft); }
body .sidebar .main-nav-group:has(.nav-item.active) > summary,body .sidebar-collapsed .main-nav-group:has(.nav-item.active) > summary { color:var(--brand-graphite); background:var(--brand-primary-soft); }
body .sidebar .main-nav-group > .nav-group-items > .nav-item.active,body .sidebar-collapsed .main-nav-group > .nav-group-items > .nav-item.active { color:var(--brand-graphite); background:var(--brand-primary-selected); }
body .sidebar .main-nav-group:has(.nav-item.active) > summary:hover { background:var(--brand-primary-selected); }
body .sidebar .main-nav-group > .nav-group-items > .nav-item.active:hover { background:var(--brand-primary-soft); }
body .booking-calendar-day.is-today > header strong { background:var(--brand-primary); }
body .booking-calendar-card time,body .booking-date,body .field-label,body .specialist-row-action,body .settings-link { color:var(--brand-primary); }
body .calendar-day.today { box-shadow:inset 0 0 0 2px var(--brand-primary); }
body .calendar-day.selected { background:var(--brand-primary-selected); }
body .brand-mark { border-color:var(--border); background:#fff; color:var(--brand-graphite); }
body .brand-mark { line-height:0; }
body .brand-mark img { width:var(--birsuol-icon-fill); height:var(--birsuol-icon-fill); transform:translateY(var(--birsuol-icon-optical-offset)); }
body #logo-preview-image[src="/brand/birsuol-icon.svg"] { display:block; width:var(--birsuol-icon-fill); height:var(--birsuol-icon-fill); transform:translateY(var(--birsuol-icon-optical-offset)); }
/* The sidebar rail has its own round mark; the adjacent tenant name is dynamic. */
body .sidebar .brand-full-logo { display:none; }
body .status:not(.inactive),body .upload-status.success,body .client-uds-status.connected { color:var(--success); background:var(--success-soft); }
body .service-card:hover { border-color:var(--brand-primary); }
body .service-card:focus-visible { outline-color:rgba(18,108,120,.32); }
body .service-image { color:var(--brand-graphite); background:var(--brand-primary-soft); font-family:var(--font-ui); }
body .service-image-fallback { width:42%; height:42%; object-fit:contain; }
body .products-tabs { background:var(--brand-primary-soft); }
body .products-tabs button.active { color:var(--brand-graphite); background:var(--surface); }
body .product-kind { color:var(--brand-primary); }
body .product-check input[role="switch"]:checked { border-color:var(--brand-primary); background:var(--brand-primary); }
body .product-check input[role="switch"]:focus-visible { outline-color:rgba(18,108,120,.32); }
@media (min-width:781px) { .sidebar-collapsed .brand-full-logo { display:none; } }
