/* ============================================================
   components.css — reusable surfaces, controls, content blocks
   ============================================================ */

/* ============ BUTTONS ============ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--accent-grad);
  color: var(--text-on-accent);
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-accent);
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.btn-primary:hover { background: var(--accent-grad-hover); transform: translateY(-1px); }
.btn-primary svg { width: 14px; height: 14px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.btn-secondary:hover { background: white; }
.btn-secondary svg { width: 14px; height: 14px; color: var(--text-muted); }

.btn-icon-square {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.btn-icon-square:hover { background: white; color: var(--text); }
.btn-icon-square svg { width: 16px; height: 16px; }

/* hollow icon button used inside cards (subtle, no fill) */
.btn-icon-quiet {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: none;
  color: var(--accent);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease);
}
.btn-icon-quiet:hover { background: var(--accent-soft-2); }
.btn-icon-quiet svg { width: 18px; height: 18px; }

/* topbar circular icon button (with optional notification dot) */
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 16px; height: 16px;
  background: linear-gradient(135deg, #F472B6, #EC4899);
  color: var(--text-on-accent);
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface-solid);
}

/* ============ PROFILE HEADER ============ */
.profile-header {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-grid-gap);
  align-items: stretch;
  /* Lift above subsequent siblings (.tabs creates its own stacking context
     via backdrop-filter, so the action-menu popover would otherwise render
     beneath the tabs row). */
  position: relative;
  z-index: 20;
}

.identity-card {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 22px;
  box-shadow: var(--shadow-md);
}

/* avatar (no rainbow ring, no online dot — visual-noise rule) */
.avatar-wrap { position: relative; flex-shrink: 0; }
.avatar {
  position: relative;
  width: 86px; height: 86px;
  border-radius: 50%;
  background: var(--grad-avatar);
  z-index: 1;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 28px;
  color: #6D28D9;
  overflow: hidden;
}
.avatar.sm { width: 78px; height: 78px; font-size: 26px; }

.identity-text { flex: 1; min-width: 0; }
.badge-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }

/* canonical eyebrow pill (status etc.) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill-success { background: var(--success-bg); color: var(--success-text); }
.pill-tenure {
  background: var(--success-soft);
  color: #047857;
  border: 1px solid var(--success-edge);
}
.pill-warning { background: var(--warning-bg); color: var(--warning-text); }
.pill-danger  { background: var(--danger-bg);  color: var(--danger-text); }
.pill-info    { background: var(--info-bg);    color: var(--info-text); }
.pill-neutral { background: var(--neutral-bg); color: var(--text-muted); }

.client-name {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--text);
  letter-spacing: var(--tracking-tight);
  margin-bottom: 12px;
  line-height: var(--lh-tight);
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}
.meta-row .sep { color: var(--text-faint); }

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 500;
}
.meta-pill svg { width: 12px; height: 12px; color: var(--text-faint); }
.meta-pill.active {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: var(--success-edge);
}
.actions-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ============ BALANCE CARD ============ */
.balance-card {
  background: var(--grad-balance);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  color: var(--text-on-accent);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-balance);
}
.balance-card::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: var(--blob-balance-pink);
  top: -80px; right: -60px;
}
.balance-card::before {
  content: '';
  position: absolute;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: var(--blob-balance-amber);
  bottom: -60px; left: -40px;
}
.balance-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  opacity: 0.7;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative; z-index: 1;
}
.balance-amount {
  font-size: var(--fs-amount);
  font-weight: 800;
  letter-spacing: var(--tracking-amount);
  margin: 6px 0 16px;
  position: relative; z-index: 1;
}
.balance-actions {
  display: flex;
  gap: 8px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}
.balance-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(var(--blur-soft));
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-on-accent);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.balance-action:hover { background: rgba(255, 255, 255, 0.25); transform: translateY(-1px); }
.balance-action.primary {
  background: var(--text-on-accent);
  color: var(--accent);
  border-color: var(--text-on-accent);
}
.balance-action svg { width: 14px; height: 14px; }

/* ============ TABS ============ */
.tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  align-self: flex-start;
  box-shadow: var(--shadow-sm);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.tab:hover { color: var(--text); }
.tab.active {
  background: var(--text-on-accent);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(20, 20, 60, 0.06);
}
.tab-counter {
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--neutral-bg);
  color: var(--text-muted);
}
.tab.active .tab-counter {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ============ CARDS / CONTENT ============ */
.content-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: var(--space-grid-gap);
  align-items: start;
}
.col-stack { display: flex; flex-direction: column; gap: var(--space-stack-gap); }

.card {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-card-y) var(--space-card-x);
  box-shadow: var(--shadow-md);
  position: relative;
}

.card-edit {
  position: absolute;
  top: 18px; right: 18px;
  width: 30px; height: 30px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.card-edit:hover { background: var(--accent-soft); color: var(--accent); }
.card-edit svg { width: 14px; height: 14px; }

/* field list inside a card */
.field-list { display: flex; flex-direction: column; gap: 18px; }
.field-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow); /* eyebrow canon 700 / 0.10em (D-06) */
  margin-bottom: 4px;
}
.field-value {
  font-size: var(--fs-base);
  color: var(--text);
  font-weight: 500;
  line-height: var(--lh-base);
}
.field-value a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed var(--border-strong);
  transition: color var(--dur-fast) var(--ease);
}
.field-value a:hover { color: var(--accent); border-color: var(--accent); }
.field-value-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 400;
  line-height: var(--lh-relaxed);
}
.field-value.mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
  letter-spacing: 0.04em;
}

/* simple titled card ("Заметки", "Отзывы") */
.card-title {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: var(--tracking-tight);
}

/* compact card for notes (paired in a row) */
.notes-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-grid-gap);
}
.note-text {
  font-size: var(--fs-base);
  color: var(--text-muted);
  line-height: var(--lh-relaxed);
}

/* subscription / abonement card with corner badge */
.sub-card { position: relative; }
.sub-badge {
  position: absolute;
  top: 18px; right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--success-bg);
  color: var(--success-text);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.sub-label {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 8px;
}
.sub-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: var(--tracking-tight);
}
.sub-meta {
  font-size: 13px;
  color: var(--text-muted);
}

