:root {
  --ink: #142033;
  --ink-strong: #0b1424;
  --muted: #667085;
  --line: #ded4c2;
  --line-soft: #ece3d4;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --page-bg: #f3eadb;
  --header-bg: #fff4df;
  --soft: #f8f2e8;
  --soft-blue: #eef5ff;
  --navy: #12233b;
  --navy-2: #0b1829;
  --amber: #f4b000;
  --amber-dark: #c88900;
  --blue: #1f5eff;
  --green: #138a57;
  --red: #b42318;
  --radius: 8px;
  --content: 1380px;
  --shadow: 0 18px 46px rgba(17, 31, 52, .10);
  --shadow-soft: 0 10px 28px rgba(17, 31, 52, .07);
}
html { scroll-behavior: smooth; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f8f0e4 0, var(--page-bg) 360px, #efe3d1 100%);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 18px; color: var(--ink-strong); font-size: 54px; line-height: 1.08; letter-spacing: 0; }
h2 { margin-bottom: 14px; color: var(--ink-strong); font-size: 34px; line-height: 1.18; letter-spacing: 0; }
h3 { margin-bottom: 10px; color: var(--ink-strong); font-size: 23px; line-height: 1.25; letter-spacing: 0; }
p { color: #3d4a5f; }

.site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 26px;
  min-height: 78px;
  padding: 0 7vw;
  background: rgba(255, 244, 223, .96);
  border-bottom: 1px solid #eadbc2;
  box-shadow: 0 8px 24px rgba(62, 46, 24, .05);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 25px;
  font-weight: 900;
  color: var(--ink-strong);
}

.brand strong { color: var(--amber-dark); }

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  color: var(--navy);
  background: var(--amber);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 900;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.10);
}

.brand-mark:after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 16px;
  height: 16px;
  border-right: 3px solid var(--navy);
  border-bottom: 3px solid var(--navy);
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 34px;
  font-size: 17px;
  font-weight: 800;
}

.main-nav a {
  position: relative;
  padding: 28px 0 24px;
  color: #2f3d52;
}

.main-nav a:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  height: 3px;
  background: transparent;
  border-radius: 999px;
}

.main-nav a.active,
.main-nav a:hover { color: var(--ink-strong); }

