/* =============================================================================
   BanketPro · production-fixes.css — port of handoff/production-fixes.css
   Applied LAST, on top of all other handoff stylesheets.
   Landing v3 styles are already in public.css; this file covers:
     · CRM shell fixes (sidebar overflow, tabs wrap, topbar, fg-faint)
     · AUTH v3 (input wrap, pwd meter, 2FA cells, success cards, spinner)
     · ONBOARDING v3 (type chips, details disclosure, logo drop, integ cards,
       mobile step bar, success step)
     · PUBLIC EVENT v3 (countdown, journey strip, hero actions, deadline,
       includes, FAQ, manager online dot, map placeholder, modals, print mode,
       tab navigation + manager drawer + theme variants + FAB)
   ============================================================================= */

/* ─── 0. GLOBAL: атрибут hidden ───────────────────────────────────────── */
/* global-hidden-triplicated (аудит): единое глобальное правило [hidden] живёт
   в accessibility.css. Дубль отсюда убран. */

/* ─── 0.5 BOOTSTRAP UTILITY SHIMS ───────────────────────────────────────── */
/* Bootstrap CSS не подключён в проекте (только bp-* tokens). Эти shim-классы
   дают разумный рендеринг для шаблонов, которые случайно ещё используют
   bootstrap-утилиты. Безопасно — все правила без !important, бьются bp-*
   классами по специфичности. */

/* Display */
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-inline { display: inline; }
.d-grid { display: grid; }
.d-none { display: none; }
@media (min-width: 576px) { .d-sm-block { display: block; } .d-sm-flex { display: flex; } .d-sm-none { display: none; } .d-sm-table-cell { display: table-cell; } }
@media (min-width: 768px) { .d-md-block { display: block; } .d-md-flex { display: flex; } .d-md-none { display: none; } .d-md-table-cell { display: table-cell; } }
@media (min-width: 992px) { .d-lg-block { display: block; } .d-lg-flex { display: flex; } .d-lg-none { display: none; } }

/* Flex helpers */
.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-grow-1 { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-fill { flex: 1 1 auto; }
.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }
.justify-content-evenly { justify-content: space-evenly; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.align-items-center { align-items: center; }
.align-items-baseline { align-items: baseline; }
.align-items-stretch { align-items: stretch; }
.align-self-start { align-self: flex-start; }
.align-self-end { align-self: flex-end; }
.align-self-center { align-self: center; }

/* Spacing utilities (0=0, 1=4px, 2=8px, 3=14px, 4=18px, 5=28px) */
.m-0 { margin: 0; } .m-1 { margin: 4px; } .m-2 { margin: 8px; } .m-3 { margin: 14px; } .m-4 { margin: 18px; } .m-5 { margin: 28px; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 14px; } .mt-4 { margin-top: 18px; } .mt-5 { margin-top: 28px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 14px; } .mb-4 { margin-bottom: 18px; } .mb-5 { margin-bottom: 28px; }
.ms-0 { margin-left: 0; } .ms-1 { margin-left: 4px; } .ms-2 { margin-left: 8px; } .ms-3 { margin-left: 14px; } .ms-4 { margin-left: 18px; } .ms-auto { margin-left: auto; }
.me-0 { margin-right: 0; } .me-1 { margin-right: 4px; } .me-2 { margin-right: 8px; } .me-3 { margin-right: 14px; } .me-4 { margin-right: 18px; } .me-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-1 { margin-top: 4px; margin-bottom: 4px; } .my-2 { margin-top: 8px; margin-bottom: 8px; } .my-3 { margin-top: 14px; margin-bottom: 14px; } .my-4 { margin-top: 18px; margin-bottom: 18px; }

.p-0 { padding: 0; } .p-1 { padding: 4px; } .p-2 { padding: 8px; } .p-3 { padding: 14px; } .p-4 { padding: 18px; } .p-5 { padding: 28px; }
.pt-0 { padding-top: 0; } .pt-1 { padding-top: 4px; } .pt-2 { padding-top: 8px; } .pt-3 { padding-top: 14px; } .pt-4 { padding-top: 18px; }
.pb-0 { padding-bottom: 0; } .pb-1 { padding-bottom: 4px; } .pb-2 { padding-bottom: 8px; } .pb-3 { padding-bottom: 14px; } .pb-4 { padding-bottom: 18px; }
.ps-0 { padding-left: 0; } .ps-1 { padding-left: 4px; } .ps-2 { padding-left: 8px; } .ps-3 { padding-left: 14px; } .ps-4 { padding-left: 18px; }
.pe-0 { padding-right: 0; } .pe-1 { padding-right: 4px; } .pe-2 { padding-right: 8px; } .pe-3 { padding-right: 14px; } .pe-4 { padding-right: 18px; }
.py-0 { padding-top: 0; padding-bottom: 0; } .py-1 { padding-top: 4px; padding-bottom: 4px; } .py-2 { padding-top: 8px; padding-bottom: 8px; } .py-3 { padding-top: 14px; padding-bottom: 14px; } .py-4 { padding-top: 18px; padding-bottom: 18px; } .py-5 { padding-top: 28px; padding-bottom: 28px; }
.px-0 { padding-left: 0; padding-right: 0; } .px-1 { padding-left: 4px; padding-right: 4px; } .px-2 { padding-left: 8px; padding-right: 8px; } .px-3 { padding-left: 14px; padding-right: 14px; } .px-4 { padding-left: 18px; padding-right: 18px; }

/* Gaps */
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 14px; } .gap-4 { gap: 18px; }
.g-1 { gap: 4px; } .g-2 { gap: 8px; } .g-3 { gap: 14px; } .g-4 { gap: 18px; }

/* Text alignment */
.text-start { text-align: left; }
.text-end { text-align: right; }
.text-center { text-align: center; }

