/* =========================================================
   ИИ помощник строительного эксперта
   Базовые стили + стили шагов, форм, кабинета, тарифов
   ========================================================= */

:root {
  --c-bg: #f4f6fa;
  --c-surface: #ffffff;
  --c-ink: #0b1f3a;
  --c-ink-soft: #2a3a55;
  --c-muted: #5a6b85;
  --c-line: #e3e8f1;
  --c-line-soft: #eef1f8;
  --c-brand: #1d3a8a;
  --c-brand-deep: #0e2256;
  --c-accent: #b22020;
  --c-accent-soft: #fbe9e9;
  --c-ok: #1f8a52;
  --c-warn: #b56b00;
  --c-shadow: 0 10px 30px rgba(11, 31, 58, 0.08);
  --c-shadow-strong: 0 18px 40px rgba(11, 31, 58, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --container: 1200px;
  --container-narrow: 920px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ============== Топбар ============== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--c-line);
}
.topbar__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--c-ink);
}
.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--c-brand), var(--c-brand-deep));
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.5px;
  box-shadow: var(--c-shadow);
}
.brand__name { font-size: 16px; letter-spacing: -0.01em; }

.topnav { display: flex; align-items: center; gap: 4px; }
.topnav__link {
  position: relative;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--c-ink-soft);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.topnav__link:hover { background: #eef2fa; color: var(--c-brand-deep); }
.topnav__link--active { color: var(--c-brand-deep); background: #eaf0ff; }
.topnav__link--active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px; border-radius: 2px; background: var(--c-accent);
}

/* ============== Степпер ============== */
.stepper {
  background: #fff;
  border-bottom: 1px solid var(--c-line);
}
.stepper__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stepper__back {
  font-size: 14px;
  color: var(--c-ink-soft);
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
}
.stepper__back:hover { background: #eef2fa; color: var(--c-brand-deep); }
.stepper__list {
  display: flex;
  flex: 1;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.stepper__list::-webkit-scrollbar { display: none; }
.stepper__item { display: flex; }
.stepper__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--c-muted);
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.stepper__link:hover { background: #eef2fa; color: var(--c-brand-deep); }
.stepper__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #eef2fa;
  color: var(--c-brand);
  font-size: 11px;
  font-weight: 700;
}
.stepper__item.is-active .stepper__link {
  background: var(--c-brand);
  color: #fff;
}
.stepper__item.is-active .stepper__num {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
.stepper__item.is-done .stepper__num { background: #d6f0e0; color: var(--c-ok); }
.stepper__save {
  font-size: 12px;
  color: var(--c-ok);
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}
.stepper__save.is-on { opacity: 1; }

/* ============== Главная область ============== */
.app { min-height: calc(100vh - 60px - 90px); }

/* ============== Герой / меню ============== */
.hero {
  background:
    radial-gradient(1200px 400px at 80% -20%, rgba(29, 58, 138, 0.18), transparent 60%),
    radial-gradient(800px 300px at 0% 0%, rgba(178, 32, 32, 0.10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--c-bg) 100%);
  border-bottom: 1px solid var(--c-line);
}
.hero__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 24px 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.hero__eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
}
.hero__title {
  margin: 0 0 16px;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--c-ink);
}
.hero__subtitle {
  margin: 0;
  max-width: 720px;
  color: var(--c-muted);
  font-size: 17px;
}
.hero__emblem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
}
.hero__emblem img { height: 96px; width: auto; display: block; }
.hero__emblem-caption {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.menu { padding: 48px 0 72px; }
.menu__inner { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.menu__head { margin-bottom: 28px; }
.menu__title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  color: var(--c-ink);
  letter-spacing: -0.01em;
}
.menu__hint { margin: 0; color: var(--c-muted); font-size: 15px; }
.menu__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.menu__grid > li { display: flex; }
.menu-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  padding: 22px 22px 24px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
}
.menu-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--c-brand), var(--c-accent));
  opacity: 0;
  transition: opacity 0.18s ease;
}
.menu-card:hover { transform: translateY(-3px); box-shadow: var(--c-shadow-strong); border-color: #d6def0; }
.menu-card:hover::before { opacity: 1; }
.menu-card__num { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; color: var(--c-brand); }
.menu-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #eef2ff;
  color: var(--c-brand);
  margin-top: 2px;
}
.menu-card__icon svg { width: 24px; height: 24px; }
.menu-card__body { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.menu-card__title { font-size: 17px; font-weight: 600; color: var(--c-ink); letter-spacing: -0.005em; }
.menu-card__desc { font-size: 14px; color: var(--c-muted); line-height: 1.5; }
.menu-card--accent {
  background: linear-gradient(135deg, #ffffff 0%, #f7f9ff 100%);
  border-color: #cfdaff;
}
.menu-card--accent .menu-card__icon { background: var(--c-accent-soft); color: var(--c-accent); }
.menu-card--accent .menu-card__num { color: var(--c-accent); }

/* ============== Шаги ============== */
.step { padding: 32px 0 72px; }
.step__inner { max-width: var(--container-narrow); margin: 0 auto; padding: 0 24px; }
.step__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.step__eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-brand);
}
.step__title {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-ink);
}
.step__hint { margin: 0; color: var(--c-muted); font-size: 15px; max-width: 620px; }
.step__hint-em { color: var(--c-ink-soft); font-weight: 500; }

.project-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--c-muted);
  white-space: nowrap;
}
.project-pill__label { color: var(--c-ink); font-weight: 600; }
.project-pill__id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--c-brand);
  font-weight: 600;
}
.project-pill__sep {
  width: 1px; height: 12px; background: var(--c-line);
}

.step__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--c-line);
  gap: 12px;
}

