/* /opt/skynet-portal/app/static/css/ticket-create.css */
/* v0.1.8 — страница абонента в новой вкладке: значок ↗ на найденных карточках (.tcpick-card-side, .tcpick-open) и имя-ссылка со значком в карточке справа (.tkc-who-open) */
/* 05.11.2026: v0.1.8 страница абонента в новой вкладке; 17.10.2026: v0.1.7 шкала приоритета 0–9; 15.10.2026: v0.1.6 сотрудники по ролям; v0.1.5 «Ուղարկում»; v0.1.0 tkc- */

/* =====================================================================
   КОРЕНЬ: блокировка прокрутки страницы, слой окна, цвет типа заявки
   ===================================================================== */
html.tkc-lock,
html.tkc-lock body { overflow: hidden; }
/* Окно живёт в #main (внутри .app-shell), а .app-main — свой слой (isolation). Пока окно
   открыто — .app-shell над сайдбаром, .app-main над топбаром (как у окна «Նոր բաժանորդ»). */
html.tkc-lock .app-shell { z-index: calc(var(--z-sidebar, 300) + 1); }
html.tkc-lock .app-main { position: relative; z-index: calc(var(--z-topbar, 400) + 1); }

/* Цвет типа заявки (accent работы) зарегистрирован как цвет — окно перекрашивается плавно */
@property --tkc-acc {
  syntax: "<color>";
  inherits: true;
  initial-value: #7c5cfc;
}

.tkc-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.tkc-modal[hidden] { display: none; }
.tkc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 20, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  touch-action: none;
  animation: tkcFade 0.22s ease both;
}

/* =====================================================================
   ПАНЕЛЬ. --tkc-acc — цвет выбранного типа (JS ставит inline, без типа —
   акцент темы); --tkc-acc-text — тот же цвет для текста в обеих темах.
   ===================================================================== */
.tkc-panel {
  --tkc-acc: var(--accent, #7c5cfc);
  --tkc-acc-text: color-mix(in srgb, var(--tkc-acc) 72%, var(--text-primary));
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  container: tkc / inline-size;
  width: min(1360px, 100%);
  height: min(92vh, 900px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--surface-gradient, var(--bg-surface));
  border: 1px solid var(--border-default);
  border-radius: 18px;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.65),
    0 0 0 1px color-mix(in srgb, var(--tkc-acc) 12%, transparent),
    0 0 90px -50px var(--tkc-acc);
  overflow: hidden;
  animation: tkcIn 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: --tkc-acc 0.4s ease, box-shadow 0.35s ease, width 0.28s ease, height 0.28s ease, border-radius 0.28s ease;
}
.tkc-panel::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  z-index: 7;
  background: linear-gradient(90deg, transparent 4%, var(--tkc-acc) 50%, transparent 96%);
  opacity: 0.75;
}
.tkc-panel [hidden] { display: none !important; }

/* Тянут за шапку / уголок — без анимаций размера, окно «приподнято» */
.tkc-panel.is-dragging,
.tkc-panel.is-resizing { transition: none; user-select: none; }
.tkc-panel.is-dragging {
  box-shadow:
    0 44px 110px -24px rgba(0, 0, 0, 0.78),
    0 0 0 1px color-mix(in srgb, var(--tkc-acc) 28%, transparent),
    0 0 90px -40px var(--tkc-acc);
}

/* Уголок размера (справа внизу): тянуть — размер, двойной щелчок — по умолчанию */
.tkc-resize {
  position: absolute;
  right: 3px;
  bottom: 3px;
  z-index: 8;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  color: var(--text-muted);
  cursor: nwse-resize;
  touch-action: none;
  opacity: 0.8;
  transition: color 0.15s ease, opacity 0.15s ease;
}
.tkc-resize:hover,
.tkc-panel.is-resizing .tkc-resize { color: var(--tkc-acc); opacity: 1; }
.tkc-modal.is-max .tkc-resize { display: none; }

/* Клик по фону окно не закрывает — окно слегка «вздрагивает» */
@keyframes tkcNudge {
  0% { scale: 1; }
  35% { scale: 1.012; }
  70% { scale: 0.997; }
  100% { scale: 1; }
}
@media (min-width: 721px) {
  .tkc-panel.is-nudge { animation: tkcIn 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both, tkcNudge 0.32s ease; }
}

/* «Развернуть»: окно на весь экран с полями 12px */
.tkc-modal.is-max { padding: 12px; }
.tkc-modal.is-max .tkc-panel { width: 100%; height: 100%; border-radius: 14px; }

/* =====================================================================
   ШАПКА: значок и название выбранного типа
   ===================================================================== */