/* Text colors mapped to bp tokens */
.text-muted { color: var(--fg-muted); }
.text-primary { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-success { color: var(--ok); }
.text-warning { color: var(--warn); }
.text-info { color: var(--info, var(--accent)); }
.text-secondary { color: var(--fg-subtle); }
.text-dark { color: var(--fg); }
.text-white { color: #fff; }
.text-body { color: var(--fg); }

/* Background colors mapped to bp tokens */
.bg-white { background-color: var(--bg-elev); }
.bg-light { background-color: var(--bg-subtle); }
.bg-dark { background-color: var(--fg); color: var(--bg-elev); }
.bg-primary { background-color: var(--accent); color: #fff; }
.bg-success { background-color: var(--ok); color: #fff; }
.bg-danger { background-color: var(--danger); color: #fff; }
.bg-warning { background-color: var(--warn); color: #fff; }
.bg-info { background-color: var(--info, var(--accent)); color: #fff; }
.bg-success-subtle { background-color: var(--ok-soft); color: var(--ok); }
.bg-danger-subtle { background-color: var(--danger-soft); color: var(--danger); }
.bg-warning-subtle { background-color: var(--warn-soft); color: var(--warn); }
.bg-info-subtle { background-color: var(--accent-soft); color: var(--accent); }
.bg-opacity-50 { background-color: color-mix(in srgb, var(--bg-subtle) 50%, transparent); }

/* Font weight */
.fw-light { font-weight: 300; }
.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }

/* Font sizes (typographic scale roughly matching Bootstrap) */
.fs-1 { font-size: 32px; } .fs-2 { font-size: 26px; } .fs-3 { font-size: 22px; } .fs-4 { font-size: 18px; } .fs-5 { font-size: 16px; } .fs-6 { font-size: 14px; }
.small, small { font-size: 12px; }
.display-1 { font-size: 64px; font-weight: 300; letter-spacing: -0.02em; }
.display-2 { font-size: 56px; font-weight: 300; }
.display-3 { font-size: 48px; font-weight: 300; }
.display-4 { font-size: 40px; font-weight: 300; }
.display-5 { font-size: 36px; font-weight: 300; }
.display-6 { font-size: 28px; font-weight: 300; }

/* Border */
.border { border: 1px solid var(--border); }
.border-0 { border: 0; }
.border-top { border-top: 1px solid var(--border); }
.border-bottom { border-bottom: 1px solid var(--border); }
.border-start { border-left: 1px solid var(--border); }
.border-end { border-right: 1px solid var(--border); }
.border-primary { border-color: var(--accent) !important; }
.border-danger { border-color: var(--danger) !important; }
.border-success { border-color: var(--ok) !important; }
.border-warning { border-color: var(--warn) !important; }
.rounded { border-radius: var(--radius-md); }
.rounded-0 { border-radius: 0; }
.rounded-sm { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-pill { border-radius: 999px; }
.rounded-circle { border-radius: 50%; }

/* Sizing */
.w-25 { width: 25%; } .w-50 { width: 50%; } .w-75 { width: 75%; } .w-100 { width: 100%; }
.h-25 { height: 25%; } .h-50 { height: 50%; } .h-75 { height: 75%; } .h-100 { height: 100%; }
.mw-100 { max-width: 100%; }
.mh-100 { max-height: 100%; }
.vh-100 { height: 100vh; }

/* Vertical alignment */
.align-top { vertical-align: top; }
.align-middle { vertical-align: middle; }
.align-bottom { vertical-align: bottom; }

/* Position */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }

/* Text helpers */
.text-uppercase { text-transform: uppercase; }
.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }
.text-nowrap { white-space: nowrap; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-break { word-break: break-word; }
.text-decoration-none { text-decoration: none; }
.text-decoration-underline { text-decoration: underline; }
.lh-1 { line-height: 1; }
.lh-sm { line-height: 1.25; }
.lh-base { line-height: 1.5; }
.lh-lg { line-height: 2; }

/* Cursor */
.user-select-all { user-select: all; }
.user-select-none { user-select: none; }

/* Visibility */
.visible { visibility: visible; }
.invisible { visibility: hidden; }
.visually-hidden, .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Container */
.container, .container-fluid, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}
.container { max-width: 1200px; }
.container-sm { max-width: 540px; }
.container-md { max-width: 720px; }
.container-lg { max-width: 960px; }
.container-xl { max-width: 1140px; }
.container-xxl { max-width: 1320px; }

/* Row/col fallback (becomes flex-wrap) — only if no bp-grid in use */
.row { display: flex; flex-wrap: wrap; margin-left: -8px; margin-right: -8px; }
.row > [class^="col"], .row > [class*=" col"] { padding-left: 8px; padding-right: 8px; }
.col, .col-auto { flex: 1 0 0%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
@media (min-width: 576px) {
  .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
  .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
  .col-sm-4 { flex: 0 0 33.333%; max-width: 33.333%; }
}
@media (min-width: 768px) {
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
  .col-md-8 { flex: 0 0 66.666%; max-width: 66.666%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
}
@media (min-width: 992px) {
  .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
  .col-lg-10 { flex: 0 0 83.333%; max-width: 83.333%; }
  .col-lg-8 { flex: 0 0 66.666%; max-width: 66.666%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  .col-lg-5 { flex: 0 0 41.666%; max-width: 41.666%; }
  .col-lg-4 { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
  .col-lg-2 { flex: 0 0 16.666%; max-width: 16.666%; }
}
.justify-content-center { justify-content: center; }

/* Input group fallback */
.input-group { display: flex; align-items: stretch; }
.input-group > * { flex: 1 1 auto; min-width: 0; }
.input-group > .input-group-text {
  flex: 0 0 auto;
  display: inline-flex; align-items: center;
  padding: 8px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--fg-muted);
}
.input-group > .bp-input:not(:last-child), .input-group > input:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .bp-input:not(:first-child), .input-group > input:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.input-group > .input-group-text:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; border-radius: var(--radius-md) 0 0 var(--radius-md); }
.input-group > .input-group-text:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

/* Form switch (Bootstrap) → bp-switch fallback */
.form-switch { padding-left: 0; }
.form-switch .form-check-input { width: 36px; height: 20px; appearance: none; background: var(--bg-sunken); border-radius: 999px; border: none; position: relative; cursor: pointer; }
.form-switch .form-check-input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform 0.18s ease; }
.form-switch .form-check-input:checked { background: var(--accent); }
.form-switch .form-check-input:checked::after { transform: translateX(16px); }

/* List group (Bootstrap) — minimal fallback */
.list-group { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.list-group-item { padding: 10px 14px; background: var(--bg-elev); border-top: 1px solid var(--border); font-size: 13px; }
.list-group-item:first-child { border-top: none; }
.list-group-item-action { cursor: pointer; }
.list-group-item-action:hover { background: var(--bg-subtle); }

/* Breadcrumb (Bootstrap) minimal */
ol.breadcrumb, .breadcrumb { display: flex; flex-wrap: wrap; padding: 0; margin: 0 0 14px; list-style: none; font-size: 13px; color: var(--fg-muted); gap: 6px; }
.breadcrumb-item { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb-item + .breadcrumb-item::before { content: "›"; color: var(--fg-subtle); margin-right: 6px; }
.breadcrumb-item a { color: var(--fg-muted); text-decoration: none; }
.breadcrumb-item.active { color: var(--fg); }

/* Page-header legacy block */
.page-header { margin-bottom: 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-header-title { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; margin: 0; }
.page-header-subtitle { font-size: 13px; color: var(--fg-muted); margin-top: 4px; }
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Bootstrap card fallback (alias for bp-card) */
.card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-md); }
.card-body { padding: 16px; }
.card-title { font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.card-text { font-size: 13px; color: var(--fg-muted); margin: 0; }

/* Modal fallback (so leftover .modal.fade renders OK) */
.modal { display: none; position: fixed; inset: 0; z-index: 9000; overflow-x: hidden; overflow-y: auto; }
.modal.show { display: block; }
.modal.fade { transition: opacity 0.15s linear; }
.modal-backdrop { position: fixed; inset: 0; z-index: 8999; background: rgba(0,0,0,0.5); }
.modal-backdrop.show { opacity: 0.5; }
.modal-dialog { position: relative; width: auto; margin: 28px auto; max-width: 500px; pointer-events: none; }
.modal-dialog-centered { display: flex; align-items: center; min-height: calc(100% - 56px); }
.modal-content {
  position: relative; pointer-events: auto;
  display: flex; flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  outline: 0;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 16px; font-weight: 600; margin: 0; }
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--bg-subtle); }

/* Toast — теперь полностью в components.css (.bp-toasts/.bp-toast). Старая
   `.toast/.toast-container` система удалена: window.BanketPro.toast() переписан
   на bp-toast DOM (см. static/js/app.js). */

/* Button group */
.btn-group { display: inline-flex; gap: 0; }
.btn-group > .bp-btn { border-radius: 0; }
.btn-group > .bp-btn:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.btn-group > .bp-btn:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.btn-group > .bp-btn:not(:first-child) { margin-left: -1px; }

/* Nav tabs minimal */
.nav-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.nav-tabs .nav-link {
  padding: 10px 14px; color: var(--fg-muted); text-decoration: none;
  border-bottom: 2px solid transparent; font-size: 13px; font-weight: 500;
  cursor: pointer; background: transparent;
}
.nav-tabs .nav-link:hover { color: var(--fg); }
.nav-tabs .nav-link.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tab-content > .tab-pane { display: none; }
.tab-content > .tab-pane.active { display: block; }

/* Form check inline */
.form-check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.form-check-input { margin: 0; }
.form-check-label { margin: 0; }
.needs-validation .form-control:invalid { border-color: var(--danger); }

/* Spinner border (Bootstrap) */
.spinner-border {
  display: inline-block; width: 16px; height: 16px;
  vertical-align: text-bottom; border: 2px solid currentColor;
  border-right-color: transparent; border-radius: 50%;
  animation: spinner-border .75s linear infinite;
}
@keyframes spinner-border { to { transform: rotate(360deg); } }

/* Pagination minimal */
.pagination { display: flex; padding-left: 0; list-style: none; gap: 2px; }
.page-item .page-link { padding: 6px 12px; color: var(--fg); border: 1px solid var(--border); background: var(--bg-elev); text-decoration: none; font-size: 13px; border-radius: var(--radius); }
.page-item .page-link:hover { background: var(--bg-subtle); }
.page-item.active .page-link { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-item.disabled .page-link { color: var(--fg-subtle); pointer-events: none; }

/* Alert variants (BS classes) */
.alert { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 14px; font-size: 13px; }
.alert-success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in oklab, var(--ok) 25%, transparent); }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in oklab, var(--danger) 25%, transparent); }
.alert-warning { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in oklab, var(--warn) 25%, transparent); }
.alert-info { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in oklab, var(--accent) 25%, transparent); }

/* Form control / select fallback for stray .form-control */
.form-control, .form-select {
  width: 100%; padding: 8px 12px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-md); font-size: 14px; color: var(--fg);
  font-family: inherit;
}
.form-control:focus, .form-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--fg); margin-bottom: 4px; }
.form-text { font-size: 12px; color: var(--fg-muted); margin-top: 4px; }

/* End shims */

/* ─── RESPONSIVE 2-col layouts for dashboard + event-detail ──────────── */
/* audit/production-readiness: добавили minmax(0, …) — без этого правая колонка
   могла схлопнуться до 200px при 1024px viewport, обрезая текст onboarding-шагов
   и quick-action кнопок. Минимум 300px для второй колонки сохраняет читаемость. */
