:root {
  --page: #f3f6fb;
  --panel: #ffffff;
  --panel-blue: #eaf2ff;
  --text: #0b1f33;
  --muted: #66727f;
  --line: #d9e1ec;
  --blue: #0d4cd3;
  --blue-dark: #073a9c;
  --accent: #ef3d5a;
  --green: #147a3f;
  --warning: #a15c00;
  --danger: #c62828;
  --shadow: 0 14px 36px rgba(11, 31, 51, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  max-width: 1180px;
  min-height: 64px;
  margin: 0 auto;
  padding: 8px 24px;
}

.icon-button {
  display: inline-grid;
  align-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.icon-button span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  color: var(--blue-dark);
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
}

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

.brand-text strong {
  overflow: hidden;
  color: var(--blue-dark);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-text span {
  color: var(--muted);
  font-size: 14px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-button {
  position: relative;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.search-button::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 9px;
  width: 13px;
  height: 13px;
  border: 2px solid var(--blue-dark);
  border-radius: 50%;
}

.search-button::after {
  content: "";
  position: absolute;
  top: 24px;
  left: 23px;
  width: 10px;
  height: 2px;
  background: var(--blue-dark);
  transform: rotate(45deg);
  transform-origin: left center;
}

.gosweb {
  color: var(--blue-dark);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #c7d8f5;
  border-radius: 6px;
  color: var(--blue-dark);
  font-weight: 800;
}

.admin-link.icon-only {
  width: 40px;
  height: 40px;
  padding: 0;
}

.admin-link:hover {
  border-color: var(--blue);
  background: #eef4ff;
}

.admin-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.hero {
  margin-top: 14px;
  background: var(--panel-blue);
  border-top: 1px solid #dce8fa;
  border-bottom: 1px solid #dce8fa;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 24px 34px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 14px;
  font-size: 34px;
  line-height: 1.18;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.25;
}

.hero-copy {
  max-width: 700px;
  margin-bottom: 0;
  color: #405267;
  font-size: 18px;
}

.hero-logo {
  width: 172px;
  height: 172px;
  justify-self: end;
  object-fit: contain;
}

.workspace,
.registry {
  max-width: 1180px;
  margin: 28px auto;
  padding: 0 24px;
}

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

.summary-panel,
.application-form,
.registry {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.summary-panel {
  position: sticky;
  top: 88px;
  padding: 22px;
}

.summary-topline {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.summary-panel h2 {
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}

.summary-panel dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

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

.summary-panel dd {
  margin: 4px 0 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.notice {
  margin-top: 22px;
  padding: 14px;
  background: #eef8f2;
  border-left: 4px solid var(--green);
  color: #1d5133;
  font-size: 14px;
}

.application-form {
  overflow: hidden;
}

.form-toolbar,
.registry-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.toolbar-actions,
.registry-heading {
  flex-wrap: wrap;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button.primary {
  background: var(--blue);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--blue-dark);
}

.button.secondary {
  background: #ffffff;
  border-color: #b7c4d8;
  color: var(--blue-dark);
}

.button.secondary:hover {
  border-color: var(--blue);
}

.button[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.form-message {
  margin: 18px 24px 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-weight: 700;
}

.form-message.success {
  background: #eef8f2;
  color: var(--green);
}

.form-message.error {
  background: #fff2f1;
  color: var(--danger);
}

.form-section {
  margin: 0;
  padding: 24px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.form-section:last-child {
  border-bottom: 0;
}

.form-section legend {
  float: left;
  width: 100%;
  margin-bottom: 16px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}

.field-grid {
  clear: both;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

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

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field span,
.check-row span {
  color: #35465a;
  font-weight: 700;
}

.field b {
  color: var(--danger);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #b8c5d6;
  border-radius: 6px;
  color: var(--text);
  outline: none;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(13, 76, 211, 0.16);
}

.field input.invalid,
.field select.invalid,
.field textarea.invalid,
.date-display.invalid {
  border-color: var(--danger);
}

.field input.locked {
  background: #eef2f7;
  color: var(--muted);
  cursor: not-allowed;
}

.date-control {
  position: relative;
}

.native-date-control input[type="date"] {
  padding-right: 12px;
  background: #ffffff;
  color: var(--text);
  color-scheme: light;
}

.native-date-control input[type="date"]::-webkit-inner-spin-button,
.native-date-control input[type="date"]::-webkit-clear-button {
  display: none;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 0;
}

.check-row.compact {
  margin-top: 12px;
  padding-bottom: 0;
}

.check-row input,
.status-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
  flex: 0 0 auto;
}

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

.status-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid #c6d2e2;
  border-radius: var(--radius);
  cursor: pointer;
}

.status-option:has(input:checked) {
  background: #eef4ff;
  border-color: var(--blue);
}

.status-label {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.status-code {
  min-width: 42px;
  padding: 4px 8px;
  background: #f8dce2;
  border-radius: 999px;
  color: #9e1731;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.registry {
  padding: 0;
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: #4c5f75;
  font-size: 14px;
}

td {
  color: #26384d;
}

tbody tr:last-child td {
  border-bottom: 0;
}

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

.status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  padding: 3px 8px;
  background: #edf4ff;
  border: 1px solid #c7d8f5;
  border-radius: 999px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 700;
}

.compact-hero .hero-content {
  padding-top: 34px;
  padding-bottom: 28px;
}

.admin-shell {
  max-width: 1180px;
  margin: 28px auto;
  padding: 0 24px;
}

.admin-login,
.admin-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.admin-login {
  display: grid;
  gap: 16px;
  max-width: 430px;
  margin: 0 auto;
  padding: 24px;
}

.admin-who {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-login .form-message {
  margin: 0;
}

.admin-panel {
  overflow: hidden;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.admin-stats div {
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e1e8f2;
  border-radius: var(--radius);
}

.admin-stats span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-stats strong {
  display: block;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
}

.admin-search {
  padding: 16px 24px 0;
}

.admin-search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #b8c5d6;
  border-radius: 6px;
  color: var(--text);
  outline: none;
}

.admin-search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(13, 76, 211, 0.16);
}

.col-actions {
  width: 1%;
  white-space: nowrap;
}

.row-actions {
  white-space: nowrap;
}

.link-button {
  padding: 4px 6px;
  background: transparent;
  border: 0;
  color: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

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

.link-button.danger {
  margin-left: 6px;
  color: var(--danger);
}

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

.button.danger:hover {
  background: #a31d1d;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  overflow-y: auto;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 51, 0.55);
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(11, 31, 51, 0.3);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  font-size: 20px;
  overflow-wrap: anywhere;
}

.modal-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 8px 24px 16px;
}

.detail-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.detail-section:last-child {
  border-bottom: 0;
}

.detail-section h3 {
  margin: 0 0 12px;
  color: var(--blue-dark);
  font-size: 16px;
  font-weight: 800;
}

.detail-section dl {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 8px 16px;
  margin: 0;
}

.detail-section dl > div {
  display: contents;
}

.detail-section dt {
  color: var(--muted);
  font-size: 14px;
}

.detail-section dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.detail-section dd.muted {
  color: var(--muted);
  font-weight: 400;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}

body.modal-open {
  overflow: hidden;
}

@media print {
  body * {
    visibility: hidden;
  }

  .modal,
  .modal * {
    visibility: visible;
  }

  .modal {
    position: absolute;
    inset: 0;
    padding: 0;
    overflow: visible;
  }

  .modal-backdrop,
  .modal-close,
  .modal-foot {
    display: none !important;
  }

  .modal-card {
    max-width: 100%;
    box-shadow: none;
  }
}

/* ═══════════════════════════════════════
   Nav drawer
═══════════════════════════════════════ */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.nav-drawer[aria-hidden="false"] {
  pointer-events: auto;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 51, 0.45);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.nav-drawer[aria-hidden="false"] .drawer-backdrop {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 288px;
  background: var(--panel);
  box-shadow: 4px 0 32px rgba(11, 31, 51, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  overflow-y: auto;
}

.nav-drawer[aria-hidden="false"] .drawer-panel {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.drawer-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.drawer-close {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}

.drawer-close:hover {
  background: #f0f4fa;
  color: var(--text);
}

.drawer-section-title {
  margin: 18px 20px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.drawer-nav {
  list-style: none;
  margin: 0;
  padding: 0 8px;
  flex: 1;
}

.drawer-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 6px;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  transition: background 0.12s;
}

.drawer-nav li a:hover {
  background: #eef4ff;
  color: var(--blue-dark);
}

.dnav-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  background: var(--panel-blue);
  border-radius: 5px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
}

.drawer-footer {
  flex: 0 0 auto;
  padding: 16px 16px 20px;
  border-top: 1px solid var(--line);
}

.drawer-admin-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f0f4fa;
  border: 1px solid #c7d8f5;
  border-radius: 8px;
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 14px;
  transition: background 0.12s;
}

.drawer-admin-link:hover {
  background: #deeaff;
}

.drawer-admin-link svg {
  width: 18px;
  height: 18px;
  fill: var(--blue);
  flex: 0 0 auto;
}

body.drawer-open {
  overflow: hidden;
}

/* ═══════════════════════════════════════
   Header search bar
═══════════════════════════════════════ */
.header-search-wrap {
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 10px 24px;
}

.header-search-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto;
}

.search-icon-inline {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.header-search-input {
  flex: 1;
  min-height: 40px;
  padding: 8px 14px;
  background: #ffffff;
  border: 1.5px solid var(--blue);
  border-radius: 6px;
  color: var(--text);
  outline: none;
  font: inherit;
  font-size: 15px;
  box-shadow: 0 0 0 3px rgba(13, 76, 211, 0.14);
}

.header-search-input::-webkit-search-cancel-button {
  display: none;
}

.search-close-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-close-btn:hover {
  background: #f0f4fa;
  color: var(--text);
}

.search-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1180px;
  margin: 10px auto 2px;
}

.search-hint-btn {
  padding: 6px 14px;
  background: var(--panel-blue);
  border: 1px solid #c7d8f5;
  border-radius: 999px;
  color: var(--blue-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s;
}

.search-hint-btn:hover {
  background: #d4e5ff;
}

/* section highlight from search */
.section-highlight {
  outline: 3px solid var(--blue);
  outline-offset: 6px;
  border-radius: 4px;
  animation: highlight-pulse 1.8s ease forwards;
}

@keyframes highlight-pulse {
  0%   { outline-color: var(--blue); }
  70%  { outline-color: var(--blue); }
  100% { outline-color: transparent; }
}

/* ═══════════════════════════════════════
   Section redesign (numbered heads + sub-sections)
═══════════════════════════════════════ */
.section-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 26px;
}

.section-num {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  border-radius: 10px;
  letter-spacing: .04em;
  margin-top: 2px;
}

.section-head-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.section-head-text legend {
  float: none;
  width: auto;
  margin-bottom: 0;
  padding: 0;
}

.section-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.sub-section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px dashed var(--line);
}

.sub-section:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.sub-label {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.sub-grid {
  margin-top: 16px;
}

.form-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.field.span-full {
  grid-column: 1 / -1;
}

/* summary nav links */
.summary-sections {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.summary-nav-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.summary-sections a {
  display: block;
  padding: 6px 10px;
  border-radius: 5px;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.1s;
}

.summary-sections a:hover {
  background: var(--panel-blue);
}

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

  .search-button {
    display: none;
  }

  .brand-text strong {
    white-space: normal;
  }

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

  .hero-logo {
    display: none;
  }

  .summary-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .hero-content,
  .workspace,
  .registry,
  .admin-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

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

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

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .workspace,
  .registry {
    margin-top: 18px;
    margin-bottom: 18px;
  }

  .form-toolbar,
  .registry-heading {
    align-items: stretch;
    padding: 18px;
  }

  .toolbar-actions,
  .toolbar-actions .button,
  .registry-heading .button {
    width: 100%;
  }

  .admin-stats {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .form-section {
    padding: 18px;
  }

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

  .status-option {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .status-code {
    grid-column: 2;
    justify-self: start;
  }

  .detail-section dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .detail-section dd {
    margin-bottom: 8px;
  }

  .modal {
    padding: 16px 8px;
  }

  .modal-foot {
    flex-direction: column;
  }

  .modal-foot .button {
    width: 100%;
  }
}

/* ── footer (как на офиц. сайте) ── */
.site-footer {
  background: var(--panel);
  color: var(--muted);
  margin-top: 56px;
  padding: 48px 0 40px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* footer top: menu + social */
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}

.footer-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 28px;
}

.footer-menu__item {
  margin: 0;
}

.footer-menu__link {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
  transition: color 0.15s;
}

.footer-menu__link:hover {
  color: var(--blue);
}

.footer-menu__item_active .footer-menu__link {
  color: var(--blue);
  font-weight: 600;
}

.footer-social-wrap {
  flex: 0 0 auto;
}

.social-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
}

.social-links__item {
  margin: 0;
}

.social-links__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #9aa6b4;
  color: #fff;
  transition: transform 0.15s, filter 0.15s;
}

.social-links__link:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.social-links__link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  stroke: none;
}

.social-links__link--vk { background: #0077ff; }
.social-links__link--ok { background: #ee8208; }
.social-links__link--rt { background: #14191f; }
.social-links__link--max {
  background: linear-gradient(135deg, #2787f5, #0a5fd6);
}

.footer-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 36px 0 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
}

.footer-bottom-privacy a {
  color: var(--muted);
  font-size: 14px;
}

.footer-bottom-privacy a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.footer-bottom-counter img {
  display: block;
}

@media (max-width: 700px) {
  .site-footer {
    padding: 32px 0 24px;
  }

  .footer-top {
    flex-direction: column;
    gap: 24px;
  }

  .footer-menu {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
