/* Reynard. Компоненты из брендбука (раздел 12) и общие элементы интерфейса. */

.i { flex: none; display: inline-block; vertical-align: -0.2em; }

/* Кнопки. Главная оранжевая с белым диском, одна на экран. */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--r-full);
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  white-space: nowrap;
  user-select: none;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.btn:active { transform: scale(.98); }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn .i { width: 18px; height: 18px; }

.btn-primary { background: var(--fox); color: var(--on-fox); }
.btn-primary:hover { box-shadow: var(--shadow-warm); }
.btn-primary.has-disc { padding-right: 5px; gap: 14px; }
.btn-disc {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #15120F;
  display: grid;
  place-items: center;
  flex: none;
}
.btn-disc .i { width: 18px; height: 18px; transition: transform var(--t-fast) var(--ease); }
.btn-primary:hover .btn-disc .i, .btn-primary:focus-visible .btn-disc .i { transform: rotate(45deg); }

.btn-dark { background: var(--inverse); color: var(--on-inverse); }
.btn-dark:hover { opacity: .9; }
.btn-raised { background: var(--raised); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-raised:hover { box-shadow: var(--shadow-md); }
.btn-soft { background: var(--sunken); color: var(--ink); }
.btn-soft:hover { background: var(--line); }
.btn-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-outline:hover { background: var(--sunken); }
.btn-danger { background: var(--danger); color: #FFFFFF; }
.btn-danger:hover { opacity: .9; }
.btn-link { height: auto; padding: 0; border-radius: 4px; color: var(--ink); gap: 6px; }
.btn-link .i { transition: transform var(--t-fast) var(--ease); }
/* Стрелка ссылки сдвигается по своему направлению: назад и вперёд строго по горизонтали, «наружу» по диагонали. */
.btn-link:hover .i-arrow-up-right, .btn-link:hover .i-external-link { transform: translate(2px, -2px); }
.btn-link:hover .i-arrow-left { transform: translateX(-3px); }
.btn-link:hover .i-arrow-right { transform: translateX(3px); }
.btn-link.is-muted { color: var(--ink-muted); }

.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; gap: 8px; }
.btn-sm .i { width: 16px; height: 16px; }
.btn-sm.btn-primary.has-disc { padding-right: 4px; }
.btn-sm .btn-disc { width: 28px; height: 28px; }
.btn-sm .btn-disc .i { width: 15px; height: 15px; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 16px; }
.btn-lg.btn-primary.has-disc { padding-right: 6px; }
.btn-lg .btn-disc { width: 42px; height: 42px; }
.btn-block { width: 100%; }

.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: none;
  color: var(--ink);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.icon-btn .i { width: 20px; height: 20px; }
.icon-btn:active { transform: scale(.96); }
.icon-btn.raised { background: var(--raised); box-shadow: var(--shadow-sm); }
.icon-btn.raised:hover { box-shadow: var(--shadow-md); }
.icon-btn.fox { background: var(--fox); color: var(--on-fox); }
.icon-btn.ink { background: var(--inverse); color: var(--on-inverse); }
.icon-btn.soft { background: var(--sunken); }
.icon-btn.soft:hover { background: var(--line); }
.icon-btn.ghost:hover { background: var(--sunken); }
.icon-btn.sm { width: 36px; height: 36px; }
.icon-btn.sm .i { width: 18px; height: 18px; }
.icon-btn.xs { width: 30px; height: 30px; }
.icon-btn.xs .i { width: 16px; height: 16px; }
.icon-btn.lg { width: 52px; height: 52px; }
.icon-btn .pip {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--fox);
  box-shadow: 0 0 0 2px var(--raised);
}
.icon-btn.lg .pip { top: 11px; right: 12px; }
/* Метка с числом непрочитанного. Цифра строго по центру круга. */
.icon-btn .pip.num {
  top: 5px;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: var(--on-fox);
  font-variant-numeric: tabular-nums;
}
.icon-btn.lg .pip.num { top: 7px; right: 6px; }
.arrow-btn .i { transition: transform var(--t-fast) var(--ease); }
.arrow-btn:hover .i { transform: rotate(45deg); }

/* Вкладки. Активная залита ink. */
.tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border-radius: var(--r-full);
  background: var(--raised);
  box-shadow: var(--shadow-sm);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  flex: none;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.tab:hover { background: var(--sunken); }
