/* lk-look.css — облик кабинета клиента (client-v2) для всех ролевых кабинетов.
   Подключается после lk-shell.css и ops-field.css; все правила — под html.lk-v2,
   потому что lk-shell.css общий с калькулятором, а его облик не меняем.
   Значения — только из lk-tokens.css. Спека: docs/superpowers/specs/2026-10-28-lk-design-scale-design.md. */

/* ── 1. переменные старой темы → токены клиента (таблица 3.1 спеки) ── */
html.lk-v2,
html.lk-v2:not([data-theme="dark"]),
html.lk-v2[data-theme="dark"] {
  color-scheme: light;
  --background: var(--bg); --card: var(--bg); --sidebar: var(--bg); --popover: var(--bg); --input-background: var(--bg);
  --ink-muted: var(--muted);
  --secondary: var(--surface); --sidebar-accent: var(--surface); --primary-soft: var(--surface);
  --c-border: var(--line); --lk-line: var(--line); --sidebar-border: var(--line); --border: var(--line); --border-subtle: var(--hair);
  --foreground: var(--text); --text-primary: var(--text); --lk-ink: var(--text); --card-foreground: var(--text); --sidebar-foreground: var(--text);
  --text-secondary: var(--muted); --text-tertiary: var(--muted); --sidebar-muted: var(--muted); --muted-foreground: var(--muted);
  --primary: var(--accent); --ink: var(--accent); --sidebar-primary: var(--accent); --primary-foreground: #fff;
  --success: var(--done); --success-strong: var(--done);
  --font-body: var(--font-ui); --font-display: var(--font-ui); --font-family: var(--font-ui); --font-sans: var(--font-ui); --lk-num: var(--font-ui);
  --glass-bg: var(--bg); --glass-bg-strong: var(--bg); --glass-border: var(--line); --glass-blur: none; --glass-shadow: none;
  --shadow-card: none; --shadow-card-hover: none; --shadow-raised: none; --shadow-glass: none;
  --lk-shadow-card: none; --lk-shadow-card-hover: none;
  --lk-haze-1: var(--bg); --lk-haze-2: var(--bg); --lk-haze-3: var(--bg);
  --radius-md: 16px; --lk-r-card: 28px; --lk-r-group: 28px;
}

/* ── 2. фон и шрифт: белый холст, Inter везде, без всплесков и стекла ── */
/* --muted у старой темы — серый фон, у клиента — серый текст. Старый смысл даём
   только внутри body; на html остаётся токен клиента, его копия — --ink-muted. */
html.lk-v2 body { --muted: var(--surface); }
html.lk-v2 body { background: var(--bg); color: var(--text); font-family: var(--font-ui); -webkit-font-smoothing: antialiased; }
html.lk-v2 body *:not(code):not(pre):not(kbd) { font-family: var(--font-ui) !important; }
html.lk-v2 .bgfield, html.lk-v2 .blob { display: none !important; }
html.lk-v2 *, html.lk-v2 *::before, html.lk-v2 *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.lk-v2 .t-num, html.lk-v2 .num { font-variant-numeric: tabular-nums; }

/* жирное старой темы (600–800, в т.ч. из inline-стилей) → 500, как у клиента */
html.lk-v2 :is(.hub, .lk2-page, .of, .lk-modal, .ws-modal, .nlk-ov, .drawer, .pd) :is([style*="font-weight: 6"], [style*="font-weight: 7"], [style*="font-weight: 8"], [style*="font-weight: 9"], b, strong, th) { font-weight: 500 !important; }

/* ── 3. боковое меню ── */
html.lk-v2 .side { background: var(--bg); border-right: 1px solid var(--hair); }
/* цвет роли (role.markBg / avaC — inline) уходит: у клиента знак и аватары монохромные */
html.lk-v2 .brand-mark { background: var(--accent) !important; box-shadow: none !important; border-radius: 999px; }
html.lk-v2 :is(.side-ava, .topbar-ava) { background: var(--surface) !important; color: var(--text); font-weight: 500; }
html.lk-v2 .brand-name { font-size: 15px; font-weight: 500; letter-spacing: -.01em; color: var(--text); }
html.lk-v2 .brand-sub { font-size: 12px; font-weight: 400; color: var(--ink-muted); }
html.lk-v2 .nav-label { font-size: 12px; font-weight: 400; color: var(--ink-muted); text-transform: none; letter-spacing: 0; }
html.lk-v2 .nav-item { font-size: 14px; font-weight: 400; color: var(--ink-muted); border-radius: 999px; }
html.lk-v2 .nav-item .nav-lbl { font-weight: inherit !important; }
html.lk-v2 .nav-item:hover { background: var(--surface); color: var(--text); }
html.lk-v2 .nav-item.active { background: var(--surface); color: var(--text); font-weight: 500; }
html.lk-v2 .nav-item .nav-count { background: var(--surface); color: var(--text); font-weight: 500; }
html.lk-v2 .nav-item.active .nav-count { background: var(--bg); }
html.lk-v2 .side-foot { border-top: 1px solid var(--hair); }