.bp-dash-2col {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr);
  gap: 12px;
}
.bp-event-2col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}
@media (max-width: 1100px) {
  /* раньше схлопывали — экраны 1024-1100px чаще ноуты, single-col даёт воздух.
     minmax(0,1fr), а не 1fr: иначе min-content широкой таблицы (min-width:560px
     в карточке ближайших событий) распирал единственную колонку и давал
     горизонтальный скролл всей страницы на телефонах (AUDIT mobile-H1). */
  .bp-dash-2col {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 900px) {
  .bp-event-2col {
    grid-template-columns: 1fr;
  }
}

/* ─── Stats dashboard mobile collapse + table wrap ─────────────────── */
@media (max-width: 900px) {
  .bp-dashboard-grid {
    grid-template-columns: 1fr !important;
  }
}
/* Force stats Платежи table into scrollable wrapper */
.bp-stats-payments-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bp-stats-payments-table > table { min-width: 600px; }

/* ─── Tasks kanban mobile collapse ─────────────────────────────────── */
@media (max-width: 760px) {
  .bp-kanban {
    grid-template-columns: 1fr !important;
  }
  .bp-kanban__col {
    min-height: 120px !important;
  }
}

/* ─── bp-btn--outline-* color variants ────────────────────────────── */
.bp-btn--outline-accent { background: transparent; color: var(--accent); border-color: color-mix(in oklab, var(--accent) 50%, var(--border)); }
.bp-btn--outline-accent:hover { background: var(--accent-soft); border-color: var(--accent); }
.bp-btn--outline-danger { background: transparent; color: var(--danger); border-color: color-mix(in oklab, var(--danger) 50%, var(--border)); }
.bp-btn--outline-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.bp-btn--outline-info { background: transparent; color: var(--info, var(--accent)); border-color: color-mix(in oklab, var(--info, var(--accent)) 50%, var(--border)); }
.bp-btn--outline-info:hover { background: color-mix(in oklab, var(--info, var(--accent)) 12%, transparent); border-color: var(--info, var(--accent)); }
.bp-btn--outline-ok { background: transparent; color: var(--ok); border-color: color-mix(in oklab, var(--ok) 50%, var(--border)); }
.bp-btn--outline-ok:hover { background: var(--ok-soft); border-color: var(--ok); }
.bp-btn--outline-warn { background: transparent; color: var(--warn); border-color: color-mix(in oklab, var(--warn) 50%, var(--border)); }
.bp-btn--outline-warn:hover { background: var(--warn-soft); border-color: var(--warn); }
.bp-btn--outline-secondary { background: transparent; color: var(--fg-muted); border-color: var(--border); }
.bp-btn--outline-secondary:hover { background: var(--bg-subtle); }

/* bp-chip pill modifier (used by timesheet) */
.bp-chip--pill { border-radius: 999px; }

/* bp-chip xs modifier */
.bp-chip--xs { font-size: 10px; padding: 1px 6px; }

/* bp-eyebrow utility — uppercase mini-label */
.bp-eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* bp-form__actions utility */
.bp-form__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* bp-link--plain — link styled as plain text (for table-row links) */
.bp-link--plain {
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
}
.bp-link--plain:hover { color: var(--accent); }

/* ─── Tables: numeric column alignment + mobile scroll safety ─────────── */
/* Any cell with these classes — right-aligned for digits/currency */
.bp-th.is-num, .bp-td.is-num,
.bp-th--num, .bp-td--num,
th.is-num, td.is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Force bp-table-wrap to scroll horizontally on narrow viewports
   even when parent has overflow:hidden */
.bp-table-wrap {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 760px) {
  /* wh-table-mobile reflow'ится в карточки (см. блок ниже) — ему max-content
     НЕ нужен, иначе таблица шире вьюпорта и карточки обрезаются справа. */
  .bp-table-wrap > .bp-table:not(.wh-table-mobile) { min-width: max-content; }
}

/* Numeric columns inside tables — also catch values via data attribute */
.bp-table td[data-type="number"], .bp-table th[data-type="number"] {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ─── 1. SIDEBAR: защита от горизонтального скролла ─────────────────────── */
.bp-sidebar { overflow-x: hidden !important; }
.bp-sidebar * { min-width: 0; }
.bp-sidebar .bp-org-switcher__name,
.bp-sidebar .bp-org-switcher__sub,
.bp-sidebar .bp-sidebar__user-name,
.bp-sidebar .bp-sidebar__user-org {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ─── 2. SETTINGS-TABS: переносить, а не прятать за стрелками ──────────── */
.bp-tabs { flex-wrap: wrap; row-gap: 0; }
.bp-tab { white-space: nowrap; }
@media (max-width: 720px) {
  .bp-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .bp-tabs::after {
    content: ''; flex: 0 0 12px;
    background: linear-gradient(to right, transparent, var(--bg));
    position: sticky; right: 0;
  }
}

/* ─── 3. TOPBAR: бургер прячется только когда сайдбар реально виден (≥781px) ─
   Раньше было min-width:720, а сайдбар становится drawer при ≤780 — в полосе
   720–780 бургер прятался, а сайдбар уже был скрыт → навигация недостижима.
   Выравниваем порог с drawer-брейкпоинтом (781). */
@media (min-width: 781px) {
  .bp-topbar__menu { display: none !important; }
  .bp-topbar__right > * { display: inline-flex !important; }
}

/* ─── 4. ACTIVE-STATE NAV: гарантия одного визуала ──────────────────────── */
.bp-nav__item.is-active { font-weight: 600; }

/* ─── 5. КОНТРАСТ: --fg-faint затемнён в tokens.css до WCAG AA 4.5:1 ──
   Раньше тут был override `--fg-faint: #a8a6a0` (только 2.35:1, fail AA).
   Subagent C audit (A1+A2) показал что текст hint становится нечитабельным.
   Канонический источник — `static/css/tokens.css` (#94908a, ≈4.5:1). */

/* ─── 6. ROLES PERMISSION SQUARES: pointer + hover affordance ──────────── */
[class*="bp-role-perm"], .bp-role-cell { cursor: help; }

/* ─── 7. PLACEHOLDER VISIBILITY ────────────────────────────────────────── */
.bp-input::placeholder, .bp-textarea::placeholder, .bp-select::placeholder {
  color: var(--fg-faint) !important;
  opacity: 1;
}

/* ─── 8. PUBLIC-EVENT: header tap-area для tel: ───────────────────────── */
.bp-public__head a[href^="tel:"] { display: inline-block; }

/* ─── 9. PAGE SUB ────────────────────────────────────────────────────── */
.bp-page__sub { margin-top: 4px; }


/* =============================================================================
   AUTH v3 — production polish (validation, password meter, 2FA, reset flow)
   ============================================================================= */

/* §AUTH-ASIDE-V4 — see bottom of file for the full block.
   Old trust/foot fragments removed; new system is consolidated. */

/* Mobile logo (shown only on narrow) */
.bp-auth__mobile-logo {
  display: none;
  align-items: center; gap: 10px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .bp-auth__mobile-logo { display: flex; }
  .bp-auth__form { padding: 32px 20px; }
}

/* Top-level error banner */
.bp-auth__error {
  margin-top: 16px;
  padding: 10px 12px;
  background: var(--danger-soft);
  border: 1px solid color-mix(in oklab, var(--danger) 25%, transparent);
  border-radius: var(--radius-md);
  color: var(--danger);
  font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}

/* Инлайн-баннер ошибки в auth-формах. В разметке класс .bp-auth-error (с дефисом,
   не BEM __error), поэтому правило выше на него НЕ действовало → стиль хардкодился
   инлайном не-токенными #fdecec/#b13432 на 7 страницах. Теперь единый токенный
   стиль; инлайн-style у баннеров убраны. --danger-strong держит AA-контраст. */
.bp-auth-error {
  margin: 0 0 14px; padding: 10px 12px; border-radius: 10px;
  font-size: 13px; line-height: 1.45;
  background: var(--danger-soft); color: var(--danger-strong);
  border: 1px solid color-mix(in oklab, var(--danger) 22%, transparent);
}
.bp-auth-error br:last-child { display: none; }
/* Инфо-плашка в auth (напр. «вы уже вошли» на входе) — акцентная, токенная
   (раньше хардкод-индиго #eef2ff/#3730a3/#e0e5ff инлайном на входе). */
.bp-auth-note {
  margin: 2px 0 18px; padding: 11px 13px; border-radius: 10px;
  font-size: 13px; line-height: 1.5;
  background: var(--accent-soft); color: var(--accent-press);
  border: 1px solid color-mix(in oklab, var(--accent) 18%, var(--border));
}
.bp-auth-note b { color: var(--accent-press); }
.bp-auth-note a { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.bp-auth__error svg { flex-shrink: 0; }

/* Input wrap with trailing icon button (eye toggle) */
.bp-input-wrap { position: relative; }
.bp-input--with-icon { padding-right: 38px !important; }
.bp-input__icon-btn {
  position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer;
  color: var(--fg-subtle); border-radius: 6px;
  padding: 0;
}
.bp-input__icon-btn:hover { background: var(--bg-subtle); color: var(--fg-muted); }
.bp-input__icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.bp-input__icon-btn--ok { color: var(--ok); cursor: default; }

/* Field error/warn states */
.bp-input--error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--danger) 15%, transparent) !important;
}
.bp-field__hint--warn {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--warn, #b45309);
  font-size: 11px;
}

/* Password strength meter */
.bp-pwd-meter { margin-top: 6px; }
.bp-pwd-meter__bars {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  height: 4px;
}
.bp-pwd-meter__bar {
  height: 100%; border-radius: 2px;
  background: var(--border-strong);
  transition: background-color 0.18s ease;
}
.bp-pwd-meter__label {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 500;
}

/* "Forgot password" link */
.bp-auth__forgot {
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
  font-size: 12px;
  padding: 4px 6px; margin: -4px -6px;
  border-radius: 4px;
  text-decoration: none;
}
.bp-auth__forgot:hover { background: var(--accent-soft); }

/* "Remember me" + footer rows */
.bp-auth__row-between { display: flex; align-items: center; justify-content: space-between; }
.bp-auth__alt-foot {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 14px; color: var(--fg-muted);
  text-align: center;
}
.bp-auth__alt-foot a { color: var(--accent); cursor: pointer; font-weight: 500; }
.bp-auth__alt-foot a:hover { text-decoration: underline; }
.bp-auth__alt-cta {
  margin-top: 14px;
  font-size: 13px;
  display: flex; gap: 12px; align-items: center;
}
.bp-auth__alt-cta a { color: var(--accent); cursor: pointer; font-weight: 500; }
.bp-auth__alt-cta a:hover { text-decoration: underline; }

/* 2FA code input */
.bp-auth__2fa {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
  margin: 24px 0 16px;
}
.bp-auth__2fa-cell {
  height: 56px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--bg-elev);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--fg);
  outline: none;
  transition: all 0.12s ease;
  font-family: inherit;
}
.bp-auth__2fa-cell:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
@media (max-width: 420px) {
  .bp-auth__2fa { gap: 6px; }
  .bp-auth__2fa-cell { height: 48px; font-size: 20px; }
}

