/* CFE Academy login — branded portal */
.cfe-login-page {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #1a2332;
}

.cfe-login-bg {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.28) 0%, rgba(15, 23, 42, 0.45) 100%),
    url("../assets/img/login-bg.png") center center / cover no-repeat;
  z-index: 0;
}

.cfe-login-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.08), transparent 55%),
    linear-gradient(120deg, rgba(0, 90, 180, 0.12), transparent 40%);
  pointer-events: none;
}

.cfe-login-shell {
  position: relative;
  z-index: 1;
  width: min(400px, calc(100vw - 28px));
  padding: 20px 0;
}

.cfe-login-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  padding: 28px 28px 22px;
}

.cfe-login-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.cfe-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #111;
  line-height: 1;
}

.cfe-logo-cfe {
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.cfe-logo-bar {
  width: 3px;
  height: 22px;
  background: #f5a623;
  border-radius: 2px;
}

.cfe-logo-academy {
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.cfe-lang {
  position: relative;
}

.cfe-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #dde3ea;
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #222;
  cursor: pointer;
}

.cfe-lang-btn:hover {
  border-color: #b8c4d2;
}

.cfe-lang-caret {
  font-size: 10px;
  opacity: 0.7;
}

.cfe-lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid #e5eaf0;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  min-width: 110px;
  z-index: 5;
}

.cfe-lang-menu li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.cfe-lang-menu li:hover {
  background: #f3f6f9;
}

.cfe-flag {
  font-size: 15px;
  line-height: 1;
}

.cfe-field {
  position: relative;
  margin-bottom: 14px;
}

.cfe-field input {
  width: 100%;
  height: 48px;
  border: 1px solid #d7dee7;
  border-radius: 12px;
  padding: 0 42px 0 44px;
  font-size: 15px;
  color: #1a1a1a;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cfe-field input:focus {
  border-color: #2f80ed;
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.15);
}

.cfe-field input:focus-visible,
.cfe-submit:focus-visible,
.cfe-lang-btn:focus-visible,
.cfe-forgot:focus-visible,
.cfe-exam-link a:focus-visible,
.cfe-eye:focus-visible {
  outline: 2px solid #2f80ed;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.cfe-field-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8a97a8;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.cfe-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #8a97a8;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
}

.cfe-eye:hover {
  color: #445;
  background: #f2f5f8;
}

.cfe-forgot {
  display: inline-block;
  margin: 4px 0 18px;
  border: 0;
  background: none;
  color: #2f6fed;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.cfe-forgot:hover {
  text-decoration: underline;
}

.cfe-error {
  color: #c0392b;
  font-size: 13px;
  margin: 0 0 12px;
}

.cfe-submit {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: #f5a623;
  color: #1c1c1c;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(245, 166, 35, 0.35);
  transition: background 0.15s ease, transform 0.1s ease, filter 0.15s ease;
}

.cfe-submit:hover {
  background: #e8940f;
  filter: brightness(1.02);
}

.cfe-submit:active {
  transform: translateY(1px);
}

.cfe-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.cfe-exam-link {
  text-align: center;
  margin: 16px 0 0;
  font-size: 13px;
}

.cfe-exam-link a {
  color: #667788;
  text-decoration: none;
}

.cfe-exam-link a:hover {
  color: #2f80ed;
  text-decoration: underline;
}

.cfe-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(10, 16, 28, 0.45);
  display: grid;
  place-items: center;
  padding: 20px;
}

.cfe-modal.hidden {
  display: none;
}

.cfe-modal-card {
  width: min(360px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.cfe-modal-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.cfe-modal-card p {
  margin: 0 0 16px;
  color: #556;
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 480px) {
  .cfe-login-card {
    padding: 22px 18px 18px;
  }
  .cfe-logo-cfe {
    font-size: 1.35rem;
  }
  .cfe-logo-academy {
    font-size: 1.15rem;
  }
}