/* reviews list inside a card */
.review {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.review:first-of-type { padding-top: 0; }
.review:last-child { border-bottom: none; padding-bottom: 0; }
.review-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.review-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FCD34D, #F472B6);
  color: var(--text-on-accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.review-avatar.b2 { background: linear-gradient(135deg, #93C5FD, #818CF8); }
.review-avatar.b3 { background: linear-gradient(135deg, #C4B5FD, #818CF8); }
.review-name { font-size: 13px; font-weight: 600; color: var(--text); }
.review-date { font-size: var(--fs-sm); color: var(--text-faint); }
.review-text { font-size: var(--fs-base); color: var(--text-muted); line-height: var(--lh-relaxed); }

/* star rating — sits at the right edge of .review-head, pushed by margin-auto */
.review-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.review-star {
  width: 14px; height: 14px;
  color: var(--border-strong);
  fill: transparent;
  flex-shrink: 0;
}
.review-star.filled {
  color: #F59E0B;
  fill: currentColor;
}

/* reply trigger — sits below .review-text. View-only mockup: opens an inline
   reply form in JS later (textarea + "Видно всем" checkbox + submit). */
.review-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.review-reply-btn:hover { background: var(--accent-soft); color: var(--accent); }
.review-reply-btn svg { width: 13px; height: 13px; }

/* ============ SECTION (table-like list block) ============ */
.section {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 26px 14px;
}
.section-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}
.section-meta {
  font-size: 13px;
  color: var(--text-faint);
  font-weight: 500;
}
.section-spacer { flex: 1; }
.filter-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.filter-btn:hover { background: white; color: var(--text); }
.filter-btn svg { width: 16px; height: 16px; }

/* ---- FILTER DROPDOWN (multi-section popover) ----
   `<details class="action-menu filter-menu">` wraps a `<summary
   class="filter-btn">` trigger and a `<div class="action-menu-pop
   filter-pop">` panel. The panel groups checkbox-style `.filter-item`s
   into named sections with `.filter-pop-section-head` labels and an
   optional `.filter-pop-sep` between them; the `.filter-pop-foot`
   pins Сбросить/Применить at the bottom. */
summary.filter-btn {
  list-style: none;
  position: relative;
}
summary.filter-btn::-webkit-details-marker { display: none; }
summary.filter-btn::marker { content: ''; }
details.filter-menu[open] .filter-btn {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-soft-2);
}
.filter-btn-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 14px; height: 14px;
  padding: 0 4px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px white;
  pointer-events: none;
}
.filter-pop {
  min-width: 260px;
  right: 0; left: auto;        /* anchor right edge to the trigger */
  padding: 6px;
  z-index: 9999;
  /* Cap height so a long popover (many sections / many items) stays
     inside the viewport. The inner items + footer scroll if needed. */
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* `.section` ships with `overflow: hidden` to clip rounded-corner tables
   inside it. Inside the 3 client tabs (trainings / services / purchases)
   the filter-menu pops out of that box — so let the section spill when
   any filter-menu is mounted. Other sections (clients-list table, etc.)
   keep their clipping. */
.section:has(details.filter-menu) {
  overflow: visible;
}
.filter-pop-section-head {
  padding: 8px 10px 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Collapsible section — wraps long lists (trainers, studios) so the
   popover stays compact. Uses nested `<details>` for CSS-only toggle.
   Summary mimics .filter-pop-section-head but is clickable, with a
   selected-count badge and a chevron that rotates on `[open]`. */
details.filter-pop-collapsible { margin: 0; }
details.filter-pop-collapsible > summary.filter-pop-collapsible-head {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  transition: color var(--dur-fast) var(--ease);
}
details.filter-pop-collapsible > summary::-webkit-details-marker { display: none; }
details.filter-pop-collapsible > summary::marker { content: ''; }
details.filter-pop-collapsible > summary:hover,
details.filter-pop-collapsible[open] > summary { color: var(--text-muted); }
.filter-pop-section-count {
  margin-left: auto;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0;
  text-transform: none;
}
.filter-pop-chevron {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease);
  color: var(--text-faint);
}
details.filter-pop-collapsible[open] > summary .filter-pop-chevron {
  transform: rotate(180deg);
}
.filter-pop-collapsible-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 2px;
}
.filter-pop-sep {
  height: 1px;
  background: var(--hairline);
  margin: 4px 6px;
}
.filter-pop-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px 4px;
  margin-top: 6px;
  border-top: 1px solid var(--hairline);
}
.filter-pop-foot > button {
  flex: 1;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
}

/* ---- FILTER-ITEM (row inside .filter-pop) ---- */
.filter-item {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease);
}
.filter-item:hover { background: var(--accent-soft); color: var(--accent); }
.filter-item.is-selected {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.filter-item-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.filter-item.is-selected .filter-item-count { color: var(--accent); }
.filter-item:hover .field-checkbox { border-color: var(--accent); }

/* ---- FIELD-CHECKBOX (reusable styled checkbox primitive) ----
   A 14×14 box used as a visual checkbox inside dropdowns / lists.
   `.is-checked` fills it with --accent and draws a white tick;
   the consumer is responsible for the `<svg>` glyph child. */
.field-checkbox {
  width: 14px; height: 14px;
  border: 1.5px solid rgba(20,20,60,0.18);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #fff;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
  flex-shrink: 0;
}
.field-checkbox.is-checked {
  background: var(--accent);
  border-color: var(--accent);
}
.filter-btn.with-text {
  width: auto;
  height: 34px;
  padding: 0 14px;
  gap: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* row pattern shared by services / trainings */
.row-list { display: flex; flex-direction: column; }
.row-item {
  display: grid;
  align-items: center;
  gap: 18px;
  padding: 16px 26px;
  border-top: 1px solid var(--border);
  transition: background var(--dur-fast) var(--ease);
}
.row-item:hover { background: var(--surface-pressed); }

/* themed activity icon (used in row-item) */
.activity-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.activity-icon svg { width: 18px; height: 18px; }
.activity-icon.massage   { background: linear-gradient(135deg, #FCE7F3, #FBCFE8); color: #BE185D; }
.activity-icon.nutrition { background: linear-gradient(135deg, #DCFCE7, #BBF7D0); color: #15803D; }
.activity-icon.spa       { background: linear-gradient(135deg, #EDE9FE, #DDD6FE); color: #6D28D9; }
.activity-icon.cardio    { background: linear-gradient(135deg, #FEE4E2, #FECACA); color: #B91C1C; }
.activity-icon.strength  { background: linear-gradient(135deg, #FEF3C7, #FDE68A); color: #92400E; }
.activity-icon.yoga      { background: linear-gradient(135deg, #DBEAFE, #BFDBFE); color: #1E40AF; }

/* ============ STATUS PILL (for table rows) ============ */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}
.s-success { background: var(--success-bg); color: var(--success-text); }
.s-warning { background: var(--warning-bg); color: var(--warning-text); }
.s-danger  { background: var(--danger-bg);  color: var(--danger-text); }
.s-info    { background: var(--info-bg);    color: var(--info-text); }
.s-neutral { background: var(--neutral-bg); color: var(--text-muted); }

/* ============ FAVORITES STRIP (icon · value · meta cards in a row) ============ */
.favorites-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-grid-gap);
}
.fav-card {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fav-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.fav-head svg {
  width: 14px; height: 14px;
  color: var(--accent);
}
.fav-value {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text);
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-tight);
}
.fav-meta {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============ TRAINING ROWS (5-column grid: date | activity | sub | status | action) ============ */
.training-list { display: flex; flex-direction: column; }
.training-row {
  display: grid;
  grid-template-columns: 130px 1fr 220px 160px 32px;
  align-items: center;
  gap: 18px;
  padding: 16px 26px;
  border-top: 1px solid var(--border);
  transition: background var(--dur-fast) var(--ease);
}
.training-row:hover { background: var(--surface-pressed); }
.tr-date { display: flex; flex-direction: column; gap: 2px; }
.tr-date-main { font-size: var(--fs-base); font-weight: 700; color: var(--text); }
.tr-date-sub  { font-size: var(--fs-sm); color: var(--text-faint); }

.tr-activity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tr-info { min-width: 0; }
.tr-name { font-size: var(--fs-base); font-weight: 600; color: var(--text); margin-bottom: 2px; }
.tr-details {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tr-sub { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tr-sub-name { font-size: 13px; font-weight: 600; color: var(--text); }
.tr-sub-meta { font-size: var(--fs-sm); color: var(--text-muted); }

/* Service-specific column-3 content (replaces .tr-sub on .training-row when
   the row is a service booking). Has a `.paid` meta variant with a green
   dot for paid one-off visits. */
.sv-bundle { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sv-bundle-name { font-size: 13px; font-weight: 600; color: var(--text); }
.sv-bundle-meta { font-size: var(--fs-sm); color: var(--text-muted); }
.sv-bundle-meta.paid {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success-text);
  font-weight: 500;
}
.tr-status { display: flex; justify-content: flex-end; }

.tr-action {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.tr-action:hover { background: var(--danger-bg); color: var(--danger); }
.tr-action:disabled { opacity: 0.4; cursor: default; }
.tr-action:disabled:hover { background: transparent; color: var(--text-faint); }
.tr-action svg { width: 14px; height: 14px; }

/* ============ STATS STRIP ============ */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-grid-gap);
}
.stat {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 18px 20px 14px;
  position: relative;
  overflow: hidden;
}
.stat-label {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow); /* eyebrow canon 700 / 0.10em (D-06) */
  margin-bottom: 8px;
}
.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: var(--tracking-amount);
  line-height: 1;
}
.stat-value .unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
  margin-left: 4px;
}
.stat-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--success-text);
  margin-top: 8px;
}
.stat-delta svg { width: 12px; height: 12px; }
.stat-delta.neg { color: var(--danger-text); }
.stat-delta.flat { color: var(--text-muted); }

.sparkline {
  position: absolute;
  bottom: 12px;
  right: 14px;
  width: 64px;
  height: 26px;
  color: var(--accent);
  pointer-events: none;
}
.sparkline.up   { color: var(--success); }
.sparkline.down { color: var(--danger); }
.sparkline.flat { color: var(--text-faint); }

/* ============ PROGRESS ============ */
.progress {
  height: 6px;
  background: var(--neutral-bg);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: 14px 0 8px;
}
.progress-fill {
  height: 100%;
  background: var(--accent-grad);
  border-radius: inherit;
  transition: width var(--dur-base) var(--ease);
}
.progress-fill.warning { background: linear-gradient(135deg, var(--warning), #FB923C); }
.progress-fill.danger  { background: linear-gradient(135deg, var(--danger), #F87171); }
.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 500;
}

/* ============ ACTION MENU (CSS-only dropdown via <details>) ============ */
.action-menu {
  position: relative;
  display: inline-block;
}
/* hide the default disclosure marker */
.action-menu summary { list-style: none; cursor: pointer; }
.action-menu summary::-webkit-details-marker { display: none; }
.action-menu summary::marker { content: ''; }
/* One Voice (D-02): the menu trigger is a NEUTRAL control, not the saturated
   indigo voice. .action-trigger carries its own neutral surface styling so the
   markup no longer composes it with .btn-primary. Only .btn-primary keeps the
   indigo voice. */
.action-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.action-trigger:hover { background: var(--surface-hover); border-color: var(--border-strong); }
/* rotate chevron when open */
.action-menu[open] .action-trigger > svg { transform: rotate(180deg); }
.action-trigger > svg {
  transition: transform var(--dur-fast) var(--ease);
}

.action-menu-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--surface-hover);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 50;
}
.action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.action-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.action-item svg {
  width: 14px; height: 14px;
  color: var(--text-faint);
  flex-shrink: 0;
}
.action-item:hover svg { color: var(--accent); }
.action-item.danger { color: var(--danger-text); }
.action-item.danger:hover { background: var(--danger-bg); color: var(--danger-text); }
.action-item.danger svg { color: var(--danger); }
.action-item.danger:hover svg { color: var(--danger); }

/* ============ PAGINATION ============ */
.pagination-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  border-top: 1px solid var(--border);
}
.pagination-info {
  font-size: var(--fs-sm);
  color: var(--text-faint);
  flex: 1;
}
.pagination { display: flex; gap: 6px; align-items: center; }
.page-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.page-btn:hover { background: white; color: var(--text); }
.page-btn.active { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); }
.page-btn svg { width: 14px; height: 14px; }
.page-dots { color: var(--text-faint); padding: 0 4px; }

/* ============ PURCHASE-ROW EXTENSIONS (iter 8) ============
   .training-row col-4 stack: status pill above, amount below, right-aligned.
   .tr-action.info: secondary-action variant for non-destructive icon buttons
   (e.g. "view receipt") — info-tinted hover instead of danger.
   .list-month-* + .list-total: month-grouped list patterns inside .training-list. */
.tr-status.stack {
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.tr-amount {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text);
  letter-spacing: var(--tracking-tight);
}
.tr-amount.pos { color: var(--success-text); }
.tr-amount.neg { color: var(--danger-text); }
.tr-action.info:hover { background: var(--info-bg); color: var(--info-text); }

.list-month-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 26px 8px;
  border-top: 1px solid var(--border);
}
.list-month-head:first-child { border-top: 0; }
.list-month-label {
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-faint);
}
.list-month-summary {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.list-month-summary strong {
  color: var(--text);
  font-weight: 700;
}

.list-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 26px;
  border-top: 1px solid var(--border);
  font-size: var(--fs-base);
  color: var(--text-muted);
}
.list-total strong {
  font-weight: 800;
  font-size: var(--fs-md);
  color: var(--text);
  letter-spacing: var(--tracking-tight);
}

/* ============ FINANCE LIST ============
   Generic two-column row with label/info on the left and an amount on the right.
   Used for both the balance-summary block (4 rows including a `.total` row) and
   the day-grouped operations list (left = .tr-info title+sub, right = .tr-amount
   with .pos / .neg color). Lives inside a `.section`, alongside `.list-month-head`
   for day grouping. */
.fin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 26px;
  border-top: 1px solid var(--border);
}
.fin-row:first-child { border-top: 0; }
.fin-row-label {
  font-size: var(--fs-base);
  color: var(--text-muted);
}
.fin-row.total { padding-top: 18px; padding-bottom: 18px; }
.fin-row.total .fin-row-label { color: var(--text); font-weight: 700; }
.fin-row.total .tr-amount { font-size: var(--fs-md); font-weight: 800; }

/* ============ DOCUMENT ROW ============
   Used inside a `.section` for Справки (tax certificates) and Договоры (contracts).
   Grid: icon (36px) / info (1fr) / status pill (auto) / actions cluster (auto).
   Each row separated by hairline border-top; first row has no top border so the
   list reads as a continuous block under the section-header. */
.doc-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  border-top: 1px solid var(--border);
}
.doc-row:first-of-type { border-top: 0; }
.doc-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.doc-icon svg { width: 18px; height: 18px; }
.doc-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.doc-action {
  background: transparent;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.doc-action:hover { background: var(--accent-soft); color: var(--accent); }
.doc-kebab {
  width: 30px; height: 30px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-faint);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.doc-kebab:hover { background: var(--accent-soft); color: var(--accent); }
.doc-kebab svg { width: 16px; height: 16px; }

/* ============ PAGE HERO (list-view top block: H1 + 3 KPI stats) ============
   2-col panel that sits between topbar and the list toolbar. Left column holds
   the page H1 + sub-info line + primary create action; right column holds a
   3-up KPI strip (reuses existing `.stats-row` + `.stat`). Used by clients-list
   and, later, employees / trainers / orders lists.

   Layout note: collapses to a single column on narrow viewports.
*/
.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: var(--space-grid-gap);
  align-items: stretch;
}
.page-hero-left {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
.page-hero-eyebrow {
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--text-faint);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}
.page-hero-title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  color: var(--text);
  line-height: var(--lh-tight);
}
.page-hero-sub {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}
.page-hero-sub strong { color: var(--text); font-weight: 700; }
.page-hero-sub .sep {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--text-faint);
}
.page-hero-sub .gain { color: var(--success-text); font-weight: 600; }

/* ============ COMPACT SEARCH ROW (in-content list filter, not topbar) ============ */
.search-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.search-compact {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.search-compact svg { width: 14px; height: 14px; color: var(--text-faint); flex-shrink: 0; }
.search-compact input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: var(--fs-base);
  color: var(--text);
}
.search-compact input::placeholder { color: var(--text-faint); }

/* ============ LIST TOOLBAR (segmented tabs row + right-side cluster) ============ */
.list-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.list-toolbar-spacer { flex: 1; }

/* ============ DATA TABLE (clients-list and other list views) ============
   Wraps a real <table> inside a `.section`. Header cells carry sort + filter
   icon buttons inline with the column label. Rows are hoverable; row avatars
   are 40px circular with a presence dot. Numeric columns right-align via
   `.col-num`. Last column (`.col-actions`) reveals icon buttons on row hover.
*/
.table-wrap {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-hover);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table thead th.col-num { text-align: right; }
.data-table th .th-tools {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  vertical-align: middle;
  opacity: 0.5;
  transition: opacity var(--dur-fast) var(--ease);
}
.data-table th:hover .th-tools { opacity: 1; }
.data-table th .th-tool-btn {
  width: 18px; height: 18px;
  border-radius: 5px;
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.data-table th .th-tool-btn:hover { background: var(--accent-soft); color: var(--accent); }
.data-table th .th-tool-btn svg { width: 11px; height: 11px; }
.data-table tbody td {
  padding: 12px 14px;
  border-top: 1px solid var(--hairline);
  vertical-align: middle;
  color: var(--text);
}
.data-table tbody tr { transition: background var(--dur-fast) var(--ease); }
.data-table tbody tr:hover { background: var(--surface-pressed); }
.data-table tbody tr.selected { background: var(--accent-soft); }
.data-table .col-check { width: 36px; padding-right: 0; }
.data-table .col-check input { cursor: pointer; }
.data-table .col-num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .col-actions { width: 90px; text-align: right; padding-right: 22px; }

/* row avatar (40px circle with initials — no outer ring, no presence dot) */
.row-avatar {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: #6D28D9;
  background: var(--grad-avatar);
  flex-shrink: 0;
}
.row-avatar.v1 { background: linear-gradient(135deg, #DDD6FE, #FBCFE8); color: #6D28D9; }
.row-avatar.v2 { background: linear-gradient(135deg, #BFDBFE, #DDD6FE); color: #4338CA; }
.row-avatar.v3 { background: linear-gradient(135deg, #FCD34D, #F472B6); color: #BE185D; }
.row-avatar.v4 { background: linear-gradient(135deg, #BBF7D0, #93C5FD); color: #047857; }
.row-avatar.v5 { background: linear-gradient(135deg, #FECACA, #FDE68A); color: #B45309; }
.row-avatar.v6 { background: linear-gradient(135deg, #C4B5FD, #93C5FD); color: #3730A3; }
.row-avatar .presence { display: none; }

/* client cell: avatar + name stack */
.client-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.client-cell-body { min-width: 0; }
.client-cell-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.client-cell-name .vip-star {
  width: 12px; height: 12px;
  color: #F59E0B;
  fill: currentColor;
  flex-shrink: 0;
}
.client-cell-sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.client-cell-sub .sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-faint);
  display: inline-block;
}
.id-mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

/* status-stack: status-pill above small sub-hint */
.status-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.status-stack .sub-hint {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 500;
}

/* cell helpers */
.cell-mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
  letter-spacing: 0.02em;
  color: var(--text);
}
.cell-muted { color: var(--text-muted); }
.cell-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.cell-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* balance-cell (right-aligned mono amount + faint currency suffix) */
.balance-cell {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.balance-cell.pos { color: var(--text); }
.balance-cell.neg { color: var(--danger-text); }
.balance-cell.zero { color: var(--text-faint); font-weight: 500; }
.balance-cell .cur {
  color: var(--text-faint);
  font-weight: 500;
  font-size: 0.9em;
}

/* row-actions (icon buttons revealed on row hover) */
.row-actions {
  display: inline-flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
}
.data-table tbody tr:hover .row-actions,
.data-table tbody tr.selected .row-actions { opacity: 1; }
.row-icon-btn {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.row-icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.row-icon-btn svg { width: 14px; height: 14px; }

/* table-footer (rows-per + total + paginator) */
.table-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.table-footer-left {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.table-footer-spacer { flex: 1; }
.rows-per {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.rows-per select {
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 4px 8px;
  cursor: pointer;
}
.foot-total strong { color: var(--text); font-weight: 700; }
.foot-total.muted { color: var(--text-faint); }
.foot-sep {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--text-faint);
  display: inline-block;
}

/* ============ DRAWER SHELL (right-side modal panel, iter-10) ============
   Used by Create Client, Filters, Book, New Sale, Tax Cert, Topup, Account
   History, Refund. Markup: `.drawer-scrim` (full-viewport dimming overlay)
   followed by `<aside class="drawer">` (panel itself). Both default to
   `hidden`; remove the attribute (or toggle via JS) to open. Panel slides
   in from the right edge.
*/
.drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 60, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  animation: drawer-scrim-fade var(--dur-base) var(--ease);
}
.drawer-scrim[hidden] { display: none; }
@keyframes drawer-scrim-fade { from { opacity: 0; } to { opacity: 1; } }

.drawer {
  position: fixed;
  top: 18px; right: 18px; bottom: 18px;
  width: min(560px, calc(100vw - 36px));
  z-index: 101;
  background: var(--surface-hover);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: drawer-slide-in var(--dur-base) var(--ease);
}
.drawer[hidden] { display: none; }
@keyframes drawer-slide-in {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.drawer.drawer-wide { width: min(720px, calc(100vw - 36px)); }

.drawer-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, transparent 100%);
}
.drawer-head-left { flex: 1; min-width: 0; }
.drawer-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.drawer-eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.drawer-title {
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  color: var(--text);
  line-height: var(--lh-tight);
  margin: 0 0 8px;
}
.drawer-sub {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.drawer-sub .dot-sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-faint);
  display: inline-block;
}
.avatar-xxs {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--grad-avatar);
  background-size: cover;
  background-position: center;
  display: inline-block;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.drawer-close {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.drawer-close:hover { background: var(--danger-bg); color: var(--danger-text); }
.drawer-close svg { width: 18px; height: 18px; }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.drawer-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--accent);
  font-weight: 500;
}
.drawer-hint svg { width: 13px; height: 13px; flex-shrink: 0; }

.drawer-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-top: 1px solid var(--border);
  background: linear-gradient(0deg, rgba(255,255,255,0.6) 0%, transparent 100%);
}
.drawer-foot.drawer-foot-simple { justify-content: flex-end; }
.drawer-foot.drawer-foot-spread { justify-content: space-between; }
.drawer-foot-actions { display: inline-flex; gap: 10px; margin-left: auto; }

/* ============ DRAWER-CALLOUT (inline notice block) ============
   Tinted card for status messages inside a drawer body. `.s-warning`
   (amber) for cautionary states; `.s-success` (green) for confirmations;
   `.s-danger` (red) for destructive warnings. Reuses the global
   `--*-bg` / `--*-text` token pairs. */
.drawer-callout {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin: 14px 0 18px;
  align-items: flex-start;
}
.drawer-callout .callout-icon {
  width: 22px; height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}
.drawer-callout .callout-body { flex: 1; }
.drawer-callout .callout-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}
.drawer-callout .callout-text {
  font-size: 12px;
  line-height: 1.5;
}
.drawer-callout .callout-text em {
  font-style: normal;
  font-weight: 700;
}
.drawer-callout.s-warning { background: var(--warning-bg); color: var(--warning-text); }
.drawer-callout.s-success { background: var(--success-bg); color: var(--success-text); }
.drawer-callout.s-danger  { background: var(--danger-bg);  color: var(--danger-text); }
.drawer-callout.s-info    { background: var(--info-bg);    color: var(--info-text); }

/* ============ CANCEL-BOOKING PRIMITIVES ============
   `.cb-session` is the read-only session summary card at the top of the
   cancel-booking drawer (icon · title · meta). `.cb-balance` is the
   before/after subscription-balance breakdown that follows the callout.
   Both are scoped to the cancel-booking drawer family; promote if they
   show up in other "confirm an action" drawers. */
.cb-session {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.cb-session-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cb-session-icon svg { width: 18px; height: 18px; }
.cb-session-icon.spa      { background: var(--success-bg); color: var(--success-text); }
.cb-session-icon.strength { background: var(--accent-soft); color: var(--accent); }
.cb-session-info { min-width: 0; flex: 1; }
.cb-session-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.cb-session-meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.cb-balance {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cb-balance-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 13px;
}
.cb-balance-label { color: var(--text-muted); }
.cb-balance-value {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cb-balance-row.cb-balance-total {
  border-top: 1px solid var(--hairline);
  padding-top: 8px;
  margin-top: 4px;
}
.cb-balance-row.cb-balance-total .cb-balance-label,
.cb-balance-row.cb-balance-total .cb-balance-value {
  font-weight: 700;
  font-size: 14px;
}
.cb-balance-value.cb-balance-pos { color: var(--success-text); }
.cb-balance-value.cb-balance-neg { color: var(--danger-text); }
.cb-balance-delta {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  margin-left: 6px;
  border-radius: 4px;
  background: var(--danger-bg);
  color: var(--danger-text);
  font-size: 11px;
  font-weight: 700;
}

/* ============ FORM PRIMITIVES (form-section, field, field-box, field-input) ============
   Form pattern shared by all drawers. `.form-section` groups labelled fields,
   `.field` is one labelled control, `.field-box` wraps the input so trailing
   icons can be positioned. `.req` is the red asterisk in labels.
*/
.form-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 6px;
}
.form-section-title .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: var(--text-on-accent);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0;
}
.form-section-title .opt {
  margin-left: 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-faint);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-stack { display: flex; flex-direction: column; gap: 8px; }
.tdr-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.tdr-label.inline-label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: var(--text); }
.req {
  color: var(--danger);
  font-weight: 700;
  margin-right: 2px;
}
.tdr-hint {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-faint);
}

.field-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
/* Hide the browser-native calendar/time picker glyph for `<input type="date|time">`
   inside a `.field-box`. The DS already pairs each input with a styled
   `.field-ico` SVG; the native indicator duplicates it (and renders as a
   black square in WebKit). Click anywhere in the field still opens the
   picker because the indicator stays as a transparent layer over the input. */
.field-box input[type="date"]::-webkit-calendar-picker-indicator,
.field-box input[type="time"]::-webkit-calendar-picker-indicator,
.field-box input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.field-box input[type="month"]::-webkit-calendar-picker-indicator,
.field-box input[type="week"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  cursor: pointer;
}
.field-box:focus-within {
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.field-input {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 10px 14px;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
}
.field-input::placeholder { color: var(--text-faint); }
select.field-input { cursor: pointer; padding-right: 36px; }
.field-ico {
  position: absolute;
  right: 12px;
  width: 14px; height: 14px;
  color: var(--text-faint);
  pointer-events: none;
}
.field-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  font-family: inherit;
  font-size: var(--fs-base);
  color: var(--text);
  resize: vertical;
  min-height: 64px;
  transition: border-color var(--dur-fast) var(--ease);
}
.field-textarea:focus { border-color: var(--accent); background: white; }

.field-grid { display: grid; gap: 12px; }
.field-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.field-grid.address-row { grid-template-columns: 1.6fr 80px 80px 70px; }
.field-grid.passport-row { grid-template-columns: 110px 1fr; }

/* row-with-link — label on the left, optional secondary link/hint on the right */
.row-with-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.row-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.row-link:hover { text-decoration: underline; }
.row-link svg { width: 11px; height: 11px; }
.row-hint {
  font-size: var(--fs-xs);
  color: var(--text-faint);
}

/* ============ KIND SWITCH (pill-style segmented control) ============ */
.kind-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.kind-pill {
  flex: 1;
  min-width: 64px;
  padding: 8px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.kind-pill:hover { color: var(--text); }
.kind-pill.active {
  background: var(--accent-grad);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-sm);
}

/* ============ PHOTO DROPZONE (create-client) ============ */
.profile-row {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 14px;
  align-items: stretch;
}
.names-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.photo-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 12px;
  background: var(--surface-soft);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.photo-dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.photo-dropzone .ico-plus {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.photo-hint { font-size: 10px; color: var(--text-faint); text-align: center; line-height: var(--lh-tight); }

/* ============ CUSTOM FIELDS (create-client section 6) ============ */
.custom-fields-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.custom-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr 36px;
  gap: 10px;
  align-items: center;
}
.custom-field-remove {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-faint);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.custom-field-remove:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-bg); }
.add-field-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  transition: background var(--dur-fast) var(--ease);
}
.add-field-btn:hover { background: var(--accent-soft); }
.add-field-btn svg { width: 13px; height: 13px; }

/* ============ FILTER RANGE (filters drawer slider) ============ */
.filter-range { gap: 10px; }
.filter-range-input {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 4px;
  background: var(--neutral-bg);
  border-radius: 999px;
  outline: none;
}
.filter-range-input::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--accent);
  border: 3px solid white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(20, 20, 60, 0.15);
}
.filter-range-input::-moz-range-thumb {
  width: 18px; height: 18px;
  background: var(--accent);
  border: 3px solid white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(20, 20, 60, 0.15);
}
.filter-range-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.filter-range-value { color: var(--text); }
.filter-range-value strong { font-weight: 700; }

/* ============ PERIOD GRID (tax cert year picker) ============ */
.period-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.period-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.period-card:hover { border-color: var(--accent); }
.period-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.period-year {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text);
}
.period-amt {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.period-card.active .period-amt { color: var(--accent); }

/* ============ RECIPIENT GRID (tax cert recipient picker) ============ */
.recipient-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.recipient-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.recipient-card:hover { border-color: var(--accent); }
.recipient-card.active { border-color: var(--accent); background: var(--accent-soft); }
.recipient-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.recipient-name { font-size: var(--fs-base); font-weight: 600; color: var(--text); }
.recipient-name.muted { color: var(--text-faint); font-weight: 500; }

/* ============ TAX SUMMARY (tax cert) ============ */
.tax-summary {
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-2);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.tax-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.tax-row-title { font-size: var(--fs-base); font-weight: 700; color: var(--text); }
.tax-row-sub { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 2px; }
.tax-row-amt { text-align: right; }
.tax-row-amt-main {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: var(--tracking-tight);
}
.tax-row-amt-sub { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 2px; }

.drawer-foot.drawer-foot-tax {
  justify-content: space-between;
  gap: 14px;
}
.tax-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.tax-hint-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.tax-actions { display: inline-flex; gap: 10px; }

/* ============ TOPUP AMOUNT (large input with trailing ₽) ============ */
.topup-amount {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 16px 4px 4px;
}
.topup-amount:focus-within { border-color: var(--accent); background: white; }
.topup-amount .field-input {
  font-size: var(--fs-lg);
  font-weight: 700;
  padding: 8px 14px;
  font-variant-numeric: tabular-nums;
}
.topup-amount-unit {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text-muted);
}