.tkc-head {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 12px;
  user-select: none;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tkc-acc) 9%, transparent), transparent);
}
@media (min-width: 721px) {
  .tkc-modal:not(.is-max) .tkc-head { cursor: grab; touch-action: none; }
  .tkc-panel.is-dragging .tkc-head { cursor: grabbing; }
}
.tkc-head-ic {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--tkc-acc), color-mix(in srgb, var(--tkc-acc) 55%, #000));
  box-shadow: 0 10px 22px -12px var(--tkc-acc), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.tkc-head-ic svg { width: 19px; height: 19px; }
.tkc-head-ic i { font-size: 21px; line-height: 1; }
.tkc-head-txt { min-width: 0; flex: 1 1 auto; }
.tkc-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.tkc-sub {
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--tkc-acc-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tkc-sub.is-ph { font-weight: 500; color: var(--text-tertiary); }
.tkc-head-acts { display: flex; gap: 6px; flex: 0 0 auto; }
.tkc-hbtn {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-default);
  background: var(--bg-surface-2);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.tkc-hbtn:hover { color: var(--text-primary); border-color: color-mix(in srgb, var(--tkc-acc) 60%, transparent); }
.tkc-hbtn svg { width: 15px; height: 15px; }
.tkc-max-btn .tkc-ic-restore { display: none; }
.tkc-modal.is-max .tkc-max-btn .tkc-ic-max { display: none; }
.tkc-modal.is-max .tkc-max-btn .tkc-ic-restore { display: inline; }
.tkc-hbtn.is-x:hover {
  color: var(--danger-text, #ef4444);
  border-color: var(--danger-text, #ef4444);
  background: color-mix(in srgb, var(--danger-text, #ef4444) 10%, var(--bg-surface-2));
}

/* =====================================================================
   ТЕЛО: шаги слева, раздел шага в центре, живая карточка справа.
   На шаге «тип» карточка ещё пустая — её место отдано сетке типов,
   со 2-го шага карточка плавно выезжает справа (data-step у окна — JS).
   ===================================================================== */
.tkc-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 300px;
  grid-template-areas: "rail form aside";
}
@container tkc (min-width: 1061px) {
  .tkc-body { transition: grid-template-columns 0.38s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .tkc-panel[data-step="type"] .tkc-body { grid-template-columns: 232px minmax(0, 1fr) 0px; }
  .tkc-aside .tkc-card { min-width: 272px; }
}
@container tkc (max-width: 1060px) {
  .tkc-panel[data-step="type"] .tkc-aside { display: none; }
}

/* =====================================================================
   ШАГИ: номер, название (+ * обязательный), что выбрано.
   is-cur — открыт, is-done — готов, is-req — обязательный и пустой.
   ===================================================================== */
.tkc-rail {
  grid-area: rail;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 12px;
  border-right: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--bg-root) 30%, transparent);
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.tkc-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tkc-step-li { position: relative; }
.tkc-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  padding: 10px 10px 11px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.tkc-step:hover { color: var(--text-primary); background: color-mix(in srgb, var(--bg-surface-2) 75%, transparent); }
.tkc-step:focus-visible { outline: 2px solid var(--tkc-acc); outline-offset: 1px; }
.tkc-step.is-cur {
  color: var(--text-primary);
  background: linear-gradient(100deg, color-mix(in srgb, var(--tkc-acc) 15%, var(--bg-surface-2)), var(--bg-surface-2) 78%);
  border-color: color-mix(in srgb, var(--tkc-acc) 34%, var(--border-default));
  box-shadow: 0 12px 26px -20px var(--tkc-acc), var(--edge-light, inset 0 1px 0 rgba(255, 255, 255, 0.05));
}
.tkc-step.is-cur::before {
  content: "";
  position: absolute;
  left: -1px; top: 12px; bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--tkc-acc);
}
/* линия-путь от номера к следующему шагу */
.tkc-step-li:not(:last-child) .tkc-step::after {
  content: "";
  position: absolute;
  left: 25px; top: 42px; bottom: -8px;
  width: 2px;
  border-radius: 2px;
  background: var(--border-default);
  transition: background 0.3s ease;
}
.tkc-step-li:not(:last-child) .tkc-step.is-done::after { background: color-mix(in srgb, var(--success-text, #22c55e) 55%, transparent); }
.tkc-step-n {
  position: relative;
  z-index: 1;
  width: 28px; height: 28px; flex: 0 0 auto;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-tertiary);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.tkc-step-n b { font-weight: inherit; }
.tkc-step-ok { display: none; width: 14px; height: 14px; }
.tkc-step:hover .tkc-step-n { color: var(--text-secondary); border-color: color-mix(in srgb, var(--text-tertiary) 60%, var(--border-strong)); }
.tkc-step.is-cur .tkc-step-n {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--tkc-acc), color-mix(in srgb, var(--tkc-acc) 58%, #000));
  box-shadow: 0 6px 14px -6px var(--tkc-acc);
}
.tkc-step.is-done .tkc-step-n {
  color: #fff;
  border-color: transparent;
  background: var(--success, #10b981);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success, #10b981) 18%, transparent);
}
.tkc-step.is-done .tkc-step-num { display: none; }
.tkc-step.is-done .tkc-step-ok { display: block; }
.tkc-step-txt {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 5px;
}
.tkc-step-t {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
}
.tkc-step-req {
  display: none;
  margin-left: 3px;
  font-weight: 800;
  color: var(--danger-text, #ef4444);
}
.tkc-step.is-req .tkc-step-req { display: inline; }
.tkc-step-sub {
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-tertiary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.18s ease;
}
.tkc-step.is-cur .tkc-step-sub,
.tkc-step:hover .tkc-step-sub,
.tkc-step.is-done .tkc-step-sub { color: var(--text-secondary); }

/* =====================================================================
   ФОРМА И ШАГИ-ПАНЕЛИ: виден только открытый шаг. У шагов-списков
   (тип, абонент, здание) прокручивается сам список, у описания — шаг.
   ===================================================================== */
.tkc-form {
  grid-area: form;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 22px 20px;
  overflow: hidden;
}
.tkc-pane { display: none; }
.tkc-pane.is-cur {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  animation: tkcFade 0.22s ease both;
}
.tkc-pane.is-cur.is-list { overflow: hidden; }
.tkc-pane.is-cur.is-fwd { animation: tkcPaneFwd 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.tkc-pane.is-cur.is-back { animation: tkcPaneBack 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

/* Разделы — карточки: светлее фона окна, поля в них — «колодцы» */
.tkc-sec {
  --tkc-sec: var(--tkc-acc);
  position: relative;
  flex: 0 0 auto;
  padding: 16px 18px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-default);
  background:
    radial-gradient(80% 55% at 0% 0%, color-mix(in srgb, var(--tkc-sec) 8%, transparent), transparent 70%),
    var(--bg-surface-2);
  box-shadow: var(--edge-light, inset 0 1px 0 rgba(255, 255, 255, 0.05)), 0 14px 32px -26px rgba(0, 0, 0, 0.7);
  transition: border-color 0.25s ease;
}
.tkc-sec:focus-within { border-color: color-mix(in srgb, var(--tkc-sec) 36%, var(--border-default)); }
.tkc-sec.is-grow {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.tkc-sec-h {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.tkc-sec-ic {
  width: 32px; height: 32px; flex: 0 0 auto;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: color-mix(in srgb, var(--tkc-sec) 82%, var(--text-primary));
  background: color-mix(in srgb, var(--tkc-sec) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--tkc-sec) 32%, transparent);
}
.tkc-sec-ic svg { width: 16px; height: 16px; }
.tkc-sec-t {
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tkc-sec-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; }
.tkc-sec-note {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-tertiary);
}
.tkc-empty { padding: 22px 12px; text-align: center; font-size: 13px; color: var(--text-muted); }

/* Кнопки раздела под полями («Մաքրել» / «Կիրառել») */
.tkc-sec-acts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
@media (max-width: 720px) {
  .tkc-sec-acts .tkc-btn { flex: 1 1 0; justify-content: center; height: 40px; }
}
.tkc-btn {
  height: 34px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, filter 0.15s ease;
}
.tkc-btn svg { width: 14px; height: 14px; flex: 0 0 auto; }
.tkc-btn:hover { color: var(--text-primary); border-color: color-mix(in srgb, var(--tkc-acc) 55%, var(--border-strong)); }
.tkc-btn:focus-visible { outline: 2px solid var(--tkc-acc); outline-offset: 2px; }
.tkc-btn.is-acc {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--tkc-acc), color-mix(in srgb, var(--tkc-acc) 66%, #000));
  box-shadow: 0 8px 18px -12px var(--tkc-acc);
}
.tkc-btn.is-acc:hover { color: #fff; filter: brightness(1.08); }

/* =====================================================================
   ПОЛЯ-«КОЛОДЦЫ»: в тёмной теме темнее карточки, в светлой — белые
   ===================================================================== */
.tkc-modal .input,
.tkc-modal .select,
.tkc-modal .textarea {
  width: 100%;
  min-height: 40px;
  height: 40px;
  padding-top: 0;
  padding-bottom: 0;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-primary);
  background-color: var(--bg-input, var(--bg-surface));
  border-color: var(--border-strong);
  box-shadow: inset 0 1px 2px color-mix(in srgb, var(--bg-root) 65%, transparent);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.tkc-modal .textarea {
  height: auto;
  min-height: 84px;
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 1.45;
  resize: vertical;
}
.tkc-modal .input:hover:not(:focus):not(:disabled):not([readonly]),
.tkc-modal .textarea:hover:not(:focus),
.tkc-modal .select:hover:not(:disabled):not(:focus) {
  border-color: color-mix(in srgb, var(--text-tertiary) 55%, var(--border-strong));
}
.tkc-modal .input::placeholder,
.tkc-modal .textarea::placeholder {
  color: color-mix(in srgb, var(--text-muted) 55%, var(--text-secondary));
  opacity: 1;
}
.tkc-modal .input:focus,
.tkc-modal .select:focus,
.tkc-modal .textarea:focus {
  outline: none;
  border-color: var(--tkc-acc);
  background-color: color-mix(in srgb, var(--bg-input, var(--bg-surface)) 94%, var(--tkc-acc));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tkc-acc) 22%, transparent);
}
.tkc-modal .select:disabled { opacity: 0.5; cursor: not-allowed; }
.tkc-modal .input[readonly] { color: var(--text-secondary); cursor: default; }
.tkc-mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
/* Пустые поля — спокойно: подсказка обычным шрифтом (моноширинный — только у введённого),
   select без значения — цветом подсказки, как пустые поля рядом */
.tkc-modal .tkc-mono:placeholder-shown { font-family: inherit; letter-spacing: normal; }
.tkc-modal .tkc-cell:not(.has-val) .select { color: color-mix(in srgb, var(--text-muted) 55%, var(--text-secondary)); }
.tkc-modal .select option { color: var(--text-primary); }

/* Поле с иконкой слева и крестиком очистки справа (крестик — когда есть значение) */
.tkc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.tkc-cell { position: relative; display: flex; align-items: center; min-width: 0; }
.tkc-cell-ic {
  position: absolute;
  left: 12px; top: 50%;
  z-index: 1;
  display: inline-flex;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  transition: color 0.15s ease;
}
.tkc-cell-ic svg { width: 16px; height: 16px; }
.tkc-modal .tkc-cell .input,
.tkc-modal .tkc-cell .select { padding-left: 38px; }
.tkc-cell:focus-within .tkc-cell-ic,
.tkc-cell.has-val .tkc-cell-ic { color: var(--tkc-acc-text); }
.tkc-cell-x {
  position: absolute;
  right: 8px; top: 50%;
  z-index: 2;
  width: 22px; height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--text-muted) 24%, transparent);
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%) scale(0.6);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s cubic-bezier(0.2, 0.7, 0.3, 1), background 0.14s ease, color 0.14s ease;
}
.tkc-cell-x svg { width: 11px; height: 11px; }
.tkc-cell-x:hover { background: var(--danger-text, #ef4444); color: #fff; }
.tkc-cell.has-val .tkc-cell-x { opacity: 1; transform: translateY(-50%) scale(1); pointer-events: auto; }
.tkc-modal .tkc-cell.has-val .input { padding-right: 36px; }
.tkc-modal .tkc-cell.has-val .select { background-image: none; padding-right: 36px; }

/* Строка поиска абонента (как на странице абонентов) и кнопка «Ֆիլտրեր» */
.tkc-qbar { display: flex; align-items: stretch; gap: 10px; }
.tkc-qbar .tkc-q { flex: 1 1 auto; }
.tkc-modal .tkc-q .input {
  height: 48px;
  min-height: 48px;
  padding-left: 44px;
  border-radius: 12px;
  font-size: 15px;
}
.tkc-q .tkc-cell-ic { left: 15px; }
.tkc-q .tkc-cell-ic svg { width: 18px; height: 18px; }
.tkc-adv-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.tkc-adv-btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.tkc-adv-btn:hover { color: var(--text-primary); border-color: color-mix(in srgb, var(--tkc-sec) 55%, var(--border-strong)); }
.tkc-adv-btn:focus-visible { outline: 2px solid var(--tkc-sec); outline-offset: 2px; }
.tkc-adv-btn[aria-expanded="true"] {
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--tkc-sec) 60%, transparent);
  background: color-mix(in srgb, var(--tkc-sec) 10%, var(--bg-surface));
}
.tkc-adv-chev { transition: transform 0.25s ease; }
.tkc-adv-btn[aria-expanded="true"] .tkc-adv-chev { transform: rotate(180deg); }
.tkc-adv-n {
  min-width: 20px; height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: color-mix(in srgb, var(--tkc-sec) 85%, #000);
}
/* Остальные поля — панель под строкой, раскрывается плавно */
.tkc-adv {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tkc-adv.is-open { grid-template-rows: 1fr; }
.tkc-adv-in {
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s linear 0.3s;
}
.tkc-adv.is-open .tkc-adv-in { visibility: visible; transition-delay: 0s; }
.tkc-adv-pad { padding-top: 12px; }
/* Пустой список: что умеет строка и примеры (щелчок — подставить и найти) */
.tkc-results.is-hint { display: flex; align-items: center; justify-content: center; padding: 0; }
.tkc-hint {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  max-width: 560px;
  padding: 24px 18px;
  text-align: center;
  animation: tkcFade 0.25s ease both;
}
.tkc-hint-ic {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  color: color-mix(in srgb, var(--tkc-sec) 80%, var(--text-primary));
  background: color-mix(in srgb, var(--tkc-sec) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tkc-sec) 28%, transparent);
}
.tkc-hint-ic svg { width: 24px; height: 24px; }
.tkc-hint-t { font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.tkc-hint-ex { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.tkc-hint-ex > span { margin-right: 2px; font-size: 12px; font-weight: 600; color: var(--text-tertiary); }
.tkc-ex {
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface-2);
  color: var(--text-primary);
  font: inherit;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s ease;
}
.tkc-ex:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--tkc-sec) 55%, var(--border-default));
  background: color-mix(in srgb, var(--tkc-sec) 10%, var(--bg-surface-2));
}
/* Идёт поиск — бегущая полоса по верху списка */
.tkc-results.is-loading {
  background-image: linear-gradient(90deg, transparent, var(--tkc-sec), transparent);
  background-size: 40% 2px;
  background-repeat: no-repeat;
  animation: tkcLoad 1s linear infinite;
}
@keyframes tkcLoad {
  from { background-position: -40% 0; }
  to { background-position: 140% 0; }
}
@media (max-width: 720px) {
  .tkc-modal .tkc-q .input { font-size: 16px; }
  .tkc-adv-btn > span { display: none; }
}

/* Быстрый поиск типа (в заголовке раздела) */
.tkc-find { position: relative; width: min(300px, 100%); }
.tkc-find svg {
  position: absolute;
  left: 11px; top: 50%;
  z-index: 1;
  width: 15px; height: 15px;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}
.tkc-modal .tkc-find .input { height: 36px; min-height: 36px; padding-left: 34px; font-size: 13.5px; }

/* =====================================================================
   ШАГ «ТИП»: все типы одной сеткой, без прокрутки. Плитка — значок в
   цвете типа и название. Колонки и высоту плитки подбирает JS (fitTypes:
   --tkc-cols, --tkc-tile-h) под размер окна; если окно совсем маленькое
   и не помещается даже плотно — появляется прокрутка.
   ===================================================================== */
.tkc-types {
  --tkc-cols: 4;
  --tkc-tile-h: 58px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(var(--tkc-cols), minmax(0, 1fr));
  grid-auto-rows: var(--tkc-tile-h);
  align-content: start;
  gap: 8px;
  margin: -3px -6px -4px -3px;
  padding: 3px 6px 4px 3px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.tkc-type {
  --tkc-t: var(--accent);
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 26px 0 10px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--tkc-t) 8%, transparent), transparent 58%),
    color-mix(in srgb, var(--bg-surface) 78%, transparent);
  color: var(--text-secondary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  animation: tkcTileIn 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 6ms);
  transition: transform 0.14s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease, color 0.14s ease;
}
/* полоса цвета типа слева — проявляется при наведении и у выбранного */
.tkc-type::before {
  content: "";
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--tkc-t);
  opacity: 0;
  transform: scaleY(0.4);
  transition: opacity 0.16s ease, transform 0.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.tkc-type:hover {
  transform: translateY(-1px);
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--tkc-t) 50%, var(--border-default));
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--tkc-t) 15%, transparent), transparent 72%),
    var(--bg-surface);
  box-shadow: 0 10px 22px -16px var(--tkc-t);
}
.tkc-type:hover::before,
.tkc-type.is-sel::before { opacity: 1; transform: none; }
.tkc-type:focus-visible { outline: 2px solid var(--tkc-t); outline-offset: 2px; }
.tkc-type.is-sel {
  color: var(--text-primary);
  border-color: var(--tkc-t);
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--tkc-t) 24%, transparent), color-mix(in srgb, var(--tkc-t) 8%, transparent)),
    var(--bg-surface);
  box-shadow: inset 0 0 0 1px var(--tkc-t), 0 10px 24px -14px var(--tkc-t);
}
.tkc-type-ic {
  position: relative;
  width: 36px; height: 36px; flex: 0 0 auto;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--tkc-t);
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--tkc-t) 36%, transparent), color-mix(in srgb, var(--tkc-t) 13%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tkc-t) 32%, transparent);
  transition: transform 0.16s cubic-bezier(0.2, 0.7, 0.3, 1), background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.tkc-type:hover .tkc-type-ic { transform: scale(1.07); }
