@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;800&display=swap");

:root {
  color-scheme: light;
  --bg: #f4f4f4;
  --panel: #ffffff;
  --panel-soft: #f8f8f8;
  --line: #d3daed;
  --field-line: #a8a7a5;
  --text: #161616;
  --muted: #5f6672;
  --blue: #105783;
  --blue-dark: #0b4568;
  --red: #ba1d1e;
  --red-dark: #951516;
  --warning: #ffedb1;
  --danger: #a71919;
  --shadow: 0 14px 34px rgba(16, 87, 131, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  border-top: 5px solid var(--red);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 24px rgba(16, 87, 131, 0.18);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.brand:hover .brand-text strong {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.brand img {
  width: 68px;
  height: auto;
  flex: 0 0 auto;
  background: #fff;
  padding: 7px;
}

.brand-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-text span {
  font-size: 13px;
  font-weight: 300;
  opacity: 0.86;
}

.brand-text strong {
  max-width: 640px;
  font-size: 16px;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-actions form {
  margin: 0;
}

.user-badge {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 14px;
}

.login-panel {
  max-width: 520px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px clamp(14px, 3vw, 36px) 56px;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 28px;
  align-items: end;
  padding: 28px 0 24px;
  border-bottom: 2px solid var(--line);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
}

.breadcrumbs span + span::before {
  content: "/";
  margin-right: 10px;
  color: var(--muted);
  font-weight: 400;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 840px;
  font-size: 34px;
  line-height: 1.12;
  font-weight: 300;
}

h2 {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 400;
}

h3 {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 400;
}

.muted {
  color: var(--muted);
}

.page-hero .muted {
  max-width: 760px;
  margin-top: 12px;
}

.hero-meta {
  padding: 18px;
  background: var(--panel-soft);
  border-left: 5px solid var(--red);
}

.link-label,
.section-nav-title,
.section-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.status {
  margin-top: 10px;
  font-size: 14px;
}

.status-error {
  color: var(--danger);
}

.error-summary {
  margin-top: 18px;
  border-bottom-color: var(--danger);
}

.error-summary h2 {
  color: var(--danger);
}

.error-summary ul {
  margin: 12px 0 0;
  padding-left: 22px;
}

.error-link {
  padding: 0;
  color: var(--danger);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.error-link:hover {
  text-decoration: underline;
}

.stepper-shell {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  background: var(--panel);
  border-bottom: 3px solid var(--line);
  box-shadow: var(--shadow);
}

.stepper-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.stage-progress-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  color: var(--muted);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.stage-progress-item b {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #fff;
  background: var(--muted);
  font-size: 12px;
}

.stage-progress-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-progress-item.is-current {
  color: var(--red);
  border-bottom-color: var(--red);
  background: #fff;
}

.stage-progress-item.is-current b {
  background: var(--red);
}

.stage-progress-item.is-done {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.stage-progress-item.is-done b {
  background: var(--blue);
}

.stepper-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.step-status {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.workspace.is-step-empty {
  display: none;
}

.section-nav {
  display: none;
  position: sticky;
  top: 112px;
  gap: 2px;
  padding: 18px;
  background: var(--panel);
  border-bottom: 3px solid var(--line);
  box-shadow: var(--shadow);
}

.section-link {
  position: relative;
  display: block;
  min-height: 42px;
  padding: 11px 12px 11px 18px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border-left: 4px solid transparent;
}

.section-link:hover,
.section-link.is-active {
  color: var(--red);
  background: #f4f4f4;
  border-left-color: var(--red);
}

.form-layout {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.form-section {
  padding: 24px;
  background: var(--panel);
  border-bottom: 3px solid var(--line);
  box-shadow: var(--shadow);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.summary-grid > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.summary-grid strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.summary-grid span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.stage-section {
  transition: border-color 0.18s ease, background 0.18s ease;
}

.stage-section > .section-heading {
  align-items: center;
  margin-bottom: 0;
  cursor: pointer;
}

.stage-section > .section-heading > div {
  min-width: 0;
}

.stage-section.is-stage-current > .section-heading {
  margin-bottom: 20px;
}

.stage-section.is-stage-current {
  border-bottom-color: var(--red);
}

.stage-section.is-stage-complete {
  border-bottom-color: var(--blue);
}

.stage-section.is-stage-collapsed > :not(.section-heading) {
  display: none !important;
}

.stage-badge {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.is-stage-current .stage-badge {
  background: var(--red);
}

.is-stage-complete .stage-badge {
  background: var(--blue);
}

.stage-status {
  display: inline-block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.is-stage-current .stage-status {
  color: var(--red);
}

.is-stage-complete .stage-status {
  color: var(--blue);
}

.review-section {
  margin-top: 26px;
}

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

.review-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  background: var(--panel-soft);
  border-left: 5px solid var(--blue);
}

.review-card h3 {
  font-weight: 700;
}

.review-card dl {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
  font-size: 14px;
}

.review-card dt {
  color: var(--muted);
  font-weight: 700;
}

.review-card dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.process-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  margin-top: 24px;
}

.process-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  align-self: start;
}

.process-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.process-title {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 4px;
}

.process-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
}

.process-side-card {
  min-height: 58px;
  padding: 14px 18px;
  color: var(--text);
  background: var(--panel);
  border: 0;
  border-bottom: 3px solid var(--line);
  box-shadow: var(--shadow);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.process-side-card:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

.process-topbar {
  position: sticky;
  top: 76px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(247, 247, 247, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.topbar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.selected-service-bar {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.selected-service-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.selected-service-bar strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-utility-section {
  padding: 18px 20px;
  background: #f8fbfd;
  border-bottom-color: #d9e8f3;
  box-shadow: none;
}

.process-sidebar .stepper-shell {
  margin-top: 0;
  padding: 18px;
}

.process-sidebar .stepper-progress {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.stage-progress-item {
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 52px;
  padding: 8px 10px;
  border-bottom-width: 0;
  border-left: 4px solid transparent;
}

.stage-progress-item b {
  width: 34px;
  height: 34px;
  background: #eaf7fd;
  color: var(--blue);
  font-size: 16px;
}

.stage-progress-item.is-current {
  border-left-color: var(--blue);
  border-bottom-color: transparent;
}

.stage-progress-item.is-current b {
  background: var(--blue);
}

.stage-progress-item.is-done {
  border-left-color: #65b9d7;
  border-bottom-color: transparent;
}

.stage-progress-item.is-done b {
  background: #eaf7fd;
  color: var(--blue);
}

.stage-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.service-card.is-locked {
  opacity: 0.78;
  cursor: default;
}

.service-card.is-locked .service-card-input {
  cursor: default;
}

.workspace {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
}

.workspace .form-layout {
  order: 1;
}

.workspace .section-nav {
  order: 2;
  display: grid;
  top: 150px;
}

.section-link span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.is-preview-only-block {
  display: none !important;
}

.review-summary {
  display: block;
}

.application-preview {
  max-width: 980px;
  margin: 0 auto;
  padding: 34px 40px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.preview-title {
  margin-bottom: 26px;
  text-align: center;
}

.preview-title h2 {
  font-weight: 800;
  letter-spacing: 0;
}

.preview-block {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.preview-block h3 {
  margin-bottom: 12px;
  font-weight: 700;
}

.preview-block dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.preview-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  gap: 12px;
  padding: 8px 10px;
  background: var(--panel-soft);
}

.preview-row dt {
  color: var(--muted);
  font-weight: 700;
}

.preview-row dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.preview-subblock {
  padding: 12px;
  background: var(--panel-soft);
}

.preview-subblock h4 {
  margin: 0 0 8px;
}

.preview-consents {
  display: grid;
  gap: 12px;
  max-width: 980px;
  margin: 18px auto 0;
}

.preview-consent-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 18px 58px 18px 18px;
  background: var(--panel);
  border-left: 5px solid var(--blue);
  box-shadow: var(--shadow);
}

.preview-consent-card input {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 22px;
  height: 22px;
}

.service-switcher-section {
  margin-top: 24px;
}

.utility-section {
  background: var(--warning);
  border-bottom-color: var(--red);
  box-shadow: none;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-note {
  margin: -8px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.service-search {
  margin-bottom: 18px;
}

.service-catalog {
  display: grid;
  gap: 18px;
}

.service-group {
  display: grid;
  gap: 10px;
}

.service-group-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.service-group-heading h3 {
  font-size: 17px;
  color: var(--blue);
}

.service-group-code,
.service-card-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 32px;
  padding: 0 8px;
  background: #e8f0f5;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.service-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.service-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 30px;
  gap: 12px;
  align-items: center;
  min-height: 86px;
  padding: 14px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-left: 5px solid var(--line);
  cursor: pointer;
}

.service-card:hover {
  border-color: var(--blue);
  border-left-color: var(--blue);
  background: #fff;
}

.service-card-input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  opacity: 0;
  pointer-events: none;
}

.service-card-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.service-card-body strong {
  font-size: 15px;
  line-height: 1.25;
}

.service-card-body small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.service-card-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  color: transparent;
  font-weight: 700;
}

.service-card:has(input:checked),
.service-card.is-selected {
  border-left-color: var(--red);
  background: #fff8d9;
}

.service-card:has(input:checked) .service-card-check,
.service-card.is-selected .service-card-check {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.service-description,
.placeholder-box {
  margin-top: 16px;
  padding: 18px;
  background: var(--panel-soft);
  border-left: 5px solid var(--blue);
}

.service-description span {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.service-description p,
.placeholder-box p {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
}

.placeholder-box h3 {
  margin: 0 0 8px;
  color: var(--blue);
}

.grid {
  display: grid;
  gap: 14px 16px;
}

.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.full-width {
  grid-column: 1 / -1;
}

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--field-line);
  border-radius: 0;
  padding: 12px 13px;
  color: var(--text);
  background: #fff;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid transparent;
  border-color: var(--red);
  box-shadow: inset 0 -2px 0 var(--red);
}

input[readonly] {
  background: var(--panel-soft);
}

textarea {
  min-height: 138px;
  resize: vertical;
}

textarea[data-autosize] {
  min-height: 50px;
  overflow-x: hidden;
  overflow-y: hidden;
  overflow-wrap: anywhere;
  resize: vertical;
  white-space: pre-wrap;
  word-break: break-word;
}

input[readonly],
textarea[readonly] {
  color: #4f5864;
  background: #eef1f6;
  cursor: default;
}

.requisites-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(140px, 0.75fr) minmax(170px, 0.9fr);
  gap: 14px 16px;
  align-items: start;
}

.executor-card.is-linked-party {
  border-left-color: var(--red);
  background: #fff8d9;
}

.form-section.is-linked-party {
  border-bottom-color: var(--red);
  background: #fff8d9;
}

.form-section.is-linked-party h2::after,
.executor-card.is-linked-party h3::after {
  content: "заявитель";
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 7px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  vertical-align: middle;
}

.checkbox {
  position: relative;
  flex-direction: row;
  align-items: center;
  min-height: 44px;
  padding-left: 34px;
  cursor: pointer;
}

.checkbox input {
  position: absolute;
  left: 0;
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  accent-color: var(--red);
}

.input-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  max-width: 520px;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.segmented-control button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.segmented-control button + button {
  border-left: 1px solid var(--line-strong);
}

.segmented-control button.is-selected {
  background: var(--blue);
  color: #fff;
}

.attachments-mode-control {
  margin-bottom: 16px;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

.attachments-panel {
  margin-top: 12px;
}

.attachments-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.attachments-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.attachments-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  background: #fff;
}

.attachments-table th,
.attachments-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.attachments-table th {
  background: #f4f7fa;
  color: var(--blue-dark);
  font-size: 12px;
  text-transform: uppercase;
}

.attachments-table input,
.attachments-table textarea {
  min-height: 38px;
  padding: 8px;
}

.attachment-order {
  width: 44px;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.secondary-action {
  white-space: nowrap;
}

.lookup-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  background: var(--line);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.lookup-badge[data-state="loading"] {
  background: var(--warning);
  color: #725100;
}

.lookup-badge[data-state="cache"],
.lookup-badge[data-state="remote"] {
  background: #e8f0f5;
  color: var(--blue);
}

.lookup-badge[data-state="cache_fallback"] {
  background: #fde8e8;
  color: var(--danger);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--blue);
  border-radius: 0;
  background: #fff;
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.button:hover {
  color: #fff;
  background: var(--blue);
}

.button.primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.button.primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}

.button.compact {
  min-height: 38px;
  padding: 0 12px;
  font-size: 14px;
}

.button.danger {
  border-color: var(--danger);
  color: var(--danger);
}

.button.danger:hover {
  background: var(--danger);
  color: #fff;
}

.button:disabled {
  opacity: 0.65;
  cursor: default;
}

.button:disabled:hover {
  background: #fff;
  color: var(--blue);
}

.button.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.executors-list {
  display: grid;
  gap: 16px;
}

.executor-card {
  padding: 18px;
  background: var(--panel-soft);
  border-left: 5px solid var(--blue);
}

.executor-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.executor-card:first-child {
  border-left-color: var(--red);
}

.is-hidden {
  display: none;
}

.is-step-hidden {
  display: none !important;
}

.field-error-highlight {
  outline: 3px solid rgba(191, 35, 42, 0.28);
  outline-offset: 4px;
}

@media (max-width: 1180px) {
  .process-layout {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
  }

  .process-title strong,
  .process-side-card {
    display: none;
  }

  .process-sidebar .stepper-shell {
    padding: 10px;
  }

  .stage-progress-item {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 8px;
  }

  .stage-progress-item span {
    display: none;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .section-nav {
    top: 96px;
    display: flex;
    overflow-x: auto;
    padding: 10px;
    gap: 6px;
  }

  .section-nav-title {
    display: none;
  }

  .section-link {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 9px 12px;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }

  .section-link:hover,
  .section-link.is-active {
    border-left-color: transparent;
    border-bottom-color: var(--red);
  }

  .workspace .section-nav {
    top: 134px;
    order: 0;
  }
}

@media (max-width: 900px) {
  .site-header,
  .page-hero,
  .section-heading,
  .link-row {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
  }

  .page-hero {
    align-items: start;
  }

  .two-columns,
  .three-columns {
    grid-template-columns: 1fr;
  }

  .input-with-action {
    grid-template-columns: 1fr;
  }

  .requisites-grid {
    grid-template-columns: 1fr;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .process-layout {
    grid-template-columns: 1fr;
  }

  .process-sidebar {
    position: static;
  }

  .process-sidebar .stepper-progress {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .process-title strong,
  .process-side-card,
  .stage-progress-item span {
    display: block;
  }

  .stage-progress-item {
    grid-template-columns: 34px minmax(0, 1fr);
    justify-items: stretch;
  }

  .process-topbar {
    position: static;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .topbar-actions .button {
    flex: 1 1 180px;
  }

  .stage-actions {
    flex-direction: column;
  }

  .preview-row {
    grid-template-columns: 1fr;
  }

  .stepper-actions,
  .review-summary {
    grid-template-columns: 1fr;
  }

  .stepper-actions {
    justify-content: stretch;
  }

  .stepper-actions .button {
    flex: 1 1 0;
  }

  .review-card dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 148px;
  }

  .site-header {
    gap: 14px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand img {
    width: 56px;
    padding: 6px;
  }

  .brand-text span {
    font-size: 12px;
  }

  .brand-text strong {
    font-size: 14px;
  }

  .page {
    padding-top: 18px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 21px;
  }

  .form-section {
    padding: 18px 14px;
  }

  .hero-meta {
    padding: 14px;
  }

  .executor-card {
    padding: 14px;
  }

  .executor-card-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
.section-footer-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 16px;
}

.registry-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(180px, auto));
  gap: 14px;
  align-items: end;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.registry-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.registry-table th,
.registry-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.registry-table th {
  color: var(--blue);
  background: var(--panel-soft);
  font-weight: 700;
}

.registry-table form {
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--blue);
  font-weight: 700;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 500;
}

.form-grid textarea {
  resize: vertical;
}

.form-grid .checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  color: var(--text);
  font-weight: 600;
}

.form-grid .checkbox-row input {
  width: auto;
}

.impersonation-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-left: 4px solid var(--warning, #b7791f);
}

.impersonation-banner form {
  margin: 0;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.inline-form input {
  min-width: 160px;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

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

.details-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--panel-soft);
  border-left: 4px solid var(--line);
}

.details-grid strong {
  color: var(--blue);
  font-size: 13px;
}

.event-list {
  display: grid;
  gap: 10px;
}

.event-list div {
  padding: 10px 12px;
  background: var(--panel-soft);
  border-left: 4px solid var(--line);
}

.area-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
}

.area-panel {
  align-content: start;
}

.area-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

@media (max-width: 900px) {
  .registry-filters,
  .form-grid,
  .details-grid,
  .area-grid {
    grid-template-columns: 1fr;
  }
}

/* Reference application form design */
:root {
  --page-bg: #f4f7f9;
  --card-bg: #ffffff;
  --primary: #0f5b8d;
  --primary-dark: #0b4268;
  --primary-soft: #eaf3fa;
  --text-main: #1f2a44;
  --text-muted: #6d778b;
  --border: #d9e0e8;
  --border-soft: #e9eef3;
  --success: #4fa36b;
  --warning: #d7a928;
  --danger: #c94b4b;
  --shadow-card: 0 18px 45px rgba(31, 42, 68, 0.08);
  --shadow-soft: 0 8px 24px rgba(31, 42, 68, 0.06);
  --radius-page: 28px;
  --radius-card: 20px;
  --radius-block: 16px;
  --radius-field: 12px;
  --container-width: 1280px;
  --bg: var(--page-bg);
  --panel: var(--card-bg);
  --panel-soft: #f8fafc;
  --line: var(--border);
  --field-line: var(--border);
  --text: var(--text-main);
  --muted: var(--text-muted);
  --blue: var(--primary);
  --blue-dark: var(--primary-dark);
  --red: var(--danger);
  --red-dark: #9f3030;
  --shadow: var(--shadow-soft);
}

body {
  color: var(--text-main);
  background: var(--page-bg);
}

.application-page {
  width: 100%;
  padding: 32px;
}

.application-card {
  width: min(100%, var(--container-width));
  margin: 0 auto;
  padding: 28px;
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-page);
  box-shadow: var(--shadow-card);
}

.application-card .site-header {
  position: static;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: start;
  gap: 18px 28px;
  padding: 0 0 22px;
  color: var(--text-main);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.application-card .header-brand {
  justify-content: flex-start;
}

.application-card .brand {
  gap: 14px;
  color: var(--text-main);
}

.application-card .brand img {
  width: 64px;
  padding: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  background: #fff;
}

.application-card .brand-text strong {
  max-width: 520px;
  color: var(--text-main);
  font-size: 16px;
  line-height: 1.3;
}

.application-card .brand-text span {
  color: var(--text-muted);
  font-size: 13px;
  opacity: 1;
}

.header-contacts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
}

.header-contact-item {
  white-space: nowrap;
}

.header-help-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.header-help-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.application-card .header-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.application-card .page {
  max-width: none;
  padding: 0;
}

.application-card .page-hero {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: stretch;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 0;
}

.application-card .breadcrumbs {
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 13px;
}

.application-card h1 {
  color: var(--text-main);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0;
}

.application-card h2 {
  color: var(--text-main);
  font-size: 22px;
  font-weight: 700;
}

.application-card h3 {
  color: var(--text-main);
  font-size: 17px;
  font-weight: 700;
}

.application-card .muted,
.application-card .section-note {
  color: var(--text-muted);
}

.application-card .hero-meta {
  display: grid;
  gap: 8px;
  padding: 18px;
  background: #fbfdff;
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-block);
  box-shadow: none;
}

.application-card .link-label,
.application-card .section-nav-title,
.application-card .section-kicker {
  color: var(--primary);
  font-size: 12px;
  letter-spacing: 0;
}

.form-info-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px 16px;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid #cfe3f1;
  border-radius: var(--radius-field);
}

.form-info-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-weight: 800;
}

.application-card .process-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 0;
}

.application-card .process-sidebar {
  position: static;
  display: block;
}

.application-card .process-side-card {
  display: none;
}

.application-card .stepper-shell {
  margin: 0;
  padding: 0 0 18px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.application-card .process-title {
  display: none;
}

.application-card .stepper-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

.application-card .stage-progress-item {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.application-card .stage-progress-item::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  height: 1px;
  background: var(--border);
  z-index: 0;
}

.application-card .stage-progress-item:first-child::before {
  left: 24px;
}

.application-card .stage-progress-item:last-child::before {
  right: 50%;
}

.application-card .stage-progress-item b {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--text-muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
}

.application-card .stage-progress-item.is-current {
  color: var(--primary);
  background: transparent;
  border: 0;
}

.application-card .stage-progress-item.is-current b {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(15, 91, 141, 0.18);
}

.application-card .stage-progress-item.is-done {
  color: var(--text-main);
  background: transparent;
  border: 0;
}

.application-card .stage-progress-item.is-done b {
  color: #fff;
  background: var(--success);
  border-color: var(--success);
}

.application-card .process-main {
  gap: 16px;
}

.application-card .process-topbar {
  position: static;
  padding: 14px 16px;
  background: #fbfdff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-field);
  backdrop-filter: none;
}

.application-card .form-section {
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.application-card .service-switcher-section {
  margin-top: 0;
}

.application-card .section-heading {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.application-card .section-note {
  margin: 8px 0 0;
  font-size: 14px;
}

.application-card .service-options {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.application-card .service-card {
  min-height: 104px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-block);
  box-shadow: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.application-card .service-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.application-card .service-card:has(input:checked),
.application-card .service-card.is-selected {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 10px 28px rgba(15, 91, 141, 0.12);
}

.application-card .service-card-code,
.application-card .service-group-code {
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
}

.application-card .service-card-check {
  border-radius: 50%;
}

.application-card .service-card:has(input:checked) .service-card-check,
.application-card .service-card.is-selected .service-card-check {
  background: var(--success);
  border-color: var(--success);
}

.application-card .service-description,
.application-card .placeholder-box {
  background: #fbfdff;
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-block);
}

.application-card .workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  margin-top: 0;
}

.application-card .form-support-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.application-card .support-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-block);
  box-shadow: none;
}

.application-card .support-card p {
  color: var(--text-muted);
  font-size: 14px;
}

.application-card .support-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 50%;
  font-weight: 800;
}

.application-card .support-icon-success {
  color: var(--success);
  background: rgba(79, 163, 107, 0.12);
}

.application-card .form-layout {
  order: 2;
  gap: 16px;
}

.application-card .form-support-panel {
  order: 1;
}

.application-card .workspace .section-nav {
  display: none;
}

.application-card .party-grid,
.application-card .executor-card .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.application-card .field-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 -2px;
  padding: 14px 16px;
  color: var(--primary-dark);
  background: linear-gradient(90deg, var(--primary-soft), rgba(234, 243, 250, 0.25));
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-field);
  font-size: 13px;
  font-weight: 800;
}

.application-card label {
  gap: 7px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
}

.application-card label > span {
  line-height: 1.25;
}

.application-card input:not([type="checkbox"]):not([type="radio"]),
.application-card select,
.application-card textarea {
  min-height: 56px;
  padding: 0 14px;
  color: var(--text-main);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-field);
  box-shadow: none;
  font-size: 14px;
}

.application-card textarea {
  min-height: 112px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.application-card textarea[data-autosize] {
  min-height: 56px;
}

.application-card input:focus,
.application-card select:focus,
.application-card textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 91, 141, 0.12);
}