.main-nav a.active:after,
.main-nav a:hover:after { background: var(--amber); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  font-size: 21px;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary, .btn.primary {
  color: #172033;
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 12px 26px rgba(244, 176, 0, .22);
}
.btn-primary:hover, .btn.primary:hover { background: #ffc033; border-color: #ffc033; }
.btn-outline, .btn.ghost {
  color: var(--navy);
  background: var(--surface);
  border-color: #c7d1df;
}
.btn-outline:hover, .btn.ghost:hover { border-color: var(--amber); background: #fff8e7; }
.btn-soft {
  color: var(--navy);
  background: #f8ecd7;
  border-color: #ead8ba;
}
.btn-light, .btn.white {
  color: var(--ink-strong);
  background: #fff;
  border-color: #fff;
}
.btn-ghost-light {
  color: #fff;
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.38);
}
.btn-small, .btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-wide, .btn.wide { width: 100%; }

.messages {
  width: min(1180px, calc(100% - 40px));
  margin: 18px auto 0;
}

.message {
  padding: 14px 18px;
  border: 1px solid #c7e3d5;
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  color: #134e34;
  background: #f0fbf5;
}

.message.error {
  color: var(--red);
  background: #fff4f2;
  border-color: #ffd1cc;
}

.hero-photo {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 42px;
  align-items: end;
  min-height: 610px;
  padding: 86px 7vw 68px;
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(8, 15, 28, .86) 0%, rgba(8, 15, 28, .68) 48%, rgba(8, 15, 28, .32) 100%),
    var(--hero-image) center / cover no-repeat;
}

.hero-photo:after {
  content: "";
  position: absolute;
  left: 7vw;
  bottom: 0;
  width: 170px;
  height: 5px;
  background: var(--amber);
}

.hero-copy { position: relative; z-index: 1; max-width: 780px; }
.hero-photo h1 { max-width: 760px; color: #fff; }
.hero-photo p { max-width: 680px; color: rgba(255,255,255,.88); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius);
  color: #fff;
  background: rgba(14, 24, 40, .72);
  backdrop-filter: blur(10px);
}

.hero-panel b { font-size: 18px; }
.hero-panel span {
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
}

.section,
.catalog-grid,
.detail-page,
.request-layout,
.contacts-layout,
.question-form,
.cabinet {
  width: min(var(--content), calc(100% - 56px));
  margin: 0 auto;
  padding: 42px 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 11px;
  border: 1px solid #f0cd7c;
  border-radius: 999px;
  color: var(--amber-dark);
  background: #fff5dc;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) .9fr;
  gap: 36px;
  align-items: center;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.metric-grid article,
.feature-row article,
.step-row article,
.info-card,
.support-card,
.applications-panel,
.profile-panel,
.table-card,
.contact-card,
.map-panel,
.question-form,
.card-form,
.product-card,
.service-card,
.detail-card,
.request-card,
.note-panel,
.cta-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.metric-grid article { padding: 22px; }
.metric-grid strong {
  display: block;
  color: var(--navy);
  font-size: 34px;
  line-height: 1;
}
.metric-grid span { color: var(--muted); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.service-card {
  overflow: hidden;
}

.service-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  background: var(--soft);
}

.service-card > div { padding: 24px; }

.icon-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 30px;
  margin-bottom: 16px;
  padding: 0 10px;
  color: var(--navy);
  background: #fff5d6;
  border: 1px solid #f5d37b;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.band {
  max-width: none;
  width: 100%;
  padding: 56px 7vw;
  background: linear-gradient(180deg, #efe4d2, #f8f0e4);
}

.band .section-head,
.band .feature-row,
.band .step-row {
  width: min(var(--content), 100%);
  margin-left: auto;
  margin-right: auto;
}

.step-row,
.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-row { grid-template-columns: repeat(4, 1fr); }

.step-row article,
.feature-row article {
  padding: 24px;
}

.step-row span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  color: var(--navy);
  background: var(--amber);
  border-radius: var(--radius);
  font-weight: 900;
}

.work-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 32px;
  align-items: center;
}

.work-copy { max-width: 520px; }

.work-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.work-gallery img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.work-gallery img:first-child { margin-top: 34px; }

.cta-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 42px;
  padding: 30px;
  background:
    linear-gradient(135deg, rgba(18,35,59,.96), rgba(22,45,78,.92)),
    repeating-linear-gradient(45deg, transparent 0 24px, rgba(244,176,0,.12) 25px 26px);
}

.cta-panel h2,
.cta-panel p { color: #fff; }

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  width: min(var(--content), calc(100% - 56px));
  margin: 0 auto;
  padding: 54px 0 34px;
}

.page-hero p { max-width: 760px; font-size: 19px; }
.page-hero .back-link { margin-top: 10px; }
.page-hero img {
  width: 360px;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.filters a {
  min-height: 40px;
  padding: 9px 16px;
  color: var(--navy);
  background: var(--surface);
  border: 1px solid #d8c8ac;
  border-radius: var(--radius);
  font-weight: 900;
}

.filters a.active,
.filters a:hover {
  color: #171c25;
  background: var(--amber);
  border-color: var(--amber);
}

.service-detail {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  width: min(1320px, calc(100% - 56px));
  margin: 20px auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.service-detail.reverse { grid-template-columns: minmax(0, 1fr) 330px auto; }
.service-detail img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
}
.service-detail ul { margin-bottom: 0; padding-left: 20px; color: #3d4a5f; }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;
}

.product-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
}

