/* ============================================================
   AISeller Design System v1 — «Спокойный кабинет»
   ds1.20261015.css — ЭТАП 1: токены + типографика + отступы.
   Единственный источник правды для цветов, шкал, радиусов и размеров.
   Подключается ПОСЛЕ всех существующих слоёв; логику не трогает.
   Без анимаций, без блера, без тяжёлых теней. Без фоновых наблюдателей и таймеров.

   Правила:
   1) Основной текст — не меньше 15px. Цель — 16px. Микро (короткие подписи
      капсом, легенды графиков) — 13px.
   2) Отступы — только из шкалы 4/8/12/16/24/32/40/56.
   3) Радиусы — только 8/12/16/999.
   4) Акцент = бренд арендатора. Основа продукта — нейтральная.
   5) Никаких анимаций, блера и тяжёлых теней.
   ============================================================ */

:root {
  /* ---------- Типографика: шкала ---------- */
  --font-sans: Inter, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --fs-micro: 13px;   /* ТОЛЬКО короткие подписи капсом. Никогда — цифры и абзацы */
  --fs-sm: 15px;      /* минимальный размер основного текста */
  --fs-body: 16px;    /* базовый текст, абзацы, таблицы, поля ввода */
  --fs-lg: 18px;      /* лид-абзац, подзаголовок */
  --fs-h3: 20px;      /* заголовок карточки */
  --fs-h2: 24px;      /* заголовок блока */
  --fs-h1: 30px;      /* заголовок экрана (h1) */
  --fs-kpi: 38px;     /* крупная цифра показателя */
  --fs-hero: 48px;    /* герой-цифра на пустом дашборде */

  --lh-tight: 1.2;
  --lh-snug: 1.35;
  --lh-body: 1.55;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semi: 600;
  --fw-bold: 700;

  --ls-caps: 0.06em;  /* разрядка для подписей капсом */

  /* ---------- Шкала отступов (шаг 4px, база 8px) ---------- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 40px;
  --sp-8: 56px;

  /* ---------- Радиусы ---------- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* ---------- Тени (только две, обе тихие) ---------- */
  --sh-1: 0 1px 2px rgba(16, 24, 40, .06);
  --sh-2: 0 4px 12px rgba(16, 24, 40, .08);

  /* ---------- Размеры элементов ---------- */
  --ctl-sm: 36px;     /* редкие плотные кнопки */
  --ctl: 44px;        /* основная кнопка, поле ввода (касание ≥44) */
  --ctl-lg: 52px;     /* главное действие на пустом экране */
  --chip-h: 28px;
  --row-h: 56px;      /* строка таблицы */
  --icon-btn: 40px;
  --sidebar-w: 264px;
  --content-max: 1200px;   /* строка текста не растягивается на 1920 */
  --tap-min: 44px;

  /* ---------- Ритм границ ---------- */
  --bw: 1px;
  --bw-strong: 2px;

  /* ============================================
     НЕЙТРАЛЬНАЯ ОСНОВА ПРОДУКТА — СВЕТЛАЯ ТЕМА
     ============================================ */
  --c-bg: #F4F6F5;
  --c-surface: #FFFFFF;
  --c-surface-2: #EEF2F0;
  --c-border: #D9E0DD;
  --c-border-strong: #C2CCC8;

  --c-text: #16211D;
  --c-text-2: #4C5B55;
  --c-text-muted: #5E6E68;

  /* Боковое меню — нейтральный графит, не бренд */
  --c-nav-bg: #141917;
  --c-nav-text: #C9D3CF;
  --c-nav-muted: #A7B3AE;   /* поднято с #8C9A95: контраст ≥4.5:1 на #141917 */
  --c-nav-hover: #1B2320;
  --c-nav-active-bg: #1F2A25;
  --c-nav-active-text: #FFFFFF;

  /* Фокус — обязателен для доступности */
  --c-focus: #2F6FA8;
  --ring: 0 0 0 3px rgba(47, 111, 168, .35);

  /* ============================================
     АКЦЕНТ АРЕНДАТОРА (VillaPrestige)
     Меняется в одном месте — под другого клиента.
     ============================================ */
  --c-accent: #17362C;          /* основной акцент: кнопки, активный пункт */
  --c-accent-hover: #0E2620;
  --c-accent-text: #FFFFFF;
  --c-accent-soft: #E6EFEA;     /* мягкая плашка */
  --c-accent-soft-text: #17362C;
  --c-accent-border: #B9CEC4;

  --c-gold: #C99A42;            /* золото бренда: только заливки, линии, метки */
  --c-gold-soft: #F7EFDD;
  --c-gold-text: #7A5A15;       /* золото как ТЕКСТ — только этот оттенок */
  --c-gold-on-dark: #E3B75F;    /* золото на тёмном фоне */

  /* ============================================
     СТАТУСЫ: цвет + СЛОВО. Цвет лишь подкрепляет слово.
     ============================================ */
  --c-ok-bg: #E6F4EA;      --c-ok-text: #16603A;      --c-ok-dot: #1E8A52;      --c-ok-border: #B7DFC6;
  --c-warn-bg: #FBF1DC;    --c-warn-text: #7E5606;    --c-warn-dot: #A0751C;    --c-warn-border: #E8D5A8;
  --c-danger-bg: #FBE9E9;  --c-danger-text: #8C1D1D;  --c-danger-dot: #C0342E;  --c-danger-border: #EEC2C0;
  --c-info-bg: #E8EFF7;    --c-info-text: #1B4A73;    --c-info-dot: #2F6FA8;    --c-info-border: #BFD4E8;
  --c-idle-bg: #EDF1EF;    --c-idle-text: #4C5B55;    --c-idle-dot: #74847D;    --c-idle-border: #D3DBD7;
}

