/* Тема Shopify Polaris: основная тема BeProfi 2.0 (решение Арслана 22.10.2026, вариант 4 прототипа
   docs/06-product/prototypes). Включается атрибутом data-theme="polaris" на <html> (по умолчанию в разметке);
   «Классическая» тема (data-theme="classic") оставляет прежние стили без изменений. Файл подключается
   последним и только переопределяет оформление: разметка и поведение экранов те же. */

/* ---------- Токены ---------- */
[data-theme=polaris]{color-scheme:light}
[data-theme=polaris] body{
 --p-font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
 --p-bg:#f1f1f1;--p-surface:#fff;--p-surface-2:#f7f7f7;--p-surface-3:#ebebeb;--p-text:#303030;--p-text-2:#4a4a4a;--p-muted:#616161;--p-faint:#b5b5b5;--p-border:#e3e3e3;--p-border-strong:#8a8a8a;
 --p-link:#005bd3;--p-success:#29845a;--p-success-bg:#cdfee1;--p-success-ink:#0c5132;--p-warn-bg:#ffef9d;--p-warn-ink:#4f4700;--p-warn-soft:#fff8db;--p-critical:#c70a24;--p-critical-bg:#fedad9;--p-critical-ink:#8e0b21;--p-magic:#8051ff;--p-magic-bg:#f3efff;--p-magic-ink:#5700d1;--p-info-bg:#eaf4ff;--p-dark:#1a1a1a;--p-dark-2:#303030;--p-dark-line:#3a3a3a;
 --p-card-shadow:0 1px 0 0 rgba(26,26,26,.07),inset 0 1px 0 0 rgba(208,208,208,.4),inset 1px 0 0 0 rgba(204,204,204,.55),inset -1px 0 0 0 rgba(204,204,204,.55),inset 0 -1px 0 0 rgba(153,153,153,.5);
 --p-btn-shadow:0 1px 0 0 #e3e3e3 inset,inset 0 -1px 0 0 #b5b5b5,inset 0 0 0 1px #e3e3e3;
 --p-btn-primary:linear-gradient(180deg,rgba(48,48,48,0) 63%,rgba(255,255,255,.15)),#303030;
 --p-btn-primary-shadow:inset 0 -1px 0 1px rgba(0,0,0,.8),inset 0 0 0 1px #303030,inset 0 .5px 0 1.5px rgba(255,255,255,.25);
 --p-seg-shadow:0 1px 0 0 rgba(26,26,26,.07),inset 0 -1px 0 0 #b5b5b5,inset 0 0 0 1px #e3e3e3;
 --p-modal-shadow:0 20px 20px -8px rgba(26,26,26,.28),0 0 0 1px rgba(0,0,0,.08);
 /* Переменные приложения и домашнего экрана в палитре Polaris. */
 --bg:var(--p-bg);--surface:#fff;--ink:var(--p-text);--text:var(--p-text);--muted:var(--p-muted);--line:var(--p-border);--border:var(--p-border);
 --green:#303030;--green-deep:#1a1a1a;--sage:var(--p-surface-3);--cream:var(--p-warn-soft);--purple:var(--p-magic-bg);--lavender:var(--p-magic-ink);--rose:#fee9e8;--blue:var(--p-info-bg);--danger:var(--p-critical);
 --radius:12px;--shadow:var(--p-card-shadow);
 --bp-paper:var(--p-bg);--bp-white:#fff;--bp-ink:var(--p-text);--bp-muted:var(--p-muted);--bp-green:#303030;--bp-green-dark:#1a1a1a;--bp-sage:var(--p-surface-3);--bp-lime:#36fba1;--bp-line:var(--p-border);--bp-amber:#b28400;--bp-red:var(--p-critical);--bp-radius:12px;--bp-body:var(--p-font);--bp-display:var(--p-font);
 font-family:var(--p-font);background:var(--p-bg);color:var(--p-text);letter-spacing:-.003em;
}
[data-theme=polaris] h1,[data-theme=polaris] h2,[data-theme=polaris] h3{font-family:var(--p-font);letter-spacing:-.02em}
[data-theme=polaris] h1,[data-theme=polaris] .page-heading h1{font-weight:700}
[data-theme=polaris] a{color:var(--p-link)}
[data-theme=polaris] button:focus-visible,[data-theme=polaris] a:focus-visible,[data-theme=polaris] input:focus-visible,[data-theme=polaris] select:focus-visible,[data-theme=polaris] textarea:focus-visible{outline:2px solid var(--p-link);outline-offset:1px}