.tab .i { width: 18px; height: 18px; display: none; }
.tab.active { background: var(--inverse); color: var(--on-inverse); }
.tab.active .i { display: block; }
.tab .count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--r-full);
  background: var(--fox-soft);
  color: var(--fox-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  display: inline-grid;
  place-items: center;
}
.tab.active .count { background: var(--fox); color: var(--on-fox); }
.tabs-sm { padding: 4px; }
.tabs-sm .tab { height: 36px; padding: 0 15px; font-size: 14px; }
.tabs-sm .tab .i { width: 16px; height: 16px; display: block; }

/* Сегменты. Переключатели вида и режима. */
.seg {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border-radius: var(--r-full);
  background: var(--sunken);
}
.seg button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.seg button .i { width: 16px; height: 16px; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--raised); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg.lg button { height: 42px; padding: 0 18px; font-size: 15px; }

/* Бейджи статусов. Цвет всегда вместе со словом. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--r-full);
  background: var(--sunken);
  color: var(--ink);
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.badge .i { width: 14px; height: 14px; }
.badge.sm { height: 24px; padding: 0 10px; font-size: 12px; gap: 6px; }
.badge.sm .dot { width: 6px; height: 6px; }
.badge.fox { background: var(--fox-soft); color: var(--fox-ink); }
.badge.success { color: var(--success); }
.badge.info { color: var(--info); }
.badge.danger { color: var(--danger); }
.badge.muted { color: var(--ink-muted); }
.badge.solid { background: var(--inverse); color: var(--on-inverse); }
.badge.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
a.badge, button.badge { transition: box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
a.badge:hover, button.badge:hover { box-shadow: inset 0 0 0 1px currentColor; }

/* Чипы. Удалить крестиком, добавить пунктиром. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-full);
  background: var(--sunken);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.chip .i { width: 15px; height: 15px; }
.chip .x {
  width: 20px;
  height: 20px;
  margin-right: -6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-muted);
}
.chip .x:hover { background: var(--line); color: var(--ink); }
.chip .x .i { width: 13px; height: 13px; }
.chip.add { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); border: 0; color: var(--ink-muted); cursor: pointer; }
.chip.add:hover { color: var(--ink); background: var(--sunken); }
.chip.pick { cursor: pointer; }
.chip.pick:hover { background: var(--line); }
.chip.pick.on { background: var(--inverse); color: var(--on-inverse); }
.chip.raised { background: var(--raised); box-shadow: var(--shadow-sm); }
.chip.leaving { animation: leave var(--t-fast) var(--ease) forwards; }

/* Карточки. Белая на камне, радиус 24, стрелка в круге ведёт в детали. */
.card {
  position: relative;
  background: var(--raised);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  min-width: 0;
  transition: box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.card.pad-lg { padding: 28px; }
.card.pad-sm { padding: 18px; }
.card.pad-0 { padding: 0; }
.card.selected { box-shadow: inset 0 0 0 1.5px var(--fox), var(--shadow-warm); }
.card.flat { box-shadow: none; background: var(--sunken); }
.card.outline { box-shadow: inset 0 0 0 1px var(--line); background: transparent; }
a.card:hover, .card.hoverable:hover { box-shadow: var(--shadow-md); }
a.card.selected:hover { box-shadow: inset 0 0 0 1.5px var(--fox), var(--shadow-warm); }
.card-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.card-head + * { margin-top: 20px; }
.card-head .grow { flex: 1; min-width: 0; }

/* Складной раздел. Головка это кнопка во всю ширину, свёрнутое тело места не занимает. */
.fold-head { gap: 12px; }
.fold-toggle { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; text-align: left; border-radius: var(--r-lg); }
.fold-toggle > .grow { flex: 1; min-width: 0; }
.fold-toggle .card-title, .fold-toggle .card-sub { display: block; }
.fold-note { flex: none; font-size: 14px; line-height: 20px; color: var(--ink-muted); white-space: nowrap; }
.fold-chev {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--ink-muted);
  transition: transform var(--t-panel) var(--ease), background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.card.fold.open .fold-chev { transform: rotate(180deg); }
.fold-toggle:hover .fold-chev, .fold-toggle:focus-visible .fold-chev { background: var(--sunken); color: var(--ink); }
.fold-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows var(--t-panel) var(--ease); }
.card.fold > .fold-body { margin-top: 0; }
/* overflow: hidden нужен сворачиванию, но обрезал обводку фокуса у полей по краям: даём ей место отступами. */
.fold-body > .fold-in { min-height: 0; overflow: hidden; padding: 20px 4px 4px; margin: 0 -4px -4px; transition: padding-top var(--t-panel) var(--ease), visibility 0s; }
.card.fold:not(.open) > .fold-body { grid-template-rows: 0fr; }
.card.fold:not(.open) > .fold-body > .fold-in { padding-top: 0; visibility: hidden; transition: padding-top var(--t-panel) var(--ease), visibility 0s linear var(--t-panel); }
.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--sunken);
  display: grid;
  place-items: center;
  flex: none;
}
.card-icon .i { width: 20px; height: 20px; }
.card-icon.sm { width: 38px; height: 38px; }
.card-icon.sm .i { width: 18px; height: 18px; }
.card-icon.fox { background: var(--fox-soft); color: var(--fox-ink); }
.card-icon.ink { background: var(--inverse); color: var(--on-inverse); }
.card-title { font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: -.01em; }
.card-title.sm { font-size: 17px; line-height: 24px; }
.card-sub { font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* Цифры. Главная крупная и лёгкая. */
.stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 48px;
  line-height: 52px;
  font-weight: 300;
  letter-spacing: -.035em;
  white-space: nowrap;
}
.stat-value .unit { font-size: 24px; letter-spacing: 0; color: var(--ink-muted); }
.stat-value .delta { margin-left: 10px; align-self: center; }
.stat-label { font-size: 16px; line-height: 22px; color: var(--ink-muted); }
.stat.sm .stat-value { font-size: 34px; line-height: 40px; }
.stat.sm .stat-value .unit { font-size: 18px; }
.stat.sm .stat-label { font-size: 14px; line-height: 20px; }
.stat.xl .stat-value { font-size: 56px; line-height: 60px; }
/* Подпись над числом: «Осталось», а под числом остальное. */
.stat-top { font-size: 14px; color: var(--ink-muted); margin-bottom: 4px; }
.delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--ink);
}
.delta::after { content: ''; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; }
.delta.up::after { border-bottom: 9px solid currentColor; }
.delta.down { color: var(--danger); }
.delta.down::after { border-top: 9px solid currentColor; }
.delta.good-down { color: var(--success); }
.delta.good-down::after { border-top: 9px solid currentColor; }

