/* =========================
   LOGIN VARIABLES
========================= */
:root {
  --login-primary: #0b2a5b;
  --login-card: #ffffff;
  --login-text: #222;
}

.login-page.dark {
  --login-primary: #38bdf8;
  --login-card: #020617;
  --login-text: #e5e7eb;
}

/* =========================
   LOGIN PAGE LAYOUT
========================= */
.login-page {
  min-height: 100vh;
  background: linear-gradient(
      rgba(0,0,0,0.55),
      rgba(0,0,0,0.55)
    ),
    url("../images/login-bg.jpg") center/cover no-repeat;
  color: var(--login-text);
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* =========================
   LOGIN BOX
========================= */
.login-box {
  width: 360px;
  padding: 30px;
  background: var(--login-card);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  text-align: center;
  position: relative;
  animation: fadeIn 1s ease-out;
  transition: background 0.3s ease, color 0.3s ease;
}

.login-box h2 {
  margin-bottom: 5px;
  color: var(--login-primary);
}

.login-box h4 {
  margin-bottom: 20px;
  font-weight: normal;
  color: var(--login-text);
}

/* =========================
   INPUTS & BUTTON
========================= */
.login-box input {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.login-box button {
  width: 100%;
  padding: 12px;
  margin-top: 18px;
  background: var(--login-primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  cursor: pointer;
}

.login-box button:hover {
  background: #143c7d;
}

/* =========================
   LINKS & ERRORS
========================= */
.login-error {
  color: #dc3545;
  margin-bottom: 10px;
  font-size: 14px;
}

.login-links {
  margin-top: 15px;
}

.login-links a {
  color: var(--login-primary);
  font-size: 14px;
}

.login-links a:hover {
  text-decoration: underline;
}

/* =========================
   DARK MODE TOGGLE
========================= */
.dark-toggle {
  all: unset;                  /* remove ALL inherited styles */
  position: fixed;

  top: 16px;
  right: 16px;
  left: auto;
  bottom: auto;

  margin: 0;
  padding: 0;

  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--login-text);

  z-index: 9999;
}

.dark-toggle:hover {
  opacity: 0.8;
}

/* =========================
   ANIMATION
========================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 480px) {
  .login-box {
    width: 92%;
    padding: 22px;
  }
}
