* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;

  background:
    linear-gradient(rgba(30, 144, 255, 0.45), rgba(0, 0, 0, 0.35)),
    url("../img/login_Cover.jpg");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  min-height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 15px;
}

/* ================= LOGIN BOX ================= */

.login-box {
  width: 100%;
  max-width: 420px;

  padding: 35px;

  border-radius: 25px;

  background: rgba(241, 250, 238, 0.96);

  backdrop-filter: blur(12px);

  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);

  transition: 0.4s;
}

.login-box:hover {
  transform: scale(1.03);
}

.login-box h2 {
  margin-bottom: 25px;
}

.field {
  display: flex;

  align-items: center;

  gap: 10px;

  border-radius: 22px;

  padding: 10px 14px;

  background: #e8f2f3;

  box-shadow: inset 2px 4px 8px rgba(0, 0, 0, 0.08);

  margin-bottom: 12px;
}

.field:hover {
  border-color: #457b9d;
}

.field:focus-within {
  border-color: #457b9d;

  box-shadow: 0 0 0 4px rgba(69, 123, 157, 0.15);
}

.input-icon {
  width: 18px;

  height: 18px;

  fill: #457b9d;

  flex-shrink: 0;
}

#heading {
  text-align: center;

  margin: 15px 0 5px 0;

  color: #1d3557;

  font-size: 24px;

  font-weight: 700;
}

.subtitle-login {
  color: #457b9d;

  text-align: center;
}

/* ================= INPUTS ================= */

label {
  display: block;
  text-align: left;
  margin-top: 15px;
  font-size: 14px;
}

.input-field {
  background: none;

  border: none;

  outline: none;

  width: 100%;

  height: 16px;

  color: #1d3557;

  font-size: 16px;
}

.input-field::placeholder {
  color: #457b9d;
}

/* ================= BUTTON ================= */

.login-btn {
  width: 100%;

  height: 55px;

  border: none;

  border-radius: 10px;

  background: #457b9d;

  color: white;

  font-weight: 700;

  font-size: 16px;

  cursor: pointer;

  transition: 0.3s;
}

.login-btn:hover {
  background: #a8dadc;

  color: #1d3557;
}

.create-btn {
  flex: 1;

  background: #457b9d;
}

.create-btn:hover {
  background: #457b9d;

  color: white;
}

.forgot-btn {
  width: 100%;

  background: #457b9d;

  border: none;

  height: 50px;

  border-radius: 10px;

  color: white;
}

.forgot-btn:hover {
  color: #1d3557;

  text-decoration: underline;
}

/* ================= CREATE ACCOUNT ================= */

.create-account {
  margin-top: 15px;
  font-size: 14px;
  color: #1e90ff;
  cursor: pointer;
}

.create-account:hover {
  text-decoration: underline;
}

/* ================= FIX FOR MOBILE FRIENDLY ================= */

input,
select {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 16px;
  /* prevents zoom on mobile */
}

.row {
  display: flex;
  gap: 10px;
}

@media (max-width: 600px) {
  .row {
    flex-direction: column;
  }
}

/* ================= SHOW PASSWORD ================= */

.show-password-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 15px;
  font-size: 14px;
  justify-content: flex-start;
}

.show-password-wrapper input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

.show-password-wrapper label {
  margin: 0;
  cursor: pointer;
}

/* ================= LOGO ================= */

.dole-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  display: block;
  margin: 0 auto 15px auto;
}

.login-box h2 {
  color: #0b4ea2;
  font-size: 24px;
  margin-bottom: 25px;
}

/* ================= ACCOUNT LINKS ================= */

.account-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 18px;
}

.link-btn {
  background: none;
  border: none;
  color: #007bff;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  width: auto;
  min-width: 140px;
  text-align: center;
  margin: 0;
}

.link-btn:hover {
  text-decoration: underline;
  background: none;
}

/* ================= LOGIN LOADER ================= */

#loadingOverlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.loading-content p {
  font-size: 18px;
  font-weight: 600;
  color: #1D3557;
  margin: 0;
}

/* Spinner */

.loader-container {
  width: 70px;
  transform-origin: center;
  animation: rotateLoader 2s linear infinite;
}

.loader-circle {
  fill: none;
  stroke: #106ee8;
  stroke-width: 6;
  stroke-dasharray: 2, 200;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  animation: dashLoader 1.5s ease-in-out infinite;
}

/* ================= LOGIN ERROR MODAL ================= */

.error-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100000;
}

.error-card {
  width: 90%;
  max-width: 360px;
  background: #fff;
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, .25);
}

.error-icon {
  width: 70px;
  height: 70px;
  margin: auto;
  border-radius: 50%;
  background: #E63946;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 34px;
  font-weight: bold;
  margin-bottom: 18px;
}

.error-card h2 {
  color: #1D3557;
  margin: 0 0 12px;
}

.error-card p {
  color: #555;
  line-height: 1.5;
  margin-bottom: 25px;
}

.error-ok-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: #457B9D;
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: .25s;
}

.error-ok-btn:hover {
  background: #1D3557;
}

@keyframes rotateLoader {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dashLoader {
  0% {
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 90, 200;
    stroke-dashoffset: -35px;
  }

  100% {
    stroke-dashoffset: -125px;
  }
}

/* ================= EXTRA SMALL DEVICES ================= */

@media (max-width: 400px) {
  .login-box {
    padding: 20px;
  }

  .login-box h2 {
    font-size: 20px;
  }

  button {
    font-size: 14px;
  }
}