/* ============ ACCOUNT HISTORY (acct-hist drawer) ============
   `.ah-summary` is a 4-row balance block (start / + / − / end). `.ah-list`
   groups operations by day; each `.ah-day` has a `.ah-day-head` label and
   one or more `.ah-op` rows (meta on the left + amount on the right with
   `.credit` green or `.spend` red).
*/
.ah-range {
  display: grid;
  grid-template-columns: 1fr 12px 1fr;
  gap: 8px;
  align-items: center;
}
.ah-range > .field-input {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.ah-range > .field-input:focus { border-color: var(--accent); }
.ah-range-sep {
  text-align: center;
  color: var(--text-faint);
  font-weight: 600;
}

/* Kind-filter for the account-history drawer (Все / Депозит / Баллы).
   The existing `.kind-switch` click handler in drawers.js toggles `.active`
   on the clicked pill; these `:has()` rules then drive section visibility
   in pure CSS — no extra JS needed.

   Three section-states tagged via `data-kind` attribute:
     • `data-kind="combined"` — unified summary (₽ and баллы side-by-side)
        + merged ops list with per-op kind chip. Shown only on "Все".
     • `data-kind="deposit"`  — Депозит-only summary + ops. Hidden on "Все"
        (combined replaces it) and on "Баллы".
     • `data-kind="points"`   — Баллы-only. Hidden on "Все" and "Депозит". */
/* `:not(.kind-pill)` keeps the pills themselves visible — they share the
   `data-kind` attribute with the content sections they target.            */
.drawer-body:has(.kind-pill[data-kind="all"].active)     [data-kind="deposit"]:not(.kind-pill),
.drawer-body:has(.kind-pill[data-kind="all"].active)     [data-kind="points"]:not(.kind-pill)   { display: none; }
.drawer-body:has(.kind-pill[data-kind="deposit"].active) [data-kind="points"]:not(.kind-pill),
.drawer-body:has(.kind-pill[data-kind="deposit"].active) [data-kind="combined"]:not(.kind-pill) { display: none; }
.drawer-body:has(.kind-pill[data-kind="points"].active)  [data-kind="deposit"]:not(.kind-pill),
.drawer-body:has(.kind-pill[data-kind="points"].active)  [data-kind="combined"]:not(.kind-pill) { display: none; }

.ah-kind-switch { width: 100%; }

/* Combined summary — 3-col rows (label | ₽ value | баллы value). */
.ah-summary-combined .ah-summary-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: baseline;
}
.ah-summary-combined .ah-summary-value + .ah-summary-value {
  min-width: 88px;
  text-align: right;
}

/* Per-op kind chip (only in the merged "Все" list). The .ah-op-right group
   stacks amount above the chip so the chip sits flush under the amount. */
.ah-op-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.ah-op-kind {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.ah-op-kind.kind-deposit { background: var(--accent-soft); color: var(--accent); }
.ah-op-kind.kind-points  { background: var(--warning-bg);  color: var(--warning-text); }

/* Section sub-head inside the drawer body — splits the history into two
   balance domains (Депозит / Баллы). Lives only in `_drawer-acct-hist.html`;
   if a second consumer appears, promote to a generic `.drawer-section-head`. */
.ah-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ah-section-head:first-child { margin-top: 4px; }
.ah-section-head svg { width: 14px; height: 14px; color: var(--accent); }

.ah-summary {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ah-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--fs-sm);
}
.ah-summary-label { color: var(--text-muted); }
.ah-summary-value { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ah-summary-value.ah-pos { color: var(--success-text); }
.ah-summary-value.ah-neg { color: var(--danger-text); }
.ah-summary-row.ah-summary-total {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 2px;
  font-size: var(--fs-base);
}
.ah-summary-row.ah-summary-total .ah-summary-label,
.ah-summary-row.ah-summary-total .ah-summary-value {
  color: var(--text);
  font-weight: 700;
}

.ah-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ah-day {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ah-day-head {
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-faint);
}
.ah-op {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.ah-op-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ah-op-title { font-size: var(--fs-base); font-weight: 600; color: var(--text); }
.ah-op-sub { font-size: var(--fs-sm); color: var(--text-muted); }
.ah-op-amt {
  font-size: var(--fs-base);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ah-op-amt.ah-op-credit { color: var(--success-text); }
.ah-op-amt.ah-op-spend  { color: var(--danger-text); }

/* ============ SALE SUMMARY (new-sale, refund) ============ */
.sale-summary {
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-2);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sale-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.sale-row .muted { color: var(--text-faint); }
.sale-row.sale-row-total {
  border-top: 1px solid var(--accent-soft-2);
  padding-top: 8px;
  margin-top: 2px;
  font-size: var(--fs-md);
  color: var(--text);
  font-weight: 700;
}
.sale-row.sale-row-total > span:last-child { color: var(--accent); font-weight: 800; letter-spacing: var(--tracking-tight); }
.sale-row.sale-row-paid { font-size: var(--fs-sm); }
.sale-row.sale-row-paid .paid-amount { color: var(--success-text); font-weight: 700; }

/* ============ PAY ROWS (new-sale: payment splitter) ============
   Grid: method-select / inline-hint / amount-input / remove-X. Each row is
   one payment method + amount. Rows wrap when narrower; minimum 3 columns.
*/
.pay-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.pay-row {
  display: grid;
  grid-template-columns: 1fr minmax(0, auto) 110px 32px;
  gap: 8px;
  align-items: center;
}
.pay-method { min-width: 0; }
.pay-method-meta {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  white-space: nowrap;
}
.pay-amount { width: 110px; }
.pay-remove {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.pay-remove:hover { background: var(--danger-bg); color: var(--danger); }
.pay-remove svg { width: 14px; height: 14px; }
.pay-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  margin-top: 8px;
  transition: background var(--dur-fast) var(--ease);
}
.pay-add:hover { background: var(--accent-soft); }
.pay-add svg { width: 13px; height: 13px; }

/* ============ REFUND INFO (refund: deposit balance display) ============ */
.refund-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.refund-info > span { font-size: var(--fs-sm); color: var(--text-muted); }
.refund-info > strong {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--text);
  letter-spacing: var(--tracking-tight);
  font-variant-numeric: tabular-nums;
}

/* ============ BTN-GHOST (subtle cancel button used in drawer footers) ============ */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.btn-ghost:hover { background: var(--surface-pressed); color: var(--text); }

/* ============================================================
   AUTH SCREEN CONTENT BLOCKS
   Composes the inside of an .auth-card: logo, eyebrow/title/sub
   head, form, between-field row, footer link strip.
   ============================================================ */

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.auth-logo .logo-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--grad-logo);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-on-accent);
  font-weight: 800;
  font-size: var(--fs-md);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
}
.auth-logo-text {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--text);
}

.auth-head { display: flex; flex-direction: column; gap: 8px; }
.auth-head.center { align-items: center; text-align: center; }
.auth-eyebrow {
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  /* One Voice (D-02): faint, not the saturated indigo voice. */
  color: var(--text-faint);
}
.auth-title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-tight);
  color: var(--text);
}
.auth-title.sm { font-size: var(--fs-xl); }
.auth-sub {
  font-size: var(--fs-base);
  color: var(--text-muted);
  line-height: var(--lh-base);
}
.auth-sub strong { color: var(--text); font-weight: 700; }

.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-form .field-box { background: var(--surface-hover); }

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

.auth-link {
  color: var(--accent);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
}
.auth-link:hover { text-decoration: underline; }

.auth-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  padding-top: 4px;
}
.auth-foot a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.auth-foot a:hover { text-decoration: underline; }

/* ============ BTN-BLOCK (full-width button modifier) ============ */
/* Pair with .btn-primary / .btn-secondary / .btn-ghost on auth and drawer
   primary actions where the button spans the whole surface. */
.btn-block {
  width: 100%;
  justify-content: center;
  padding: 14px 18px;
  font-size: var(--fs-md);
}

/* ============ CHECK-ROW (accent checkbox + inline label) ============ */
/* Generic minimal checkbox row. Currently used by auth-screen "Запомнить
   меня" / "Доверять браузеру". Reusable wherever a single quiet checkbox
   sits next to its label. */
.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.auth-check input {
  accent-color: var(--accent);
  width: 16px; height: 16px;
  margin: 0;
  cursor: pointer;
}

/* ============ FIELD-TOGGLE (reveal/hide button inside .field-box) ============ */
/* Lives inside a .field-box alongside a .field-input.with-toggle. The
   .with-toggle modifier reserves padding-right so the absolute-positioned
   button doesn't overlap text. */
.field-toggle {
  position: absolute;
  right: 6px;
  width: 32px; height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.field-toggle:hover { background: var(--accent-soft); color: var(--accent); }
.field-toggle svg { width: 18px; height: 18px; }
.field-input.with-toggle { padding-right: 44px; }

/* ============ CODE-INPUT (6-cell OTP / TOTP entry) ============ */
/* 6 monospaced single-char cells in an equal-width grid. Use minmax(0, 1fr)
   + width: 100% on the cell so the native input intrinsic width doesn't
   blow out the grid. Pair with JS for auto-advance / paste-fill /
   backspace-back (see screens/totp.html). The .filled class is applied by
   that JS when a cell has a value. */
.code-input {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}
.code-cell {
  width: 100%;
  min-width: 0;
  height: 56px;
  padding: 0;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, 'Plus Jakarta Sans', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.code-cell:focus {
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.code-cell.filled {
  background: white;
  border-color: var(--border-strong);
}

.code-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-align: center;
}
.code-hint a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.code-hint a:hover { text-decoration: underline; }

/* ============ SETUP-STEPS (numbered onboarding list) ============ */
/* Vertical list of numbered steps. Used by TOTP setup; reusable for any
   short multi-step onboarding/checklist where each item has a num + title
   + body. Number bullet is accent-soft tinted, not full accent gradient. */
.setup-steps { display: flex; flex-direction: column; gap: 14px; }
.setup-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: start;
}
.setup-step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}
.setup-step-title {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.setup-step-body {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-base);
  margin-top: 2px;
}

/* ============ QR-FRAME (200×200 white-bg square for QR or barcode SVG) ============ */
.qr-frame {
  align-self: center;
  width: 200px; height: 200px;
  padding: 14px;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.qr-frame svg { width: 100%; height: 100%; display: block; }

/* ============ MANUAL-DISCLOSE (CSS-only "show me the secret" toggle) ============ */
/* <details> with hidden marker. Reveals a .manual-code dashed box with a
   copy button. Use for TOTP setup secret, recovery codes, API keys. */
.manual-disclose {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.manual-disclose summary {
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--accent);
  font-weight: 600;
  padding: 4px 0;
  list-style: none;
  align-self: center;
}
.manual-disclose summary::-webkit-details-marker { display: none; }
.manual-disclose summary:hover { text-decoration: underline; }
.manual-disclose[open] summary { margin-bottom: 4px; }

.manual-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  color: var(--text);
}
.manual-code button {
  border: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
}
.manual-code button:hover { text-decoration: underline; }

/* ============ AUTH-SUCCESS (centered success state) ============ */
/* "Sent!" / "Done!" centered block: green-tinted icon circle + h-title +
   sub-text. Used by forgot-password "Проверьте почту" state. Reusable
   for any "we did the thing" confirmation. */
.auth-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.auth-success-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
}
.auth-success-icon svg { width: 28px; height: 28px; }
.auth-success-text {
  font-size: var(--fs-base);
  color: var(--text-muted);
  line-height: var(--lh-base);
}
.auth-success-text strong { color: var(--text); font-weight: 700; }

/* ============ AUTH-ERROR (inline validation / submit error notice) ============ */
/* Red-tinted notice that lives inside a form, above or below the relevant
   field. Currently used by auth flows; pattern generalises to any
   form-level error message. */
.auth-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--danger-text);
}
.auth-error svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ============ BANNER (semantic info row, inline in body or drawer) ============
   Generalises the `.auth-error` pattern. A small horizontal flex row of
   `[icon][message]` with semantic background tint. Use to surface a
   non-blocking note, warning, or success confirmation inside a form,
   drawer body, or list view. For the dramatic stop-the-world variant
   (full title + body), build it ad-hoc in the screen — banner stays
   compact by design.
   Variants: .banner-info (default-ish), .banner-success, .banner-warning,
   .banner-danger. Use `<strong>` inside .body to bring focus to the
   first sentence.
*/
.banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  border: 1px solid;
}
.banner > svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}
.banner strong { font-weight: 700; }
.banner a { color: inherit; font-weight: 700; text-decoration: underline; }

.banner-info {
  background: var(--info-bg);
  border-color: rgba(59, 130, 246, 0.25);
  color: var(--info-text);
}
.banner-info strong { color: var(--info-text); }

.banner-success {
  background: var(--success-soft);
  border-color: var(--success-edge);
  color: var(--success-text);
}
.banner-success strong { color: var(--success-text); }

.banner-warning {
  background: var(--warning-bg);
  border-color: #FCD34D;
  color: var(--warning-text);
}
.banner-warning strong { color: var(--warning-text); }

.banner-danger {
  background: var(--danger-bg);
  border-color: rgba(239, 68, 68, 0.25);
  color: var(--danger-text);
}
.banner-danger strong { color: var(--danger-text); }

/* ============ CHIP (multi-select pill, on/off state) ============
   Toggleable pill, typically used in `.chip-row` (flex-wrap container).
   Default state is muted "off"; `.chip.on` brings indigo accent fill.
   `.chip-add` is the dashed plus-affordance for "add one more". Trailing
   <svg> renders compactly at 13px. Semantic color variants (chip-pro,
   chip-window etc.) are added per-context in the screen's local <style>
   — only the base behaviour lives here.
*/
.chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  font-family: inherit;
}
.chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.chip.on {
  background: var(--accent-soft);
  border-color: var(--accent-soft-2);
  color: var(--accent);
}
.chip.on svg { color: var(--accent); }
.chip > svg {
  width: 13px; height: 13px;
  color: var(--text-faint);
}
.chip-add {
  color: var(--text-faint);
  border-style: dashed;
}
.chip-add:hover {
  color: var(--accent);
  border-color: var(--accent);
  border-style: solid;
}

/* ============ TOGGLE (iOS-style switch + .toggle-row layout) ============
   `.toggle-switch` is the standalone 40×22 pill switch. `.toggle-row` is
   a labelled row: text on the left, switch on the right, contained in a
   soft surface card. `.toggle-row.locked` tints the row with accent and
   is used when a value is enforced by domain logic (with a small "lock"
   label inside `.toggle-row-text .lock`).
*/
.toggle-switch {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--border-strong);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease);
  border: none;
  padding: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: left var(--dur-fast) var(--ease);
}
.toggle-switch.on { background: var(--accent); }
.toggle-switch.on::after { left: 20px; }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.toggle-row.locked {
  background: var(--accent-soft);
  border-color: var(--accent-soft-2);
}
.toggle-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toggle-row-text .label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
}
.toggle-row-text .label .lock {
  margin-left: 6px;
  color: var(--accent);
  font-weight: 700;
  font-size: 10px;
  padding: 1px 6px;
  background: white;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.toggle-row-text .hint {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* ============ STATUS SWITCH (N-up status picker with stacked label+sub) ============
   Replacement for radio-groups when picking a discrete status that has
   meaningful "sub-text" per option. Grid auto-fits via inline style
   (e.g. `grid-template-columns: repeat(4, 1fr)`). `.status-card.active`
   is the chosen one (indigo soft fill, indigo border, 2px ring).
   `.status-card.disabled` is "cannot pick yet" — 0.4 opacity, no
   pointer events. Lives next to a `.drawer-hint` explaining the picked
   state's consequences.
*/
.status-switch {
  display: grid;
  gap: 6px;
}
.status-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--surface);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  font-family: inherit;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.status-card:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.status-card .label {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text);
}
.status-card .sub {
  font-size: 10px;
  color: var(--text-faint);
  line-height: 1.4;
}
.status-card.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft-2);
}
.status-card.active .label { color: var(--accent); }
.status-card.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============ POLICY ROW (read-only global rule with badge) ============
   Soft surface row that documents a system-wide rule that *cannot* be
   overridden at the entity level. Layout: round accent icon, two-line
   body (`<strong>` title + muted body), and a small uppercase badge on
   the right (typically "Глобально"). Use to make implicit policies
   visible inside an editor without giving the impression they're
   tweakable here.
*/
.policy-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.policy-icon {
  width: 28px; height: 28px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.policy-icon svg { width: 14px; height: 14px; }
.policy-text {
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  flex: 1;
}
.policy-text strong {
  color: var(--text);
  display: block;
  font-size: var(--fs-sm);
  margin-bottom: 2px;
}
.policy-text .muted { color: var(--text-muted); }
.policy-text code {
  background: var(--neutral-bg);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
}
.policy-badge {
  margin-left: auto;
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 3px 8px;
  background: var(--neutral-bg);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
}

/* ============ CONFIRM BLOCK (type-to-confirm safety pattern) ============
   Wraps an input the user must fill *with a specific word* (rendered
   in <code>) before a destructive action button enables. Visual: dashed
   danger border, centered prompt, monospace input. State changes are
   handled per-screen; defaults are the "not yet matched" rendering.
*/
.confirm-block {
  background: var(--surface-soft);
  border: 2px dashed var(--danger);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  text-align: center;
}
.confirm-block .ask {
  font-size: var(--fs-sm);
  color: var(--text);
  margin-bottom: 10px;
  line-height: var(--lh-relaxed);
}
.confirm-block .ask code {
  background: var(--danger-bg);
  color: var(--danger-text);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.confirm-input {
  text-align: center;
  width: 100%;
  border: 1px solid var(--border);
  background: white;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, monospace;
  letter-spacing: 0.08em;
}
.confirm-input.match {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger-text);
}
.confirm-input:focus { outline: none; }
.confirm-input::placeholder { color: var(--text-faint); }

/* ════════════════════════════════════════════════════════════════════ */
/* ════ EMPLOYEES SECTION — Layer 1 promotions (2026-05-12) ═══════════ */
/* ════════════════════════════════════════════════════════════════════ */
/*
 * Promoted from sketches 003/004/013/014/015/016 (frame primitives — used
 * on every employee detail page) and the pre-DS unification spec at
 * .planning/quick/20260512-ds-list-section-unification/SPEC.md (list-section,
 * list-row, kpi-row families — collapses 4 parallel families from
 * sketches 008/009/011/015/016 into one unified API).
 *
 * Migration cheat-sheet for old per-sketch class names → unified DS classes
 * is in ds/README.md.
 */

/* ============ FRAME PRIMITIVES ============ */
/* Used on every entity detail page: breadcrumb, two-column header (identity +
   pulse), and tabs-overflow modifier. Promoted from sketches 003/004/013.
   .pulse-card is the right-column 3-metric stack that mirrors the
   balance-card pattern from clients but for non-monetary entity health. */

.crumbs {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: 12px;
}
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs svg { width: 12px; height: 12px; color: var(--text-faint); }
.crumbs strong { color: var(--text); font-weight: 700; }

/* Header grid — identity-card (1fr) + pulse-card (320px).
   Replaces the implicit single-column layout for entities that need a
   "pulse" health-summary alongside identity (trainer/personnel).
   Use .balance-card on the right for clients instead — same grid shape. */
.header-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-grid-gap, 16px);
  align-items: stretch;
  margin-bottom: 16px;
}
/* Lift the identity-card above its sibling pulse-card so the "Действия"
   action-menu popover (rendered inside identity-card) escapes over the
   pulse-card. Both cards have backdrop-filter → their own stacking contexts;
   without explicit z-index pulse-card paints later in DOM order and covers
   the popover. */
.header-grid > .identity-card { position: relative; z-index: 2; }
.header-grid > .pulse-card    { position: relative; z-index: 1; }