/* Шкала 0–100. */
.gauge { position: relative; display: grid; justify-items: center; }
.gauge svg { overflow: visible; }
.gauge .g-track { stroke: var(--track); }
.gauge .g-value { stroke: var(--fox); animation: arc-fill 900ms var(--ease) both; }
.gauge.info .g-value { stroke: var(--info); }
.gauge.danger .g-value { stroke: var(--danger); }
.gauge.success .g-value { stroke: var(--success); }
.gauge.ink .g-value { stroke: var(--ink); }
.gauge-num {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  text-align: center;
  font-size: 44px;
  line-height: 48px;
  font-weight: 300;
  letter-spacing: -.035em;
}
.gauge.sm .gauge-num { font-size: 26px; line-height: 30px; bottom: -4px; }
.gauge.md .gauge-num { font-size: 34px; line-height: 38px; bottom: -5px; }
.gauge-label { margin-top: 14px; text-align: center; font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* Кольцо оценки лида. */
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .r-track { stroke: var(--track); }
.ring .r-value { stroke: var(--ink); animation: arc-fill 900ms var(--ease) both; }
.ring.fox .r-value { stroke: var(--fox); }
.ring span { position: absolute; font-size: 13px; font-weight: 700; }
.ring.lg span { font-size: 22px; font-weight: 400; letter-spacing: -.02em; }

/* Набор текста. Три точки логотипа, цикл 1.2 с. */
.dots { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: typing-dot 1.2s var(--ease) infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
.dots.paused i, .is-stopped .dots i { animation: none; opacity: .55; }
@media (prefers-reduced-motion: reduce) {
  .dots i { animation: none !important; opacity: 1 !important; transform: none !important; }
}
.typing {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r-full);
  background: var(--fox-soft);
  color: var(--fox-ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
}
.typing .dots { color: var(--fox); }
/* Обрезаем только длинный текст: у точек своя анимация со сдвигом вверх, и overflow срезал бы им верх. */
.typing > span:not(.dots) { overflow: hidden; text-overflow: ellipsis; }
.typing.neutral { background: var(--sunken); color: var(--ink-muted); }
.typing.neutral .dots { color: var(--ink-muted); }
.typing.sm { height: 28px; padding: 0 11px; font-size: 13px; gap: 8px; }
.typing.sm .dots i { width: 6px; height: 6px; }
.type-block {
  width: 58px;
  height: 38px;
  border-radius: 14px;
  background: var(--fox);
  display: grid;
  place-items: center;
  color: #FFFFFF;
  flex: none;
}
.type-block .dots i { width: 7px; height: 7px; }
.type-block.sm { width: 42px; height: 30px; border-radius: 11px; }
.type-block.sm .dots { gap: 3px; }
.type-block.sm .dots i { width: 5px; height: 5px; }
.type-block.off { background: var(--track); }
.type-block.off .dots i { animation: none; opacity: .9; }

/* Аватары. */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  background: var(--sunken);
  color: var(--ink);
  flex: none;
  overflow: hidden;
}
.avatar.fox { background: var(--fox-soft); color: var(--fox-ink); }
.avatar.ink { background: var(--inverse); color: var(--on-inverse); }
.avatar.raised { background: var(--raised); box-shadow: var(--shadow-sm); }
.avatar.ring-white { box-shadow: 0 0 0 2px var(--raised); }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.xs { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.avatar.xl { width: 72px; height: 72px; font-size: 22px; }
.avatar.agent { background: var(--fox-soft); }
.avatar.agent svg { width: 58%; height: auto; }
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px var(--bg); }
.avatar-stack .avatar + .avatar { margin-left: -8px; }
.card .avatar-stack .avatar { box-shadow: 0 0 0 2px var(--raised); }

/* Поля ввода. */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label { font-size: 14px; line-height: 20px; font-weight: 600; }
.field-hint { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.input, .select, .textarea {
  width: 100%;
  min-width: 0;
  background: var(--raised);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  font-size: 15px;
  line-height: 22px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.input, .select { height: 46px; border-radius: var(--r-full); padding: 0 18px; }
.input::placeholder, .textarea::placeholder { color: var(--ink-muted); opacity: .8; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-color: var(--ink); }
.input-wrap { position: relative; display: flex; align-items: center; min-width: 0; }
.input-wrap > .i { position: absolute; left: 17px; width: 18px; height: 18px; color: var(--ink-muted); pointer-events: none; }
.input-wrap .input { padding-left: 46px; }
.input-wrap .suffix { position: absolute; right: 16px; font-size: 14px; color: var(--ink-muted); pointer-events: none; }
.input.sm, .select.sm { height: 38px; font-size: 14px; padding: 0 14px; }
.input-wrap .input.sm { padding-left: 40px; }
.input-wrap .input.sm ~ .suffix, .input-wrap .suffix { font-size: 13px; }
.input-wrap:has(.input.sm) > .i { left: 14px; width: 16px; height: 16px; }
.input-wrap.no-ico .input { padding-left: 18px; }
/* Поле без значка: текст и подсказка ровно по центру. */
.lim-in .input, .lim-in .input.sm { padding-left: 14px; padding-right: 14px; text-align: center; }
/* Глазок пароля: круглая кнопка внутри поля справа, иконка Lucide того же веса, что слева. */
.input-wrap.has-eye .input { padding-right: 50px; }
.pw-eye {
  position: absolute;
  right: 5px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-muted);
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.pw-eye .i { width: 18px; height: 18px; }
.pw-eye:hover { color: var(--ink); background: var(--sunken); }
.pw-eye:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; color: var(--ink); }
.pw-eye[aria-pressed="true"] { color: var(--ink); }
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236B635B' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.select.sm { padding-right: 36px; background-position: right 12px center; }
.textarea { border-radius: var(--r-lg); padding: 13px 16px; resize: vertical; min-height: 96px; display: block; }
/* Уголок растягивания поля. Свой рисунок двумя штрихами цвета ink-muted: родной тёмный терялся
   в тёмной теме и под рамкой фокуса. Штрихи прижаты к верхнему левому краю уголка, чтобы скругление
   поля их не срезало. */
.textarea::-webkit-resizer {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 11 11' fill='none' stroke='%236B635B' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M10 2 2 10M10 6 6 10'/%3E%3C/svg%3E") no-repeat left top;
}
:root[data-theme="dark"] .textarea::-webkit-resizer {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 11 11' fill='none' stroke='%23A9A097' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M10 2 2 10M10 6 6 10'/%3E%3C/svg%3E");
}
.input.ok, .textarea.ok { border-color: var(--success); }

/* Переключатель. Включён ink: оранжевый остаётся для главного действия. */
.switch {
  position: relative;
  width: 46px;
  height: 28px;
  border-radius: var(--r-full);
  background: var(--track);
  flex: none;
  transition: background-color var(--t-fast) var(--ease);
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(21, 18, 15, .25);
  transition: transform var(--t-fast) var(--ease);
}
.switch.on { background: var(--inverse); }
.switch.on::after { transform: translateX(18px); background: var(--raised); }
:root[data-theme="dark"] .switch.on::after { background: #15120F; }
.switch.locked { opacity: .55; cursor: not-allowed; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.switch-row .txt { min-width: 0; }

/* Ползунок. */
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
  cursor: pointer;
  --p: 50%;
}
.range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: var(--r-full);
  background: linear-gradient(to right, var(--inverse) 0 var(--p), var(--track) var(--p) 100%);
}
.range::-moz-range-track { height: 8px; border-radius: var(--r-full); background: var(--track); }
.range::-moz-range-progress { height: 8px; border-radius: var(--r-full); background: var(--inverse); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--raised);
  border: 2px solid var(--inverse);
  box-shadow: var(--shadow-sm);
}
.range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--raised); border: 2px solid var(--inverse); }