.application-card input[readonly],
.application-card textarea[readonly],
.application-card .is-readonly {
  color: #536173;
  background: var(--page-bg);
}

.application-card .input-with-action {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.application-card .checkbox {
  min-height: 44px;
  padding: 12px 12px 12px 42px;
  background: #fbfdff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-field);
}

.application-card .checkbox input {
  left: 14px;
  accent-color: var(--primary);
}

.application-card .segmented-control {
  width: 100%;
  max-width: none;
  gap: 4px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-field);
}

.application-card .enum-segmented-control {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.application-card .segmented-control button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--text-main);
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  white-space: normal;
}

.application-card .segmented-control button + button {
  border-left: 0;
}

.application-card .segmented-control button:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.application-card .segmented-control button.is-selected {
  color: #fff;
  background: var(--primary);
}

.application-card .is-enhanced-select {
  display: none;
}

.application-card .button {
  min-height: 52px;
  padding: 0 18px;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--primary);
  border-radius: 10px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.application-card .button:hover {
  color: #fff;
  background: var(--primary);
}

.application-card .button.primary {
  min-width: 160px;
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(15, 91, 141, 0.18);
}

.application-card .button.primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.application-card .button.compact,
.application-card .secondary-action {
  min-height: 38px;
  padding: 0 14px;
}