.pulse-card {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 10px;
}
.pulse-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}
.pulse-row + .pulse-row {
  border-top: 1px solid var(--hairline, rgba(20,20,60,0.05));
  padding-top: 12px;
}
.pulse-label { font-size: var(--fs-sm); color: var(--text-muted); font-weight: 500; }
.pulse-value {
  font-size: 18px; font-weight: 800; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
  letter-spacing: -0.01em;
}
.pulse-value .accent { color: var(--accent); }
.pulse-value .delta { font-size: 11px; font-weight: 700; color: var(--success); }
.pulse-value .star { color: #F59E0B; }
.pulse-value .star svg { width: 14px; height: 14px; }
/* Tabs horizontal-scroll modifier for 7+ tabs on narrow viewports */
.tabs-wide {
  overflow-x: auto;
  flex-wrap: nowrap;
  max-width: 100%;
  scrollbar-width: thin;
}
.tabs-wide::-webkit-scrollbar { height: 4px; }
.tabs-wide::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

/* ============ POSITION PILLS (trainer / personnel role) ============ */
/* Compact uppercase pill rendering the entity's role/position. Used in
   listing rows, identity badge-row, and anywhere the role needs a color
   tag. Two families:
   - .trainer-pos for trainers (4 sub-roles, no leading dot)
   - .preset-pill for personnel (carries a colored leading dot — the dot
     codes the permission preset). */

.trainer-pos {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 8px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em; text-transform: uppercase;
  background: var(--accent-soft, #EEF1FF);
  color: var(--accent, #4F46E5);
}
.trainer-pos.pro     { background: #FCEAFF; color: #9333EA; }
.trainer-pos.massage { background: rgba(16,185,129,0.14); color: var(--success); }
.trainer-pos.nutri   { background: rgba(245,158,11,0.16); color: #B45309; }

.preset-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 8px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em; text-transform: uppercase;
  background: var(--accent-soft, #EEF1FF);
  color: var(--accent, #4F46E5);
}
.preset-pill.mgr   { background: #FEE4E2; color: #991B1B; }
.preset-pill.sales { background: #D1FAE5; color: #065F46; }
.preset-pill.acct  { background: #FEF3C7; color: #92400E; }

/* Specialization chips — small neutral chips below the badge-row.
   Used for trainer specializations (Йога / Пилатес / etc.). */
.spec-line { display: flex; flex-wrap: wrap; gap: 4px; }
.spec-chip {
  font-size: 11px; padding: 2px 7px;
  border-radius: 6px;
  background: rgba(20,20,60,0.04);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ════════════════════════════════════════════════════════════════════ */
/* ════ LIST-SECTION FAMILY ═══════════════════════════════════════════ */
/* ════════════════════════════════════════════════════════════════════ */
/* Per pre-DS unification spec — collapses .doc-section (008),
   .vac-section (009), .fin-card (011/016), .sh-section (015) into one API.
   Wrapper CSS is byte-identical across families; only icon-color variants
   and row grid templates diverge. Icon variants are visual-only
   (.neutral / .success / .warning / .alert / .danger / .purple) — no
   semantic aliases. Row layouts live as .list-row.layout-* modifiers. */

.list-section {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 14px;
}

/* Attention modifier — escalates the entire section visually (warm tint).
   Used by 008 documents-tab "Требуют внимания" hero section. */
.list-section.attention {
  background: linear-gradient(135deg, rgba(245,158,11,0.05) 0%, rgba(245,158,11,0.02) 100%), var(--surface);
  border-color: rgba(245,158,11,0.28);
}

.list-section-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(20,20,60,0.02);
}
.list-section.attention .list-section-head {
  background: rgba(245,158,11,0.05);
  border-bottom-color: rgba(245,158,11,0.20);
}

.list-section-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.list-section-icon svg { width: 14px; height: 14px; }

/* Icon variants — visual only (no semantic aliases per spec decision #4) */
.list-section-icon.neutral { background: rgba(20,20,60,0.06); color: var(--text-muted); }
.list-section-icon.success { background: rgba(16,185,129,0.14); color: var(--success); }
.list-section-icon.warning { background: rgba(245,158,11,0.16); color: #B45309; }
.list-section-icon.alert   { background: rgba(245,158,11,0.20); color: #B45309; }
.list-section-icon.danger  { background: rgba(239,68,68,0.14); color: #991B1B; }
.list-section-icon.purple  { background: rgba(147,51,234,0.12); color: #7E22CE; }

.list-section-title {
  font-size: 13px; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text);
}

/* Caption — textual sub-line next to the title (e.g. "Май 2026").
   Distinct from .list-section-count which is a chip with a number. */
.list-section-caption {
  margin-left: 10px;
  font-size: 12px; color: var(--text-muted); font-weight: 500;
}

.list-section-count {
  font-size: 11px; color: var(--text-muted); font-weight: 600;
  padding: 2px 8px; border-radius: 6px;
  background: rgba(20,20,60,0.04);
}

.list-section-actions {
  margin-left: auto;
  display: flex; align-items: center; gap: 6px;
}

/* Inline "see more" / "go to full list" link inside .list-section-actions
   ("Все →", "Открыть →" etc). Accent-coloured, no underline by default. */
.link-more,
.link-more:visited {
  color: var(--accent);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-decoration: none;
}
.link-more:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════════════════ */
/* ════ LIST-ROW FAMILY ═══════════════════════════════════════════════ */
/* ════════════════════════════════════════════════════════════════════ */
/* Base shell (background, padding, border, hover) + layout modifiers that
   pick grid-template-columns + state modifiers that apply tint/border-left
   accent. Layout and state are orthogonal — apply both at once. */

.list-row {
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-top: 1px solid var(--hairline, rgba(20,20,60,0.05));
  grid-template-columns: 1fr;
}
.list-row:first-of-type { border-top: 0; }
.list-row:hover { background: rgba(20,20,60,0.02); }

/* Layout modifiers — column patterns per use-case */
.list-row.layout-doc    { grid-template-columns: 40px 1fr auto auto; }
.list-row.layout-vac    { grid-template-columns: 36px 1fr auto auto; }
.list-row.layout-payout { grid-template-columns: 110px 1fr auto auto auto 36px; gap: 16px; }
.list-row.layout-shift  { grid-template-columns: 60px 110px 1fr auto auto; padding: 12px 22px; }
.list-row.layout-cond   { grid-template-columns: 36px 1fr auto; padding: 12px 22px; }

/* State modifiers — orthogonal tint + 3px left-border accent */
.list-row.is-attention {
  background: linear-gradient(90deg, rgba(245,158,11,0.05), transparent);
  border-left: 3px solid #F59E0B;
  padding-left: 19px;
}
.list-row.is-alert {
  background: linear-gradient(90deg, rgba(239,68,68,0.05), transparent);
  border-left: 3px solid #EF4444;
  padding-left: 19px;
}
.list-row.is-current {
  background: linear-gradient(90deg, rgba(16,185,129,0.04), transparent);
  border-left: 3px solid var(--success);
  padding-left: 19px;
}
.list-row.is-sick    { background: rgba(245,158,11,0.04); }
.list-row.is-missed  { background: rgba(239,68,68,0.04); }
.list-row.is-dim     { color: var(--text-muted); }
.list-row.is-clickable { cursor: pointer; }

/* ════════════════════════════════════════════════════════════════════ */
/* ════ KPI ROW FAMILY ════════════════════════════════════════════════ */
/* ════════════════════════════════════════════════════════════════════ */
/* 4-up KPI card row. Used on vacation/finance/shifts tabs. Collapses
   .vac-kpi-*, .fin-kpi-*, .sh-kpi-* families into one API. */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-grid-gap, 16px);
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 18px 22px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
}

/* Stripe modifiers — 3px colored left edge (visual-only naming) */
.kpi-card.stripe-accent::after,
.kpi-card.stripe-success::after,
.kpi-card.stripe-warning::after {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.kpi-card.stripe-accent::after  { background: var(--accent); }
.kpi-card.stripe-success::after { background: var(--success); }
.kpi-card.stripe-warning::after { background: #F59E0B; }

.kpi-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-faint);
}

.kpi-value {
  font-size: 28px; font-weight: 800; color: var(--text);
  letter-spacing: -0.02em;
}
.kpi-value.accent  { color: var(--accent); }
.kpi-value.success { color: var(--success); }
.kpi-value.warning { color: #B45309; }
.kpi-value.danger  { color: #991B1B; }

/* Unit suffix — small muted wrapper inside .kpi-value (per spec decision #2:
   normalize on .unit, not .cur — currency is a kind of unit). */
.kpi-value .unit {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 4px;
}

.kpi-sub { font-size: 12px; color: var(--text-muted); }
.kpi-sub strong { color: var(--text); font-weight: 700; }

/* Inline progress bar inside a kpi-card (from sketch 015) */
.kpi-progress {
  height: 4px; border-radius: 3px;
  background: rgba(20,20,60,0.06);
  overflow: hidden;
  margin-top: 6px;
}
.kpi-progress .fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981, #34D399);
}
.kpi-progress .fill.accent  { background: linear-gradient(90deg, #4F46E5, #6366F1); }
.kpi-progress .fill.warning { background: linear-gradient(90deg, #F59E0B, #FBBF24); }

/* ════════════════════════════════════════════════════════════════════ */
/* ════ VACATION-SPECIFIC INNER CELLS ════════════════════════════════ */
/* ════════════════════════════════════════════════════════════════════ */
/* Sub-elements used inside .list-row.layout-vac. Not unified yet (each
   row layout has its own cell-shape; cross-row unification is a separate
   follow-up pass). Promoted from sketch 009 winner B. */

.vac-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.vac-icon svg { width: 18px; height: 18px; }
.vac-icon.planned { background: rgba(16,185,129,0.12); color: var(--success); }
.vac-icon.used    { background: var(--accent-soft); color: var(--accent); }
.vac-icon.sick    { background: rgba(245,158,11,0.16); color: #B45309; }

.vac-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vac-range {
  font-size: 14px; font-weight: 700; color: var(--text);
  line-height: 1.3;
}
.vac-meta {
  font-size: 12px; color: var(--text-muted);
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.vac-meta .vm-sep { color: var(--text-faint); }

.vac-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 8px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.vac-status.planned { background: rgba(16,185,129,0.12); color: var(--success-text); }
.vac-status.used { background: rgba(20,20,60,0.06); color: var(--text-muted); }
.vac-status.sick { background: var(--warning-bg); color: var(--warning-text); }

.vac-actions {
  display: flex; align-items: center; gap: 4px;
}
.vac-action {
  background: transparent; border: 1px solid transparent;
  font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  padding: 6px 10px; border-radius: 8px;
  cursor: pointer;
}
.vac-action:hover { background: var(--accent-soft); color: var(--accent); }

.vac-kebab {
  width: 30px; height: 30px;
  background: transparent; border: none;
  border-radius: 8px;
  color: var(--text-faint); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.vac-kebab:hover { background: var(--accent-soft); color: var(--accent); }
.vac-kebab svg { width: 16px; height: 16px; }

/* Status banner — full-width "current state" callout above the KPI row.
   Default = success tint ("На работе"); .in-vacation = warning tint
   ("В отпуске до …"). */
.vac-status-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px; margin-bottom: 14px;
  background: rgba(16,185,129,0.04);
  border: 1px solid rgba(16,185,129,0.20);
  border-radius: var(--radius-lg);
}
.vac-status-banner.in-vacation {
  background: rgba(245,158,11,0.04);
  border-color: rgba(245,158,11,0.22);
}
.vsb-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(16,185,129,0.14); color: var(--success);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.vsb-icon svg { width: 20px; height: 20px; }
.vac-status-banner.in-vacation .vsb-icon {
  background: rgba(245,158,11,0.16); color: #B45309;
}
.vsb-text {
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
}
.vsb-text strong { color: var(--text); font-weight: 700; }

/* ════════════════════════════════════════════════════════════════════ */
/* ════ PATTERN CARD ══════════════════════════════════════════════════ */
/* ════════════════════════════════════════════════════════════════════ */
/* "Recurring contract" card — single block showing an entity's regular
   pattern in 3-4 slots. Promoted from sketch 015 personnel-shifts winner.
   Reusable for any regularity contract: shift patterns (5/2, 2/2),
   workout routines, SLA windows, recurring trainer schedule, etc.
   Visually distinct (indigo gradient tint) from regular cards — signals
   "this is the underlying rule, not today's data". */

.pat-card {
  background: linear-gradient(135deg, rgba(79,70,229,0.06) 0%, rgba(99,102,241,0.02) 100%), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 22px 26px;
  margin-bottom: 16px;
}

.pat-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.pat-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--accent);
}
.pat-eyebrow svg { width: 13px; height: 13px; }

.pat-edit {
  font-size: 12px; color: var(--accent); font-weight: 700;
  text-decoration: none;
}
.pat-edit:hover { text-decoration: underline; }

/* Default grid — 4 slots, first slot wider for primary label.
   Caller can override grid-template-columns inline for different splits. */
.pat-grid {
  display: grid;
  grid-template-columns: 200px 1fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.pat-block { display: flex; flex-direction: column; gap: 4px; }

.pat-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-faint);
}

.pat-value {
  font-size: 22px; font-weight: 800; color: var(--text);
  letter-spacing: -0.02em;
}
.pat-value.smaller { font-size: 16px; }

.pat-sub {
  font-size: 12px; color: var(--text-muted);
  margin-top: 2px;
}

/* Day-strip for weekly schedule patterns — 7 small squares with .active for
   working days. E.g. 5/2 = Mon-Fri active, Sat-Sun inactive. */
.pat-days {
  display: flex; gap: 4px;
  margin-top: 4px;
}
.pat-day {
  width: 28px; height: 28px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  background: rgba(20,20,60,0.04);
  color: var(--text-faint);
  border: 1px solid transparent;
}
.pat-day.active { background: var(--accent); color: white; }

/* ════════════════════════════════════════════════════════════════════ */
/* ════ MONTH CALENDAR ════════════════════════════════════════════════ */
/* ════════════════════════════════════════════════════════════════════ */
/* Universal month calendar — 7-col grid × 5-6 weeks. Promoted from
   sketch 015 winner (personnel-shifts).
   Reuse targets: shift schedules, vacation year-view, trainer sessions,
   any time-grouped data with day granularity.
   Cell state vocabulary (.is-*) is calendar-specific semantic naming
   (kept domain-locked, unlike .list-section-icon visual-only naming —
   calendar states are intrinsic to the primitive). */

.cal-card {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px 22px;
  margin-bottom: 16px;
}

.cal-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px;
}
.cal-month-title {
  font-size: 20px; font-weight: 800; color: var(--text);
  letter-spacing: -0.01em;
}
.cal-nav { display: inline-flex; gap: 4px; }
.cal-nav button {
  width: 30px; height: 30px;
  background: transparent; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.cal-nav button:hover {
  background: var(--accent-soft); color: var(--accent);
  border-color: var(--accent);
}
.cal-nav button svg { width: 14px; height: 14px; }
.cal-actions { margin-left: auto; display: flex; gap: 8px; }

.cal-legend {
  display: flex; gap: 14px;
  margin-bottom: 14px;
  font-size: 11px; color: var(--text-muted);
}
.cal-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.cal-legend-dot.upcoming { background: rgba(79,70,229,0.25); }
.cal-legend-dot.worked   { background: rgba(20,20,60,0.18); }
.cal-legend-dot.sick     { background: rgba(245,158,11,0.40); }
.cal-legend-dot.missed   { background: rgba(239,68,68,0.40); }
.cal-legend-dot.dayoff   { background: transparent; border: 1px dashed var(--text-faint); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-wkd-head {
  font-size: 10px; font-weight: 800; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.08em;
  text-align: center;
  padding: 6px 0;
}
.cal-wkd-head.weekend { color: #B91C1C; }

.cal-cell {
  min-height: 86px;
  background: rgba(255,255,255,0.40);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 8px;
  display: flex; flex-direction: column; gap: 4px;
  position: relative;
  cursor: pointer;
  transition: all 0.12s ease;
}
.cal-cell:hover { background: var(--accent-soft); border-color: var(--accent); }

/* Cell states — calendar-specific vocabulary */
.cal-cell.is-other   { opacity: 0.4; pointer-events: none; }
.cal-cell.is-today   { border: 2px solid var(--accent); background: linear-gradient(135deg, rgba(79,70,229,0.10), rgba(99,102,241,0.04)); }
.cal-cell.is-weekend { background: rgba(20,20,60,0.02); }
.cal-cell.is-dayoff  { background: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(20,20,60,0.03) 6px, rgba(20,20,60,0.03) 12px); }
.cal-cell.is-sick    { background: rgba(245,158,11,0.06); border-color: rgba(245,158,11,0.30); }
.cal-cell.is-missed  { background: rgba(239,68,68,0.05); border-color: rgba(239,68,68,0.25); }
.cal-cell.is-swap    { background: rgba(79,70,229,0.05); border-color: rgba(79,70,229,0.22); }

.cal-cell-num {
  font-size: 14px; font-weight: 700; color: var(--text);
  line-height: 1;
}
.cal-cell.is-today .cal-cell-num   { color: var(--accent); }
.cal-cell.is-weekend .cal-cell-num { color: var(--text-muted); }

.cal-cell-shift {
  margin-top: auto;
  font-size: 11px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.cal-cell-shift.dim { color: var(--text-faint); font-weight: 500; }

/* Mini-tag inside a cell (top-left) — labels what kind of day this is */
.cal-cell-tag {
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 1px 5px; border-radius: 4px;
  align-self: flex-start;
}
.cal-cell-tag.upcoming    { background: rgba(79,70,229,0.12); color: var(--accent); }
.cal-cell-tag.worked      { background: rgba(20,20,60,0.08); color: var(--text-muted); }
.cal-cell-tag.sick        { background: rgba(245,158,11,0.20); color: #B45309; }
.cal-cell-tag.missed      { background: rgba(239,68,68,0.18); color: #991B1B; }
.cal-cell-tag.swap        { background: rgba(79,70,229,0.16); color: var(--accent); }
.cal-cell-tag.in-progress {
  background: rgba(16,185,129,0.18); color: var(--success);
  animation: pulse-cell 2s ease-in-out infinite;
}

@keyframes pulse-cell {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.40); }
  50%      { box-shadow: 0 0 0 4px rgba(16,185,129,0.10); }
}

/* ════════════════════════════════════════════════════════════════════ */
/* ════ LISTING CELL PRIMITIVES (iter 14, 2026-05-12) ════════════════ */
/* ════════════════════════════════════════════════════════════════════ */
/* Promoted from sketch 002 employees-list winner B. Cell-level patterns
   used inside .data-table rows for the employees / trainers / personnel
   listings. */

/* Rating cell — inline amber star + bold value. Used in trainer rows
   (rating column). Star colour is hard-coded amber #F59E0B, not a token,
   because it's specifically "rating star" semantics (matches the .star
   inside .pulse-value). */
.rating-cell {
  display: inline-flex; align-items: center;
  gap: 4px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.rating-cell svg {
  width: 12px; height: 12px;
  color: #F59E0B;
}

/* VIP star — small filled star inline-before in a name cell. Marks
   "favorite trainer" status (e.g. Алина Жукова in trainers list — many
   clients marked her as favorite in mobile app). Reusable for any
   "marked / starred / featured" item flag inside a row name. */
.client-cell-name .vip-star,
.vip-star {
  width: 11px; height: 11px;
  color: #F59E0B;
  margin-right: 4px;
  vertical-align: -1px;
  flex-shrink: 0;
}

/* Wrap-allowed column in .data-table — for cells that contain chips
   that need to wrap to a second line (specializations, tags, etc).
   Default .data-table cells use white-space:nowrap; .col-spec opts out
   and sets a minimum width to avoid the column collapsing. */
.data-table td.col-spec,
.data-table th.col-spec {
  white-space: normal;
  min-width: 220px;
}

/* ════════════════════════════════════════════════════════════════════ */
/* ════ BIO CARD + STUDIOS + NOTES-LIST + PERSONA TOGGLE (iter 15) ════ */
/* ════════════════════════════════════════════════════════════════════ */
/* Promoted from sketch 004 trainer-general winner A. Three primitive
   families:
   1. .bio-card  — public-bio block ("publishes to app & socials"), with
                    pulsing live-dot eyebrow + body + meta footer.
                    Universal for any public copy block.
   2. .studios-line + .studio-chip(.primary) — chip list for studios with
                    explicit "home studio" marker.
   3. .notes-list + .note-item — timestamped admin-notes list (author /
                    date / tag / body). Reusable for any comment-history. */

/* ---- BIO CARD ---- */
.bio-card {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: var(--shadow-md);
  position: relative;
}
.bio-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}
.bio-eyebrow svg { width: 12px; height: 12px; }

/* Pulsing live indicator. Reusable on any "live / online / published"
   eyebrow chip. Standalone class — does NOT require .bio-eyebrow. */
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.18);
  animation: live-dot-pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes live-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(16,185,129,0.18); }
  50%      { box-shadow: 0 0 0 5px rgba(16,185,129,0.08); }
}

.bio-text {
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.65;
  margin: 0 0 8px;
}
.bio-text + .bio-text { margin-top: 12px; }

.bio-meta {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  border-top: 1px solid var(--hairline);
  padding-top: 12px;
  margin-top: 14px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.bio-meta strong { color: var(--text-muted); font-weight: 700; }
.bio-meta-spacer { margin-left: auto; }
.bio-meta a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.bio-meta a:hover { text-decoration: underline; }

/* ---- STUDIOS CHIPS ---- */
.studios-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.studio-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}
.studio-chip svg { width: 10px; height: 10px; }
/* One Voice (D-02): the primary studio chip is muted indigo (indigo-soft),
   not the saturated indigo voice reserved for .btn-primary. */
.studio-chip.primary {
  background: var(--accent-soft-2);
  color: var(--accent);
}

/* ---- NOTES LIST ---- */
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.note-item {
  padding: 12px 14px;
  background: rgba(20, 20, 60, 0.02);
  border: 1px solid var(--hairline);
  border-radius: 10px;
}
.note-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
  font-size: var(--fs-xs);
}
.note-author { font-weight: 700; color: var(--text); }
.note-date   { color: var(--text-faint); }
.note-tag {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(20,20,60,0.06);
  color: var(--text-muted);
}
.note-tag.flag {
  background: var(--warning-bg);
  color: var(--warning-text);
}
/* Accent-tinted tag variant — used for "доступы" notes that link an
   admin-journal entry to the Доступы tab. Added in iter-21 alongside
   the personnel-general port (sketch 014/A). */
.note-tag.access {
  background: var(--accent-soft);
  color: var(--accent);
}
/* Override standalone .note-text styling when inside a list-entry —
   body text of an entry needs full text color, not muted. */
.note-item .note-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

/* ---- PERSONA TOGGLE ---- */
/* Segmented switch above a stat-strip. Demoes how the strip adapts to
   different employee roles (trainer / massage / nutritionist). In
   production the role-specific stat-set is server-driven; this primitive
   stays useful as a generic "switch between data lenses" segmented
   control. */
.persona-toggle {
  display: inline-flex;
  gap: 4px;
  background: rgba(20,20,60,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  margin: 0 0 10px;
}
.persona-toggle button {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 7px;
  font: 600 11px/1 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 120ms ease, color 120ms ease;
}
.persona-toggle button:hover { color: var(--text); }
.persona-toggle button.active {
  background: var(--accent);
  color: var(--text-on-accent);
}

.persona-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 6px 4px;
}
.persona-tag strong { color: var(--accent); font-weight: 800; }

.persona-stats { display: none; }
.persona-stats.active { display: grid; }

/* ════════════════════════════════════════════════════════════════════ */
/* ════ SESSIONS LIST + DRAWER CONTENT (iter 16, 2026-05-12) ═════════ */
/* ════════════════════════════════════════════════════════════════════ */
/* Promoted from sketch 010 trainer-sessions winner C (day-grouped agenda
   with click-to-detail drawer). Six primitive families:

   1. .sess-toolbar + .sess-filter-chip — period filter chips above list.
      (NB: first occurrence of an in-tab filter-chip — sketches 007/012
      also need this; defer unification until second occurrence ships.)
   2. .sess-list + .day-head + .sess-row + cells — the day-grouped
      session list itself.
   3. .att-stat + .wait-pill + .loc-chip — universal listing primitives
      (attendance progress, waitlist amber pill, location chip with pin).
   4. .sess-status — status pill family for sessions.
   5. .drawer-summary-row + .drawer-section + .mini-list — drawer-content
      primitives. Reuse the existing .drawer family for chrome (head /
      body / foot / close) — do NOT introduce .session-drawer.
   6. .btn-foot — drawer footer button modifier (flex: 1, equal-width). */

/* ---- IN-TAB FILTER TOOLBAR (unified iter-17) ---------------------- */
/* Generic chip-based filter row above a list. Used by trainer-sessions
   (period filter), trainer-clients (slice filter + search), and any other
   in-tab filtering. Optional `.filter-toolbar-search` cluster aligns to
   the right via margin-left:auto. */
.filter-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.filter-toolbar-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: var(--fs-sm);
}
.filter-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font: 600 var(--fs-sm)/1 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.filter-chip:hover { color: var(--text); }
.filter-chip.active {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
}
.filter-chip svg { width: 12px; height: 12px; }
.filter-chip-count {
  font-size: var(--fs-xs);
  opacity: 0.75;
  font-weight: 600;
}
/* Right-aligned search cluster inside .filter-toolbar.
   Use when the toolbar also needs free-text search next to chips. */
.filter-toolbar-search {
  margin-left: auto;
  display: flex; align-items: center; gap: 6px;
  background: rgba(20,20,60,0.04);
  border-radius: 8px;
  padding: 6px 10px;
  min-width: 220px;
}
.filter-toolbar-search input {
  border: none;
  background: transparent;
  outline: none;
  font: 500 var(--fs-sm)/1 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--text);
  flex: 1;
  min-width: 0;
}
.filter-toolbar-search svg {
  width: 12px; height: 12px;
  color: var(--text-faint);
  flex-shrink: 0;
}

/* ---- ATTENDANCE STAT (mini bar + numbers, used inside rows) ---- */
.att-stat {
  display: flex; align-items: center; gap: 8px;
  min-width: 0;
}
.att-bar {
  width: 60px; height: 8px; border-radius: 5px;
  background: rgba(20,20,60,0.06);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.att-bar .att-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, var(--accent), #6366F1);
  border-radius: 5px;
}
.att-numbers {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.att-main {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.att-main .att-sep { color: var(--text-faint); }
.att-sub {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---- WAIT PILL (amber "N в листе ожидания") ---- */
.wait-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: var(--fs-xs);
  font-weight: 700;
  background: rgba(245,158,11,0.16);
  color: #B45309;
}
.wait-pill::before {
  content: '⏳';
  font-size: 9px;
}

/* ---- LOCATION CHIP (pin + studio/room) ---- */
.loc-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.loc-chip svg { width: 11px; height: 11px; }

/* ---- SESSIONS LIST SHELL ---- */
.sess-list {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* ---- DAY HEAD (section divider in day-grouped agenda) ---- */
.day-head {
  display: flex; align-items: baseline; gap: 12px;
  padding: 18px 22px 10px;
  border-top: 1px solid var(--hairline);
}
.sess-list .day-head:first-child { border-top: 0; }
.day-date {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}
.day-weekday {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.day-sub {
  font-size: var(--fs-xs);
  color: var(--text-faint);
}
.day-summary {
  margin-left: auto;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* ---- SESSION ROW ---- */
.sess-row {
  display: grid;
  grid-template-columns: 110px 1fr 200px 150px 90px 36px;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  border-top: 1px solid var(--hairline);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.sess-row:first-of-type { border-top: 0; }
.sess-row:hover { background: rgba(20,20,60,0.02); }
/* .is-future has no visual change — it's a semantic marker for JS routing
   (open/edit vs read-only past). Keep it documented as a known modifier. */
.sess-row.is-future { /* baseline */ }
.sess-row.is-past { opacity: 0.85; }
.sess-row.is-cancelled { opacity: 0.55; }

.sess-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sess-date-main {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text);
}
.sess-date-sub {
  font-size: var(--fs-sm);
  color: var(--text-faint);
}

.sess-info {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}
.sess-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.sess-icon.individual { background: #FCEAFF; color: #9333EA; }
.sess-icon.massage    { background: #DCFCE7; color: #15803D; }
.sess-icon svg { width: 18px; height: 18px; }

.sess-name-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sess-name {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text);
}
.sess-meta {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  display: flex; gap: 6px; align-items: center;
}
.sess-meta .sm-sep { color: var(--text-faint); }

.sess-type-chip {
  display: inline-flex;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sess-type-chip.grp { background: var(--accent-soft); color: var(--accent); }
.sess-type-chip.ind { background: #FCEAFF; color: #9333EA; }
.sess-type-chip.msg { background: #DCFCE7; color: #15803D; }

.sess-kebab {
  width: 30px; height: 30px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-faint);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.sess-kebab:hover { background: var(--accent-soft); color: var(--accent); }
.sess-kebab svg { width: 16px; height: 16px; }

/* ---- SESSION STATUS PILL ---- */
.sess-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.sess-status.upcoming {
  background: rgba(16,185,129,0.12);
  color: var(--success-text);
}
.sess-status.done {
  background: rgba(20,20,60,0.06);
  color: var(--text-muted);
}
.sess-status.cancelled {
  background: var(--danger-bg);
  color: var(--danger-text);
}
.sess-status.full {
  background: rgba(245,158,11,0.16);
  color: #B45309;
}

/* ---- DRAWER CONTENT: SUMMARY ROW (3-up stat strip inside drawer) ---- */
.drawer-summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.drawer-summary-card {
  padding: 12px 14px;
  background: rgba(20,20,60,0.02);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.drawer-summary-card.warn {
  background: rgba(245,158,11,0.06);
  border-color: rgba(245,158,11,0.20);
}
.drawer-summary-card.warn .drawer-summary-value { color: #B45309; }
.drawer-summary-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.drawer-summary-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}
.drawer-summary-value .unit {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 2px;
}
.drawer-summary-value.dim { color: var(--text-muted); font-weight: 700; }

/* ---- DRAWER SECTION (head + content block inside drawer-body) ---- */
.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer-section-head {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.drawer-count {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
}
.drawer-count.wait {
  background: rgba(245,158,11,0.16);
  color: #B45309;
}
.drawer-section-head a {
  margin-left: auto;
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-decoration: none;
}
.drawer-section-head a:hover { text-decoration: underline; }

/* ---- MINI LIST (compact people list inside a drawer section) ---- */
.mini-list {
  display: flex;
  flex-direction: column;
  background: rgba(20,20,60,0.02);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
}
.mini-row {
  display: grid;
  grid-template-columns: 32px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
}
.mini-row:first-child { border-top: 0; }
.mini-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--grad-avatar);
  color: #6D28D9;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  border: 1px solid white;
  box-shadow: 0 1px 2px rgba(20,20,60,0.06);
}
.mini-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.mini-sub {
  font-size: var(--fs-xs);
  color: var(--text-faint);
}

/* Compact "пришёл / в листе / отсутствует" status pill for .mini-row */
.check-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: var(--fs-xs);
  font-weight: 700;
  background: rgba(16,185,129,0.12);
  color: var(--success-text);
}
.check-pill.absent {
  background: rgba(239,68,68,0.10);
  color: var(--danger-text);
}
.check-pill.waiting {
  background: rgba(245,158,11,0.16);
  color: #B45309;
}

.mini-kebab {
  width: 24px; height: 24px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-faint);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.mini-kebab:hover { background: var(--accent-soft); color: var(--accent); }
.mini-kebab svg { width: 14px; height: 14px; }

/* Soft-bordered placeholder block for "no data yet" / sketch notes */
.drawer-note-stub {
  padding: 12px 14px;
  background: rgba(20,20,60,0.02);
  border: 1px dashed var(--hairline);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---- DRAWER FOOTER BUTTON (flex: 1 equal-width, neutral by default) ---- */
/* Replaces ad-hoc footer button styles. Goes inside .drawer-foot.
   .danger variant turns the hover red. */
.btn-foot {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  background: rgba(20,20,60,0.04);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  font: 600 13px/1 'Plus Jakarta Sans', system-ui, sans-serif;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.btn-foot:hover { background: var(--accent-soft); color: var(--accent); }
.btn-foot.danger:hover { background: var(--danger-bg); color: var(--danger-text); }
.btn-foot svg { width: 14px; height: 14px; }

/* Drawer-foot modifier: equal-width buttons fill the row.
   Default .drawer-foot uses justify-content:flex-start with align-items:center. */
.drawer-foot.drawer-foot-equal {
  gap: 8px;
  flex-wrap: wrap;
}

/* ════════════════════════════════════════════════════════════════════ */
/* ════ TRAINER-CLIENTS CELL PRIMITIVES + COMPACT (iter 17) ══════════ */
/* ════════════════════════════════════════════════════════════════════ */
/* Promoted from sketch 007 trainer-clients winner A (single table with
   chip filter). Builds on the iter-17 .filter-toolbar / .filter-chip
   unification above. Reuses .data-table + .client-cell + .row-avatar
   from the existing DS — adds a .client-cell-compact modifier and a few
   cell-level primitives.

   Sketch's `.clients-section` table was just `.data-table` wrapped in a
   different shell — collapsed into the canonical `<section class="section">
   <div class="table-wrap"><table class="data-table">` pattern. */

/* Centered column for .data-table. Joins existing .col-num (right) and
   .col-actions (right + width 90px). Used for "Любимый тренер" star col. */
.data-table thead th.col-center,
.data-table tbody td.col-center {
  text-align: center;
}

/* When .client-cell is rendered as <a> (clickable row name), strip the
   anchor's default underline + inherit text color from the row. */
a.client-cell,
a.client-cell:visited {
  text-decoration: none;
  color: inherit;
}

/* Compact-variant of the existing .client-cell family. Tighter avatar
   (36 px vs default 40), smaller name (13 px vs 14), fainter sub (11 px /
   text-faint). Used inside dense trainer-detail listings where info-
   density beats visual presence. */
.client-cell.client-cell-compact { gap: 10px; }
.client-cell.client-cell-compact .row-avatar {
  width: 36px; height: 36px;
  font-size: 13px;
}
.client-cell.client-cell-compact .client-cell-name {
  font-size: 13px;
}
.client-cell.client-cell-compact .client-cell-sub {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  margin-top: 1px;
}

/* Combination "session-type" chips inside a single table cell. Different
   from .sess-type-chip (iter-16, which marks ONE session's type with
   accent fill). .type-chip variants are quieter signals showing that a
   client has-done both indiv + group at some point. */
.type-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.type-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.type-chip.ind {
  background: var(--accent-soft);
  color: var(--accent);
}
.type-chip.grp {
  background: rgba(20,20,60,0.04);
  color: var(--text-muted);
}
.type-chip svg { width: 10px; height: 10px; }

/* Amber star indicator for "любимый тренер" column. .empty variant for
   clients who haven't marked a favorite (— em-dash placeholder). */
.fav-star-cell {
  display: inline-flex; align-items: center;
  gap: 4px;
  color: #F59E0B;
  font-weight: 700;
  font-size: var(--fs-sm);
}
.fav-star-cell svg {
  width: 14px; height: 14px;
  fill: currentColor;
}
.fav-star-cell.empty {
  color: var(--border-strong);
  font-weight: 500;
}

/* "Last visit" cell — date on top, relative-time hint below. Universal
   for any "when did X last happen" column (visits, payments, logins). */
.last-visit-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.last-visit-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.last-visit-ago {
  font-size: var(--fs-xs);
  color: var(--text-faint);
}

/* Centered "load more" link below a table/list. Used when full pagination
   is overkill (sketch-only listings, infinite-scroll fallback). */
.load-more {
  margin-top: 14px;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.load-more a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.load-more a:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════════════════ */
/* ════ FIN-HERO + FINANCE-TAB PRIMITIVES (iter 18, 2026-05-13) ══════ */
/* ════════════════════════════════════════════════════════════════════ */
/* Pre-DS unification at port time. Sketches 011 (trainer-finance) and
   016 (personnel-finance) drafted two near-identical hero cards:

     .accrual-hero — sketch 011, green-gradient ("К выплате · accrued")
     .salary-hero  — sketch 016, indigo-gradient ("К выплате · salary")

   Structure is identical; only colors differ. Unified into a single
   .fin-hero family with `.success` (green) and `.accent` (indigo) color
   modifiers — consistent with the visual-naming rule from the iter-12
   .list-section spec (.icon.success vs .icon.accent, not .accrual vs
   .salary).

   Inner classes use the .fh- prefix (replaces both .ah- from 011 and
   .sh- from 016). Label dot ring + progress-bar fill inherit color from
   the parent's variant modifier. */

/* ---- FIN-HERO ---- */
.fin-hero {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 22px 26px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  /* default colors are overridden by .success / .accent below */
  background: var(--surface);
  border: 1px solid var(--border);
}
.fin-hero.success {
  background:
    linear-gradient(135deg, rgba(16,185,129,0.08) 0%, rgba(20,20,60,0.02) 100%),
    var(--surface);
  border-color: rgba(16,185,129,0.20);
}
.fin-hero.accent {
  background:
    linear-gradient(135deg, rgba(79,70,229,0.10) 0%, rgba(20,20,60,0.02) 100%),
    var(--surface);
  border-color: rgba(79,70,229,0.24);
}

.fh-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fh-label {
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex; align-items: center;
  gap: 6px;
}
.fin-hero.success .fh-label { color: var(--success-text); }
.fin-hero.accent  .fh-label { color: var(--accent); }

.fh-amount {
  font-size: 42px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.fh-amount .unit {
  font-size: 22px;
  color: var(--text-muted);
  font-weight: 700;
  margin-left: 4px;
}
.fh-detail {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}
.fh-detail strong { color: var(--text); font-weight: 700; }
.fh-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.fh-progress-block {
  border-left: 1px dashed var(--border-strong);
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fh-prog-eyebrow {
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.fh-prog-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}
.fh-prog-current {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}
.fh-prog-target {
  font-size: var(--fs-base);
  color: var(--text-muted);
  font-weight: 600;
}
.fh-bar {
  height: 8px;
  border-radius: 5px;
  background: rgba(20,20,60,0.06);
  overflow: hidden;
  position: relative;
}
.fh-bar .fh-fill {
  height: 100%;
  border-radius: 5px;
  /* default gradient is overridden by parent's variant */
  background: var(--accent);
}
.fin-hero.success .fh-bar .fh-fill { background: linear-gradient(90deg, #10B981, #34D399); }
.fin-hero.accent  .fh-bar .fh-fill { background: linear-gradient(90deg, #4F46E5, #6366F1); }

.fh-prog-meta {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ---- RATE ROW (config: ставки и проценты) ----
   4-col grid: icon | label-stack | value | edit-btn.
   Used inside a .list-section (often a collapsed <details class="list-section">
   for "Ставки и проценты"). */
.rate-row {
  display: grid;
  grid-template-columns: 36px 1fr auto 36px;
  align-items: center;
  gap: 16px;
  padding: 12px 22px;
  border-top: 1px solid var(--hairline);
}
.rate-row:first-of-type { border-top: 0; }

.rate-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.rate-icon svg { width: 18px; height: 18px; }
.rate-icon.group   { background: var(--accent-soft);    color: var(--accent); }
.rate-icon.indiv   { background: #FCEAFF;               color: #9333EA; }
.rate-icon.replace { background: rgba(245,158,11,0.16); color: #B45309; }
.rate-icon.bonus   { background: rgba(16,185,129,0.16); color: var(--success); }

.rate-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.rate-name {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text);
}
.rate-sub {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.rate-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.rate-value .unit {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 4px;
}
.rate-value.percent { color: var(--accent); }

.rate-edit-btn {
  width: 30px; height: 30px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-faint);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.rate-edit-btn:hover { background: var(--accent-soft); color: var(--accent); }
.rate-edit-btn svg { width: 14px; height: 14px; }

/* ---- BREAKDOWN TABLE ----
   Lives inside a .list-section. Same shell-less <table> as .data-table
   but with wider horizontal padding to match section rhythm and a
   .total row modifier for the summary line. Used for "Breakdown by
   service type" / "Salary components" / etc.

   Reuses .col-num (right-aligned) from .data-table's column system.
   Use .tr-amount.neg inside td.col-num for negative rows (penalties). */
.bd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.bd-table thead th {
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 10px 22px;
  background: rgba(20,20,60,0.02);
  border-bottom: 1px solid var(--border);
}
.bd-table thead th.col-num { text-align: right; }
.bd-table tbody tr {
  transition: background var(--dur-fast) var(--ease);
}
.bd-table tbody tr:hover { background: rgba(20,20,60,0.02); }
.bd-table tbody td {
  padding: 12px 22px;
  border-top: 1px solid var(--hairline);
  vertical-align: middle;
}
.bd-table tbody td.col-num {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bd-table tbody tr.total td {
  background: rgba(20,20,60,0.025);
  border-top: 2px solid var(--border);
  font-weight: 800;
}
.bd-table tbody tr.total td.col-num {
  font-size: 16px;
}

/* ---- PAYOUT-ROW INNER CELLS ----
   Cells used inside .list-row.layout-payout (6-col grid from iter-12).
   Each cell is a small primitive (date stack, period stack, sessions
   count, bonus chip, amount, kebab). */
.payout-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.payout-date-main {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.payout-date-sub {
  font-size: var(--fs-xs);
  color: var(--text-faint);
}

.payout-period {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text);
}
.payout-period-sub {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.payout-sessions {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.payout-bonus {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: #B45309;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(245,158,11,0.12);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.payout-amount {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.payout-amount .unit {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 2px;
}

.payout-kebab {
  width: 30px; height: 30px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-faint);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.payout-kebab:hover { background: var(--accent-soft); color: var(--accent); }
.payout-kebab svg { width: 14px; height: 14px; }

/* ---- YEAR TOTAL BANNER ----
   Bottom footer of a payouts list: "Всего за год · N тыс ₽".
   Different from .table-footer (which is row-pagination chrome).
   Use as the LAST child of a .list-section that contains payout rows. */
.year-total-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px;
  background: rgba(20,20,60,0.02);
  border-top: 2px solid var(--border);
  font-size: 13px;
}
.ytb-label {
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--fs-xs);
}
.ytb-value {
  margin-left: auto;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.ytb-value .unit {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 4px;
}

/* ---- COLLAPSIBLE LIST-SECTION (<details>) ----
   Used for "Ставки и проценты" — collapsed by default below the main
   payout list. Reuses .list-section chrome; adds <summary> styling
   to match .list-section-head and a disclosure caret on the right. */
details.list-section[open] { /* same as closed visually */ }
details.list-section > summary {
  list-style: none;
  cursor: pointer;
}
details.list-section > summary::-webkit-details-marker { display: none; }
details.list-section > summary::marker { content: ''; }
details.list-section > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(20,20,60,0.02);
}
details.list-section > summary .list-section-disclosure {
  margin-left: auto;
  color: var(--accent);
  font-size: var(--fs-sm);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
details.list-section > summary .list-section-disclosure::after {
  content: '▾';
  transition: transform var(--dur-fast) var(--ease);
}
details.list-section[open] > summary .list-section-disclosure::after {
  transform: rotate(180deg);
}

/* ════════════════════════════════════════════════════════════════════ */
/* ════ STARS-LINE + REVIEW PRIMITIVES (iter 19, 2026-05-13) ═════════ */
/* ════════════════════════════════════════════════════════════════════ */
/* Promoted from sketch 012 trainer-reviews winner A (summary banner +
   review list with reply + admin actions). Reuses iter-12 .list-section
   chrome + iter-17 .row-avatar (with new .size-md modifier) + iter-17
   .load-more. Adds three new families:

   1. .stars-line — generic row of star SVGs (filled / empty / half).
      Replaces ad-hoc .sb-stars-line / .rev-stars-right / .rh-stars /
      .dh-stars from sketches 012/B/C.
   2. .summary-banner — compact horizontal rating banner inside a
      .list-section (avg / stars / count / 5-row distribution).
   3. .rev-item family — review item with optional .is-needs-reply /
      .is-low-rating state, including .rev-head / .rev-context /
      .rev-text / .rev-meta-row / .rev-actions-row + .rev-action-btn /
      .rev-reply nested reply card. */

/* ---- AVATAR SIZE MODIFIER (extends iter-12 .row-avatar) ----
   .row-avatar defaults to 40 × 40. New .size-md is 36 × 36 — used by
   trainer-detail listings, review heads, and elsewhere a medium avatar
   is needed without the full row-listing presence. Note: the existing
   .client-cell.client-cell-compact .row-avatar compound stays as a
   convenience shorthand (auto-sizes when avatar is inside the compact
   client cell); .row-avatar.size-md works in any context. */
.row-avatar.size-md {
  width: 36px; height: 36px;
  font-size: 13px;
}

/* ---- STARS-LINE ----
   Default size 14 × 14 (used in compact summary banners). .size-md
   bumps to 16 × 16 for review heads. Inner SVGs carry a state class:
   .filled (amber #F59E0B), .empty (faint), .half (amber 50% opacity). */
.stars-line {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}
.stars-line svg {
  width: 14px; height: 14px;
  flex-shrink: 0;
}
.stars-line.size-md svg { width: 16px; height: 16px; }
.stars-line.size-lg svg { width: 20px; height: 20px; gap: 3px; }
.stars-line svg.filled {
  color: #F59E0B;
  fill: currentColor;
}
.stars-line svg.empty {
  color: var(--border-strong);
  fill: transparent;
}
.stars-line svg.half {
  color: #F59E0B;
  fill: currentColor;
  opacity: 0.5;
}

/* ---- SUMMARY BANNER ----
   Compact rating banner. Lives inside a .list-section (no margin /
   border of its own — section chrome wraps it). */
.summary-banner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 26px;
}
.sb-rating {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-shrink: 0;
}
.sb-rating-big {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.sb-rating-of {
  font-size: var(--fs-base);
  color: var(--text-muted);
  font-weight: 600;
}
.sb-stars-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sb-count {
  font-size: 13px;
  color: var(--text-muted);
}
.sb-count strong { color: var(--text); font-weight: 700; }

.sb-distro {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: auto;
  min-width: 220px;
}
.sd-row {
  display: grid;
  grid-template-columns: 28px 110px 36px;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
}
.sd-label { color: var(--text-muted); }
.sd-bar {
  height: 6px;
  background: rgba(20,20,60,0.06);
  border-radius: 4px;
  overflow: hidden;
}
.sd-fill {
  height: 100%;
  background: linear-gradient(90deg, #F59E0B, #FBBF24);
  border-radius: 4px;
}
.sd-count {
  text-align: right;
  font-weight: 700;
  color: var(--text);
}

/* ---- REVIEW ITEM ----
   One review in the list. Lives inside .list-section (after .list-section-head).
   .is-needs-reply / .is-low-rating add tinted background + colored left edge.
   Carry-forward: shares structural intent with .list-row.is-attention /
   .is-alert from iter-12; row-level vs card-level tints are styled
   slightly differently and not unified yet. */
.rev-item {
  padding: 18px 26px;
  border-top: 1px solid var(--hairline);
  position: relative;
}
.rev-item:first-of-type { border-top: 0; }

.rev-item.is-needs-reply {
  background: rgba(245,158,11,0.04);
}
.rev-item.is-needs-reply::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--warning);
}
.rev-item.is-low-rating {
  background: rgba(239,68,68,0.03);
}
.rev-item.is-low-rating::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--danger);
}

/* Review head — avatar + author block + right-aligned stars */
.rev-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.rev-author-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.rev-author-name {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rev-fav-mark { color: #F59E0B; }
.rev-fav-mark svg {
  width: 12px; height: 12px;
  fill: currentColor;
}
.rev-author-sub {
  font-size: var(--fs-xs);
  color: var(--text-faint);
}
/* Right-aligned stars inside .rev-head */
.rev-head .stars-line { margin-left: auto; }

/* Session/service context chip — "Хатха-йога · 11.04.2026" */
.rev-context {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  padding: 3px 8px;
  background: rgba(20,20,60,0.04);
  border-radius: 6px;
  margin-bottom: 10px;
}
.rev-context svg { width: 11px; height: 11px; }

/* Review body paragraph */
.rev-text {
  font-size: var(--fs-base);
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 8px;
}

/* Meta line — date, channel, optional warn */
.rev-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-xs);
  color: var(--text-faint);
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.rev-meta-row .sep { color: var(--text-faint); }
.rev-meta-warn {
  color: var(--warning-text);
  font-weight: 700;
}

/* Actions row — inline buttons. .primary is solid accent for the main
   action ("Ответить"); .warn / .danger flip hover only. */
.rev-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.rev-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font: 600 12px/1 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.rev-action-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-soft-2);
}
.rev-action-btn.primary {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
}
.rev-action-btn.primary:hover {
  background: var(--accent-hover, #4338CA);
}
.rev-action-btn.warn:hover {
  background: var(--warning-bg);
  color: var(--warning-text);
  border-color: var(--warning);
}
.rev-action-btn.danger:hover {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-color: var(--danger);
}
.rev-action-btn svg { width: 12px; height: 12px; }

/* Nested reply block — accent-tinted with left accent bar */
.rev-reply {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
}
.rev-reply-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: var(--fs-xs);
}
.rev-reply-author {
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rev-reply-author svg { width: 11px; height: 11px; }
.rev-reply-date { color: var(--text-muted); }
.rev-reply-tag {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255,255,255,0.5);
}
.rev-reply-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════════════ */
/* ════ DOCUMENT ROW EXTENSIONS (iter 20, 2026-05-13) ════════════════ */
/* ════════════════════════════════════════════════════════════════════ */
/* Promoted from sketch 008 documents-tab winner C ("Требуют внимания" в
   топе). Heavy reuse of canonical chrome — .list-section + .attention
   modifier already in iter-12, .doc-row + .doc-icon + .doc-action +
   .doc-kebab in legacy DS. Five additions:

   1. .doc-row.is-attention / .is-alert — state tints (amber / red) +
      3 px left bar. Mirrors .list-row.is-attention / .is-alert pattern
      from iter-12 but applied to the legacy .doc-row family.
   2. .doc-info + .doc-name + .doc-meta — content cell of a doc-row
      (info column between icon and status pill).
   3. .doc-status (+ .ok / .neutral / .warn / .alert / .missing) — five
      status pill variants. Each variant has its own visual leading mark
      (dot / ⚠ / ! / dashed border).
   4. .file-ext (+ .pdf / .jpg / .png) — small file-extension chip.
   5. .doc-add-btn — outlined "+ Добавить" button for section heads.

   Carry-forward (defer cross-button unification):
   .doc-add-btn shares structural intent with .vac-action (iter-12) and
   .rev-action-btn (iter-19) — three different small inline buttons in
   the same DS. All have transparent fill / strong border / 12 px font /
   8 px radius, with slightly different padding. Worth a follow-up
   .btn-inline unification pass; not done here to avoid churn. */

/* ---- AMBER TINT FOR ATTENTION-SECTION INNER ELEMENTS ----
   Extends iter-12 .list-section.attention chrome (which only tints
   background + border) with amber title color + amber count chip.
   No-op for non-attention sections. */
.list-section.attention .list-section-title { color: var(--warning-text); }
.list-section.attention .list-section-count {
  background: rgba(245,158,11,0.16);
  color: #B45309;
}

/* ---- DOC ICON / DOC ACTION WARN MODIFIERS ----
   For rows inside .list-section.attention or .doc-row.is-attention.
   .doc-icon.warn — amber-tinted icon (overrides default accent).
   .doc-action.warn — amber-tinted action button ("Запросить" on rows
   that need follow-up). */
.doc-icon.warn {
  background: rgba(245,158,11,0.16);
  color: #B45309;
}
.doc-action.warn {
  background: var(--warning-bg);
  color: var(--warning-text);
}
.doc-action.warn:hover {
  background: rgba(245,158,11,0.24);
  color: var(--warning-text);
}

/* ---- DOC ROW STATE MODIFIERS ---- */
.doc-row.is-attention {
  background: linear-gradient(90deg, rgba(245,158,11,0.05), transparent);
  position: relative;
}
.doc-row.is-attention::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--warning);
}
.doc-row.is-alert {
  background: linear-gradient(90deg, rgba(239,68,68,0.05), transparent);
  position: relative;
}
.doc-row.is-alert::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--danger);
}
/* Dim modifier — used when a row is shown as a fade-out duplicate (e.g.,
   the medical-card row appears both in the top "Требуют внимания" section
   AND faded in its original "Сканы документов" category in Variant C). */
.doc-row.is-dim { opacity: 0.6; }

/* Inline "(дублируется выше)" hint inside a doc-name. Tiny + amber-muted. */
.doc-dup-hint {
  font-size: 10px;
  font-weight: 600;
  color: var(--warning-text);
  margin-left: 4px;
}

/* ---- DOC INFO CELL (content between icon and status pill) ---- */
.doc-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.doc-name {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.doc-meta {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.doc-meta .doc-meta-sep { color: var(--text-faint); }
.doc-meta-mono {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: var(--fs-xs);
}

/* ---- DOC STATUS PILL (5 variants) ---- */
.doc-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.doc-status.ok {
  background: var(--success-bg);
  color: var(--success-text);
}
.doc-status.neutral {
  background: rgba(20,20,60,0.06);
  color: var(--text-muted);
}
.doc-status.warn {
  background: var(--warning-bg);
  color: var(--warning-text);
}
.doc-status.warn::before {
  content: '⚠';
  font-weight: 900;
  font-size: 10px;
}
.doc-status.alert {
  background: var(--danger-bg);
  color: var(--danger-text);
}
.doc-status.alert::before {
  content: '!';
  font-weight: 900;
}
.doc-status.missing {
  background: transparent;
  color: var(--text-faint);
  border: 1px dashed var(--border-strong);
}

/* ---- FILE EXTENSION CHIP ---- */
.file-ext {
  display: inline-flex;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(20,20,60,0.06);
  color: var(--text-muted);
}
.file-ext.pdf {
  background: rgba(239,68,68,0.12);
  color: var(--danger);
}
.file-ext.jpg,
.file-ext.png {
  background: rgba(79,70,229,0.10);
  color: var(--accent);
}

/* ---- DOC ADD BUTTON (outlined "+ Добавить" for section heads) ----
   Carry-forward: see iter-20 header note re cross-button unification. */
.doc-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font: 600 12px/1 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.doc-add-btn:hover {
  color: var(--accent);
  border-color: var(--accent-soft-2);
  background: var(--accent-soft);
}
.doc-add-btn svg { width: 12px; height: 12px; }

/* ════════════════════════════════════════════════════════════════════ */
/* ════ ACCESS-TAB PRIMITIVES (iter 22, 2026-05-13) ══════════════════ */
/* ════════════════════════════════════════════════════════════════════ */
/* Promoted from sketch 005 personnel-access winner B (group cards).
   Biggest single-port iteration since iter-16. The Доступы tab has no
   analog in client/trainer scope — it's the unique screen for the
   personnel persona (preset-based RBAC + per-employee override).

   Five families added:

   1. .preset-header — banner over a tab (preset name + stats + link).
      Universal: also reusable for Документы ("3 неподписанных"),
      Финансы ("к выплате 27 000 ₽"), etc.
   2. .ovr-badge (+ .plus / .minus) — inline override marker. Tiny
      uppercase pill with leading +/− glyph. Green/red.
   3. .reset-btn — outlined inline "undo" button with ↺ icon. FOURTH
      small inline action button (see carry-forward below).
   4. .perm-switch (+ .override / .override-off) — toggle primitive.
      Standard ON = accent. .override = success green (= "lично enabled
      outside preset"). .override-off = danger red + diagonal strike
      (= "lично disabled inside preset").
   5. .perm-group-grid + .perm-card (+ .has-override) — 2-column grid
      of permission groups. Each card lists rows with .perm-line; rows
      that deviate from the preset get .is-override tint via the .pl-*
      cell family.

   Carry-forward (.btn-inline unification — now FOUR overlaps):
   .reset-btn joins .vac-action (iter-12), .rev-action-btn (iter-19),
   .doc-add-btn (iter-20). Four small inline buttons. Same shape:
   transparent fill / 1 px strong border / ~11–12 px font / 6–8 px
   radius / hover → accent. Painfully overdue for a single .btn-inline
   primitive with .compact / .primary / .warn / .danger / .undo
   modifiers. Park as a follow-up cleanup pass — not done here to keep
   the iter-22 diff focused on the access-tab port. */

/* ---- PRESET HEADER (banner above an employee's tab content) ---- */
.preset-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 18px;
}
.ph-block { display: flex; flex-direction: column; gap: 4px; }
.ph-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.ph-preset-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}
.ph-preset-name .ph-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--accent-soft-2);
  background: var(--accent-soft);
}
.ph-stats {
  display: flex;
  gap: 22px;
  margin-left: auto;
}
.ph-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 70px;
}
.ph-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}
.ph-stat-value.override { color: var(--accent); }
.ph-stat-value .ph-stat-unit {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}
.ph-stat-value.is-faint { color: var(--text-faint); }
.ph-stat-label {
  font-size: 11px;
  color: var(--text-muted);
}
.preset-changer-link {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.preset-changer-link:hover { text-decoration: underline; }

/* ---- OVERRIDE BADGE (inline +/− pill on a perm-line name) ---- */
.ovr-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}
.ovr-badge.plus {
  background: var(--success-bg);
  color: var(--success-text);
}
.ovr-badge.plus::before { content: '+'; font-weight: 900; }
.ovr-badge.minus {
  background: var(--danger-bg);
  color: var(--danger-text);
}
.ovr-badge.minus::before { content: '−'; font-weight: 900; }

/* ---- RESET BUTTON (inline "undo to preset" with ↺ icon) ----
   Carry-forward: see iter-22 header note re .btn-inline unification.
   Tighter than .doc-add-btn (3/8 px padding vs 5/12, 11 px vs 12 px). */
.reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font: 600 11px/1 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.reset-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-soft-2);
}
.reset-btn svg { width: 11px; height: 11px; }

/* ---- PERM SWITCH (toggle primitive) ----
   Base = accent on / muted off. .override = success green ("lично ON
   outside preset"). .override-off = danger red + diagonal strike
   ("lично OFF inside preset"). */
.perm-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.perm-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.perm-switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(20, 20, 60, 0.12);
  border-radius: 20px;
  transition: background var(--dur-fast) var(--ease);
}
.perm-switch .slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--dur-fast) var(--ease);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.perm-switch input:checked + .slider { background: var(--accent); }
.perm-switch input:checked + .slider::before { transform: translateX(16px); }
.perm-switch.override input:checked + .slider { background: var(--success); }
.perm-switch.override-off .slider { background: rgba(239, 68, 68, 0.25); }
.perm-switch.override-off .slider::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 9px;
  width: 2px;
  height: 10px;
  background: var(--danger-text);
  border-radius: 1px;
  transform: rotate(45deg);
}

/* ---- PERM GROUP GRID + PERM CARD ---- */
.perm-group-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-grid-gap);
}
.perm-card {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.perm-card.has-override { border-color: rgba(79, 70, 229, 0.30); }
.perm-card-head {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}
.perm-card-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  flex: 1;
}
.perm-card-summary {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.perm-card-summary .pcs-ovr-count {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- PERM LINE (row inside a perm-card) ---- */
.perm-card .perm-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--hairline);
}
.perm-card .perm-line:last-child { border-bottom: none; }
.perm-card .perm-line .pl-name {
  flex: 1;
  font-weight: 500;
  color: var(--text);
}
.perm-card .perm-line.is-override .pl-name {
  color: var(--text);
}
.perm-card .perm-line .pl-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ════════════════════════════════════════════════════════════════════ */
/* ════ FINANCE-TAB EXTENSIONS — salary breakdown (iter 23) ══════════ */
/* ════════════════════════════════════════════════════════════════════ */
/* Personnel-finance port (sketch 016 winner A) ops-mirrors trainer-
   finance: .fin-hero.accent + .kpi-row + .bd-table breakdown + payouts
   history + collapsed conditions. The .fin-hero (iter-18), .kpi-row +
   .kpi-card.stripe-accent (iter-12), .list-row.layout-payout (iter-12),
   .payout-* cells (iter-18), .year-total-banner (iter-18), .rate-row
   (iter-18) and details.list-section pattern (iter-18) all flow
   through unchanged.

   Five extensions here:

   1. .bd-table tr.subtotal — intermediate "Начислено всего" row before
      deductions (uppercase, dark-bg). Sits between the income rows and
      the deduction rows in a multi-step breakdown. Differs from the
      bottom-line .total (which now also gets a .accent modifier).
   2. .bd-table tbody td.col-num.pos / .neg — direct cell color
      modifiers (replaces nested .tr-amount.pos/.neg wrappers). Cleaner
      markup on a personnel-finance breakdown with 5+ pos/neg rows.
   3. .bd-table tr.total.accent — accent-themed grand-total variant
      (gradient bg + accent borders). Used for "К выплате" when the
      bottom-line row is the conclusion (not just a sum). Plain .total
      stays neutral for trainer-finance "Итого".
   4. .bd-cat — first-column category cell of a breakdown table.
      Colored dot + name stack (name + sub). Dot variants: .salary
      (accent) / .bonus (warning) / .replace (success) / .deduct
      (danger) / .advance (purple).
   5. .payout-status (default = success "Выплачено") + .payout-status
      .advance (purple "Аванс") — small inline status pill that fits
      into one of the auto cells of .list-row.layout-payout. Joins the
      .payout-bonus chip (iter-18) as the second status-style cell.

   Plus two new rate-row icon variants:

   6. .rate-icon.salary (accent) and .rate-icon.quarterly (purple) —
      promoted alongside existing .group / .indiv / .replace / .bonus.
      Unifies the personnel "Условия оплаты" section onto canonical
      details.list-section + .rate-row family (no separate
      details.fin-conditions / .cond-row family). */

/* ---- BD-TABLE SUBTOTAL + POS/NEG CELLS + ACCENT TOTAL ---- */
.bd-table tbody tr.subtotal td {
  background: rgba(20, 20, 60, 0.025);
  border-top: 2px solid var(--border);
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.bd-table tbody tr.subtotal td.col-num {
  font-size: 15px;
  letter-spacing: -0.01em;
  text-transform: none;
}
.bd-table tbody td.col-num.pos { color: var(--text); }
.bd-table tbody td.col-num.neg { color: var(--danger-text); }
.bd-table tbody tr.total.accent td {
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.06), rgba(79, 70, 229, 0.02));
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.bd-table tbody tr.total.accent td.col-num {
  font-size: 18px;
  letter-spacing: -0.01em;
  text-transform: none;
}

/* ---- BD-CAT (first-column category cell of a breakdown row) ---- */
.bd-cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.bd-cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bd-cat-dot.salary  { background: var(--accent); }
.bd-cat-dot.bonus   { background: var(--warning); }
.bd-cat-dot.replace { background: var(--success); }
.bd-cat-dot.deduct  { background: var(--danger); }
.bd-cat-dot.advance { background: #9333EA; }
.bd-cat-name {
  font-weight: 600;
  color: var(--text);
}
.bd-cat-sub {
  color: var(--text-faint);
  font-size: 11px;
  margin-left: 4px;
}

/* ---- PAYOUT-STATUS (inline status pill inside a payout row) ----
   Default = success (Выплачено). .advance = purple (Аванс). Slots
   into one of the auto cells of .list-row.layout-payout, alongside
   the existing .payout-bonus warning chip from iter-18. */
.payout-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  white-space: nowrap;
}
.payout-status.advance {
  background: rgba(147, 51, 234, 0.12);
  color: #7E22CE;
}

/* ---- RATE-ICON: new variants for personnel finance ----
   Joins existing .group / .indiv / .replace / .bonus from iter-18. */
.rate-icon.salary    { background: var(--accent-soft);          color: var(--accent); }
.rate-icon.quarterly { background: rgba(147, 51, 234, 0.12);    color: #7E22CE; }


/* ============================================================
   ITER 24 — AFISHA + SETTINGS PRIMITIVES (2026-05-13)
   Promoted from sketches 017-020 (winner variants only).
   See README.md "Iter 24" for source mapping and naming notes.
   ============================================================ */

/* ---- PROGRESS-FILL: extend existing variants (iter-24)
   Existing: .progress-fill.warning / .danger (added earlier).
   New: .success and .flat — for event sales progress states. */
.progress-fill.success { background: linear-gradient(135deg, var(--success), #34D399); }
.progress-fill.flat    { background: var(--text-faint); opacity: 0.4; }

/* ---- TAB-COUNTER: warn modifier (iter-24)
   Yellow tint for tabs flagging items needing attention (e.g. событие
   с пустыми обязательными полями). Joins existing .tab-counter. */
.tab-counter.warn { background: var(--warning-bg); color: var(--warning-text); }

/* ============ FILTER CHIP (afisha list filters; sketch 017-A) ============
   Distinct from `.chip` (toggle filter with `.on` modifier). `.filter-chip`
   is a pill with optional inner count bubble (e.g. "Опубликованные · 12")
   in `.active` state with accent gradient. Use inside `.filter-chip-row`
   for horizontal wrapping group.
*/
.filter-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-chip {
  padding: 7px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filter-chip:hover { background: var(--surface-solid); color: var(--text); }
.filter-chip.active {
  background: var(--accent-grad);
  color: var(--text-on-accent);
  border-color: transparent;
  box-shadow: var(--shadow-accent);
}
.filter-chip .count {
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: rgba(20, 20, 60, 0.06);
  color: var(--text-muted);
}
.filter-chip.active .count { background: rgba(255, 255, 255, 0.22); color: var(--text-on-accent); }

/* ============ SECTION BLOCK (top-level grouping; sketch 019-B) ============
   Top-level page-section grouping (e.g. "Студии" / "Внешние адреса" on
   Locations page). Distinct from existing `.section-header` which is
   card-internal (padded 22px 26px 14px inside a glass surface).
   `.section-head` is a top-level header that sits above its block.
*/
.section-block { margin-bottom: 22px; }
.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 4px 0 10px;
  padding: 0 4px;
}
.section-head h2 {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text);
  letter-spacing: var(--tracking-tight);
}
.section-head .section-cta {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.section-head .section-cta:hover { background: var(--surface-solid); color: var(--text); }
/* `.section-meta` already exists (card-internal); reused here unchanged. */

/* ============ PILL TABS (segmented control; sketch 019-A pattern) ============
   Pill-style segmented control (smaller than `.tabs`). Contained group
   with one active option painted in accent gradient. Optional `.pill-count`
   bubble inside each option. Rounded full-pill outer container.
*/
.pill-tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 2px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.pill-tabs button {
  padding: 7px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pill-tabs button:hover { color: var(--text); }
.pill-tabs button.active {
  background: var(--accent-grad);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-accent);
}
.pill-tabs .pill-count {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: rgba(20, 20, 60, 0.06);
  color: var(--text-muted);
}
.pill-tabs button.active .pill-count {
  background: rgba(255, 255, 255, 0.22);
  color: var(--text-on-accent);
}

/* ============ CALLOUT TAG (absolute red badge; sketch 020-A) ============
   Absolute-positioned promo/new-feature badge. Used in sidebar to mark
   "новое" on the Афиша nav-item. Caller positions it (e.g. with `top` /
   `right` on parent `position: relative`).
*/
.callout-tag {
  position: absolute;
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.4);
  pointer-events: none;
}

/* ============ FIELDSET CARD (sketch 018-A) ============
   A glass-surface card grouping a set of form fields under a small
   eyebrow title with optional icon. Distinct from `.form-section` (used
   in numbered wizard for create-client) — `.fieldset` is freeform.
*/
.fieldset {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-md);
}
.fieldset-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fieldset-title svg { width: 16px; height: 16px; color: var(--accent); }

/* ============ FORM PRIMITIVES (sketch 018-A) ============
   `.form-grid` is a gap-controlled grid (`cols-2`, `cols-3` modifiers).
   `.form-field` wraps an uppercase eyebrow label + input/textarea/select
   with focus ring in accent. `.with-icon` slots a leading SVG inside the
   input. `.hint` adds a small helper line below.
*/
.form-grid { display: grid; gap: 16px; }
.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-field input,
.form-field textarea,
.form-field select {
  font-family: inherit;
  font-size: var(--fs-base);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-field textarea { min-height: 110px; resize: vertical; }
.form-field .hint {
  font-size: var(--fs-sm);
  color: var(--text-faint);
  margin-top: 2px;
}
.form-field .with-icon { position: relative; }
.form-field .with-icon input { padding-left: 38px; }
.form-field .with-icon > svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-faint);
}

/* ============ PAGE HEAD ROW (detail-page header; sketch 018-A) ============
   Horizontal head row for detail-page screens (e.g. event-edit). Combines
   `.breadcrumb-back` link + `<h1>` title + `.page-actions` button group.
*/
.page-head-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}
.page-head-row h1 {
  margin: 0;
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--text);
  letter-spacing: var(--tracking-tight);
}
.breadcrumb-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.breadcrumb-back:hover { background: var(--accent-soft); color: var(--accent); }
.breadcrumb-back svg { width: 14px; height: 14px; }
.page-actions { display: flex; gap: 8px; margin-left: auto; }

/* ============ STAT TILE (self-contained stat card; sketch 018-A) ============
   Self-contained glass card used in event editor side column to show
   per-event live stats (продано / выручка / темп). Distinct from existing
   `.stat-label/.stat-value` floating primitives — `.stat-tile` is a
   complete card scoping its internals to avoid global naming clashes.
*/
.stat-tile {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.stat-tile .stat-head {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.stat-tile .stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: var(--tracking-tight);
}
.stat-tile .stat-meta {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-top: 2px;
}
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* ============ SALES BAR (heavy progress; sketch 018-A) ============
   8px-tall progress bar for prominent sales indicators (event editor
   sticky stats panel). Heavier than `.progress-fill` (6px). Uses a
   nested `.fill` element for the gradient.
*/
.sales-bar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  overflow: hidden;
  margin: 8px 0 6px;
}
.sales-bar .fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--accent-grad);
}

/* ============ EVENT MAGAZINE GRID (afisha list winner; sketch 017-A) ============
   Magazine-style event card grid for Афиша list. Auto-fill grid with
   310px min cards. Each `.event-card` is a glass surface with a 16:9
   `.event-cover` (gradient or image background), absolute-positioned
   `.event-status-badge` and `.event-date-tag` overlays, and a body
   with `.event-meta-line` rows + `.event-progress` (uses `.progress-bar`).
*/
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}
.event-card {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(20, 20, 60, 0.10);
}
.event-cover {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  position: relative;
}
.event-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(20, 20, 60, 0.55));
}
.event-status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
  z-index: 2;
}
.event-status-badge.s-published { background: var(--success-bg); color: var(--success-text); }
.event-status-badge.s-draft     { background: var(--neutral-bg); color: var(--text-muted); }
.event-status-badge.s-sold-out  { background: var(--danger-bg);  color: var(--danger-text); }
.event-status-badge.s-archived  { background: rgba(20, 20, 60, 0.45); color: var(--text-on-accent); }
.event-date-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  background: rgba(20, 20, 60, 0.78);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-on-accent);
  letter-spacing: 0.04em;
  z-index: 2;
}
.event-cover-title {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  z-index: 2;
  color: var(--text-on-accent);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: 1.2;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.event-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.event-meta-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.event-meta-line svg { width: 14px; height: 14px; color: var(--text-faint); }
.event-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

/* ---- COVER GRADIENTS (placeholder art for events without uploaded cover) ----
   Six branded gradients usable on `.event-cover` and `.cover-uploader`.
   Pick by event id mod 6 server-side, or randomly. */
.cover-1 { background-image: linear-gradient(135deg, #FF6B9D 0%, #C44569 100%); }
.cover-2 { background-image: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%); }
.cover-3 { background-image: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%); }
.cover-4 { background-image: linear-gradient(135deg, #1E1B4B 0%, #4F46E5 50%, #DB2777 100%); }
.cover-5 { background-image: linear-gradient(135deg, #10B981 0%, #6366F1 100%); }
.cover-6 { background-image: linear-gradient(135deg, #64748B 0%, #94A3B8 100%); }

/* ============ EVENT EDITOR LAYOUT (sketch 018-A) ============
   Two-column split for event detail page: main column (form, fieldsets)
   + sticky side column (live stats, promo codes, actions).
*/
.event-content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  align-items: start;
}
.event-main-col { display: flex; flex-direction: column; gap: 16px; }
.event-side-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 70px;
}

/* ============ COVER UPLOADER (sketch 018-A) ============
   16:9 affordance for uploading event cover image. Defaults to a
   gradient (`.cover-1..6`) and overlays a clickable label. Replace
   `background-image` server-side to swap to real upload.
*/
.cover-uploader {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-image: linear-gradient(135deg, #FF6B9D 0%, #C44569 100%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 14px;
  cursor: pointer;
}
.cover-uploader::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(20, 20, 60, 0.5));
}
.cover-uploader-label {
  position: relative;
  z-index: 2;
  color: var(--text-on-accent);
  font-size: var(--fs-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-pill);
}
.cover-uploader-label svg { width: 13px; height: 13px; }

/* ============ PROMO CODE CHIP (sketch 018-A) ============
   Monospace pill showing a promo code with optional usage meta on the
   right (e.g. "SAVE10 · 12/100 used"). Use inside `.promo-row` for
   horizontal wrapping.
*/
.promo-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-pill);
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: var(--fs-sm);
  font-weight: 700;
  border: 1px solid var(--accent-soft-2);
}
.promo-chip code {
  font-family: inherit;
  background: var(--surface-solid);
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  color: var(--accent);
}
.promo-chip .promo-meta {
  color: var(--text-muted);
  font-weight: 500;
}
.promo-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============ SETTINGS SHELL (sketch 019-B) ============
   220-px sticky secondary nav + content grid. Use as the canonical
   layout for any Settings page (Локации, Прайс, Промокоды, Push,
   Шаблоны писем, Команда, Интеграции, etc.).
*/
.settings-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: start;
}
.settings-nav {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 70px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-nav-section {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 12px 6px;
}
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.settings-nav-item:hover { background: rgba(79, 70, 229, 0.05); color: var(--text); }
.settings-nav-item.active {
  background: var(--accent-grad);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-accent);
}
.settings-nav-item svg {
  width: 15px;
  height: 15px;
  color: var(--text-faint);
  flex-shrink: 0;
}
.settings-nav-item.active svg { color: var(--text-on-accent); }
.settings-nav-item.coming-soon { opacity: 0.45; cursor: not-allowed; }
.settings-nav-item .badge-soon {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: var(--neutral-bg);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings-page-head {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}
.settings-breadcrumb {
  font-size: var(--fs-sm);
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.settings-breadcrumb a { color: var(--accent); text-decoration: none; }
.settings-page-head h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: var(--tracking-tight);
}
.settings-page-head .desc {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin-top: 6px;
  max-width: 540px;
}

/* ============ LOCATIONS TABLE (sketch 019-B) ============
   Dedicated table for Settings → Локации. Could be generalized later
   if other Settings catalogs adopt the same row shape (avatar/name
   primary cell + meta + actions). Kept locations-scoped for now.
*/
.locations-table-wrap {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.locations-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.locations-table thead th {
  text-align: left;
  padding: 14px 18px;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.4);
}
.locations-table tbody tr {
  transition: background var(--dur-fast) var(--ease);
  cursor: pointer;
}
.locations-table tbody tr:hover { background: var(--surface-pressed); }
.locations-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: middle;
}
.locations-table tbody tr:last-child td { border-bottom: none; }
.loc-name { font-weight: 600; color: var(--text); }
.loc-sub {
  font-size: var(--fs-sm);
  color: var(--text-faint);
  margin-top: 2px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.loc-sub .metro {
  color: var(--text-on-accent);
  background: #E83E2D;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}
.loc-halls { display: flex; gap: 5px; flex-wrap: wrap; }
.hall-chip {
  padding: 3px 9px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 6px;
  font-size: var(--fs-xs);
  font-weight: 600;
}
.loc-usage { font-weight: 600; color: var(--text); }
.loc-usage-sub { font-size: var(--fs-xs); color: var(--text-faint); }

/* extend .row-actions hover-visibility to .locations-table */
.locations-table tbody tr:hover .row-actions { opacity: 1; }

/* ============ TYPE TAG (sketch 019; bullet pill) ============
   Small pill-with-bullet tag for typology (e.g. студия / внешний).
   Uses two semantic variants, palette comes from existing tokens.
*/
.type-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.type-tag.permanent { background: var(--accent-soft);  color: var(--accent); }
.type-tag.external  { background: var(--warning-bg);   color: var(--warning-text); }
.type-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ============ ROW ACTION BTN (heavier than .row-icon-btn; sketch 019-B) ============
   30×30 boxed icon button used inside table rows for individual actions.
   Heavier visual than `.row-icon-btn` (28×28, no border) so caller can
   pick between the two depending on row-density.
*/
.row-action-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.row-action-btn svg { width: 13px; height: 13px; }
.row-action-btn:hover { background: var(--surface-solid); color: var(--text); }

/* ============ TABLE HEAD ROW (sketch 019; head utility row) ============
   Generic horizontal utility row above a table (filters / spacer / CTA).
*/
.table-head-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.table-head-row .spacer { flex: 1; }

/* ════ SCHEDULE WEEK-VIEW PRIMITIVES (iter 25, 2026-05-13) ══════════ */
/* ════════════════════════════════════════════════════════════════════ */
/* Port of sketch 021 (originally 017) winner A (faithful grid). First screen of the
   new top-level "Расписание" section. Cross-trainer недельный обзор —
   7 дней × часовые ряды × session cards с waitlist-строками.

   Three families:

   1. .page-head — generic page header chrome (title + eyebrow). Joins
      patterns like client-detail.html / employees-list.html which had
      no explicit page header before. Reusable for any top-level
      section landing.
   2. .sched-toolbar — week-nav arrows + week-range label + .seg-toggle
      (Неделя/День) + filter-toolbar reuse + «Создать» CTA. Universal
      for any scheduling view.
   3. .sched-grid — outer glass surface + .sg-row (CSS Grid template
      helper: 56px rail + 7 day columns) + head row + body hour-rows.

   Plus the session card itself:

   4. .ss-card — session card primitive. Stripe-modifiers encode
      session type (.stripe-accent = групповое, .stripe-success =
      индивидуальное, .stripe-warning = массаж). State modifier
      .is-cancelled (opacity + strike). Inner cells .ss-title /
      .ss-title-text / .ss-occ (+ .is-full / .is-partial) / .ss-time /
      .ss-trainer / .ss-loc.
   5. .ss-waitlist-row — separate green tinted row under a session card
      in the same grid cell. Dotted leader + client name.

   Carry-forward (B/C variant primitives, reserved):
   .ss-occ-bar / .ss-occ-dot (visual occupancy dots) — деferred until
   session density doubles. .ss-waitlist-chip / .ss-waitlist-summary
   (collapsed waitlist) — admin предпочёл явные имена. .sched-empty
   ghost-add / .sched-now-line current-time / .sg-day-avatars — могут
   вернуться при добавлении day-view.

   Note on .seg-toggle vs .persona-toggle (iter-15):
   Both are segmented controls but visually different — .persona-toggle
   uses uppercase 11 px with accent active state (demo widget on
   personnel-general right column). .seg-toggle uses normal-case 12 px
   with white active state + shadow (primary view-switcher in toolbar).
   Visual distinction intentional; not unifying. */

/* ---- PAGE HEAD (generic top-level section header) ---- */
.page-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.page-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.page-eyebrow {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---- SCHEDULE TOOLBAR ---- */
.sched-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.week-nav {
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--dur-fast) var(--ease);
}
.week-nav:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-soft-2);
}
.week-range {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  min-width: 140px;
  text-align: center;
}
.seg-toggle {
  display: inline-flex;
  padding: 3px;
  background: rgba(20, 20, 60, 0.06);
  border-radius: 9px;
}
.seg-toggle button {
  background: transparent;
  border: 0;
  padding: 5px 12px;
  border-radius: 6px;
  font: 600 12px 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.seg-toggle button.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.stb-spacer { flex: 1; }
.sched-toolbar .filter-toolbar {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.sched-toolbar .btn-secondary,
.sched-toolbar .btn-primary {
  padding: 6px 12px;
  font-size: 12px;
}

/* ---- SCHEDULE GRID (outer chrome + row template) ---- */
.sched-grid {
  background: var(--surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.sg-row {
  display: grid;
  grid-template-columns: 56px repeat(7, 1fr);
}
.sched-grid-head {
  background: rgba(20, 20, 60, 0.025);
  border-bottom: 1px solid var(--border);
}
.sg-corner {
  padding: 14px 8px;
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sg-day {
  padding: 12px 14px;
  border-left: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sg-day-name {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sg-day-date {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}
.sg-day.is-today .sg-day-name { color: var(--accent); }
.sg-day.is-today .sg-day-date { color: var(--accent); }
.sg-day-counter {
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 500;
  margin-top: 1px;
}

.sg-hour-row { border-bottom: 1px solid var(--hairline); }
.sg-hour-row:last-child { border-bottom: none; }
.sg-hour-rail {
  padding: 10px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  border-right: 1px solid var(--hairline);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(20, 20, 60, 0.015);
}
.sg-cell {
  padding: 5px;
  border-left: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 70px;
}
.sg-cell.is-empty { background: rgba(20, 20, 60, 0.01); }

/* ---- SESSION CARD ----
   Stripe-modifiers encode session type:
   .stripe-accent  → групповое (indigo, lock-color from DS)
   .stripe-success → индивидуальное (green)
   .stripe-warning → массаж (amber) */
.ss-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 8px 6px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.ss-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--text-faint);
}
.ss-card.stripe-accent::before  { background: var(--accent); }
.ss-card.stripe-success::before { background: var(--success); }
.ss-card.stripe-warning::before { background: var(--warning); }
.ss-card:hover {
  box-shadow: 0 3px 10px rgba(20, 20, 60, 0.08);
  transform: translateY(-1px);
}
.ss-card.is-cancelled {
  opacity: 0.5;
  background: rgba(20, 20, 60, 0.02);
}
.ss-card.is-cancelled .ss-title { text-decoration: line-through; }
.ss-card.is-cancelled .ss-occ {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.ss-title {
  font-weight: 700;
  color: var(--text);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 1px;
  line-height: 1.2;
}
.ss-title-text { flex: 1; }
.ss-occ {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(20, 20, 60, 0.06);
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ss-occ.is-full {
  background: var(--accent-soft);
  color: var(--accent);
}
.ss-occ.is-partial {
  background: var(--warning-bg);
  color: var(--warning-text);
}
.ss-time {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.3;
}
.ss-trainer {
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.3;
}
.ss-loc {
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.3;
}

/* ---- WAITLIST ROW (variant A pattern — dotted leader + client name) ---- */
.ss-waitlist-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 10px;
  background: var(--success-bg);
  border-left: 3px solid var(--success);
  border-radius: 5px;
  font-size: 12px;
  color: var(--success-text);
  font-weight: 600;
}
.ss-waitlist-row::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--success);
}

/* ---- EMPTY INDIVIDUAL SLOT (ghost-mirror, from sketch 022 winner A) ----
   Marks a free trainer window inside the schedule grid. Same anatomy as
   `.ss-card` (.ss-title / .ss-time / .ss-trainer / .ss-loc) but with a
   pale-green fill (`--success-soft`) and a dashed `--success-edge` border
   that flips to solid on hover. Hover also reveals a centered `+` glyph
   on a translucent green wash — the slot reads as a click target the
   moment the cursor lands. Title is just «Свободно»; type-of-session is
   inferred from context (always индивидуалка on this surface). */
.ss-empty {
  position: relative;
  background: var(--success-soft);
  border: 1px dashed var(--success-edge);
  border-radius: 7px;
  padding: 6px 8px 6px 10px;
  font-size: 12px;
  cursor: pointer;
  min-height: 64px;
  overflow: hidden;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
.ss-empty::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--text-faint);
  opacity: 0.55;
}
.ss-empty .ss-title {
  font-weight: 700;
  color: var(--success-text);
  font-size: 12px;
  line-height: 1.2;
  margin-bottom: 1px;
}
.ss-empty .ss-time,
.ss-empty .ss-trainer,
.ss-empty .ss-loc { color: var(--text-muted); }
.ss-empty .ss-trainer { font-weight: 600; }
.ss-empty .ss-time { font-size: 12px; line-height: 1.3; }
.ss-empty .ss-loc  { font-size: 12px; }
/* Hover overlay — centered `+` glyph on translucent green wash.
   Color is `--success` @ 42% alpha (inline rgba; no token for this one-off). */
.ss-empty .ss-empty-plus {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.42);
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease);
}
.ss-empty:hover {
  border-style: solid;
  border-color: var(--success);
}
.ss-empty:hover .ss-empty-plus { opacity: 1; }
.ss-empty:focus-visible {
  outline: 2px solid var(--success);
  outline-offset: 2px;
}

/* ============================================================
   Sidebar submenu (Каталог and other nav-groups)
   Promoted from catalog/formats.html so any page with the canonical
   .sidebar markup gets a working expandable parent + sub-items.
   Toggle behaviour lives in design/prototypes/admin/shell.js.
   ============================================================ */
.nav-group { display: contents; }
.nav-item.nav-item-parent { position: relative; cursor: pointer; }
.nav-item.nav-item-parent .nav-chev {
  width: 14px; height: 14px;
  margin-left: auto;
  color: currentColor;
  opacity: 0.6;
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
  flex-shrink: 0;
}
.nav-item.nav-item-parent.is-open .nav-chev { transform: rotate(180deg); opacity: 0.85; }
.nav-item.nav-item-parent.has-active:not(.active) {
  color: var(--text);
  background: var(--accent-soft);
}
.nav-item.nav-item-parent.has-active:not(.active) .nav-icon { color: var(--accent); }

.nav-children {
  display: none;
  position: relative;
  padding: 2px 0 6px 0;
  margin: 0 0 4px 0;
}
.nav-children::before {
  content: '';
  position: absolute;
  left: 25px; top: 4px; bottom: 8px;
  width: 1px;
  background: var(--hairline);
}
.nav-group.is-open .nav-children { display: block; }

.nav-subitem {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 38px;
  margin: 1px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  position: relative;
}
.nav-subitem:hover { color: var(--text); background: var(--accent-soft); }
.nav-subitem.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
}
.nav-subitem.active::before {
  content: '';
  position: absolute;
  left: 25px; top: 6px; bottom: 6px;
  width: 1.5px;
  background: var(--accent);
  border-radius: 1px;
}
.nav-subitem .nav-subcount {
  margin-left: auto;
  font-size: 11px; font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--neutral-bg);
  color: var(--text-muted);
}
.nav-subitem.active .nav-subcount {
  background: var(--accent-soft-2);
  color: var(--accent);
}

/* ============================================================
   STATE VOCABULARY (D-03)
   Canonical empty / loading / input-error / busy / applied-filter /
   keyboard-focus states so screens stop inventing them locally.
   All ADDITIVE except the .code-cell.invalid and .btn-primary.is-busy
   modifiers (existing base rules are NOT redefined).
   Values derived from existing tokens + neighboring components.
   ============================================================ */

/* ---- Empty states (list / collection has no rows) ---- */
.empty-state,
.list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 24px;
  text-align: center;
  color: var(--text-faint);
  font-size: var(--fs-sm);
}
.empty-state .empty-state-icon,
.list-empty .empty-state-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
  color: var(--text-faint);
  opacity: 0.7;
}
.empty-state .empty-state-title,
.list-empty .empty-state-title {
  color: var(--text-muted);
  font-size: var(--fs-base);
  font-weight: 600;
}

/* ---- Loading / skeleton (neutral shimmer placeholder) ---- */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--neutral-bg);
  border-radius: var(--radius-sm);
  /* sizing comes from the host element; height fallback for bare use */
  min-height: 12px;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: skeleton-shimmer 1.2s var(--ease) infinite;
}
.is-loading {
  pointer-events: none;
  opacity: 0.6;
  cursor: progress;
}
@keyframes skeleton-shimmer {
  100% { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton::after { animation: none; }
}

/* ---- Input error (field-level validation) ---- */
.field-error {
  display: block;
  margin-top: 4px;
  color: var(--danger-text);
  font-size: var(--fs-xs);
  font-weight: 500;
}
input.invalid,
textarea.invalid,
select.invalid {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger-text);
}
input.invalid:focus,
textarea.invalid:focus,
select.invalid:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}
/* .code-cell already exists (TOTP); .invalid is its error modifier */
.code-cell.invalid {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger-text);
}
.code-cell.invalid:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