/* ============================================================
   БАЗА: типографика и фон — на существующих элементах
   ============================================================ */
html { font-size: var(--fs-body); }
body {
  font-family: var(--font-sans) !important;
  font-size: var(--fs-body) !important;
  line-height: var(--lh-body) !important;
  color: var(--c-text) !important;
  background: var(--c-bg) !important;
  -webkit-font-smoothing: antialiased;
}

/* Заголовки — строго по шкале 20/24/30 */
.topbar h1, h1#screen-title { font-size: var(--fs-h1) !important; line-height: var(--lh-tight) !important; font-weight: var(--fw-bold) !important; }
.panel h3, .panel-head h3, .card__title { font-size: var(--fs-h3) !important; line-height: var(--lh-snug) !important; font-weight: var(--fw-semi) !important; }
h2, .section-h2 { font-size: var(--fs-h2) !important; line-height: var(--lh-snug) !important; }

/* Основной текст — не меньше 15px */
.topbar p, .lede, .panel p, .legacy-muted, p.legacy-muted,
.screen-stage p, .workspace p { font-size: var(--fs-sm) !important; line-height: var(--lh-body) !important; }

/* Таблицы и поля — 16px */
table td, table th, .lead-table td, .lead-table th,
input, select, textarea { font-size: var(--fs-body) !important; }

/* Цифры читаются одинаково */
.num, .metric-card b, .kpi__value, .owner-kpi-card b,
.quality-mini-widget b, .signal-grid b, table td,
.weekly-segmented-bars b, .wide-bars b { font-variant-numeric: tabular-nums; }

/* ============================================================
   ОТСТУПЫ — только шкала 4/8/12/16/24/32/40/56
   ============================================================ */