/* Прогресс. */
.progress { position: relative; height: 8px; border-radius: var(--r-full); background: var(--track); overflow: hidden; }
.progress > i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 0%);
  border-radius: inherit;
  background: var(--inverse);
  transition: width 600ms var(--ease);
}
.progress.fox > i { background: var(--fox); }
.progress.success > i { background: var(--success); }
.progress.danger > i { background: var(--danger); }
.progress.info > i { background: var(--info); }
.progress.lg { height: 12px; }
.progress.xs { height: 5px; }

/* Списки и строки. */
.list { display: flex; flex-direction: column; }
.list > .li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.list > .li:first-child { padding-top: 0; }
.list > .li:last-child { border-bottom: 0; padding-bottom: 0; }
.list > a.li { transition: opacity var(--t-fast) var(--ease); }
/* Строка-кнопка (звонок в списке): выглядит как строка, открывает окно. */
.list > button.li { width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.list > button.li:hover .li-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.list > a.li:hover .li-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.li-main { flex: 1; min-width: 0; }
.li-title { font-size: 15px; line-height: 22px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.li-sub { font-size: 14px; line-height: 20px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; }
.li-side { flex: none; display: flex; align-items: center; gap: 10px; color: var(--ink-muted); font-size: 14px; }
.li.clip .li-title, .li.clip .li-sub { white-space: nowrap; }

.kv { display: flex; flex-direction: column; gap: 12px; }
.kv-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 15px; line-height: 22px; }
.kv-row .k { color: var(--ink-muted); flex: none; }
.kv-row .v { text-align: right; font-weight: 500; min-width: 0; }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Таблицы. */
.table-wrap { overflow-x: auto; margin-left: -8px; margin-right: -8px; padding: 0 8px; }
.table { width: 100%; font-size: 15px; line-height: 22px; }
.table th {
  text-align: left;
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 0 14px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th:first-child, .table td:first-child { padding-left: 4px; }
.table th:last-child, .table td:last-child { padding-right: 4px; }
.table tbody tr { transition: background-color var(--t-fast) var(--ease); }
.table tbody tr.link { cursor: pointer; }
.table tbody tr.link:hover td { background: var(--bg); }
.table .r { text-align: right; }
.table .c { text-align: center; }
.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--ink); }
.table .cell-lead { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.table .t-strong { font-weight: 600; }

/* Плашки-подсказки. */
.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--sunken);
  font-size: 15px;
  line-height: 22px;
}
.notice > .i { width: 20px; height: 20px; margin-top: 1px; color: var(--ink-muted); }
.notice .grow { flex: 1; min-width: 0; }
.notice b { font-weight: 600; }
.notice.fox { background: var(--fox-soft); }
.notice.fox > .i { color: var(--fox-ink); }
.notice.danger > .i { color: var(--danger); }
.notice.success > .i { color: var(--success); }
.notice.info > .i { color: var(--info); }
.notice.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
/* Тихая плашка: подсказка, которая не должна тянуть на себя внимание. */
.notice.quiet { padding: 0; background: transparent; gap: 8px; font-size: 13px; line-height: 19px; color: var(--ink-muted); }
.notice.quiet > .i { width: 16px; height: 16px; margin-top: 1px; }
.notice .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* Шаги. */
.steps { display: flex; flex-direction: column; gap: 4px; }
.step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  text-align: left;
  width: 100%;
  transition: background-color var(--t-fast) var(--ease);
}
.step:hover { background: var(--sunken); }
.step.on { background: var(--raised); box-shadow: var(--shadow-sm); }
.step-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 13px;
  font-weight: 700;
  background: var(--sunken);
  color: var(--ink-muted);
  box-shadow: inset 0 0 0 1px var(--line);
}
.step-mark .i { width: 16px; height: 16px; }
.step.done .step-mark { background: var(--success); color: #FFFFFF; box-shadow: none; }
:root[data-theme="dark"] .step.done .step-mark { color: #15120F; }
.step.on .step-mark { background: var(--inverse); color: var(--on-inverse); box-shadow: none; }
.step.part .step-mark { background: var(--fox-soft); color: var(--fox-ink); box-shadow: none; }
.step-txt { flex: 1; min-width: 0; }
.step-title { display: block; font-size: 15px; line-height: 21px; font-weight: 600; }
.step-sub { display: block; font-size: 13px; line-height: 18px; color: var(--ink-muted); margin-top: 1px; }

/* Пустое состояние. */
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 36px 16px; color: var(--ink-muted); }
.empty .card-icon { margin-bottom: 6px; }
.empty-title { font-size: 18px; line-height: 26px; font-weight: 500; color: var(--ink); }

/* Стекло и свечение. Одно свечение на экран. */
.glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(240, 90, 26, .95) 0%, rgba(240, 90, 26, .62) 18%, rgba(240, 90, 26, .26) 42%, rgba(240, 90, 26, .08) 60%, rgba(240, 90, 26, 0) 72%);
  filter: blur(6px);
}
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  backdrop-filter: blur(22px) saturate(1.25);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-xl);
  box-shadow: 0 18px 40px -18px rgba(21, 18, 15, .35);
}

