/* KLAR — карточка компании и персоны к макетам Figma 10.11.2026 (#5476, кадры 2269:498,
   2433:10, 2369:738): кнопка «Сохранить» в шапке и панель «Заявка на проверку» поверх
   карточки. Токены — из `klar-theme.css`, как у остальных слоёв: своих цветов файл не заводит.
   Кириллица панели — Golos Text темы; телефон — та же панель листом снизу. */

/* Действия шапки — точка отсчёта панели: она встаёт под ними справа, не сдвигая шапку. */
.chead-acts { position: relative; }

/* «Скачать» — обычная кнопка шапки со стрелкой вниз набора иконок; подпись несёт смысл, иконка вторит. */
.card-save::before { content: ''; width: 14px; height: 14px; flex: none; background-color: currentColor;
  -webkit-mask: url('/static/img/icons/ui/download.svg') center / contain no-repeat;
  mask: url('/static/img/icons/ui/download.svg') center / contain no-repeat; }

/* ---------- Панель «Заявка на проверку» (2433:10) ---------- */

.chip-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 26;
  box-sizing: border-box; width: min(443px, calc(100vw - 48px)); padding: 21px 23px 18px;
  background: var(--plate); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 18px 44px var(--shadow); }
.chip-head { display: flex; align-items: flex-start; gap: 12px; }
.chip-title { flex: 1; min-width: 0; margin: 0; font-size: 16px; font-weight: 700;
  letter-spacing: .01em; color: var(--text); text-transform: uppercase; }
.chip-close { flex: none; width: 28px; height: 28px; margin: -4px -6px 0 0; padding: 0;
  border: 0; border-radius: 6px; background: none; color: var(--text2); font: inherit;
  font-size: 20px; line-height: 1; cursor: pointer; }
.chip-close:hover, .chip-close:focus-visible { background: var(--hover-strong); color: var(--text); }
.chip-close:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.chip-hint { margin: 4px 0 14px; color: var(--text2); font-size: 13px; }
.chip-wait { margin: 6px 0 4px; }

/* Поля — строками «подпись слева, поле справа», как в кадре: подпись 153, поле 32. */
.chip-form { display: flex; flex-direction: column; gap: 12px; }
.chip-field { display: grid; grid-template-columns: 153px minmax(0, 1fr); align-items: center;
  gap: 8px 12px; margin: 0; }
.chip-field-label { color: var(--text2); font-size: 14px; }
.chip-input { box-sizing: border-box; width: 100%; height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--plate); color: var(--text);
  font: inherit; font-size: 14px; }
.chip-input:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.chip-input:disabled { opacity: .55; }
.chip-err:empty { display: none; }
.chip-err { color: var(--err); font-size: 13px; }
.chip-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip-actions .btn { height: 32px; }
/* Главное действие панели — индиго бренда макета, рамка темнее заливки (кадр 2433:10). */
.chip-actions .btn.primary { background: var(--case-primary); border-color: var(--case-primary-line); }
.chip-actions .btn.primary:hover, .chip-actions .btn.primary:focus-visible {
  background: var(--case-primary-hover); border-color: var(--case-primary-line); }

/* Телефон: та же панель листом снизу — поверх карточки, а не отдельным экраном. */
@media (max-width: 700px) {
  /* Лист снизу стоит над телефонной полосой меню, иначе её кнопки перекрывают «Создать». */
  .chip-panel { position: fixed; left: 12px; right: 12px; top: auto; bottom: 68px; width: auto;
    max-height: calc(100vh - 160px); overflow-y: auto; padding: 14px 16px 16px; }
  .chip-field { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .chip-form { gap: 8px; }
  .chip-actions { gap: 6px; }
}

/* Печать: панель и «Сохранить» — действия экрана, на бумагу не идут (рядом с `.chead-acts`). */
@media print {
  .chip-panel { display: none; }
}

/* 11.11: иконка у «Проверки» и приглушённые подписи показателей — как в макете карточки. */
.card-check { display: inline-flex; align-items: center; gap: 6px; }
.card-check::before {
  content: ''; width: 14px; height: 14px; flex: none; background-color: currentColor;
  -webkit-mask: url('/static/img/icons/ui/checks.svg') center / contain no-repeat;
  mask: url('/static/img/icons/ui/checks.svg') center / contain no-repeat;
}
body.card-page .card-body dl.kv dt { color: var(--text2); font-weight: 400; }
body.card-page .card-body dl.kv dd { color: var(--text-hi); font-weight: 400; }

.card-refresh { display: inline-flex; align-items: center; gap: 6px; }
.card-refresh::before { content: ''; width: 14px; height: 14px; flex: none; background-color: currentColor;
  -webkit-mask: url('/static/img/icons/ui/refresh.svg') center / contain no-repeat;
  mask: url('/static/img/icons/ui/refresh.svg') center / contain no-repeat; }
