/* login.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: Arial, sans-serif;
  /* Donker boven → lichter beneden (nette blauwe tinten) */
  background: linear-gradient(180deg, #1e3a8a 0%, #60a5fa 100%);
}

.container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
}

/* ── Card styling ── */
.card {
  width: 100%;
  max-width: 400px;
  /* Licht boven → donker beneden (nettere blending) */
  background: linear-gradient(180deg, #3b82f6 0%, #1e40af 100%);
  color: #e6ecf5; /* lichte tekst voor leesbaarheid op donkere kaart */
  padding: 40px 20px 20px;
  border-radius: 8px;
  border: none;
  box-shadow: 0 12px 28px rgba(13, 30, 58, 0.25);
  position: relative;

  /* vaste hoogte op desktop */
  display: flex;
  flex-direction: column;
  min-height: 450px;
}

/* inputs: altijd donkere tekst op witte achtergrond binnen blauwe kaart */
#login-form input,
#forgot-form input {
  background: #ffffff;
  color: #0d1b2a;
}
#login-form input:focus,
#forgot-form input:focus{
  outline: none;
  border-color: #123a7b;
  box-shadow: 0 0 0 3px rgba(18, 58, 123, 0.15);
}

/* linkkleuren binnen kaart */
#login-form #reset-link-container a {
  color: #fff; /* wit voor contrast op de kaart */
}
#login-form #reset-link-container a:hover {
  color: #fff; /* behoud wit, alleen style wijzigen voor hover */
  text-decoration: underline;
}

/* back-button in kaart */
.back-button {
  color: #123a7b;
}
.back-button:hover {
  color: #0f2f64;
}

/* Altijd verberg elementen met hidden */
[hidden] {
  display: none !important;
}

/* ── Logo ── */
.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.logo-container img {
  max-width: 150px;
  max-height: 80px;
  width: auto;
  height: auto;
}

/* ── LOGIN FORM ── */
#login-form {
  display: flex;
  flex-direction: column;
  flex: 1;
}

#login-form h2 {
  margin-bottom: 20px;
  text-align: center;
}

#login-form input {
  width: 100%;
  padding: 15px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

#login-form button[type="submit"] {
  width: 100%;
  padding: 15px;
  background: #123a7b;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}
#login-form button[type="submit"]:hover {
  background: #0f2f64;
}

/* disabled knop styling */
#forgot-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  background: #123a7b; /* behoud de kleur, maar iets transparanter */
}
#forgot-submit:disabled:hover {
  background: #123a7b; /* voorkomt dat hover de kleur verandert */
}


/* ── RESET LINK POSITION ── */
#login-form #reset-link-container {
  margin-top: auto;
  margin-bottom: 30px;
  text-align: center;
}
#login-form #reset-link-container a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
}
#login-form #reset-link-container a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ── FORGOT FORM ── */
#forgot-form {
  display: flex;
  flex-direction: column;
  flex: 1;
}

#forgot-form h2 {
  margin-bottom: 20px;
  text-align: center;
}

#forgot-form input {
  width: 100%;
  padding: 15px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

#forgot-form button:not(.back-button) {
  width: 100%;
  padding: 15px;
  background: #123a7b;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}
#forgot-form button:not(.back-button):hover {
  background: #0f2f64;
}

/* ── BACK BUTTON ── */
.back-button {
  position: absolute;
  top: 16px;
  left: 16px;
  background: none;
  border: none;
  padding: 0;
  font-size: 2rem;
  color: #123a7b;
  cursor: pointer;
  line-height: 1;
}
.back-button:hover {
  color: #0f2f64;
}
.back-button:focus {
  outline: none;
}

/* ── MESSAGES ── */
.error {
  color: red;
  margin-top: 10px;
  text-align: center;
}
.success {
  color: green;
  margin-top: 10px;
  text-align: center;
}
/* ── Responsive tweaks ── */
@media (max-width: 600px) {
  .card {
    padding: 30px 15px 15px;
    min-height: 350px;   /* minder hoog op mobiel */
  }

  /* grotere tappable input en buttons */
  #login-form input,
  #login-form button[type="submit"],
  #forgot-form input,
  #forgot-form button:not(.back-button) {
    padding: 12px;
  }

  /* extra grote back-arrow op mobiel */
  .back-button {
    font-size: 2.4rem;
  }

  /* Reset-link helemaal naar beneden duwen */
  #login-form #reset-link-container {
    margin-top: auto;      /* vult de resterende ruimte */
    margin-bottom: 8px;    /* kleine marge tot de onderkant */
    text-align: center;    /* voor de zekerheid */
  }
}