/* ---------- Каркас: боковое меню и тёмная верхняя панель ---------- */
[data-theme=polaris] .sidebar{background:var(--p-surface-3);border-right:0}
[data-theme=polaris] .brand-mark{background:linear-gradient(180deg,#36a672,#29845a);color:#fff;border-radius:10px;font-family:var(--p-font);font-weight:800;letter-spacing:-2px;box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 1px 2px rgba(0,0,0,.2)}
[data-theme=polaris] .brand strong{font-family:var(--p-font);color:var(--p-text)}
[data-theme=polaris] .brand small,[data-theme=polaris] .nav-label{color:var(--p-muted)}
[data-theme=polaris] .salon-switch{background:#fff;border:0;box-shadow:var(--p-card-shadow);border-radius:10px}
[data-theme=polaris] .nav button,[data-theme=polaris] .sidebar .nav button{color:var(--p-text-2);border-radius:8px;font-weight:550}
[data-theme=polaris] .nav button:hover,[data-theme=polaris] .sidebar .nav button:hover{background:#e3e3e3;color:var(--p-text)}
[data-theme=polaris] .nav button.active,[data-theme=polaris] .sidebar .nav button.active{background:#fff;color:var(--p-text);font-weight:650;box-shadow:0 1px 0 0 rgba(26,26,26,.07),inset 0 0 0 1px #e3e3e3}
[data-theme=polaris] .pilot-badge{background:#fff;border-color:var(--p-border);color:var(--p-muted)}
[data-theme=polaris] .topbar{height:60px;background:var(--p-dark);color:#e3e3e3;border:0;border-radius:14px;margin:12px 16px 0;box-shadow:0 1px 0 rgba(0,0,0,.4)}
[data-theme=polaris] .topbar .breadcrumb,[data-theme=polaris] .topbar .breadcrumb span{color:#9e9e9e}
[data-theme=polaris] .topbar .breadcrumb strong{color:#fff}
[data-theme=polaris] .topbar .clock-label{color:#b5b5b5}
[data-theme=polaris] .topbar .online-dot{background:#36fba1}
[data-theme=polaris] .topbar .language-select,[data-theme=polaris] .topbar select{background:#303030;color:#e3e3e3;border-color:#4a4a4a!important}
[data-theme=polaris] .topbar .icon-button,[data-theme=polaris] .topbar .button{background:#303030;color:#e3e3e3;border:1px solid #4a4a4a;box-shadow:none}
[data-theme=polaris] .topbar .icon-button:hover,[data-theme=polaris] .topbar .button:hover{background:#404040}
[data-theme=polaris] .topbar .avatar{background:var(--p-success-bg);color:var(--p-success-ink);box-shadow:0 0 0 2px #303030}
[data-theme=polaris] .online-dot{background:var(--p-success)}

/* ---------- Карточки и поверхности ---------- */
[data-theme=polaris] .card,[data-theme=polaris] .kpi,[data-theme=polaris] .agenda-item,[data-theme=polaris] .agenda-closed,[data-theme=polaris] .connector-card,[data-theme=polaris] .patient-workspace .workspace-summary,[data-theme=polaris] .patient-workspace .workspace-visit,[data-theme=polaris] .patient-workspace>.occupancy-card,[data-theme=polaris] .home-view-switch{background:#fff;border-color:transparent;box-shadow:var(--p-card-shadow);border-radius:12px}
[data-theme=polaris] .card-head h2,[data-theme=polaris] .home-section-head h2{font-size:15px;font-weight:650;letter-spacing:-.01em}
[data-theme=polaris] .card-head p,[data-theme=polaris] .kpi-label,[data-theme=polaris] .kpi-hint,[data-theme=polaris] .field-hint,[data-theme=polaris] .form-field small{color:var(--p-muted)}
[data-theme=polaris] .kpi{background:#fff}
[data-theme=polaris] .kpi-value{font-weight:700;letter-spacing:-.025em}
[data-theme=polaris] .kpi-icon{background:var(--p-surface-3);color:var(--p-text)}
[data-theme=polaris] .kpi-hint.good{color:var(--p-success)}
[data-theme=polaris] .card-action,[data-theme=polaris] .table .row-action{color:var(--p-link)}
[data-theme=polaris] .welcome-banner{background:#fff;box-shadow:var(--p-card-shadow)}
[data-theme=polaris] .welcome-banner p{color:var(--p-muted)}
[data-theme=polaris] .empty-state svg{color:var(--p-faint)}
[data-theme=polaris] .chart-bar{background:#e3e3e3}
[data-theme=polaris] .chart-column:last-child .chart-bar{background:var(--p-success)}
[data-theme=polaris] .workspace-section{border-color:var(--p-border)}

/* ---------- Кнопки ---------- */
[data-theme=polaris] .button{background:#fff;color:var(--p-text);border:0;border-radius:8px;font-weight:650;box-shadow:var(--p-btn-shadow)}
[data-theme=polaris] .button:hover{background:var(--p-surface-2)}
[data-theme=polaris] .button:active{background:#f1f1f1;box-shadow:inset 0 2px 1px rgba(26,26,26,.2)}
[data-theme=polaris] .button.primary,[data-theme=polaris] .home-quick-actions .primary{background:var(--p-btn-primary);color:#fff;box-shadow:var(--p-btn-primary-shadow)}
[data-theme=polaris] .button.primary:hover,[data-theme=polaris] .home-quick-actions .primary:hover{background:#1a1a1a}
[data-theme=polaris] .button.danger{background:#fff;color:var(--p-critical-ink);box-shadow:inset 0 0 0 1px #fdcfcd,inset 0 -1px 0 0 #fca5a5}
[data-theme=polaris] .button.ghost{background:none;box-shadow:none;color:var(--p-muted)}
[data-theme=polaris] .button.ghost:hover{background:rgba(0,0,0,.05)}
[data-theme=polaris] .public-back{color:var(--p-text)}

/* ---------- Поля, переключатели, вкладки ---------- */
[data-theme=polaris] input,[data-theme=polaris] select,[data-theme=polaris] textarea{border-color:var(--p-border-strong);border-radius:8px;background:#fdfdfd;color:var(--p-text)}
[data-theme=polaris] input::placeholder,[data-theme=polaris] textarea::placeholder{color:#8a8a8a}
[data-theme=polaris] input[type=checkbox],[data-theme=polaris] input[type=radio]{accent-color:#303030}
[data-theme=polaris] .segmented,[data-theme=polaris] .home-view-switch{background:#e3e3e3;border:0;box-shadow:none;border-radius:10px}
[data-theme=polaris] .segmented button.active,[data-theme=polaris] .home-view-switch .active{background:#fff;color:var(--p-text);font-weight:650;box-shadow:var(--p-seg-shadow)}
[data-theme=polaris] .home-view-switch button{color:var(--p-text-2)}
[data-theme=polaris] .tabs{border-color:var(--p-border)}
[data-theme=polaris] .tabs button.active{border-bottom-color:#303030;color:var(--p-text)}

/* ---------- Значки состояний и аватары ---------- */
[data-theme=polaris] .status{background:var(--p-success-bg);color:var(--p-success-ink);border-radius:8px}
[data-theme=polaris] .status.warn{background:var(--p-warn-bg);color:var(--p-warn-ink)}
[data-theme=polaris] .status.purple{background:var(--p-magic-bg);color:var(--p-magic-ink)}
[data-theme=polaris] .status.danger{background:var(--p-critical-bg);color:var(--p-critical-ink)}
[data-theme=polaris] .status.neutral{background:#e3e3e3;color:var(--p-text-2)}
[data-theme=polaris] .avatar{background:var(--p-success-bg);color:var(--p-success-ink)}
[data-theme=polaris] .avatar.purple{background:var(--p-magic-bg);color:var(--p-magic-ink)}
[data-theme=polaris] .avatar.rose{background:#fee9e8;color:var(--p-critical-ink)}
[data-theme=polaris] .avatar.cream{background:var(--p-warn-soft);color:var(--p-warn-ink)}

/* ---------- Таблицы, окна, уведомления ---------- */
[data-theme=polaris] .table th{background:var(--p-surface-2);color:var(--p-muted);font-weight:550}
[data-theme=polaris] .table td{border-bottom-color:#ebebeb}
[data-theme=polaris] .toast{background:var(--p-dark);border-radius:10px;box-shadow:0 8px 20px rgba(0,0,0,.25)}
[data-theme=polaris] .dialog{border-radius:16px;box-shadow:var(--p-modal-shadow)}
[data-theme=polaris] .dialog::backdrop,[data-theme=polaris] .mobile-menu-drawer::backdrop,[data-theme=polaris] .sidebar-backdrop{background:rgba(0,0,0,.45)}
[data-theme=polaris] .dialog-header{background:var(--p-surface-2);border-bottom-color:var(--p-border)}
[data-theme=polaris] .dialog-footer{background:var(--p-surface-2);border-top-color:var(--p-border)}
[data-theme=polaris] .dialog-close{background:transparent;color:var(--p-text-2)}
[data-theme=polaris] .dialog-close:hover{background:#e3e3e3}
[data-theme=polaris] .dialog-highlight,[data-theme=polaris] .dialog-total{background:var(--p-surface-2)}
[data-theme=polaris] .workspace-note{color:var(--p-text-2)}

/* ---------- Календарь ---------- */
[data-theme=polaris] .slot-click:hover{background:#f7f7f7}
[data-theme=polaris] .booking-block{background:#e9f7ef;border-color:#cdebd9;border-left-color:var(--p-success);color:var(--p-success-ink)}
[data-theme=polaris] .booking-block.purple{background:var(--p-magic-bg);border-color:#e4daff;border-left-color:var(--p-magic);color:var(--p-magic-ink)}
[data-theme=polaris] .booking-block.rose{background:#fee9e8;border-color:#fdcfcd;border-left-color:#e51c00;color:var(--p-critical-ink)}
[data-theme=polaris] .booking-block.cream{background:var(--p-warn-soft);border-color:#ffe58a;border-left-color:#b28400;color:var(--p-warn-ink)}
[data-theme=polaris] .booking-block:hover{box-shadow:0 3px 10px rgba(26,26,26,.15)}
[data-theme=polaris] .legend-dot{background:var(--p-success)}
[data-theme=polaris] .legend-dot.purple{background:var(--p-magic)}
[data-theme=polaris] .legend-dot.rose{background:#e51c00}
[data-theme=polaris] .legend-dot.cream{background:#b28400}

/* ---------- Домашний экран «Сегодня» ---------- */
[data-theme=polaris] .home-day-intro h1{font-family:var(--p-font);font-weight:700;font-size:32px;letter-spacing:-.03em}
[data-theme=polaris] .home-kicker{color:var(--p-muted)}
[data-theme=polaris] .patient-workspace .workspace-summary-card strong{font-family:var(--p-font);font-weight:700;letter-spacing:-.025em;color:var(--p-text)}
[data-theme=polaris] .patient-workspace .workspace-summary-card.selected{background:var(--p-surface-2);box-shadow:inset 0 -2px 0 #303030}
[data-theme=polaris] .patient-workspace .workspace-summary-card{border-right-color:var(--p-border)}
[data-theme=polaris] .patient-workspace .workspace-next-action{background:var(--p-warn-soft);color:var(--p-warn-ink)}
[data-theme=polaris] .patient-workspace .workspace-next-action strong{color:var(--p-warn-ink)}
[data-theme=polaris] .patient-workspace .workspace-visit-attention{border-left:3px solid #b28400}
[data-theme=polaris] .patient-workspace .workspace-check.ready{background:var(--p-success-bg);border-color:#a7e9c3;color:var(--p-success-ink)}
[data-theme=polaris] .patient-workspace .workspace-check.pending{background:var(--p-warn-soft);color:var(--p-warn-ink)}
[data-theme=polaris] .workspace-summary-card.selected,[data-theme=polaris] .workspace-summary-card:hover{border-color:#b5b5b5}
[data-theme=polaris] .wallet-balance{background:var(--p-surface-2);border-color:var(--p-border)}
[data-theme=polaris] .wallet-balance>span{color:var(--p-muted)}
[data-theme=polaris] .home-money{background:var(--p-dark);color:#fff;border-radius:12px;box-shadow:0 1px 0 rgba(0,0,0,.3)}
[data-theme=polaris] .home-money h2{color:#fff}
[data-theme=polaris] .home-money .home-kicker,[data-theme=polaris] .home-text-button{color:#36fba1}
[data-theme=polaris] .home-money-primary>span,[data-theme=polaris] .home-money-detail span,[data-theme=polaris] .home-money small,[data-theme=polaris] .home-money-updated,[data-theme=polaris] .home-money details,[data-theme=polaris] .home-provider-note,[data-theme=polaris] .home-mis-note{color:#b5b5b5}
[data-theme=polaris] .home-money-detail,[data-theme=polaris] .home-provider-note,[data-theme=polaris] .home-mis-note{border-color:var(--p-dark-line)}
[data-theme=polaris] .home-shift-dot{background:#36fba1}
[data-theme=polaris] .home-money-placeholder span{background:#303030}
[data-theme=polaris] .home-money-actions .button{background:#fff;color:var(--p-text);box-shadow:none}
[data-theme=polaris] .home-money-actions .button+.button{background:transparent;color:#fff;border:1px solid #4a4a4a}
[data-theme=polaris] .home-workspace-error{background:#fee9e8;border-color:#fdcfcd}

/* ---------- Вход и выбор демо ---------- */
[data-theme=polaris] .auth-page{background:var(--p-bg)}
[data-theme=polaris] .auth-story{background:var(--p-dark)}
[data-theme=polaris] .auth-story h1{color:#fff;font-weight:700;letter-spacing:-.035em}
[data-theme=polaris] .auth-story p,[data-theme=polaris] .auth-credit{color:#b5b5b5}
[data-theme=polaris] .auth-story .brand strong{color:#fff}
[data-theme=polaris] .auth-story .brand small{color:#9e9e9e}
[data-theme=polaris] .auth-art span{background:#29845a}
[data-theme=polaris] .auth-art span:nth-child(2){background:#8051ff}
[data-theme=polaris] .auth-art span:nth-child(3){background:#ffb800}
[data-theme=polaris] .auth-art span:nth-child(4){background:#005bd3}

/* ---------- Помощник, касса, шаги ---------- */
[data-theme=polaris] .assistant-hero{background:#fff;border-color:transparent;box-shadow:var(--p-card-shadow)}
[data-theme=polaris] .assistant-hero-mark{border-color:var(--p-border);color:var(--p-magic)}
[data-theme=polaris] .assistant-hero p,[data-theme=polaris] .assistant-capabilities span,[data-theme=polaris] .assistant-message,[data-theme=polaris] .assistant-confirm-note{color:var(--p-muted)}
[data-theme=polaris] .assistant-mode:hover{background:var(--p-surface-2);border-color:#b5b5b5}
[data-theme=polaris] .assistant-mode.active{background:var(--p-magic-bg);border-color:var(--p-magic)}
[data-theme=polaris] .assistant-empty>svg{background:var(--p-magic-bg);border-color:#e4daff;color:var(--p-magic)}
[data-theme=polaris] .closeout-status{background:var(--p-surface-2)}
[data-theme=polaris] .workflow-steps li[aria-current="step"]:before{background:#303030}
[data-theme=polaris] .onboarding-steps [aria-current=step] span{background:var(--p-success-bg);border-color:var(--p-success)}
[data-theme=polaris] .mobile-menu-links button{background:#fff;box-shadow:var(--p-btn-shadow);border-color:transparent}
[data-theme=polaris] .mobile-menu-links button.active{background:var(--p-surface-3);box-shadow:inset 0 0 0 1px #303030;color:var(--p-text)}
[data-theme=polaris] .mobile-menu-profile{background:var(--p-surface-2)}
[data-theme=polaris] .mobile-nav button.active{background:var(--p-surface-3);color:var(--p-text)}
[data-theme=polaris] .mobile-calendar-summary{border-color:var(--p-border)}
[data-theme=polaris] .mobile-calendar-summary span{color:var(--p-muted)}

/* ---------- Выбор темы в настройках ---------- */
.theme-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.theme-option{display:grid;gap:8px;text-align:left;padding:12px;border-radius:12px;border:1px solid var(--line);background:#fff;color:var(--ink);position:relative}
.theme-option[aria-pressed="true"]{border-color:#005bd3;box-shadow:0 0 0 1px #005bd3}
.theme-option strong{font-size:13px}
.theme-option small{color:var(--muted);font-size:12px;line-height:1.4}
.theme-swatches{display:flex;border-radius:8px;overflow:hidden;height:26px;border:1px solid rgba(0,0,0,.06)}
.theme-swatches i{flex:1}
.theme-option .theme-mark{position:absolute;top:8px;right:8px;font-size:12px;font-weight:650;padding:2px 7px;border-radius:8px;background:#cdfee1;color:#0c5132}

/* ---------- Телефон ---------- */
@media(max-width:820px){
 [data-theme=polaris] .topbar{height:auto;margin:0;border-radius:0;box-shadow:none}
 [data-theme=polaris] .sidebar{background:#ebebeb}
 [data-theme=polaris] .mobile-menu{color:#e3e3e3}
 [data-theme=polaris] .home-day-intro h1{font-size:26px}
}

/* ---------- Доступность (аудит 26.10.2026, приложение А) ---------- */
/* A11Y-06: «Перейти к содержимому» белым по #303030 (13.2:1), белая обводка внутри плашки. */
[data-theme=polaris] .skip-link{background:#303030;color:#fff;border-radius:8px;font-weight:600}
[data-theme=polaris] .skip-link:focus-visible{outline:2px solid #fff;outline-offset:-5px}
/* A11Y-07: на тёмной верхней панели кольцо фокуса белое (17.4:1 на #1a1a1a). */
[data-theme=polaris] .topbar button:focus-visible,[data-theme=polaris] .topbar a:focus-visible,[data-theme=polaris] .topbar input:focus-visible,[data-theme=polaris] .topbar select:focus-visible{outline-color:#fff}
/* A11Y-12: подписи часов календаря цветом подписей Polaris. */
[data-theme=polaris] .time-column{color:var(--p-muted)}
/* WP-4.3 (ADR 0116): цвет образца темы из data-vars (css-vars.mjs). */
.theme-swatches i{background:var(--swatch)}
