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

body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  color: #1e293b;
}

.page-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 40px 16px;
}

/* Card */
.card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 560px;
  overflow: hidden;
}

.card-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 40px 40px 32px;
  text-align: center;
}

.card-header.success-header {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
}

.wifi-icon,
.success-icon {
  font-size: 44px;
  margin-bottom: 12px;
  display: block;
}

.card-header h1 {
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.card-header p {
  color: #a0b4d0;
  font-size: 14px;
  line-height: 1.5;
}

.card-body {
  padding: 32px 40px 40px;
}

/* Formular */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}

.required {
  color: #ef4444;
}

.optional {
  color: #94a3b8;
  font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: #1e293b;
  background: #f8fafc;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  outline: none;
  appearance: none;
}

input:focus,
select:focus {
  border-color: #0f3460;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.12);
}

input.is-invalid,
select.is-invalid {
  border-color: #ef4444;
  background: #fff5f5;
}

input.is-invalid:focus,
select.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 38px;
}

.field-error {
  display: block;
  color: #ef4444;
  font-size: 12px;
  margin-top: 4px;
  min-height: 16px;
}

.field-hint {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  margin-top: 4px;
}

/* Alerts */
.alert {
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

/* Button */
.btn-submit {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #0f3460 0%, #1a5276 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-bottom: 16px;
}

.btn-submit:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.form-note {
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Success Page */
.success-steps {
  margin-bottom: 24px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f1f5f9;
}

.step:last-child {
  border-bottom: none;
}

.step-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}

.step-content strong {
  display: block;
  font-size: 15px;
  color: #1e293b;
  margin-bottom: 4px;
}

.step-content p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 480px) {
  .page-wrapper {
    padding: 20px 12px;
  }

  .card-header {
    padding: 28px 24px 20px;
  }

  .card-body {
    padding: 24px 24px 28px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