.application-card .button.danger {
  color: var(--danger);
  border-color: var(--danger);
}

.application-card .button.danger:hover {
  color: #fff;
  background: var(--danger);
}

.application-card .stage-actions {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.application-card .stage-actions .button.primary {
  margin-left: auto;
}

.application-card .executor-card,
.application-card .preview-consent-card {
  background: #fbfdff;
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-block);
  box-shadow: none;
}

.application-card .attachments-table-wrap {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-block);
}

.application-card .attachments-table {
  border-collapse: separate;
  border-spacing: 0;
}

.application-card .error-summary,
.application-card .has-error {
  background: #fff7f7;
  border-color: rgba(201, 75, 75, 0.25);
}

.application-card .error-summary h2,
.application-card .error-link,
.form-error {
  color: #9f3030;
}

.form-error {
  margin-top: 6px;
  font-size: 12px;
}

.has-error input,
.has-error select,
.has-error textarea {
  border-color: var(--danger);
  background: #fff7f7;
}

.is-hidden {
  display: none !important;
}

.is-disabled {
  opacity: 0.65;
  pointer-events: none;
}

.form-step {
  animation: stepFadeIn 260ms ease-out;
}

@keyframes stepFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .application-page {
    padding: 24px;
  }

  .application-card .site-header,
  .application-card .page-hero {
    grid-template-columns: 1fr;
  }

  .header-contacts {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .application-card .workspace {
    grid-template-columns: 1fr;
  }

  .application-card .form-support-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .application-page {
    padding: 14px;
  }

  .application-card {
    padding: 16px;
    border-radius: 20px;
  }

  .application-card .header-actions,
  .application-card .topbar-actions,
  .application-card .stage-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .application-card .header-actions .button,
  .application-card .topbar-actions .button,
  .application-card .stage-actions .button {
    width: 100%;
  }

  .application-card h1 {
    font-size: 25px;
  }

  .application-card .stepper-progress {
    grid-template-columns: repeat(5, minmax(38px, 1fr));
  }

  .application-card .stage-progress-item {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 58px;
    padding: 0 4px;
  }

  .application-card .stage-progress-item span {
    display: none;
  }

  .application-card .stage-progress-item.is-current span {
    display: block;
    position: absolute;
    top: 42px;
    left: 0;
    right: 0;
    color: var(--primary);
    font-size: 11px;
    text-align: center;
    white-space: normal;
  }

  .application-card .form-support-panel,
  .application-card .party-grid,
  .application-card .executor-card .grid,
  .application-card .enum-segmented-control,
  .application-card .two-columns,
  .application-card .three-columns {
    grid-template-columns: 1fr;
  }

  .application-card .input-with-action {
    grid-template-columns: 1fr;
  }

  .application-card .form-section,
  .application-card .support-card {
    padding: 18px 14px;
    border-radius: var(--radius-block);
  }
}
