:root {
  --bg-top: #c5d9f0;
  --bg-bottom: #e8eef5;
  --card: #ffffff;
  --title: #1a3a6b;
  --section: #2b4a7c;
  --text: #323130;
  --muted: #605e5c;
  --border: #edebe9;
  --input-border: #8a8886;
  --focus: #0078d4;
  --btn: #0078d4;
  --btn-hover: #106ebe;
  --required: #a4262c;
  --shadow: 0 1.6px 3.6px rgba(0, 0, 0, 0.13), 0 0.3px 0.9px rgba(0, 0, 0, 0.11);
  --radius: 8px;
  --font: "Segoe UI", "Segoe UI Web (West European)", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 45%, #f3f6fa 100%);
  background-attachment: fixed;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}

.brand-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 16px;
}

.brand-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  border-radius: 4px;
}

.form-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px 32px;
  margin-bottom: 16px;
}

.form-card h1 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 600;
  color: var(--title);
  line-height: 1.3;
}

.form-meta {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
}

.required-legend {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.required-legend span {
  color: var(--required);
}

.section-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 32px 28px;
  margin-bottom: 16px;
}

.section-card h2 {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 600;
  color: var(--section);
}

.field {
  margin-bottom: 22px;
}

.field:last-child {
  margin-bottom: 0;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
}

.field label .req {
  color: var(--required);
  margin-left: 2px;
}

.field input[type="text"],
.field select,
.field textarea {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--input-border);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 1px var(--focus);
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23605e5c' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.field-select {
  position: relative;
  z-index: 5;
  margin-bottom: 0;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--input-border);
  border-radius: 2px;
  cursor: pointer;
  text-align: left;
}

.custom-select-trigger::after {
  content: "";
  width: 12px;
  height: 8px;
  margin-left: 12px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23605e5c' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.custom-select.open .custom-select-trigger {
  border-color: var(--focus);
  box-shadow: 0 0 0 1px var(--focus);
}

.custom-select-label.is-placeholder {
  color: var(--muted);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 50;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--input-border);
  border-radius: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-select-options li {
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}

.custom-select-options li:hover,
.custom-select-options li.selected {
  background: #f3f2f1;
}

.custom-select-options li.selected {
  font-weight: 600;
  color: var(--focus);
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--btn);
  color: #fff;
}

.btn-primary:hover {
  background: var(--btn-hover);
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: #8a8886;
}

.btn-secondary:hover {
  background: #f3f2f1;
}

.alert {
  background: #fde7e9;
  border-left: 4px solid #a4262c;
  color: #a4262c;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 2px;
  font-size: 14px;
}

.success-card {
  text-align: center;
  padding: 48px 32px;
}

.success-card h1 {
  color: var(--title);
  margin-bottom: 12px;
}

.success-card p {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 24px;
}

.progress {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 0 4px;
}

.progress span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.55);
}

.progress span.active {
  background: var(--btn);
}

.progress span.done {
  background: #107c10;
}

@media (max-width: 600px) {
  .page {
    padding: 16px 10px 40px;
  }

  .form-card,
  .section-card {
    padding: 20px 18px 22px;
  }

  .form-card h1 {
    font-size: 22px;
  }
}
