/* ==========================================================================
   Shanti Foundation - Admin Login Page Stylesheet
   Path: public/admin/dist/css/login.css
   ========================================================================== */

:root {
  --primary-green: #198754;
  --primary-green-hover: #157347;
  --primary-green-dark: #0f5132;
  --primary-green-light: #eaf6ee;
  --primary-green-soft: #f0f9f3;
  --text-dark: #1e293b;
  --text-title: #14352b;
  --text-muted: #596b68;
  --text-light-muted: #94a3b8;
  --border-color: #e2e8f0;
  --border-focus: #198754;
  --card-bg: #ffffff;
  --card-shadow: 0 25px 60px -15px rgba(20, 50, 35, 0.15), 0 10px 25px -5px rgba(0, 0, 0, 0.04);
  --input-bg: #ffffff;
}

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

html,
body {
  height: 100%;
  width: 100%;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-dark);
  background-color: #f6faf7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Main Layout & Background
   ========================================================================== */
.login-page-wrapper {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  background-image: url('../../assets/images/login-page-image.png');
  /* background-size: cover; */
  background-size: contain;
  background-position: bottom left;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Fallback / ambient overlay */
.login-page-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 85% 50%, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.1) 60%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.45) 60%, rgba(245, 250, 246, 0.75) 100%);
  pointer-events: none;
  z-index: 1;
}

.login-content-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  min-height: 100vh;
  padding: 2.5rem 3.5rem;
}

/* ==========================================================================
   Left Column: Hero & Branding
   ========================================================================== */
.login-hero-section {
  flex: 1.15;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 2.5rem 2rem 1.5rem;
  position: relative;
}

.hero-header {
  margin-bottom: 2rem;
}

.brand-logo-link {
  display: inline-block;
  text-decoration: none;
}

.brand-logo-img {
  height: 58px;
  width: auto;
  max-width: 250px;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.brand-logo-link:hover .brand-logo-img {
  transform: scale(1.02);
}

.hero-body {
  max-width: 580px;
  margin-top: 1rem;
  margin-bottom: auto;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--text-title);
  margin-bottom: 1.25rem;
}

.hero-title .highlight-green {
  color: var(--primary-green);
  display: inline-block;
}

.hero-description {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 2rem;
  font-weight: 450;
}

/* Feature Badges Row */
.feature-badges-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem;
  margin-top: 1rem;
}

.feature-badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 96px;
  cursor: default;
  transition: transform 0.25s ease;
}

.feature-badge-item:hover {
  transform: translateY(-4px);
}

.feature-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background-color: var(--primary-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-green);
  margin-bottom: 0.6rem;
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.08);
  border: 1px solid rgba(25, 135, 84, 0.12);
  transition: all 0.25s ease;
}

.feature-badge-item:hover .feature-icon-box {
  background-color: var(--primary-green);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(25, 135, 84, 0.25);
}

.feature-icon-box svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.feature-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #2c443b;
  line-height: 1.3;
}

/* Bottom Script Note */
.hero-footer-note {
  margin-top: auto;
  padding-top: 2rem;
  align-self: flex-start;
  position: relative;
}

.handwritten-script {
  font-family: 'Caveat', cursive;
  font-size: 1.85rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  display: inline-block;
  transform: rotate(-7deg);
  position: relative;
  letter-spacing: 0.5px;
}

.handwritten-script .script-underline {
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 10px;
  overflow: visible;
}

.handwritten-script .script-underline path {
  stroke: #ffffff;
  stroke-width: 2.2;
  stroke-linecap: round;
  fill: none;
  opacity: 0.85;
}

/* ==============================================================
   Right Column: Login Card & Credentials Form
   ============================================================== */
.login-form-section {
  flex: 0.85;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
  position: relative;
}

.login-auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--card-bg);
  border-radius: 22px;
  padding: 2.75rem 2.5rem 2.25rem;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255, 255, 255, 0.9);
  position: relative;
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-header-branding {
  text-align: center;
  margin-bottom: 2rem;
}

.card-logo-img {
  height: 48px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.35rem;
  letter-spacing: -0.015em;
}

.card-subtitle {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 450;
  margin-bottom: 0;
}

/* Alert Message */
.auth-alert {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  animation: fadeInDown 0.3s ease-out;
}

.auth-alert svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: currentColor;
}

/* Success Alert Message */
.auth-success-alert {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  animation: fadeInDown 0.3s ease-out;
}

.auth-success-alert svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: currentColor;
}

.step-info-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  color: #475569;
  text-align: center;
}

.step-info-box strong {
  color: #0f172a;
}