.workspace { padding: var(--sp-6) !important; }
.screen-stage { gap: var(--sp-5) !important; }
.panel, .live-card, .card { padding: var(--sp-5) !important; }
.panel-head { margin-bottom: var(--sp-4) !important; }
.topbar { margin-bottom: var(--sp-5) !important; gap: var(--sp-5) !important; }
.layout-2, .inbox-grid, .assistant-grid, .lead-workspace, .channel-setup-layout { gap: var(--sp-5) !important; }
.nav-list { gap: var(--sp-3) !important; }
.nav-group { gap: var(--sp-1) !important; }
.sidebar { gap: var(--sp-4) !important; padding: var(--sp-5) var(--sp-4) !important; }
.dashboard-grid { gap: var(--sp-4) !important; }
.overview-workbench { gap: var(--sp-4) !important; }

/* ============================================================
   РАДИУСЫ — только 8/12/16/999 (уводим «случайные» 7/9/10/11/13/14/18/20/22/24)
   ============================================================ */
.panel, .live-card, .card, .metric-card, .connector-card, .module-card,
.radar-card, .operator-card, .security-card, .rule-card, .gap-card,
.owner-queue-panel, .owner-lead-card, .owner-kpi-card, .scanner-card,
.lead-profile-card, .admin-stat-card, .dashboard-widget, .dashboard-builder,
.channel-status-grid, .selected-channel-card, .baby-check-card,
.provisioning-item, .seo-chart-context, .seo-chart-tooltip { border-radius: var(--r-lg) !important; }
.checkin-step, .baby-step, .message-stage, .dialog-stage, .owner-event-tray,
.form-panel, .resultBox, .metric-chip, .note, .op-panel { border-radius: var(--r-md) !important; }
.badge, .nav-link em, .panel-head span, .owner-lead-card span, .live-metrics span,
.stat-period-selector button, .domain-chip { border-radius: var(--r-pill) !important; }

/* ============================================================
   ТИПОГРАФИЧЕСКИЙ «ПОЛ»: ничего мельче 13px; 13–14px поднимаем до 15px.
   Сгенерировано из фактических правил существующих слоёв.
   ============================================================ */