/* ---- Busy primary button (in-flight) — MODIFIER ONLY,
        base .btn-primary is untouched (Plan 03 One Voice intact) ---- */
.btn-primary.is-busy {
  position: relative;
  pointer-events: none;
  cursor: progress;
  color: transparent;          /* hide label while busy */
}
.btn-primary.is-busy::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid var(--text-on-accent);
  border-right-color: transparent;
  border-radius: var(--radius-pill);
  animation: btn-busy-spin 0.6s linear infinite;
}
@keyframes btn-busy-spin {
  100% { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary.is-busy::after { animation: none; }
}

/* ---- Applied-filter chip (an active/selected filter chip) ---- */
.filter-chip.applied,
.filter-chip.is-applied {
  background: var(--accent-soft);
  border-color: var(--accent-soft-2);
  color: var(--accent);
  font-weight: 600;
}
.filter-chip.applied .filter-chip-remove,
.filter-chip.is-applied .filter-chip-remove {
  color: var(--accent);
  opacity: 0.7;
  cursor: pointer;
}
.filter-chip.applied .filter-chip-remove:hover,
.filter-chip.is-applied .filter-chip-remove:hover {
  opacity: 1;
}

/* ---- Keyboard focus ring (SCOPED, not blanket *:focus-visible) ----
   Targets only interactive controls so decorative/blob/card chrome
   never gets an outline (D-03 guard). Mouse focus stays clean because
   :focus-visible only fires for keyboard/programmatic focus. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible,
[role="tab"]:focus-visible,
[role="link"]:focus-visible,
[role="menuitem"]:focus-visible,
[role="option"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ============================================================
   INLINE-CONFIRM DESTRUCTIVE (D-04)
   Two-step confirmation for destructive actions (уволить / refund /
   block / отмена занятия) that expands IN PLACE — NOT a modal. Modals
   break flow and feel enterprise-heavy (анти-референс); inline is calmer
   and faster while still demanding a deliberate second step (safety
   preserved). Step 1: a danger trigger (.inline-confirm-trigger, the
   `.action-item.danger` danger-ink idiom). Step 2: toggling `.is-open`
   on the host reveals the confirm strip (.inline-confirm-prompt) with a
   danger confirm button + a neutral cancel. No JS here — markup wires the
   .is-open toggle per screen (follow-up). NO position:fixed / backdrop /
   overlay — this is an inline expand only. Values from existing tokens. */
.inline-confirm {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
}

/* Step 1 — the destructive trigger (danger ink, transparent until hover,
   mirroring the .action-item.danger idiom). */
.inline-confirm-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--danger-bg);
  color: var(--danger-text);
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.inline-confirm-trigger:hover {
  background: var(--danger-bg);
  color: var(--danger-text);
}
.inline-confirm-trigger svg {
  width: 14px; height: 14px;
  color: var(--danger);
  flex-shrink: 0;
}

