* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f6f9fc 0%, #e6f0f9 100%);
  padding: 1.5rem;
}

.card {
  background: #ffffff;
  width: 100%;
  max-width: 400px;
  padding: 2.5rem 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 20px 40px -12px rgba(0, 20, 40, 0.18);
}

h1 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #0b2a4a;
  margin-bottom: 1.75rem;
  text-align: center;
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #2c5779;
  margin-bottom: 0.4rem;
}

.field input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  background: #f8fafc;
  border: 1.5px solid #dbe4ee;
  border-radius: 0.75rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  color: #0b2a4a;
}

.field input:focus {
  border-color: #3d7ea6;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(61, 126, 166, 0.15);
}

.field input.invalid {
  border-color: #e45b5b;
  background: #fff8f8;
}

.field input.invalid:focus {
  box-shadow: 0 0 0 3px rgba(228, 91, 91, 0.15);
}

.field .error {
  display: block;
  font-size: 0.75rem;
  color: #c23b3b;
  margin-top: 0.3rem;
  min-height: 0;
  overflow: hidden;
  transition: min-height 0.15s;
}

.field .error.visible {
  min-height: 1.1rem;
}

.form-error {
  font-size: 0.85rem;
  color: #c23b3b;
  background: #fdf0f0;
  border: 1px solid #f5d0d0;
  border-radius: 0.6rem;
  text-align: center;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s, padding 0.2s, margin 0.2s;
  margin-bottom: 0;
}

.form-error.visible {
  padding: 0.7rem;
  max-height: 3rem;
  margin-bottom: 1rem;
}

button {
  width: 100%;
  padding: 0.9rem;
  background: #0b2a4a;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

button:hover:not(:disabled) {
  background: #123b62;
}

button:active:not(:disabled) {
  transform: scale(0.985);
}

button:disabled {
  cursor: not-allowed;
  background: #3a5a7a;
}

.spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

button.loading .spinner {
  display: inline-block;
}

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