/* Окна, панели, всплывающие карточки. */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--scrim);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fade var(--t-fast) var(--ease) both;
}
.overlay.closing { animation: fade var(--t-fast) var(--ease) reverse both; }
.modal {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--raised);
  border-radius: 28px;
  box-shadow: var(--shadow-md);
  padding: 28px;
  animation: rise var(--t-panel) var(--ease) both;
  overscroll-behavior: contain;
}
.modal.md { width: min(680px, 100%); }
.modal.lg { width: min(880px, 100%); }
.modal.xl { width: min(1080px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.modal-head .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.modal-title { font-size: 26px; line-height: 32px; font-weight: 400; letter-spacing: -.02em; }
.modal-text { color: var(--ink-muted); font-size: 15px; line-height: 22px; }
.modal-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.modal-foot .left { margin-right: auto; }

.overlay.side { place-items: stretch end; padding: 12px; }
.drawer {
  width: min(560px, 100%);
  height: 100%;
  overflow: auto;
  background: var(--raised);
  border-radius: 28px;
  box-shadow: var(--shadow-md);
  padding: 28px;
  animation: rise var(--t-panel) var(--ease) both;
  overscroll-behavior: contain;
}
.drawer.wide { width: min(760px, 100%); }

.popover {
  position: fixed;
  z-index: 180;
  min-width: 240px;
  max-width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 100px);
  overflow: auto;
  background: var(--raised);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 10px;
  animation: rise var(--t-panel) var(--ease) both;
}
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-md);
  font-size: 15px;
  line-height: 20px;
  text-align: left;
  transition: background-color var(--t-fast) var(--ease);
}
.menu-item:hover { background: var(--sunken); }
.menu-item .i { width: 18px; height: 18px; color: var(--ink-muted); }
.menu-item .grow { flex: 1; min-width: 0; }
.menu-item .menu-sub { display: block; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.menu-item.on { background: var(--sunken); }
.menu-item.on .check { color: var(--ink); }
.menu-label { padding: 12px 12px 6px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }

.toasts {
  position: fixed;
  z-index: 300;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  width: min(560px, calc(100vw - 32px));
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 14px;
  border-radius: var(--r-full);
  background: var(--inverse);
  color: var(--on-inverse);
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  animation: rise var(--t-panel) var(--ease) both;
  max-width: 100%;
}
.toast .t-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); flex: none; }
:root[data-theme="dark"] .toast .t-ico { background: rgba(0, 0, 0, .1); }
.toast .t-ico .i { width: 16px; height: 16px; }
.toast.leaving { animation: leave var(--t-fast) var(--ease) forwards; }