/* выбранный тип — значок «загорается»: сплошной цвет типа, белая иконка */
.tkc-type.is-sel .tkc-type-ic {
  color: #fff;
  background: linear-gradient(135deg, var(--tkc-t), color-mix(in srgb, var(--tkc-t) 58%, #000));
  box-shadow: 0 6px 14px -6px var(--tkc-t), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.tkc-type-ic i { font-size: 18px; line-height: 1; }
/* работа «на здание» — значок дома у иконки: следующий шаг спросит здание */
.tkc-type-bld {
  position: absolute;
  right: -4px; bottom: -4px;
  width: 17px; height: 17px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  background: #0ea5e9;
  border: 2px solid var(--bg-surface);
}
.tkc-type-bld svg { width: 9px; height: 9px; }
/* Пояснение к значку дома (шапка раздела типов): «⌂ — Շենք» */
.tkc-legend {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 11px 0 5px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--bg-root) 25%, transparent);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.tkc-legend-ic {
  width: 18px; height: 18px; flex: 0 0 auto;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  background: #0ea5e9;
}
.tkc-legend-ic svg { width: 10px; height: 10px; }
.tkc-type-name {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tkc-type-name mark {
  background: color-mix(in srgb, var(--tkc-t) 32%, transparent);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}
.tkc-type-ok {
  position: absolute;
  top: 50%; right: 7px;
  width: 16px; height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  display: none;
  align-items: center; justify-content: center;
  color: #fff;
  background: var(--tkc-t);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tkc-t) 20%, transparent);
}
.tkc-type-ok svg { width: 10px; height: 10px; }
.tkc-type.is-sel .tkc-type-ok { display: inline-flex; animation: tkcPop 0.25s ease both; }

/* =====================================================================
   РЕЗУЛЬТАТЫ ПОИСКА: абоненты (фрагмент _pick_results.html, классы tcpick-*)
   и дома. Список прокручивается сам, шапка «Գտնվել է» прилипает сверху.
   ===================================================================== */
.tkc-results {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 8px 8px;
  border-radius: 14px;
  border: 1px solid var(--border-default);
  background: color-mix(in srgb, var(--bg-root) 22%, var(--bg-surface));
  overscroll-behavior: contain;
  scrollbar-width: thin;
  animation: tkcFade 0.2s ease both;
}
.tkc-modal .tcpick-head {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 0 -8px 8px;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 14px 14px 0 0;
  background: color-mix(in srgb, var(--bg-surface-2) 94%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 12px;
  color: var(--text-secondary);
}
.tkc-modal .tcpick-found b { color: var(--text-primary); font-weight: 800; }
.tkc-modal .tcpick-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 8px;
}
.tkc-modal .tcpick-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: var(--bg-surface-2);
  color: var(--text-primary);
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.14s ease;
}
.tkc-modal .tcpick-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--tkc-acc) 55%, var(--border-default));
  background: color-mix(in srgb, var(--tkc-acc) 8%, var(--bg-surface-2));
  box-shadow: 0 10px 22px -16px var(--tkc-acc);
}
.tkc-modal .tcpick-card:focus-visible { outline: 2px solid var(--tkc-acc); outline-offset: 1px; }
.tkc-modal .tcpick-card.is-picked {
  border-color: var(--tkc-acc);
  background: color-mix(in srgb, var(--tkc-acc) 12%, var(--bg-surface-2));
  box-shadow: inset 0 0 0 1px var(--tkc-acc);
}
/* фото абонента (или буквы в цвете, как в карточке абонента) */
.tkc-modal .tcpick-av {
  position: relative;
  width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--h, 220) 62% 52%), hsl(calc(var(--h, 220) + 40) 58% 36%));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.tkc-modal .tcpick-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tkc-modal .tcpick-av.has-photo span { visibility: hidden; }