.product-gallery {
  position: relative;
  overflow: hidden;
  background: var(--surface-strong);
}

.product-gallery-link {
  position: relative;
  display: block;
  width: 100%;
  height: 230px;
  background: #fff;
}

.product-gallery-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
  opacity: 0;
  transition: opacity .18s ease;
}

.product-gallery-image.active {
  opacity: 1;
}

.product-gallery-dots {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.product-gallery-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(20, 32, 51, .26);
  cursor: pointer;
  pointer-events: auto;
}

.product-gallery-dot.active {
  width: 18px;
  background: var(--amber);
}

.product-info {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  padding: 22px;
}

.category-label {
  display: block;
  margin-bottom: 8px;
  color: var(--amber-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.product-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 18px;
}

.product-bottom b,
.price-box b {
  color: var(--ink-strong);
  font-size: 24px;
  white-space: nowrap;
}

.note-panel {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 22px;
  background: #fffaf0;
  border-color: #f4d27c;
}

.note-panel p { margin-bottom: 0; }

.detail-card {
  display: grid;
  grid-template-columns: 450px minmax(0, 1fr);
  gap: 34px;
  padding: 28px;
}

.product-detail img {
  border-radius: 0;
}

.product-detail-gallery {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.product-detail-gallery .product-gallery-link {
  height: 430px;
}

.product-detail-gallery .product-gallery-image {
  padding: 26px;
}

.product-detail-section {
  margin: 22px 0;
}

.product-detail-section h2 {
  margin-bottom: 10px;
  font-size: 24px;
}

.check-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: #3d4a5f;
}

.spec-card {
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.spec-grid div {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #fffaf0;
}

.spec-grid dt {
  color: var(--muted);
  font-size: 13px;
}

.spec-grid dd {
  margin: 4px 0 0;
  color: var(--ink-strong);
  font-weight: 900;
}

.price-box {
  display: inline-grid;
  gap: 4px;
  margin: 10px 0 22px;
  padding: 14px 18px;
  border: 1px solid #f1d38a;
  border-radius: var(--radius);
  background: #fff8e7;
}

.price-box span { color: var(--muted); font-size: 14px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--amber-dark);
  font-weight: 900;
}

.request-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  align-items: start;
}

.card-form,
.info-card,
.support-card,
.table-card,
.contact-card,
.map-panel { padding: 24px; }

.form-section-title { margin-bottom: 20px; }
.form-section-title h2 { margin-bottom: 8px; }
.form-section-title p { color: var(--muted); }

.form-grid-compact,
.two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-field { margin-bottom: 16px; }
.form-field.full { margin-top: 16px; }

label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-strong);
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface-strong);
  font: inherit;
}

textarea { resize: vertical; }
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(244,176,0,.20);
  border-color: var(--amber-dark);
}

.upload-zone {
  display: block;
  margin: 18px 0;
  padding: 20px;
  border: 2px dashed #d0a746;
  border-radius: var(--radius);
  color: var(--ink);
  background: #fffaf0;
}

.upload-zone input { margin-top: 12px; background: #fff; }
.upload-zone span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 400;
}

.consent-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 20px;
}

.consent-line input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin-top: 4px;
}

.consent-line label { margin: 0; }
.side-info { display: grid; gap: 18px; }
.info-card.accent,
.support-card.latest { background: #fff8e7; border-color: #f1d38a; }
.info-card ol,
.support-card ol { margin: 0; padding-left: 20px; }
.info-card li,
.support-card li { margin-bottom: 14px; }
.info-card li span,
.support-card li span { display: block; color: var(--muted); }

.auth-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(380px, 480px);
  justify-content: center;
  align-items: center;
  width: 100%;
  flex: 1;
  min-height: clamp(560px, calc(100vh - 300px), 680px);
  margin: 0;
  padding: 42px 28px;
  overflow: hidden;
}