/* Success state cards (reset email-sent, reset done) */
.bp-auth__success {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 14px;
  padding: 28px 20px;
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  margin: 20px 0 16px;
}
.bp-auth__success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.bp-auth__success-icon--ok {
  background: color-mix(in oklab, var(--ok) 14%, transparent);
  color: var(--ok);
}
.bp-auth__success-text { color: var(--fg-muted); font-size: 14px; line-height: 1.5; max-width: 320px; }
.bp-auth__success-text b { color: var(--fg); font-weight: 600; }

/* Caps-Lock indicator */
.bp-caps-warn {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--warn, #b45309);
}

/* OAuth buttons — branded marks */
.bp-oauth__btn {
  width: 100%; justify-content: center;
  gap: 10px !important;
  height: 42px;
}
.bp-oauth__btn--google {
  background: var(--bg-elev) !important;
  border-color: var(--border-strong) !important;
}
.bp-oauth__btn--google:hover { background: var(--bg-hover) !important; }
.bp-oauth__btn--yandex {
  background: #fff !important;
  border-color: var(--border-strong) !important;
}
.bp-oauth__btn--yandex:hover { background: var(--bg-hover) !important; }
.bp-oauth__yandex-mark {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 18px; height: 18px;
  background: #FC3F1D;  /* hardcoded-hex: бренд-цвет Яндекса — намеренно raw hex, не токенизируем. */
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 12px;
  font-family: Arial, sans-serif;
}

/* Spinner */
.bp-spin { animation: bp-spin 0.9s linear infinite; margin-right: 6px; vertical-align: -2px; }
@keyframes bp-spin { to { transform: rotate(360deg); } }



/* =============================================================================
   ONBOARDING WIZARD — moved to static/css/onboarding.css (Phase 2 cleanup)
   Удалены ~275 строк дубликатов: .bp-type-chip*, .bp-wizard__details,
   .bp-logo-drop, .bp-wizard__step/saved/note/head-right,
   .bp-integ-card*, .bp-wizard__success/summary, .bp-onboard-list*.
   Все wizard-стили теперь в onboarding.css (загружается через extra_css).
   ============================================================================= */


/* =============================================================================
   PUBLIC EVENT v3 — production polish (countdown, journey, payment modal,
   FAQ, map, share/calendar dialogs, print mode)
   ============================================================================= */

/* Сгладить градиент-стык в hero */
/* hardcoded-hex: декоративные стопы многоцветного градиента (не равны токенам
   accent) — намеренно raw hex, токенизация изменила бы оттенок hero. */
.bp-pub-event__hero {
  background:
    radial-gradient(ellipse at 20% 20%, #5a51ec 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, #7c3aed 0%, transparent 55%),
    linear-gradient(135deg, var(--accent) 0%, #6d28d9 50%, var(--accent-hover) 100%) !important;
}

/* «В прототип» — кнопка должна быть незаметной */
.bp-public .bp-btn[title*="прототип"] { opacity: 0.55; }
.bp-public .bp-btn[title*="прототип"]:hover { opacity: 1; }
.bp-pub-event__devback { opacity: 0.55; margin-left: 8px; }

/* "Updated N min ago" pill */
.bp-pub-event__updated {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px;
  color: var(--fg-subtle);
  padding: 4px 8px;
  background: var(--bg-subtle);
  border-radius: 12px;
}
.bp-pub-event__updated svg { color: var(--fg-subtle); }
@media (max-width: 720px) { .bp-pub-event__updated { display: none; } }

/* Hero top — chip + countdown */
.bp-pub-event__hero-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 16px;
}

/* Countdown card in hero */
.bp-pub-event__countdown {
  padding: 12px 18px;
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
}
.bp-pub-event__countdown-row {
  display: flex; align-items: center; gap: 8px;
  color: #fff;
}
.bp-pub-event__countdown-num {
  font-size: 28px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.bp-pub-event__countdown-lbl {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.2;
  opacity: 0.95;
}
.bp-pub-event__countdown-lbl span { font-weight: 400; opacity: 0.75; text-transform: none; letter-spacing: 0; }

/* Hero quick actions */
.bp-pub-event__hero-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 18px;
}
.bp-pub-event__hero-action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 12px; font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
  backdrop-filter: blur(6px);
}
.bp-pub-event__hero-action:hover { background: rgba(255,255,255,0.25); }

/* Journey strip — 6 этапов */
.bp-pub-event__journey-wrap {
  max-width: 1080px;
  margin: -28px auto 0;
  padding: 0 32px;
  position: relative; z-index: 2;
}
.bp-pub-event__journey {
  display: flex; align-items: stretch;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow-1);
  gap: 4px;
  overflow-x: auto;
}
.bp-pub-event__journey-step {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  min-width: 78px;
  flex: 1;
}
.bp-pub-event__journey-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-sunken);
  color: var(--fg-subtle);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.bp-pub-event__journey-step.is-done .bp-pub-event__journey-dot { background: var(--ok); color: #fff; }
.bp-pub-event__journey-step.is-active .bp-pub-event__journey-dot {
  background: var(--accent); color: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.bp-pub-event__journey-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
  animation: bp-pulse 1.4s ease-in-out infinite;
}
@keyframes bp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
.bp-pub-event__journey-label {
  font-size: 11px; font-weight: 600; color: var(--fg);
  text-align: center; line-height: 1.2;
}
.bp-pub-event__journey-step.is-pending .bp-pub-event__journey-label { color: var(--fg-subtle); font-weight: 500; }
.bp-pub-event__journey-step.is-active  .bp-pub-event__journey-label { color: var(--accent); }
.bp-pub-event__journey-date { font-size: 10px; color: var(--fg-subtle); font-variant-numeric: tabular-nums; }
.bp-pub-event__journey-line {
  flex: 0 0 auto; align-self: center;
  height: 2px; min-width: 16px;
  background: var(--border);
  margin: 0 -2px;
  margin-top: -16px;
}
.bp-pub-event__journey-line.is-done { background: var(--ok); }
@media (max-width: 720px) {
  .bp-pub-event__journey-wrap { margin-top: -16px; padding: 0 16px; }
  .bp-pub-event__journey-step { min-width: 62px; }
  .bp-pub-event__journey-date { display: none; }
}

/* Deadline warning */
.bp-pub-event__deadline {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklab, var(--accent) 20%, transparent);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 14px;
}
.bp-pub-event__deadline.is-urgent {
  background: color-mix(in oklab, var(--danger) 8%, transparent);
  border-color: color-mix(in oklab, var(--danger) 30%, transparent);
  color: var(--danger);
}
.bp-pub-event__deadline b { font-weight: 600; }

/* Package includes list */
.bp-pub-event__includes {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}
.bp-pub-event__includes li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  font-size: 13px;
}
.bp-pub-event__includes li svg { color: var(--ok); flex-shrink: 0; }

/* FAQ accordion (внутри public-event) */
.bp-pub-event__faq { display: flex; flex-direction: column; gap: 4px; }
.bp-pub-event__faq-item { border-bottom: 1px solid var(--border); }
.bp-pub-event__faq-item:last-child { border-bottom: none; }
.bp-pub-event__faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 0;
  font-size: 14px; font-weight: 500;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  color: var(--fg);
}
.bp-pub-event__faq-item > summary::-webkit-details-marker { display: none; }
.bp-pub-event__faq-item > summary svg { color: var(--fg-subtle); transition: transform 0.2s; flex-shrink: 0; }
.bp-pub-event__faq-item[open] > summary svg { transform: rotate(180deg); }
.bp-pub-event__faq-a {
  padding: 0 0 16px;
  color: var(--fg-muted);
  font-size: 13px;
  line-height: 1.55;
}

/* Manager online indicator */
.bp-pub-event__online {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  color: var(--ok);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bp-pub-event__online-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ok) 25%, transparent);
  animation: bp-pulse 2s ease-in-out infinite;
}

/* Map placeholder */
.bp-pub-event__map {
  height: 140px;
  background:
    repeating-linear-gradient(45deg, var(--bg-subtle), var(--bg-subtle) 8px, var(--bg-sunken) 8px, var(--bg-sunken) 16px);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.bp-pub-event__map-placeholder {
  text-align: center;
  background: var(--bg-elev);
  padding: 12px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.bp-pub-event__map-placeholder svg { color: var(--accent); }

/* Char counter + saved indicator */
.bp-pub-event__chars {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px;
  min-height: 16px;
}
.bp-pub-event__saved {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 500;
  color: var(--ok);
}

/* Modal (lightbox) */
.bp-pub-event__modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: bp-fade 0.15s ease;
}
@keyframes bp-fade { from { opacity: 0; } to { opacity: 1; } }
.bp-pub-event__modal-card {
  background: var(--bg-elev);
  border-radius: var(--radius-xl);
  padding: 24px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  position: relative;
  max-height: 90vh; overflow-y: auto;
  animation: bp-pop 0.18s ease;
}
@keyframes bp-pop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.bp-pub-event__modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px;
  background: var(--bg-subtle);
  border: none; border-radius: 8px;
  cursor: pointer; color: var(--fg-muted);
  display: flex; align-items: center; justify-content: center;
}
.bp-pub-event__modal-close:hover { background: var(--bg-sunken); color: var(--fg); }