.tkc-modal .tcpick-card-main { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; }
.tkc-modal .tcpick-card-name {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tkc-modal .tcpick-card-id { margin-left: 4px; font-size: 11.5px; font-weight: 600; color: var(--tkc-acc-text); }
.tkc-modal .tcpick-card-addr {
  font-size: 12px;
  line-height: 1.25;
  color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tkc-modal .tcpick-card-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.tkc-modal .tcpick-chip {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--bg-root) 40%, transparent);
  border: 1px solid var(--border-subtle);
}
.tkc-modal .tcpick-ip { color: var(--tkc-acc-text); }
.tkc-modal .tcpick-bal.is-neg { color: var(--danger-text, #ef4444); }
.tkc-modal .tcpick-card-status {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--bg-root) 35%, transparent);
  border: 1px solid var(--border-subtle);
}
.tkc-modal .tcpick-card-status.st-active { color: var(--success-text, #22c55e); background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.32); }
.tkc-modal .tcpick-card-status.st-paused { color: var(--warning-text, #f59e0b); background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.32); }
.tkc-modal .tcpick-card-status.st-disabled_debt,
.tkc-modal .tcpick-card-status.st-disabled_manual { color: var(--danger-text, #ef4444); background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); }
/* правая колонка карточки: статус сверху, внизу значок ↗ — страница абонента в новой вкладке (v0.1.8) */
.tkc-modal .tcpick-card-side {
  flex: 0 0 auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}
.tkc-modal .tcpick-open {
  width: 28px; height: 28px; flex: 0 0 auto;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--tkc-acc-text);
  background: color-mix(in srgb, var(--tkc-acc) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--tkc-acc) 32%, var(--border-subtle));
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}
.tkc-modal .tcpick-open svg { width: 13px; height: 13px; }
.tkc-modal .tcpick-open:hover { color: #fff; background: var(--tkc-acc); border-color: transparent; transform: scale(1.06); }
.tkc-modal .tcpick-open:active { transform: scale(0.94); }
.tkc-modal .tcpick-empty { padding: 22px 12px; text-align: center; font-size: 13px; color: var(--text-muted); }

/* Найденные дома (шаг «Շենք») */
.tkc-bld-list { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }
.tkc-bld {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.tkc-bld:hover,
.tkc-bld.is-active {
  background: color-mix(in srgb, var(--tkc-acc) 12%, transparent);
  border-color: color-mix(in srgb, var(--tkc-acc) 34%, transparent);
}
.tkc-bld svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--tkc-acc-text); }
.tkc-bld-txt { min-width: 0; flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tkc-bld mark { background: color-mix(in srgb, var(--tkc-acc) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.tkc-bld-chosen {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px;
  padding: 8px 8px 8px 12px;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--tkc-acc) 50%, transparent);
  background: color-mix(in srgb, var(--tkc-acc) 10%, transparent);
  animation: tkcFade 0.2s ease both;
}
.tkc-bld-chosen > svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--tkc-acc-text); }
.tkc-bld-chosen-txt { min-width: 0; flex: 1 1 auto; font-size: 13.5px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tkc-x-btn {
  width: 28px; height: 28px; flex: 0 0 auto;
  padding: 0;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-default);
  background: var(--bg-surface-2);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color 0.14s ease, border-color 0.14s ease;
}
.tkc-x-btn svg { width: 13px; height: 13px; }
.tkc-x-btn:hover { color: var(--danger-text, #ef4444); border-color: var(--danger-text, #ef4444); }

/* =====================================================================
   ШАГ «ОПИСАНИЕ»: текст, реферал, файлы и фото
   ===================================================================== */
.tkc-modal .tkc-desc { min-height: 140px; padding-top: 12px; padding-bottom: 12px; line-height: 1.5; }
.tkc-ref { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.tkc-ref-l { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.tkc-ref-l svg { width: 15px; height: 15px; color: var(--tkc-acc-text); }

.tkc-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 16px;
  border-radius: 14px;
  border: 1.5px dashed var(--border-strong);
  background: color-mix(in srgb, var(--bg-root) 18%, transparent);
  color: var(--text-secondary);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.tkc-drop:hover,
.tkc-drop:focus-visible {
  outline: none;
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--tkc-sec) 60%, var(--border-strong));
  background: color-mix(in srgb, var(--tkc-sec) 7%, transparent);
}
.tkc-drop.is-over {
  border-style: solid;
  border-color: var(--tkc-sec);
  color: var(--text-primary);
  background: color-mix(in srgb, var(--tkc-sec) 14%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tkc-sec) 14%, transparent);
}
.tkc-drop-ic {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: color-mix(in srgb, var(--tkc-sec) 82%, var(--text-primary));
  background: color-mix(in srgb, var(--tkc-sec) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tkc-sec) 30%, transparent);
  transition: transform 0.15s ease;
}
.tkc-drop:hover .tkc-drop-ic,
.tkc-drop.is-over .tkc-drop-ic { transform: translateY(-2px); }
.tkc-drop-ic svg { width: 21px; height: 21px; }
.tkc-drop-t { font-size: 13.5px; font-weight: 600; }
.tkc-drop-types { font-size: 11px; letter-spacing: 0.04em; font-family: var(--font-mono); color: var(--text-tertiary); }

.tkc-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.tkc-files:empty { display: none; }
.tkc-file {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  animation: tkcPop 0.25s ease both;
}
.tkc-file-thumb { display: block; width: 100%; height: 86px; object-fit: cover; background: var(--bg-surface-3); }
.tkc-file-doc {
  --tkc-ft: var(--text-tertiary);
  height: 86px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--tkc-ft);
  background: color-mix(in srgb, var(--tkc-ft) 10%, var(--bg-surface-3));
}
.tkc-file-doc svg { width: 28px; height: 28px; }
.tkc-file-doc b { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; }
.tkc-file-meta { min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 7px 9px 8px; }
.tkc-file-name { font-size: 11.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tkc-file-size { font-size: 10.5px; font-family: var(--font-mono); color: var(--text-tertiary); }
.tkc-file-x {
  position: absolute;
  top: 6px; right: 6px;
  width: 24px; height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  background: rgba(4, 8, 20, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  transition: background 0.14s ease, transform 0.14s ease;
}
.tkc-file-x svg { width: 12px; height: 12px; }
.tkc-file-x:hover { background: var(--danger-text, #ef4444); transform: scale(1.06); }

/* Приоритет: шкала 0–9 (0 — обычная, выше — важнее), как в форме правки. «Накал» уровня — полоса
   внизу кнопки, теплее и ярче с номером; выбранная 1–4 — мягкая, 5–9 — насыщенная (как в столбце таблицы) */
.tkc-prio-hint {
  min-width: 0;
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tkc-prio {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
}
.tkc-prio-b {
  --pb: color-mix(in srgb, #ea580c calc(var(--lv, 0) * 11%), #fcd34d);
  position: relative;
  min-width: 0;
  height: 42px;
  padding: 0 0 4px;
  border: 1px solid var(--border-default);
  border-radius: 11px;
  background: color-mix(in srgb, var(--bg-surface) 82%, transparent);
  color: var(--text-secondary);
  font: inherit;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.14s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.14s ease, background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.tkc-prio-b::after {
  content: "";
  position: absolute;
  left: 9px; right: 9px; bottom: 6px;
  height: 3px;
  border-radius: 3px;
  background: var(--pb);
  opacity: calc(0.22 + var(--lv, 0) * 0.07);
  pointer-events: none;
}
.tkc-prio-b.is-zero::after { background: var(--text-muted); opacity: 0.3; }
.tkc-prio-b:hover {
  transform: translateY(-1px);
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--pb) 55%, var(--border-default));
}
.tkc-prio-b.is-zero:hover { border-color: color-mix(in srgb, var(--text-tertiary) 60%, var(--border-default)); }
.tkc-prio-b:focus-visible { outline: 2px solid var(--pb); outline-offset: 2px; }
.tkc-prio-b.is-zero:focus-visible { outline-color: var(--text-tertiary); }
/* выбранная: 0 — спокойная, 1–4 — мягкая оранжевая, 5–9 — насыщенная */
.tkc-prio-b.is-sel {
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--text-tertiary) 70%, transparent);
  background: var(--bg-surface-3, var(--bg-surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text-tertiary) 35%, transparent);
}
.tkc-prio-b.is-sel:not(.is-zero) {
  color: #fdba74;
  border-color: color-mix(in srgb, #fb923c 60%, transparent);
  background: color-mix(in srgb, #fb923c 14%, var(--bg-surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fb923c 32%, transparent);
}
.tkc-prio-b.is-sel.is-hi {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #f59e0b, #c2410c);
  box-shadow: 0 6px 16px -10px #f59e0b;
}
.tkc-prio-b.is-sel.is-hi::after { opacity: 0; }
/* Плашка приоритета в строке типа карточки справа */
.tkc-ctype-prio {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex; align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  color: #fdba74;
  background: color-mix(in srgb, #fb923c 12%, transparent);
  border: 1px solid color-mix(in srgb, #fb923c 30%, transparent);
  animation: tkcPop 0.2s ease both;
}
.tkc-ctype-prio.is-hi { color: #fff; border-color: transparent; background: linear-gradient(135deg, #f59e0b, #c2410c); }
/* Окно уже 820 px — пояснение под заголовком; телефон — шкала в два ряда по 5 */
@container tkc (max-width: 820px) {
  .tkc-prio-hint { flex: 1 1 100%; margin-left: 0; white-space: normal; }
}
@media (max-width: 720px) {
  .tkc-prio { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tkc-prio-b { height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .tkc-prio-b { transition: none !important; }
  .tkc-ctype-prio { animation: none !important; }
}

/* =====================================================================
   ЖИВАЯ КАРТОЧКА: тип, абонент с фото (или дом), чек-лист шагов.
   На шаге «тип» убрана (место — сетке типов), со 2-го шага выезжает справа.
   ===================================================================== */
.tkc-aside {
  grid-area: aside;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tkc-acc) 6%, transparent), transparent 42%);
  overscroll-behavior: contain;
  scrollbar-width: thin;
  transition: opacity 0.3s ease 0.1s, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tkc-panel[data-step="type"] .tkc-aside {
  opacity: 0;
  transform: translateX(28px);
  pointer-events: none;
  padding-left: 0;
  padding-right: 0;
  border-left-color: transparent;
  transition: opacity 0.16s ease, transform 0.3s ease;
}
.tkc-card {
  position: relative;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--tkc-acc) 26%, var(--border-default));
  background:
    radial-gradient(130% 80% at 50% 0%, color-mix(in srgb, var(--tkc-acc) 13%, transparent), transparent 70%),
    var(--bg-surface-2);
  box-shadow: 0 18px 40px -28px var(--tkc-acc), var(--edge-light, inset 0 1px 0 rgba(255, 255, 255, 0.05));
  overflow: hidden;
}
/* тип заявки */
.tkc-ctype {
  --tkc-t: var(--tkc-acc);
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--tkc-t) 34%, transparent);
  background: color-mix(in srgb, var(--tkc-t) 12%, transparent);
}
.tkc-ctype.is-ph { border-style: dashed; border-color: var(--border-strong); background: transparent; }
.tkc-ctype-ic {
  width: 32px; height: 32px; flex: 0 0 auto;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--tkc-t), color-mix(in srgb, var(--tkc-t) 55%, #000));
}
.tkc-ctype.is-ph .tkc-ctype-ic { color: var(--text-tertiary); background: var(--bg-surface); border: 1px solid var(--border-strong); }
.tkc-ctype-ic i { font-size: 16px; line-height: 1; }
.tkc-ctype-ic svg { width: 15px; height: 15px; }
.tkc-ctype-name {
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tkc-ctype.is-ph .tkc-ctype-name { font-weight: 500; color: var(--text-tertiary); }

/* абонент / дом / скелетон */
.tkc-who {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  text-align: center;
}
.tkc-who-x {
  position: absolute;
  top: -4px; right: -4px;
  z-index: 2;
  width: 26px; height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--bg-root) 40%, transparent);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.tkc-who-x svg { width: 12px; height: 12px; }
.tkc-who-x:hover { background: var(--danger-text, #ef4444); color: #fff; }
.tkc-who-av {
  position: relative;
  width: 80px; height: 80px; flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--h, 220) 62% 52%), hsl(calc(var(--h, 220) + 40) 58% 36%));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tkc-acc) 24%, transparent), 0 14px 30px -14px var(--tkc-acc);
  animation: tkcAvIn 0.42s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
.tkc-who-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tkc-who-av.has-photo span { visibility: hidden; }
.tkc-who-bldic {
  width: 72px; height: 72px; flex: 0 0 auto;
  border-radius: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #38bdf8, #0369a1);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tkc-acc) 22%, transparent), 0 14px 30px -14px #38bdf8;
  animation: tkcAvIn 0.42s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
.tkc-who-bldic svg { width: 32px; height: 32px; }
.tkc-who-name { font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--text-primary); word-break: break-word; }
.tkc-who-id { font-size: 12px; font-weight: 600; color: var(--tkc-acc-text); }
/* имя абонента — ссылка на его страницу в новой вкладке, со значком ↗ (v0.1.8) */
.tkc-who-name.is-link { text-decoration: none; cursor: pointer; transition: color 0.14s ease; }
.tkc-who-name.is-link:hover { color: var(--tkc-acc-text); }
.tkc-who-name.is-link:focus-visible { outline: 2px solid var(--tkc-acc); outline-offset: 3px; border-radius: 6px; }
.tkc-who-open {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  margin-left: 6px;
  vertical-align: -5px;
  border-radius: 7px;
  color: var(--tkc-acc-text);
  background: color-mix(in srgb, var(--tkc-acc) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tkc-acc) 34%, transparent);
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.tkc-who-open svg { width: 12px; height: 12px; }
.tkc-who-name.is-link:hover .tkc-who-open { color: #fff; background: var(--tkc-acc); border-color: transparent; }
.tkc-who-rows {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 2px;
  padding-top: 11px;
  border-top: 1px solid var(--border-subtle);
  text-align: left;
}
.tkc-who-row { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; line-height: 1.4; color: var(--text-primary); }
.tkc-who-row svg { width: 15px; height: 15px; margin-top: 1px; flex: 0 0 auto; color: var(--tkc-acc-text); }
.tkc-who-row span { min-width: 0; word-break: break-word; }
.tkc-who-row.is-mono span { font-family: var(--font-mono); }
.tkc-who-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tkc-badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--bg-root) 35%, transparent);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.tkc-badge.is-bal { font-family: var(--font-mono); color: var(--text-primary); }
.tkc-badge.is-neg { color: var(--danger-text, #ef4444); background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); }
.tkc-badge.is-fil2 { color: var(--warning-text, #f59e0b); background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.3); }
.tkc-badge.st-active { color: var(--success-text, #22c55e); background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.32); }
.tkc-badge.st-paused { color: var(--warning-text, #f59e0b); background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.32); }
.tkc-badge.st-disabled_debt,
.tkc-badge.st-disabled_manual { color: var(--danger-text, #ef4444); background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); }
.tkc-who.is-empty { gap: 10px; padding: 4px 0; }
.tkc-skel { position: relative; display: block; overflow: hidden; border-radius: 7px; background: color-mix(in srgb, var(--bg-root) 30%, var(--bg-surface)); }
.tkc-skel::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text-muted) 16%, transparent), transparent);
  transform: translateX(-100%);
  animation: tkcSkel 1.25s ease-in-out infinite;
}
.tkc-skel-av { width: 80px; height: 80px; border-radius: 50%; }
.tkc-skel-l1 { width: 62%; height: 14px; }
.tkc-skel-l2 { width: 82%; height: 10px; }
.tkc-skel-l3 { width: 70%; height: 10px; }

/* чек-лист: пункт — кнопка, открывает свой шаг */
.tkc-check {
  list-style: none;
  margin: 14px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  gap: 2px;
}
.tkc-check:empty { display: none; }
.tkc-chk {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tkc-chk:hover { color: var(--text-primary); background: color-mix(in srgb, var(--bg-surface) 70%, transparent); }
.tkc-chk:focus-visible { outline: 2px solid var(--tkc-acc); outline-offset: 1px; }
.tkc-chk span { min-width: 0; flex: 1 1 auto; }
.tkc-chk i {
  width: 18px; height: 18px; flex: 0 0 auto;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  color: transparent;
  border: 1.5px solid var(--border-strong);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.tkc-chk-go { width: 14px; height: 14px; flex: 0 0 auto; color: var(--text-muted); transition: transform 0.15s ease, color 0.15s ease; }
.tkc-chk:hover .tkc-chk-go { color: var(--tkc-acc-text); transform: translateX(2px); }
.tkc-check li.is-done .tkc-chk { color: var(--text-primary); }
.tkc-check li.is-done .tkc-chk i { border-color: var(--success, #10b981); background: var(--success, #10b981); color: #fff; }
.tkc-check li.is-opt .tkc-chk i { border-style: dashed; }
.tkc-check li.is-opt.is-done .tkc-chk i { border-style: solid; }

/* =====================================================================
   ПОДВАЛ: подсказка клавиш, ← / следующий шаг, «Ստեղծել» (с процентом загрузки)
   ===================================================================== */
.tkc-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 26px 12px 18px;
  border-top: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--bg-root) 26%, transparent);
}
.tkc-foot-hint {
  margin-right: auto;
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  font-size: 11.5px;
  color: var(--text-tertiary);
}
.tkc-foot-hint kbd {
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-secondary);
}
.tkc-nav { display: flex; align-items: center; gap: 8px; }
.tkc-nav-btn {
  height: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 0 14px 0 8px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface-2);
  color: var(--text-primary);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.tkc-nav-btn svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--text-secondary); transition: transform 0.15s ease, color 0.15s ease; }
.tkc-nav-btn:hover {
  border-color: color-mix(in srgb, var(--tkc-acc) 55%, var(--border-strong));
  background: color-mix(in srgb, var(--tkc-acc) 9%, var(--bg-surface-2));
}
.tkc-nav-btn:hover svg { color: var(--tkc-acc-text); }
.tkc-next:hover svg { transform: translateX(2px); }
.tkc-prev:hover svg { transform: translateX(-2px); }
.tkc-nav-btn:focus-visible { outline: 2px solid var(--tkc-acc); outline-offset: 2px; }
.tkc-prev { width: 40px; padding: 0; }
.tkc-next-n {
  width: 24px; height: 24px; flex: 0 0 auto;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--tkc-acc-text);
  background: color-mix(in srgb, var(--tkc-acc) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--tkc-acc) 34%, transparent);
}
.tkc-next-t { min-width: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.tkc-submit {
  position: relative;
  min-width: 168px;
  min-height: 40px;
  padding: 7px 18px;
  border-radius: 11px;
  font-size: 14px;
  justify-content: center;
  gap: 8px;
  border-color: transparent;
  background: linear-gradient(135deg, var(--tkc-acc), color-mix(in srgb, var(--tkc-acc) 66%, #000));
  box-shadow: 0 10px 24px -14px var(--tkc-acc);
  transition: filter 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.tkc-submit:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 12px 28px -12px var(--tkc-acc); }
.tkc-submit:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.tkc-submit-ok { width: 15px; height: 15px; }
.tkc-submit-spin {
  display: none;
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: tkcSpin 0.7s linear infinite;
}
.tkc-submit-pct { display: none; font-family: var(--font-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tkc-submit.is-busy .tkc-submit-spin { display: inline-block; }
.tkc-submit.is-busy .tkc-submit-ok { display: none; }
.tkc-submit.is-busy .tkc-submit-pct:not(:empty) { display: inline; }

/* =====================================================================
   ДОК СВЁРНУТЫХ ЧЕРНОВИКОВ (цвет чипа — тип заявки)
   ===================================================================== */
.tkc-dock {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 590;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  max-width: min(92vw, 1100px);
  padding: 8px;
  border-radius: 16px;
  background: var(--surface-gradient, var(--bg-surface));
  border: 1px solid var(--border-default);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: tkcDockIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.tkc-dock[hidden] { display: none; }
.tkc-dock-chip {
  --tkc-acc: var(--accent, #7c5cfc);
  display: inline-flex; align-items: center; gap: 9px;
  max-width: 290px;
  padding: 7px 8px;
  border-radius: 12px;
  background: var(--bg-surface-2);
  border: 1px solid color-mix(in srgb, var(--tkc-acc) 55%, transparent);
  box-shadow: 0 6px 20px -6px rgba(0, 0, 0, 0.5), 0 0 18px -8px color-mix(in srgb, var(--tkc-acc) 60%, transparent);
  color: var(--text-secondary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
}
.tkc-dock-chip:hover { color: var(--text-primary); transform: translateY(-2px); }
.tkc-dock-av {
  position: relative;
  width: 30px; height: 30px; flex: 0 0 auto;
  border-radius: 9px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--tkc-acc), color-mix(in srgb, var(--tkc-acc) 50%, #000));
}
.tkc-dock-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tkc-dock-av i { font-size: 15px; line-height: 1; }
.tkc-dock-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.tkc-dock-lbl { font-size: 12.5px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tkc-dock-sub { font-size: 10.5px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tkc-dock-x {
  width: 20px; height: 20px; flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.tkc-dock-x:hover { background: var(--danger-text, #ef4444); color: #fff; }

/* =====================================================================
   ПОДТВЕРЖДЕНИЕ ЗАКРЫТИЯ
   ===================================================================== */
.tkc-confirm {
  position: fixed;
  inset: 0;
  z-index: 1010;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.tkc-confirm[hidden] { display: none; }
.tkc-confirm-backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 8, 20, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.tkc-confirm-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  display: flex; flex-direction: column; align-items: center;
  gap: 10px;
  padding: 26px 24px 22px;
  text-align: center;
  border-radius: 20px;
  background: var(--surface-gradient, var(--bg-surface));
  border: 1px solid var(--border-default);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  animation: tkcIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.tkc-confirm-ic {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--warning-text, #f59e0b);
  background: rgba(245, 158, 11, 0.14);
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.06);
}
.tkc-confirm-title { font-size: 17px; font-weight: 800; color: var(--text-primary); }
.tkc-confirm-msg { font-size: 13.5px; line-height: 1.45; color: var(--text-secondary); }
.tkc-confirm-acts { display: flex; gap: 10px; width: 100%; margin-top: 10px; }
.tkc-confirm-acts .btn {
  flex: 1 1 auto;
  justify-content: center;
  white-space: nowrap;
  padding: 11px 16px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
}
.tkc-confirm-yes {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  box-shadow: 0 8px 22px rgba(225, 29, 72, 0.35);
}
.tkc-confirm-yes:hover { filter: brightness(1.08); }

/* =====================================================================
   ШАГ «ՈՒՂԱՐԿՈՒՄ»: что сделать сразу после создания (карточки действий,
   бригады дня, срок и причина отсрочки) и кого оповестить, когда заявку закроют
   ===================================================================== */
/* Карточки действий: видны только доступные этому сотруднику; сколько поместится в ряд */
.tkc-acts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 10px;
}
.tkc-act {
  --tkc-a: var(--tkc-acc);
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 34px 12px 12px;
  border: 1px solid var(--border-default);
  border-radius: 13px;
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--tkc-a) 7%, transparent), transparent 62%),
    color-mix(in srgb, var(--bg-surface) 80%, transparent);
  color: var(--text-secondary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease, color 0.14s ease;
}
.tkc-act:hover {
  transform: translateY(-1px);
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--tkc-a) 50%, var(--border-default));
  box-shadow: 0 10px 22px -16px var(--tkc-a);
}
.tkc-act:focus-visible { outline: 2px solid var(--tkc-a); outline-offset: 2px; }
.tkc-act.is-sel {
  color: var(--text-primary);
  border-color: var(--tkc-a);
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--tkc-a) 18%, transparent), color-mix(in srgb, var(--tkc-a) 5%, transparent)),
    var(--bg-surface);
  box-shadow: inset 0 0 0 1px var(--tkc-a), 0 10px 24px -16px var(--tkc-a);
}
.tkc-act-ic {
  width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: color-mix(in srgb, var(--tkc-a) 85%, var(--text-primary));
  background: color-mix(in srgb, var(--tkc-a) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tkc-a) 30%, transparent);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.tkc-act-ic svg { width: 18px; height: 18px; }
.tkc-act.is-sel .tkc-act-ic {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--tkc-a), color-mix(in srgb, var(--tkc-a) 58%, #000));
  box-shadow: 0 6px 14px -6px var(--tkc-a);
}
.tkc-act-txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tkc-act-t { font-size: 13.5px; font-weight: 700; line-height: 1.2; color: inherit; }
.tkc-act-d {
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--text-tertiary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tkc-act.is-sel .tkc-act-d { color: var(--text-secondary); }
.tkc-act-ok {
  position: absolute;
  top: 10px; right: 10px;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center; justify-content: center;
  color: #fff;
  background: var(--tkc-a);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tkc-a) 20%, transparent);
}
.tkc-act-ok svg { width: 11px; height: 11px; }
.tkc-act.is-sel .tkc-act-ok { display: inline-flex; animation: tkcPop 0.25s ease both; }

/* Под карточками: бригады дня или срок и причина отсрочки */
.tkc-after-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 13px;
  border: 1px solid var(--border-default);
  background: color-mix(in srgb, var(--bg-root) 20%, var(--bg-surface));
  animation: tkcFade 0.2s ease both;
}
.tkc-after-h {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
}
.tkc-after-n {
  min-width: 20px; height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: color-mix(in srgb, var(--tkc-sec) 82%, var(--text-primary));
  background: color-mix(in srgb, var(--tkc-sec) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tkc-sec) 30%, transparent);
}
.tkc-after-n:empty { display: none; }
.tkc-crews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 8px;
}
.tkc-crew {
  position: relative;
  min-width: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 30px 8px 8px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: var(--bg-surface-2);
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.14s ease;
}
.tkc-crew:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--tkc-sec) 55%, var(--border-default));
  box-shadow: 0 10px 22px -16px var(--tkc-sec);
}
.tkc-crew:focus-visible { outline: 2px solid var(--tkc-sec); outline-offset: 1px; }
.tkc-crew.is-sel {
  border-color: var(--tkc-sec);
  background: color-mix(in srgb, var(--tkc-sec) 12%, var(--bg-surface-2));
  box-shadow: inset 0 0 0 1px var(--tkc-sec);
}
.tkc-crew-av {
  width: 34px; height: 34px; flex: 0 0 auto;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--h, 200) 62% 52%), hsl(calc(var(--h, 200) + 40) 58% 36%));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.tkc-crew-name {
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tkc-crew-ok {
  position: absolute;
  right: 9px; top: 50%;
  width: 16px; height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  display: none;
  align-items: center; justify-content: center;
  color: #fff;
  background: var(--tkc-sec);
}
.tkc-crew-ok svg { width: 10px; height: 10px; }
.tkc-crew.is-sel .tkc-crew-ok { display: inline-flex; animation: tkcPop 0.25s ease both; }
.tkc-crew-skel { height: 52px; border-radius: 12px; }

/* Срок и причина отсрочки */
.tkc-delay {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}
.tkc-fld { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.tkc-fld-l { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.tkc-fld-l b { margin-left: 3px; color: var(--danger-text, #ef4444); }

/* «Ծանուցել, երբ փակվի»: о каких закрытиях — точки в цвет оповещения колокольчика */
.tkc-watch-ev {
  margin-left: auto;
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-tertiary);
}
.tkc-watch-ev span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tkc-watch-ev span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tkc-watch-ev .is-fin::before { background: var(--success, #10b981); }
.tkc-watch-ev .is-rej::before { background: var(--warning-text, #f59e0b); }
.tkc-watch-ev .is-del::before { background: var(--danger-text, #ef4444); }
.tkc-watch { display: flex; align-items: stretch; gap: 10px; }
.tkc-me {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px;
  padding: 0 12px 0 6px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.tkc-me:hover { color: var(--text-primary); border-color: color-mix(in srgb, var(--tkc-sec) 55%, var(--border-strong)); }
.tkc-me:focus-visible { outline: 2px solid var(--tkc-sec); outline-offset: 2px; }
.tkc-me.is-on {
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--tkc-sec) 70%, transparent);
  background: color-mix(in srgb, var(--tkc-sec) 12%, var(--bg-surface));
}
.tkc-me-av {
  width: 32px; height: 32px; flex: 0 0 auto;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--h, 40) 62% 52%), hsl(calc(var(--h, 40) + 40) 58% 36%));
}
.tkc-me-sw {
  position: relative;
  width: 34px; height: 20px; flex: 0 0 auto;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted) 35%, transparent);
  transition: background 0.2s ease;
}
.tkc-me-sw i {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.tkc-me.is-on .tkc-me-sw { background: var(--tkc-sec); }
.tkc-me.is-on .tkc-me-sw i { transform: translateX(14px); }
.tkc-wq { flex: 1 1 auto; min-width: 0; }
.tkc-modal .tkc-wq .input { height: 44px; min-height: 44px; }
.tkc-sp-av,
.tkc-wchip-av {
  width: 28px; height: 28px; flex: 0 0 auto;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--h, 220) 62% 52%), hsl(calc(var(--h, 220) + 40) 58% 36%));
}
/* Все сотрудники по ролям: заголовок роли с числом, сотрудники — плашками */
.tkc-staff { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.tkc-staff-g { display: flex; flex-direction: column; gap: 8px; }
.tkc-staff-h {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.tkc-staff-h b {
  min-width: 20px; height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--bg-root) 35%, transparent);
  border: 1px solid var(--border-subtle);
}
.tkc-staff-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tkc-sp {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 100%;
  height: 36px;
  padding: 0 14px 0 4px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease, padding 0.14s ease;
}
.tkc-sp:hover { color: var(--text-primary); border-color: color-mix(in srgb, var(--tkc-sec) 50%, var(--border-default)); }
.tkc-sp:focus-visible { outline: 2px solid var(--tkc-sec); outline-offset: 2px; }
.tkc-sp.is-on {
  padding-right: 32px;
  color: var(--text-primary);
  border-color: var(--tkc-sec);
  background: color-mix(in srgb, var(--tkc-sec) 14%, var(--bg-surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tkc-sec) 40%, transparent);
}
.tkc-sp-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tkc-sp-name mark { background: color-mix(in srgb, var(--tkc-sec) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.tkc-sp-ok {
  position: absolute;
  right: 8px; top: 50%;
  width: 18px; height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  display: none;
  align-items: center; justify-content: center;
  color: #fff;
  background: var(--tkc-sec);
}
.tkc-sp-ok svg { width: 11px; height: 11px; }
.tkc-sp.is-on .tkc-sp-ok { display: inline-flex; animation: tkcPop 0.2s ease both; }
/* Пояснение вместо карточек действий: тип не выбран или у сотрудника нет действий для этой работы */
.tkc-after-note {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--tkc-sec) 45%, var(--border-strong));
  background: color-mix(in srgb, var(--tkc-sec) 6%, transparent);
}
.tkc-after-note-ic {
  width: 32px; height: 32px; flex: 0 0 auto;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: color-mix(in srgb, var(--tkc-sec) 82%, var(--text-primary));
  background: color-mix(in srgb, var(--tkc-sec) 14%, transparent);
}
.tkc-after-note-ic svg { width: 17px; height: 17px; }
.tkc-after-note-t { flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 1.45; color: var(--text-secondary); }
@media (max-width: 720px) {
  .tkc-after-note { flex-wrap: wrap; }
  .tkc-after-note .tkc-btn { width: 100%; justify-content: center; height: 40px; }
}
.tkc-wchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tkc-wchip {
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 100%;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--tkc-sec) 40%, var(--border-default));
  background: color-mix(in srgb, var(--tkc-sec) 8%, var(--bg-surface));
  animation: tkcPop 0.2s ease both;
}
.tkc-wchip-av { width: 26px; height: 26px; font-size: 10px; }
.tkc-wchip-name {
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tkc-wchip-x {
  width: 22px; height: 22px; flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--text-muted) 22%, transparent);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.tkc-wchip-x svg { width: 10px; height: 10px; }
.tkc-wchip-x:hover { background: var(--danger-text, #ef4444); color: #fff; }

/* Окно уже 820 px: срок и причина — друг под другом */
@container tkc (max-width: 820px) {
  .tkc-delay { grid-template-columns: minmax(0, 1fr); }
  .tkc-watch-ev { width: 100%; margin-left: 0; }
}
/* Телефон: «Ինձ» и поиск сотрудника — друг под другом */
@media (max-width: 720px) {
  .tkc-watch { flex-direction: column; }
  .tkc-me { width: 100%; }
  .tkc-me-t { flex: 1 1 auto; text-align: left; }
}
/* Без анимаций по системной настройке — и у шага «Ուղարկում» */
@media (prefers-reduced-motion: reduce) {
  .tkc-act-ok, .tkc-crew-ok, .tkc-after-box, .tkc-sp-ok, .tkc-wchip { animation: none !important; }
  .tkc-act, .tkc-crew, .tkc-me, .tkc-me-sw, .tkc-me-sw i, .tkc-sp { transition: none !important; }
}

/* =====================================================================
   АНИМАЦИИ
   ===================================================================== */
@keyframes tkcFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tkcIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes tkcUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
@keyframes tkcPaneFwd {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes tkcPaneBack {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: none; }
}
@keyframes tkcPop {
  0% { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: none; }
}
/* плитки типов появляются лёгкой волной (задержка — по номеру плитки, --i) */
@keyframes tkcTileIn {
  from { opacity: 0; transform: translateY(5px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes tkcAvIn {
  0% { opacity: 0; transform: scale(0.4); }
  60% { opacity: 1; transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes tkcShake {
  0%, 100% { transform: none; }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
@keyframes tkcSpin { to { transform: rotate(360deg); } }
@keyframes tkcSkel { 100% { transform: translateX(100%); } }
@keyframes tkcDockIn {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.tkc-shake { animation: tkcShake 0.38s ease; }

/* =====================================================================
   АДАПТИВ
   ===================================================================== */
/* Планшет и узкий ноутбук: окно во всю ширину */
@media (max-width: 1100px) {
  .tkc-panel { width: 100%; height: min(94vh, 1000px); }
}
/* Окно уже 1060 px: карточка — компактной полосой над разделом (на шаге «тип» её нет) */
@container tkc (max-width: 1060px) {
  .tkc-body {
    grid-template-columns: 216px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "rail aside" "rail form";
  }
  .tkc-aside {
    max-height: 180px;
    padding: 10px 22px;
    border-left: 0;
    border-bottom: 1px solid var(--border-subtle);
  }
  .tkc-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
  }
  .tkc-who { margin-top: 0; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; text-align: left; gap: 8px 10px; }
  .tkc-who-av,
  .tkc-skel-av { width: 44px; height: 44px; font-size: 15px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tkc-acc) 22%, transparent); }
  .tkc-who-bldic { width: 44px; height: 44px; border-radius: 13px; }
  .tkc-who-bldic svg { width: 22px; height: 22px; }
  .tkc-who-name { font-size: 14px; flex: 1 1 140px; min-width: 0; }
  .tkc-who-rows,
  .tkc-check { display: none; }
  .tkc-who-x { top: 50%; transform: translateY(-50%); right: 0; }
  .tkc-who.is-empty { flex-wrap: nowrap; }
}
/* Окно уже 820 px (планшет, телефон, окно сжато уголком): шаги — полосой сверху */
@container tkc (max-width: 820px) {
  .tkc-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas: "rail" "aside" "form";
  }
  .tkc-rail {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    scrollbar-width: none;
  }
  .tkc-rail::-webkit-scrollbar { display: none; }
  .tkc-steps { flex-direction: row; gap: 6px; width: max-content; }
  .tkc-step {
    align-items: center;
    gap: 9px;
    padding: 5px 12px 5px 5px;
    border-radius: 999px;
    border-color: var(--border-default);
  }
  .tkc-step.is-cur::before,
  .tkc-step-li:not(:last-child) .tkc-step::after { display: none; }
  .tkc-step-n { width: 26px; height: 26px; font-size: 12px; }
  .tkc-step-txt { padding-top: 0; gap: 0; }
  .tkc-step-t { display: block; white-space: nowrap; -webkit-line-clamp: unset; font-size: 13px; }
  .tkc-step-sub { display: none; }
  .tkc-aside { padding: 8px 14px; }
  .tkc-form { padding: 12px 14px 14px; }
  .tkc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tkc-sec-h { flex-wrap: wrap; }
  .tkc-sec-tools { width: 100%; margin-left: 0; }
  .tkc-find { width: 100%; }
}
/* Телефон: окно на весь экран, поля в одну колонку, кнопки внизу */
@media (max-width: 720px) {
  .tkc-modal,
  .tkc-modal.is-max { padding: 0; align-items: stretch; }
  .tkc-panel {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    animation: tkcUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .tkc-modal.is-max .tkc-panel { border-radius: 0; }
  .tkc-head { padding: 12px 14px 10px; padding-top: calc(12px + env(safe-area-inset-top)); }
  .tkc-head-ic { width: 34px; height: 34px; border-radius: 10px; }
  .tkc-max-btn,
  .tkc-resize { display: none; }
  .tkc-title { font-size: 15.5px; }
  .tkc-grid { grid-template-columns: minmax(0, 1fr); }
  .tkc-types { --tkc-cols: 2; --tkc-tile-h: 56px; }
  .tkc-sec { padding: 14px; }
  .tkc-modal .input,
  .tkc-modal .select,
  .tkc-modal .textarea { font-size: 16px; min-height: 44px; height: 44px; }
  .tkc-modal .textarea { height: auto; }
  .tkc-modal .tkc-find .input { height: 44px; min-height: 44px; }
  .tkc-foot { gap: 8px; padding: 10px 14px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .tkc-foot-hint,
  .tkc-next-t { display: none; }
  .tkc-next { padding: 0 10px 0 8px; }
  .tkc-submit { flex: 1 1 auto; min-width: 0; }
  .tkc-dock { left: 8px; right: 8px; bottom: 8px; transform: none; max-width: none; animation: none; }
  .tkc-dock-chip { max-width: 100%; }
  .tkc-confirm-acts { flex-direction: column-reverse; }
}
/* Низкий экран ноутбука */
@media (max-height: 620px) and (min-width: 721px) {
  .tkc-panel { height: 96vh; }
  .tkc-head { padding-top: 10px; padding-bottom: 8px; }
  .tkc-form { padding-top: 12px; padding-bottom: 12px; }
}
/* Без анимаций по системной настройке */
@media (prefers-reduced-motion: reduce) {
  .tkc-backdrop, .tkc-panel, .tkc-pane.is-cur, .tkc-results, .tkc-file, .tkc-who-av, .tkc-who-bldic,
  .tkc-type, .tkc-type-ok, .tkc-bld-chosen, .tkc-confirm-card, .tkc-dock, .tkc-shake, .tkc-panel.is-nudge {
    animation: none !important;
  }
  .tkc-panel, .tkc-type, .tkc-step, .tkc-modal .tcpick-card, .tkc-body, .tkc-aside,
  .tkc-modal .tcpick-open, .tkc-who-name.is-link, .tkc-who-open { transition: none !important; }
  .tkc-skel::after { animation: none !important; }
  .tkc-submit-spin { animation-duration: 1.6s !important; }
}
