/* Кабинет психолога «Феникс» — локальная демонстрация.
   Визуальный язык основного сайта fenix-center.ru (references/main-site-*):
   brand-blue #304aa0, yellow #f4c52f, paper/canvas, Golos Text + Raleway,
   пилюли-кнопки, фокус :focus-visible жёлтым, tap-highlight прозрачный.
   Структура кабинета адаптирована из Headliner CRM (sidebar, журнал, KPI). */

@font-face{font-family:Golos;src:url('./assets/fonts/golostext-1.woff2') format('woff2');font-weight:400;font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Golos;src:url('./assets/fonts/golostext-3.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:Golos;src:url('./assets/fonts/golostext-5.woff2') format('woff2');font-weight:600 800;font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Golos;src:url('./assets/fonts/golostext-7.woff2') format('woff2');font-weight:600 800;font-display:swap}
@font-face{font-family:Raleway;src:url('./assets/fonts/raleway-11.woff2') format('woff2');font-weight:700;font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Raleway;src:url('./assets/fonts/raleway-14.woff2') format('woff2');font-weight:700;font-display:swap}

:root{
  --brand-blue:#304aa0;--brand-yellow:#ffcf54;--brand-orange:#ff7a1a;
  --navy:#1c2654;
  --ink:#272638;--muted:#6b6975;--paper:#ffffff;--canvas:#ffffff;
  --line:#dedad0;--white:#fff;--success:#1a6b49;--danger:#95392b;
  --radius:18px;--radius-small:12px;--shell:min(100% - 32px,1240px);
  color:var(--ink);font-family:Golos,system-ui,-apple-system,sans-serif;font-synthesis:none;background:var(--canvas);
}
/* Перекрываем глобальный сброс builder.css (он подключён до этого файла).
   Канвас и карточки — белые, тонированными остаются только акценты. */
body{margin:0;background:#fff;color:var(--ink);font-family:Golos,system-ui,-apple-system,sans-serif;font-size:15px;line-height:1.5;-webkit-tap-highlight-color:transparent}
*{box-sizing:border-box}body{margin:0}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
a{color:inherit}
h1,h2,h3,p,dl,dd{margin:0}
h1,h2,h3{font-family:Raleway,Golos,sans-serif;line-height:1.08;letter-spacing:-.03em}
h1{font-size:clamp(24px,3vw,34px)}
h2{font-size:clamp(20px,2.4vw,26px)}
h3{font-size:17px}p{line-height:1.6}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;flex-shrink:0}
button{cursor:pointer}button:disabled{cursor:default}
:focus{outline:none}
:focus-visible{outline:3px solid var(--brand-yellow);outline-offset:3px}
/* Поля ввода: Chromium считает textarea/input focus-visible даже после мыши —
   для полей индикатором служит фирменная рамка, без outline/box-shadow.
   Кнопки и ссылки сохраняют жёлтый индикатор по Tab (:focus-visible). */
textarea:focus-visible,input:focus-visible,select:focus-visible{outline:none}
input:focus,textarea:focus,select:focus{border-color:var(--brand-blue)}
.field input:focus-visible,.field textarea:focus-visible,.field select:focus-visible{border-color:var(--brand-blue);outline:none}
img{display:block;max-width:100%}
code{font-size:.85em;background:#eee9dd;border-radius:6px;padding:2px 6px}

/* Лента демо: одна компактная строка */
.demo-ribbon{margin:0;padding:6px max(16px,calc((100vw - 1240px)/2));background:#fdf6dc;border-bottom:1px solid #eadfc0;color:#6b5a33;font-size:11.5px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ---- Оболочка кабинета (по AppShell/Sidebar из Headliner, светлая) ---- */
.crm{display:grid;grid-template-columns:236px minmax(0,1fr);min-height:calc(100vh - 34px)}
.crm-side{background:var(--paper);border-right:1px solid var(--line);display:flex;flex-direction:column;position:sticky;top:0;height:calc(100vh - 34px);overflow-y:auto}
.side-brand{display:flex;align-items:center;gap:10px;padding:16px 16px 14px;border-bottom:1px solid var(--line);text-decoration:none}
.side-brand img{width:44px;height:44px;border-radius:11px;object-fit:cover;flex:0 0 44px}
.side-brand strong{display:block;font:700 19px/1 Raleway,sans-serif}
.side-brand small{display:block;margin-top:4px;color:var(--muted);font-size:11px;line-height:1.2}
.side-nav{flex:1;display:flex;flex-direction:column;gap:2px;padding:10px}
.side-nav a{display:flex;align-items:center;gap:11px;min-height:44px;padding:10px 12px;border-radius:var(--radius-small);text-decoration:none;font-size:14px;color:var(--muted)}
.side-nav a svg{color:var(--brand-blue);opacity:.75}
.side-nav a:hover{background:#f2f4fb;color:var(--ink)}
.side-nav a[aria-current=page]{background:#e7ebf8;color:var(--brand-blue);font-weight:600}
.side-note{padding:12px 16px;border-top:1px solid var(--line);color:var(--muted);font-size:11px;line-height:1.5}
.crm-main{display:flex;flex-direction:column;min-width:0}

/* Шапка кабинета — navy основного сайта */
.crm-top{position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 22px;background:var(--navy);color:var(--white);flex-wrap:wrap}
.crm-top .who{display:flex;align-items:center;gap:10px;min-width:0}
.crm-top .who .avatar{width:34px;height:34px;border-radius:50%;font-size:13px;flex:0 0 34px}
.crm-top .who b{font-size:14.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crm-top .who small{display:block;color:rgba(255,255,255,.72);font-size:11px}
.crm-top .top-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.link-quiet{display:inline-flex;align-items:center;min-height:40px;padding:8px 13px;border:1px solid rgba(255,255,255,.35);border-radius:999px;background:transparent;color:#fff;font-size:12.5px;font-weight:500;text-decoration:none}
.link-quiet:hover{background:rgba(255,255,255,.12)}
.crm-body{flex:1;padding:24px 22px 56px;width:var(--shell);max-width:100%;margin:0 auto}

/* Мобильная навигация кабинета */
.crm-tabs{display:none}

/* ---- Кнопки основного сайта ---- */
.button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:48px;width:fit-content;padding:0 20px;border:1px solid var(--brand-blue);border-radius:999px;background:var(--brand-blue);color:var(--white);font-weight:600;font-size:14px;line-height:1.15;text-align:center;text-decoration:none;transition:transform .16s,background-color .16s,border-color .16s}
.button svg{width:18px;height:18px}
.button:hover{background:#3f57bd;border-color:#3f57bd}
.button:active{transform:translateY(1px)}
.button-blue{background:var(--brand-blue);border-color:var(--brand-blue)}
.button-light{background:var(--white);border-color:var(--white);color:var(--brand-blue)}
.button-light:hover{background:var(--brand-yellow);border-color:var(--brand-yellow);color:var(--ink)}
.button-yellow{background:var(--brand-yellow);border-color:var(--brand-yellow);color:var(--ink)}
.button-yellow:hover{background:#ffd84d;border-color:#ffd84d}
.button-outline{background:transparent;border-color:#b9b3a4;color:var(--ink)}
.button-outline:hover{border-color:var(--brand-blue);background:var(--paper);color:var(--brand-blue)}
.button-ghost{background:transparent;border-color:transparent;color:var(--muted);font-weight:500}
.button-ghost:hover{color:var(--ink);background:#eeeae0}
.button-danger{background:transparent;border-color:#dcb6ac;color:var(--danger)}
.button-danger:hover{background:#faf0ec;border-color:var(--danger)}
.button.small{min-height:40px;padding:0 14px;font-size:12.5px}
.button[disabled]{opacity:.45}
.button-wide{width:100%}
.row-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

/* ---- Селект в стиле page-filter основного сайта ---- */
.field{display:grid;min-width:0;gap:7px}
.field>label,.field>span.fl{color:var(--ink);font-size:12.5px;font-weight:600}
.field input,.field textarea{width:100%;min-height:48px;padding:12px 14px;border:1px solid #aaa6b1;border-radius:var(--radius-small);background:var(--paper);color:var(--ink);font-size:14px}
.field input:hover,.field textarea:hover{border-color:var(--brand-blue)}
.field textarea{min-height:96px;resize:vertical;line-height:1.5}
.field .field-error{color:var(--danger);font-size:12px}
.field input[aria-invalid=true]{border-color:#d08a7c}
.sel{position:relative;display:grid;gap:7px}
.sel-label{color:var(--ink);font-size:12.5px;font-weight:600}
.sel-trigger{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:48px;padding:12px 14px;border:1px solid #aaa6b1;border-radius:var(--radius-small);background:var(--paper);color:var(--ink);font-size:14px;text-align:left}
.sel-trigger:hover{border-color:var(--brand-blue)}
.sel-trigger .sel-value{display:flex;align-items:center;gap:8px;min-width:0}
.sel-trigger .sel-value b{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sel-trigger .sel-value small{display:block;color:var(--muted);font-size:11.5px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sel-trigger .sel-chev{flex-shrink:0;transition:transform .15s}
.sel-trigger[aria-expanded=true] .sel-chev{transform:rotate(180deg)}
.sel-menu{position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:60;background:var(--white);border:1px solid var(--line);border-radius:var(--radius-small);box-shadow:0 14px 34px rgba(39,38,56,.16);padding:6px;display:none}
.sel.open .sel-menu{display:block}
.sel-link{display:block}
.sel-link .sel-menu{left:auto;right:0;min-width:264px}
.sel-trigger.as-link{min-height:40px;padding:8px 13px;border:1px solid rgba(255,255,255,.35);border-radius:999px;background:transparent;color:#fff;font-size:12.5px;font-weight:500}
.sel-trigger.as-link:hover{background:rgba(255,255,255,.12)}
.sel-trigger.as-link:focus-visible{outline-color:var(--brand-yellow);border-color:transparent}
.sel-menu .sel-head{padding:8px 11px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.06em;border-bottom:1px solid var(--line);margin:-6px -6px 4px}
.sel-opt{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:44px;padding:9px 11px;border:0;border-radius:9px;background:transparent;color:var(--ink);font-size:13.5px;text-align:left}
.sel-opt:hover{background:#f2f4fb}
.sel-opt .sel-opt-sub{display:block;color:var(--muted);font-size:11.5px;line-height:1.35;margin-top:2px}
.sel-opt .sel-dot{width:7px;height:7px;border-radius:50%;background:transparent;flex-shrink:0}
.sel-opt[aria-selected=true]{color:var(--brand-blue);font-weight:600}
.sel-opt[aria-selected=true] .sel-dot{background:var(--brand-blue)}

/* ---- Журнал (BarberWeekJournal → светлая сетка) ---- */
/* Ось времени: спейсер ровно высоты заголовка дня, метки привязаны к нулю canvas */
.wg-time{border-right:1px solid var(--line);background:#faf8f2;display:flex;flex-direction:column}
.wg-time .wg-time-head{height:52px;flex-shrink:0}
.wg-time .wg-hour{height:56px;display:flex;align-items:flex-start;justify-content:flex-end;padding:2px 8px 0 0;color:var(--muted);font-size:10.5px}
.week-grid{display:grid;grid-template-columns:54px repeat(7,minmax(128px,1fr));min-width:980px}
.wg-day{border-right:1px solid var(--line);position:relative;display:flex;flex-direction:column}
.wg-day:last-child{border-right:0}
.wg-day-head{display:flex;align-items:center;justify-content:space-between;gap:6px;height:52px;box-sizing:border-box;padding:8px 10px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--paper);z-index:5}
.journal-head .sub{color:var(--muted);font-size:13px;margin-top:4px}
.week-nav{display:flex;align-items:center;gap:6px}
.week-nav .icon-btn{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border:1px solid var(--line);border-radius:50%;background:var(--paper);color:var(--ink)}
.week-nav .icon-btn:hover{border-color:var(--brand-blue);color:var(--brand-blue)}
.week-nav .week-label{display:inline-flex;align-items:center;min-height:42px;padding:0 14px;border:1px solid var(--line);border-radius:999px;background:var(--paper);font-size:12.5px;font-weight:600;white-space:nowrap}
.view-toggle{display:inline-flex;border:1px solid var(--line);border-radius:999px;background:var(--paper);padding:3px}
.view-toggle button{display:inline-flex;align-items:center;min-height:36px;padding:0 14px;border:0;border-radius:999px;background:transparent;color:var(--muted);font-size:12.5px;font-weight:600}
.view-toggle button[aria-pressed=true]{background:var(--brand-blue);color:#fff}
.kpi-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px}
.kpi{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:15px 17px}
.kpi .kpi-label{display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:11px;font-weight:600;letter-spacing:.07em;text-transform:uppercase}
.kpi .kpi-label svg{color:var(--brand-blue);opacity:.7}
.kpi .kpi-value{font:700 26px/1.1 Raleway,sans-serif;letter-spacing:-.02em;margin-top:8px}
.kpi .kpi-hint{color:var(--muted);font-size:12px;margin-top:5px}
.journal-card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.journal-scroll{overflow-x:auto}
.journal-scroll{max-height:620px;max-height:min(65vh,620px);overflow:auto;overscroll-behavior:contain;isolation:isolate}
.journal-scroll .wg-day-head,.journal-scroll .wg-time-head{position:sticky;top:0;z-index:3;background:#fff}
.journal-scroll .wg-time{position:sticky;left:0;z-index:4;background:#faf9f5}
.wg-day-head .wd-name{font-size:12px;font-weight:600}
.wg-day-head .wd-date{color:var(--muted);font-size:11px;margin-top:1px}
.wg-day-head .wd-dot{width:8px;height:8px;border-radius:50%;background:#e3ded2;flex-shrink:0}
.wg-day-head.is-today .wd-name{color:var(--brand-blue)}
.wg-day-head.is-work .wd-dot{background:var(--brand-blue)}
.wg-canvas{position:relative}
.wg-hours{position:absolute;left:0;right:0;background:#fdf6dc;border-top:1px solid #ecd9a0;border-bottom:1px solid #ecd9a0}
.wg-busy{position:absolute;left:0;right:0;background:repeating-linear-gradient(45deg,#eee9dd,#eee9dd 7px,#e6e0d0 7px,#e6e0d0 14px);border-radius:6px;overflow:hidden}
.wg-busy span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:4px 8px;color:#7a7361;font-size:10.5px;text-align:center;line-height:1.3}
.wg-meet{position:absolute;left:4px;right:4px;border:1px solid #c9d3ef;border-left:4px solid var(--brand-blue);border-radius:9px;background:var(--white);padding:6px 9px;text-align:left;overflow:hidden;transition:border-color .15s}
.wg-meet:hover{border-color:var(--brand-blue)}
.wg-meet[aria-pressed=true]{border-color:var(--brand-blue);box-shadow:0 0 0 2px rgba(48,74,160,.25)}
.wg-meet .wm-time{display:flex;align-items:center;gap:5px;color:var(--muted);font-size:10.5px}
.wg-meet .wm-time svg{width:12px;height:12px}
.wg-meet .wm-client{font-size:12.5px;font-weight:600;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wg-meet .wm-service{color:var(--muted);font-size:11px;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wg-meet.paid{border-left-color:var(--success)}
.wg-meet.paid .wm-service::after{content:" · оплачено";color:var(--success)}
.meet-detail{margin-top:14px}
.journal-empty{padding:34px 22px;text-align:center;color:var(--muted);font-size:13.5px}
.day-list{display:grid;gap:9px;padding:10px}
.day-item{display:flex;align-items:center;gap:14px;padding:12px 14px;border:1px solid var(--line);border-radius:var(--radius-small);background:var(--white);text-align:left;width:100%}
.day-item .di-time{flex:0 0 56px;text-align:center}
.day-item .di-time b{display:block;font:700 17px/1.1 Raleway,sans-serif;color:var(--brand-blue)}
.day-item .di-time small{color:var(--muted);font-size:10.5px}
.day-item .di-main{flex:1;min-width:0}
.day-item .di-main b{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.day-item .di-main span{display:block;color:var(--muted);font-size:12px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.day-item .di-right{display:grid;gap:6px;justify-items:end;flex-shrink:0}
.hours-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:14px;padding:14px 16px;border:1px solid var(--line);border-radius:var(--radius);background:#faf8f2}
.hours-banner p{color:var(--muted);font-size:13px}

/* ---- Общие карточки/панели ---- */
.panel-card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:22px}
.panel-card h3{margin-bottom:6px}
.hint{color:var(--muted);font-size:13px;line-height:1.55;margin-bottom:14px}
.panel{display:grid;gap:16px}
.page-head{margin-bottom:18px}
.page-head .sub{color:var(--muted);font-size:13.5px;margin-top:6px;max-width:70ch}
.empty{padding:34px;border:1px solid var(--line);border-radius:var(--radius);background:var(--paper);text-align:center}
.empty h2{font-size:20px}
.empty p{color:var(--muted);margin:10px auto 16px;max-width:52ch;font-size:13.5px}
.notice{padding:15px 17px;border-radius:var(--radius-small);font-size:13.5px;line-height:1.55;margin:0 0 16px}
.notice.calm{background:#eef4ec;border:1px solid #cfe0cc;color:#33543c}
.notice.error{background:#fdf0ec;border:1px solid #ecc5ba;color:var(--danger)}
.status-chip{display:inline-flex;align-items:center;min-height:26px;padding:3px 11px;border-radius:999px;font-size:11.5px;font-weight:600;line-height:1.4}
.status-chip.ok{background:#e7f2ea;color:#2e6b46}
.status-chip.wait{background:#fdf3d7;color:#7a5d1d}
.status-chip.mut{background:#f0f0ea;color:var(--muted)}
.chip{display:inline-block;padding:5px 9px;border-radius:8px;font-size:11px;background:#eef1fa;color:#38498f;line-height:1.4}
.avatar{display:flex;align-items:center;justify-content:center;aspect-ratio:1/1;width:100%;font:700 clamp(26px,3vw,44px)/1 Raleway,Golos,sans-serif;color:#fff;letter-spacing:.02em}
img.avatar{object-fit:cover}
.form-grid{display:grid;gap:14px}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.form-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:4px}

/* Фото профиля */
.photo-field{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.photo-field .avatar{width:88px;height:88px;border-radius:16px;font-size:24px;flex:0 0 88px}
.photo-side{display:grid;gap:8px;justify-items:start}
.file-btn{position:relative;display:inline-flex;align-items:center;gap:9px;min-height:44px;padding:0 16px;border:1px solid #b9b3a4;border-radius:999px;background:var(--paper);color:var(--ink);font-size:12.5px;font-weight:600;cursor:pointer}
.file-btn:hover{border-color:var(--brand-blue);color:var(--brand-blue)}
.file-btn input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.file-note{color:var(--muted);font-size:11.5px}

/* Услуги: название и длительность отдельными строками */
.service-row{display:grid;grid-template-columns:minmax(0,1fr) 150px 130px auto;gap:12px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:var(--radius-small);background:var(--white)}
.service-row .field{gap:5px}
.service-list{display:grid;gap:11px}
.price{font-size:15px;font-weight:600;white-space:nowrap}

/* Часы работы */
.wd-row{border:1px solid var(--line);border-radius:var(--radius-small);background:var(--white);padding:12px 14px;display:grid;gap:10px}
.wd-row .wd-title{display:flex;align-items:center;justify-content:space-between;gap:10px}
.wd-row .wd-title b{font-size:14px}
.slot-lines{display:grid;gap:8px}
.slot-line{display:flex;align-items:center;gap:9px;flex-wrap:wrap;min-height:44px}
.slot-line input[type=time]{border:1px solid #aaa6b1;border-radius:9px;min-height:40px;padding:6px 9px;font-size:14px;background:var(--paper)}
.slot-line .fmt-group{display:flex;gap:12px;align-items:center;font-size:13px;color:var(--muted);flex-wrap:wrap}
.slot-line .fmt-group label{display:inline-flex;align-items:center;gap:6px;min-height:32px;cursor:pointer}
.dash-sep{color:var(--muted)}

/* Клиенты */
.client-list{display:grid;gap:10px}
.client-row{display:flex;align-items:center;gap:13px;width:100%;text-align:left;padding:13px 15px;border:1px solid var(--line);border-radius:var(--radius-small);background:var(--white)}
.client-row:hover{border-color:var(--brand-blue)}
.client-row .avatar{width:44px;height:44px;border-radius:50%;font-size:16px;flex:0 0 44px}
.client-row .cr-main{flex:1;min-width:0}
.client-row .cr-main b{display:block;font-size:14.5px}
.client-row .cr-main span{display:block;color:var(--muted);font-size:12px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.client-row .cr-stats{text-align:right;flex-shrink:0;color:var(--muted);font-size:11.5px;line-height:1.5}
.client-row .cr-stats b{color:var(--ink);font-size:13px}
.client-card{display:grid;gap:16px}
.client-card .cc-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.client-card .cc-head .avatar{width:56px;height:56px;border-radius:50%;font-size:20px;flex:0 0 56px}
.cc-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.cc-stats>div{border:1px solid var(--line);border-radius:var(--radius-small);background:var(--white);padding:12px;text-align:center}
.cc-stats small{display:block;color:var(--muted);font-size:10.5px;text-transform:uppercase;letter-spacing:.05em}
.cc-stats b{display:block;font-size:16px;margin-top:4px}
.cc-history{display:grid;gap:8px}
.cc-history .h-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 13px;border:1px solid var(--line);border-radius:var(--radius-small);background:var(--white);font-size:13px}
.cc-history .h-row span{color:var(--muted);font-size:12px}
.cc-history .h-row .price{font-size:13.5px}

/* Доходы */
.income-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.income-events{display:grid;gap:9px}
.income-event{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 15px;border:1px solid var(--line);border-radius:var(--radius-small);background:var(--white);font-size:13.5px}
.income-event span{color:var(--muted);font-size:12px;display:block;margin-top:2px}
.week-bars{display:grid;grid-template-columns:repeat(auto-fit,minmax(64px,1fr));gap:8px;align-items:end;margin-top:6px}
.week-bar{display:grid;gap:6px;justify-items:center}
.week-bar .bar{width:100%;max-width:56px;background:var(--brand-blue);border-radius:7px 7px 3px 3px;min-height:4px}
.week-bar .bar.zero{background:#e3ded2}
.week-bar small{color:var(--muted);font-size:10.5px;text-align:center;line-height:1.3}

/* Подписка */
.sub-card{border:1px solid #e8dfd0;background:#fffdf6;border-radius:var(--radius);padding:20px}
.sub-price{font:700 26px/1.2 Raleway,sans-serif}
.sub-price small{font:500 13px Golos,sans-serif;color:var(--muted)}
.sub-rows{display:grid;gap:8px;margin:14px 0;font-size:13.5px}
.sub-rows div{display:flex;gap:10px;align-items:baseline}
.sub-rows strong{min-width:120px;font-weight:600}
.pending-item{display:grid;gap:6px;padding:13px 15px;border:1px dashed #d9c89b;border-radius:var(--radius-small);background:#fffdf4;font-size:13px}
.pending-item .pi-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}

/* ---- Записи (список) ---- */
.booking-list{display:grid;gap:12px}
.booking-item{display:grid;gap:10px;padding:16px 18px;border:1px solid var(--line);border-radius:var(--radius-small);background:var(--white)}
.booking-item .bi-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.booking-item .bi-title{font-weight:600;font-size:15px}
.booking-item .bi-meta{display:flex;gap:6px 16px;flex-wrap:wrap;color:var(--muted);font-size:12.5px}
.booking-item .bi-meta span{display:inline-flex;align-items:center;gap:6px}
.booking-item .bi-meta svg{width:15px;height:15px;color:var(--brand-blue)}
.booking-item .row-actions{justify-content:space-between}

/* ---- Публичная клиентская оболочка (личный сайт специалиста) ---- */
/* Фон задаётся из дизайна применённой страницы (app.js), кабинет остаётся белым */
.visitor-shell{width:min(100% - 24px,920px);margin:0 auto;padding:18px 0 0}
.pb-personal{max-width:100%;margin:0}
.pub-footer{width:min(100% - 24px,920px);margin:0 auto;padding:14px 0 22px;display:flex;justify-content:space-between;align-items:center;gap:10px 18px;flex-wrap:wrap;font-size:12px}
.pub-footer .pub-note{opacity:.8}
.pub-footer .pub-right{display:flex;align-items:center;gap:8px 18px;flex-wrap:wrap}
.pub-footer .pub-brand{opacity:.85;text-underline-offset:3px}
.pub-footer .pub-brand:hover{opacity:1}
.pub-footer .pub-operator{padding:7px 13px;border:1px solid currentColor;border-radius:999px;opacity:.75;font-weight:600}
.pub-footer .pub-operator:hover{opacity:1}
.personal-head{display:flex;gap:22px;align-items:flex-start;flex-wrap:wrap;margin-bottom:22px}
.personal-head .ph-main{flex:1;min-width:240px}
.personal-head .ph-main .sub{color:var(--muted);font-size:13.5px;margin-top:6px}
.future-address{display:inline-flex;align-items:center;gap:8px;margin-top:12px;padding:8px 13px;border:1px dashed #d9c89b;background:#fffdf4;border-radius:11px;font-size:12.5px;color:#6b5a33}
.socials{display:flex;gap:8px 16px;flex-wrap:wrap;margin-top:12px}
.socials a{color:var(--brand-blue);font-size:13.5px;text-underline-offset:4px}
.personal-section{padding-top:20px;margin-top:20px;border-top:1px solid var(--line)}
.personal-section h2{font-size:20px;margin-bottom:12px}
.service-choice{display:grid;gap:3px}
.service-choice b{font-size:14.5px}
.service-choice span{color:var(--muted);font-size:12.5px}
.booking-card{max-width:760px;margin:0 auto;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:28px}
.step{padding:20px 0;border-top:1px solid var(--line)}
.step:first-of-type{border-top:0;padding-top:4px}
.step-heading{display:flex;align-items:center;gap:11px;margin-bottom:13px}
.step-heading .step-no{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:#e7ebf8;color:var(--brand-blue);font-weight:700;font-size:14px;flex-shrink:0}
.step-heading h2{font-size:17.5px}
.step-sub{color:var(--muted);font-size:12.5px;line-height:1.5;margin-bottom:13px}
.choice-list{display:grid;gap:10px}
.choice{display:flex;align-items:center;justify-content:space-between;gap:13px;width:100%;text-align:left;padding:14px 16px;border:1px solid var(--line);border-radius:var(--radius-small);background:var(--white)}
.choice:hover{border-color:var(--brand-blue)}
.choice[aria-pressed=true]{border-color:var(--brand-blue);background:#f4f6fd}
.choice .choice-lines{display:grid;gap:3px;min-width:0;flex:1}
.choice .choice-lines b{font-size:14.5px}
.choice .choice-lines span{color:var(--muted);font-size:12.5px;line-height:1.4}
.day-strip{display:flex;gap:8px;overflow-x:auto;padding-bottom:6px}
.day-chip{flex-shrink:0;display:grid;place-items:center;gap:1px;min-width:72px;min-height:62px;padding:8px 10px;border:1px solid var(--line);border-radius:var(--radius-small);background:var(--white);font-size:11.5px;line-height:1.3}
.day-chip strong{font-size:15px}
.day-chip[aria-pressed=true]{border-color:var(--brand-blue);background:#f4f6fd;color:var(--brand-blue)}
.day-chip[disabled]{opacity:.45}
.time-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:9px}
.time-btn{min-height:46px;border:1px solid var(--line);border-radius:var(--radius-small);background:var(--white);font-size:14px;font-weight:600}
.time-btn:hover{border-color:var(--brand-blue)}
.time-btn[aria-pressed=true]{border-color:var(--brand-blue);background:var(--brand-blue);color:#fff}
.cabinet-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.cabinet-card{display:grid;grid-template-rows:auto 1fr;border:1px solid var(--line);border-radius:var(--radius-small);overflow:hidden;background:var(--white);text-align:left;padding:0}
.cabinet-card:hover{border-color:var(--brand-blue)}
.cabinet-card[aria-pressed=true]{border-color:var(--brand-blue);box-shadow:0 0 0 2px rgba(48,74,160,.25)}
.cabinet-photo{width:100%;aspect-ratio:16/10;object-fit:cover;background:#eeeae0}
.cabinet-art{width:100%;aspect-ratio:16/10;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#e8edfa,#f6f0e2);color:#8b93a8}
.cabinet-art svg{width:42px;height:42px}
.cabinet-body{padding:12px 14px;display:grid;gap:6px}
.cabinet-body strong{font-size:14.5px}
.cabinet-body p{font-size:12px;color:var(--muted);line-height:1.4}
.pref-badge{justify-self:start;display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border-radius:8px;background:#fdf3d7;color:#7a5d1d;font-size:10.5px;font-weight:600}
.pref-badge svg{width:12px;height:12px}
.summary-box{display:grid;gap:8px;background:#f4f6fd;border-radius:var(--radius-small);padding:15px 17px;margin:16px 0;font-size:13.5px}
.summary-box>div{display:flex;align-items:center;gap:10px;justify-content:space-between;flex-wrap:wrap}
.summary-box span{color:var(--muted)}
.success-card{max-width:640px;margin:0 auto;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:28px;text-align:center}
.success-icon{width:62px;height:62px;margin:0 auto 16px;border-radius:50%;background:#e7f2ea;color:#2e6b46;display:flex;align-items:center;justify-content:center}
.success-icon svg{width:28px;height:28px;stroke-width:2.2}
.success-card .summary-box{text-align:left}
.back-link{display:inline-flex;align-items:center;gap:8px;margin-bottom:18px;text-decoration:none;font-size:13.5px;color:var(--brand-blue)}
.back-link svg{width:17px;height:17px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---- Встроенный конструктор и страница PageBlocks (хост-контекст) ---- */
/* Тулбар редактора: не залипает под шапкой; на узких экранах — максимум
   две компактные строки (режимы+undo / назад), без горизонтального скролла */
.pb-host .editor-toolbar{position:static;flex-wrap:wrap;gap:6px;padding:8px 12px}
.pb-host .editor-toolbar .spacer{flex:1 0 auto;min-width:12px}
@media(max-width:480px){
  /* Режимы — на всю первую строку, undo и «Назад» — второй: ровно две строки */
  .pb-host .editor-toolbar .mode-switch{flex:1 1 100%}
  .pb-host .editor-toolbar .mode-switch .btn{flex:1}
  .pb-host .editor-toolbar .btn{min-height:42px;height:42px;font-size:12.5px;padding:6px 10px}
  .pb-host .editor-toolbar .spacer{display:none}
}
.pb-host{padding-bottom:6px}
/* Короткие подписи и одна строка шапки на узких экранах */
.sh{display:none}
@media(max-width:430px){
  .sh{display:inline}
  .lg{display:none}
  .crm-top{flex-wrap:nowrap;padding:8px 12px;gap:8px}
  /* Имя в шапке дублируется триггером демо-профиля справа: на узких экранах
     у аватара остаётся только аватар — перекрытий с соседями нет, доступ
     к клиентскому виду и выбору профиля сохранён. */
  .crm-top .who{min-width:0;flex:0 0 auto}
  .crm-top .who .avatar{width:30px;height:30px;flex:0 0 30px;font-size:12px}
  .crm-top .who b{display:none}
  .crm-top .who span{min-width:0}
  .crm-top .top-actions{flex:1 1 auto;min-width:0;flex-wrap:nowrap;gap:6px;justify-content:flex-end}
  .crm-top .button.small{min-height:38px;padding:0 11px;font-size:12px;gap:6px}
  .crm-top .button.small svg{width:16px;height:16px}
  .crm-top .sel{min-width:0;flex:0 1 auto}
  .crm-top .sel-trigger.as-link{min-height:38px;max-width:150px;padding:7px 11px;font-size:12px}
  .crm-top .sel-trigger.as-link .sel-value{min-width:0}
  .crm-top .sel-trigger.as-link .sel-value b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .crm-top .sel-trigger.as-link .sel-value small{display:none}
}

/* Футер демо */
.demo-footer{border-top:1px solid var(--line);background:var(--paper);padding:18px 22px;display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;color:var(--muted);font-size:12px}
.demo-footer .row-actions{gap:14px}

/* ---- Адаптив: матрица 360/390/768/1024/1200/1280/1440 ---- */
@media(max-width:1023px){
  .crm{grid-template-columns:1fr}
  .crm-side{display:none}
  .crm-body{padding:18px 16px 92px}
  .crm-tabs{display:flex;gap:6px;overflow-x:auto;position:fixed;left:0;right:0;bottom:0;z-index:40;background:var(--paper);border-top:1px solid var(--line);padding:8px 12px calc(8px + env(safe-area-inset-bottom));scrollbar-width:none}
  .crm-tabs::-webkit-scrollbar{display:none}
  .crm-tabs a{display:inline-flex;align-items:center;gap:7px;flex-shrink:0;min-height:44px;padding:8px 14px;border-radius:999px;background:transparent;color:var(--muted);text-decoration:none;font-size:12.5px;font-weight:600}
  .crm-tabs a svg{width:17px;height:17px}
  .crm-tabs a[aria-current=page]{background:#e7ebf8;color:var(--brand-blue)}
  .kpi-row{grid-template-columns:1fr}
  .service-row{grid-template-columns:1fr 1fr}
  .service-row .field:first-child{grid-column:1/-1}
}
@media(min-width:768px) and (max-width:1023px){
  .kpi-row{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:767px){
  .journal-head{align-items:stretch;flex-direction:column}
  .view-toggle{align-self:flex-start}
  .form-row{grid-template-columns:1fr}
  .cabinet-grid{grid-template-columns:1fr}
  .personal-head .avatar{width:104px;height:104px;flex-basis:104px;font-size:32px}
  .booking-card,.success-card{padding:22px 18px}
  .cc-stats{grid-template-columns:1fr}
  .income-row{grid-template-columns:1fr}
  .day-item{flex-wrap:wrap}
  .day-item .di-right{flex-direction:row;align-items:center;gap:10px}
  .crm-top{padding:10px 14px}
  .crm-top .who small{display:none}
}
@media(max-width:420px){
  .demo-ribbon{font-size:11.5px}
  .link-quiet span.lg{display:none}
  .time-grid{grid-template-columns:repeat(3,1fr)}
  .personal-head .avatar{width:88px;height:88px;flex-basis:88px;font-size:27px}
}

/* Night UX: GLM navigation proposal integrated by owner; no bottom polling UI. */
.crm-mnav-toggle{display:none}
.crm-mnav{display:none;flex-direction:column;gap:2px;padding:10px;border:1px solid var(--line);border-radius:var(--radius-small);margin-bottom:16px;background:var(--paper)}
.crm-mnav a{display:flex;align-items:center;gap:11px;min-height:44px;padding:10px 12px;border-radius:9px;text-decoration:none;font-size:14px;color:var(--muted)}
.crm-mnav a[aria-current=page]{background:#e7ebf8;color:var(--brand-blue);font-weight:600}
@media(max-width:1023px){
  .crm-tabs{display:none}
  .crm-body{padding-bottom:40px}
  .crm-mnav:not([hidden]){display:flex}
  .crm-mnav-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 14px;border:1px solid rgba(255,255,255,.35);border-radius:999px;background:transparent;color:#fff;font-size:13px;font-weight:600}
  .crm-mnav-toggle svg{width:18px;height:18px}
  .crm-top .button.small,.crm-top .sel-trigger.as-link{min-height:44px}
}
@media(max-width:430px){
  .crm-top{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px 10px;padding:10px 12px}
  .crm-top .crm-mnav-toggle{grid-row:1;grid-column:1;justify-self:start}
  .crm-top .who{grid-row:1;grid-column:2;min-width:0;flex-wrap:nowrap}
  .crm-top .who b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  .crm-top .who small{display:block}
  .crm-top .who .avatar{width:34px;height:34px;flex:0 0 34px;font-size:13px}
  .crm-top .top-actions{grid-row:2;grid-column:1/-1;display:flex;flex-wrap:nowrap;align-items:center;gap:8px;justify-content:flex-start;min-width:0}
  .crm-top .button.small{min-height:44px;padding:0 14px;font-size:12.5px;gap:7px}
  .crm-top .button.small svg{width:18px;height:18px}
  .crm-top .sel{min-width:0;flex:1 1 auto}
  .crm-top .sel-trigger.as-link{min-height:44px;max-width:none;padding:8px 13px;font-size:12.5px}
  .crm-top .sel-trigger.as-link .sel-value small{display:block}
}

@media(max-width:768px){
  .pb-host .editor-toolbar .btn{min-height:44px;height:auto}
  .pb-host .sec-actions .btn{min-height:44px}
}

/* Working hours: choose one day, edit safely, see the entire week. */
.hours-day-tabs{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin:20px 0}
.hours-day{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;min-height:64px;padding:10px 4px;background:#fff;border:1px solid var(--line);border-radius:12px;color:var(--ink);cursor:pointer}
.hours-day[aria-pressed=true]{background:var(--navy);border-color:var(--navy);color:white}
.hours-day small{font-size:11px}
.hours-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr);gap:20px;align-items:start}
.hours-editor{min-width:0}
.hours-editor .wd-row{border:0;padding:0;background:transparent}
.hours-draft-note{font-size:13px;color:var(--muted);margin:0 0 20px}
.hours-draft-note.is-dirty{padding:12px;background:#fff7da;border-radius:10px;color:#725016}
.hours-day-status{display:block;font-size:12px;color:var(--muted);margin-top:6px}
.button:disabled{opacity:.48;cursor:default;transform:none}
.hours-editor .wd-title{display:flex;align-items:center;justify-content:space-between;gap:12px}
.hours-editor .wd-title h2{margin:0;font-size:23px}
.hours-editor .slot-line{display:grid;grid-template-columns:minmax(0,1fr) 16px minmax(0,1fr) 44px;gap:8px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:12px;margin:12px 0;background:#fff}
.hours-editor .slot-line>button{grid-column:4;grid-row:1;min-width:44px;min-height:44px;padding:8px}
.hours-time{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:12px;color:var(--muted)}
.hours-time input{width:100%;min-width:0;min-height:44px}
.hours-editor .dash-sep{align-self:end;padding-bottom:13px}
.hours-editor .fmt-group{grid-column:1/-1;grid-row:2;display:flex;flex-wrap:wrap;gap:12px}
.hours-format{grid-column:1/-1;grid-row:2;min-width:0}
.hours-format .sel-trigger{width:100%;min-height:52px;text-align:left}
.hours-format .sel{width:100%;min-width:0}
.hours-format .sel-value{display:block;flex:1;min-width:0;white-space:normal}
.hours-format .sel-value b,.hours-format .sel-value small{display:block;white-space:normal;overflow-wrap:anywhere}
.hours-format .sel-menu{overflow-y:auto;overflow-x:hidden;max-width:100%;min-width:100%}
.hours-format .sel-opt{min-height:52px;white-space:normal}
.wg-hours.is-remote{background:#e7f3f0;border-color:#c6e3db}
.wg-window-label{display:block;padding:7px 5px;font-size:10px;line-height:1.4;color:#65583b;overflow-wrap:anywhere}
.wg-hours.is-remote .wg-window-label{color:#35695c}
.hours-editor .fmt-group label,.hours-targets label{display:inline-flex;align-items:center;gap:8px;min-height:44px;cursor:pointer}
.hours-editor input[type=checkbox]{width:18px;height:18px;min-height:0;accent-color:var(--brand-blue)}
.hours-editor input[aria-invalid=true]{border-color:#ac303c;outline:1px solid #ac303c}
.hours-copy,.hours-exceptions{border-top:1px solid var(--line);padding-top:16px;margin-top:20px}
.hours-copy summary,.hours-exceptions summary{display:flex;align-items:center;min-height:44px;cursor:pointer;font-weight:600;font-size:14px}
.hours-targets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:12px 0}
.hours-exceptions .field{margin:12px 0;max-width:270px}
.hours-exception{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0}
.hours-exception small{display:block;color:var(--muted);font-size:12px;margin-top:4px}
.hours-summary>div{display:grid;grid-template-columns:110px minmax(0,1fr);gap:12px;padding:14px 0;border-bottom:1px solid var(--line);font-size:13px;line-height:1.7}
.hours-summary small{display:block;color:var(--muted)}
#hours-errors[hidden]{display:none}
@media(max-width:1000px){.hours-layout{grid-template-columns:1fr}.hours-layout>aside{order:2}}
@media(max-width:600px){.hours-day-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}.hours-summary>div{grid-template-columns:100px minmax(0,1fr)}.hours-editor .wd-title{flex-wrap:wrap}.hours-editor .form-actions{display:flex;flex-direction:column;align-items:stretch}.hours-editor .form-actions .button{justify-content:center;min-height:44px}}

.journal-legend{font-size:12px;line-height:1.6;color:var(--muted);margin:10px 0}
.journal-day-hours{border:1px solid var(--line);border-radius:12px;background:#fffaf0;padding:14px 16px;margin:14px 0;font-size:13px;line-height:1.7}
.journal-day-hours p{margin:6px 0 0}
@media(max-width:767px){
  .kpi-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .kpi{padding:12px 9px}
  .kpi .kpi-label{font-size:10px;letter-spacing:0;min-height:32px;line-height:1.5}
  .kpi .kpi-label svg,.kpi .kpi-hint{display:none}
  .kpi .kpi-value{font-size:23px;margin-top:8px}
}

@media(max-width:600px){
  .hours-editor .slot-line{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px;gap:10px}
  .hours-editor .dash-sep{display:none}
  .hours-time input{font-size:14px;padding:8px}
  .hours-editor .slot-line>button{grid-column:2;grid-row:3;justify-self:end}
  .hours-editor .hours-break>button{grid-row:2}
}

input[type=checkbox]:focus-visible{outline:2px solid var(--brand-blue);outline-offset:3px}
@media(max-width:767px){
  .day-item{display:grid;grid-template-columns:56px minmax(0,1fr);gap:12px}
  .day-item .di-main b,.day-item .di-main span{white-space:normal;overflow:visible;overflow-wrap:anywhere}
  .day-item .di-right{grid-column:1/-1;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:6px}
}

button.wg-day-head{width:100%;border:0;border-bottom:1px solid var(--line);background:#fff;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.wd-status{font-size:9px;color:var(--muted)}
button.wg-day-head:hover{background:#f3f6fc}

.journal-date-picker{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var(--muted)}
.journal-date-picker input{min-height:44px;padding:8px 10px;border:1px solid var(--line);border-radius:12px;background:white;color:var(--ink)}

.hours-presets{margin:16px 0;padding:12px 16px;background:#f4f6fa;border:1px solid var(--line,#dce2ec);border-radius:12px}
.hours-presets summary{cursor:pointer;font-weight:600;min-height:28px;line-height:28px}
.hours-preset-options{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.hours-preset-options .button{min-height:44px}
.hours-preset-confirm{margin-bottom:18px}
@media(max-width:480px){.hours-preset-options{display:grid;grid-template-columns:1fr 1fr}.hours-preset-options .button:last-child{grid-column:1/-1}}
.journal-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin:18px 0}
.journal-day-short{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:12px 4px;min-width:0;border:1px solid #dce2ec;border-radius:12px;background:white;color:var(--navy);font:inherit;cursor:pointer}
.journal-day-short b{font-size:22px;line-height:1.1}.journal-day-short span{font-size:12px}.journal-day-short small{font-size:11px;color:var(--muted);line-height:1.3}
.journal-day-short[aria-pressed=true]{background:#ecf1fc;border-color:#365793;box-shadow:inset 0 -3px #365793}
.journal-day-short:focus:not(:focus-visible){outline:none}.journal-day-short:focus-visible{outline:2px solid #be8c20;outline-offset:3px}
@media(max-width:480px){.journal-days{gap:4px}.journal-day-short{padding:10px 1px;border-radius:9px}.journal-day-short small{font-size:9px}.journal-day-short b{font-size:20px}}
.income-presets{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.income-date-fields{display:flex;flex-wrap:wrap;align-items:end;gap:12px}
.income-date-fields .field{flex:1;min-width:150px;margin:0}.income-date-fields input{width:100%;min-width:0}
.income-date-fields .button{min-height:46px}.income-period-label{font-size:14px;color:var(--muted);margin:18px 0}
.income-row .kpi-value{font-size:clamp(30px,5vw,44px)}
.pb-host .editor-commandbar{position:sticky;top:var(--crm-header-height,74px);z-index:20;background:#fff;border:1px solid var(--line);border-radius:12px;margin-bottom:18px;box-shadow:0 5px 16px rgba(28,38,84,.06)}
.pb-host .editor-commandbar .editor-toolbar{border:0;border-radius:12px 12px 0 0}
.pb-host .editor-commandbar .apply-bar{margin:0;padding:8px 12px;border:0;border-top:1px solid var(--line);border-radius:0 0 12px 12px;gap:4px}
.pb-host .editor-commandbar .apply-note{font-size:11px;line-height:1.5}
.pb-host .editor-commandbar .apply-row{gap:8px}
.pb-host .editor-commandbar .save-status{font-size:11px;min-height:16px;padding:0}
.pb-host .editor-commandbar .apply-row .btn-primary{min-width:130px;min-height:44px}
.pb-host .sec-actions{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
.pb-host .sec-tools{position:relative;margin-left:auto}
.pb-host .sec-tools summary{display:flex;align-items:center;justify-content:center;min-width:60px;min-height:44px;cursor:pointer;list-style:none}
.pb-host .sec-tools summary::-webkit-details-marker{display:none}
.pb-host .sec-tools-menu{position:absolute;top:100%;right:0;z-index:8;min-width:150px;padding:6px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 8px 24px rgba(28,38,84,.14)}
.pb-host .sec-tools-menu .btn{display:flex;align-items:center;justify-content:flex-start;width:100%;min-height:44px}
@media(max-width:1023px){
  .crm-mnav:not([hidden]){position:fixed;top:var(--crm-nav-top,110px);left:12px;right:12px;z-index:60;max-height:calc(100dvh - var(--crm-nav-top,110px) - 12px);overflow-y:auto;margin:6px 0 0;box-shadow:0 14px 40px rgba(28,38,84,.22);overscroll-behavior:contain}
  .pb-host .editor-commandbar .editor-toolbar{gap:5px;padding:7px 9px}
  .pb-host .editor-commandbar .editor-toolbar .mode-switch .btn{padding:8px;min-height:44px;font-size:12px}
  .pb-host .editor-commandbar .editor-toolbar>[data-act=undo],.pb-host .editor-commandbar .editor-toolbar>.btn-quiet{font-size:11px;min-height:32px;height:auto;padding:5px 8px}
  .pb-host .editor-commandbar .apply-row{display:grid;grid-template-columns:auto minmax(0,1fr)}
}
.week-bars{gap:12px;overflow-x:auto}.week-bar{flex:1;min-width:70px}.week-bar small{font-size:11px;line-height:1.5;display:block}
@media(max-width:480px){.income-date-fields{display:grid;grid-template-columns:1fr 1fr}.income-date-fields .field{min-width:0}.income-date-fields .button{grid-column:1/-1}.income-presets .button{flex:1;min-height:44px}}

/* ---- tenant-ux r2: деньги выровнены по табличным цифрам ---- */
.kpi-value,.price,.sub-price,.income-event .price,.di-time b,.cc-stats b{font-variant-numeric:lining-nums tabular-nums;font-feature-settings:'tnum' 1,'lnum' 1}
.income-period-label{font-variant-numeric:lining-nums tabular-nums;color:#6b6975;font-size:13px;margin:0 0 14px}

.place-badge{background:#eef1fa;color:#38498f;font-weight:600}
.meet-detail .place-badge,.booking-item .place-badge{margin-left:auto}
.booking-item .bi-head .place-badge{margin-left:0}
.di-right .place-badge{justify-self:end}

/* ---- tenant-ux r2: журнал в оставшейся высоте viewport ---- */
.journal-card{display:flex;flex-direction:column}
.journal-card .journal-scroll{flex:1 1 auto;min-height:0;overflow:auto}
.journal-card{max-height:calc(100vh - 360px);min-height:240px}
.day-list{max-height:100%;overflow:visible}
@media(min-width:1024px){
  .crm-body{display:flex;flex-direction:column}
  .journal-card{max-height:calc(100vh - 380px)}
}
@media(max-height:560px){
  /* честный flow при экстремально малой высоте */
  .journal-card{max-height:none}
  .journal-card .journal-scroll{overflow:visible}
}
.wg-day-head{top:0}
.journal-scroll .week-grid{min-width:980px}

/* ---- tenant-ux r2: одна baseline столбиков, подписи стабильным рядом ---- */
.week-bars{align-items:end}
.week-bar{display:grid;grid-template-rows:1fr auto;align-items:end;gap:6px;min-height:120px}
.week-bar .bar{width:100%;max-width:56px;justify-self:center}
.week-bar small{min-height:34px;display:flex;align-items:flex-start;justify-content:center;text-align:center;line-height:1.25;font-variant-numeric:lining-nums tabular-nums}
.panel-card+.panel-card{margin-top:16px}
.income-range .income-date-fields{display:flex;gap:10px;align-items:end;flex-wrap:wrap}
.income-range .field{min-width:150px}
.income-range{margin-bottom:16px}

/* шрифтовой shorthand сбрасывает font-variant — перекрываем с большей специфичностью */
.kpi .kpi-value,.income-row .kpi-value,.income-period-label,.income-event .price,.booking-item .price,.personal-section .price,.cc-stats b,.di-time b{font-variant-numeric:lining-nums tabular-nums;font-feature-settings:'tnum' 1,'lnum' 1}
/* столбики: фиксированная область, подписи не двигают baseline */
.week-bars{display:flex;align-items:flex-end;gap:8px}
.week-bar{display:flex;flex-direction:column;justify-content:flex-end;gap:6px;flex:1;min-width:0}
.week-bar .bar-area{height:96px;display:flex;align-items:flex-end;justify-content:center}
.week-bar .bar{width:100%;max-width:56px}
.week-bar small{min-height:34px;display:flex;align-items:flex-start;justify-content:center;text-align:center;line-height:1.25}

/* единая baseline: общие строки грида, область столбиков фиксированной высоты */
.week-bars{display:grid;grid-auto-flow:column;grid-template-rows:96px auto;gap:8px;align-items:start;justify-items:stretch}
.week-bar{display:contents}
.week-bar .bar-area{height:100%;display:flex;align-items:flex-end;justify-content:center}
.week-bar .bar{width:100%;max-width:56px}
.week-bar small{min-height:34px;display:flex;align-items:flex-start;justify-content:center;text-align:center;line-height:1.25}
@media(max-width:480px){.week-bars{grid-template-rows:72px auto}}

/* ---- фирменный календарь выбора даты (журнал + период доходов) ---- */
.dp-wrap{position:relative;display:inline-flex}
.dp-trigger{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:6px 12px;border:1px solid #aaa6b1;border-radius:12px;background:#fff;font-size:13px}
.dp-trigger:hover{border-color:var(--brand-blue)}
.dp-trigger span{color:var(--muted)}
.dp-trigger b{font-variant-numeric:lining-nums tabular-nums;white-space:nowrap}
.dp-trigger svg{width:15px;height:15px;color:var(--muted);transition:transform .15s}
.dp-trigger[aria-expanded=true] svg{transform:rotate(180deg)}
.dp{position:absolute;top:calc(100% + 6px);left:0;z-index:90;width:296px;padding:10px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 16px 40px rgba(39,38,56,.18)}
.dp-right .dp{left:auto;right:0}
.dp-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.dp-head b{font-size:14px}
.dp-head .icon-btn{width:38px;height:38px;border:1px solid var(--line);border-radius:50%;background:#fff;display:inline-flex;align-items:center;justify-content:center}
.dp-head .icon-btn svg{width:16px;height:16px}
.dp-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.dp-dow{text-align:center;font-size:10.5px;color:var(--muted);padding:4px 0}
.dp-day{position:relative;min-height:38px;border:0;border-radius:9px;background:transparent;font-size:13.5px;font-variant-numeric:lining-nums tabular-nums}
.dp-day:hover{background:#f0f3fa}
.dp-day[aria-pressed=true]{background:var(--brand-blue);color:#fff;font-weight:600}
.dp-blank{min-height:38px}
.dp-today{position:absolute;left:50%;bottom:4px;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:var(--brand-blue);pointer-events:none}
.dp-day[aria-pressed=true] .dp-today{background:#fff}
/* панель часов из журнала: раскрываемая область, календарь не теряется */
.journal-hours-inline{max-height:min(56vh,520px);overflow:auto;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:#fff;margin:0 0 14px}
.income-date-fields{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}

/* узкие экраны/малая высота: KPI в один компактный ряд, управление ближе */
@media(max-width:480px){
  .kpi-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .kpi{padding:10px 11px}
  .kpi .kpi-value{font-size:17px}
  .kpi .kpi-hint{display:none}
  .page-head .sub{display:none}
  .journal-head .sub{display:none}
}
/* Owner review: readable compact chrome, calendar in actual remaining viewport. */
#demo-chrome{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:7px 14px;background:#fff3cf;color:#514421;font:12px/1.5 Golos,Arial,sans-serif}
#demo-chrome details{min-width:0}#demo-chrome summary{cursor:pointer}#demo-chrome p{max-width:80ch;margin:8px 0}
.demo-all{white-space:nowrap;color:inherit;text-decoration:underline}
.crm-body[data-view=journal]{padding-top:12px;padding-bottom:12px}
.crm-body[data-view=journal] .page-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.journal-help{font-size:12px;color:var(--muted)}.journal-help summary{cursor:pointer;min-height:28px;display:list-item;align-content:center}
.journal-help[open]{width:100%}.journal-help .sub{display:block!important}
.journal-help .hours-banner{margin:8px 0}.journal-help .journal-day-hours{margin:8px 0;padding:8px 12px}
.crm-body[data-view=journal] .kpi-row{margin:0 0 10px;gap:8px}
.crm-body[data-view=journal] .kpi{padding:10px 12px}
.crm-body[data-view=journal] .kpi-value{font-size:24px;margin-top:4px}
.crm-body[data-view=journal] .journal-head{margin:0 0 8px}
.crm-body[data-view=journal] .journal-head>div:first-child{display:none}
.journal-card{height:var(--journal-room,320px);max-height:var(--journal-room,320px);min-height:140px;flex:none}
.journal-card .journal-scroll,.journal-card .day-list{max-height:100%;min-height:0;overflow:auto}
.journal-hours-inline{max-height:var(--journal-room,60vh)}
.hours-open .journal-card{display:none}
.kpi .kpi-value,.income-event .price,.booking-item .price,.sub-price{font-family:system-ui,-apple-system,"Helvetica Neue",sans-serif;font-variant-numeric:lining-nums tabular-nums}
.income-range{display:grid;grid-template-columns:minmax(240px,.9fr) minmax(300px,1.2fr);grid-template-areas:'presets totals' 'dates totals' 'period period' 'error error';gap:10px 24px}
.income-range .income-presets{grid-area:presets;margin:0}
.income-range .income-date-fields{grid-area:dates;gap:8px}
.income-range .income-period-label{grid-area:period;margin:0;font-size:12px}
.income-range #income-range-error{grid-area:error;margin:0}
.income-range .income-row{grid-area:totals;grid-template-columns:1fr 1fr;gap:12px;align-items:center}
.income-range .kpi{padding:12px;background:var(--paper);min-width:0}
.income-range .kpi-value{font-size:clamp(26px,3vw,34px);white-space:nowrap}
.dp{width:min(344px,calc(100vw - 16px));padding:10px}
.dp-head .icon-btn{width:44px;height:44px;min-height:44px;flex:none}
.dp-day{min-height:44px;min-width:44px;padding:0}
.dp-blank{min-height:44px}
@media(max-width:768px){
 .income-range{grid-template-columns:minmax(0,1fr);grid-template-areas:'presets' 'dates' 'totals' 'period' 'error';gap:12px}
 .income-range .kpi-value{font-size:26px}
 .crm-body[data-view=journal]{padding:10px 12px 12px}
 .crm-body[data-view=journal] .kpi-value{font-size:20px}
 .crm-body[data-view=journal] .kpi-hint{font-size:10px}
 .crm-body[data-view=journal] .journal-head .row-actions{gap:6px}
 .crm-body[data-view=journal] .journal-days{margin:6px 0}
 .crm-body[data-view=journal] .journal-day-short{padding:6px 2px}
}
@media(max-height:559px){.journal-card{height:auto;max-height:none}.journal-card .journal-scroll{max-height:420px}.journal-hours-inline{max-height:none}}

#demo-chrome .demo-footer{padding:8px 0;margin:0;border:0;background:transparent;display:block;color:inherit}
#demo-chrome .demo-footer .button{font-size:12px}
@media(max-width:768px){
 .crm-top{flex-wrap:nowrap;min-height:56px}
 .crm-top .who{flex:1;min-width:0}.crm-top .who b{display:block;font-size:13px;max-width:100%}.crm-top .who small{display:none}
 .crm-top .who>span{min-width:0}.crm-top .top-actions{flex:0 0 auto}
 .crm-top .top-actions>a.button{width:44px;height:44px;min-height:44px;padding:0}
 .crm-top .top-actions>a.button span{display:none}
 .crm-mnav .sel{margin-top:12px;width:100%}
}
@media(max-width:768px){
 .crm-top{display:flex;padding:6px 12px;gap:8px}
 .crm-top .crm-mnav-toggle{flex:none}
 .crm-top .who{flex:1;min-width:0}
 .crm-top .top-actions{flex:none}
 .crm-body[data-view=journal] .kpi{padding:8px 10px}
 .crm-body[data-view=journal] .kpi-label{font-size:9px}
}
/* Client cards must shrink to the phone width without losing their details. */
.client-list{grid-template-columns:minmax(0,1fr)}
.client-row{min-width:0;max-width:100%}
.client-row .cr-main b{overflow-wrap:anywhere}
@media(max-width:480px){
 .client-row{display:grid;grid-template-columns:44px minmax(0,1fr);gap:8px 12px}
 .client-row .cr-stats{grid-column:2;text-align:left;white-space:normal}
}

.demo-product-status{padding:12px 20px;background:#fff3cc;color:#473815;font:14px/1.55 Golos,system-ui;border-bottom:1px solid #dfcf9b}

.demo-back{display:block;padding:10px 20px;background:#f4f0e5;color:#283f6b;font:14px/1.5 Golos,system-ui;min-height:44px}
