
:root {
  --primary: #0b5ca8;
  --primary-dark: #07457f;
  --text: #172331;
  --muted: #687684;
  --border: #d8e0e7;
  --bg: #f3f6f9;
  --surface: #ffffff;
  --danger: #b42318;
  --success: #157347;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page {
  width: min(960px, calc(100% - 28px));
  margin: 28px auto 60px;
}

.header {
  display: grid;
  grid-template-columns: 155px 1fr;
  align-items: center;
  gap: 24px;
  padding: 26px 30px 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 18px 18px 0 0;
  position: relative;
  overflow: hidden;
}

.header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: linear-gradient(90deg,#f3d319 0 33.33%,#43a95c 33.33% 66.66%,#ef3c3c 66.66% 100%);
}

.header::after { display: none; }

.logo-box {
  min-height: 94px;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-box img {
  display: block;
  max-width: 100%;
  max-height: 76px;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.header h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.1;
}

.header p {
  margin: 0;
  opacity: .94;
  line-height: 1.5;
}

.card {
  background: var(--surface);
  padding: 28px 32px 34px;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 16px 45px rgba(34, 57, 79, .12);
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 14px;
}

.progress {
  height: 8px;
  background: #e8edf1;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 30px;
}

.progress > div {
  height: 100%;
  width: 20%;
  background: var(--primary);
  transition: width .2s ease;
}

.section-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.step-number {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: bold;
}

.section-title h2 {
  margin: 0 0 3px;
  font-size: 22px;
}

.section-title p {
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: 24px;
  column-gap: 22px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 600;
  margin-bottom: 18px;
}

.grid > label { margin-bottom: 0; }

input, select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

textarea { resize: vertical; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(39, 121, 184, .12);
}

fieldset {
  border: 0;
  margin: 22px 0 24px;
  padding: 0;
}

legend {
  font-weight: 700;
  margin-bottom: 12px;
}

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.options.grid-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.option {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fafcfd;
  font-weight: 500;
}

.option input,
.authorization input {
  width: auto;
  accent-color: var(--primary);
}

.file-box {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfcfd;
}

.file-box small {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: normal;
}

.conditional {
  border-left: 3px solid var(--primary);
  padding-left: 16px;
  margin: 14px 0 20px;
}

.authorization {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  line-height: 1.45;
  margin-top: 18px;
}

.authorization input { margin-top: 4px; }

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--border);
}

.spacer { flex: 1; }

button {
  border: 0;
  border-radius: 9px;
  padding: 11px 19px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

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

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

.secondary {
  background: #e9eef2;
  color: var(--text);
}

button:disabled {
  opacity: .6;
  cursor: wait;
}

.error {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 9px;
  border: 1px solid #f5b9b3;
  background: #fff1f0;
  color: var(--danger);
}

.success {
  background: var(--surface);
  padding: 44px 28px;
  text-align: center;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 16px 45px rgba(34, 57, 79, .12);
}

.success-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 15px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8f6ef;
  color: var(--success);
  font-size: 30px;
  font-weight: bold;
}

.request-number {
  display: inline-block;
  background: #eff3f6;
  border-radius: 9px;
  padding: 9px 13px;
}

[hidden] { display: none !important; }

@media (max-width: 720px) {
  .page {
    width: min(100% - 18px, 960px);
    margin-top: 10px;
  }

  .header {
    grid-template-columns: 1fr;
    padding: 20px 18px 26px;
  }

  .logo-box { width: 145px; min-height: 72px; }

  .card { padding: 22px 17px 26px; }

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

  .progress-head { flex-direction: column; gap: 3px; }

  .actions { flex-wrap: wrap; }

  .spacer { display: none; }

  button { flex: 1; }
}
