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

:root {
  --primary-blue: #007BFF;
  --dark-navy: #041B2D;
  --light-gray: #F3F4F6;
  --white: #ffffff;
  --error: #EF4444;
  --success: #10B981;
  --border: #e0e0e0;
  --text-primary: #1a2b4a;
  --text-secondary: #5a6a7a;
}

body {
  font-family: "DM Sans", sans-serif;
  background-color: #f5f7fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background-color: var(--white);
  padding: 16px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  border-bottom: 1px solid #e8e8e8;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 40px;
  width: auto;
}

.logo-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark-navy);
  letter-spacing: -0.3px;
}

.secure-badge {
  position: absolute;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #888;
  font-size: 12px;
}

.lock-icon {
  width: 12px;
  height: 12px;
}

.progress-container {
  background-color: var(--white);
  padding: 0;
}

.progress-bar {
  height: 4px;
  background-color: #e0e0e0;
  width: 100%;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary-blue);
  transition: width 0.3s ease;
  width: 0%;
}

.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #f5f7fa;
  justify-content: center;
  padding: 30px 20px;
}

.form-logo {
  text-align: center;
  margin-bottom: 24px;
}

.form-logo img {
  max-width: 180px;
  height: auto;
}

.form-card {
  background-color: var(--white);
  border-radius: 12px;
  padding: 40px 32px;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.step {
  display: none;
}

.step.active {
  display: block;
}

.step-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  text-align: center;
}

.step-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  text-align: center;
  line-height: 1.5;
}

.input-group {
  margin-bottom: 20px;
}

.input-label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.input-label .required {
  color: var(--error);
  margin-left: 2px;
}

.input-field {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: "DM Sans", sans-serif;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: var(--white);
  transition: border-color 0.2s;
}

.input-field:focus {
  outline: none;
  border-color: var(--primary-blue);
}

.input-field.error {
  border-color: var(--error);
}

.error-message {
  color: var(--error);
  font-size: 13px;
  margin-top: 6px;
  display: none;
}

.error-message.show {
  display: block;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.phone-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.phone-prefix-wrapper {
  position: relative;
  width: 140px;
  flex-shrink: 0;
}

.phone-prefix-wrapper .usa-flag-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 16px;
  pointer-events: none;
  z-index: 1;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 1px rgba(0,0,0,0.2);
}

.phone-prefix {
  width: 100%;
  padding: 14px 12px 14px 44px;
}

.phone-number {
  flex: 1;
}

.usa-flag {
  width: 24px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 2px;
  background: linear-gradient(180deg, 
    #B22234 0%, #B22234 7.69%,
    #fff 7.69%, #fff 15.38%,
    #B22234 15.38%, #B22234 23.08%,
    #fff 23.08%, #fff 30.77%,
    #B22234 30.77%, #B22234 38.46%,
    #fff 38.46%, #fff 46.15%,
    #B22234 46.15%, #B22234 53.85%,
    #fff 53.85%, #fff 61.54%,
    #B22234 61.54%, #B22234 69.23%,
    #fff 69.23%, #fff 76.92%,
    #B22234 76.92%, #B22234 84.62%,
    #fff 84.62%, #fff 92.31%,
    #B22234 92.31%, #B22234 100%);
  position: relative;
  overflow: hidden;
}

.usa-flag::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 53.85%;
  background: #3C3B6E;
}

.radio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.radio-option {
  position: relative;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 15px;
  color: var(--text-primary);
  min-height: 56px;
}

.radio-option input[type="radio"]:checked + .radio-label {
  background-color: var(--primary-blue);
  color: var(--white);
  border-color: var(--primary-blue);
}

.radio-label:hover {
  border-color: var(--primary-blue);
}

select.input-field {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235a6a7a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.next-btn {
  width: 100%;
  padding: 16px 32px;
  background-color: var(--primary-blue);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  font-family: "DM Sans", sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 24px;
}

.next-btn:hover:not(:disabled) {
  background-color: #0056b3;
  transform: translateY(-1px);
}

.next-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.address-input-wrapper {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 4px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
}

.autocomplete-dropdown.show {
  display: block;
}

.autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background-color: #f5f7fa;
}

.autocomplete-item strong {
  color: var(--primary-blue);
}

.success-content {
  text-align: center;
  padding: 20px 0;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--success), #059669);
  border-radius: 50%;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--white);
}

.success-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.success-message {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .form-card {
    padding: 32px 24px;
  }

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

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

  .phone-group {
    flex-direction: column;
  }

  .phone-prefix {
    width: 100%;
  }

  .step-title {
    font-size: 22px;
  }

  .secure-badge {
    position: static;
    margin-top: 8px;
  }

  .header {
    flex-direction: column;
  }
}

.hidden {
  display: none;
}
