/* ===== Root Colors ===== */
:root {
  --navy:#002366;   /* match sidebar */
  --red:#d52b1e;    /* match sidebar */
  --white:#fff;
  --muted:#f6f7fb;
  --border:#e6e8ef;
  --text:#2a2a2a;
  --success:#28a745;
}

/* ===== Global ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', 'Segoe UI', Tahoma, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--navy);
  position: relative;
  overflow: hidden;
}

/* Red wave */
body::before {
  content: "";
  position: absolute;
  bottom: -10%;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(135deg, var(--red), #a31616);
  clip-path: ellipse(130% 50% at 50% 100%);
  z-index: 0;
}

/* ===== Login Box ===== */
.login-container {
  position: relative;
  z-index: 10;
  background: var(--white);
  padding: 30px 25px;
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  text-align: center;
}

.login-container h1 {
  margin-bottom: 20px;
  color: var(--navy);
  font-size: 1.8rem;
  font-weight: 700;
}

/* ===== Logo ===== */
.logo-box {
  background: var(--muted);
  border: 2px solid var(--red);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  margin-bottom: 15px;
}
.logo-box img {
  max-width: 200px;
  height: auto;
}

/* ===== Form ===== */
form {
  display: flex;
  flex-direction: column;
  text-align: left;
}
form label {
  font-weight: 500;
  margin: 8px 0 5px;
  color: var(--text);
}
form input {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 1rem;
}
form input:focus {
  border-color: var(--navy);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,35,102,0.2);
}

/* ===== Button ===== */
form button {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.15s ease;
}
form button:hover {
  background: #a31616;
  transform: translateY(-1px);
}

/* Extra button variants */
.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background:#001a4d; }

.btn-light {
  background: var(--muted);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-light:hover { background: #eef1f6; }

/* ===== Alerts ===== */
.alert {
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 6px;
  font-size: 0.95rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-error {
  background: #fdecea;
  color: #7a1f1f;
  border-left: 5px solid var(--red);
}
.alert-success {
  background: #e6f4ea;
  color: #1e4620;
  border-left: 5px solid var(--success);
}

/* ===== Reset Password ===== */
.reset-link {
  margin-top: 12px;
  text-align: center;
}
.reset-link a {
  color: var(--navy);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.reset-link a:hover { color: var(--red); }

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .login-container { padding: 20px 15px; }
  .login-container h1 { font-size: 1.5rem; }
}