.bp-pub-event__methods { display: flex; flex-direction: column; gap: 8px; }
.bp-pub-event__method {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--bg-elev);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  color: var(--fg);
  transition: all 0.12s ease;
}
.bp-pub-event__method:hover { border-color: var(--accent); background: var(--accent-soft); }
.bp-pub-event__method-icon {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.bp-pub-event__share-link { display: flex; gap: 8px; }
.bp-pub-event__share-link input { flex: 1; }

/* Print mode — client-friendly PDF */
@media print {
  .bp-public__head .hstack,
  .bp-pub-event__hero-actions,
  .bp-pub-event__online,
  .bp-pub-event__updated,
  .bp-pub-event__devback,
  .bp-pub-event__modal,
  .bp-pub-guests button,
  .bp-pay-row .bp-btn,
  .bp-pub-doc .bp-btn { display: none !important; }

  body, html { background: #fff !important; }
  .bp-pub-event__hero {
    background: #fff !important;
    color: var(--fg) !important;
    border-bottom: 2px solid var(--border);
  }
  .bp-pub-event__title { color: var(--fg) !important; }
  .bp-pub-event__countdown { display: none; }
  .bp-pub-event__journey { box-shadow: none; }
  .bp-pub-event__body { display: block !important; padding: 0 32px; }
  .bp-pub-event__aside { display: block; }
  .bp-pub-event__card {
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid var(--border) !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   v3 PROTOTYPE PORT — auth aside benefits, verify-by-code, ИНН auto-fill,
   airy onboarding (halls/team), sticky summary sidebar, quickstart cards
   Source: handoff XjOnMhIhKr (May 2026)
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Input icon-btn — OK variant (ИНН lookup success, password match) ── */
.bp-input__icon-btn--ok { color: var(--ok); cursor: default; }
.bp-input__icon-btn--ok:hover { background: transparent; color: var(--ok); }

/* ─── Auth: "Forgot password?" link (sibling of label, not inside it) ── */
.bp-auth__forgot {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 120ms;
  white-space: nowrap;
}
.bp-auth__forgot:hover { background: var(--accent-soft); }

/* §AUTH-ASIDE-V4 · benefits — moved to consolidated block at file end */

/* Password label row — keep required-* on inner span so the asterisk
   sits next to the word, with "Forgot?" link as a separate sibling */
.bp-auth__pwd-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.bp-auth__pwd-label > span:first-child { flex: 0 1 auto; }


/* ─── INN auto-fill suggestion card ──────────────────────────────────── */
.bp-inn-card {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--ok);
  border-radius: var(--radius);
  background: var(--ok-soft);
  font-size: 12.5px;
  line-height: 1.4;
  animation: bp-inn-card-in 200ms ease-out;
}
@keyframes bp-inn-card-in {
  from { transform: translateY(-4px); }
  to   { transform: translateY(0); }
}
.bp-inn-card--applied {
  border-color: var(--border);
  background: var(--bg-subtle);
}
.bp-inn-card__icon {
  width: 24px; height: 24px;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--ok);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.bp-inn-card--applied .bp-inn-card__icon { background: var(--fg-subtle); }
.bp-inn-card__body { flex: 1; min-width: 0; }
.bp-inn-card__name {
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bp-inn-card__addr {
  color: var(--fg-muted);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bp-inn-card__apply {
  align-self: center;
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid var(--ok);
  border-radius: 6px;
  background: var(--ok);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 120ms;
}
.bp-inn-card__apply:hover { background: var(--ok-strong); border-color: var(--ok-strong); }
.bp-inn-card__applied {
  align-self: center;
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-subtle);
}

/* ═══ HALLS — AIRY REDESIGN (Step 3) ════════════════════════════════════ */
.bp-halls {
  display: flex; flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}
.bp-hall {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex; flex-direction: column;
  gap: 18px;
  transition: border-color 160ms, box-shadow 160ms;
}
.bp-hall:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.bp-hall__top { display: flex; align-items: center; justify-content: space-between; }
.bp-hall__badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-press);
  font-size: 12px;
  font-weight: 600;
}
.bp-hall__delete {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-subtle);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 120ms, color 120ms;
}
.bp-hall__delete:hover { background: var(--danger-soft); color: var(--danger); }

.bp-hall__name-block { display: flex; flex-direction: column; gap: 6px; }
.bp-hall__name-input {
  font-size: 18px;
  font-weight: 600;
  height: 48px;
  padding: 0 14px;
}
.bp-hall__name-input::placeholder { font-weight: 500; }

.bp-hall__fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 640px) {
  .bp-hall__fields { grid-template-columns: 1fr; }
  .bp-hall { padding: 20px 18px; }
}

/* Input with a small inline suffix label (₽ / час, гостей, часа…) */
.bp-input-affix {
  position: relative;
  display: block;
}
.bp-input-affix > .bp-input { padding-right: 56px; }
.bp-input-affix__suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--fg-subtle);
  pointer-events: none;
}

.bp-hall__preview {
  padding: 10px 14px;
  background: var(--accent-softer);
  color: var(--accent-press);
  border-radius: var(--radius);
  font-size: 13px;
}
.bp-hall__preview b { font-weight: 600; }

.bp-hall__add {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--fg-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: color 120ms, border-color 120ms, background 120ms;
  width: 100%;
}
.bp-hall__add:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ═══ INVITES — COMPACT REDESIGN (Step 4) ═══════════════════════════════ */
.bp-invites {
  display: flex; flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}
/* .bp-invite — актуальная раскладка строки приглашения задаётся в onboarding.css
   (grid: email | роль | удалить). Старый карточный вид (рамка-обёртка + focus-within
   поверх собственной рамки input'а) давал двойную фиолетовую границу — убран. */
.bp-invite__row {
  display: flex; align-items: center; gap: 12px;
}
.bp-invite__avatar {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
}
.bp-invite__fields {
  flex: 1; min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 8px;
}
.bp-invite__name-input,
.bp-invite__email-input {
  height: 38px;
  font-size: 13px;
}
.bp-invite__name-input { font-weight: 500; }
.bp-invite__delete {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-subtle);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 120ms, color 120ms;
  flex-shrink: 0;
}
.bp-invite__delete:hover { background: var(--danger-soft); color: var(--danger); }

.bp-invite__error {
  font-size: 12px;
  color: var(--danger);
  display: flex; align-items: center; gap: 6px;
  padding-left: 52px;
}

.bp-invite__roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 52px;
}
.bp-invite__role {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--fg-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 140ms;
}
.bp-invite__role:hover { border-color: var(--border-strong); color: var(--fg); background: var(--bg-elev); }
.bp-invite__role.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.bp-invite__add {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--fg-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: color 120ms, border-color 120ms, background 120ms;
  width: 100%;
}
.bp-invite__add:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

@media (max-width: 640px) {
  .bp-invite__fields { grid-template-columns: minmax(0, 1fr); }
  .bp-invite__roles { padding-left: 0; }
  .bp-invite__error { padding-left: 0; }
}

/* ═══ WIZARD STICKY SUMMARY SIDEBAR — REMOVED ══════════════════════════ */
/* Old .bp-wizard__sidebar* rules deleted. Onboarding now uses .bp-onb-root,
   .bp-preview namespace (see static/css/onboarding.css). No template
   references these classes anymore — ~95 lines of dead rules cleaned. */

