/* Shared login design for all VAPL portals (admin, master, back-office, technician). */

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #f3f7fd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2937;
}

.login-page {
  width: 100%;
  padding: 24px;
}

.login-shell {
  max-width: 980px;
  min-height: 560px;
  margin: auto;
  display: grid;
  grid-template-columns: 42% 58%;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 0% 100%, rgba(201, 229, 255, 0.95), transparent 34%),
    linear-gradient(135deg, #f8fbff 0%, #eef7ff 52%, #f8fbff 100%);
  border: 1px solid #dbe7f5;
  box-shadow: 0 16px 45px rgba(30, 64, 120, 0.12);
}

.login-shell::before {
  content: "";
  position: absolute;
  left: -120px;
  bottom: -130px;
  width: 560px;
  height: 300px;
  border-radius: 50%;
  background: rgba(214, 235, 255, 0.72);
  z-index: 0;
}

.brand-panel,
.form-panel {
  position: relative;
  z-index: 1;
}

.brand-panel {
  padding: 92px 70px 60px;
}

.logo-img {
  height: 72px;
  width: auto;
  display: block;
  margin-bottom: 10px;
}

.portal-title {
  font-size: 20px;
  font-weight: 700;
  color: #2f81f7;
  margin-bottom: 72px;
}

.welcome-title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 6px;
}

.welcome-text {
  font-size: 14px;
  color: #8190a5;
  margin-bottom: 36px;
}

.machine-img {
  width: 280px;
  max-width: 100%;
  margin-top: 10px;
  opacity: 0.96;
  filter: drop-shadow(0 16px 24px rgba(40, 80, 130, 0.18));
}

.form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 60px;
}

.login-card {
  width: 100%;
  max-width: 430px;
  padding: 42px 40px 36px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(220, 231, 244, 0.95);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(35, 65, 110, 0.14);
}

.login-card h1 {
  font-size: 26px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 28px;
}

/* Optional descriptive line under the heading (used by forgot/reset states). */
.card-sub {
  margin: -20px 0 26px;
  font-size: 14px;
  color: #6b7a90;
}

/* Big status glyph for the success / error / sent states. */
.state-icon {
  font-size: 2.6rem;
  line-height: 1;
  color: #2f81f7;
}

.state-icon.success {
  color: #16a34a;
}

.state-icon.warning {
  color: #d97706;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: #34435a;
  margin-bottom: 8px;
}

.input-group {
  height: 48px;
  border: 1px solid #d8e3ef;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.input-group-text {
  width: 48px;
  justify-content: center;
  background: #fff;
  border: 0;
  border-right: 1px solid #e0e8f2;
  color: #71839b;
}

.form-control {
  height: 100%;
  border: 0;
  background: #fff;
  color: #1f2937;
  font-size: 14px;
  box-shadow: none !important;
}

.form-control::placeholder {
  color: #9aa9bb;
}

.form-control:focus {
  background: #fff;
  color: #1f2937;
}

.password-toggle {
  width: 48px;
  border: 0;
  border-left: 1px solid #e0e8f2;
  background: #fff;
  color: #71839b;
}

.password-toggle:hover {
  background: #f8fbff;
  color: #334155;
}

.btn-login {
  height: 48px;
  margin-top: 8px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #3486ff 0%, #1f73f6 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(47, 129, 247, 0.25);
}

.btn-login:hover {
  background: linear-gradient(135deg, #2478f7 0%, #1667e6 100%);
  color: #fff;
}

.forgot-link {
  display: inline-block;
  margin-top: 22px;
  color: #2478f7;
  font-size: 14px;
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover {
  color: #145fc8;
  text-decoration: underline;
}

.secure-text {
  margin-top: 28px;
  text-align: center;
  color: #8b9bb1;
  font-size: 13px;
}

.alert {
  border-radius: 10px;
  font-size: 13px;
}

#fpMsg {
  color: #64748b;
}

/* Tablets & large phones — stack the two panels into one column. */
@media (max-width: 850px) {
  .login-shell {
    grid-template-columns: 1fr;
    max-width: 460px;
    min-height: auto;
  }

  .brand-panel {
    padding: 42px 36px 10px;
    text-align: center;
  }

  .logo-img {
    margin-left: auto;
    margin-right: auto;
  }

  .portal-title {
    margin-bottom: 26px;
  }

  .machine-img {
    width: 230px;
  }

  .form-panel {
    padding: 24px 24px 38px;
  }
}

/* Phones — trim nested padding, shrink art & headings so the form fits. */
@media (max-width: 540px) {
  .login-page {
    padding: 14px;
  }

  .login-shell {
    border-radius: 14px;
  }

  .brand-panel {
    padding: 32px 22px 6px;
  }

  .logo-img {
    height: 60px;
  }

  .portal-title {
    font-size: 18px;
    margin-bottom: 18px;
  }

  .welcome-text {
    margin-bottom: 22px;
  }

  .machine-img {
    width: 180px;
  }

  .form-panel {
    padding: 16px 16px 30px;
  }

  .login-card {
    padding: 28px 22px 26px;
    border-radius: 14px;
  }

  .login-card h1 {
    font-size: 22px;
    margin-bottom: 22px;
  }

  .input-group {
    height: 46px;
  }

  .btn-login {
    height: 46px;
    font-size: 15px;
  }
}

/* Very small phones (≤360px). */
@media (max-width: 360px) {
  .brand-panel {
    padding: 26px 14px 4px;
  }

  .machine-img {
    width: 150px;
  }

  .form-panel {
    padding: 12px 10px 26px;
  }

  .login-card {
    padding: 24px 16px 22px;
  }

  .login-card h1 {
    font-size: 20px;
    margin-bottom: 18px;
  }

  .input-group-text,
  .password-toggle {
    width: 42px;
  }
}
