/* ==========================================================================
   Sajil - login page
   Loaded after style.css so it wins on the few shared hooks
   (.login-form, .login-btn-submit) that web_login.js depends on.
   Everything else is namespaced with .sj- so no other page is affected.

   Typography: no font-family is declared here. Every element inherits the
   site font set on body in style.css ('Noto Kufi Arabic', 'Montserrat').
   Form controls get font-family: inherit because browsers do not inherit
   into input and button by default.
   ========================================================================== */

.sj-login {
  --sj-ink: #082c2b;
  --sj-ink-2: #0d3b39;
  --sj-teal: #4aaaa4;
  --sj-teal-700: #3a9a94;
  --sj-mint: #00f1d4;
  --sj-paper: #f5f7f7;
  --sj-line: #e3eae9;
  --sj-text: #14322f;
  --sj-muted: #6b8582;

  background: var(--sj-paper);
  padding: 0;
}

.sj-login__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 78vh;
}

/* ------------------------------------------------------------------ form */

.sj-login__form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 24px;
  background: #ffffff;
}

.sj-login__form-inner {
  width: 100%;
  max-width: 380px;
}

.sj-login__title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--sj-ink);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  text-align: start;
}

.sj-login__subtitle {
  font-size: 15px;
  line-height: 1.7;
  color: var(--sj-muted);
  margin: 0 0 34px;
  text-align: start;
}

/* the form element itself keeps its class because web_login.js binds to it */
.sj-login .login-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sj-field {
  margin-bottom: 20px;
}

.sj-field__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--sj-ink);
  margin-bottom: 8px;
  text-align: start;
}

.sj-field__wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sj-field__icon {
  position: absolute;
  inset-inline-start: 16px;
  font-size: 15px;
  color: #a9bcba;
  pointer-events: none;
  transition: color 0.18s ease;
}

.sj-login .sj-field__input {
  width: 100%;
  height: 52px;
  padding-inline-start: 44px;
  padding-inline-end: 44px;
  border: 1px solid var(--sj-line);
  border-radius: 10px;
  background: #fbfcfc;
  font-family: inherit;
  font-size: 15px;
  color: var(--sj-text);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.sj-login .sj-field__input::placeholder {
  color: #b3c3c1;
}

.sj-login .sj-field__input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--sj-teal);
  box-shadow: 0 0 0 4px rgba(74, 170, 164, 0.14);
}

.sj-field__wrap:focus-within .sj-field__icon {
  color: var(--sj-teal);
}

/* show / hide password */
.sj-field__toggle {
  position: absolute;
  inset-inline-end: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #a9bcba;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.sj-field__toggle:hover {
  color: var(--sj-ink);
  background: #eef4f3;
}

.sj-field__toggle:focus-visible {
  outline: 2px solid var(--sj-teal);
  outline-offset: 1px;
}

/* submit button - class kept for web_login.js */
.sj-login .login-btn-submit {
  width: 100%;
  height: 52px;
  margin-top: 6px;
  border: none;
  border-radius: 10px;
  background: var(--sj-teal);
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(74, 170, 164, 0.28);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.sj-login .login-btn-submit:hover {
  background: var(--sj-teal-700);
  box-shadow: 0 8px 22px rgba(74, 170, 164, 0.36);
}

.sj-login .login-btn-submit:active {
  transform: translateY(1px);
}

.sj-login .login-btn-submit:focus-visible {
  outline: 3px solid var(--sj-ink);
  outline-offset: 2px;
}

.sj-login .login-btn-submit:disabled {
  background: #a8cfcc;
  box-shadow: none;
  cursor: default;
}

.sj-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 22px;
  color: var(--sj-muted);
  font-size: 13px;
}

.sj-divider::before,
.sj-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--sj-line);
}

.sj-signup {
  text-align: center;
  font-size: 14px;
  color: var(--sj-muted);
  margin: 0;
}

.sj-signup a {
  color: var(--sj-teal);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.sj-signup a:hover {
  color: var(--sj-ink);
  border-bottom-color: var(--sj-teal);
}

/* alerts are injected by web_login.js as the first child of .login-form */
.sj-login .login-form .alert {
  order: -1;
  padding: 13px 16px;
  margin-bottom: 18px;
  border-radius: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sj-login .login-form .alert-error {
  background: #fdeeec;
  color: #b3372a;
  border: 1px solid #f6d3ce;
}

.sj-login .login-form .alert-success {
  background: #eaf7f5;
  color: #1f6b64;
  border: 1px solid #c7e7e3;
}

.sj-login .login-form .alert-close {
  margin-inline-start: auto;
  border: none;
  background: none;
  font-size: 19px;
  line-height: 1;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
}

/* ----------------------------------------------------------- brand panel */

.sj-login__brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 64px;
  background: var(--sj-ink);
  color: #dff2f0;
  overflow: hidden;
  padding-top: 0px;
}

/* soft depth, not a decorative gradient wash */
.sj-login__brand::after {
  content: "";
  position: absolute;
  inset-inline-end: -140px;
  bottom: -180px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--sj-ink-2) 0%, transparent 70%);
  pointer-events: none;
}

.sj-login__brand-inner {
  position: relative;
  z-index: 1;
  max-width: 400px;
}

.sj-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-size: 30px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0px;
}

/* echoes the slash in the Sajil mark */
.sj-wordmark::after {
  content: "";
  width: 13px;
  height: 26px;
  background: var(--sj-mint);
  transform: skewX(-18deg);
  border-radius: 2px;
}

.sj-login__brand h2 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.35;
  color: #ffffff;
  margin: 0 0 18px;
  letter-spacing: -0.015em;
  text-align: start;
}

.sj-login__brand p {
  font-size: 15px;
  line-height: 1.85;
  color: #9dc4c0;
  margin: 0;
  max-width: 34ch;
  text-align: start;
}

.sj-rule {
  width: 54px;
  height: 3px;
  background: var(--sj-mint);
  border-radius: 2px;
  margin: 34px 0;
}

.sj-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sj-points li {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 15px;
  color: #cfe8e5;
}

.sj-points i {
  flex: none;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(0, 241, 212, 0.12);
  color: var(--sj-mint);
  font-size: 13px;
}
.sj-points > li > span{
  color:white;
}
section.sj-login{
  margin-top: 10%;
}
/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  .sj-login__grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  /* brand becomes a compact banner above the form on small screens */
  .sj-login__brand {
    order: -1;
    padding: 40px 28px;
  }

  .sj-login__brand h2 {
    font-size: 28px;
  }

  .sj-wordmark {
    margin-bottom: 0px;
  }

  .sj-rule {
    margin: 24px 0;
  }

  .sj-points {
    gap: 12px;
  }

  .sj-login__form-side {
    padding: 44px 24px 60px;
  }

  .sj-login__title {
    font-size: 27px;
  }
}

@media (max-width: 420px) {
  .sj-points li {
    font-size: 14px;
  }

  .sj-login__brand p {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sj-login *,
  .sj-login *::before,
  .sj-login *::after {
    transition: none !important;
  }
}
