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

:root {
  --blue:       #5A8FA5;
  --blue-dark:  #3d6e85;
  --blue-light: #7aafc5;
  --gold:       #C9A44A;
  --gold-dark:  #a8882e;
  --navy:       #1C2A3A;
  --white:      #ffffff;
  --off-white:  #f7f9fb;
  --border:     #dde3e8;
  --muted:      #6b7f8e;
  --bad:        #c0392b;
  --radius:     4px;
}

html, body { height: 100%; }

body {
  font-family: 'Inter', Arial, sans-serif;
  background: linear-gradient(160deg, #7aafc5 0%, #4d8099 60%, #3a6478 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(28, 42, 58, 0.3);
}

/* ── Header ── */
.card-header {
  background: linear-gradient(160deg, #7aafc5 0%, #4d8099 100%);
  padding: 36px 40px 32px;
  position: relative;
}

.brand-logo {
  display: block;
  width: 180px;
  height: auto;
  margin-bottom: 18px;
  /* The SVG has a blue border box — make it pop on the blue header */
  filter: brightness(0) invert(1);
}

.card-header h1 {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--white);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 10px;
}

.card-header p {
  color: rgba(255,255,255,0.82);
  font-size: 14px;
  line-height: 1.6;
}

/* ── Form ── */
.card-body {
  padding: 36px 40px 24px;
  background: var(--white);
}

.field {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 7px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.input-wrap {
  position: relative;
}

.icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
  flex-shrink: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-row input {
  padding-left: 14px;
}

input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  color: var(--navy);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

input::placeholder { color: #aab5bc; }

input:focus {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(90,143,165,0.15);
}

input.invalid {
  border-color: var(--bad);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}

.field-error {
  display: block;
  font-size: 12px;
  color: var(--bad);
  margin-top: 5px;
  min-height: 16px;
}

/* ── Submit button ── */
button[type="submit"] {
  width: 100%;
  padding: 14px;
  background: #f9d371;
  color: #393939;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  box-shadow: 0 2px 10px rgba(249,211,113,0.35);
}

button[type="submit"]:hover {
  background: #f0c84a;
  box-shadow: 0 4px 16px rgba(249,211,113,0.4);
}

button[type="submit"]:active { transform: translateY(1px); }

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(28,42,58,0.25);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

button[type="submit"].loading .btn-label { display: none; }
button[type="submit"].loading .btn-spinner { display: block; }

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

/* ── Success state ── */
.success-state {
  padding: 44px 40px;
  text-align: center;
}

.success-icon {
  width: 60px;
  height: 60px;
  background: var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 16px rgba(90,143,165,0.35);
}

.success-icon svg {
  width: 26px;
  height: 26px;
  color: var(--white);
}

.success-state h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  color: var(--navy);
  margin-bottom: 10px;
}

.success-state p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 24px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--navy);
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
}

.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ── Footer ── */
.card-footer {
  padding: 14px 40px 22px;
  border-top: 1px solid var(--border);
  background: var(--off-white);
}

.features {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.features span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--muted);
  background: var(--white);
  padding: 4px 10px;
  border-radius: 2px;
  border: 1px solid var(--border);
}

/* ── Responsive ── */
@media (max-width: 520px) {
  body { padding: 16px; }
  .card-header, .card-body, .success-state, .card-footer { padding-left: 24px; padding-right: 24px; }
  .card-header h1 { font-size: 22px; }
}
