:root {
  --navy-900: #0a1e36;
  --navy-800: #0f2a4a;
  --navy-700: #1a3a5c;
  --red: #c62828;
  --red-dark: #b71c1c;
  --red-light: #ffebee;
  --text: #2c3e50;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --white: #ffffff;
  --panel-bg: #f4f7fa;
  --shadow-card: 0 12px 40px rgba(15, 42, 74, 0.12);
  --radius-card: 16px;
  --radius-input: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.login-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: url("../images/bg-login.jpg") center center / cover no-repeat fixed;
  overflow-x: hidden;
  position: relative;
}

body.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(255, 255, 255, 0.78) 42%,
    rgba(244, 247, 250, 0.72) 58%,
    rgba(244, 247, 250, 0.55) 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* ===== Layout ===== */
.login-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: calc(100dvh - 52px);
}

.login-info {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 40px 48px clamp(64px, 8vw, 120px);
  background: transparent;
  overflow: hidden;
}

.login-info__overlay {
  display: none;
}

.login-info__content {
  position: relative;
  z-index: 1;
  width: min(100%, 500px);
  margin-left: clamp(24px, 4vw, 56px);
}

.login-info__title {
  margin: 0 0 6px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--navy-800);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.login-info__subtitle {
  margin: 0 0 14px;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 800;
  color: var(--red);
  line-height: 1.35;
}

.login-info__desc {
  margin: 0 0 28px;
  max-width: 46ch;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.login-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(15, 42, 74, 0.07);
  backdrop-filter: blur(6px);
}

.login-feature__icon {
  position: relative;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  color: var(--navy-800);
  line-height: 0;
}

.login-feature__icon > i {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  padding: 0;
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  font-size: 1.35rem;
  font-style: normal;
  line-height: 1.35rem;
  text-align: center;
  -webkit-font-smoothing: antialiased;
}

.login-feature__icon > i::before {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 1.35rem;
  text-align: center;
}

.login-feature__icon--red {
  background: #fce8e8;
}

.login-feature__icon--blue {
  background: #e5effd;
}

.login-feature__icon--gold {
  background: #fdf4e3;
}

.login-feature__icon--purple {
  background: #efe8fc;
}

.login-feature strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy-800);
}

.login-feature span {
  display: block;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ===== Right panel ===== */
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: transparent;
}

.login-card {
  width: min(100%, 420px);
  padding: 36px 32px 28px;
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.login-card__head {
  margin-bottom: 24px;
}

.login-card__head h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy-800);
  letter-spacing: -0.02em;
}

.login-card__head p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ===== Form ===== */
.login-form .form-field {
  margin-bottom: 16px;
}

.login-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy-800);
}

.login-input {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-input:focus-within {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(15, 42, 74, 0.08);
}

.login-input__icon {
  flex: 0 0 18px;
  width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.95rem;
}

.login-input__field {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
}

.login-input__field::placeholder {
  color: #94a3b8;
}

.login-input--password {
  padding-right: 6px;
}

.login-input__toggle {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.login-input__toggle:hover {
  color: var(--navy-800);
  background: rgba(15, 42, 74, 0.05);
}

.login-form__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 18px;
  flex-wrap: wrap;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.login-remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--red);
  cursor: pointer;
}

.login-forgot {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
}

.login-forgot:hover {
  color: var(--red-dark);
  text-decoration: underline;
}

.login-btn,
button.login-btn,
#l.login-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: #c62828;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(198, 40, 40, 0.28);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.login-btn:hover,
.login-btn:focus,
button.login-btn:hover,
button.login-btn:focus,
#l.login-btn:hover,
#l.login-btn:focus {
  background: #b71c1c;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(198, 40, 40, 0.34);
}

.login-divider {
  position: relative;
  margin: 22px 0 18px;
  text-align: center;
}

.login-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}

.login-divider span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0 14px;
  background: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
}

.login-btn-sso {
  width: 100%;
  min-height: 48px;
  margin-bottom: 20px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--navy-800);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.login-btn-sso img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 50%;
}

.login-btn-sso:hover {
  border-color: #cbd5e1;
  background: #fafbfc;
  color: var(--navy-800);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(15, 42, 74, 0.06);
}

.login-secure {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 14px;
  border-radius: 12px;
  background: #eef6fc;
  border: 1px solid #d7ebf8;
}

.login-secure__icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.login-secure strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.82rem;
  color: var(--navy-800);
}

.login-secure p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ===== Footer ===== */
.login-footer {
  position: relative;
  z-index: 1;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.82);
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(8px);
}

.login-footer p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

.login-footer a {
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

.login-footer__sep {
  margin: 0 8px;
  color: #cbd5e1;
}

/* ===== Captcha & modals ===== */
.login-form .captcha {
  margin-bottom: 8px;
  align-items: center;
}

.login-form .captcha .form-control {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--white);
  font-size: 0.88rem;
}

.login-form .captcha img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.login-form .equal-sign {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-muted);
}

.captcha-hidden {
  display: none;
}

.login-modal-header {
  margin: 10px;
  border-radius: 5px;
}

.login-modal-input {
  border: 1px solid #eee;
  border-radius: 5px;
}

.login-modal-input .input-group-prepend {
  background: #eee;
}

.login-modal-captcha {
  border: 1px solid #eee;
  border-radius: 5px;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .login-info {
    padding: 40px 32px 40px 56px;
  }

  .login-info__content {
    margin-left: 24px;
  }
}

@media (max-width: 960px) {
  .login-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-info {
    min-height: auto;
    padding: 36px 24px 28px;
    justify-content: center;
  }

  .login-info__content {
    width: 100%;
    max-width: 560px;
    margin-left: 0;
  }

  .login-info__desc {
    margin-bottom: 20px;
  }

  .login-panel {
    padding: 24px 20px 36px;
  }

  .login-card {
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .login-info {
    padding: 28px 18px 22px;
  }

  .login-feature {
    min-height: 64px;
    padding: 12px 14px;
    gap: 14px;
  }

  .login-feature__icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 10px;
  }

  .login-feature__icon > i {
    width: 1.2rem;
    height: 1.2rem;
    font-size: 1.2rem;
    line-height: 1.2rem;
  }

  .login-feature__icon > i::before {
    line-height: 1.2rem;
  }

  .login-card {
    padding: 28px 22px 22px;
  }

  .login-form__options {
    flex-direction: column;
    align-items: flex-start;
  }

  .login-footer p {
    font-size: 0.72rem;
    line-height: 1.6;
  }

  .login-footer__sep {
    display: none;
  }

  .login-footer a {
    display: inline-block;
    margin: 0 6px;
  }
}