/* Step 2 — the confirm strip, collapsed by default; `.is-open` on the
   host expands it in place (height/opacity transition, no overlay). */
.inline-confirm-prompt {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  overflow: hidden;
  transition: grid-template-rows var(--dur-base) var(--ease),
              opacity var(--dur-fast) var(--ease);
}
.inline-confirm.is-open .inline-confirm-prompt {
  grid-template-rows: 1fr;
  opacity: 1;
}
.inline-confirm.is-open .inline-confirm-trigger {
  /* trigger is consumed by the open prompt; hide it during step 2 */
  display: none;
}
.inline-confirm-prompt-inner {
  min-height: 0;            /* lets the 0fr→1fr grid row collapse cleanly */
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  border-radius: var(--radius-md);
}
.inline-confirm-text {
  color: var(--danger-text);
  font-size: var(--fs-13);
  font-weight: 600;
  line-height: var(--lh-base);
}
.inline-confirm-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* The deliberate confirm — saturated danger (the explicit destructive
   commit). Distinct from the calm trigger so the second step reads as
   weighty. */
.inline-confirm-yes {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--danger);
  border: 1px solid var(--danger);
  color: var(--text-on-accent);
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.inline-confirm-yes:hover { background: var(--danger-text); transform: translateY(-1px); }
.inline-confirm-yes svg { width: 14px; height: 14px; }

