html {
  background: #0f172a;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
}

body {
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1a3575 60%, #193f94 100%);
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 60px;
}

/* Card */
.login-card {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* Logo header */
.login-header {
  background: #193f94;
  padding: 2rem 2rem 1.75rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.login-header img {
  width: 55%;
  max-width: 180px;
}

/* Form body */
.login-body {
  padding: 2rem 2.5rem 2.5rem;
}

/* Input groups */
.input-group {
  margin-bottom: 1.25rem;
}

.input-group label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.input-group input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-family: 'Poppins', sans-serif;
  color: #1e293b;
  background: #f8fafc;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-group input:focus {
  border-color: #193f94;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(25, 63, 148, 0.12);
}

/* Submit button */
.btn-login {
  display: block;
  width: 100%;
  padding: 0.875rem;
  background: #193f94;
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  margin-top: 1.75rem;
  letter-spacing: 0.02em;
}

.btn-login:hover {
  background: #1e4db7;
  box-shadow: 0 4px 12px rgba(25, 63, 148, 0.35);
}

.btn-login:active {
  transform: scale(0.98);
}

/* Bottom links */
.login-links {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #94a3b8;
  line-height: 1.8;
}

.login-links a {
  color: #193f94;
  font-weight: 500;
}

.login-links a:hover {
  color: #1e4db7;
  text-decoration: underline;
}

/* Wider card for register */
.login-card--wide {
  max-width: 460px;
}

/* Inline status messages */
.msg-error {
  font-size: 0.8125rem;
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.msg-success {
  font-size: 0.8125rem;
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

/* Legacy error classes */
div.error, div.estat-error {
  font-size: 0.8125rem;
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 0 2.5rem 1rem;
  text-align: center;
}

/* Footer */
.footer {
  display: flex;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: #0f172a;
  color: white;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer p {
  margin: 0;
}

.legal-text {
  color: #94a3b8;
  text-decoration: none;
}

.legal-text:hover {
  color: #ffffff;
}

/* Notification banner inside card */
.msg-error, .msg-success {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.msg-error {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fca5a5;
}

.msg-error::before {
  content: '✕';
  font-size: 0.75rem;
  font-weight: 700;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.msg-success {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.msg-success::before {
  content: '✓';
  font-size: 0.75rem;
  font-weight: 700;
  background: #22c55e;
  color: white;
  border-radius: 50%;
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.input-group--checkbox {
    margin: 8px 0;
}
/* Override .input-group label (display:block + uppercase) for checkbox rows */
.input-group--checkbox label.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 400;
    color: #94a3b8;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    line-height: 1.4;
    margin-bottom: 0;
}
.input-group--checkbox label.checkbox-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #193f94;
    cursor: pointer;
}
.input-group--checkbox label.checkbox-label a {
    color: #93c5fd;
    text-decoration: underline;
}

/* ── Register form: compact layout so the whole card fits without
   scrolling above the fixed footer on common laptop sizes
   (1366x768 and 1280x720). Scoped to .login-card--wide which only the
   registration page uses, so the login page is unaffected. ── */
.login-card--wide .login-header { padding: 0.6rem 2rem 0.55rem; }
.login-card--wide .login-header img { width: 36%; max-width: 120px; }
.login-card--wide .login-body { padding: 0.75rem 2rem 0.8rem; }
.login-card--wide .input-group { margin-bottom: 0.42rem; }
.login-card--wide .input-group label { margin-bottom: 0.15rem; font-size: 0.64rem; }
.login-card--wide .input-group input { padding: 0.48rem 0.85rem; font-size: 0.9rem; }
.login-card--wide .input-group--checkbox { margin-bottom: 0.3rem; }
.login-card--wide .btn-login { margin-top: 0.6rem; padding: 0.65rem; }
.login-card--wide .login-links { margin-top: 0.45rem; line-height: 1.45; }
.login-card--wide #pw-meter { margin-top: 4px !important; }
.login-card--wide #pw-meter-rules { line-height: 1.32 !important; margin-top: 3px !important; }
.login-card--wide #pw-meter-label { margin-top: 2px !important; }


/* ── Footer: stack on phones / small tablets so the version, legal
   links and language switcher do not collide ────────────────────── */
@media (max-width: 768px) {
  .footer {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 0.5rem 0.9rem;
    font-size: 0.68rem;
    line-height: 1.4;
    text-align: center;
  }
  .footer > p { margin: 0; }
}