/* ═══ VERIFY EMAIL — code input ════════════════════════════════════════ */
.bp-verify {
  display: flex; flex-direction: column;
  gap: 22px;
  align-items: stretch;
}
.bp-verify__icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  margin: 4px auto 0;
}
.bp-verify__hint {
  text-align: center;
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
}
.bp-verify__hint b { color: var(--fg); font-weight: 600; }
.bp-verify__resend {
  text-align: center;
  font-size: 13px;
  padding-top: 4px;
}
.bp-verify__resend a {
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
}
.bp-verify__resend a:hover { text-decoration: underline; }
.bp-verify__alt {
  text-align: center;
  font-size: 13px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.bp-verify__alt a {
  color: var(--fg-muted);
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
}
.bp-verify__alt a:hover { color: var(--accent); }

/* 6-cell code input (verify email + 2FA login) */
.bp-auth__2fa {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 0;
}
.bp-auth__2fa-cell {
  min-width: 0;
  width: 100%;
  height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--fg);
  transition: border-color 120ms, box-shadow 120ms;
}
.bp-auth__2fa-cell:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
@media (max-width: 540px) {
  .bp-auth__2fa-cell { height: 48px; font-size: 18px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   v4 PROTOTYPE PORT — Invite-landing, sidebar bottom fix, survey banner
   Source: handoff c42jiakuaLTCZGBq (May 2026)
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Invite landing — step indicator (3 steps: accept → code → password) ─ */
.bp-invite-steps {
  display: flex; align-items: center;
  margin-bottom: 24px;
  gap: 8px;
}
.bp-invite-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-subtle);
}
.bp-invite-step.is-active { color: var(--fg); font-weight: 600; }
.bp-invite-step.is-done { color: var(--ok); }
.bp-invite-step__num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--fg-subtle);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.bp-invite-step.is-active .bp-invite-step__num {
  background: var(--accent); color: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.bp-invite-step.is-done .bp-invite-step__num {
  background: var(--ok); color: #fff;
}
.bp-invite-step__sep {
  flex: 1; height: 1px;
  background: var(--border);
}

/* ─── Invite info card (inviter, email, role, what's accessible) ──────── */
.bp-invite-card-info {
  margin: 18px 0 22px;
  padding: 16px 18px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.bp-invite-card-info__row {
  display: flex; align-items: center; gap: 12px;
}
.bp-invite-card-info__sep {
  height: 1px; background: var(--border); margin: 14px 0;
}
.bp-invite-card-info__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 13px;
}
.bp-invite-card-info__grid > div {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0; /* позволяет ячейке ужиматься в grid-колонке */
}
.bp-invite-card-info__grid > div > span { font-size: 11.5px; color: var(--fg-muted); }
/* Длинные email/имена ломаем, чтобы не вылезали за карточку. */
.bp-invite-card-info__grid > div > b { color: var(--fg); overflow-wrap: anywhere; min-width: 0; }
.bp-invite-card-info__row { min-width: 0; }
.bp-invite-card-info__row b,
.bp-invite-card-info__row span { overflow-wrap: anywhere; min-width: 0; }
.bp-invite-card-info__full { grid-column: 1 / -1; }
@media (max-width: 540px) { .bp-invite-card-info__grid { grid-template-columns: 1fr; } }

/* ─── Sidebar bottom-margin fix (active item ring not clipped) ──────── */
.bp-sidebar--v2 .bp-nav__group + .bp-nav__group {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
}
.bp-sidebar--v2 .bp-nav__item { margin: 2px 0 !important; }
.bp-sidebar--v2 .bp-nav__group:last-child > .bp-nav__item:last-child { margin-bottom: 8px !important; }
.bp-sidebar--v2 .bp-nav { overflow-y: auto !important; padding-bottom: 16px !important; }
.bp-sidebar--v2 .bp-nav__group:last-child { padding-bottom: 4px; }

/* ─── Survey banner (NPS / CSAT on dashboard) ────────────────────────── */
.bp-survey {
  background: linear-gradient(135deg, var(--accent-softer), var(--bg-elev));
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 16px;
  position: relative;
}
.bp-survey__icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.bp-survey__body { flex: 1; min-width: 0; }
.bp-survey__title { font-size: 14px; font-weight: 600; color: var(--fg); }
.bp-survey__text { font-size: 12.5px; color: var(--fg-muted); margin-top: 2px; }
.bp-survey__actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.bp-survey__close {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent; color: var(--fg-subtle);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 4px;
  transition: background 120ms, color 120ms;
}
.bp-survey__close:hover { background: var(--bg-subtle); color: var(--fg); }
@media (max-width: 640px) {
  .bp-survey { flex-direction: column; align-items: flex-start; }
  .bp-survey__actions { width: 100%; }
}

.bp-nps {
  display: flex; gap: 6px;
  flex-wrap: wrap;
  margin: 6px 0 14px;
}
.bp-nps__btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  color: var(--fg-muted);
  transition: all 140ms;
}
.bp-nps__btn:hover { border-color: var(--accent); color: var(--accent); }
.bp-nps__btn.is-selected { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================================ */
/* Subscription banners                                         */
/* ============================================================ */
.bp-suspended-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  background: linear-gradient(0deg, color-mix(in oklab, var(--danger) 8%, transparent), color-mix(in oklab, var(--danger) 12%, transparent));
  border-bottom: 1px solid color-mix(in oklab, var(--danger) 25%, transparent);
  color: var(--fg);
  position: sticky; top: 0; z-index: 50;
}
.bp-suspended-banner__icon { color: var(--danger); display: inline-flex; }
.bp-suspended-banner__body { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.bp-suspended-banner__body strong { font-weight: 700; }

.bp-trial-banner {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 8px 18px;
  background: color-mix(in oklab, var(--accent) 7%, var(--bg-elev));
  border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--fg-subtle);
}
.bp-trial-banner strong { color: var(--fg); }
.bp-trial-banner__link { color: var(--accent); font-weight: 600; text-decoration: none; }
.bp-trial-banner__link:hover { text-decoration: underline; }

/* Status chips (для текущей подписки в settings) */
.bp-chip--trial { background: color-mix(in oklab, var(--accent) 12%, var(--bg-elev)); color: var(--accent); }
.bp-chip--active { background: color-mix(in oklab, var(--ok) 12%, var(--bg-elev)); color: var(--ok); }
.bp-chip--past_due { background: color-mix(in oklab, var(--warn) 12%, var(--bg-elev)); color: var(--warn); }
.bp-chip--suspended, .bp-chip--canceled { background: color-mix(in oklab, var(--danger) 12%, var(--bg-elev)); color: var(--danger); }

@media (max-width: 600px) {
  .bp-suspended-banner { padding: 10px 14px; }
  .bp-suspended-banner__body { font-size: 12px; }
  .bp-suspended-banner__body span:not(strong) { display: none; }
  .bp-trial-banner { font-size: 12px; padding: 8px 14px; gap: 10px; }
}

/* ============================================================ */
/* 2FA — настройка, резервные коды, challenge                   */
/* ============================================================ */

/* QR-контейнер на странице setup — белый фон + paddings, центрирован */
.bp-2fa-qr {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 10px);
  padding: 24px;
  margin: 18px auto 14px;
  max-width: 240px;
  box-shadow: var(--shadow-1, 0 1px 2px rgba(15, 15, 15, 0.04));
}
.bp-2fa-qr img {
  display: block;
  width: 180px;
  height: 180px;
  image-rendering: pixelated;
}

/* Секрет — моноширинный, можно скопировать */
.bp-2fa-secret {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--fg);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  padding: 10px 14px;
  margin: 4px auto 0;
  max-width: 360px;
  word-break: break-all;
  user-select: all;
  cursor: text;
}
.bp-2fa-secret #bpTotpSecretText {
  flex: 1;
  text-align: center;
  word-break: break-all;
}
.bp-2fa-secret button {
  opacity: 0.55;
  transition: opacity 140ms;
}
.bp-2fa-secret:hover button,
.bp-2fa-secret button:focus-visible {
  opacity: 1;
}

/* Сетка резервных кодов: 2 колонки на десктопе, 1 на мобиле */
.bp-2fa-codes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
  margin: 14px 0 4px;
}
@media (max-width: 480px) {
  .bp-2fa-codes { grid-template-columns: 1fr; }
}

/* Отдельный код — моноширинный «чип» */
.bp-2fa-code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  text-align: center;
  color: var(--fg);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  padding: 10px 12px;
  user-select: all;
}
.bp-2fa-code.is-used {
  color: var(--fg-subtle);
  text-decoration: line-through;
  text-decoration-color: color-mix(in oklab, var(--fg-subtle) 60%, transparent);
  background: transparent;
}

/* На печати — скрываем всё, кроме самих кодов */
@media print {
  .bp-auth__aside,
  .bp-auth__mobile-logo,
  .bp-alert,
  .hstack,
  .bp-verify__alt {
    display: none !important;
  }
  .bp-auth { display: block; }
  .bp-2fa-codes { grid-template-columns: repeat(2, 1fr); gap: 6px 10px; }
  .bp-2fa-code { border: 1px solid #999; background: #fff; color: #000; }
}

/* ============================================================ */
/* Expired link page — гостевая страница после истечения share_token */
/* ============================================================ */
.bp-expired {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.bp-expired__card {
  max-width: 440px;
  text-align: center;
  padding: 36px 28px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl, 14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-pop, 0 12px 40px rgba(15, 15, 15, .12));
}
.bp-expired__icon {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in oklab, var(--warn, #f59e0b) 12%, var(--bg-elev));
  color: var(--warn, #f59e0b);
  border-radius: 50%;
}
.bp-expired__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
}
.bp-expired__text {
  margin: 0;
  font-size: 14px;
  color: var(--fg-subtle);
  line-height: 1.5;
}
.bp-expired__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

/* ─── Mobile responsiveness: misc bug fixes ──────────────────────────────
   Inline grid `repeat(3, 1fr)` на странице события сжимает три плитки
   (Меню / Услуги / Предоплата) до неудобной ширины на телефоне.
*/
@media (max-width: 640px) {
  .bp-event-mini-grid {
    grid-template-columns: 1fr !important;
  }
  /* Dropdown-menu не должен выходить за пределы экрана на мобильных. */
  .dropdown-menu, .bp-menu {
    max-width: calc(100vw - 16px) !important;
  }
}

/* Бордерные правила для обёрток таблиц (overflow-x для горизонтального скролла). */
.bp-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* =============================================================================
   §AUTH-ASIDE-V7 · editorial warm paper (brand-aligned)
   -----------------------------------------------------
   Design intent: the same editorial type hierarchy, but rendered on the
   project's warm-paper canvas with indigo brand accents. The aside no longer
   feels like a separate "dark sidebar" — it reads as a refined region of the
   same page, sharing the landing/dashboard palette.

   - warm paper (#fbfbfa) with two soft indigo radial washes + dot-grid texture
   - logo mark uses the brand indigo gradient (same as sidebar/header)
   - typographic stack stays: Instrument Serif (display) + Inter (body)
   - color tokens: --bg, --fg, --fg-muted, --fg-subtle, --accent, --accent-press
   - subtle indigo hairline on the right edge (separator from form)
   - staggered reveal preserved: head → eyebrow → title → lede → meta → foot
   ============================================================================= */

.bp-auth__aside {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(48px, 5.2vw, 80px) clamp(40px, 4.8vw, 72px);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(40px, 4vw, 64px);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255,255,255,0.10), transparent 55%),
    radial-gradient(85% 70% at 110% 105%, rgba(167,139,250,0.18), transparent 55%),
    /* hardcoded-hex (аудит): точное соответствие токенам accent — заменено. */
    linear-gradient(160deg, var(--accent-press) 0%, var(--accent-hover) 38%, var(--accent) 72%, var(--accent-hover) 100%);
}

/* Bottom vignette — soft sink for the brand */
.bp-auth__aside::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(180deg, transparent 60%, rgba(15,11,60,0.30) 100%);
}

/* Hairline edge — separates aside from form */
.bp-auth__aside::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 1px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(255,255,255,0.18) 30%,
    rgba(255,255,255,0.10) 70%,
    transparent 100%);
  pointer-events: none;
  z-index: 2;
}

