/* ============================================================
   FundrayzerGlobal Bank — register.css
   Matches the exact colour palette, font, and component style
   of style.css — white background, blue primary, gold accent.
   ============================================================ */

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

:root {
  --primary:        #0a2e6e;
  --primary-mid:    #1040a0;
  --primary-light:  #1a55c8;
  --accent:         #f5a623;
  --accent-light:   #ffc94a;
  --teal:           #1a7fd4;
  --white:          #ffffff;
  --off-white:      #f4f7fc;
  --text:           #1a1e2e;
  --text-muted:     #5a6480;
  --border:         #d4daea;
  --danger:         #d93535;
  --success:        #1a7a45;
  --font:           'Poppins', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--off-white);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}

a { text-decoration: none; color: inherit; }

/* ── Bank header ── */
.bank-header {
  text-align: center;
  margin-bottom: 1.8rem;
}

.bank-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
  text-decoration: none;
}

.bank-logo-mark {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.bank-logo-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.bank-logo-name span { color: var(--accent); }

.bank-logo-sub {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.bank-header h1 {
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.bank-header p {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Form card — same shadow/border style as service-card in style.css ── */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.2rem 2rem;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 4px 20px rgba(10,46,110,0.07);
}

form ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ── First + Last side by side ── */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 0;
}

/* ── Field group ── */
.field-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.1rem;
}

.field-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.38rem;
}

.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="password"] {
  width: 100%;
  padding: 0.76rem 1rem;
  font-family: var(--font);
  font-size: 0.875rem;
  color: var(--text);
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.22s, box-shadow 0.22s, background 0.22s;
}

.field-group input::placeholder { color: #aab2c8; }

.field-group input:focus {
  border-color: var(--primary-light);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26,85,200,0.12);
}

.field-group input.input-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(217,53,53,0.1);
}

.field-group input.input-success {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(26,122,69,0.1);
}

/* Error message */
.field-error {
  font-size: 0.74rem;
  color: var(--danger);
  margin-top: 0.28rem;
  display: none;
  align-items: center;
  gap: 0.25rem;
}
.field-error.visible { display: flex; }

/* ── Password input with toggle ── */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrapper input { padding-right: 2.7rem; }

.toggle-pw {
  position: absolute;
  right: 0.85rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}
.toggle-pw:hover { color: var(--primary); }

/* ── Password strength meter ── */
.strength-meter {
  margin-top: 0.5rem;
  display: none;
  flex-direction: column;
  gap: 0.28rem;
}
.strength-meter.visible { display: flex; }

.strength-bars {
  display: flex;
  gap: 5px;
}

.strength-bar-seg {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: var(--border);
  transition: background 0.3s ease;
}

.strength-bar-seg.filled-weak   { background: var(--danger); }
.strength-bar-seg.filled-fair   { background: var(--accent); }
.strength-bar-seg.filled-good   { background: var(--teal); }
.strength-bar-seg.filled-strong { background: var(--success); }

.strength-text {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.3s;
}

/* ── Checkbox — same style as checkbox-group in style.css ── */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 1.3rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-group a {
  color: var(--primary-light);
  text-decoration: underline;
  transition: color 0.2s;
}
.checkbox-group a:hover { color: var(--accent); }

/* ── Submit button — same as .btn-signin in style.css ── */
.btn-submit {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.88rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  margin-bottom: 1.2rem;
}

.btn-submit:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(10,46,110,0.22);
}

.btn-submit:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-submit.loading {
  background: var(--primary-mid);
  pointer-events: none;
  opacity: 0.8;
}

.spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-submit.loading .spinner { display: inline-block; }

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

/* ── Sign in link ── */
.signin-link {
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.signin-link a {
  color: var(--primary-light);
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.2s;
}
.signin-link a:hover { color: var(--accent); }

/* ── Toast ── */
.toast {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--success);
  color: var(--white);
  padding: 0.85rem 1.4rem;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(0,0,0,0.14);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  z-index: 9999;
  transform: translateX(130%);
  transition: transform 0.35s ease;
}
.toast.show { transform: translateX(0); }

/* ── Responsive ── */
@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-card { padding: 1.8rem 1.3rem; }
  .bank-header h1 { font-size: 1.1rem; }
}
/* ── Additional mobile fixes ── */
@media (max-width: 380px) {
  body { padding: 1.5rem 0.75rem; }
  .form-card { padding: 1.5rem 1rem; }
  .bank-logo-name { font-size: 1.05rem; }
  .bank-header h1 { font-size: 1rem; }
  .toast { right: 0.5rem; left: 0.5rem; max-width: none; }
}
