*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #134074;
  --primary-light: #0054A2;
  --primary-dark: #061856;
  --accent: #5590FF;
  --bg: #F2F9FF;
  --card-bg: #ffffff;
  --text: #1a202c;
  --text-muted: #4a5568;
  --border: #cbd5e0;
  --error: #e53e3e;
  --error-bg: #fff5f5;
  --success: #38a169;
  --success-bg: #f0fff4;
  --radius: 14px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    linear-gradient(rgba(19, 64, 116, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 64, 116, 0.045) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary-light));
  color: white;
  padding: 1.1rem 1rem;
  box-shadow: 0 12px 28px rgba(6, 24, 86, 0.22);
}

.header-content {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-placeholder svg {
  width: 56px;
  height: 56px;
}

header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
}

.subtitle {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 700;
}

.tagline {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 0.25rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

main {
  flex: 1;
  max-width: 960px;
  margin: 2.5rem auto;
  padding: 0 1rem;
  width: 100%;
}

.form-section {
  background: var(--card-bg);
  border-radius: 22px;
  padding: 1.8rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 18px 45px rgba(19, 64, 116, 0.1);
  border: 1px solid rgba(19, 64, 116, 0.12);
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid rgba(19, 64, 116, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(19, 64, 116, 0.06);
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  position: relative;
}

.step-number {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.step.active .step-number {
  background: var(--primary-light);
  color: white;
  box-shadow: 0 2px 8px rgba(85, 144, 255, 0.4);
}

.step.completed .step-number {
  background: var(--primary);
  color: white;
}

.step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

.step.active .step-label {
  color: var(--accent);
}

.step.completed .step-label {
  color: var(--primary-light);
}

.step-line {
  width: 60px;
  height: 3px;
  background: var(--border);
  margin: 0 0.25rem;
  margin-bottom: 1.2rem;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.step-line.completed {
  background: var(--primary);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 0.8rem 3rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(19, 64, 116, 0.3);
}

.btn-secondary:active {
  transform: translateY(0);
}

#next-btn,
#submit-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.8rem 3rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

#next-btn:hover,
#submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(85, 144, 255, 0.3);
}

#next-btn:active,
#submit-btn:active {
  transform: translateY(0);
}

@media (max-width: 600px) {
  .step-label {
    font-size: 0.65rem;
  }

  .step-number {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }

  .step-line {
    width: 30px;
  }
}

.form-section h2 {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(85, 144, 255, 0.55);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

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

label {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.required {
  color: var(--error);
}

input,
select {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--text);
  background: white;
  min-height: 46px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230054A2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
}

select option {
  background: #fff;
  color: var(--text);
  padding: 0.65rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(85, 144, 255, 0.16);
}

input.invalid,
select.invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.error-msg {
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 0.25rem;
  min-height: 1rem;
}

.note {
  background: #edf5ff;
  border: 1px solid rgba(0, 84, 162, 0.15);
  border-left: 4px solid var(--primary-light);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

#form-messages {
  margin-bottom: 1rem;
}

.msg-success,
.msg-error {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.msg-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success);
}

.msg-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error);
}

.form-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

#submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

footer {
  text-align: center;
  padding: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  header {
    padding: 0.75rem 1rem;
  }

  .header-content {
    gap: 0.75rem;
  }

  .logo-placeholder img {
    width: 50px;
    height: 50px;
  }

  header h1 {
    font-size: 0.85rem;
    line-height: 1.3;
  }

  .subtitle {
    font-size: 0.75rem;
  }

  .tagline {
    font-size: 0.65rem;
  }

  main {
    margin: 1rem auto;
  }

  .form-section {
    padding: 1rem;
  }
}
