/* =============================================
   iBloomi — auth.css
   All button styles use explicit resets to beat
   browser UA stylesheet and style.css overrides.
   ============================================= */

/* ---- Page ---- */
.auth-body {
  min-height: 100vh;
  background: linear-gradient(to bottom, #233f8f 0%, #0D1B5E 45%, #050b2e 100%);
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

/* ---- Nav ---- */
.auth-nav {
  padding: 20px 32px;
  display: flex;
  align-items: center;
}
.auth-nav .nav-logo img {
  height: 36px;
  width: auto;
  display: block;
  /* Drop-shadow makes the dark navy letterforms visible on the dark gradient.
     No invert/brightness — this is the original unmodified logo file. */
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.55))
          drop-shadow(0 0 2px rgba(255, 255, 255, 0.9));
}

/* ---- Centering wrapper ---- */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px 48px;
}

/* ---- Card ---- */
.auth-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 36px 36px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 64px rgba(5, 11, 46, 0.45);
  box-sizing: border-box;
}

/* ---- Heading — centered ---- */
.auth-card-header {
  margin-bottom: 22px;
  text-align: center;
}
.auth-heading {
  font-family: 'Noto Sans', -apple-system, sans-serif !important;
  font-size: 1.45rem !important;
  font-weight: 700 !important;
  color: #0D1B5E !important;
  line-height: 1.2;
  margin: 0;
  text-align: center;
}

/* ---- Hidden tab bar — invisible but in DOM for auth.js ---- */
.auth-tabs-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  pointer-events: none !important;
}

/* ---- Panels ---- */
.auth-panel { display: none; }
.auth-panel.active { display: block; }

/* ---- Form fields ---- */
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.auth-field label {
  font-family: 'Noto Sans', -apple-system, sans-serif;
  font-size: 0.81rem;
  font-weight: 600;
  color: #0D1B5E;
  display: block;
}
.auth-field input {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background: #f5f6fa !important;
  border: 1.5px solid #e2e6f0 !important;
  border-radius: 9px !important;
  padding: 10px 13px !important;
  font-family: 'Noto Sans', -apple-system, sans-serif !important;
  font-size: 0.9rem !important;
  color: #1a1a2e !important;
  outline: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  display: block;
}
.auth-field input::placeholder { color: #9aa0b8; opacity: 1; }
.auth-field input:focus {
  border-color: #0D1B5E !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(13, 27, 94, 0.09) !important;
}
.auth-field input.input-error {
  border-color: #e0443a !important;
  background: #fff8f8 !important;
  box-shadow: 0 0 0 3px rgba(224, 68, 58, 0.08) !important;
}

/* ---- Remember me + Forgot password row ---- */
.auth-remember-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 16px;
}
.auth-checkbox-label {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-family: 'Noto Sans', -apple-system, sans-serif;
  font-size: 0.81rem;
  color: #5a6480;
  user-select: none;
}
.auth-checkbox-label input[type="checkbox"] { display: none; }
.auth-checkbox-custom {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 1.5px solid #c8cde0;
  border-radius: 4px;
  background: #f5f6fa;
  position: relative;
  transition: border-color 0.15s, background 0.15s;
}
.auth-checkbox-label input[type="checkbox"]:checked + .auth-checkbox-custom {
  background: #0D1B5E;
  border-color: #0D1B5E;
}
.auth-checkbox-label input[type="checkbox"]:checked + .auth-checkbox-custom::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 1px;
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}
.auth-forgot {
  font-family: 'Noto Sans', -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: #5a6480;
  text-decoration: none;
  transition: color 0.15s;
}
.auth-forgot:hover { color: #0D1B5E; }

/* ---- Error messages ---- */
.auth-error {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Noto Sans', -apple-system, sans-serif;
  font-size: 0.76rem;
  color: #e0443a;
  font-weight: 500;
  margin: 0;
}
.auth-error.field-error { margin-top: 2px; }
.auth-error.general-error {
  background: #fff1f0;
  border: 1px solid #ffd6d4;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 0.82rem;
}

/* ---- PRIMARY SUBMIT BUTTON — full reset + iBloomi green ---- */
.auth-body .auth-submit-btn {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 12px 20px !important;
  margin: 0 !important;
  background: #7DC51E !important;
  color: #080f35 !important;
  border: none !important;
  border-radius: 50px !important;
  outline: none !important;
  font-family: 'Noto Sans', -apple-system, sans-serif !important;
  font-size: 0.94rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: background 0.18s, box-shadow 0.18s, transform 0.15s !important;
}
.auth-body .auth-submit-btn:hover:not(:disabled) {
  background: #6ab018 !important;
  box-shadow: 0 5px 18px rgba(125, 197, 30, 0.32) !important;
  transform: translateY(-1px) !important;
}
.auth-body .auth-submit-btn:active:not(:disabled) {
  transform: translateY(0) !important;
}
.auth-body .auth-submit-btn:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* ---- DIVIDER ---- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: #9aa0b8;
  font-family: 'Noto Sans', -apple-system, sans-serif;
  font-size: 0.76rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e8eaf2;
}

/* ---- GOOGLE BUTTON — full reset + white secondary ---- */
.auth-body .auth-google-proxy {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 10px 18px !important;
  margin: 0 !important;
  background: #ffffff !important;
  color: #1a1a2e !important;
  border: 1.5px solid #e2e6f0 !important;
  border-radius: 50px !important;
  outline: none !important;
  font-family: 'Noto Sans', -apple-system, sans-serif !important;
  font-size: 0.87rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  box-shadow: 0 1px 4px rgba(13, 27, 94, 0.07) !important;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s !important;
}
.auth-body .auth-google-proxy:hover:not(:disabled) {
  background: #f5f6fa !important;
  border-color: #c2c8e0 !important;
  box-shadow: 0 3px 12px rgba(13, 27, 94, 0.1) !important;
}
.auth-body .auth-google-proxy:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

/* ---- BOTTOM SWITCH TEXT LINK ---- */
.auth-switch {
  text-align: center;
  font-family: 'Noto Sans', -apple-system, sans-serif;
  font-size: 0.81rem;
  color: #5a6480;
  margin-top: 14px;
  margin-bottom: 0;
}
.auth-switch-link {
  color: #0D1B5E;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.auth-switch-link:hover {
  color: #7DC51E;
  border-bottom-color: #7DC51E;
}

/* ---- Spinner ---- */
.auth-spinner {
  line-height: 0;
  display: inline-flex;
  align-items: center;
}
.auth-btn-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
@keyframes auth-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---- Success state ---- */
.auth-success { text-align: center; padding: 8px 0; }
.auth-success svg { display: block; margin: 0 auto 12px; }
.auth-success h3 {
  font-family: 'Noto Sans', -apple-system, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0D1B5E;
  margin-bottom: 8px;
}
.auth-success p { font-size: 0.87rem; color: #5a6480; line-height: 1.6; }
.auth-success strong { color: #0D1B5E; font-weight: 600; }

/* ---- Config loading / error overlays ---- */
.auth-config-loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-config-error {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px 24px; border-radius: 16px; }
  .auth-nav { padding: 16px 20px; }
  .auth-heading { font-size: 1.3rem !important; }
}