/* Зона загрузки файлов. */
.dropzone {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 28px 20px;
  border-radius: var(--r-xl);
  border: 1.5px dashed var(--line-strong);
  background: var(--bg);
  color: var(--ink-muted);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.dropzone:hover, .dropzone.over { border-color: var(--fox); background: var(--fox-soft); color: var(--fox-ink); }
.dropzone .dz-title { font-size: 16px; font-weight: 600; color: var(--ink); }
/* Файлы уже загружены: зона в одну строку, чтобы не отодвигать список вниз. */
.dropzone.slim { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; padding: 14px 18px; }
.dropzone.slim .dz-title { font-size: 15px; }

/* Телефон. Длинные подписи на английском и испанском переносятся, а не вылезают за экран */
@media (max-width: 600px) {
  .btn { white-space: normal; height: auto; min-height: 44px; padding-top: 10px; padding-bottom: 10px; max-width: 100%; text-align: center; }
  .btn.btn-sm { min-height: 36px; padding-top: 7px; padding-bottom: 7px; }
  .badge { white-space: normal; height: auto; min-height: 30px; padding-top: 6px; padding-bottom: 6px; max-width: 100%; flex: 0 1 auto; }
  .badge.sm { min-height: 24px; padding-top: 4px; padding-bottom: 4px; }
  .typing { white-space: normal; height: auto; min-height: 34px; padding-top: 7px; padding-bottom: 7px; }
  .typing.sm { min-height: 28px; padding-top: 5px; padding-bottom: 5px; }
  .stat-value { flex-wrap: wrap; white-space: normal; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
}

/* Фото на аватаре и имя с фамилией (live-avatar.js, профиль) */
.avatar.photo { background: var(--sunken); }
.avatar.photo img { width: 100%; height: 100%; object-fit: cover; }
.name-pair { gap: 14px; }
.pf-head { flex-wrap: wrap; }
.pf-head > .grow { min-width: min(260px, 100%); }
.pf-photo { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: none; }
.pf-photo-acts { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.avatar-edit { position: relative; display: inline-grid; border-radius: 50%; }
.avatar-edit .avatar { transition: filter var(--t-fast) var(--ease); }
.avatar-edit:hover .avatar { filter: brightness(.92); }
/* Тот же блок без права менять: без наведения и без карандаша. */
.avatar-edit.as-static:hover .avatar { filter: none; }
.avatar-edit:focus-visible { outline: 2px solid var(--fox); outline-offset: 3px; }
.avatar-edit-ico { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--ink); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.crop { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.crop-stage { position: relative; width: min(320px, 100%); aspect-ratio: 1; overflow: hidden; border-radius: var(--r-lg); background: #15120F; touch-action: none; cursor: grab; user-select: none; }
.crop-stage.grab { cursor: grabbing; }
.crop-stage:focus-visible { outline: 2px solid var(--fox); outline-offset: 3px; }
.crop-stage img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.crop-mask { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 0 0 999px rgba(21, 18, 15, .6); pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 12px; width: min(320px, 100%); }
.crop-zoom .range { flex: 1; }
@media (max-width: 760px) {
  .pf-head { flex-direction: column; align-items: stretch; }
  .pf-photo { flex-direction: row; justify-content: flex-start; }
  .pf-photo-acts { align-items: flex-start; }
}