/* --- floor 13px: 276 selectors --- */
html body .admin-action-buttons button,
html body .admin-badge,
html body .admin-slug,
html body .admin-stat-label,
html body .admin-table button,
html body .admin-table thead th,
html body .ai-inspector span,
html body .analytics-kpi-inline .metric-delta,
html body .analytics-kpi-inline small,
html body .annual-line { font-size: 13px !important; }
html body .baby-next-step code,
html body .baby-next-step small,
html body .badge,
html body .billing-plan .annual-line,
html body .billing-plan li,
html body .billing-plan li:before,
html body .billing-plan-head b small,
html body .billing-plan-head>span,
html body .billing-plan-limits small,
html body .bot-preview-dialog .message b { font-size: 13px !important; }
html body .brand small,
html body .brand-color-field code,
html body .brand-token-grid label,
html body .builder-help,
html body .builder-period-selector button,
html body .catalog-card p,
html body .catalog-card small,
html body .catalog-soon,
html body .channel-map-item em,
html body .channel-scenario-note span { font-size: 13px !important; }
html body .channel-segment-legend span,
html body .channel-stat small,
html body .channel-stats-list .channel-stat-readable small,
html body .checkin-status,
html body .checkin-step div small,
html body .collapsible-title small,
html body .compact-radar b,
html body .compact-radar span,
html body .conversation-actions button,
html body .conversation-title small { font-size: 13px !important; }
html body .dashboard-builder small,
html body .dashboard-builder-toggle em,
html body .dashboard-builder-toggle small,
html body .dashboard-channel-list b,
html body .dashboard-channel-list span,
html body .dashboard-control-row p,
html body .dashboard-empty-note,
html body .dashboard-live-dialog .message,
html body .dashboard-live-state span,
html body .dashboard-live-widget em { font-size: 13px !important; }
html body .dashboard-news-plan b,
html body .dashboard-news-plan span,
html body .dashboard-news-row b,
html body .dashboard-news-row span,
html body .dashboard-operator-queue b,
html body .dashboard-operator-queue em,
html body .dashboard-operator-queue span,
html body .dashboard-preset-row button b,
html body .dashboard-preset-row button small,
html body .dashboard-reply-row button { font-size: 13px !important; }
html body .dashboard-reply-row input,
html body .dashboard-top-controls small,
html body .dashboard-unified-foot span,
html body .dashboard-widget .legend button,
html body .dashboard-widget .panel-head span,
html body .dashboard-widget.widget-sm .channel-segment-legend span,
html body .dashboard-widget.widget-sm .compact-widget-metrics .metric-card small,
html body .dashboard-widget.widget-sm .dashboard-channel-list b,
html body .dashboard-widget.widget-sm .dashboard-channel-list span,
html body .dashboard-widget.widget-sm .dashboard-operator-queue b { font-size: 13px !important; }
html body .dashboard-widget.widget-sm .dashboard-operator-queue em,
html body .dashboard-widget.widget-sm .dashboard-operator-queue span,
html body .dashboard-widget.widget-sm .dashboard-trend-widget.trend-period-day .channel-segment-legend span,
html body .dashboard-widget.widget-sm .legend button,
html body .dashboard-widget.widget-sm .metric-card small,
html body .dashboard-widget.widget-sm .metric-card span,
html body .dashboard-widget.widget-sm .panel-head span,
html body .dashboard-widget.widget-sm .weekly-segmented-bars b,
html body .dashboard-widget.widget-sm .weekly-segmented-bars small,
html body .dashboard-widget.widget-sm .wide-bars b { font-size: 13px !important; }
html body .dashboard-widget.widget-sm .wide-bars small,
html body .dashboard-widget.widget-sm .widget-controls button,
html body .dashboard-widget.widget-xl .panel-head span,
html body .deal-analytics small,
html body .demo-badge,
html body .eyebrow,
html body .floating-chat-head small,
html body .floating-chat-note,
html body .form-panel small.muted,
html body .full-width { font-size: 13px !important; }
html body .gateway-card p,
html body .gateway-card small,
html body .growth-editor-form .growth-editor-body,
html body .guide-metric,
html body .hybrid-dashboard-intro small,
html body .hybrid-dashboard-intro span,
html body .inbox-period-row .queue-filter,
html body .inbox-period-row>small,
html body .inbox-period-row>span,
html body .lead-filter-grid label { font-size: 13px !important; }
html body .legacy-conversation-detail .conversation-head button,
html body .legacy-message-feed .message small,
html body .legacy-thread span,
html body .live-analytics-next span,
html body .live-badge,
html body .live-channel-analytics-card footer,
html body .live-channel-analytics-card small,
html body .live-channel-mix b,
html body .live-channel-mix span,
html body .live-channel-number span { font-size: 13px !important; }
html body .live-delta,
html body .live-empty-channel-mix b,
html body .live-empty-channel-mix span,
html body .live-metrics span,
html body .live-owner-seo-entry,
html body .live-owner-seo-entry span,
html body .live-sales-dashboard .dashboard-live-widget .panel-head span,
html body .live-sales-dashboard .dashboard-live-widget>small,
html body .live-sales-hero small,
html body .live-zero-visual>span { font-size: 13px !important; }
html body .max-messages .message small,
html body .message b,
html body .message small,
html body .message-stage b,
html body .metric-chip b,
html body .metric-chip small,
html body .metric-delta,
html body .mini-chat-meta span,
html body .mobile-brand span,
html body .mobile-menu-group>b { font-size: 13px !important; }
html body .module-top span,
html body .nav-group-title,
html body .nav-group-toggle,
html body .nav-link em,
html body .nav-link strong,
html body .need-chip,
html body .op-aq__chip,
html body .op-aq__close,
html body .op-aq__empty,
html body .op-aq__flag { font-size: 13px !important; }
html body .op-aq__mode,
html body .op-aq__note,
html body .op-aq__sub,
html body .op-aq__time,
html body .op-aq__total span,
html body .op-avito__facts,
html body .op-await,
html body .op-await-line span,
html body .op-bar__day,
html body .op-bar__value { font-size: 13px !important; }
html body .op-brand-empty,
html body .op-brand__presets,
html body .op-btn--mini,
html body .op-channel__open,
html body .op-field,
html body .op-kpi__go,
html body .op-kpi__note,
html body .op-kpi__title,
html body .op-legend,
html body .op-mode__badge { font-size: 13px !important; }
html body .op-note,
html body .op-obj__addr,
html body .op-obj__metrics,
html body .op-obj__person,
html body .op-obj__role span,
html body .op-panel__head span,
html body .op-pill,
html body .op-rep__history-item,
html body .op-rep__history-item small,
html body .op-rep__history>span { font-size: 13px !important; }
html body .op-rep__source,
html body .op-sol__chip,
html body .op-sol__facts,
html body .op-sol__field small,
html body .op-sol__field span,
html body .op-sol__kind,
html body .op-sol__note,
html body .op-sol__tenant,
html body .op-subchart__label,
html body .op-updated { font-size: 13px !important; }
html body .op-wm__empty,
html body .op-wm__meta,
html body .op-wm__note,
html body .op-wm__sub,
html body .op-wm__total span,
html body .overview-toolbar small,
html body .owner-card-actions button,
html body .owner-channel small,
html body .owner-channel span,
html body .owner-channel-mini { font-size: 13px !important; }
html body .owner-event-actions .ghost-button,
html body .owner-event-bell-count,
html body .owner-event-count,
html body .owner-event-list p,
html body .owner-event-list span,
html body .owner-event-open b,
html body .owner-event-open span,
html body .owner-event-tray-head small,
html body .owner-kpi-card small,
html body .owner-kpi-card span { font-size: 13px !important; }
html body .owner-kpi-link em,
html body .owner-layout-heading small,
html body .owner-layout-options label,
html body .owner-layout-panel summary span,
html body .owner-lead-card small,
html body .owner-lead-card span,
html body .owner-live-card .panel-head span,
html body .owner-live-card>em,
html body .owner-live-card>small,
html body .owner-live-dashboard .owner-live-bars b { font-size: 13px !important; }
html body .owner-live-dashboard .owner-live-bars small,
html body .owner-live-state-copy small,
html body .owner-trend-grid text,
html body .owner-trend-labels span,
html body .owner-trend-scale,
html body .owner-trend-tooltip b,
html body .owner-trend-tooltip span,
html body .panel-head span,
html body .period-summary div b,
html body .photo-thumb button { font-size: 13px !important; }
html body .plan-channel-badges span,
html body .production-zero-dashboard .dashboard-widget .panel-head span,
html body .progress-item small,
html body .provisioning-item small,
html body .pub-chip,
html body .pub-day span,
html body .pub-legend-item,
html body .pub-source,
html body .quality-mini-widget button,
html body .quality-mini-widget small { font-size: 13px !important; }
html body .quality-mini-widget span,
html body .queue-filter,
html body .radar-action em,
html body .radar-grid b,
html body .radar-grid span,
html body .reply-stage label,
html body .sales-period-row .builder-period-selector button,
html body .sales-period-row>span,
html body .scanner-card b,
html body .security-forms label { font-size: 13px !important; }
html body .segment-stack .channel-seg em,
html body .segment-stack .channel-seg:hover em,
html body .seo-chart-context b,
html body .seo-chart-context span,
html body .seo-chart-tooltip span,
html body .seo-line-labels b,
html body .seo-line-labels small,
html body .setup-channel-tile small,
html body .sidebar-note b,
html body .sidebar-note span { font-size: 13px !important; }
html body .sidebar-pulse-card b,
html body .sidebar-pulse-card span,
html body .spotlight-copy small,
html body .spotlight-steps span,
html body .tag-row span,
html body .tenant-card small,
html body .timeline-item span,
html body .top-period-selector button,
html body .topbar .eyebrow,
html body .topbar-actions button { font-size: 13px !important; }
html body .total-stack .channel-share em,
html body .unified-row p,
html body .unified-row-channel,
html body .unified-row-status,
html body .weekly-segmented-bars b,
html body .weekly-segmented-bars small,
html body .weekly-segmented-bars.trend-period-day b,
html body .weekly-segmented-bars.trend-period-day small,
html body .wide-bars b,
html body .wide-bars small { font-size: 13px !important; }
html body .wide-bars.dense-bars b,
html body .wide-bars.dense-bars small,
html body .widget-controls button,
html body body.op-owner-clean .op-kpi__title,
html body body[data-screen="overview"] .live-metrics span,
html body body[data-screen="overview"] .signal-grid article { font-size: 13px !important; }

