/* ============================================================================
   ವೀರಶೈವ ಲಿಂಗಾಯತ್ ಪಂಚಮಸಾಲಿ ನೌಕರರ ಕ್ಷೇಮಾಭಿವೃದ್ಧಿ ಸಂಘ (ರಿ), ಬೆಂಗಳೂರು
   Login & Register Page Stylesheet
   ========================================================================== */

/* ── Login / Auth Section ─────────────────────────────────────────────── */
.auth-section {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, #FDF2F2 0%, #FAFAF7 50%, #FFFBEB 100%);
}

.auth-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(139, 30, 15, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
  padding: 2.5rem 2.8rem 2.8rem;
  width: 100%;
  max-width: 460px;
  border-top: 4px solid var(--primary);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--primary) 100%);
}

/* Logo block */
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.auth-emblem {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(139, 30, 15, 0.25));
}

.auth-org-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

/* Title */
.auth-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.8rem;
}

/* Gold divider */
.auth-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin-bottom: 1.8rem;
  border: none;
}

/* Form Fields */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.auth-label .req {
  color: var(--primary);
  font-size: 1rem;
}

.auth-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.95rem;
  color: var(--text-main);
  background: #FAFAF7;
  transition: var(--transition);
  outline: none;
}

.auth-input:focus {
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(139, 30, 15, 0.1);
}

.auth-input.invalid {
  border-color: #C0231C;
  background: #FFF7F6;
}

.auth-input::placeholder {
  color: #94A3B8;
}

/* Password wrapper for show/hide toggle */
.auth-pw-wrapper {
  position: relative;
}

.auth-pw-wrapper .auth-input {
  padding-right: 3rem;
}

.auth-pw-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 1.1rem;
  padding: 0.2rem;
  transition: var(--transition);
  line-height: 1;
}

.auth-pw-toggle:hover {
  color: var(--primary);
}

/* Error message */
.auth-error {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: #FFF2F2;
  border: 1px solid #FECACA;
  border-left: 4px solid #C0231C;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #9B1C1C;
  margin-top: 0.25rem;
  animation: slideIn 0.25s ease;
}

.auth-error.hidden {
  display: none;
}

.auth-error-icon {
  flex-shrink: 0;
  font-size: 1rem;
  margin-top: 0.05rem;
}

/* Success message */
.auth-success {
  background: #F0FFF4;
  border: 1px solid #A7F3D0;
  border-left: 4px solid #059669;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #065F46;
  text-align: center;
  animation: slideIn 0.25s ease;
}

.auth-success.hidden {
  display: none;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Login button */
.auth-btn-primary {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--primary) 0%, #A2101A 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.4rem;
  position: relative;
  overflow: hidden;
}

.auth-btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
}

.auth-btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #8B1E0F 100%);
  box-shadow: 0 6px 20px rgba(139, 30, 15, 0.4);
  transform: translateY(-1px);
}

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

.auth-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Forgot password link */
.auth-forgot {
  text-align: center;
  margin-top: 1rem;
}

.auth-forgot a,
.auth-forgot button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
  transition: var(--transition);
}

.auth-forgot a:hover,
.auth-forgot button:hover {
  color: var(--primary-dark);
}

/* Register section divider */
.auth-or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.4rem 0 1rem;
  color: var(--text-light);
  font-size: 0.82rem;
  font-weight: 600;
}

.auth-or::before,
.auth-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* Register secondary button */
.auth-btn-secondary {
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: block;
  text-align: center;
}

.auth-btn-secondary:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* Gold badge below card */
.auth-badge {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 500;
}

.auth-badge strong {
  color: var(--accent-warm);
}

/* ── Forgot Password Modal ─────────────────────────────────────────────── */
.fp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.fp-modal-backdrop.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fp-modal {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  padding: 2rem 2.2rem 2.2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fp-modal-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.fp-modal h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.fp-modal p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.fp-modal-close {
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.65rem 2rem;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.fp-modal-close:hover {
  background: var(--primary-hover);
}

/* ── Registration Page Specific ───────────────────────────────────────── */
.auth-card.register-card {
  max-width: 520px;
}

.register-success-box {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}

.register-success-box .success-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

/* ── Logout button on idcard page ─────────────────────────────────────── */
.logout-bar {
  background: linear-gradient(90deg, #581007, #8B1E0F);
  color: #FFE2B0;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  gap: 1rem;
  flex-wrap: wrap;
}

.logout-bar-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logout-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm);
  padding: 0.35rem 1rem;
  font-family: var(--font-family);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #FFFFFF;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card {
    padding: 1.8rem 1.4rem 2rem;
  }

  .auth-card.register-card {
    max-width: 100%;
  }

  .auth-title {
    font-size: 1.15rem;
  }

  .auth-emblem {
    width: 64px;
    height: 64px;
  }

  .logout-bar {
    justify-content: center;
    text-align: center;
  }
}