.otp-input-field {
  text-align: center !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  letter-spacing: 6px !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

.back-to-login-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.back-to-login-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.back-to-login-link:hover {
  color: var(--primary-green);
  text-decoration: underline;
}

.back-to-login-link:hover svg {
  transform: translateX(-3px);
}

/* Form Groups & Inputs */
.form-group-item {
  margin-bottom: 1.2rem;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-prefix {
  position: absolute;
  left: 1rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: color 0.2s ease;
}

.input-icon-prefix svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.auth-input-field {
  width: 100%;
  height: 48px;
  padding: 0.65rem 1rem 0.65rem 2.85rem;
  font-size: 0.92rem;
  font-family: inherit;
  color: #1e293b;
  background-color: var(--input-bg);
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  outline: none;
  transition: all 0.2s ease;
}

.auth-input-field::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.auth-input-field:focus {
  border-color: var(--border-focus);
  background-color: #ffffff;
  box-shadow: 0 0 0 3.5px rgba(25, 135, 84, 0.12);
}

.input-with-icon:focus-within .input-icon-prefix {
  color: var(--primary-green);
}

/* Password Toggle Button */
.input-icon-suffix {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: #94a3b8;
  padding: 0.35rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s ease;
}

.input-icon-suffix:hover {
  color: #475569;
}

.input-icon-suffix svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.auth-input-field.has-suffix {
  padding-right: 2.85rem;
}

/* ==========================================================================
   Captcha Row (Image + Refresh + Input in One Row)
   ========================================================================== */
.auth-captcha__row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.auth-captcha__image-wrap {
  flex: 0 0 auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid #e2e8f0;
  background-color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  height: 48px;
  transition: all 0.2s ease;
}

.auth-captcha__image-wrap:hover {
  border-color: var(--primary-green);
  box-shadow: 0 2px 8px rgba(25, 135, 84, 0.12);
}

.auth-captcha__image {
  height: 100%;
  width: auto;
  max-width: 120px;
  display: block;
  object-fit: contain;
  user-select: none;
}

.auth-captcha__refresh {
  flex: 0 0 44px;
  width: 44px;
  height: 48px;
  border: 1.5px solid #e2e8f0;
  background-color: #f8fafc;
  color: var(--primary-green);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  outline: none;
}

.auth-captcha__refresh:hover {
  background-color: var(--primary-green-light);
  border-color: var(--primary-green);
  color: var(--primary-green-hover);
  transform: scale(1.03);
}

.auth-captcha__refresh:active {
  transform: scale(0.97);
}

.auth-captcha__refresh .captcha-refresh-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform 0.4s ease;
}

.auth-captcha__refresh:hover .captcha-refresh-icon {
  transform: rotate(180deg);
}

.auth-captcha__refresh.is-spinning .captcha-refresh-icon {
  animation: spin 0.6s linear infinite;
}

.auth-captcha__input-wrap {
  flex: 1;
  min-width: 0;
}

.auth-captcha__input {
  width: 100%;
  height: 48px;
  padding: 0.65rem 0.95rem !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* Remember & Forgot Row */
.form-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1rem 0 1.5rem 0;
  font-size: 0.85rem;
}

.remember-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #475569;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.remember-checkbox-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary-green);
  cursor: pointer;
  border-radius: 4px;
}

.forgot-password-link {
  color: var(--primary-green);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.forgot-password-link:hover {
  color: var(--primary-green-dark);
  text-decoration: underline;
}

/* Submit Button */
.btn-auth-submit {
  width: 100%;
  height: 48px;
  background-color: var(--primary-green);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(25, 135, 84, 0.35);
  transition: all 0.25s ease;
}

.btn-auth-submit svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.btn-auth-submit:hover {
  background-color: var(--primary-green-hover);
  box-shadow: 0 6px 18px rgba(25, 135, 84, 0.45);
  transform: translateY(-1px);
}

.btn-auth-submit:hover svg {
  transform: translateX(2px);
}

.btn-auth-submit:active {
  transform: translateY(0);
}

.btn-auth-submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.spinner-auth {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

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

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0 1.25rem;
  color: #94a3b8;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: #e2e8f0;
}

.auth-divider span {
  padding: 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

/* Secure Login Badge */
.secure-login-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: #5d756e;
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

.secure-login-indicator svg {
  width: 15px;
  height: 15px;
  fill: var(--primary-green);
}

/* Card Bottom Copyright */
.auth-page-copyright {
  margin-top: 1.5rem;
  text-align: center;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 450;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shakeError {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-8px);
  }

  40%,
  80% {
    transform: translateX(8px);
  }
}

.shake-animation {
  animation: shakeError 0.4s ease-in-out;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1200px) {
  .login-content-container {
    padding: 2rem;
  }

  .hero-title {
    font-size: 2.3rem;
  }

  .feature-badges-row {
    gap: 1rem;
  }

  .feature-badge-item {
    width: 85px;
  }
}

@media (max-width: 991px) {
  .login-page-wrapper {
    background-position: center;
    background-attachment: scroll;
  }

  .login-content-container {
    flex-direction: column;
    padding: 2rem 1.5rem;
  }

  .login-hero-section {
    padding: 1rem 0 2.5rem 0;
    align-items: center;
    text-align: center;
  }

  .hero-header {
    margin-bottom: 1.5rem;
  }

  .hero-body {
    max-width: 100%;
  }

  .hero-description {
    margin: 0 auto 1.5rem auto;
  }

  .feature-badges-row {
    justify-content: center;
    margin-bottom: 2rem;
  }

  .hero-footer-note {
    display: none;
    /* Hide in mobile view so it doesn't overlap */
  }

  .login-form-section {
    width: 100%;
  }

  .login-auth-card {
    max-width: 480px;
  }
}

@media (max-width: 576px) {
  .login-content-container {
    padding: 1.25rem 1rem;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .hero-description {
    font-size: 0.92rem;
  }

  .login-auth-card {
    padding: 2rem 1.5rem;
    border-radius: 18px;
  }

  .feature-badges-row {
    gap: 0.75rem;
  }

  .feature-badge-item {
    width: 76px;
  }

  .feature-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  .feature-label {
    font-size: 0.72rem;
  }
}