/*
  This file relies on the CSS variables defined in app.css (:root and
  body.dark-mode). login.php links app.css BEFORE this file so the
  variables are already available, and the login page reacts to the
  same dark/light toggle as the rest of the site.
*/

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #00458F 0%, #0057B8 100%);
  padding: 16px;
}

body.dark-mode {
  background: linear-gradient(135deg, #06264F 0%, #00458F 100%);
}

.login-card {
  background: var(--surface);
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  padding: 32px 28px;
}

.login-card .logo-wrap {
  text-align: center;
  margin-bottom: 12px;
}

.login-card .logo-wrap img {
  max-width: 120px;
  height: auto;
}

.login-card h1 {
  text-align: center;
  font-size: 1.3rem;
  margin: 0 0 4px;
  color: var(--text);
}

.login-card p.subtitle {
  text-align: center;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
  background: var(--surface);
  color: var(--text);
}

.form-group input:focus {
  border-color: var(--primary);
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.remember-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

.remember-row label {
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

.btn-login {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-login:hover {
  background: var(--primary-hover);
}

.alert {
  background: rgba(239, 68, 68, 0.1);
  color: var(--status-error);
  border: 1px solid var(--status-error);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 18px;
  text-align: center;
}

.footer-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 20px;
}

/* --- Responsive tweaks --- */
@media (max-width: 480px) {
  .login-card {
    padding: 24px 18px;
    border-radius: 8px;
  }

  .login-card h1 {
    font-size: 1.1rem;
  }
}

@media (min-width: 1200px) {
  .login-card {
    max-width: 420px;
  }
}