/* The escape hatch — neutral cancel, same shape as .btn-secondary so
   the safe choice carries no danger weight. */
.inline-confirm-no {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.inline-confirm-no:hover { background: white; }

/* ============================================================
   STAT-INLINE COMPACT METRIC (D-07)
   A low-visual-weight alternative to the heavy hero-metric trio
   (.stat-label / .stat-value / .stat-tile) that dominates detail
   screens. The hero 26px value competes with the screen's primary
   content; .stat-inline sizes the value down to --fs-md (16px) and lays
   the eyebrow label beside it, so the metric informs without shouting.
   ADDITIVE — the hero trio is NOT redefined; screens that want the big
   metric keep it, screens that don't reach for .stat-inline. Label uses
   the eyebrow canon (700 / 0.10em, D-06). Values from existing tokens. */
.stat-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.stat-inline .stat-inline-label {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow); /* eyebrow canon 700 / 0.10em (D-06) */
}
.stat-inline .stat-inline-value {
  font-size: var(--fs-md);                 /* 16px — compact vs hero 26px .stat-value */
  font-weight: 700;
  color: var(--text);
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-tight);
}
.stat-inline .stat-inline-value .unit {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
  margin-left: 3px;
}
/* Stacked variant — label above value, still compact (column layout). */
.stat-inline.is-stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