/* ============== Формы ============== */
.form {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.field__req { color: var(--c-accent); font-weight: 700; }
.field__control {
  width: 100%;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  padding: 11px 13px;
  font: inherit;
  color: var(--c-ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field__control:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px rgba(29, 58, 138, 0.12);
}
.field__control--ta { resize: vertical; min-height: 76px; line-height: 1.5; }
.field__help { margin: 0; font-size: 12px; color: var(--c-muted); }
.field__help-em { color: var(--c-ink-soft); font-weight: 500; }

/* Загрузка файлов */
.uploader {
  position: relative;
  margin-top: 4px;
}
.uploader.is-drag .uploader__drop { border-color: var(--c-brand); background: #f3f6ff; }
.uploader__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.uploader__drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 18px;
  border: 1.5px dashed #c5cee0;
  border-radius: var(--radius);
  background: #fafbff;
  color: var(--c-ink-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.uploader__drop:hover { border-color: var(--c-brand); background: #f3f6ff; }
.uploader__icon { color: var(--c-brand); }
.uploader__icon svg { width: 28px; height: 28px; display: block; }
.uploader__title { font-size: 15px; font-weight: 600; }
.uploader__sub { font-size: 13px; color: var(--c-muted); }

/* Список документов */
.docs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.docs__empty {
  padding: 14px 16px;
  border: 1px dashed var(--c-line);
  border-radius: 10px;
  color: var(--c-muted);
  font-size: 13px;
  text-align: center;
}
.docs__item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #fafbff;
  border: 1px solid var(--c-line);
  border-radius: 10px;
}
.docs__thumb {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--c-line);
  object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: var(--c-brand);
  font-weight: 700;
  overflow: hidden;
}
.docs__thumb--file { background: #eef2ff; }
.docs__ext { letter-spacing: 0.04em; }
.docs__meta { min-width: 0; }
.docs__name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.docs__sub { font-size: 12px; color: var(--c-muted); }
.docs__actions { display: inline-flex; gap: 6px; }

/* ============== Кнопки ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--c-brand);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--c-brand-deep); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--c-brand); color: #fff; }
.btn--primary:hover { background: var(--c-brand-deep); }
.btn--ghost {
  background: #fff;
  color: var(--c-ink-soft);
  border-color: var(--c-line);
}
.btn--ghost:hover { background: #eef2fa; color: var(--c-brand-deep); }
.btn--danger { background: #fff; color: var(--c-accent); border-color: #e9c7c7; }
.btn--danger:hover { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.btn--sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }

/* ============== Плейсхолдеры ============== */
.placeholder {
  text-align: center;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 60px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.placeholder__icon {
  color: var(--c-brand);
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #eef2ff;
  margin-bottom: 4px;
}
.placeholder__icon svg { width: 28px; height: 28px; }
.placeholder__title { margin: 0; font-size: 20px; color: var(--c-ink); }
.placeholder__text { margin: 0; color: var(--c-muted); max-width: 520px; }

/* ============== Страницы (тариф, кабинет, выход) ============== */
.page { padding: 48px 0 72px; }
.page--center { display: flex; align-items: center; min-height: 60vh; }
.page__inner { max-width: var(--container); margin: 0 auto; padding: 0 24px; width: 100%; }
.page--center .page__inner { max-width: 560px; }
.page__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.page__eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-brand);
}
.page__title {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-ink);
}
.page__hint { margin: 0; color: var(--c-muted); max-width: 640px; }

/* Тарифы */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.tier {
  position: relative;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--c-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.tier:hover { transform: translateY(-3px); box-shadow: var(--c-shadow-strong); }
.tier--featured { border-color: #cfdaff; background: linear-gradient(180deg, #fff 0%, #f7f9ff 100%); }
.tier--current { border-color: #cfdaff; }
.tier__badge {
  position: absolute;
  top: -12px; right: 18px;
  background: var(--c-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}
.tier__name { margin: 0; font-size: 18px; font-weight: 700; color: var(--c-ink); }
.tier__price { margin: 0; font-size: 26px; font-weight: 700; color: var(--c-brand); }
.tier__desc { margin: 0; color: var(--c-muted); font-size: 14px; }
.tier__features {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 14px; color: var(--c-ink-soft);
  margin-top: 4px;
}
.tier__cta { margin-top: auto; }

/* Кабинет */
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.project {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.project:hover { transform: translateY(-2px); box-shadow: var(--c-shadow-strong); }
.project__main { min-width: 0; flex: 1; }
.project__id {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--c-brand);
  background: #eef2ff;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.project__title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  color: var(--c-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project__sub { margin: 0 0 6px; color: var(--c-ink-soft); font-size: 14px; }
.project__meta { margin: 0; color: var(--c-muted); font-size: 12px; }
.project__actions { display: flex; flex-direction: column; gap: 8px; }

.empty {
  background: #fff;
  border: 1px dashed var(--c-line);
  border-radius: var(--radius);
  padding: 60px 24px;
  text-align: center;
  color: var(--c-muted);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty__icon {
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #eef2ff;
  color: var(--c-brand);
}
.empty__icon svg { width: 28px; height: 28px; }
.empty__text { margin: 0; font-size: 14px; }

/* Подтверждение выхода */
.confirm {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 32px;
  text-align: center;
  display: flex; flex-direction: column; gap: 14px; align-items: center;
}
.confirm__title { margin: 0; font-size: 24px; color: var(--c-ink); }
.confirm__text { margin: 0; color: var(--c-muted); max-width: 480px; }
.confirm__actions { display: flex; gap: 10px; margin-top: 6px; }

/* ============== Баннер «Тестовый режим» на странице тарифов ============== */
.tariff-testmode {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 28px;
  padding: 18px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 60%, #fcd34d 100%);
  border: 2px dashed #d97706;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.18);
  position: relative;
  z-index: 1;
}
.tariff-testmode__icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #b45309;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.25);
}
.tariff-testmode__body { flex: 1 1 auto; min-width: 0; }
.tariff-testmode__title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: #78350f;
  letter-spacing: -0.01em;
}
.tariff-testmode__text {
  margin: 0;
  font-size: 14px;
  color: #78350f;
  line-height: 1.5;
}
.tariff-testmode__text + .tariff-testmode__text { margin-top: 4px; }

/* Кнопки «Выбрать» и «Связаться» — задизейблены в тестовом режиме */
.tier__cta:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  background: #f1f5f9 !important;
  color: #64748b !important;
  border-color: #cbd5e1 !important;
  box-shadow: none !important;
}
.tier__cta:disabled:hover { transform: none; }

/* ============== Страница входа / регистрации ============== */
.auth-page {
  max-width: 460px;
  margin: 60px auto 40px;
  padding: 0 20px;
}
.auth-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 18px;
  padding: 36px 36px 30px;
  box-shadow: 0 6px 30px rgba(15, 23, 42, 0.07);
}
.auth-card__title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  color: var(--c-ink);
}
.auth-card__subtitle {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.5;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 4px; }
.auth-field__label { font-size: 13px; font-weight: 600; color: var(--c-ink); }
.auth-field__input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  font: 14px/1.4 Inter, system-ui, sans-serif;
  color: var(--c-ink);
  background: #fbfcfe;
  transition: border-color 0.15s, background 0.15s;
}
.auth-field__input:focus {
  outline: none;
  border-color: var(--c-primary, #1d3a8a);
  background: #fff;
}
.auth-field__input--pwd { padding-right: 42px; }
.auth-field__pwd { position: relative; }
.auth-field__eye {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7a99;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.auth-field__eye:hover { color: #1d3a8a; background: #eef2fb; }
.auth-field__eye:focus { outline: 2px solid #1d3a8a; outline-offset: 1px; }
.auth-field__eye-icon { display: block; }
.auth-field__eye-icon--hide { display: none; }
.auth-field__eye.is-visible .auth-field__eye-icon--show { display: none; }
.auth-field__eye.is-visible .auth-field__eye-icon--hide { display: block; }
.auth-form__submit { width: 100%; margin-top: 6px; }
.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}
.auth-switch {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--c-line);
  font-size: 14px;
  color: var(--c-muted);
  text-align: center;
}
.auth-switch__text { color: var(--c-muted); }
.auth-switch__link {
  color: var(--c-primary, #1d3a8a);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  margin-left: 4px;
}
.auth-switch__link:hover { text-decoration: underline; }
.auth-hint {
  margin-top: 20px;
  font-size: 13px;
  color: var(--c-muted);
  text-align: center;
  line-height: 1.55;
}
.auth-hint a { color: var(--c-primary, #1d3a8a); font-weight: 600; text-decoration: none; }
.auth-hint a:hover { text-decoration: underline; }

/* Кабинет — приветствие пользователя */
.cabinet-user {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #eef2fb;
  color: #1d3a8a;
  font-size: 13px;
}
.cabinet-user__hello { color: #6b7a99; }
.cabinet-user__name { color: #1d3a8a; font-weight: 700; }

/* Ссылка «Личный кабинет» в верхнем меню (логин-email если залогинен) */
.topnav__link--logged {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}
.topnav__link--logged::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  flex-shrink: 0;
}

/* Список сохранённых аккаунтов на странице входа */
.auth-saved {
  max-width: 480px;
  margin: 24px auto 0;
  background: #fff;
  border: 1px solid #e2e6f0;
  border-radius: 12px;
  padding: 18px 22px 16px;
  box-shadow: 0 2px 6px rgba(15, 32, 68, 0.04);
}
.auth-saved__title { font-size: 15px; font-weight: 700; color: #1d3a8a; margin: 0 0 4px; }
.auth-saved__hint  { font-size: 12.5px; color: #6b7a99; margin: 0 0 12px; line-height: 1.4; }
.auth-saved__list  { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.auth-saved__item  { }
.auth-saved__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: #f6f8fc;
  border: 1px solid #e2e6f0;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  font: inherit;
  color: inherit;
}
.auth-saved__btn:hover  { background: #eef2fb; border-color: #c8d3e6; }
.auth-saved__btn:active { transform: scale(0.99); }
.auth-saved__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d3a8a, #4f6fc9);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.auth-saved__meta  { display: flex; flex-direction: column; min-width: 0; }
.auth-saved__name  { font-size: 14px; font-weight: 600; color: #14274a; }
.auth-saved__email { font-size: 12.5px; color: #6b7a99; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============== Подвал ============== */
.footer { background: #0e1f3d; color: #c8d3e6; }
.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}
.footer__line { margin: 0; color: #c8d3e6; }
.footer__line #year,
.footer__line { color: #c8d3e6; }
.footer__line { letter-spacing: 0.02em; }
.footer__copy { margin: 0; color: #93a3c0; }
.footer__author { margin: 0 0 0 auto; color: #fff; font-weight: 600; letter-spacing: 0.02em; }

/* ============== Фотогалерея (шаг 2) ============== */
.uploader--photos .uploader__drop { padding: 36px 20px; }
.uploader--photos .uploader__icon svg { width: 34px; height: 34px; }

.photos {
  margin-top: 24px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 22px;
}
.photos__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.photos__title { margin: 0; font-size: 17px; font-weight: 600; color: var(--c-ink); }
.photos__hint { font-size: 13px; color: var(--c-muted); }
.photos__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 50px 16px;
  border: 1px dashed var(--c-line);
  border-radius: 12px;
  color: var(--c-muted);
  font-size: 14px;
}
.photos__empty-icon {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #eef2ff;
  color: var(--c-brand);
}
.photos__empty-icon svg { width: 24px; height: 24px; }

.photos__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.photo-card {
  display: flex;
  flex-direction: column;
  background: #fafbff;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.photo-card:hover { border-color: #cfdaff; box-shadow: var(--c-shadow); }
.photo-card.is-primary {
  border-color: #f0c560;
  box-shadow: 0 0 0 2px rgba(240, 197, 96, 0.25), var(--c-shadow);
}

.photo-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #eef1f8;
  overflow: hidden;
}
.photo-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.photo-card__view {
  position: absolute; inset: 0;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: zoom-in;
}
.photo-card__view:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; }

.photo-card__star {
  position: absolute;
  top: 8px; left: 8px;
  background: #f5b400;
  color: #fff;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(245, 180, 0, 0.4);
}

.photo-card__body {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.photo-card__caption { font-size: 13px; padding: 9px 11px; }
.photo-card__room { font-size: 13px; padding: 9px 11px; }
.photo-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--c-muted);
}
.photo-card__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.photo-card__actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.photo-card__actions .btn { flex: 1; min-width: 0; padding: 7px 8px; font-size: 12px; }

/* Лайтбокс */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 18, 36, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(4px);
}
.lightbox.is-on { opacity: 1; }
.lightbox__inner {
  position: relative;
  max-width: min(1200px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lightbox__img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.lightbox__cap {
  color: #e6ecf7;
  font-size: 14px;
  text-align: center;
  background: rgba(0,0,0,0.35);
  padding: 8px 14px;
  border-radius: 999px;
  max-width: 100%;
}
.lightbox__nav-hint { opacity: 0.7; font-size: 12px; }
.lightbox__close {
  position: fixed;
  top: 16px; right: 16px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.lightbox__close:hover { background: rgba(255,255,255,0.25); }

@media (max-width: 640px) {
  .photos__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .photo-card__body { padding: 10px; }
  .photo-card__actions { flex-direction: column; }
  .lightbox { padding: 12px; }
  .lightbox__close { top: 8px; right: 8px; }
}
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__emblem { justify-self: start; }
  .hero__title { font-size: 36px; }
  .menu__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiers { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
  .form__grid { grid-template-columns: 1fr; }
  .step__head { flex-direction: column; align-items: flex-start; }
  .project-pill { order: 2; }
}

@media (max-width: 640px) {
  .topbar__inner { padding: 12px 16px; }
  .brand__name { display: none; }
  .topnav__link { padding: 8px 10px; font-size: 14px; }
  .hero__inner { padding: 40px 16px 32px; }
  .hero__title { font-size: 28px; }
  .hero__subtitle { font-size: 15px; }
  .menu__grid { grid-template-columns: 1fr; }
  .step__inner, .menu__inner, .page__inner { padding: 0 16px; }
  .step__title, .page__title { font-size: 24px; }
  .step__nav { flex-direction: column-reverse; align-items: stretch; }
  .step__nav .btn { width: 100%; }
  .footer__inner { padding: 18px 16px; }
  .docs__item { grid-template-columns: 40px 1fr; }
  .docs__actions { grid-column: 1 / -1; }
  .project { flex-direction: column; }
  .project__actions { width: 100%; flex-direction: row; }
  .project__actions .btn { flex: 1; }
  .stepper__back { display: none; }
}

/* ============== Шаг 3: Описание объекта ============== */
.form--wide { padding: 28px; gap: 24px; }
.field__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.field__counter { font-size: 11px; color: var(--c-muted); font-weight: 500; }
.field__control--xl { min-height: 110px; line-height: 1.55; }

.template-bar {
  background: linear-gradient(135deg, #ffffff 0%, #f7f9ff 100%);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.template-bar__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-ink-soft);
}
.template-bar__icon { color: var(--c-brand); display: inline-flex; }
.template-bar__icon svg { width: 18px; height: 18px; }
.template-bar__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--c-line);
  color: var(--c-ink-soft);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chip:hover { background: #eef2fa; border-color: #d6def0; color: var(--c-brand-deep); }
.chip.is-active { background: var(--c-brand); color: #fff; border-color: var(--c-brand); }
.chip--clear { color: var(--c-accent); border-color: #e9c7c7; }
.chip--clear:hover { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }

.step__nav-group { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .step__nav-group { flex-direction: column-reverse; width: 100%; }
  .step__nav-group .btn { width: 100%; }
}

.photos-strip {
  margin-top: 24px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 22px;
}
.photos-strip__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.photos-strip__title { margin: 0; font-size: 16px; font-weight: 600; color: var(--c-ink); }
.photos-strip__count { color: var(--c-brand); }
.photos-strip__empty { margin: 0; color: var(--c-muted); font-size: 14px; }
.photos-strip__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.photos-strip__item {
  border: 1px solid var(--c-line);
  border-radius: 10px;
  overflow: hidden;
  background: #fafbff;
}
.photos-strip__item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.photos-strip__cap {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--c-ink-soft);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.photos-strip__room { color: var(--c-muted); }

/* ============== Печать / PDF ============== */
body.is-printing .topbar,
body.is-printing .stepper,
body.is-printing .footer,
body.is-printing .step__nav,
body.is-printing .template-bar,
body.is-printing .photos-strip,
body.is-printing .hero,
body.is-printing .menu,
body.is-printing .empty,
body.is-printing .confirm,
body.is-printing .placeholder,
body.is-printing .project-pill { display: none !important; }

@media print {
  body { background: #fff; }
  .app, .step, .step__inner, .page, .page__inner, .tiers, .projects { padding: 0 !important; margin: 0 !important; }
  .topbar, .stepper, .footer, .step__nav, .template-bar, .photos-strip, .hero, .menu, .empty, .confirm, .placeholder, .project-pill { display: none !important; }
  .step__head { margin-bottom: 12pt; }
  .step__eyebrow, .step__hint, .step__hint-em, .field__help, .field__counter { display: none !important; }
  .step__title { font-size: 20pt; margin-bottom: 12pt; }
  .form { border: none; box-shadow: none; padding: 0; }
  .field { break-inside: avoid; page-break-inside: avoid; margin-bottom: 12pt; }
  .field__label { font-size: 13pt; font-weight: 700; }
  .field__control {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    resize: none;
    color: #000 !important;
    font-size: 11pt;
  }
  .field__control:focus { box-shadow: none !important; }
}

/* ============== Шаг 4: Выделение дефектов ============== */
.step--wide .step__inner--wide { max-width: 1280px; }

/* Фото-полоса */
.photo-strip-wrap {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 14px 18px;
  margin-bottom: 16px;
}
.photo-strip-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-ink-soft);
}
.photo-strip-count { color: var(--c-muted); font-weight: 500; }
.photo-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.photo-strip__thumb {
  position: relative;
  flex: 0 0 auto;
  width: 120px;
  height: 84px;
  border-radius: 10px;
  border: 2px solid var(--c-line);
  background: #eef1f8;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.photo-strip__thumb:hover { border-color: #cfdaff; transform: translateY(-1px); }
.photo-strip__thumb.is-active { border-color: var(--c-brand); box-shadow: 0 0 0 2px rgba(29, 58, 138, 0.18); }
.photo-strip__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-strip__badge {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--c-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}
.photo-strip__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7));
  color: #fff;
  font-size: 10px;
  padding: 12px 6px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Рабочая область */
.workarea {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  margin-bottom: 16px;
}
.workarea__main {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.workarea__panel {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 18px;
  position: sticky;
  top: 100px;
  align-self: start;
  max-height: calc(100vh - 130px);
  overflow: auto;
}

/* Тулбар */
.tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px;
  background: #fafbff;
  border: 1px solid var(--c-line);
  border-radius: 12px;
}
.tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--c-ink-soft);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.tool:hover { background: #eef2fa; color: var(--c-brand-deep); }
.tool.is-active { background: var(--c-brand); color: #fff; }
.tool.is-active .tool__icon { color: #fff; }
.tool--danger { color: var(--c-accent); }
.tool--danger:hover { background: #fbe9e9; color: var(--c-accent); }
.tool--ai {
  background: linear-gradient(135deg, #1d3a8a 0%, #4f46e5 100%);
  color: #fff;
  border: 1px solid transparent;
}
.tool--ai:hover { background: linear-gradient(135deg, #1d3a8a 0%, #4338ca 100%); }
.tool--ai:disabled, .tool--ai.is-loading { opacity: 0.7; cursor: wait; }
.tool--ai .tool__icon { color: #fde68a; }
.tool__icon { display: inline-flex; color: var(--c-brand); }
.tool__icon svg { width: 16px; height: 16px; }
.tool.is-active .tool__icon { color: #fff; }
.tools__sep {
  width: 1px;
  height: 22px;
  background: var(--c-line);
  margin: 0 4px;
}

/* Канвас */
.canvas-stage {
  position: relative;
  background: #eef1f8;
  border-radius: 12px;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.canvas-stage[data-tool="rect"] { cursor: crosshair; }
.canvas-stage[data-tool="select"] { cursor: default; }
.canvas-image {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.canvas-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: inherit;
}

/* Панель свойств дефекта */
.panel { display: flex; flex-direction: column; gap: 14px; }
.panel--empty { text-align: center; padding: 16px 8px; }
.panel__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #eef2ff;
  color: var(--c-brand);
  margin: 4px auto 8px;
}
.panel__icon svg { width: 24px; height: 24px; }
.panel__title { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--c-ink); }
.panel__text { margin: 0; color: var(--c-muted); font-size: 13px; line-height: 1.5; }
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-line);
}
.panel__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 6px 12px;
  border-radius: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}
.panel__close {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 0;
  background: #f4f6fa;
  color: var(--c-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.panel__close:hover { background: #e9eef7; color: var(--c-ink); }
.panel__row { display: flex; flex-direction: column; gap: 6px; }
.panel__row .field__label { font-size: 12px; }
.panel__row--meta {
  flex-direction: row;
  justify-content: space-between;
  font-size: 11px;
  color: var(--c-muted);
  background: #fafbff;
  border: 1px dashed var(--c-line);
  padding: 6px 10px;
  border-radius: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.panel__actions { display: flex; gap: 8px; }

/* Выбор серьёзности */
.severity-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.severity-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--c-line);
  background: #fff;
  color: var(--c-ink-soft);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.severity-chip:hover { background: #fafbff; }
.severity-chip.is-active {
  border-color: var(--c, var(--c-brand));
  background: color-mix(in srgb, var(--c) 10%, #fff);
}
.severity-chip__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--c);
  flex-shrink: 0;
}

/* Список дефектов */
.defect-list {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.defect-list--empty { text-align: center; color: var(--c-muted); font-size: 14px; }
.defect-list__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.defect-list__title { margin: 0; font-size: 16px; font-weight: 600; color: var(--c-ink); }
.defect-list__count { color: var(--c-brand); font-weight: 600; }
.defect-list__scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.defect-card {
  flex: 0 0 240px;
  display: flex;
  gap: 10px;
  padding: 12px;
  background: #fafbff;
  border: 1.5px solid var(--c-line);
  border-radius: 10px;
  transition: border-color 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  position: relative;
}
.defect-card:hover { border-color: #cfdaff; transform: translateY(-1px); }
.defect-card.is-active { border-color: var(--c-brand); background: #f3f6ff; }
.defect-card__num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.defect-card__body { min-width: 0; flex: 1; }
.defect-card__type {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.defect-card__desc {
  font-size: 12px;
  color: var(--c-muted);
  margin: 2px 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}
.defect-card__meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--c-muted);
  flex-wrap: wrap;
}
.defect-card__photo {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 110px;
}
.defect-card__sev { color: var(--c-ink-soft); font-weight: 500; }
.defect-card__del {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--c-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.defect-card:hover .defect-card__del { opacity: 1; }
.defect-card__del:hover { background: var(--c-accent); color: #fff; }

@media (max-width: 980px) {
  .workarea { grid-template-columns: 1fr; }
  .workarea__panel { position: static; max-height: none; }
}
@media (max-width: 640px) {
  .photo-strip__thumb { width: 90px; height: 64px; }
  .defect-card { flex-basis: 200px; }
  .tool__label { display: none; }
  .tool { padding: 8px 10px; }
}

/* ============== Шаг 5: Дефектная ведомость ============== */
.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  margin-bottom: 14px;
  align-items: center;
}
.stats-bar__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #fafbff;
  border: 1px solid var(--c-line);
  min-width: 80px;
}
.stats-bar__item--total { background: linear-gradient(135deg, #eef2ff, #fafbff); border-color: #cfdaff; }
.stats-bar__num {
  font-size: 22px;
  font-weight: 700;
  color: var(--c-ink);
  line-height: 1;
}
.stats-bar__item--total .stats-bar__num { color: var(--c-brand); }
.stats-bar__item .stats-bar__num { color: var(--c, var(--c-brand)); }
.stats-bar__label {
  font-size: 11px;
  color: var(--c-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stats-bar__top {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--c-muted);
  margin-left: 8px;
}
.stats-bar__top-label { font-weight: 500; }
.stats-bar__chip {
  background: #fafbff;
  border: 1px solid var(--c-line);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--c-ink-soft);
}
.stats-bar__chip strong { color: var(--c-ink); margin-right: 2px; }

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  margin-bottom: 14px;
  align-items: center;
}
.filters-bar__group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filters-bar__group--search { flex: 1; min-width: 200px; }
.filters-bar__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.filters-bar__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filters-bar__select { min-width: 160px; }

.chip__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--c, var(--c-brand));
  margin-right: 6px;
}

.dtable-wrap {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  overflow: auto;
  margin-bottom: 16px;
  max-width: 100%;
}
.dtable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 980px; }
.dtable thead th {
  position: sticky;
  top: 0;
  background: #fafbff;
  text-align: left;
  font-weight: 600;
  color: var(--c-ink-soft);
  padding: 10px 12px;
  border-bottom: 1.5px solid var(--c-line);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dtable thead th:hover { background: #eef2fa; }
.dtable__th--num { width: 50px; text-align: center !important; }
.dtable__th--wide { min-width: 200px; }
.dtable__th--actions { width: 90px; cursor: default; }
.dtable__th--actions:hover { background: #fafbff; }
.dtable__th-hint {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 9px;
  background: #eef2ff;
  color: var(--c-brand);
  border-radius: 999px;
  text-transform: none;
  letter-spacing: 0;
}
.sort-icon { margin-left: 4px; color: var(--c-muted); font-size: 11px; }
.sort-icon--active { color: var(--c-brand); font-weight: 700; }
.sort-icon--idle { opacity: 0.5; }

.dtable__row:hover { background: #fafbff; }
.dtable__row td {
  padding: 12px;
  border-bottom: 1px solid var(--c-line);
  vertical-align: top;
  font-size: 13px;
  color: var(--c-ink);
}
.dtable__row:last-child td { border-bottom: 0; }
.dtable__td--num { text-align: center; width: 50px; }
.dtable__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.dtable__type { display: flex; flex-direction: column; gap: 4px; }
.dtable__type strong { font-size: 14px; color: var(--c-ink); font-weight: 600; }
.dtable__sev {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--c-ink-soft);
  font-weight: 500;
}
.dtable__sev-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c, var(--c-brand));
}
.dtable__room { font-size: 13px; color: var(--c-ink-soft); }
.dtable__text { font-size: 13px; line-height: 1.45; color: var(--c-ink); word-break: break-word; }
.dtable__muted { color: var(--c-muted); font-style: italic; font-size: 12px; }
.dtable__td--actions { width: 90px; }
.dtable__actions { display: flex; gap: 4px; }

.ecell {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  min-height: 28px;
}
.ecell__view {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--c-ink);
  word-break: break-word;
}
.ecell__placeholder { color: var(--c-muted); font-style: italic; font-size: 12px; }
.ecell__text { white-space: pre-wrap; }
.ecell__actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0.3;
  transition: opacity 0.15s ease;
}
.ecell:hover .ecell__actions,
.ecell:focus-within .ecell__actions { opacity: 1; }
.ecell__ta {
  width: 100%;
  border: 1.5px solid var(--c-brand);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  background: #fff;
  color: var(--c-ink);
  resize: vertical;
  min-height: 70px;
}
.ecell__ta:focus { outline: none; box-shadow: 0 0 0 3px rgba(29, 58, 138, 0.15); }

.iconbtn {
  width: 26px; height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 6px;
  color: var(--c-ink-soft);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.iconbtn:hover { background: #eef2fa; border-color: #cfdaff; color: var(--c-brand-deep); }
.iconbtn--danger:hover { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.iconbtn--ghost { background: transparent; border-color: transparent; }
.iconbtn--ghost:hover { background: #eef2fa; border-color: #d6def0; }
.iconbtn__icon { display: inline-flex; }
.iconbtn__icon svg { width: 14px; height: 14px; }
.iconbtn--ghost.iconbtn { padding: 4px 6px; width: auto; height: auto; font-size: 11px; }
.iconbtn__text { color: var(--c-ink-soft); font-weight: 500; }

.dtable-empty {
  background: #fff;
  border: 1px dashed var(--c-line);
  border-radius: var(--radius);
  padding: 40px 16px;
  text-align: center;
  color: var(--c-muted);
  margin-bottom: 16px;
}

@media (max-width: 980px) {
  .stats-bar { padding: 12px; }
  .stats-bar__item { min-width: 70px; padding: 6px 10px; }
  .stats-bar__top { margin-left: 0; flex-basis: 100%; }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .filters-bar__group--search { min-width: 0; }
}
@media (max-width: 640px) {
  .stats-bar__item { min-width: 60px; padding: 6px 8px; }
  .stats-bar__num { font-size: 18px; }
  .iconbtn--ghost.iconbtn .iconbtn__text { display: none; }
}

/* Печать для шага 5 */
@media print {
  body.is-printing .stats-bar,
  body.is-printing .filters-bar,
  body.is-printing .step__nav,
  body.is-printing .dtable__actions,
  body.is-printing .ecell__actions,
  body.is-printing .dtable__th--actions,
  body.is-printing .dtable__th-hint { display: none !important; }
  .dtable { min-width: 0; font-size: 10pt; }
  .dtable thead th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .dtable-wrap { box-shadow: none; border: none; overflow: visible; }
  .ecell__view { font-size: 10pt; }
  .ecell__placeholder { display: none; }
}

/* ============== Шаг 6: Расчёт восстановительной стоимости ============== */
.cost-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.cost-totals__card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}
.cost-totals__card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--c-brand);
}
.cost-totals__card--norm::before { background: #1d3a8a; }
.cost-totals__card--market::before { background: #b22020; }
.cost-totals__card--delta::before { background: #1f8a52; }
.cost-totals__card--labor::before { background: #b56b00; }
.cost-totals__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cost-totals__value {
  font-size: 24px;
  font-weight: 700;
  color: var(--c-ink);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.cost-totals__hint {
  font-size: 12px;
  color: var(--c-muted);
}

.library {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.library__head { margin-bottom: 12px; }
.library__title { margin: 0 0 4px; font-size: 16px; font-weight: 600; color: var(--c-ink); }
.library__hint { margin: 0; color: var(--c-muted); font-size: 13px; }
.library__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============== Источники цен (шаг 6) ============== */
.price-sources {
  margin-top: 24px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.price-sources__head { margin-bottom: 12px; }
.price-sources__title { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--c-ink); }
.price-sources__hint { margin: 0; font-size: 13px; color: var(--c-muted); line-height: 1.5; }
.price-sources__textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.55;
  color: var(--c-ink);
  resize: vertical;
  min-height: 110px;
  background: #fbfcfe;
  transition: border-color 0.15s, background 0.15s;
}
.price-sources__textarea:focus {
  outline: none;
  border-color: var(--c-primary, #1d3a8a);
  background: #fff;
}
.price-sources__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.price-sources__head-text { flex: 1 1 360px; min-width: 0; }
.price-sources__head-text .price-sources__title { margin-top: 0; }
.price-sources__head-text .price-sources__hint { margin-bottom: 0; }
.price-sources__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
  padding-top: 4px;
}
.libchip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--c-line);
  background: #fafbff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
  min-width: 180px;
}
.libchip:hover { border-color: var(--c-brand); background: #eef2ff; transform: translateY(-1px); }
.libchip__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-ink);
  line-height: 1.3;
}
.libchip__meta {
  font-size: 11px;
  color: var(--c-muted);
}

.ctable-wrap {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  overflow: auto;
  margin-bottom: 16px;
}
.ctable__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-line);
  background: #fafbff;
}
.ctable__count {
  font-size: 12px;
  color: var(--c-muted);
}
.ctable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 1100px; }
.ctable thead th {
  position: sticky;
  top: 0;
  background: #fafbff;
  text-align: left;
  font-weight: 600;
  color: var(--c-ink-soft);
  padding: 10px 8px;
  border-bottom: 1.5px solid var(--c-line);
  white-space: nowrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ctable__th-sub {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  font-weight: 400;
  color: var(--c-muted);
  text-transform: none;
  letter-spacing: 0;
}
.ctable__th--num { width: 40px; text-align: center; }
.ctable__th--wide { min-width: 200px; }
.ctable__th--unit { width: 60px; }
.ctable__th--qty { width: 80px; }
.ctable__th--norm { width: 180px; }
.ctable__th--norm-sum { width: 100px; }
.ctable__th--market { width: 100px; }
.ctable__th--market-sum { width: 110px; }
.ctable__th--labor { width: 70px; }
.ctable__th--actions { width: 50px; }

.ctable__row td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--c-line);
  vertical-align: middle;
}
.ctable__row:hover td { background: #fafbff; }
.ctable__row:last-child td { border-bottom: 0; }
.ctable__td--num { text-align: center; font-weight: 600; color: var(--c-ink-soft); }
.ctable__td--total { font-weight: 600; color: var(--c-ink); }
.ctable__td--actions { text-align: center; }
.ctable__input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
  background: transparent;
  color: var(--c-ink);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.ctable__input:hover { border-color: var(--c-line); }
.ctable__input:focus { outline: none; border-color: var(--c-brand); background: #fff; box-shadow: 0 0 0 2px rgba(29, 58, 138, 0.12); }
.ctable__input--desc { font-weight: 500; }
.ctable__input--num { text-align: right; }
.ctable__input--unit { text-align: center; }
.ctable__input--code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--c-ink-soft); }
.ctable__norm { display: flex; gap: 4px; align-items: center; }
.ctable__norm .ctable__input--code { flex: 1; min-width: 0; }
.ctable__norm .ctable__input--num { width: 75px; }
.ctable__actions { display: flex; gap: 4px; justify-content: center; }

.cost-empty {
  background: #fff;
  border: 1px dashed var(--c-line);
  border-radius: var(--radius);
  padding: 50px 20px;
  text-align: center;
  color: var(--c-muted);
  margin-bottom: 16px;
}
.cost-empty__icon {
  display: inline-flex;
  width: 56px; height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eef2ff;
  color: var(--c-brand);
  margin-bottom: 10px;
}
.cost-empty__icon svg { width: 28px; height: 28px; }
.cost-empty__text { margin: 0; font-size: 14px; }

@media (max-width: 980px) {
  .cost-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cost-totals { grid-template-columns: 1fr; }
  .cost-totals__value { font-size: 20px; }
  .libchip { min-width: 140px; }
}

@media print {
  body.is-printing .library,
  body.is-printing .ctable__toolbar,
  body.is-printing .step__nav,
  body.is-printing .ctable__actions,
  body.is-printing .ctable__input,
  body.is-printing .ctable__th--actions,
  body.is-printing .project-pill { display: none !important; }
  .cost-totals { display: none; }
  .ctable-wrap { box-shadow: none; border: none; overflow: visible; }
  .ctable { min-width: 0; font-size: 9pt; }
  .ctable thead th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ctable__td--total { background: #f8f8f8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4 landscape; }
}

/* Режим предпросмотра печати (для скриншотов и предпросмотра) */
body.is-printing .library,
body.is-printing .ctable__toolbar,
body.is-printing .step__nav,
body.is-printing .ctable__actions,
body.is-printing .ctable__th--actions,
body.is-printing .project-pill { display: none !important; }
body.is-printing .cost-totals { display: none; }
body.is-printing .ctable-wrap { box-shadow: none; border: none; overflow: visible; }
body.is-printing .ctable { min-width: 0; font-size: 9pt; }
body.is-printing .ctable thead th { background: #f0f0f0 !important; }
body.is-printing .ctable__td--total { background: #f8f8f8 !important; }
body.is-printing .ctable__input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: #000 !important;
  pointer-events: none;
}

/* ============== Шаг 7: Итоговый отчёт ============== */
.report-options {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 22px;
  margin-bottom: 16px;
}
.report-options__title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--c-ink);
}
.report-options__title + .report-options__title { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--c-line); }
.report-options__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 8px;
}
.report-options__toggles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.opt-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fafbff;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.opt-toggle:hover { border-color: #cfdaff; }
.opt-toggle.is-on { background: #f0f5ff; border-color: var(--c-brand); }
.opt-toggle input { display: none; }
.opt-toggle__switch {
  position: relative;
  width: 34px; height: 20px;
  background: #d6dbe5;
  border-radius: 999px;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}
.opt-toggle__dot {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.opt-toggle.is-on .opt-toggle__switch { background: var(--c-brand); }
.opt-toggle.is-on .opt-toggle__dot { transform: translateX(14px); }
.opt-toggle__label {
  font-size: 13px;
  color: var(--c-ink);
  font-weight: 500;
}

.report-outline {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow);
  padding: 22px;
  margin-bottom: 16px;
}
.report-outline__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--c-line);
}
.report-outline__title { margin: 0; font-size: 16px; font-weight: 600; color: var(--c-ink); }
.report-outline__stats { display: flex; gap: 6px; flex-wrap: wrap; }
.stat-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: #fafbff;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--c-ink-soft);
  font-weight: 500;
}
.stat-pill--accent { background: #f0f5ff; color: var(--c-brand); border-color: #cfdaff; font-weight: 600; }

.report-outline__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.outline-card {
  display: grid;
  grid-template-columns: 36px 40px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #fafbff;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.outline-card:hover { border-color: #cfdaff; }
.outline-card--fixed { background: linear-gradient(135deg, #f0f5ff, #fafbff); border-color: #cfdaff; }
.outline-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--c-brand);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}
.outline-card--fixed .outline-card__num { background: var(--c-accent); }
.outline-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: #eef2ff;
  color: var(--c-brand);
  border-radius: 10px;
}
.outline-card--fixed .outline-card__icon { background: #fbe9e9; color: var(--c-accent); }
.outline-card__icon svg { width: 22px; height: 22px; }
.outline-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-ink);
  margin-bottom: 2px;
}
.outline-card__desc {
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.4;
}

@media (max-width: 980px) {
  .report-options__grid { grid-template-columns: 1fr; }
  .report-options__toggles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .report-options__toggles { grid-template-columns: 1fr; }
  .report-outline__head { flex-direction: column; }
}

/* === Админ-панель === */
.page--admin .admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.admin-stat {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(20, 30, 60, .04);
}
.admin-stat--accent {
  background: linear-gradient(135deg, var(--c-brand) 0%, var(--c-brand-deep) 100%);
  color: #fff;
  border-color: var(--c-brand-deep);
}
.admin-stat__label { font-size: 12px; color: var(--c-ink-soft); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.admin-stat--accent .admin-stat__label { color: rgba(255, 255, 255, .8); }
.admin-stat__value { font-size: 24px; font-weight: 700; color: var(--c-ink); }
.admin-stat--accent .admin-stat__value { color: #fff; }
.admin-section { margin-bottom: 28px; }
.admin-section h3 { margin: 0 0 12px; font-size: 18px; font-weight: 600; }
.admin-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--c-line); border-radius: 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--c-line); white-space: nowrap; }
.admin-table th { background: #f7f9fc; font-weight: 600; color: var(--c-ink-soft); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.admin-table tr:hover td { background: #fafbfd; }
.admin-empty { text-align: center; padding: 24px; color: var(--c-ink-soft); }
.admin-role { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.admin-role--admin { background: #fef3c7; color: #92400e; }
.admin-role--user { background: #e0e7ff; color: #3730a3; }
.admin-status { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.admin-status--active, .admin-status--paid { background: #d1fae5; color: #065f46; }
.admin-status--banned { background: #fee2e2; color: #991b1b; }
.admin-actions { display: flex; gap: 4px; }
.btn-mini { padding: 4px 8px; font-size: 11px; border-radius: 6px; border: 1px solid var(--c-line); background: #fff; cursor: pointer; font-weight: 500; }
.btn-mini:hover:not(:disabled) { background: #eef2fa; border-color: var(--c-brand); color: var(--c-brand-deep); }
.btn-mini:disabled { opacity: .4; cursor: not-allowed; }
.btn-mini--warn { color: #92400e; border-color: #fde68a; }
.btn-mini--warn:hover:not(:disabled) { background: #fef3c7; }
.btn-mini--danger { color: #991b1b; border-color: #fecaca; }
.btn-mini--danger:hover:not(:disabled) { background: #fee2e2; }
.btn-mini--ok { color: #065f46; border-color: #a7f3d0; }
.btn-mini--ok:hover:not(:disabled) { background: #d1fae5; }

/* === Админ-панель: табы и графики === */
.admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--c-line);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.admin-tab {
  background: none;
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-ink-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.admin-tab:hover { color: var(--c-brand); }
.admin-tab.is-active {
  color: var(--c-brand-deep);
  border-bottom-color: var(--c-brand);
  font-weight: 600;
}
.admin-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.admin-input {
  padding: 8px 12px;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  width: 100%;
  max-width: 380px;
  outline: none;
}
.admin-input:focus { border-color: var(--c-brand); box-shadow: 0 0 0 3px rgba(29, 58, 138, .08); }
.admin-form { display: flex; flex-direction: column; gap: 6px; max-width: 480px; }
.admin-label { font-size: 12px; color: var(--c-ink-soft); font-weight: 500; margin-top: 6px; }
.admin-error { color: #b91c1c; font-size: 13px; margin-top: 4px; }
.admin-chart-wrap { background: #fff; border: 1px solid var(--c-line); border-radius: 12px; padding: 18px; }
.admin-chart-legend { display: flex; gap: 18px; margin-bottom: 12px; flex-wrap: wrap; font-size: 13px; color: var(--c-ink-soft); }
.admin-legend-item { display: flex; align-items: center; gap: 6px; }
.admin-legend-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.admin-chart-svg { width: 100%; height: auto; max-height: 240px; }
.admin-chart-table { margin-top: 16px; }
.modal { position: fixed; inset: 0; background: rgba(20, 30, 60, .5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal__card { background: #fff; border-radius: 14px; padding: 24px; max-width: 480px; width: 100%; box-shadow: 0 20px 60px rgba(20, 30, 60, .25); }
.modal__title { margin: 0 0 16px; font-size: 18px; font-weight: 600; }
