/* ==========================
   PROFESSIONAL LOGIN PAGE CSS - PREMIUM + STICKY FOOTER
============================= */

/* ==========================
   Sticky Footer Safety Fix
============================= */
html, body {
  height: 100%;
  min-height: 100vh; /* Ensure full viewport height */
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  font-family: 'Roboto', sans-serif;
}

body {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f4f3e9;
  color: #6b8e23;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode {
  background: #2e3d2e;
  color: #d4c77f;
}

/* Header/Footer */
header, footer {
  background: rgba(245, 243, 233, 0.95);
  color: #6b8e23;
  padding: 15px 30px;
  transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode header, body.dark-mode footer {
  background: rgba(46, 61, 46, 0.95);
  color: #d4c77f;
}

footer {
  flex-shrink: 0; /* Footer always at bottom */
}

/* ==========================
   Full-screen Animated Gradient
============================= */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(60deg, #DAA520, #BFA76A, #8B8000, #A9A841, #C0A14B);
  background-size: 800% 800%;
  filter: blur(180px);
  animation: premiumGradient 60s ease infinite;
  z-index: -1;
  opacity: 0.35;
}

@keyframes premiumGradient {
  0% { background-position: 0% 50%; }
  25% { background-position: 50% 100%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 0%; }
  100% { background-position: 0% 50%; }
}

/* ==========================
   Login Section - Vertically Centered
============================= */
.login-section {
  flex: 1 0 auto; /* grow to fill remaining space */
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertical center */
  align-items: center;
  padding: 50px 20px;
  text-align: center;
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 80px);
}

/* Reset default margins to remove small gaps */
.login-section p,
.login-section h2,
.login-section .sub-title,
.login-section .note {
  margin: 0;
}

.login-section h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.login-section .sub-title {
  font-size: 1rem;
  margin-bottom: 40px;
}

.login-section .note {
  margin-top: 30px;
  max-width: 600px;
  text-align: center;
  background: rgba(255,248,220,0.1);
  border-left: 5px solid #DAA520;
  padding: 15px 20px;
  border-radius: 15px;
  color: #BFA76A;
  backdrop-filter: blur(8px);
}

body.dark-mode .login-section .note {
  background: rgba(50,50,30,0.1);
  color: #d4c77f;
  border-color: #d4c77f;
}

/* ==========================
   Login Type Selector
============================= */
.login-type-selector {
  margin-bottom: 30px;
  text-align: center;
}

.login-type-selector button {
  margin: 0 10px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: #6b8e23;
  color: #fff;
  font-weight: 500;
  transition: background 0.3s ease, transform 0.2s ease;
}

.login-type-selector button:hover {
  background: #556b2f;
  transform: scale(1.05);
}

.login-type-selector button.active {
  background: #4b6b1f;
}

/* ==========================
   Cards Container
============================= */
.card-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.login-card {
  display: none;
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  width: 300px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease, opacity 0.5s ease;
  position: relative;
  animation: floatGlow 8s ease-in-out infinite;
}

.login-card.active {
  display: block;
}

.login-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* Card Colors */
.special-emp {
  background: rgba(255,248,220,0.9);
  border-top: 6px solid #DAA520;
}

.special-sup {
  background: rgba(255,248,220,0.9);
  border-top: 6px solid #BFA76A;
}

.special-mng {
  background: rgba(255,248,220,0.9);
  border-top: 6px solid #8B8000;
}

body.dark-mode .special-emp,
body.dark-mode .special-sup,
body.dark-mode .special-mng {
  background: rgba(50,50,30,0.85);
}

/* ==========================
   Floating Glow Animation
============================= */
@keyframes floatGlow {
  0% { transform: translateY(0px); box-shadow: 0 10px 30px rgba(255,215,0,0.15); }
  50% { transform: translateY(-8px); box-shadow: 0 20px 50px rgba(255,215,0,0.25); }
  100% { transform: translateY(0px); box-shadow: 0 10px 30px rgba(255,215,0,0.15); }
}

/* ==========================
   Inputs
============================= */
.input-group {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.95);
  padding: 12px 15px;
  border-radius: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .input-group {
  background: rgba(70,70,50,0.85);
  border-color: #666;
}

.input-group:hover {
  border-color: #6b8e23;
  box-shadow: 0 0 10px rgba(107,142,35,0.25);
}

.input-group .icon {
  margin-right: 10px;
  font-size: 18px;
  opacity: 0.7;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

/* ==========================
   Interactive Input Icon Glow
============================= */
.input-group input:focus + .icon,
.input-group.focused .icon {
  animation: iconGlow 2s ease-in-out infinite alternate;
}

@keyframes iconGlow {
  0% { transform: scale(1.2); text-shadow: 0 0 8px rgba(255,215,0,0.5); }
  100% { transform: scale(1.3); text-shadow: 0 0 16px rgba(255,215,0,0.7), 0 0 24px rgba(255,215,0,0.5); }
}

.input-group input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: inherit;
}

/* ==========================
   Buttons
============================= */
.login-card form button {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  background: linear-gradient(135deg, #6b8e23, #556b2f);
  color: #fff;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.login-card form button:hover {
  transform: translateY(-3px) scale(1.03);
  background: linear-gradient(135deg, #556b2f, #4b6b1f);
  box-shadow: 0 5px 15px rgba(107,142,35,0.3);
}

/* ==========================
   Forgot Password
============================= */
.forgot-password {
  text-align: right;
  margin-top: 10px;
  font-size: 13px;
}

.forgot-password a {
  text-decoration: none;
  color: #6b8e23;
  transition: color 0.3s ease;
}

.forgot-password a:hover {
  color: #556b2f;
}

/* ==========================
   Responsive
============================= */
@media (max-width: 768px) {
  .card-container {
    flex-direction: column;
    align-items: center;
  }

  .login-card {
    width: 90%;
    max-width: 350px;
  }
}
