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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f4f8;
  color: #333;
  min-height: 100vh;
}

header {
  background: #1a3a5c;
  color: white;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 1px;
}

header span {
  font-size: 0.9rem;
  opacity: 0.7;
}

.container {
  max-width: 760px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.card {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
}

.card h2 {
  font-size: 1.2rem;
  color: #1a3a5c;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e8f0fe;
}

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

.form-group {
  margin-bottom: 1rem;
}

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

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.35rem;
}

label .required {
  color: #e53e3e;
  margin-left: 2px;
}

input, select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  background: white;
}

input:focus, select:focus {
  outline: none;
  border-color: #1a3a5c;
}

input.error, select.error {
  border-color: #e53e3e;
}

.field-error {
  font-size: 0.78rem;
  color: #e53e3e;
  margin-top: 0.25rem;
  display: none;
}

.field-error.visible {
  display: block;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: #1a3a5c;
  color: white;
  width: 100%;
}

.btn-primary:hover {
  background: #22507a;
}

.btn-primary:disabled {
  background: #aaa;
  cursor: not-allowed;
}

.btn-success {
  background: #2d7a4f;
  color: white;
}

.btn-success:hover {
  background: #38946a;
}

.btn-danger {
  background: #c0392b;
  color: white;
}

.btn-danger:hover {
  background: #e74c3c;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.success-screen {
  text-align: center;
  padding: 2rem 1rem;
}

.success-screen .icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.success-screen h2 {
  color: #2d7a4f;
  margin-bottom: 0.75rem;
}

.success-screen p {
  color: #555;
  line-height: 1.6;
}

.loading {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

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

.info-text {
  font-size: 0.82rem;
  color: #888;
  margin-top: 1.5rem;
  text-align: center;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  header h1 {
    font-size: 1.2rem;
  }
}