/* ── 4. верхняя строка ── */
html.lk-v2 .topbar { background: var(--bg); border-bottom: 1px solid var(--hair); }
html.lk-v2 .crumbs { color: var(--ink-muted); font-weight: 400; }
html.lk-v2 .crumbs .cur { color: var(--text); font-weight: 500; }
html.lk-v2 :is(.lk-search, .lk-bell, .cmdk-btn) { background: var(--bg); border: 1px solid var(--line); box-shadow: none; }
html.lk-v2 .lk-search { border-radius: 999px; height: 40px; padding: 0 16px; }
html.lk-v2 .lk-bell { border-radius: 999px; width: 40px; height: 40px; }
html.lk-v2 kbd { font-weight: 400; background: var(--surface); border: 0; }

/* ── 5. заголовки ── */
html.lk-v2 .ph-eyebrow { font-size: 12px; font-weight: 400; color: var(--ink-muted); text-transform: none; letter-spacing: 0; }
html.lk-v2 .ph-eyebrow::first-letter { text-transform: uppercase; }
html.lk-v2 .ph-h1 { font-size: 40px; font-weight: 300; letter-spacing: -.03em; line-height: 1.08; color: var(--text); }
html.lk-v2 :is(.ph-sub, .t-h2, .t-h3) { font-weight: 500; letter-spacing: -.01em; }
html.lk-v2 .t-h3 { font-size: 18px; }