.auth-page:before,
.auth-page:after {
  content: "";
  position: absolute;
  top: 50%;
  height: min(420px, calc(100% - 84px));
  transform: translateY(-50%);
  z-index: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  pointer-events: none;
}

.auth-page:before {
  left: max(28px, 7vw);
  right: calc(50% + 330px);
  background:
    linear-gradient(135deg, rgba(13, 28, 50, .18), rgba(18, 42, 72, .08)),
    url("../assets/images/ui/auth-left-bg.jpg") center center / cover no-repeat;
}

.auth-page:after {
  left: calc(50% + 330px);
  right: max(28px, 7vw);
  background:
    linear-gradient(135deg, rgba(13, 28, 50, .16), rgba(18, 42, 72, .08)),
    url("../assets/images/ui/auth-right-bg.jpg") center center / cover no-repeat;
}

.auth-card {
  position: relative;
  z-index: 1;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 22px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f4ead9;
}

.auth-tab {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.auth-tab.active {
  color: var(--ink-strong);
  background: var(--surface);
  box-shadow: 0 6px 14px rgba(17,31,52,.08);
}

.auth-panel { display: none; }
.auth-panel.active { display: block; }
.auth-note,
.auth-hint { color: var(--muted); }
.helptext {
  display: block;
  margin-top: 6px;
  color: #8a95a6;
  font-size: 14px;
}
.helptext ul { margin: 6px 0 0; padding-left: 18px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 100px; }
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #d0d8e4;
  border-radius: 6px;
  color: var(--navy);
  background: #fbf3e5;
  font-weight: 900;
  cursor: pointer;
}
.has-error input,
.has-error textarea,
.has-error select { border-color: var(--red); }
.field-error,
.form-errors,
.errorlist { color: var(--red); font-size: 14px; }
.form-errors {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #ffd1cc;
  border-radius: var(--radius);
  background: #fff4f2;
}

.dashboard-page { padding-top: 34px; padding-bottom: 54px; }
.dashboard-hero,
.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: stretch;
}

