/* PEREPLAN ЛК — дизайн-система по официальному брендбуку (Pereplan Гайдбук v.2026-05).
   Все токены, шрифты и градиенты — строго из гайдлайна. Не добавлять не-брендовые
   цвета и шрифты. Стиль: минимализм, чистая типографика. */

/* Roboto — корпоративный шрифт PEREPLAN (стр. 8-9 гайдбука).
   Самозахощенный variable-font (веса 300–700 одним woff2): внешний @import
   fonts.googleapis.com блокировал рендер каждой страницы у пользователей с VPN. */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 300 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('/lk/static/fonts/roboto-vf-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 300 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('/lk/static/fonts/roboto-vf-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  /* ── Брендовая палитра (стр. 11 гайдбука) ────────────────── */
  --brand:        #126AEE;   /* основной бренд */
  --brand-alt:    #1D73CB;   /* для запасного градиента и обводок */
  --brand-dark:   #1B3388;   /* конец основного градиента */
  --brand-light:  #79BBFF;   /* «голубой» из палитры */
  --brand-50:     #EAF2FE;   /* очень светлый брендовый */
  --brand-100:    #D2E3FD;

  /* Нейтрали */
  --bg:           #F9F9F9;   /* «светло серый» */
  --bg-elevated:  #FFFFFF;
  --card:         #FFFFFF;
  --ink:          #000000;   /* «чёрный» (для крупных заголовков) */
  --ink-2:        #222222;   /* «серый» (body-текст) */
  --ink-3:        #4A4F58;
  --muted:        #767A85;
  --muted-2:      #A5A9B3;
  --line:         rgba(0,0,0,.06);
  --line-strong:  rgba(0,0,0,.12);

  /* Семантика — НЕ брендовые, только для статусов */
  --green:        #1FA46B;   /* «готово» */
  --green-bg:     #E3F5EC;
  --orange:       #D97A00;   /* «нужно действие» — терракотовый, минималистичный */
  --orange-bg:    #FFF1DD;
  --red:          #D6342C;   /* «ошибка/просрочка» */
  --red-bg:       #FCE8E6;

  /* Глубина и радиусы — минималистичные, без скруглений «iOS-squircle» */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-2xl: 24px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgba(0,0,0,.04);
  --shadow-2: 0 2px 8px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.03);
  --shadow-3: 0 8px 24px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.04);
  --shadow-brand: 0 8px 24px rgba(18,106,238,.16);

  /* Анимация */
  --ease-out: cubic-bezier(.16,.84,.32,1);
  --t-fast: 140ms;
  --t-med:  220ms;
  --t-slow: 320ms;

  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Шрифты */
  --font-text: 'Roboto', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-text);
  background: var(--bg);
  color: var(--ink-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 130%;
  letter-spacing: 0;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
img, svg { display: block; max-width: 100%; }

/* ── Layout ────────────────────────────────────────────────── */
.app-main { max-width: 760px; margin: 0 auto; padding: 12px 16px 32px; }
.app-top  { max-width: 760px; margin: 0 auto; padding: calc(var(--safe-top) + 14px) 16px 8px; }

.has-bottom-bar { padding-bottom: 96px; }

/* ── Типографика (стр. 10 гайдбука) ────────────────────────── */
.t-h1 { font-size: 28px; line-height: 120%; font-weight: 500; color: var(--ink); letter-spacing: -.01em; }
.t-h2 { font-size: 22px; line-height: 120%; font-weight: 500; color: var(--ink); letter-spacing: -.005em; }
.t-h3 { font-size: 18px; line-height: 125%; font-weight: 500; color: var(--ink); }
.t-body { font-size: 16px; line-height: 130%; color: var(--ink-2); font-weight: 400; }
.t-meta { font-size: 13px; line-height: 130%; color: var(--muted); font-weight: 400; }
.t-cap  { font-size: 11px; line-height: 130%; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 500; }
.t-mono { font-variant-numeric: tabular-nums; }
.t-strong { font-weight: 600; color: var(--ink); }

/* ── Логотип-шапка PEREPLAN ────────────────────────────────── */
.brand-bar {
  max-width: 760px; margin: 0 auto;
  padding: calc(var(--safe-top) + 14px) 16px 6px;
  display: flex; align-items: center; gap: 14px;
}
.brand-bar .logo {
  height: 26px; width: auto;
  max-width: 50vw;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .brand-bar .logo { height: 24px; max-width: 44vw; }
  .brand-bar .delim { height: 14px; }
  .brand-bar { gap: 10px; padding-top: calc(var(--safe-top) + 10px); }
}
.brand-bar .logo-mono {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
  letter-spacing: 0;
  flex-shrink: 0;
}
.brand-bar .delim {
  width: 1px; height: 16px; background: var(--line-strong);
}

/* ── Card ──────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--t-med) var(--ease-out);
}
.card.elevated { box-shadow: var(--shadow-2); }
.card.tappable {
  cursor: pointer; display: block; color: inherit;
  transition: box-shadow var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out),
              background var(--t-fast);
}
.card.tappable:hover { box-shadow: var(--shadow-2); text-decoration: none; transform: translateY(-1px); }
.card.tappable:active { transform: scale(.992); transition-duration: 80ms; }
.card.tappable:focus-visible {
  outline: none;
  box-shadow: var(--shadow-2), 0 0 0 3px rgba(18,106,238,.25);
}
.card-tight { padding: 14px 16px; border-radius: var(--r-lg); }
.card-cta {
  background: linear-gradient(135deg, var(--brand-50) 0%, #fff 100%);
  box-shadow: inset 0 0 0 1px var(--brand-100), var(--shadow-1);
}
.card-cta:hover { box-shadow: inset 0 0 0 1px var(--brand-100), var(--shadow-2); }

.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 18px; }
.stack-sm > * + * { margin-top: 8px; }

.sec-h {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 4px 4px 10px;
}
.sec-h .l { font-size: 15px; font-weight: 600; color: var(--ink); text-transform: none; letter-spacing: -.005em; }
.sec-h .r { font-size: 13px; color: var(--muted); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  border: 0; cursor: pointer;
  font: inherit; font-weight: 500; font-size: 16px; line-height: 1;
  padding: 14px 18px;
  border-radius: var(--r-md);
  transition: background var(--t-fast) var(--ease-out), opacity var(--t-fast);
  text-decoration: none; color: inherit;
  -webkit-appearance: none; appearance: none;
}
.btn:active { transform: scale(.97); opacity: .92; transition-duration: 80ms; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(18,106,238,.30); }
.btn:disabled, .btn[disabled] {
  background: var(--bg);
  color: var(--muted-2);
  cursor: not-allowed;
  box-shadow: inset 0 0 0 1px var(--line);
  opacity: 1;
  transform: none;
}
.btn:disabled:hover, .btn[disabled]:hover { background: var(--bg); color: var(--muted-2); }
.btn-primary {
  background: var(--brand); color: #fff;
}
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }
.btn-primary:disabled, .btn-primary[disabled],
.btn-primary:disabled:hover, .btn-primary[disabled]:hover {
  background: var(--bg); color: var(--muted-2);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: not-allowed;
}
.btn-secondary {
  background: var(--bg-elevated); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn-secondary:hover { background: var(--bg); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--brand); padding: 12px 14px; }
/* .btn-warn — legacy alias на primary (бренд требует только синюю палитру) */
.btn-warn  { background: var(--brand); color: #fff; }
.btn-warn:hover { background: var(--brand-dark); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 22px; font-size: 17px; border-radius: var(--r-lg); }
.btn-sm { padding: 9px 14px; font-size: 14px; border-radius: var(--r-sm); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-md);
  background: var(--bg-elevated); color: var(--ink);
  border: 0; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 18px; transition: background var(--t-fast);
  text-decoration: none;
}
.icon-btn:hover { background: var(--bg); }
.icon-btn:active { opacity: .85; }
.icon-btn.brand { background: var(--brand); color: #fff; box-shadow: none; }
.icon-btn.brand:hover { background: var(--brand-dark); }

/* ── Badges & pills ───────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 500;
  white-space: nowrap;
}
.badge.brand   { background: var(--brand-50); color: var(--brand); }
.badge.calm    { background: var(--brand-50); color: var(--brand); }
.badge.task    { background: var(--brand); color: #fff; }
.badge.overdue { background: var(--red-bg); color: var(--red); }
.badge.done    { background: var(--green-bg); color: var(--green); }
.badge.mute    { background: var(--bg); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.badge.warn    { background: var(--brand); color: #fff; }

/* ── Progress ─────────────────────────────────────────────── */
.progress {
  height: 4px; border-radius: var(--r-pill);
  background: var(--line); overflow: hidden;
}
.progress > i {
  display: block; height: 100%;
  background: var(--brand);
  border-radius: inherit;
  transition: width var(--t-slow) var(--ease-out);
}
.progress.on-brand { background: rgba(255,255,255,.20); }
.progress.on-brand > i { background: rgba(255,255,255,.95); }

/* ── Hero (брендовый градиент) ─────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-radius: var(--r-2xl);
  padding: 24px;
  color: #fff;
  box-shadow: var(--shadow-brand);
  position: relative; overflow: hidden;
}
.hero.calm    { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); }
.hero.task    { background: linear-gradient(135deg, var(--brand-alt) 0%, var(--brand-dark) 100%); }
.hero.overdue { background: linear-gradient(135deg, #E54C42 0%, #A0241C 100%); }
.hero.done    { background: linear-gradient(135deg, #2DBD7E 0%, #157A4D 100%); }

.hero .cap { font-size: 11px; opacity: .85; text-transform: uppercase; letter-spacing: .08em; font-weight: 500; }
.hero .title { font-size: 24px; font-weight: 500; line-height: 120%; margin-top: 6px; letter-spacing: -.01em; }
.hero .sub { font-size: 14px; opacity: .9; margin-top: 4px; line-height: 130%; }
.hero .meta { font-size: 13px; opacity: .85; }
.hero .chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.18); border-radius: 8px;
  padding: 6px 12px; font-size: 13px; font-weight: 500;
  margin-top: 14px;
}
.hero .chip.warn {
  background: rgba(255, 196, 120, .28);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 170, .4);
  font-weight: 600;
}

/* ── Кнопка с инлайн-SVG-иконкой ──────────────────────────── */
.btn-with-ic { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-ic { width: 18px; height: 18px; flex-shrink: 0; }
.btn-block.btn-with-ic { width: 100%; }

/* ── Required action (минималистично — без градиента, по брендбуку синий) ─ */
.required {
  background: var(--brand-50);
  border-radius: var(--r-xl);
  padding: 18px 18px 16px;
  box-shadow: inset 0 0 0 1px var(--brand-100);
}
.required .cap { color: var(--brand); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.required .title { font-size: 17px; font-weight: 500; color: var(--brand-dark); margin-top: 4px; line-height: 130%; }
.required .body { font-size: 14px; color: var(--brand-dark); margin-top: 6px; line-height: 140%; opacity: .9; }
.required .btn { margin-top: 14px; }

/* ── Manager card ─────────────────────────────────────────── */
.person {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.person > .btn { flex-shrink: 0; }
@media (max-width: 520px) {
  .person { gap: 10px; }
  .person > .btn { width: 100%; order: 99; }
}
.avatar {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: var(--brand-50); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-weight: 500; font-size: 16px; flex-shrink: 0;
}
.person .info { flex: 1; min-width: 0; }
.person .name { font-weight: 500; font-size: 16px; color: var(--ink); }
.person .role { font-size: 13px; color: var(--muted); margin-top: 1px; }

/* ── KV grid ──────────────────────────────────────────────── */
.kv {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px;
}
.kv .k { font-size: 12px; color: var(--muted); font-weight: 400; }
.kv .v { font-size: 15px; font-weight: 500; margin-top: 2px; color: var(--ink); font-variant-numeric: tabular-nums; }
.kv .v.brand { color: var(--brand); }
.kv .v.green { color: var(--green); }
.kv .v.red { color: var(--red); }
.kv .v.large { font-size: 20px; }

/* ── Stages timeline ──────────────────────────────────────── */
.tl { list-style: none; padding: 0; margin: 0; }
.tl li {
  position: relative;
  padding: 12px 0 12px 28px;
  border-bottom: 1px solid var(--line);
}
.tl li:last-child { border-bottom: 0; }
.tl li::before {
  content: ''; position: absolute; left: 6px; top: 17px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--line-strong);
}
.tl li.done::before { background: var(--green); }
.tl li.active::before { background: var(--brand); box-shadow: 0 0 0 4px rgba(18,106,238,.15); }
.tl li.overdue::before { background: var(--red); }
.tl li .n { font-weight: 500; font-size: 15px; color: var(--ink); }
.tl li.done .n { color: var(--muted); font-weight: 400; }
.tl li .d { font-size: 13px; color: var(--muted); margin-top: 2px; }
.tl li.active .d { color: var(--brand); }
.tl li.overdue .d { color: var(--red); }

/* ── Disclosure ───────────────────────────────────────────── */
.disc {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.disc summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  font-weight: 500; font-size: 15px; color: var(--ink);
  user-select: none;
}
.disc summary::-webkit-details-marker { display: none; }
.disc summary::after {
  content: ''; width: 8px; height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform var(--t-med) var(--ease-out);
}
.disc[open] summary::after { transform: rotate(-135deg); }
.disc-body { padding: 4px 18px 16px; }
.disc[open] .disc-body { animation: discOpen 240ms var(--ease-out); }
@keyframes discOpen {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.disc summary { transition: background var(--t-fast); }
.disc summary:hover { background: var(--bg); }

/* ── Empty state ──────────────────────────────────────────── */
.empty {
  background: var(--card);
  border-radius: var(--r-xl);
  padding: 36px 24px;
  text-align: center;
  color: var(--muted);
  box-shadow: var(--shadow-1);
}
.empty .ico { font-size: 32px; opacity: .6; }
.empty .h { font-size: 17px; color: var(--ink); margin-top: 8px; font-weight: 500; }
.empty .b { margin-top: 6px; font-size: 14px; line-height: 140%; max-width: 380px; margin-left: auto; margin-right: auto; }
.empty .error-actions { margin-top: 18px; }
.error-empty { padding: 56px 24px; }
.error-empty .ico { font-size: 48px; opacity: .8; }
.error-empty .error-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--brand-50, #EAF2FE); color: var(--brand);
  margin-bottom: 4px;
}
.error-empty .error-ico svg { width: 52px; height: 52px; }
.error-empty .h { font-size: 22px; margin-top: 14px; font-weight: 600; }

/* ── Skeleton ─────────────────────────────────────────────── */
.skel {
  background: linear-gradient(90deg, var(--line) 0%, var(--bg) 50%, var(--line) 100%);
  background-size: 200% 100%;
  animation: skel 1.4s linear infinite;
  border-radius: var(--r-md);
  color: transparent; user-select: none;
}
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skel-line { height: 14px; margin: 6px 0; }
.skel-card { padding: 16px; border-radius: var(--r-lg); }
.skel-card .skel-line:first-child { width: 60%; }
.skel-card .skel-line:nth-child(2) { width: 85%; }
.skel-card .skel-line:nth-child(3) { width: 40%; }
@media (prefers-reduced-motion: reduce) {
  .skel { animation: none; }
  .card.tappable:hover { transform: none; }
  .btn:active { transform: none; }
}

/* ── Bottom action bar (только mobile — на desktop CTA уже есть в required-action) ─ */
.bottom-bar {
  position: fixed; left: 0; right: 0;
  bottom: 0;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-top: 1px solid var(--line);
  z-index: 30;
}
.bottom-bar .btn { width: 100%; padding: 16px; font-size: 17px; border-radius: var(--r-lg); }
@media (min-width: 720px) {
  .bottom-bar { display: none !important; }
  .has-bottom-bar { padding-bottom: 0; }
}

/* ── Toast ────────────────────────────────────────────────── */
.toast-host {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: calc(var(--safe-top) + 16px);
  z-index: 60;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  padding: 12px 16px;
  border-radius: var(--r-md, 12px);
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-3);
  animation: toastIn var(--t-med) var(--ease-out);
  width: max-content;
  max-width: min(92vw, 480px);
  pointer-events: auto;
}
/* Статусная иконка-кружок в тоне сервиса (карточка + семантический акцент) */
.toast::before {
  content: ''; flex: 0 0 auto;
  width: 20px; height: 20px; border-radius: 50%;
  background-color: var(--brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M12 8v5M12 16.2v.1' stroke='black' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") center/20px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M12 8v5M12 16.2v.1' stroke='black' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") center/20px no-repeat;
}
.toast.ok::before {
  background-color: var(--green);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m8.5 12.2 2.4 2.4 4.6-5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m8.5 12.2 2.4 2.4 4.6-5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}
.toast.err::before { background-color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px); } }
.toast.leaving { animation: toastOut var(--t-med) var(--ease-out) forwards; }

/* ── Мини-прогресс этапа в свёрнутой карточке объекта ─────── */
.obj-mini-progress {
  height: 3px; border-radius: 2px; margin-top: 7px;
  background: var(--line, #e8ecf3); overflow: hidden;
}
.obj-mini-progress i {
  display: block; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-alt, var(--brand)));
}
[data-theme="dark"] .obj-mini-progress { background: var(--line-strong, #2a2a36); }

/* ── Плашка «похоже, VPN» ─────────────────────────────────── */
.vpn-note {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 55;
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--card, #fff);
  border: 1px solid var(--line-strong, #e3e8f0);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13.5px; line-height: 1.45; color: var(--ink, #16181d);
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  max-width: 480px; margin: 0 auto;
  animation: toastIn var(--t-med) var(--ease-out);
}
body.has-p-tabbar .vpn-note { bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
.vpn-note button {
  flex: none; margin-left: auto;
  border: 0; background: none; padding: 0 2px;
  color: var(--muted, #8a93a3); font-size: 20px; line-height: 1; cursor: pointer;
}

/* ── Modal ────────────────────────────────────────────────── */
.modal-back {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 50;
  display: none;
  align-items: flex-end; justify-content: center;
  padding: 16px;
}
.modal-back.show { display: flex; animation: fadeIn var(--t-med) var(--ease-out); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 600px) {
  .modal-back { align-items: center; }
}

.modal {
  background: var(--card);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  padding: 20px 20px 0;
  max-width: 100%; width: 100%;
  box-shadow: 0 -8px 32px rgba(0,0,0,.10);
  animation: bottomSheetIn 320ms var(--ease-out);
  position: relative;
  /* 100dvh — dynamic viewport, учитывает панель Safari и клавиатуру,
     иначе низ модалки уходит под нижнюю системную полосу. */
  max-height: min(92dvh, calc(100dvh - 24px));
  display: flex; flex-direction: column;
  overflow: hidden;
}
/* Внутренний скролл — только для тела формы; заголовок и футер приколоты. */
.modal > h2 { flex: 0 0 auto; padding-top: 6px; }
.modal > p.lead { flex: 0 0 auto; }
.modal > form,
.modal-body {
  flex: 1 1 auto;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 12px;
  min-width: 0;
}
/* Гарантируем: элементы формы не выпирают шире контейнера, включая длинный текст в placeholder */
.modal input, .modal textarea, .modal select { max-width: 100%; box-sizing: border-box; }
/* Для sticky-футера — margin −20px не должен добавлять горизонт-скролл (parent overflow-x:hidden спасёт).
   Textarea, чей rows создаёт большую высоту, не должен уметь ресайзиться по горизонтали. */
.modal textarea { resize: vertical; }
/* Компактнее промежутки в модалке — форма умещается за один взгляд */
.modal label { margin: 10px 0 4px; }
.modal input, .modal textarea, .modal select { padding: 11px 14px; }
/* Sticky-футер с кнопками. Фон совпадает с card, тонкий fade сверху. */
.modal-actions {
  position: sticky; bottom: 0;
  margin: 12px -20px 0; padding: 12px 20px calc(14px + var(--safe-bottom));
  background: var(--card);
  box-shadow: 0 -8px 12px -8px rgba(0,0,0,.12);
  display: flex; gap: 8px; z-index: 2;
}
.modal-actions .btn { flex: 1; margin-top: 0; }
.modal::before {
  content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 4px;
  background: var(--line-strong);
  border-radius: 2px;
}
@keyframes bottomSheetIn {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: none; }
}
@media (min-width: 600px) {
  .modal {
    border-radius: var(--r-2xl);
    padding: 24px;
    max-width: 480px;
    box-shadow: var(--shadow-3);
    animation: modalIn var(--t-slow) var(--ease-out);
  }
  .modal::before { display: none; }
  @keyframes modalIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
}
.modal h2 { margin: 0 0 6px; font-size: 20px; font-weight: 500; color: var(--ink); }
.modal p.lead { color: var(--muted); margin: 0 0 18px; font-size: 14px; line-height: 140%; }
.modal label { display: block; margin: 12px 0 4px; font-size: 12px; color: var(--muted); font-weight: 400; }
.modal input, .modal textarea {
  width: 100%; border: 1px solid var(--line-strong);
  border-radius: var(--r-md); padding: 12px 14px;
  font: inherit; outline: none; color: var(--ink);
  transition: border-color var(--t-fast);
  font-family: var(--font-text);
}
.modal input:focus, .modal textarea:focus { border-color: var(--brand); }
.modal-actions { display: flex; gap: 8px; margin-top: 22px; }
.modal-actions .btn { flex: 1; }

/* Channel picker tiles */
.ch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.ch-tile {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line);
  background: var(--bg-elevated);
  cursor: pointer;
  font-weight: 500; font-size: 14px;
  transition: border-color var(--t-fast), background var(--t-fast);
  color: var(--ink-2);
}
.ch-tile:hover { background: var(--bg); border-color: var(--line-strong); }
.ch-tile.on { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.ch-tile .ic { font-size: 20px; flex-shrink: 0; }

/* ── Top bar ──────────────────────────────────────────────── */
.top-bar {
  display: flex; align-items: center; gap: 12px;
}
.top-bar .greet .hello { font-size: 12px; color: var(--muted); }
.top-bar .greet .name {
  font-size: 20px; font-weight: 500;
  line-height: 120%; margin-top: 2px; color: var(--ink);
  letter-spacing: -.005em;
}
.top-bar .greet .role {
  display: inline-block; font-size: 11px;
  color: var(--brand); background: var(--brand-50);
  padding: 2px 8px; border-radius: 6px; margin-top: 6px;
  text-transform: uppercase; letter-spacing: .04em; font-weight: 500;
}
.top-bar .right-actions { margin-left: auto; display: flex; gap: 8px; }

/* ── Animations ───────────────────────────────────────────── */
.fade-in > * { animation: fadeUp 480ms var(--ease-out) both; }
.fade-in > *:nth-child(1) { animation-delay: 40ms; }
.fade-in > *:nth-child(2) { animation-delay: 110ms; }
.fade-in > *:nth-child(3) { animation-delay: 180ms; }
.fade-in > *:nth-child(4) { animation-delay: 250ms; }
.fade-in > *:nth-child(5) { animation-delay: 320ms; }
.fade-in > *:nth-child(n+6) { animation-delay: 390ms; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Preview strip (партнёр-дизайнер смотрит кабинет клиента) ─ */
.preview-strip {
  position: sticky; top: 0;
  z-index: 41;
  background: linear-gradient(180deg, var(--brand-50) 0%, rgba(234,242,254,.94) 100%);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(18,106,238,.18);
  padding: calc(var(--safe-top) + 10px) 14px 10px;
  display: flex; align-items: center; gap: 12px;
}
.preview-strip .preview-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--brand);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
}
.preview-strip .preview-text { flex: 1; min-width: 0; }
.preview-strip .preview-cap {
  font-size: 11px; color: var(--brand);
  font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}
.preview-strip .preview-name {
  font-size: 13px; color: var(--ink);
  font-weight: 500; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.preview-strip .preview-back {
  flex-shrink: 0;
  background: #fff; color: var(--brand);
  box-shadow: none;
  border: 1px solid var(--brand-100);
}
.preview-strip .preview-back:hover { background: var(--brand-50); color: var(--brand-dark); }
@media (max-width: 480px) {
  .preview-strip .preview-back { padding: 8px 10px; font-size: 13px; }
  .preview-strip .preview-name { font-size: 12px; }
}

/* ── Demo strip ───────────────────────────────────────────── */
.demo-strip {
  position: sticky; top: 0;
  z-index: 40;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
  padding: calc(var(--safe-top) + 8px) 14px 8px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
}
.demo-strip .label { font-weight: 600; color: var(--brand); letter-spacing: .04em; text-transform: uppercase; font-size: 10px; flex-shrink: 0; }
.demo-strip .tabs {
  display: inline-flex; align-items: center;
  background: var(--bg); border-radius: var(--r-pill);
  padding: 3px; gap: 2px;
  flex: 1; max-width: 360px;
}
.demo-strip .tabs a {
  flex: 1; text-align: center;
  padding: 7px 12px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  transition: background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
}
.demo-strip .tabs a.on { background: #fff; color: var(--brand); box-shadow: var(--shadow-1); }
.demo-strip .home {
  margin-left: auto;
  font-size: 12px; color: var(--muted);
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .demo-strip .label { display: none; }
  .demo-strip .home { display: none; }
}
/* Жёлтая плашка — для is_demo объектов (отдельно от витрины). */
.demo-strip--warn {
  background: #EAF2FE;
  border-bottom: 1px solid #D2E3FD;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.demo-strip--warn .label {
  color: var(--brand-dark);
}
.demo-strip--warn .tabs {
  background: transparent;
  max-width: none;
  padding: 0;
  color: var(--brand-dark);
}

/* ── Utilities (заменяют inline-style — нарушение CLAUDE.md) ─ */
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 14px; } .mt-5 { margin-top: 18px; } .mt-6 { margin-top: 24px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.row-baseline { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.row-start    { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.row-center   { display: flex; align-items: center; gap: 12px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.min-w-0 { min-width: 0; }
.flex-1 { flex: 1; }
.icon-22 { font-size: 22px; flex-shrink: 0; }
.divider-top { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.text-center { text-align: center; }
.pre-wrap { white-space: pre-wrap; }
.fs-amount { font-size: 22px; }
.fs-big { font-size: 32px; line-height: 110%; font-weight: 500; }
.dl-urgent { color: var(--red); font-weight: 500; }
.dl-soon { color: var(--brand); font-weight: 500; }
.dl-ok { color: var(--muted); font-weight: 400; }
.left-mood-urgent { border-left: 3px solid var(--red); }
.left-mood-task   { border-left: 3px solid var(--brand); }
.left-mood-done   { border-left: 3px solid var(--green); }
.left-mood-none   { border-left: 3px solid transparent; }

/* ── Аккордеон списка объектов партнёра (правка Димы Сороки) ── */
.obj-list { display: flex; flex-direction: column; gap: 8px; }
.obj-row {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.obj-row > summary {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  transition: background var(--t-fast) var(--ease-out);
}
.obj-row > summary::-webkit-details-marker { display: none; }
.obj-row > summary:hover { background: var(--brand-50); }
.obj-row[open] > summary { background: var(--brand-50); }
.obj-row > summary .addr { flex: 1; min-width: 0; }
.obj-row > summary .addr .t-strong { font-size: 15px; }
.obj-row > summary .badge { flex-shrink: 0; }
.obj-row-caret {
  flex-shrink: 0; color: var(--muted-2); font-size: 12px;
  transition: transform var(--t-fast) var(--ease-out);
}
.obj-row[open] .obj-row-caret { transform: rotate(180deg); }
.obj-row-body { padding: 4px 14px 14px; border-top: 1px solid var(--line); }
.muted-text { color: var(--muted); }
.muted-light { opacity: .85; }
.brand-color { color: var(--brand); }
.fs-12 { font-size: 12px; }
.fs-14 { font-size: 14px; }
.fs-15 { font-size: 15px; }
.fs-22 { font-size: 22px; font-weight: 500; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 6px; }
.ico-22 { font-size: 22px; flex-shrink: 0; }
.green-text { color: var(--green); }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 14px; }
.file-row { display: flex; align-items: center; gap: 12px; }
.file-row .ico { font-size: 22px; flex-shrink: 0; }
.file-row .ico.ico-svg {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--brand-50, #EAF2FE); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.file-row .ico.ico-svg svg { width: 22px; height: 22px; display: block; }
.file-row .info { flex: 1; min-width: 0; }
.file-row .info .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faq-row { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq-row summary { cursor: pointer; font-weight: 500; font-size: 15px; color: var(--ink); list-style: none; }
.faq-row summary::-webkit-details-marker { display: none; }
.faq-row .answer { padding: 8px 0 0; color: var(--ink-2); font-size: 14px; line-height: 145%; }
.faq-row .badge { margin-right: 8px; }
.file-input { width: 100%; padding: 12px 0; }
.cat-row { color: var(--muted); font-size: 13px; padding: 16px 0 0; text-align: center; }
.obj-card .t-strong { font-size: 16px; letter-spacing: -.005em; }
.stage-title { font-size: 18px; letter-spacing: -.005em; }

/* ── Партнёрская навигация: desktop horizontal / mobile bottom tab bar ─── */

/* На desktop — горизонтальные табы сверху */
.p-nav {
  max-width: 760px; margin: 4px auto 14px;
  padding: 0 12px;
  display: none;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.p-nav::-webkit-scrollbar { display: none; }
.p-nav-tab {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.p-nav-tab:hover { background: var(--bg-elevated); color: var(--ink); text-decoration: none; }
.p-nav-tab.on { background: var(--brand); color: #fff; }
.p-nav-tab.on:hover { color: #fff; background: var(--brand-dark); }

/* На desktop показываем горизонтальные табы; bottom-tab-bar и компактные стили mobile скрываем */
@media (min-width: 768px) {
  .p-nav { display: flex; }
  .p-bottom-nav { display: none !important; }
  body.has-p-tabbar { padding-bottom: 0; }
  body.partner-mobile-compact .brand-bar { display: flex; }
}

/* Bottom tab bar — только на mobile */
.p-bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 35;
  /* iOS Safari лениво перерисовывает fixed+backdrop-filter при скролле —
     бар «уезжает» вместе со страницей. Свой compositing-слой чинит. */
  transform: translateZ(0);
  will-change: transform;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + var(--safe-bottom));
  display: flex; align-items: stretch;
  justify-content: space-around;
}
.p-bottom-nav .tab {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 8px 4px 6px;
  text-decoration: none;
  border-radius: 10px;
  color: var(--muted);
  transition: color 180ms ease-out, background 180ms ease-out;
  font-size: 11px; font-weight: 500;
}
.p-bottom-nav .tab .ic {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  color: currentColor;
}
.p-bottom-nav .tab .ic svg { width: 22px; height: 22px; display: block; }
.p-bottom-nav .tab .lbl { white-space: nowrap; }

/* «Передать» — центральная вкладка с акцентом, но без давящего FAB */
.p-bottom-nav .tab.center .ic {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand);
  margin-top: -2px;
  transition: background 180ms ease-out, color 180ms ease-out;
}
.p-bottom-nav .tab.center .ic svg { width: 18px; height: 18px; }
.p-bottom-nav .tab.center .lbl { color: var(--brand); font-weight: 600; }
.p-bottom-nav .tab.center.on .ic { background: var(--brand); color: #fff; }

.p-bottom-nav .tab:active { transform: scale(.97); }

/* Active state: мягкая светло-синяя подложка, иконка и подпись в брендовом синем */
.p-bottom-nav .tab.on {
  color: var(--brand);
  background: var(--brand-50);
}
.p-bottom-nav .tab.on .lbl { font-weight: 600; }

/* body для партнёрских страниц с tab bar — padding-bottom под него */
body.has-p-tabbar { padding-bottom: 80px; }
body.has-p-tabbar.has-bottom-bar { padding-bottom: 160px; }

/* На mobile прячем горизонтальную верхнюю навигацию (она дублирует bottom-nav) */
@media (max-width: 767px) {
  .p-nav { display: none; }
  /* Логотип PEREPLAN показываем в шапке партнёрского ЛК на mobile
     (по правке Дениса п.1 «Добавить Лого Переплана в моб.версии»). */
  body.partner-mobile-compact .brand-bar { display: flex; padding: calc(var(--safe-top) + 12px) 16px 10px; }
  body.partner-mobile-compact .brand-bar .logo { height: 24px; max-width: 42vw; }
  body.partner-mobile-compact .brand-bar .delim,
  body.partner-mobile-compact .brand-bar .brand-section,
  body.partner-mobile-compact .brand-bar .role-toggle { display: none; }
}

/* ── City selector ────────────────────────────────────────── */
.city-select {
  display: inline-flex; gap: 4px;
  background: var(--bg); border-radius: var(--r-pill);
  padding: 3px;
}
.city-select button {
  border: 0; cursor: pointer;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: transparent; color: var(--ink-2);
  font: inherit; font-size: 13px; font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast);
}
.city-select button.on { background: #fff; color: var(--brand); box-shadow: var(--shadow-1); }

/* ── News list ────────────────────────────────────────────── */
.news-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: 0; }
.news-item .meta { font-size: 12px; color: var(--muted); }
.news-item .ttl { font-size: 16px; font-weight: 500; color: var(--ink); margin-top: 4px; }
.news-item .body { font-size: 14px; color: var(--ink-2); margin-top: 4px; line-height: 145%; }

/* ── Service catalog card ────────────────────────────────── */
.svc-card .head { display: flex; align-items: flex-start; gap: 14px; }
.svc-card .ic {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--brand-50); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.svc-card .price { font-size: 22px; font-weight: 500; color: var(--brand); font-variant-numeric: tabular-nums; }
.svc-card .price.on-request { color: var(--brand); font-size: 17px; font-weight: 500; }
.svc-card .delivery { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ── Document download row ───────────────────────────────── */
.doc-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  color: inherit;
  transition: box-shadow var(--t-fast);
}
.doc-row:hover { box-shadow: var(--shadow-2); text-decoration: none; color: inherit; }
.doc-row .ic { font-size: 26px; flex-shrink: 0; color: var(--brand); }
.doc-row .info { flex: 1; min-width: 0; }
.doc-row .ttl { font-weight: 500; color: var(--ink); }
.doc-row .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.doc-row .open { color: var(--brand); font-size: 14px; font-weight: 500; }

/* ── Hidden works checklist ──────────────────────────────── */
.hw-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--bg-elevated);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow var(--t-fast);
}
.hw-item.done { background: var(--green-bg); box-shadow: inset 0 0 0 1px rgba(31,164,107,.22); }
.hw-item .ic {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--card);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  color: var(--muted);
}
.hw-item.done .ic { background: var(--green); color: #fff; }
.hw-item .info { flex: 1; min-width: 0; }
.hw-item .name { font-weight: 500; color: var(--ink); font-size: 15px; }
.hw-item .hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.hw-item .count { font-size: 12px; color: var(--green); margin-top: 4px; font-weight: 500; }

/* ── Profile form ─────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 600px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-row label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.form-row select.input-text { background: #fff; }

/* ── Contact CTA pair (Фермер / МОП) ─────────────────────── */
.contact-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .contact-pair { grid-template-columns: 1fr; } }
.contact-cta {
  display: flex; gap: 12px; padding: 16px;
  background: var(--card); border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  color: inherit;
  transition: box-shadow var(--t-fast);
}
.contact-cta:hover { box-shadow: var(--shadow-2); text-decoration: none; color: inherit; }
.contact-cta .ic {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--brand-50); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.contact-cta.warn .ic { background: var(--brand-50); color: var(--brand); }
.contact-cta .cap { font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.contact-cta .name { font-weight: 500; color: var(--ink); font-size: 14px; margin-top: 2px; }

/* ── Animation для preview-strip ──────────────────────────── */
.preview-strip { animation: slideDown 280ms var(--ease-out); }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: none; }
}

/* ── Blueprint splash (premium loading, чертится план квартиры) ────────
   Показывается один раз за сессию при первом входе в кабинет. SVG stroke-
   animation, без GIF/видео. Reduced-motion даёт статичный план + быстрое fade.
   Глобальный ENV-флаг BLUEPRINT_SPLASH_ENABLED отключает мгновенно (шаблон
   не рендерится). */
.bp-splash {
  position: fixed; inset: 0;
  z-index: 200;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(18,106,238,.06) 0%, transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(121,187,255,.06) 0%, transparent 55%),
    #FFFFFF;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px;
  padding: 24px;
  animation: bpFadeOut 280ms ease-out 1020ms forwards;
}
.bp-svg {
  width: min(240px, 70vw);
  height: auto;
  color: var(--brand);
  filter: drop-shadow(0 6px 14px rgba(18,106,238,.10));
}
.bp-path {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  /* достаточная длина пунктира, чтобы любой path «вычерчивался» */
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: bpDraw 780ms cubic-bezier(.55,.08,.25,1) forwards;
}
.bp-outer   { animation-delay: 0ms; }
.bp-wall-v  { animation-delay: 220ms; stroke: #6B8CBF; }   /* мягкий серо-синий */
.bp-wall-h  { animation-delay: 320ms; stroke: #6B8CBF; }
.bp-wall-h2 { animation-delay: 360ms; stroke: #6B8CBF; }
.bp-door    { animation-delay: 460ms; stroke: #9AAFD6; stroke-width: 1.2; }
.bp-dim     { animation-delay: 560ms; stroke: #B6C2D6; stroke-width: 0.9; }
.bp-mark    { animation-delay: 720ms; stroke: var(--green); stroke-width: 1.5; }
.bp-check   { animation-delay: 820ms; stroke: var(--green); stroke-width: 1.5; }

@keyframes bpDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes bpFadeOut {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
.bp-caption {
  font-size: 13px; color: var(--muted);
  letter-spacing: .04em; text-transform: uppercase;
  opacity: 0;
  animation: bpCaptionIn 360ms ease-out 660ms forwards;
}
@keyframes bpCaptionIn { to { opacity: 1; } }

.bp-splash--gone { animation: none; opacity: 0; visibility: hidden; pointer-events: none; }

/* Reduced motion — статичный план без черчения + быстрое fade-out (500ms) */
.bp-splash--reduced .bp-path { animation: none; stroke-dashoffset: 0; }
.bp-splash--reduced .bp-caption { opacity: 1; animation: none; }
.bp-splash--reduced {
  animation: bpFadeOut 220ms ease-out 380ms forwards;
}
@media (prefers-reduced-motion: reduce) {
  .bp-path { animation: none; stroke-dashoffset: 0; }
  .bp-caption { opacity: 1; animation: none; }
  .bp-splash { animation: bpFadeOut 220ms ease-out 380ms forwards; }
}

/* App-like home-карточки (мобильный layout) */

/* App-like home-карточки (мобильный layout) */
.app-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.app-tiles-3 { grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 600px) { .app-tiles-3 { grid-template-columns: 1fr 1fr 1fr; } }
.app-tiles-3 .app-tile { flex-direction: row; align-items: center; gap: 14px; }
.app-tiles-3 .app-tile .lbl { margin-top: 0; flex: 1; }
.app-tiles-3 .app-tile .sub { margin-top: 2px; }
.p-greet { padding: 4px 4px 0; }

/* Avatar-инициалы вместо шестерёнки для входа в личный кабинет/профиль */
.profile-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand);
  font-weight: 600; font-size: 14px;
  letter-spacing: .02em;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 140ms, transform 140ms;
  box-shadow: inset 0 0 0 1px rgba(18,106,238,.15);
}
.profile-avatar:hover { background: var(--brand-100); color: var(--brand-dark); text-decoration: none; }
.profile-avatar:active { transform: scale(.95); }
.profile-avatar.on { background: var(--brand); color: #fff; }

.app-tile {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  color: inherit;
  transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.app-tile:hover { box-shadow: var(--shadow-2); text-decoration: none; color: inherit; }
.app-tile:active { transform: scale(.99); }
.app-tile .ic { width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand-50); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; }
.app-tile .lbl { font-size: 14px; font-weight: 500; color: var(--ink); margin-top: 6px; }
.app-tile .sub { font-size: 12px; color: var(--muted); }
.input-text {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  font: inherit; color: var(--ink);
  font-family: var(--font-text);
}
.input-text:focus { outline: none; border-color: var(--brand); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .app-main { padding: 8px 12px 32px; }
  .app-top, .brand-bar { padding-left: 12px; padding-right: 12px; }
  .hero { padding: 18px; border-radius: var(--r-xl); }
  .hero .title { font-size: 22px; }
  .card { padding: 16px; border-radius: var(--r-lg); }
  .kv { grid-template-columns: 1fr 1fr; gap: 12px 14px; }
  .has-bottom-bar { padding-bottom: 110px; }
}

@media (min-width: 768px) {
  .app-main { padding-top: 16px; }
  .hero { padding: 26px; }
  .hero .title { font-size: 26px; }
  .kv { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

/* #8: длинный адрес в hero — максимум 2 строки + многоточие */
.addr-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ============================================================
   PEREPLAN — крафт-проход «Чертёж» (brand-faithful, Roboto)
   Аддитивный блок: только переопределения, ничего не ломает.
   ============================================================ */

/* 1) Атмосфера: ровный светло-серый фон по гайдбуку (#F9F9F9).
      Чертёжная сетка-миллиметровка убрана — давала визуальный шум. */
body {
  background-color: var(--bg);
}

/* 2) Карточки «начерчены» hairline-линией, а не плавают на тенях */
.card {
  border: 1px solid rgba(18,106,238,.10);
  box-shadow: 0 1px 0 rgba(18,106,238,.025);
  border-radius: 18px;
}
.card.elevated { box-shadow: 0 4px 16px rgba(18,106,238,.07); }
.card.tappable:hover {
  box-shadow: 0 8px 22px rgba(18,106,238,.10);
  border-color: rgba(18,106,238,.20);
  transform: translateY(-2px);
}

/* Бирюзовый акцент бренда (из градиентов гайдбука) — деньги/успех */
:root { --accent: #0CD0AE; --accent-ink: #0A9E84; --accent-bg: #E3FBF5; }

/* 3) Подписи секций — как выноски на чертеже */
.sec-h .l { letter-spacing: -.005em; font-size: 15px; }

/* 4) Числа — табличные, Roboto (не моноширинный) */
.t-mono, .kv .v { font-family: var(--font-text); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* деньги/успех — бирюза вместо дженерик-зелёного */
.green, .green-text, .kv .v.green, .t-mono.green { color: var(--accent-ink); }
.badge.done { background: var(--accent-bg); color: var(--accent-ink); }
.tl li.done::before { background: var(--accent); }

/* 5) Hero — чистый фирменный градиент (сетка и план-вотермарк убраны — наезжали на цифры) */
.hero { position: relative; overflow: hidden; border-radius: 22px; }

/* Пустые состояния: фирменный план вместо дженерик-эмодзи */
.empty .ico { font-size: 0; height: auto; line-height: 0; margin-bottom: 14px; }
.empty .ico::before {
  content: ""; display: block; width: 92px; height: 69px; margin: 0 auto;
  background: url('/lk/static/blueprint.svg') no-repeat center / contain; opacity: .9;
}
.hero > * { position: relative; z-index: 1; }
.hero .cap { letter-spacing: .14em; opacity: .8; }
.hero .title.fs-big {
  font-size: 44px; font-weight: 500; line-height: 1.02;
  letter-spacing: -.025em; font-variant-numeric: tabular-nums;
}

/* 6) Просрочка: убираем bootstrap-алерт во весь экран — глубокий бренд-синий,
      красный остаётся только сигнальной кромкой и чипом */
.hero.overdue { background: linear-gradient(135deg, var(--brand-dark) 0%, #0E1F52 100%); }
.hero.overdue { box-shadow: inset 4px 0 0 var(--red); }
.hero.done { background: linear-gradient(135deg, #0CD0AE 0%, #0E7C8C 100%); }

/* 7) CTA — фирменный градиент + мягкая брендовая тень */
.btn-primary, .btn-warn {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-alt) 100%);
  box-shadow: 0 8px 20px rgba(18,106,238,.22);
  letter-spacing: -.01em;
}
.btn-primary:hover, .btn-warn:hover {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  box-shadow: 0 10px 26px rgba(18,106,238,.28);
}
.btn-secondary {
  border: 1px solid rgba(18,106,238,.18); box-shadow: none;
}

/* 8) Навигация: на мобиле только нижний таб-бар (фикс дубля) */
@media (max-width: 719px) { .p-nav { display: none !important; } }

/* нижний таб-бар — стеклянный, чище */
.p-bottom-nav {
  background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid rgba(18,106,238,.10);
}

/* 9) Прогресс — тоньше, фирменно */
.progress { height: 6px; border-radius: 999px; }
.progress > i { border-radius: 999px; }

/* 10) Бейджи — компактные, чертёжные */
.badge { letter-spacing: .01em; border-radius: 8px; }

/* 11) Аватар профиля — монограммная рамка */
.profile-avatar { box-shadow: inset 0 0 0 1.5px rgba(18,106,238,.25); }

/* инлайн line-иконки (фирстиль вместо эмодзи) */
.ic-inline { width: 1.05em; height: 1.05em; display: inline-block; vertical-align: -0.16em; }
.svc-card .ic .ic-inline { width: 22px; height: 22px; vertical-align: middle; }

/* #1/#4: «Ваш заработок» — кликабельная карта */
.hero-link { display:block; text-decoration:none; color:#fff; cursor:pointer; }
.hero-link:hover { color:#fff; box-shadow: 0 10px 26px rgba(18,106,238,.28); }
.hero .hero-go { font-size:12px; opacity:.9; font-weight:500; }
/* #5: убрать цветные левые подсветки строк (статус — в бейдже) */
.obj-row.left-mood-urgent, .obj-row.left-mood-task, .obj-row.left-mood-done, .obj-row.left-mood-none { border-left:none; }
/* #2: реферальная ссылка */
.ref-link { display:block; font-family: var(--font-text); font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; background:var(--brand-50); border:1px solid var(--brand-100); border-radius:12px; padding:12px 14px; color:var(--brand-dark); }

/* Входная анимация: спокойный единый fade вместо дёрганого per-child stagger
   (staggered translateY ловился мид-флайтом и читался как «съехала вёрстка») */
.fade-in > * { animation: none; }
.fade-in { animation: fadeIn 240ms var(--ease-out) both; }

/* Блок реф-сервиса: 3 кнопки (Новый клиент / Реферальная / Контакты) */
.copylinks { display:flex; gap:8px; flex-wrap:wrap; }
.copylinks > * { flex:1 1 30%; min-width:140px; }
.copylink { display:flex; align-items:center; justify-content:center; gap:7px; height:48px; border-radius:12px;
  border:1px solid var(--brand-100); background:#fff; color:var(--brand-dark); font-weight:500; font-size:14px; cursor:pointer; text-decoration:none; }
.copylink:hover { background:var(--brand-50); }
.copylink.primary { background:linear-gradient(135deg,var(--brand),var(--brand-alt)); color:#fff; border:none; box-shadow:0 6px 16px rgba(18,106,238,.22); }
.copylink svg { width:18px; height:18px; flex:0 0 auto; }
.ref-reveal { margin-top:12px; }

/* ── Главная: «Подробнее об уровнях» ── */
.tier-more { border-top:1px solid var(--brand-100); padding-top:10px; }
.tier-more > summary { list-style:none; cursor:pointer; font-weight:600; font-size:14px;
  color:var(--brand-dark); display:flex; align-items:center; gap:6px; }
.tier-more > summary::-webkit-details-marker { display:none; }
.tier-more > summary::after { content:"▾"; font-size:11px; opacity:.6; transition:transform .2s; }
.tier-more[open] > summary::after { transform:rotate(180deg); }
.tier-more-body { margin-top:10px; }
.tier-block { margin-top:14px; padding-top:12px; border-top:1px dashed var(--brand-100); }
.tier-block:first-of-type { border-top:none; padding-top:0; }
.tier-block ul { margin:6px 0 0; padding-left:18px; line-height:1.55; }
.tier-block ul li { margin-bottom:3px; }

/* ── Заказчики: строка поиска ── */
.search-row { display:flex; align-items:center; gap:8px; padding:0 12px;
  background:#fff; border:1px solid var(--brand-100); border-radius:12px; }
.search-row svg { width:18px; height:18px; flex:0 0 auto; color:var(--brand); }
.search-row input { flex:1; border:none; outline:none; background:transparent;
  padding:12px 0; font-size:15px; color:var(--ink); }
.search-empty { padding:14px 4px; color:var(--muted); font-size:14px; text-align:center; }

/* ── Главная: метрики внутри hero «Доступно к выплате» ── */
.hero-stats { margin-top:18px; padding-top:15px; border-top:1px solid rgba(255,255,255,.22);
  display:grid; grid-template-columns:1fr 1fr; gap:14px 14px; }
.hero-stat .k { font-size:11.5px; line-height:1.25; color:rgba(255,255,255,.74);
  letter-spacing:.01em; }
.hero-stat .v { margin-top:3px; font-size:17px; font-weight:600; color:#fff;
  font-variant-numeric:tabular-nums; }

/* ── «Подробнее об уровнях» — ссылка-кнопка ── */
.tier-more-link { display:inline-flex; align-items:center; gap:4px; padding:0;
  background:none; border:none; cursor:pointer; font-size:14px; font-weight:600;
  color:var(--brand); }
.tier-more-link:hover { color:var(--brand-dark); }

/* ── Модалки: крестик + прокрутка длинного контента ── */
.modal { position:relative; }
.modal-x { position:absolute; top:10px; right:12px; width:30px; height:30px;
  border:none; background:none; cursor:pointer; font-size:24px; line-height:1;
  color:var(--muted); border-radius:8px; }
.modal-x:hover { background:var(--brand-50); color:var(--brand-dark); }
.modal-scroll { max-height:82vh; overflow-y:auto; -webkit-overflow-scrolling:touch; }

/* ── hero-метрики: горизонтально в один ряд (override) ── */
.hero-stats { grid-template-columns:repeat(2, 1fr); gap:16px 18px; }
.hero-stat { min-width:0; }
.hero-stat .k { font-size:12.5px; line-height:1.25; }
.hero-stat .v { font-size:18px; white-space:nowrap; }

/* ── Заказчики: чипы-фильтр по статусу ── */
.filter-chips { display:flex; gap:8px; margin-top:10px; overflow-x:auto;
  -webkit-overflow-scrolling:touch; padding-bottom:2px; }
.fchip { flex:0 0 auto; padding:7px 14px; border-radius:999px;
  border:1px solid var(--brand-100); background:#fff; color:var(--brand-dark);
  font-size:13px; font-weight:500; cursor:pointer; white-space:nowrap; }
.fchip.on { background:linear-gradient(135deg,var(--brand),var(--brand-alt));
  color:#fff; border-color:transparent; }

/* ── Пара кнопок в ряд (Полезное → обучение) ── */
.btn-row { display:flex; gap:10px; align-items:stretch; }
.btn-row .btn { flex:1; margin:0; }

/* ── Главная: лента новостей и анонсов ── */
.news-feed { display:flex; flex-direction:column; gap:12px; }
.news-card { display:block; text-decoration:none; background:#fff;
  border:1px solid var(--brand-100); border-radius:16px; padding:15px 16px; color:var(--ink); }
.news-card .news-date { font-size:11.5px; color:var(--muted); letter-spacing:.02em; }
.news-card .news-title { margin-top:5px; font-size:15.5px; font-weight:600; line-height:1.3; }
.news-card .news-body { margin-top:7px; font-size:13.5px; line-height:1.5; color:var(--muted); }
.news-card .news-link { display:inline-block; margin-top:10px; font-size:13px; font-weight:600; color:var(--brand); }
.news-card.feat { background:linear-gradient(135deg,var(--brand),var(--brand-alt));
  border-color:transparent; color:#fff; box-shadow:0 10px 24px rgba(18,106,238,.22); }
.news-card.feat .news-date { color:rgba(255,255,255,.75); }
.news-card.feat .news-body { color:rgba(255,255,255,.9); }
.news-card.feat .news-link { color:#fff; }

/* ── Главная: сводка «объекты в работе» (клик → Заказчики) ── */
.obj-summary { display:flex; align-items:center; gap:13px; background:#fff;
  border:1px solid var(--brand-100); border-radius:16px; padding:14px 16px;
  text-decoration:none; color:var(--ink); }
.obj-summary .os-ic { width:42px; height:42px; flex:0 0 auto; border-radius:12px;
  background:var(--brand-50); color:var(--brand); display:flex; align-items:center; justify-content:center; }
.obj-summary .os-ic svg { width:22px; height:22px; }
.obj-summary .os-info { min-width:0; display:flex; flex-direction:column; }
.obj-summary .os-n { font-size:16px; font-weight:600; }
.obj-summary .os-sub { font-size:12.5px; color:var(--muted); margin-top:2px; }
.obj-summary .os-arr { margin-left:auto; color:var(--brand); font-size:18px; }

/* ── hero: кликабельная метрика «Объекты в работе» → Заказчики ── */
.hero-stat-link { text-decoration:none; color:inherit; display:block; }
.hero-stat-link .v { display:flex; align-items:center; gap:4px; }
.hero-stat-link .hs-arr { font-weight:400; opacity:.85; }
.hero-stat-link:active { opacity:.7; }

/* ── hero: весь низ-блок с метриками кликабелен → Заказчики ── */
.hero-stats-link { display:block; text-decoration:none; color:inherit; }
.hero-stats-link:active { opacity:.85; }
.hero-stats-hint { margin-top:12px; padding-top:11px; border-top:1px solid rgba(255,255,255,.18);
  text-align:right; font-size:12.5px; font-weight:600; color:rgba(255,255,255,.92); }
.hero-stats-hint span { margin-left:3px; }

/* ── Кнопка «Связаться с менеджером партнёрской программы» ── */
.mgr-btn { display:flex; align-items:center; gap:13px; text-decoration:none;
  background:linear-gradient(135deg,var(--brand),var(--brand-alt)); color:#fff;
  border-radius:16px; padding:14px 16px; box-shadow:0 10px 24px rgba(18,106,238,.22); }
.mgr-ic { width:42px; height:42px; flex:0 0 auto; border-radius:12px; background:rgba(255,255,255,.18);
  display:flex; align-items:center; justify-content:center; }
.mgr-ic svg { width:22px; height:22px; }
.mgr-txt { display:flex; flex-direction:column; min-width:0; }
.mgr-t { font-size:15px; font-weight:600; }
.mgr-s { font-size:12.5px; color:rgba(255,255,255,.82); margin-top:1px; }
.mgr-arr { margin-left:auto; font-size:18px; opacity:.9; }

/* ── Главная: лента новостей (вид новостного списка) ── */
.news-block { padding:4px 6px; }
.news-item { display:flex; gap:12px; padding:13px 8px; text-decoration:none;
  color:var(--ink); border-top:1px solid var(--brand-100); }
.news-item:first-child { border-top:none; }
.news-thumb { width:40px; height:40px; flex:0 0 auto; border-radius:11px;
  background:var(--brand-50); color:var(--brand); display:flex; align-items:center; justify-content:center; }
.news-thumb svg { width:21px; height:21px; }
.news-main { min-width:0; display:flex; flex-direction:column; }
.news-date { font-size:11px; color:var(--muted); letter-spacing:.02em; }
.news-title { margin-top:2px; font-size:14.5px; font-weight:600; line-height:1.3; }
.news-body { margin-top:5px; font-size:13px; line-height:1.5; color:var(--muted); }
.news-link { margin-top:8px; font-size:12.5px; font-weight:600; color:var(--brand); }

/* ── Обучение: широкие карточки ── */
.train-card { background:#fff; border:1px solid var(--brand-100); border-radius:14px; padding:13px 14px; }
.train-card .train-ic { width:34px; height:34px; border-radius:10px; background:var(--brand-50);
  color:var(--brand); display:flex; align-items:center; justify-content:center; }
.train-card .train-ic svg { width:19px; height:19px; }
.train-card .train-tag { display:inline-block; margin-top:8px; font-size:11px; font-weight:600;
  color:var(--brand-dark); background:var(--brand-50); padding:2px 9px; border-radius:999px; }
.train-card h3 { margin:6px 0 0; font-size:15px; font-weight:600; line-height:1.25; }
.train-card p { margin:4px 0 11px; font-size:13px; line-height:1.5; color:var(--muted); }
.train-card.accent { background:linear-gradient(160deg,var(--brand-50),#fff); }

/* ── hero-метрики: выравнивание значений по одной линии ── */
.hero-stats { align-items:stretch; gap:4px 10px; }
.hero-stat { display:flex; flex-direction:column; }
.hero-stat .k { line-height:1.25; }
.hero-stat .v { margin-top:auto; padding-top:4px; font-size:18px; }

/* кнопки в ряду реферала — ровные половинки, иконка над/перед текстом */
.btn-row .btn-with-ic { justify-content:center; }

/* ── Профиль: шапка ── */
.profile-head { display:flex; align-items:center; gap:14px; }
.profile-head .ph-av { width:56px; height:56px; flex:0 0 auto; border-radius:50%;
  background:linear-gradient(135deg,var(--brand),var(--brand-alt)); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:20px; font-weight:700; }
.profile-head .ph-name { font-size:18px; font-weight:700; line-height:1.2; }
.profile-head .ph-sub { font-size:13px; color:var(--muted); margin-top:3px; }
.profile-head .ph-lvl { display:inline-block; margin-top:7px; font-size:11.5px; font-weight:600;
  color:var(--brand-dark); background:var(--brand-50); padding:2px 10px; border-radius:999px; }

/* ── Профиль: требования к выплатам ── */
.pay-reqs { margin:13px 0 14px; display:flex; flex-direction:column; gap:9px; }
.pay-req { display:flex; align-items:center; gap:10px; font-size:14px; }
.pay-req .pr-ic { width:23px; height:23px; flex:0 0 auto; border-radius:50%;
  display:flex; align-items:center; justify-content:center; font-size:12.5px; font-weight:600; }
.pay-req .pr-ic.ok { background:#E7F7EF; color:#0E9E6E; }
.pay-req .pr-ic.no { background:var(--brand-50); color:var(--muted); }
.pay-req small { color:var(--muted); margin-left:auto; font-size:12.5px; }

/* ── Заказчики: вложенная лента этапов в раскрытой строке ── */
.stages-disc { border-top:1px solid var(--brand-100); padding-top:11px; }
.stages-disc > summary { list-style:none; cursor:pointer; font-size:13.5px; font-weight:600;
  color:var(--brand-dark); display:flex; align-items:center; justify-content:space-between; }
.stages-disc > summary::-webkit-details-marker { display:none; }
.stages-disc > summary::after { content:"▾"; font-size:11px; opacity:.6; transition:transform .2s; }
.stages-disc[open] > summary::after { transform:rotate(180deg); }
.stages-disc-body { margin-top:10px; }

/* ── Важные уведомления — читается как блок уведомлений (правка #2) ── */
.notice-card { background:var(--brand-50); border:1px solid var(--brand-100); border-left:3px solid var(--brand); }
.notice-card .sec-h { margin-bottom:6px; }
.notice-card .sec-h .l { color:var(--brand-dark); }
.notice-card ol { font-size:14px; color:var(--ink-2); }
.notice-card ol a { font-weight:600; }

/* ===== batch 2026-06-10 ===== */
/* #2 «Важные уведомления» — убрать левую цветную полосу */
.notice-card { border-left:1px solid var(--brand-100); }

/* #4 Новости: заголовок внутри блока */
.news-head { font-size:15px; font-weight:600; color:var(--ink); padding:2px 8px 8px; }
.news-empty { padding:8px; color:var(--muted); font-size:13.5px; line-height:1.5; }

/* #5/#6 Модалки — по центру по вертикали (а не bottom-sheet) на мобайле */
.modal-back { align-items:center; }
.modal { border-radius:var(--r-2xl); animation:modalPop 240ms var(--ease-out); }
.modal::before { display:none; }
@keyframes modalPop { from{opacity:0;transform:translateY(12px) scale(.98);} to{opacity:1;transform:none;} }

/* #7 Заказчики: раскрываемый текущий этап (бар остаётся в summary) */
.stage-disc > summary { list-style:none; cursor:pointer; }
.stage-disc > summary::-webkit-details-marker { display:none; }
.stage-disc-meta { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.stage-disc-caret { font-size:10px; color:var(--muted); transition:transform .2s; }
.stage-disc[open] .stage-disc-caret { transform:rotate(180deg); }

/* #9 Услуги: иконкам svg не задан размер → ломались на мобайле */
.svc-card .ic svg { width:22px; height:22px; display:block; }

/* Заказчики: селект сортировки в ряду чипов */
.sort-box { margin-left:auto; flex:0 0 auto; display:flex; align-items:center; }
.sort-sel { border:1px solid var(--brand-100); border-radius:999px; background:#fff;
  color:var(--brand-dark); font-size:13px; font-weight:500; padding:6px 12px; cursor:pointer; }

/* Главная: шапка — лого слева, аватар справа, имя крупно ниже */
.home-head { padding: 8px 4px 2px; }
.home-head-bar { display:flex; align-items:center; justify-content:space-between; }
.home-head-bar .logo { height:26px; width:auto; display:block; }
.home-name { margin-top:14px; font-size:22px; font-weight:700; line-height:1.15; color:var(--ink); }
.home-sub { margin-top:4px; font-size:13px; color:var(--muted); }

/* iOS не зумит инпут при фокусе, если шрифт >=16px */
.search-row input { font-size:16px; }

/* sticky-hover на тач-экранах: не держать голубой фон после закрытия строки */
@media (hover: none) {
  .obj-row > summary:hover { background: transparent; }
}

/* Убрать подчёркивание у кнопок-ссылок и кликабельных метрик (в т.ч. на тач-hover) */
.btn, .btn:hover, .btn:focus,
.mgr-btn, .mgr-btn:hover, .mgr-btn:focus { text-decoration: none; }
.link-add { display: block; width: fit-content; background: none; border: 0; padding: 6px 0; margin: 0;
  color: var(--brand); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.link-add:active { opacity: .7; }
.modal-list { margin: 0 0 18px; padding-left: 18px; color: var(--ink-2, var(--ink)); font-size: 14px; line-height: 1.5; }
.modal-list li { margin: 4px 0; }
.hero-stats-link, .hero-stats-link:hover, .hero-stats-link:focus,
.hero-stats-link .k, .hero-stats-link .v { text-decoration: none; }

/* Заголовок «Новости и анонсы» — крупнее, как полноценное название блока */
.news-head { font-size:18px; font-weight:700; padding:2px 8px 12px; color:var(--ink); }

/* ===== Главная: полиш типографики и акцентов (один бренд-синий) ===== */
/* 1) hero — сплошной бренд-синий, без навы-градиента (убирает «второй синий») */
.hero, .hero.calm { background: var(--brand); }

/* 2) единый размер заголовков блоков по всему ЛК */
.sec-h .l { font-size: 17px; font-weight: 700; }
.news-head { font-size: 17px; font-weight: 700; padding: 2px 8px 12px; }
.train-card h3 { font-size: 17px; font-weight: 700; }

/* 3) «Связаться с менеджером» — мягкая карточка (не третья синяя заливка) */
.mgr-btn { background: #fff; border: 1px solid var(--brand-100); box-shadow: none; color: var(--ink); }
.mgr-ic { background: var(--brand-50); color: var(--brand); }
.mgr-t { color: var(--ink); }
.mgr-s { color: var(--muted); }
.mgr-arr { color: var(--brand); opacity: 1; }

/* ===== Заказчики: карточка в 2 строки (адрес сверху, заказчик · стадия ниже) ===== */
.obj-head2 { display:flex; align-items:center; gap:10px; }
.obj-head-main { flex:1; min-width:0; }
.obj-head-addr { font-size:15px; font-weight:600; color:var(--ink); line-height:1.25; }
.obj-head-sub { display:flex; align-items:center; gap:6px; margin-top:3px; font-size:12.5px; color:var(--muted); min-width:0; }
.obj-head-client { min-width:0; flex-shrink:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.obj-head-sub .obj-dot { flex-shrink:0; }
.obj-head-sub .obj-stage { color:var(--brand); font-weight:600; white-space:nowrap; flex-shrink:0; }
.obj-head-sub .obj-stage.done { color:#0E9E6E; }
.obj-head-sub .obj-stage.cancel { color:var(--muted); }
/* раскрытие — мягче и аккуратнее на мобилке */
.obj-row[open] > summary { border-bottom:1px solid var(--brand-100); }
.obj-row-body { padding:12px 14px 14px; }

/* Убрать залипающую подсветку при тапе на тач-устройствах (везде) */
button, a, select, summary, label, .fchip, .sort-sel, .tab, .copylink { -webkit-tap-highlight-color: transparent; }
.sort-sel:focus { outline: none; }

/* Q2: единый бренд-градиент — hero + первичные кнопки в одной палитре */
.hero, .hero.calm { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-alt) 100%); }
.btn-primary { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-alt) 100%); }
.btn-primary:hover { background: linear-gradient(135deg, var(--brand-alt) 0%, var(--brand-dark) 100%); }

/* Лого на Главной — как в brand-bar (не скачет при переключении) */
.home-head-bar .logo { height: 24px; max-width: 42vw; }

/* Единая шапка: аватар профиля справа в brand-bar */
.brand-av { margin-left: auto; }
/* Главная: блок имени/уровня под шапкой */
.home-id { padding: 2px 4px 0; }
.home-id .home-name { margin-top: 0; }

/* UI-3: действия партнёра — 3 ровные плитки */
.act-tiles { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.act-tile { display:flex; flex-direction:column; align-items:center; gap:8px; padding:16px 6px;
  border-radius:16px; background:#fff; border:1px solid var(--brand-100); color:var(--ink); cursor:pointer; }
.act-tile .act-ic { width:40px; height:40px; border-radius:12px; background:var(--brand-50);
  color:var(--brand); display:flex; align-items:center; justify-content:center; }
.act-tile .act-ic svg { width:22px; height:22px; }
.act-tile .act-lbl { font-size:12px; font-weight:600; line-height:1.15; text-align:center; }
.act-tile.primary { background:linear-gradient(135deg,var(--brand),var(--brand-alt)); border-color:transparent; color:#fff; }
.act-tile.primary .act-ic { background:rgba(255,255,255,.2); color:#fff; }

/* iOS grouped inset list — действия партнёра (как в Настройках iOS) */
.ios-list { background:#fff; border:1px solid var(--brand-100); border-radius:14px; overflow:hidden; }
.ios-row { display:flex; align-items:center; gap:12px; width:100%; padding:11px 14px;
  background:#fff; border:none; border-top:1px solid var(--line); cursor:pointer; text-align:left;
  color:var(--ink); font-family:inherit; }
.ios-row:first-child { border-top:none; }
.ios-row:active { background:#eef0f3; }
.ios-ic { width:29px; height:29px; border-radius:8px; flex:0 0 auto; color:#fff;
  display:flex; align-items:center; justify-content:center; }
.ios-ic svg { width:18px; height:18px; }
.ios-ic.ic-blue { background:var(--brand); }
.ios-ic.ic-indigo { background:#5B6CF0; }
.ios-ic.ic-gray { background:#8A8F98; }
.ios-row-label { flex:1; font-size:15px; font-weight:500; }
.ios-chevron { color:#c4c7cc; font-size:20px; line-height:1; font-weight:400; }

/* iOS-список действий: компактнее + единый бренд-тон иконок (не пёстрые квадраты) */
.ios-row { padding: 9px 14px; }
.ios-ic, .ios-ic.ic-blue, .ios-ic.ic-indigo, .ios-ic.ic-gray {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--brand-50); color: var(--brand);
}
.ios-ic svg { width: 16px; height: 16px; }
.ios-row-label { font-size: 14.5px; font-weight: 500; }
.ios-chevron { font-size: 17px; }

/* Селектор мессенджера для связи с менеджером (профиль) — компактные пилюли */
.chan-grid { display: flex; gap: 9px; flex-wrap: wrap; }
.chan-opt {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px 6px 6px; border: 1.5px solid var(--border, #e5e9f0); border-radius: 999px;
  background: #fff; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.chan-opt:active { transform: scale(.97); }
.chan-opt.on { border-color: var(--brand); background: var(--brand-50, #eef4ff); }
.chan-ic { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.chan-ic svg { width: 16px; height: 16px; }
.chan-letter { font-size: 14px; font-weight: 700; }
.chan-telegram .chan-ic { background: #29a6e2; }
.chan-max .chan-ic { background: #6d4eff; }
.chan-vk .chan-ic { background: #0077ff; }
.chan-whatsapp .chan-ic { background: #25d366; }
.chan-lbl { font-size: 14px; font-weight: 600; color: var(--ink); }
.chan-opt.on .chan-lbl { color: var(--brand-dark, var(--brand)); }


/* --- feedback #2: кнопки услуг приглушённые (app-like, не лендинг-градиент) --- */
.train-card .btn-primary {
  background: var(--brand-50, #eef4ff);
  color: var(--brand-dark, #1d4ed8);
  box-shadow: none;
}
.train-card .btn-primary:hover {
  background: var(--brand-light, #dbe8ff);
  color: var(--brand-dark, #1d4ed8);
}
.train-card .btn-primary .btn-ic { opacity: .85; }

/* --- feedback #7: мгновенный отклик нижней навигации при тапе --- */
.p-bottom-nav .tab { transition: color .12s ease, opacity .12s ease, transform .08s ease; }
.p-bottom-nav .tab:active { opacity: .55; transform: scale(.94); }


/* #5: аватар-картинка вместо инициалов */
.av-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.profile-head .ph-av, .brand-av { overflow: hidden; }
.ph-photo-btn { display: inline-block; cursor: pointer; font-size: 13.5px; font-weight: 600;
  color: var(--brand); background: var(--brand-50, #eef4ff); padding: 7px 14px; border-radius: 10px; }
.ph-photo-btn:hover { background: var(--brand-light, #dbe8ff); }


/* ================= #3: тёмная iOS-тема — управляется data-theme (резолв в _head) ========= */
/* ─────────────────────────────────────────────────────────────
   Тёмная тема (UI-6, 2026-07-02)
   Полный редизайн: отход от «жёсткого корпоративного синего» —
   акцент сдвигаем в электрик-blue с фиалковым переливом на градиентах,
   даём многослойный фон (bg → surface → elevated), тонкие цветные
   обводки вместо жирного контраста, soft-glow на CTA.
   ───────────────────────────────────────────────────────────── */
:root[data-theme="dark"] {
  /* фон: почти-чёрный с лёгким сине-фиолетовым подтоном (не «пластик») */
  --bg:            #0B0B12;
  --bg-elevated:   #16161F;
  --card:          #17171F;
  --card-2:        #1F1F2A;
  /* текст: белый мягкий, чтобы не выжигал глаза */
  --ink:           #F4F5F8;
  --ink-2:         #DFE0E6;
  --ink-3:         #ABADB8;
  --muted:         #7E7F8A;
  --muted-2:       #5B5C66;
  /* линии — прозрачно-белые + чуть акцентные на strong */
  --line:          rgba(255,255,255,.06);
  --line-strong:   rgba(255,255,255,.14);
  /* акцент 1: электрик-blue (CTA, ссылки, active) */
  --brand:         #5B9EFB;
  --brand-alt:     #7B84FB;      /* переход к фиалке для градиента */
  --brand-dark:    #4386E8;      /* hover */
  --brand-light:   #A8C7FF;      /* текст акцента на dark */
  --brand-50:      rgba(91,158,251,.14);   /* subtle bg-plash */
  --brand-100:     rgba(91,158,251,.26);
  /* статусные фоны — приглушённее и с оттенком */
  --green:         #34D69B;
  --green-bg:      rgba(52,214,155,.14);
  --orange:        #F0B04A;
  --orange-bg:     rgba(240,176,74,.14);
  --red:           #FF7A6E;
  --red-bg:        rgba(255,122,110,.14);
  /* тени — глубокие мягкие, без сине-хайлайта */
  --shadow-1:      0 1px 2px rgba(0,0,0,.4);
  --shadow-2:      0 4px 14px rgba(0,0,0,.45);
  --shadow-3:      0 10px 32px rgba(0,0,0,.55);
}

/* базовые слои */
[data-theme="dark"] body { background: var(--bg); color: var(--ink-2); }
[data-theme="dark"] .brand-bar { background: var(--bg); }
[data-theme="dark"] .brand-bar .brand-section { color: var(--ink); }

/* Карточки/блоки — единая surface + тонкая обводка вместо жёстких границ */
[data-theme="dark"] .card,
[data-theme="dark"] .news-card,
[data-theme="dark"] .news-block,
[data-theme="dark"] .obj-summary,
[data-theme="dark"] .train-card,
[data-theme="dark"] .ios-list,
[data-theme="dark"] .sort-sel,
[data-theme="dark"] .city-select button,
[data-theme="dark"] .demo-strip .tabs a,
[data-theme="dark"] .modal {
  background: var(--card);
  color: var(--ink-2);
  border: 1px solid var(--line);
  box-shadow: none;
}
[data-theme="dark"] .train-card.accent {
  background: linear-gradient(135deg, rgba(91,158,251,.10) 0%, rgba(123,132,251,.08) 100%);
  border: 1px solid var(--brand-50);
}

/* iOS-list (row-based) — без внешней обводки */
[data-theme="dark"] .ios-list { border-color: var(--line); }
[data-theme="dark"] .ios-row { background: transparent; border-top-color: var(--line); color: var(--ink-2); }
[data-theme="dark"] .ios-row:hover { background: rgba(255,255,255,.02); }

/* «Связаться с менеджером» — мягкий синий блок с glow */
[data-theme="dark"] .mgr-btn {
  background: linear-gradient(135deg, rgba(91,158,251,.14) 0%, rgba(123,132,251,.10) 100%);
  border: 1px solid var(--brand-50);
  color: var(--ink);
}
[data-theme="dark"] .mgr-btn:hover { border-color: var(--brand-100); }
[data-theme="dark"] .mgr-t { color: var(--ink); }
[data-theme="dark"] .mgr-s { color: var(--ink-3); }
[data-theme="dark"] .mgr-ic { color: var(--brand-light); }
[data-theme="dark"] .mgr-arr { color: var(--brand-light); }

/* CTA — заметный градиент, читаемый белый текст, glow */
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-warn {
  background: linear-gradient(135deg, #5B9EFB 0%, #7B84FB 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(91,158,251,.28), 0 1px 0 rgba(255,255,255,.10) inset;
}
[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-warn:hover {
  background: linear-gradient(135deg, #4A8CE8 0%, #6971E8 100%);
  box-shadow: 0 6px 20px rgba(91,158,251,.35), 0 1px 0 rgba(255,255,255,.10) inset;
  color: #fff;
}
[data-theme="dark"] .btn-secondary {
  background: var(--card-2);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
[data-theme="dark"] .btn-secondary:hover { background: rgba(255,255,255,.05); color: var(--ink); }
[data-theme="dark"] .btn-ghost { color: var(--brand-light); }
[data-theme="dark"] .btn:disabled,
[data-theme="dark"] .btn[disabled] {
  background: var(--card-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); opacity: .6;
}

/* Iconки-кнопки */
[data-theme="dark"] .icon-btn { background: var(--card-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
[data-theme="dark"] .icon-btn:hover { background: rgba(255,255,255,.05); }
[data-theme="dark"] .icon-btn.brand {
  background: linear-gradient(135deg, #5B9EFB 0%, #7B84FB 100%);
  color: #fff; box-shadow: 0 4px 12px rgba(91,158,251,.28);
}

/* Hero — насыщенный blue→violet, glow */
[data-theme="dark"] .hero,
[data-theme="dark"] .hero.calm {
  background: linear-gradient(135deg, #4A6BFB 0%, #7B4FE9 100%);
  color: #fff;
  box-shadow: 0 8px 32px rgba(74,107,251,.20);
}
[data-theme="dark"] .hero.task {
  background: linear-gradient(135deg, #6BB5FF 0%, #4C6BFB 100%);
}

/* Card-CTA (например «Требуется от вас») */
[data-theme="dark"] .card-cta {
  background: linear-gradient(135deg, rgba(91,158,251,.10) 0%, rgba(123,132,251,.06) 100%);
  box-shadow: inset 0 0 0 1px var(--brand-50), var(--shadow-2);
}
[data-theme="dark"] .card-cta:hover { box-shadow: inset 0 0 0 1px var(--brand-100), var(--shadow-3); }

/* «Требуется» плашка — читаемая на тёмном */
[data-theme="dark"] .required {
  background: linear-gradient(135deg, rgba(91,158,251,.12) 0%, rgba(123,132,251,.08) 100%);
  box-shadow: inset 0 0 0 1px var(--brand-50);
}
[data-theme="dark"] .required .cap { color: var(--brand-light); }
[data-theme="dark"] .required .title { color: var(--ink); }
[data-theme="dark"] .required .body { color: var(--ink-2); opacity: 1; }

/* Badge */
[data-theme="dark"] .badge.brand,
[data-theme="dark"] .badge.calm { background: var(--brand-50); color: var(--brand-light); }
[data-theme="dark"] .badge.task { background: var(--brand); color: #fff; }
[data-theme="dark"] .badge.mute { background: var(--card-2); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }
[data-theme="dark"] .badge.warn { background: linear-gradient(135deg, #5B9EFB, #7B84FB); color: #fff; }

/* KV, персона, тайминг */
[data-theme="dark"] .kv .v.brand { color: var(--brand-light); }
[data-theme="dark"] .person .name { color: var(--ink); }
[data-theme="dark"] .tl li.active::before { background: var(--brand); box-shadow: 0 0 0 4px rgba(91,158,251,.20); }

/* Секционные заголовки/сепараторы */
[data-theme="dark"] .sec-h .l { color: var(--ink); }
[data-theme="dark"] .sec-h .r { color: var(--muted); }

/* Форма — единый стиль тёмных полей */
[data-theme="dark"] .input-text,
[data-theme="dark"] textarea.input-text,
[data-theme="dark"] select.input-text,
[data-theme="dark"] .form-row select.input-text,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input:not([type]),
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: var(--card-2);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
}
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] .input-text:focus,
[data-theme="dark"] .modal input:focus,
[data-theme="dark"] .modal textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(91,158,251,.18);
  outline: none;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder,
[data-theme="dark"] .input-text::placeholder { color: var(--muted-2); }

/* Модалка */
[data-theme="dark"] .modal { border: 1px solid var(--line-strong); box-shadow: 0 -8px 40px rgba(0,0,0,.60); }
[data-theme="dark"] .modal h2 { color: var(--ink); }
[data-theme="dark"] .modal p.lead { color: var(--ink-3); }
[data-theme="dark"] .modal label { color: var(--muted); }
[data-theme="dark"] .modal-x { color: var(--ink-3); background: transparent; }
[data-theme="dark"] .modal-x:hover { background: rgba(255,255,255,.05); color: var(--ink); }
[data-theme="dark"] .modal-back { background: rgba(0,0,0,.55); }

/* Nav (низ) */
[data-theme="dark"] .p-bottom-nav {
  background: rgba(17,17,25,.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}

/* Каналы связи (chan-opt) */
[data-theme="dark"] .chan-opt {
  background: var(--card-2);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
}
[data-theme="dark"] .chan-opt:hover { border-color: var(--brand); }
[data-theme="dark"] .chan-opt.on {
  background: linear-gradient(135deg, rgba(91,158,251,.16) 0%, rgba(123,132,251,.12) 100%);
  border-color: var(--brand);
}
[data-theme="dark"] .chan-opt .chan-lbl { color: var(--ink); }
[data-theme="dark"] .chan-opt.on .chan-lbl { color: var(--brand-light); font-weight: 600; }

/* Поиск (search-row) */
[data-theme="dark"] .search-row { background: var(--card); border: 1px solid var(--line-strong); }
[data-theme="dark"] .search-row input { background: transparent; color: var(--ink); border: none; }
[data-theme="dark"] .fchip { background: var(--card); color: var(--brand-light); border-color: var(--line-strong); }
[data-theme="dark"] .fchip.on { background: linear-gradient(135deg,var(--brand),var(--brand-alt)); color: #fff; border-color: transparent; }

/* Ссылки и «брендовые» тексты — светло-голубые для читаемости */
[data-theme="dark"] a,
[data-theme="dark"] .news-all,
[data-theme="dark"] .tier-more-link,
[data-theme="dark"] .brand-color,
[data-theme="dark"] .ref-link,
[data-theme="dark"] .notice-card .sec-h .l { color: var(--brand-light); }
[data-theme="dark"] a:hover { color: #C7D9FF; }

/* Toast */
[data-theme="dark"] .toast { background: var(--card-2); color: var(--ink); border: 1px solid var(--line-strong); }
[data-theme="dark"] .toast.ok { border-color: rgba(52,214,155,.40); }
[data-theme="dark"] .toast.err { border-color: rgba(255,122,110,.40); }

/* переключатель темы (профиль) — работает и в light и в dark */
.theme-row { display:flex; gap:8px; }
.theme-opt {
  flex:1; padding:9px 6px; border:1.5px solid var(--line-strong);
  border-radius:11px; background:var(--card); color:var(--ink-2);
  font-size:13.5px; font-weight:600; cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  transition: all var(--t-fast, .16s) var(--ease-out, ease);
}
.theme-opt.on { border-color:var(--brand); background:var(--brand-50); color:var(--brand); }
[data-theme="dark"] .theme-opt.on { color: var(--brand-light); }

.news-all { display:block; text-align:center; padding:12px 8px 2px; font-size:13.5px; font-weight:500; color:var(--brand); text-decoration:none; }