/* ── 6. кнопки и переключатели: пилюли 44px, главная — чёрная ── */
html.lk-v2 .btn { min-height: 44px; padding: 0 20px; border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: none; }
html.lk-v2 .btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
html.lk-v2 :is(.btn-primary, .btn-accent) { background: var(--accent); color: #fff; border: 0; box-shadow: none; }
html.lk-v2 .btn-glass { background: var(--bg); border: 1px solid var(--line); color: var(--text); }
html.lk-v2 .btn-success { background: var(--done); color: #fff; }
html.lk-v2 .lk-segs { background: var(--surface); border: 0; border-radius: 999px; padding: 4px; box-shadow: none; }
html.lk-v2 .lk-segs-btn { border-radius: 999px; font-size: 14px; font-weight: 400; color: var(--ink-muted); padding: 0 18px; min-height: 36px; }
html.lk-v2 .lk-segs-btn:hover { background: var(--bg); color: var(--text); }
html.lk-v2 .lk-segs-btn.is-on { background: var(--accent); color: #fff; border-color: transparent; box-shadow: none; font-weight: 500; }
html.lk-v2 :is(.seg, .period-seg) { background: var(--surface); border-radius: 999px; }
html.lk-v2 :is(.seg, .period-seg) button { font-weight: 400; }
html.lk-v2 :is(.seg, .period-seg) button.active { background: var(--bg); color: var(--text); box-shadow: none; font-weight: 500; }

/* ── 7. карточки: серая поверхность без теней, радиус 28 ── */
html.lk-v2 :is(.rp-card, .rp-card--glass, .lk-wgt, .gcard, .solid, .card, .lk-hero, .ov-live-card) {
  background: var(--surface); border: 0; box-shadow: none; border-radius: 28px;
}
html.lk-v2 .lk-kpi { background: var(--surface); border: 0; box-shadow: none; border-radius: 28px; padding: 20px 22px; }
html.lk-v2 .lk-kpi:hover { transform: none; background: var(--line); }
html.lk-v2 .lk-kpi-title { font-size: 13px; font-weight: 400; color: var(--ink-muted); }
html.lk-v2 .lk-kpi-v { font-size: 40px; font-weight: 300; letter-spacing: -.02em; }
/* вложенная карточка в серой — белая, как строки клиента */
html.lk-v2 :is(.rp-card, .lk-wgt) :is(.rp-card, .lk-wgt) { background: var(--bg); }

/* ── 8. пилюли-статусы: три вида клиента (чёрная, контурная, серая) ── */
html.lk-v2 :is(.pill, .badge, .chip, .ov-chip, .feed-catchip) { box-shadow: none; font-weight: 400; }

/* ── 9. окна и затемнение ── */
html.lk-v2 :is(.lk-modal-ov, .nlk-ov, .drawer-ov, .pd-ov, .cmdk-ov) { background: var(--scrim); }
html.lk-v2 .lk-fb-fab { background: var(--bg); border: 1px solid var(--line); box-shadow: none; font-weight: 500; }

/* ── 10. плавающее меню (телефон и широкие экраны): стекла нет — значит, сплошной белый фон ── */
html.lk-v2 .lk-floatnav { background: var(--bg); border: 1px solid var(--line); box-shadow: none; }
html.lk-v2 .lk-floatnav-item { font-size: 13px; font-weight: 400; color: var(--ink-muted); }
html.lk-v2 .lk-floatnav-item:hover { background: var(--surface); color: var(--text); }
html.lk-v2 .lk-floatnav-item.active { background: var(--accent); color: #fff; box-shadow: none; font-weight: 500; }
html.lk-v2 .lk-floatnav-badge { background: var(--surface); color: var(--text); font-weight: 500; }
html.lk-v2 .lk-floatnav-item.active .lk-floatnav-badge { background: var(--bg); }

/* ── 11. каркас кабинета клиента (Shell2 в lk-common.jsx): шапка «ОБИТЕЛЬ», меню в строку, страница 1440,
   главная — приветствие и одна серая карточка с цифрами, разделы — окно поверх главной. Значения — из client-v2.css ── */
html.lk-v2, html.lk-v2 body { height: auto; }
html.lk-v2 body { overflow: auto; }
html.lk-v2 .lk2-page { max-width: 1440px; margin: 0 auto; padding: 28px 48px 64px; }
html.lk-v2 .lk2-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; }
html.lk-v2 .lk2-skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13px; }
html.lk-v2 .lk2-skip:focus { top: 12px; }
html.lk-v2 .lk2-logo { font-size: 18px; font-weight: 600; letter-spacing: .12em; color: var(--text); text-decoration: none; }
html.lk-v2 .lk2-nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
html.lk-v2 .lk2-nav a, html.lk-v2 .lk2-nav button { font-size: 14px; color: var(--ink-muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
html.lk-v2 .lk2-nav a:hover, html.lk-v2 .lk2-nav button:hover { color: var(--text); }
html.lk-v2 .lk2-nav [aria-current="page"], html.lk-v2 .lk2-more.is-cur > button, html.lk-v2 .lk2-more > button[aria-expanded="true"] { color: var(--text); font-weight: 500; }
html.lk-v2 .lk2-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 11px; font-weight: 500; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
html.lk-v2 .lk2-more, html.lk-v2 .lk2-pop { position: relative; }
html.lk-v2 .lk2-more ul, html.lk-v2 .lk2-menu { position: absolute; top: calc(100% + 10px); z-index: 60; min-width: 220px; margin: 0; padding: 6px; list-style: none; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 32px rgba(0, 0, 0, .08); }
html.lk-v2 .lk2-more ul { left: -12px; }
html.lk-v2 .lk2-menu { right: 0; }
html.lk-v2 .lk2-more li a, html.lk-v2 .lk2-more li button, html.lk-v2 .lk2-menu a { display: flex; width: 100%; padding: 9px 12px; border-radius: 10px; font-size: 14px; color: var(--text); text-decoration: none; }
html.lk-v2 .lk2-more li a:hover, html.lk-v2 .lk2-menu a:hover { background: var(--surface); }
html.lk-v2 .lk2-menu .who { padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--hair); margin-bottom: 4px; }
html.lk-v2 .lk2-menu .who b { font-size: 14px; } html.lk-v2 .lk2-menu .who span { font-size: 12px; color: var(--ink-muted); }
html.lk-v2 .lk2-me { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-muted); }
html.lk-v2 .lk2-role { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 12px; white-space: nowrap; }
html.lk-v2 .lk2-ic, html.lk-v2 .lk2-ava { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; font: inherit; }
html.lk-v2 .lk2-ic { border: 1px solid var(--line); background: var(--bg); color: var(--text); }
html.lk-v2 .lk2-ava { border: 0; background: var(--surface); color: var(--text); font-size: 13px; font-weight: 500; }
html.lk-v2 .lk2-dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; display: grid; place-items: center; }
html.lk-v2 .lk2-sv { display: flex; align-items: center; gap: 10px; margin: -8px 0 16px; padding: 9px 16px; border-radius: 14px; background: var(--attention); color: var(--text-2); font-size: 13px; }
html.lk-v2 .lk2-sv a { margin-left: auto; color: var(--text); }
html.lk-v2 .lk2-main:focus { outline: none; }

/* главная: приветствие как .cv-hero / .cv-hello */
html.lk-v2 .lk2-hero { margin: 48px 0 0; }
html.lk-v2 .lk2-hero .ph-eyebrow { font-size: 12px; margin: 0; }
html.lk-v2 .lk2-hero .ph-h1 { margin: 8px 0 0; font-size: 44px; font-weight: 300; letter-spacing: -.03em; line-height: 1.05; }
html.lk-v2 .ph-lede { font-size: 15px; line-height: 1.55; color: var(--text-2); max-width: 680px; }
/* «Сегодня / Лента» — справа от приветствия, на месте кнопки «Нужно ваше решение» у клиента */
/* страницы без главной за спиной (профиль): отступ от шапки как у героя */
html.lk-v2 .lk2-main > .lk-page:not(.lk2-home), html.lk-v2 .lk2-main > div:first-child:not(.lk-page) { margin-top: 40px; }
html.lk-v2 .lk2-page .lk-prof-ava { background: var(--bg) !important; color: var(--text) !important; font-weight: 500 !important; }
html.lk-v2 .lk2-home { position: relative; }
html.lk-v2 .lk2-home > .lk-tabs-top { position: absolute; right: 0; top: 76px; margin: 0; z-index: 1; }
html.lk-v2 .lk2-home > .lk-tabs-top .lk-segs { margin: 0; }
/* значки статуса секций — серая пилюля клиента (.pill-g) */
html.lk-v2 .rp-badge { background: var(--surface); color: var(--text-2); border: 0; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 400 !important; }
html.lk-v2 :is(.rp-card, .lk-wgt) .rp-badge { background: var(--bg); }

/* цифры главной — одна серая карточка, как .cv-prog-facts: значение 28/300, подпись серым под ним */
html.lk-v2 .lk-kpi-grid { margin-top: 32px; background: var(--surface); border-radius: 28px; padding: 28px 32px 30px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
html.lk-v2 .lk-kpi-grid .lk-kpi { background: none; border-radius: 0; padding: 0; gap: 4px; display: flex; flex-direction: column; text-align: left; }
html.lk-v2 .lk-kpi-grid .lk-kpi:hover { background: none; }
html.lk-v2 .lk-kpi-grid .lk-kpi:hover .lk-kpi-v { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
html.lk-v2 .lk-kpi-grid .lk-kpi > div:nth-child(2) { order: -1; }
html.lk-v2 .lk-kpi-grid .lk-kpi-v { font-size: 28px; font-weight: 300; line-height: 1.15; }
html.lk-v2 .lk-kpi-grid .lk-kpi-title { color: var(--text) !important; font-size: 13px; font-weight: 400; }
html.lk-v2 .lk-kpi-grid .lk-kpi-top svg { display: none; }
html.lk-v2 .lk-kpi-grid .lk-kpi > div:last-child:not(:nth-child(2)) { font-size: 13px; color: var(--ink-muted); }

/* главная — сетка блоков и виджетов разделов (KSH-465): 8+4, 4+4+4, 6+6; виджет тянется на высоту ряда */
html.lk-v2 .lk2-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; margin-top: 20px; align-items: stretch; }
html.lk-v2 .lk2-grid > * { min-width: 0; display: flex; flex-direction: column; }
html.lk-v2 .lk2-grid > * > * { flex: 1; margin: 0 !important; }
html.lk-v2 .lk2-grid > :empty { display: none; }
html.lk-v2 .lk2-w-12 { grid-column: span 12; } html.lk-v2 .lk2-w-8 { grid-column: span 8; } html.lk-v2 .lk2-w-6 { grid-column: span 6; } html.lk-v2 .lk2-w-4 { grid-column: span 4; }
html.lk-v2 .lk2-wopen { display: inline-flex; align-items: center; gap: 8px; }
html.lk-v2 .lk2-wnum { font-weight: 500; font-variant-numeric: tabular-nums; }
html.lk-v2 .lk2-grid .lk2-w-4 .uni-row .uni-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { html.lk-v2 .lk2-w-8 { grid-column: span 12; } html.lk-v2 .lk2-w-4 { grid-column: span 6; } }
@media (max-width: 760px) { html.lk-v2 .lk2-grid { grid-template-columns: 1fr; gap: 16px; } html.lk-v2 .lk2-grid > * { grid-column: auto; } }

/* разделы — окно поверх главной, как .cv-modal */
/* z как у .cv-scrim/.cv-modal (40/41): ниже старых диалогов и выезжающих панелей (80–1200), которые открываются из раздела. Без transform — иначе position:fixed внутри окна (просмотр фото, панели) считается от окна */
html.lk-v2 .lk2-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 60; }
html.lk-v2.lk2-locked, html.lk-v2.lk2-locked body { overflow: hidden; }
html.lk-v2 .lk2-modal { position: fixed; inset: 0; margin: auto; width: min(1200px, calc(100vw - 48px)); height: calc(100vh - 48px); background: var(--bg); border-radius: 36px; box-shadow: 0 10px 60px rgba(0, 0, 0, .16); z-index: 61; overflow: auto; padding: 32px 40px 40px; outline: none; }
html.lk-v2 .lk2-x { position: sticky; top: 0; float: right; z-index: 2; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 0; display: grid; place-items: center; cursor: pointer; color: var(--text); }
html.lk-v2 .lk2-modal .ph { margin-top: 0; }
html.lk-v2 .lk2-modal .ph-h1 { font-size: 40px; }
html.lk-v2 .lk2-home[aria-hidden="true"] { pointer-events: none; }

@media (max-width: 760px) {
  html.lk-v2 .lk2-page { padding: 16px 16px 48px; }
  html.lk-v2 .lk2-head { flex-wrap: wrap; }
  html.lk-v2 .lk2-nav { order: 3; width: 100%; gap: 10px 16px; }
  html.lk-v2 .lk2-role { display: none; }
  html.lk-v2 .lk2-hero { margin-top: 28px; }
  html.lk-v2 .lk2-home { display: flex; flex-direction: column; }
  html.lk-v2 .lk2-home > * { order: 2; }
  html.lk-v2 .lk2-home > .lk2-hero { order: 0; }
  html.lk-v2 .lk2-home > .lk-tabs-top { order: 1; position: static; margin: 0 0 24px; }
  html.lk-v2 .lk2-hero .ph-h1 { font-size: 32px; }
  html.lk-v2 .lk-kpi-grid { grid-template-columns: 1fr 1fr; padding: 22px 20px; }
  html.lk-v2 .lk2-modal { top: 10%; left: 0; right: 0; bottom: 0; margin: 0; width: auto; height: auto; padding: 24px 16px 40px; border-radius: 28px 28px 0 0; }
  html.lk-v2 .lk2-modal .ph-h1 { font-size: 30px; }
}

/* ── 12. остатки старой темы внутри разделов: жирное, цветные полосы и цифры, тени ── */
html.lk-v2 .lk2-page :is(.uni-t, .lk-q-t, .dacc-n, .dacc-t, .dtl-k, .mdp-chip, .mdp-row-t, .rail-t, .rail-item-t, .rail-item-r, .rail-right, .rail-node,
  .sf-leg-v, .ov-funnel-mini-v, .t-num, .chava, .mini-ava, .lk-segs-badge, .dacc-all, .uni-col, .lk-q-m, small, em) { font-weight: 500 !important; }
html.lk-v2 .lk2-page :is(.uni-t, .lk-q-t) { font-size: 15px; }
html.lk-v2 .lk2-page :is(.uni-row, .lk-q-row) { background: var(--bg); border-radius: 16px; border: 0; box-shadow: none; }
html.lk-v2 .lk2-page :is(.uni-row, .lk-q-row):hover { background: var(--hair); }
/* полоса слева: по умолчанию нейтральная; красная и жёлтая старой темы → «просрочено» и «скоро» клиента */
html.lk-v2 .lk2-page :is(.uni-bar, .lk-q-bar) { background: var(--line) !important; width: 3px; border-radius: 2px; }
html.lk-v2 .lk2-page :is(.uni-bar, .lk-q-bar):is([style*="destructive"], [style*="danger"]) { background: var(--over) !important; }
html.lk-v2 .lk2-page :is(.uni-bar, .lk-q-bar):is([style*="warning"]) { background: var(--soon) !important; }
html.lk-v2 .lk2-page [style*="color: var(--destructive)"] { color: var(--over) !important; }
html.lk-v2 .lk2-page :is([style*="color: var(--info)"], [style*="color: var(--primary)"], [style*="color: var(--chart-"]) { color: var(--text) !important; }
html.lk-v2 .lk2-page [style*="color: var(--warning"] { color: var(--soon) !important; }
html.lk-v2 .lk2-page :is(.mini-ava, .chava) { background: var(--surface) !important; color: var(--text) !important; }
html.lk-v2 .lk2-page :is(.rail-panel, .mdp-row.is-active, .rail-item-ic, .rail-node) { box-shadow: none !important; }
html.lk-v2 .lk2-page .lk-kpi-grid .lk-kpi-v { font-weight: 300 !important; }
html.lk-v2 .lk2-page .lk-kpi-grid .lk-kpi-title[style] { color: var(--text) !important; }
