/* ===== СПАРТА — светлый корпоративный стиль ===== */
:root {
  --primary: #1f5ecc;
  --primary-dark: #1246a0;
  --primary-soft: #e8f0fd;
  --accent: #f5a623;
  --bg: #ffffff;
  --bg-alt: #f4f7fc;
  --text: #20242b;
  --text-soft: #5a6474;
  --line: #e3e9f2;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(31, 94, 204, .10);
  --font: 'Manrope', 'Segoe UI', Arial, sans-serif;
  scroll-behavior: smooth;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.container--narrow { max-width: 760px; }
.container--wide { max-width: 1360px; }

/* ===== Кнопки ===== */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  border: 2px solid transparent;
  cursor: pointer;
  transition: .2s;
  text-decoration: none;
  font-family: inherit;
}
.btn--primary { background: var(--primary); color: #fff !important; }
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--ghost { background: #fff; border-color: var(--primary); color: var(--primary) !important; }
.btn--ghost:hover { background: var(--primary-soft); }
.btn--ghost-dark { background: #fff; border: 1px solid var(--line); color: var(--text) !important; }
.btn--ghost-dark:hover { border-color: var(--primary); color: var(--primary) !important; }
.btn--danger { background: #dc3545; color: #fff !important; }
.btn--danger:hover { background: #b92c3b; }
.btn--block { width: 100%; text-align: center; }
.btn--small { padding: 9px 18px; font-size: 14px; border-radius: 8px; }
.btn--tiny { padding: 5px 10px; font-size: 12px; border-radius: 6px; }

/* ===== Шапка ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 74px;
}
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo__img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.logo__img--small { width: 40px; height: 40px; }
.logo__text {
  font-weight: 400;
  font-size: 17px;
  letter-spacing: .08em;
  color: var(--text);
  text-transform: uppercase;
}
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav__link { color: var(--text-soft); font-weight: 600; font-size: 15px; }
.nav__link:hover { color: var(--primary); }
.header__side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.header__phone { font-weight: 800; color: var(--text); white-space: nowrap; }
.header__phone:hover { color: var(--primary); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Флеш-сообщения ===== */
.flash-wrap { margin-top: 20px; }
.flash { padding: 14px 18px; border-radius: 10px; margin-bottom: 10px; font-weight: 600; }
.flash--ok { background: #e6f6ec; color: #1d7a3f; border: 1px solid #bfe8cf; }
.flash--error { background: #fdecee; color: #b02a37; border: 1px solid #f5c6cb; }

/* ===== Герой ===== */
.hero {
  background:
    radial-gradient(1000px 500px at 85% 0%, rgba(31, 94, 204, .18), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(245, 166, 35, .12), transparent 55%),
    linear-gradient(180deg, #f2f6fd 0%, #ffffff 100%);
  padding: 70px 0 0;
}
.hero__inner { text-align: center; }
.hero__badge {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 100px;
  margin-bottom: 22px;
}
.hero__title {
  font-size: clamp(30px, 4.5vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  max-width: 900px;
  margin: 0 auto 18px;
  letter-spacing: -.01em;
}
.hero__subtitle {
  font-size: 18px;
  color: var(--text-soft);
  max-width: 760px;
  margin: 0 auto 30px;
}
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 55px;
}
.hero__stats li {
  background: #fff;
  padding: 24px;
  text-align: center;
}
.hero__stats strong { display: block; font-size: 26px; font-weight: 800; color: var(--primary); }
.hero__stats span { font-size: 14px; color: var(--text-soft); }

/* ===== Секции ===== */
.section { padding: 70px 0; }
.section--alt { background: var(--bg-alt); }
.section__title {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 800;
  text-align: center;
  letter-spacing: -.01em;
}
.section__lead {
  text-align: center;
  color: var(--text-soft);
  font-size: 17px;
  max-width: 720px;
  margin: 12px auto 44px;
}

/* ===== О компании ===== */
.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.about__text p { margin-bottom: 16px; font-size: 16px; color: #333c48; }
.about__list { list-style: none; margin-top: 18px; }
.about__list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-size: 15px;
}
.about__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 50%;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about__card {
  background: linear-gradient(150deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}
.about__card-number { font-size: 52px; font-weight: 800; line-height: 1; }
.about__card-label { font-size: 18px; font-weight: 700; margin: 10px 0 20px; }
.about__card-footer { font-size: 14px; opacity: .9; }

/* ===== Услуги ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card__icon { font-size: 34px; }
.card__title { font-size: 19px; font-weight: 800; margin: 14px 0 8px; }
.card__text { color: var(--text-soft); font-size: 15px; }

/* ===== Дела ===== */
.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.case {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
}
.case__amount { font-size: 28px; font-weight: 800; color: var(--primary); }
.case__tag {
  position: absolute;
  top: 22px;
  right: 22px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 100px;
  letter-spacing: .04em;
}
.case__title { font-size: 17px; font-weight: 700; margin: 10px 0 8px; }
.case__text { font-size: 14px; color: var(--text-soft); }

/* ===== Отзывы ===== */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.review {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 26px;
}
.review__text { font-size: 15px; color: #333c48; }
.review__author {
  margin-top: 16px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-soft);
}

/* ===== Форма ===== */
.form { display: block; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form__field { margin-bottom: 18px; }
.form__field label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 7px;
}
.form__field input,
.form__field textarea,
.form__field select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: .2s;
}
.form__field input:focus,
.form__field textarea:focus,
.form__field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.file-drop {
  display: block;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: .2s;
  background: var(--bg-alt);
}
.file-drop:hover { border-color: var(--primary); background: var(--primary-soft); }
.file-drop input { display: none; }
.file-drop__icon { font-size: 30px; display: block; }
.file-drop__text { display: block; font-weight: 700; margin-top: 8px; }
.file-drop__hint { display: block; font-size: 13px; color: var(--text-soft); margin-top: 4px; }
.file-list { list-style: none; margin-top: 10px; }
.file-list li {
  font-size: 13px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 8px;
  padding: 6px 12px;
  margin-bottom: 6px;
  word-break: break-all;
}
.form__consent { font-size: 13px; color: var(--text-soft); margin-bottom: 16px; }

/* ===== Контакты ===== */
.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-bottom: 34px; }
.contact {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}
.contact__icon { font-size: 34px; }
.contact__title { font-size: 18px; font-weight: 800; margin: 12px 0 6px; }
.contact__text { color: var(--text-soft); font-size: 15px; }
.contact__link { font-weight: 700; }
.contacts__note { text-align: center; color: var(--text-soft); }

/* ===== Футер ===== */
.footer { background: #10131a; color: #c4cad6; margin-top: 40px; }
.footer__grad {
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
}
.footer__inner { padding: 48px 20px 24px; }
.footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer__desc { font-size: 14px; margin-top: 14px; color: #8d95a3; }
.footer__col .logo__text { color: #fff; }
.footer__h { color: #fff; font-size: 15px; margin-bottom: 14px; font-weight: 800; }
.footer__link, .footer__line { display: block; font-size: 14px; color: #c4cad6; margin-bottom: 8px; }
.footer__link:hover, .footer__line a:hover { color: #fff; }
.footer__copy {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid #262b36;
  font-size: 13px;
  color: #6b7280;
}

/* ===== Авторизация ===== */
.auth {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 16px;
  background: radial-gradient(700px 400px at 50% 0%, rgba(31, 94, 204, .10), transparent 60%);
}
.auth__card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 40px;
  width: 100%;
  max-width: 460px;
}
.auth__title { font-size: 26px; font-weight: 800; }
.auth__subtitle { color: var(--text-soft); font-size: 15px; margin: 6px 0 24px; }
.auth__link { margin-top: 18px; text-align: center; font-size: 14px; color: var(--text-soft); }

/* ===== ЛК / админка ===== */
.cabinet { min-height: 70vh; padding: 46px 0 60px; background: var(--bg-alt); }
.cabinet__head { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.cabinet__head--between { justify-content: space-between; align-items: center; }
.cabinet__title { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
.cabinet__subtitle { color: var(--text-soft); font-size: 15px; margin-top: 6px; }
.cabinet__actions { display: flex; gap: 10px; }
.cabinet__h { font-size: 20px; font-weight: 800; margin: 34px 0 14px; }
.cabinet__cases { display: flex; flex-direction: column; gap: 22px; }

.case-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 4px 14px rgba(20, 40, 80, .05);
}
.case-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.case-card__title { font-size: 21px; font-weight: 800; }
.case-card__num { font-size: 13px; color: var(--text-soft); }
.case-card__meta { display: flex; gap: 18px; margin: 12px 0 6px; flex-wrap: wrap; font-size: 14px; color: var(--text-soft); }
.case-card__amount { font-weight: 800; color: var(--primary); }
.case-card__desc { font-size: 15px; color: #333c48; margin: 10px 0 18px; }

.status {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 100px;
  white-space: nowrap;
}
.status--min { font-size: 12px; padding: 4px 10px; }
.cabinet__empty {
  text-align: center;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 60px 30px;
}
.cabinet__empty-icon { font-size: 44px; }
.cabinet__empty-title { font-size: 20px; font-weight: 800; margin-top: 12px; }
.cabinet__empty-text { color: var(--text-soft); margin-top: 6px; }

/* ===== Тайминг ===== */
.timeline__h { font-size: 16px; font-weight: 800; margin: 20px 0 12px; }
.timeline { list-style: none; margin-top: 8px; }
.timeline__item { position: relative; padding: 0 0 20px 30px; }
.timeline__item::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 16px;
  bottom: -2px;
  width: 2px;
  background: var(--line);
}
.timeline__item:last-child::before { display: none; }
.timeline__dot {
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-soft);
  border: 3px solid var(--primary);
}
.timeline__head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.timeline__date { font-size: 13px; font-weight: 700; color: var(--text-soft); }
.timeline__stage {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
}
.timeline__text { font-size: 15px; margin-top: 4px; }
.timeline__author { font-size: 13px; color: var(--text-soft); margin-top: 4px; }
.timeline__empty { color: var(--text-soft); }

/* ===== Таблицы admin ===== */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th, .table td { text-align: left; padding: 13px 16px; font-size: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: var(--bg-alt); color: var(--text-soft); font-weight: 800; font-size: 13px; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fafcff; }
.td-nowrap { white-space: nowrap; }
.td-mut { color: var(--text-soft); font-size: 13px; }
.td-link { font-weight: 700; }
.inline-form { display: inline-block; margin-right: 6px; }

.back-link { display: inline-block; margin-bottom: 18px; font-weight: 700; font-size: 14px; }
.badge {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 100px;
}
.badge--admin { background: var(--accent); color: #7a4d00; }

.admin-grid { display: grid; grid-template-columns: 400px 1fr; gap: 24px; align-items: start; }
.admin-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.admin-panel__h { font-size: 17px; font-weight: 800; margin: 26px 0 14px; }
.admin-panel__h:first-child { margin-top: 0; }

/* ===== Адаптивность ===== */
@media (max-width: 1024px) {
  .admin-grid { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav {
    position: fixed;
    top: 74px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 20px;
    gap: 16px;
    display: none;
    margin-left: 0;
    z-index: 99;
  }
  .nav.open { display: flex; }
  .burger { display: flex; }
  .header__phone { display: none; }
  .about { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .form__row { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .hero { padding-top: 44px; }
  .hero__stats { grid-template-columns: 1fr 1fr; }
  .footer__cols { grid-template-columns: 1fr; }
}