/* Atmospheric orbs — bright on indigo, drift slowly */
.bp-auth__aside-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  pointer-events: none;
  z-index: -1;
}
.bp-auth__aside-orb--a {
  width: 420px; height: 420px;
  top: -140px; left: -130px;
  background: radial-gradient(circle, rgba(165,180,252,0.32), transparent 70%);
  animation: bp-aside-orb-a 32s ease-in-out infinite alternate;
}
.bp-auth__aside-orb--b {
  width: 540px; height: 540px;
  bottom: -200px; right: -150px;
  background: radial-gradient(circle, rgba(196,181,253,0.28), transparent 70%);
  animation: bp-aside-orb-b 38s ease-in-out infinite alternate;
}
@keyframes bp-aside-orb-a {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(40px, 30px, 0); }
}
@keyframes bp-aside-orb-b {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-30px, -40px, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .bp-auth__aside-orb { animation: none; }
}

/* Grain — overlay blend for dark indigo (adds texture without lightening) */
.bp-auth__aside-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ─── Brand header — oversized, wordmark + tagline ──────────────────── */
.bp-auth__aside-head { z-index: 1; position: relative; }
.bp-auth__aside-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  text-decoration: none;
  transition: opacity 220ms ease, transform 220ms ease;
}
.bp-auth__aside-brand:hover { opacity: 0.92; transform: translateY(-1px); }

/* Logo mark — frosted glass on indigo */
.bp-auth__aside-mark {
  width: 56px; height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  position: relative;
  color: #fff;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.24);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -1px 0 rgba(0,0,0,0.10),
    0 12px 28px -10px rgba(15,11,60,0.40);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.bp-auth__aside-mark::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), transparent 55%);
  pointer-events: none;
}
.bp-auth__aside-mark svg {
  position: relative;
  z-index: 1;
}

.bp-auth__aside-wordmark {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1;
}
.bp-auth__aside-wordmark-name {
  font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: #fff;
}
.bp-auth__aside-wordmark-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}

/* ─── Body — optically centered, editorial rhythm ───────────────────── */
.bp-auth__aside-body {
  z-index: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 34ch;
  margin-block: auto;
}

.bp-auth__aside-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  width: max-content;
}
.bp-auth__aside-eyebrow-dot {
  display: inline-block;
  width: 24px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65));
  opacity: 0.85;
}

.bp-auth__aside-title {
  margin: 0;
  font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  font-size: clamp(34px, 3.6vw, 52px);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 1.04;
  color: #fff;
}
.bp-auth__aside-title em,
.bp-auth__aside-title i {
  font-style: italic;
  /* warm-light italic — мягкий контраст к main text */
  color: var(--accent-on-dark);
}

.bp-auth__aside-lede {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: rgba(255,255,255,0.80);
  max-width: 38ch;
  font-weight: 400;
  text-wrap: pretty;
}
.bp-auth__aside-lede strong { color: #fff; font-weight: 600; }

/* ─── Meta block — per-page unique detail ────────────────────────────── */
.bp-auth__aside-meta {
  position: relative;
  margin-top: 6px;
  padding: 14px 0 14px 18px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255,255,255,0.72);
  max-width: 38ch;
  border-left: 1px solid rgba(255,255,255,0.24);
}
.bp-auth__aside-meta strong { color: #fff; font-weight: 600; letter-spacing: 0.005em; }
.bp-auth__aside-meta b { color: #fff; font-weight: 600; }
.bp-auth__aside-meta code,
.bp-auth__aside-meta .bp-mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  padding: 1px 6px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  color: #fff;
}

/* Meta steps — small numbered preview (for register) */
.bp-auth__aside-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: bp-aside-step;
}
.bp-auth__aside-steps li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
  color: rgba(255,255,255,0.78);
  counter-increment: bp-aside-step;
}
.bp-auth__aside-steps li::before {
  content: counter(bp-aside-step, decimal-leading-zero);
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 15px;
  font-style: italic;
  color: var(--accent-on-dark);
  font-weight: 400;
}

/* Meta tag-list — compatible apps row (glass chips on indigo) */
.bp-auth__aside-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.bp-auth__aside-tags li {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ─── Footer — minimal, refined ──────────────────────────────────────── */
.bp-auth__aside-foot {
  z-index: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.14);
}
.bp-auth__aside-foot-line { letter-spacing: 0.02em; }

.bp-auth__aside-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #fff;
  text-decoration: none;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 999px;
  transition: background 240ms ease, border-color 240ms ease, color 240ms ease, transform 240ms ease, box-shadow 240ms ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.bp-auth__aside-home:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.32);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px -8px rgba(15,11,60,0.45);
}
.bp-auth__aside-home svg { transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1); }
.bp-auth__aside-home:hover svg { transform: translateX(3px); }

