/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fb; /* admin background */
  position: relative;
}

/* BODY BACKGROUND IMAGE — ONLY LOGIN PAGE */
body.login-page {
  min-height: 100vh;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("../images/login-bg.jpg") no-repeat center center;
  background-size: cover;
  position: relative;
}

/* DARK OVERLAY — ONLY LOGIN PAGE */
body.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0;
  pointer-events: none; /* IMPORTANT: overlay will never block clicks */
}

/* CENTER CONTENT ABOVE OVERLAY */
.login-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

/* LOGIN CARD */
.login-card {
  background: #f3f4f6; /* light grey for yellow logo */
  border-radius: 22px;
  padding: 28px 30px 30px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* LOGO */
.login-logo {
  text-align: center;
  margin-bottom: 0px;
}

.login-logo img {
  max-height: 150px;
}

/* TITLE */
.login-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.login-subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 22px;
}

/* FORM */
.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: #4b5563;
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: #9ca3af;
}

/* ✅ CHANGED: email -> text */
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 10px 11px 10px 34px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 0.9rem;
  outline: none;
}

input:focus {
  border-color: #facc15;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.3);
  background: #ffffff;
}

/* FORGOT LINK */
.forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.forgot-row a {
  font-size: 0.8rem;
  color: #6b7280;
  text-decoration: none;
}

.forgot-row a:hover {
  text-decoration: underline;
}

/* BUTTON */
.btn-login {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 11px 0;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  color: #111827;
  background-image: linear-gradient(135deg, #fde047, #facc15, #fb923c);
  box-shadow: 0 10px 25px rgba(234, 179, 8, 0.6);
  transition: 0.2s ease;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(234, 179, 8, 0.7);
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: default;
  box-shadow: none;
}

/* ✅ ERROR (PHP prints this) */
.error-message {
  margin-top: 12px;
  text-align: center;
  font-size: 0.85rem;
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.08);
  border: 1px solid rgba(185, 28, 28, 0.22);
  padding: 10px 12px;
  border-radius: 12px;
}

/* FOOTER TEXT */
.bottom-text {
  text-align: center;
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 18px;
  
  /* ADMIN FIX */
body::before {
  display: none !important;
}
}


/* Remove login background from portal pages */
body:not(.login-page) {
  background: #f4f6f8 !important;
}