.dashboard-hero { margin-bottom: 20px; }
.dashboard-hero-copy {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, #fff, #f6f8fb),
    repeating-linear-gradient(90deg, transparent 0 32px, rgba(244,176,0,.08) 33px 34px);
  box-shadow: var(--shadow-soft);
}
.dashboard-hero h1 { max-width: 700px; font-size: 40px; }
.dashboard-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.profile-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 26px;
}
.profile-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  color: var(--navy);
  background: var(--amber);
  border-radius: var(--radius);
  font-size: 32px;
  font-weight: 900;
}
.dashboard-summary {
  background: linear-gradient(135deg, #fffaf0, #fff);
}
.summary-main {
  padding: 16px;
  border: 1px solid #f1d38a;
  border-radius: var(--radius);
  background: #fff8e7;
}
.summary-main strong {
  display: block;
  color: var(--navy);
  font-size: 42px;
  line-height: 1;
}
.summary-main span,
.summary-grid span {
  color: var(--muted);
  font-size: 14px;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.summary-grid div {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #f8fafc;
}
.summary-grid b {
  display: block;
  color: var(--ink);
  font-size: 24px;
}
.dashboard-summary p { margin: 0; color: var(--muted); }

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.stat-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  color: var(--navy);
  background: #fff4d1;
  font-weight: 900;
}
.stat-icon.active { color: #0f766e; background: #e9fbf7; }
.stat-icon.warn { color: #9a6700; background: #fff7e8; }
.stat-icon.done { color: #15803d; background: #ecfdf3; }
.stat-card strong { display: block; font-size: 28px; line-height: 1; }
.stat-card span:last-child { color: var(--muted); font-size: 14px; }

.applications-panel { padding: 24px; }
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
.panel-title h2 { margin-bottom: 0; }
.application-list { display: grid; gap: 14px; }
.application-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  background: #fff;
}
.application-card:hover { border-color: #f1d38a; box-shadow: var(--shadow-soft); }
.application-main {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
}
.application-number span {
  display: inline-flex;
  width: max-content;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--navy);
  background: #fff4d1;
  font-weight: 900;
}
.application-number small,
.application-meta { color: var(--muted); font-size: 13px; }
.application-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.application-meta span {
  padding: 5px 9px;
  border: 1px solid #e5eaf1;
  border-radius: 999px;
  background: #f8fafc;
}
.application-side {
  display: grid;
  justify-items: end;
  gap: 12px;
}
.dashboard-aside { display: grid; gap: 16px; align-content: start; }
.support-card.accent-dark {
  color: #fff;
  border-color: var(--navy);
  background: linear-gradient(135deg, var(--navy), #213d63);
}
.support-card.accent-dark h2,
.support-card.accent-dark p { color: #fff; }

.status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  white-space: normal;
}
.status-big { font-size: 17px; padding: 9px 14px; }
.status-new { color: #164e99; background: #eaf2ff; }
.status-processing { color: #6d28d9; background: #f1ecff; }
.status-need_info { color: #9a6700; background: #fff4d1; }
.status-consulted { color: #0f766e; background: #e9fbf7; }
.status-done { color: #15803d; background: #ecfdf3; }
.status-rejected { color: #b42318; background: #fff1f0; }

.request-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
  padding: 24px;
}
.request-card h1 { font-size: 38px; }
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
  gap: 22px;
  margin-bottom: 22px;
}
.data-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 22px;
}
.data-list div {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #f8fafc;
}
.data-list dt { color: var(--muted); font-size: 13px; }
.data-list dd { margin: 4px 0 0; font-weight: 900; }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.photo-grid img,
.staff-material-preview img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.staff-material-card {
  display: grid;
  gap: 8px;
}
.staff-material-preview {
  display: block;
  color: inherit;
  text-decoration: none;
}
.staff-material-preview img {
  display: block;
  transition: border-color .18s ease, filter .18s ease;
}
.staff-material-preview:hover img {
  border-color: var(--amber);
  filter: brightness(.96);
}
.staff-material-actions,
.attachment-actions,
.media-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.material-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
.material-action:hover {
  border-color: var(--amber);
  background: #fff8e7;
}
.materials-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin-top: 22px;
}
.material-summary h3 {
  margin-bottom: 8px;
  font-size: 20px;
}
.compact-materials {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #f8fafc;
  color: var(--muted);
  font-size: 15px;
  overflow-x: auto;
}
.compact-materials img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.compact-file {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  font-size: 14px;
}
.compact-file:hover { border-color: var(--amber); background: #fff8e7; }
.material-open { white-space: nowrap; }
.attachment-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.attachment-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #f8fafc;
  color: var(--ink);
  text-decoration: none;
}
.attachment-item:hover { border-color: var(--amber); background: #fff8e7; }
.attachment-item img,
.attachment-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 8px;
}
.attachment-item img {
  object-fit: cover;
  border: 1px solid var(--line);
}
.attachment-thumb {
  display: block;
  flex: 0 0 44px;
  color: inherit;
  text-decoration: none;
}
.attachment-icon {
  display: grid;
  place-items: center;
  color: #7c4a00;
  background: #ffe7a3;
  font-size: 12px;
  font-weight: 900;
}
.attachment-item b,
.attachment-item small { display: block; }
.attachment-item small {
  margin-top: 2px;
  color: var(--muted);
}
.attachment-actions {
  margin-left: auto;
  justify-content: flex-end;
}
.upload-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.upload-form label {
  font-weight: 800;
  color: var(--ink);
}
.upload-form input[type="file"] {
  padding: 14px;
  border: 1px dashed #c3cedb;
  border-radius: var(--radius);
  background: #f8fafc;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(8, 20, 35, 0.46);
}
.modal-backdrop:target { display: grid; }
.modal-card {
  width: min(560px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.modal-head h2 { margin: 0; }
.modal-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  font-size: 26px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.modal-upload-form {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.media-modal-card {
  width: min(980px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
}
.media-modal-card img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}
.media-modal-actions {
  justify-content: flex-end;
  margin-top: 14px;
}
.consultation-card { background: #fffaf0; border-color: #f1d38a; }
.ai-helper-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #f1d38a;
}
.ai-helper-form label {
  font-weight: 800;
  color: var(--ink);
}
.ai-helper-note {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.ai-chat-form {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.ai-chat-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
  color: var(--ink);
}
.chat-sections {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
  gap: 22px;
  align-items: start;
}
.consultant-form {
  margin-top: 14px;
}
.comments { display: grid; gap: 12px; margin-bottom: 18px; }
.comment {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.comment.staff {
  background: #f3f7ff;
  border-color: #c8daf8;
}
.comment span {
  display: block;
  margin: 2px 0 8px;
  color: var(--muted);
  font-size: 13px;
}
.comment p {
  margin-bottom: 0;
  white-space: normal;
}
.empty-state,
.empty-inline {
  padding: 26px;
  border: 1px dashed #c3cedb;
  border-radius: var(--radius);
  color: var(--muted);
  background: #f8fafc;
}
.empty-state { text-align: center; }

.staff-page { padding-top: 34px; }
.staff-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  margin-bottom: 20px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff, #f6f8fb);
  box-shadow: var(--shadow-soft);
}
.staff-hero h1 { margin-bottom: 8px; }
.filters.compact { margin-bottom: 18px; }
.staff-toolbar {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.staff-toolbar label { margin-bottom: 0; }
.staff-form select,
.staff-form textarea { background: #fbfdff; }

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}
.table-card { overflow-x: auto; }

.contacts-layout {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}
.contact-card div {
  position: relative;
  padding: 15px 15px 15px 58px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: #f8fafc;
}
.contact-card i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--navy);
  background: #fff4d1;
  border-radius: var(--radius);
  font-style: normal;
  font-weight: 900;
}
.contact-card span { display: block; color: var(--muted); }
.map-placeholder {
  min-height: 290px;
  display: grid;
  place-items: center;
  border: 1px solid #dfe6ef;
  border-radius: var(--radius);
  background:
    linear-gradient(30deg, transparent 48%, rgba(244,176,0,.15) 49%, rgba(244,176,0,.15) 51%, transparent 52%),
    linear-gradient(120deg, transparent 47%, rgba(18,35,59,.10) 48%, rgba(18,35,59,.10) 50%, transparent 51%),
    #f6f8fb;
}
.map-pin {
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.map-pin span { display: block; color: var(--muted); }
.mini-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.mini-steps span {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #fff;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 180px;
  gap: 14px;
  align-items: end;
}
.form-grid p { margin: 0; }

.question-form {
  padding: 30px;
}

.question-form .section-head {
  margin-bottom: 22px;
}

.contact-question-form {
  display: grid;
  gap: 20px;
}

.contact-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.contact-fields .form-field {
  margin-bottom: 0;
}

.contact-message {
  grid-column: 1 / -1;
}

.contact-message textarea {
  min-height: 118px;
}

.contact-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.contact-form-footer p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  display: grid;
  grid-template-columns: 1.2fr .7fr 1fr;
  gap: 42px;
  padding: 38px 7vw;
  color: #d8e1ec;
  background:
    linear-gradient(135deg, rgba(244,176,0,.10), transparent 36%),
    var(--navy-2);
}
.site-footer p,
.site-footer small,
.site-footer a,
.footer-contacts span { color: #d8e1ec; }
.footer-brand { color: #fff; font-size: 24px; }
.footer-nav,
.footer-contacts {
  display: grid;
  gap: 9px;
  align-content: start;
}

@media (max-width: 1100px) {
  .site-header { grid-template-columns: 1fr auto; padding: 14px 20px; }
  .main-nav,
  .header-actions { display: none; }
  .main-nav.open {
    display: grid;
    grid-column: 1 / -1;
    justify-content: stretch;
    gap: 0;
    padding-top: 10px;
  }
  .main-nav.open a { padding: 12px 0; }
  .header-actions.open {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .header-actions.open .btn { width: 100%; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .hero-photo,
  .intro-grid,
  .work-grid,
  .page-hero,
  .service-detail,
  .service-detail.reverse,
  .detail-card,
  .request-layout,
  .dashboard-hero,
  .dashboard-layout,
  .detail-grid,
  .contacts-layout,
  .site-footer {
    grid-template-columns: 1fr;
  }
  .hero-photo { min-height: auto; padding: 62px 20px 46px; }
  .hero-photo:after { left: 20px; }
  .page-hero img { width: 100%; }
  .service-grid,
  .catalog-grid,
  .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
  .feature-row { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-page {
    grid-template-columns: minmax(380px, 480px);
  }
  .auth-page:before,
  .auth-page:after {
    opacity: .26;
  }
  .auth-page:before {
    left: 20px;
    right: calc(50% + 280px);
  }
  .auth-page:after {
    left: calc(50% + 280px);
    right: 20px;
  }
}

@media (max-width: 700px) {
  .chat-sections {
    grid-template-columns: 1fr;
  }
  h1 { font-size: 34px; }
  h2 { font-size: 26px; }
  .brand { font-size: 20px; }
  .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
  .hero-actions,
  .cta-panel,
  .request-card,
  .staff-hero,
  .panel-title,
  .product-bottom {
    align-items: stretch;
    flex-direction: column;
  }
  .hero-actions .btn,
  .cta-panel .btn,
  .request-card .btn,
  .staff-hero .btn,
  .panel-title .btn,
  .product-bottom .btn { width: 100%; }
  .section,
  .catalog-grid,
  .detail-page,
  .request-layout,
  .contacts-layout,
  .question-form,
  .cabinet,
  .page-hero {
    width: min(100% - 28px, 1220px);
  }
  .service-grid,
  .catalog-grid,
  .step-row,
  .feature-row,
  .metric-grid,
  .work-gallery,
  .form-grid-compact,
  .two-cols,
  .dashboard-stats,
  .application-card,
  .application-main,
  .data-list,
  .photo-grid,
  .materials-row,
  .mini-steps,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .material-open { width: 100%; }
  .staff-material-actions .material-action,
  .attachment-actions .material-action {
    flex: 1 1 110px;
  }
  .attachment-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .attachment-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
  .media-modal-actions .btn {
    width: 100%;
  }
  .contact-fields {
    grid-template-columns: 1fr;
  }
  .contact-form-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .contact-form-footer .btn {
    width: 100%;
  }
  .staff-toolbar { grid-template-columns: 1fr; }
  .work-gallery img,
  .work-gallery img:first-child { height: 240px; margin-top: 0; }
  .product-detail-gallery .product-gallery-link { height: 290px; }
  .spec-grid { grid-template-columns: 1fr; }
  .auth-card,
  .dashboard-hero-copy,
  .card-form,
  .table-card,
  .contact-card,
  .map-panel,
  .info-card,
  .support-card { padding: 20px; }
  .application-side { justify-items: start; }
  .status { width: fit-content; }
  .auth-page {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    padding: 34px 14px 54px;
  }
  .auth-page:before,
  .auth-page:after {
    display: none;
  }
  .auth-card {
    width: 100%;
  }
}

@media (min-width: 701px) {
  .detail-page .chat-sections {
    display: grid !important;
    grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr) !important;
    align-items: start;
  }
}

@media (max-width: 700px) {
  .detail-page .chat-sections {
    grid-template-columns: 1fr !important;
  }
}