/* ─── Staggered reveal ───────────────────────────────────────────────── */
@keyframes bp-aside-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bp-auth__aside-head,
.bp-auth__aside-eyebrow,
.bp-auth__aside-title,
.bp-auth__aside-lede,
.bp-auth__aside-meta,
.bp-auth__aside-foot {
  animation: bp-aside-rise 820ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.bp-auth__aside-head     { animation-delay:  80ms; }
.bp-auth__aside-eyebrow  { animation-delay: 220ms; }
.bp-auth__aside-title    { animation-delay: 320ms; }
.bp-auth__aside-lede     { animation-delay: 440ms; }
.bp-auth__aside-meta     { animation-delay: 560ms; }
.bp-auth__aside-foot     { animation-delay: 680ms; }

@media (prefers-reduced-motion: reduce) {
  .bp-auth__aside-head,
  .bp-auth__aside-eyebrow,
  .bp-auth__aside-title,
  .bp-auth__aside-lede,
  .bp-auth__aside-meta,
  .bp-auth__aside-foot { animation: none; }
}

/* ─── Tablet (<=1100px) — slightly tighter type ──────────────────────── */
@media (max-width: 1100px) {
  .bp-auth__aside-wordmark-name { font-size: 26px; }
  .bp-auth__aside-mark { width: 52px; height: 52px; border-radius: 13px; }
  .bp-auth__aside-mark svg { width: 24px; height: 24px; }
}

/* ─── Mobile (<=960px) — compact banner, preserves brand ─────────────── */
@media (max-width: 960px) {
  .bp-auth__aside {
    padding: 26px 22px 22px;
    gap: 16px;
    min-height: auto;
  }
  .bp-auth__aside::after { display: none; }
  .bp-auth__aside-orb { display: none; }
  .bp-auth__aside-head { margin-bottom: 2px; }
  .bp-auth__aside-brand { gap: 12px; }
  .bp-auth__aside-mark { width: 40px; height: 40px; border-radius: 11px; }
  .bp-auth__aside-mark svg { width: 20px; height: 20px; }
  .bp-auth__aside-wordmark-name { font-size: 22px; }
  .bp-auth__aside-wordmark-tag { font-size: 10px; letter-spacing: 0.08em; }
  .bp-auth__aside-body {
    gap: 10px;
    max-width: none;
    margin-block: 0;
  }
  .bp-auth__aside-eyebrow {
    font-size: 10px;
    letter-spacing: 0.14em;
  }
  .bp-auth__aside-eyebrow-dot { width: 16px; }
  .bp-auth__aside-title {
    font-size: 26px;
    line-height: 1.08;
  }
  .bp-auth__aside-lede {
    font-size: 13.5px;
    max-width: none;
    line-height: 1.5;
  }
  .bp-auth__aside-meta { display: none; }
  .bp-auth__aside-foot { display: none; }
}
@media (max-width: 600px) {
  .bp-auth__aside { padding: 20px 20px 18px; gap: 10px; }
  .bp-auth__aside-mark { width: 36px; height: 36px; border-radius: 10px; }
  .bp-auth__aside-mark svg { width: 18px; height: 18px; }
  .bp-auth__aside-wordmark-name { font-size: 19px; }
  .bp-auth__aside-wordmark-tag { display: none; }
  .bp-auth__aside-title { font-size: 21px; }
  .bp-auth__aside-lede { display: none; }
  .bp-auth__aside-eyebrow { display: none; }
}

/* Avoid brand duplication on mobile when form has its own logo */
@media (max-width: 600px) {
  .bp-auth:has(.bp-auth__mobile-logo) .bp-auth__aside-head { display: none; }
}

/* =========================================================================
   PROD AUDIT — mobile critical (audit/production-readiness)
   1) iOS-zoom-fix: все инпуты ≥16px на mobile, чтобы Safari не зумил при focus
   2) WCAG 2.5.5 touch target: кнопки/линки минимум 44×44px на mobile
   3) Safe-area для topbar/sidebar/toasts
   4) Не показываем нижнюю мобильную таб-бар анонимам / на public-layout
   ========================================================================= */
/* ios-zoom-bp-mismatch: gate расширен 640→768 — инпуты 13px, а shell-брейк 768/780,
   поэтому устройства 641–768px (планшеты/крупные телефоны на iOS) всё ещё зумили
   при focus. 16px теперь покрывает весь mobile-диапазон до shell-перехода.
   + pointer:coarse (планшетный аудит): iPad 834/1024 шире 768, но Safari там
   зумит так же — гейтим и по устройству, мышиный десктоп не задет. */
@media (pointer: coarse), (max-width: 768px) {
  /* iOS Safari зумит при focus если font-size < 16px — это форсирует layout-shift.
     Применяем ко всем редактируемым полям. Кроме файловых инпутов (visual размер
     управляется label-кнопкой, а реальный input скрыт). */
  .bp-input,
  .bp-select,
  .bp-textarea,
  .bp-search input,
  select[multiple],
  input:not([type="file"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  textarea,
  select {
    font-size: 16px !important;
  }
}

@media (max-width: 768px) {
  /* WCAG 2.5.5 минимум 44×44 для тач-цели. На десктопе оставляем компактные
     30px (плотность UI важнее).
     ЕДИНОЕ правило для тач-цели = 44px. Прежний дубль `.bp-btn--sm{min-height:40px}`
     здесь был мёртвым: polish-pro.css грузится позже и переопределял его на
     var(--tap-min)=44px. Оставляем 44px как единственный источник истины. */
  .bp-btn,
  .bp-icon-btn,
  .bp-chip-btn,
  .bp-chipbtn {
    min-height: var(--tap-min);
  }
  /* Иконочные кнопки тоже расширяем */
  .bp-icon-btn {
    min-width: var(--tap-min);
  }
}

/* WCAG 2.5.5 (mobile-responsive аудит) — добор тач-целей, оставшихся <44px.
   .bp-tagchip и .qty-btn описаны в template-scoped <style> (грузятся позже) →
   !important, чтобы выиграть каскад. Визуально размер остаётся комфортным,
   не гигантским. */
@media (max-width: 768px) {
  .bp-tagchip { min-height: var(--tap-min) !important; }
  .bp-input__icon-btn { min-width: var(--tap-min); min-height: var(--tap-min); }
  .qty-btn { min-width: var(--tap-min) !important; min-height: var(--tap-min) !important; }
  .bp-btn--icon { min-width: var(--tap-min); }
  .bp-topbar__act,
  .bp-topbar__menu,
  .bp-topbar-search { min-width: var(--tap-min); min-height: var(--tap-min); }
}

/* Safe-area для устройств с notch / home indicator */
.bp-topbar {
  padding-top: max(14px, env(safe-area-inset-top));
  padding-right: max(24px, env(safe-area-inset-right));
  padding-left: max(24px, env(safe-area-inset-left));
}
.bp-mobile-tabs {
  padding-bottom: env(safe-area-inset-bottom, 0);
}
/* .bp-toasts перенесены в ПРАВЫЙ ВЕРХНИЙ угол (под топбар) — позиционирование
   теперь целиком в components.css. Прежний bottom-offset под мобильный таб-бар
   больше не нужен: тосты не у нижнего края и не конфликтуют с фиксированной
   кнопкой обратной связи (она остаётся внизу справа одна). */
/* Sidebar drawer overlay должен иметь видимый зазор справа на узких экранах,
   чтобы юзер понимал, что фон — кликабельный backdrop. */
@media (max-width: 480px) {
  .bp-sidebar {
    width: min(260px, 80vw);
  }
}

/* ── Тонкие ненавязчивые скроллбары (топбар-аудит, item 3) ────────────────
   Не скрываем полностью (доступность), но делаем незаметными: тонкие, в тон
   границ. Глобальный `*` имеет нулевую специфичность — точечные scrollbar-стили
   (палитра, сайдбар) остаются в приоритете. */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong, #cbd5e1) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--border-strong, #cbd5e1);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--fg-subtle, #94a3b8); background-clip: content-box; }
*::-webkit-scrollbar-corner { background: transparent; }

/* =========================================================================
   MOBILE CARD-REFLOW ДЛЯ ТАБЛИЦ — единый паттерн `table.wh-table-mobile`
   -------------------------------------------------------------------------
   На ≤760px строка таблицы превращается в карточку: thead скрыт, каждая <td>
   рендерит свой заголовок через td::before { content: attr(data-label) }.
   data-label ставит app.js initMobileTables() из текста <th> (если шаблон не
   задал свой). Это ЕДИНСТВЕННЫЙ механизм reflow (старые .bp-table-cards и
   table.table-mobile удалены / переключены). Отступы — строго на 4/8-сетке.
   ========================================================================= */
@media (max-width: 760px) {
  table.wh-table-mobile { border-collapse: collapse; background: transparent; border: 0; width: 100%; min-width: 0; }
  table.wh-table-mobile thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  table.wh-table-mobile tbody { display: block; }
  table.wh-table-mobile tbody tr {
    display: block;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--sp-3);
    margin-bottom: var(--sp-3);
  }
  table.wh-table-mobile tbody tr:hover { background: var(--bg-elev); }
  table.wh-table-mobile tbody tr:last-child { margin-bottom: 0; }
  table.wh-table-mobile tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-2) 0;
    border: 0;
    border-bottom: 1px solid var(--border-faint);
    text-align: right;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  /* Значение (всё после псевдо-заголовка) может ужиматься и переноситься,
     иначе длинные имена/залы вылезают за карточку. */
  table.wh-table-mobile tbody td > * { min-width: 0; }
  table.wh-table-mobile tbody td:last-child { border-bottom: 0; padding-bottom: 0; }
  table.wh-table-mobile tbody td:first-child { padding-top: 0; }
  table.wh-table-mobile tbody td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    margin-right: var(--sp-3);
    color: var(--fg-muted);
    font-weight: var(--fw-semi, 600);
    font-size: var(--fs-sm);
    text-align: left;
  }
  /* Пустой data-label (служебные/чекбокс/action-колонки) — без псевдо-заголовка,
     ячейка тянется на всю ширину и выравнивается слева. */
  table.wh-table-mobile tbody td[data-label=""]::before,
  table.wh-table-mobile tbody td:not([data-label])::before { content: none; }
  table.wh-table-mobile tbody td.bp-td--bulk,
  table.wh-table-mobile tbody td.is-action { justify-content: flex-end; }
  /* Ячейка во всю ширину (пустое состояние «нет данных», colspan) — блок по
     центру, без flex space-between, чтобы контент не сминался в узкую колонку. */
  table.wh-table-mobile tbody td[colspan] {
    display: block;
    text-align: center;
    padding: var(--sp-4) 0;
    border-bottom: 0;
  }
}

/* =========================================================================
   KANBAN BOARD — колоночные модификаторы + стек на телефоне (item 4)
   Раньше число колонок задавалось inline-стилем на контейнере, который нельзя
   переопределить медиазапросом → доски не стекались на узких экранах. Теперь
   ширины колонок живут в классах, а ≤780px форсит один столбец.
   ========================================================================= */
.bp-board--cols2 { grid-template-columns: repeat(2, minmax(280px, 1fr)); }
.bp-board--cols4 { grid-template-columns: repeat(4, minmax(200px, 1fr)); }
@media (max-width: 780px) {
  .bp-board { grid-template-columns: 1fr !important; }
}

/* =========================================================================
   ДВОЙНОЙ ГОРИЗОНТАЛЬНЫЙ ГАТТЕР (item 7)
   .page-shell добавляет padding, и вложенный .bp-page добавляет ещё
   --page-gutter-mobile=14px → на телефоне контент уезжал на 28px L/R
   (асимметрия против 14px топбара). Обнуляем горизонтальный паддинг внутреннего
   .bp-page, когда он вложен в .page-shell; вертикальный + клиренс таб-бара
   (см. ниже в @media ≤780px у .bp-page) сохраняем.
   ========================================================================= */
@media (max-width: 780px) {
  .bp-main-scroll .page-shell .bp-page { padding-left: 0; padding-right: 0; }
}

/* =========================================================================
   TABBAR — safe-area клиренс контента (item 10 / mobile-responsive аудит)
   Реальная высота бара = --mobile-tabbar-h + env(safe-area-inset-bottom).
   Клиренс ОБЯЗАН жить на скролл-контейнере, а не на .bp-page: многие экраны
   рендерятся без обёртки .bp-page (списки, kanban, settings-хаб), и их
   последняя строка пряталась под фиксированным таб-баром. Перенос на
   .bp-main-scroll (единый scroll-контейнер shell-а) гарантирует клиренс на
   ВСЕХ экранах. Перебивает shell.css .bp-main-scroll{padding-bottom:0}.
   ========================================================================= */
@media (max-width: 780px) {
  .bp-main-scroll { padding-bottom: calc(var(--mobile-tabbar-h) + env(safe-area-inset-bottom, 0px) + 16px) !important; }
}

/* =========================================================================
   MOBILE BOTTOM TAB — лейбл + бэйдж (item 9)
   • Лейбл: --fs-xs (11px) + ellipsis, чтобы 5 табов влезали на 320px.
   • Бэйдж: right-anchored позиция вместо магического translateX(14px),
     чтобы 2-значные счётчики не наезжали на иконку на узких экранах.
   ========================================================================= */
.bp-mobile-tab { font-size: var(--fs-xs); }
.bp-mobile-tab span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bp-mobile-tab__badge {
  right: calc(50% - 22px);
  left: auto;
  transform: none;
}

/* =========================================================================
   KANBAN-КАРТОЧКИ — утилиты вместо повторяющихся inline-стилей (item 11)
   Промотали в bp-* класс самые частые/читаемость-влияющие паттерны из
   leads/lead_list.html и calendar/event_list.html: микро-аватар назначенца
   (был 20–22px / 9px — off-grid и ниже 11px-флора) и SLA-метка.
   Размеры — из --sp-*/--fs-*; шрифт поднят до --fs-xs (11px) минимум.
   ========================================================================= */
.bp-avatar--xs {
  width: 20px;
  height: 20px;
  font-size: var(--fs-xs);
  flex-shrink: 0;
}
.bp-leadcard__ago {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-xs);
  color: var(--fg-subtle);
}
.bp-leadcard__ago--over {
  color: var(--danger-strong);
  background: var(--danger-soft);
  padding: 2px var(--sp-2);
  border-radius: var(--radius-pill);
  font-weight: var(--fw-medium, 500);
}