/* ============ COMING-SOON MARKER (canonical "not-ready" signal) ============
   THE single source-of-truth in-page marker for any interactive control
   (button / link / tab / pill) that has no real screen or drawer behind it
   yet. Apply `.coming-soon` to the control and add a child
   `<span class="badge-soon">скоро</span>` for the pill label.

   Visual:      dimmed (opacity 0.5) + a small uppercase «скоро» pill badge.
   Interaction: cursor: not-allowed, pointer-events: none (non-clickable),
                NO hover affordance (no transform / background / color change).

   This replaces the 5 ad-hoc "not-ready" conventions that drifted across the
   prototype:
     1. `.tile.coming`            (index.html tile grid)
     2. `.coming-soon-hero`       (placeholder.html hero)
     3. `.settings-nav-item.coming-soon` + `.badge-soon` (settings nav — the
        VISUAL ANALOG this rule generalizes; that scoped rule stays as-is)
     4. `.is-locked`              (clients-list locked columns)
     5. ad-hoc inline opacity/disabled styling on individual controls
   Going forward, in-page controls use THIS class; `placeholder.html?s=<slug>`
   remains the section-level (whole-sidebar-item) tier — a different thing.

   OPPOSITE signal, kept separate: `.callout-tag` «новое» (a NEW-feature promo
   badge — additive/positive, not disabled). Do not conflate the two.

   Tokens reused (match the settings analog): --neutral-bg, --text-faint,
   --radius-pill, --fs-xs.
*/
.coming-soon {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
/* Kill any hover affordance the base control would otherwise show, so a
   marked control never looks clickable even if pointer-events is overridden. */
.coming-soon:hover,
.coming-soon:focus,
.coming-soon:active {
  transform: none;
  box-shadow: none;
  background: inherit;
  color: inherit;
  filter: none;
}
/* The «скоро» pill — same look as the .settings-nav-item .badge-soon analog. */
.coming-soon .badge-soon {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: var(--neutral-bg);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
