* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* Page transition animations */
body {
  animation: fadeIn 0.5s ease-in-out;
}

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

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

body.page-exit {
  animation: fadeOut 0.4s ease-in-out forwards;
}

body {
  background: linear-gradient(180deg, var(--bg-from) 0%, var(--bg-to) 60%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 28px 0;
}

/* Container */

.container {
  width: 100%;
  max-width: 400px;
}

/* Card */

.card {
  background: var(--bg-card);
  padding: 28px;
  border-radius: 18px;
  text-align: center;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border-subtle);
  color: var(--text-body);
}

/* Image */

.image img {
  width: 120px;
  margin-bottom: 10px;
}

/* Title */

h2 {
  margin-bottom: 5px;
}

p {
  color: gray;
  font-size: 14px;
  margin-bottom: 20px;
}

/* Input */

.input-box {
  position: relative;
  margin-bottom: 15px;
}

.input-box input {
  width: 100%;
  padding: 12px 40px;
  border-radius: 10px;
  border: 1px solid var(--border-input);
  outline: none;
  background: var(--bg-input);
  color: var(--text-body);
}

.input-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: gray;
}

/* Toggle password */

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: gray;
}

/* Forgot */

.forgot {
  text-align: right;
  font-size: 12px;
  margin-bottom: 15px;
}

.forgot a {
  color: #3b82f6;
  text-decoration: none;
}

/* Button */

.btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
  color: white;
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 15px;
}

@media (max-width: 420px) {
  .card {
    padding: 18px;
  }
  .image img {
    width: 100px;
  }
}

.btn:hover {
  opacity: 0.9;
}

/* Help */

.help {
  font-size: 13px;
}

.help a {
  color: #3b82f6;
  text-decoration: none;
}

/* Divider */

.divider {
  margin: 15px 0;
  font-size: 12px;
  color: gray;
}

/* Social */

.social {
  display: flex;
  gap: 10px;
}

.social button {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
}

.google {
  background: #f1f1f1;
}

.facebook {
  background: #3b82f6;
  color: white;
}

/* ============================================================
   DARK MODE OVERRIDES (html.dark-mode)
   ============================================================ */
html.dark-mode body {
  background: linear-gradient(180deg, var(--bg-from) 0%, var(--bg-to) 60%);
}
html.dark-mode .card {
  background: var(--bg-card);
  box-shadow: var(--shadow-modal);
  border-color: var(--border-subtle);
  color: var(--text-body);
}
html.dark-mode .input-box input {
  background: var(--bg-input);
  border-color: var(--border-accent);
  color: var(--text-body);
}

/* Button transition for micro-interaction */
.btn {
  transition: opacity 0.2s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
