:root {
  --brand-navy: #1e497c;
  --brand-navy-dark: #163a63;
  --brand-navy-mid: #2a5a93;
  --brand-ivory: #f2e9ea;
  --brand-ivory-soft: #e5dadd;
  --brand-shadow: rgba(0, 0, 0, 0.2);
}

html,
body {
  /* min-height: 100%; */
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  font-family: "Arial", sans-serif;
}

body {
  background: radial-gradient(circle at 20% 20%, rgba(42, 90, 147, 0.25), transparent 35%),
    linear-gradient(135deg, var(--brand-navy), var(--brand-navy-dark));
  font-family: 'Roboto', sans-serif;
  height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6,
button {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
}

.header {
  position: relative;
  text-align: center;
  padding: 10px 15px;
  color: var(--brand-ivory);
}

.logo img {
  max-height: 100px;
}

@media (max-width: 389px) {
  .logo img {
    height: 75px;
  }
}

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

h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--brand-ivory);
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.login-box {
  background: rgba(42, 90, 147, 0.8);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 18px 35px var(--brand-shadow);
  width: 100%;
  max-width: 400px;
  margin: 50px 10px 100px 10px;
  color: var(--brand-ivory);
}

.input-group {
  margin-bottom: 20px;
}

.error-message {
  color: var(--brand-ivory);
  font-size: 0.85rem;
  margin-top: 4px;
  display: block;
  min-height: 1em;
}

label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  color: var(--brand-ivory);
}

input {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid var(--brand-ivory-soft);
  margin-top: 5px;
  background: var(--brand-ivory);
  color: var(--brand-navy);
}

input:focus {
  border-color: var(--brand-ivory-soft);
  outline: none;
}

button {
  width: 100%;
  padding: 14px;
  background-color: var(--brand-ivory);
  color: var(--brand-navy);
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 20px;
  box-shadow: 0px 10px 24px rgba(0, 0, 0, 0.2);
}

button:hover {
  background-color: #e6dce0;
}

.signup-link {
  text-align: center;
  margin-top: 20px;
}

.signup-link a {
  color: var(--brand-ivory);
  text-decoration: underline;
}

.signup-link a:hover {
  text-decoration: underline;
}

.forgot-password-link {
  text-align: center;
}

.forgot-password-link a {
  color: var(--brand-ivory);
  font-size: 0.9rem;
  text-decoration: underline;
}

.forgot-password-link a:hover {
  text-decoration: underline;
}

.footer {
  margin-top: auto;
  background-color: #333;
  color: white;
  padding: 20px;
  text-align: center;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.powered {
    font-size: 0.75rem !important;
    letter-spacing: 0.2rem;
}

.footer-content p {
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: white;
}

.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.footer-links a {
  text-decoration: none;
  color: white;
  font-size: 0.9rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.social-icons img {
  width: 24px;
  height: 24px;
  transition: transform 0.2s;
}

.social-icons img:hover {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .footer {
    padding: 20px 0;
  }

  .footer-links {
    flex-direction: column;
    gap: 10px;
    padding: 5px 0;
  }

  .footer-links a {
    font-size: 1.1rem;
    margin-bottom: 10px;
    text-decoration: underline;
  }

  .footer p {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .social-icons img {
    width: 42px;
    height: 42px;
    margin: 0 35px;
  }

  .footer span {
    display: none;
  }
}

/* ───────── GLOBAL LOADING OVERLAY ───────── */
#loadingOverlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 58, 99, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

#loadingOverlay.active {
  opacity: 1;
  visibility: visible;
}

#loadingOverlay .spinner {
  width: 48px;
  height: 48px;
  border: 6px solid rgba(242, 233, 234, 0.35);
  border-top-color: var(--brand-ivory);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

#loadingOverlay p {
  margin-top: 16px;
  color: var(--brand-ivory);
  font-size: 1rem;
  text-align: center;
  max-width: 260px;
  line-height: 1.4;
}