/* --- floor 15px: 89 selectors --- */
html body #op-brand-bar span,
html body .admin-empty,
html body .admin-quick-note input,
html body .admin-search-input,
html body .admin-table,
html body .baby-channel-master .panel-head p,
html body .billing-plan p,
html body .bot-knowledge-panel .knowledge-progress span,
html body .bot-preview-dialog .message,
html body .catalog-more summary { font-size: 15px !important; }
html body .channel-scenario-note b,
html body .channel-stat b,
html body .channel-stats-list .channel-stat-readable b,
html body .dashboard-builder-body p,
html body .dashboard-builder-toggle b,
html body .dashboard-control-row b,
html body .dashboard-top-controls b,
html body .dashboard-widget .panel-head h3,
html body .dashboard-widget.widget-sm .metric-card b,
html body .dashboard-widget.widget-sm .panel-head h3 { font-size: 15px !important; }
html body .data-table b,
html body .event-group summary,
html body .faq-item,
html body .floating-tooltip,
html body .gateway-card b,
html body .guide-step-number,
html body .knowledge-details .niche-questions label,
html body .knowledge-details summary,
html body .knowledge-form label,
html body .lead-actions-card b { font-size: 15px !important; }
html body .lead-table td,
html body .lead-table th,
html body .legacy-conversation-detail .conversation-actions button,
html body .legend span,
html body .live-sales-hero p,
html body .metric-chip span,
html body .nav-link,
html body .op-aq__text,
html body .op-avito__h,
html body .op-avito__note { font-size: 15px !important; }
html body .op-avito__steps li,
html body .op-await-line b,
html body .op-brand__link,
html body .op-btn,
html body .op-channel__name,
html body .op-channel__num,
html body .op-input,
html body .op-obj__metrics b,
html body .op-obj__role b,
html body .op-rep__actions h4 { font-size: 15px !important; }
html body .op-rep__actions li,
html body .op-rep__more p,
html body .op-rep__more summary,
html body .op-sol__about,
html body .op-sol__error,
html body .op-sol__field input,
html body .op-sol__steps,
html body .op-wm__num,
html body .op-wm__text,
html body .operator-badge { font-size: 15px !important; }
html body .overview-toolbar p,
html body .owner-channel > .badge,
html body .owner-channel > [class*="badge"],
html body .owner-event-tray-head b,
html body .owner-layout-heading b,
html body .owner-lead-card p,
html body .owner-live-state-copy span,
html body .owner-rules-grid p,
html body .period-summary div,
html body .price-item { font-size: 15px !important; }
html body .production-zero-dashboard .dashboard-widget .panel-head h3,
html body .provisioning-help,
html body .quality-grid div b,
html body .rule-item,
html body .scanner-card p,
html body .scanner-card small,
html body .scanner-merge-banner b,
html body .scanner-merge-banner p,
html body .seo-chart-tooltip>b,
html body .seo-demo-note span { font-size: 15px !important; }
html body .seo-demo-steps,
html body .stat-period-selector button,
html body .tenant-card b,
html body .text-logo,
html body .topbar p,
html body .unified-row b,
html body body[data-screen="analytics"] .topbar p,
html body body[data-screen="overview"] .chat-line,
html body body[data-screen="overview"] .topbar p { font-size: 15px !important; }
