/* AnaAkhtar platform login — shared across supervisor, student, parent, institution */
:root {
  --teal: #0f4a5c;
  --teal-2: #13566a;
  --teal-deep: #0b3a49;
  --orange: #eb7e23;
  --orange-dark: #d06a14;
  --turq: #1fa89a;
  --mint: #e1f1ee;
  --cream: #fbf8f3;
  --card: #f9f5ef;
  --white: #fff;
  --ink: #0b3a49;
  --text: #3d5a63;
  --muted: #8a9aa0;
  --line: #ece4d8;
  --role: #0b3a49;
  --role-btn: #0b3a49;
  --role-ink: #fff;
  --sans: "Arimo", "Helvetica Neue", Arial, "IBM Plex Sans Arabic", sans-serif;
}

.lg--supervisor {
  --role: #1fa89a;
  --role-btn: #1fa89a;
  --role-ink: #0a3340;
}

.lg--student {
  --role: #eb7e23;
  --role-btn: #eb7e23;
  --role-ink: #0a3340;
}

.lg--parent {
  --role: #3b82c4;
  --role-btn: #3678b4;
  --role-ink: #ffffff;
}

.lg--institution {
  --role: #0b3a49;
  --role-btn: #0b3a49;
  --role-ink: #ffffff;
}

body.lg-body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}

body.lg-body a {
  color: inherit;
}

body.lg-body button {
  font: inherit;
  cursor: pointer;
}

/* Hide legacy login chrome when the new shell is active */
body.lg-body .header-counselor,
body.lg-body > .arrow-back-login,
body.lg-body .page-show > .arrow-back-login {
  display: none !important;
}

.lg {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.lg-brand {
  background: var(--role);
  color: #fff;
  padding: clamp(28px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
}

.lg-brand > * {
  position: relative;
  z-index: 1;
}

.lg-logo img {
  height: 38px;
  width: auto;
  display: block;
}

.lg-say {
  flex: 1;
}

.lg-panel {
  background: var(--cream);
  padding: clamp(26px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.lg-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: auto;
}

.lg-back {
  font-size: 14.5px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.lg-back:hover {
  color: var(--ink);
}

.lg-lang-form {
  margin: 0;
}

.lg-lang {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.lg-lang .on {
  color: var(--orange);
}

.lg-form {
  width: 100%;
  max-width: 392px;
  margin: 34px auto;
}

.lg-role {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--mint);
  color: var(--teal-deep);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

.lg-form h2 {
  font-size: clamp(24px, 2.6vw, 31px);
  color: var(--ink);
  margin: 0 0 28px;
  line-height: 1.3;
  font-weight: 700;
}

.lg-error {
  display: block;
  color: #c0392b;
  font-size: 14px;
  margin: -12px 0 16px;
  font-weight: 600;
}

.lg-fld {
  margin-bottom: 17px;
}

.lg-fld label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 7px;
}

.lg-fld input[type="email"],
.lg-fld input[type="text"],
.lg-fld input[type="password"],
.lg-fld .lg-input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 13px 15px;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.lg-fld input::placeholder {
  color: #b6c3c7;
}

.lg-fld input:focus {
  border-color: var(--turq);
  box-shadow: 0 0 0 3px rgba(31, 168, 154, 0.18);
}

.lg-fld .field-validation-error,
.lg-fld .text-danger {
  display: block;
  font-size: 13px;
  margin-top: 6px;
}

.lg-wrap {
  position: relative;
}

.lg-eye {
  position: absolute;
  inset-inline-end: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: 8px;
  line-height: 0;
  border-radius: 8px;
  color: var(--muted);
}

.lg-eye:hover {
  color: var(--ink);
  background: var(--mint);
}

.lg-eye svg {
  width: 19px;
  height: 19px;
  display: block;
  fill: currentColor;
}

.lg-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 4px 0 22px;
  flex-wrap: wrap;
}

.lg-chk {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  color: var(--text);
  margin: 0;
  cursor: pointer;
}

.lg-chk input {
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
  margin: 0;
}

.lg-lnk {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--orange);
  text-decoration: none;
}

.lg-lnk:hover {
  text-decoration: underline;
}

.lg-sub-btn,
button.lg-sub-btn {
  width: 100%;
  border: 0;
  background: var(--role-btn) !important;
  color: var(--role-ink) !important;
  font-weight: 700;
  font-size: 16px;
  border-radius: 999px;
  padding: 15px 20px;
  transition: filter 0.15s, transform 0.12s;
  line-height: 1.3;
}

.lg-sub-btn:hover {
  filter: brightness(0.92);
}

.lg-sub-btn:active {
  transform: translateY(1px);
}

.lg-sub-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.lg-legal {
  text-align: center;
  margin-top: auto;
  padding-top: 26px;
}

.lg-legal .co {
  font-size: 12.5px;
  color: #3d5a63;
  margin: 0 0 4px;
}

.lg-legal .ln {
  font-size: 13px;
  color: #3d5a63;
  margin: 0;
}

.lg-legal a {
  color: #3d5a63;
  text-decoration: none;
}

.lg-legal a:hover {
  text-decoration: underline;
}

/* Password field needs room for the eye control */
.lg-wrap .lg-input,
.lg-wrap input {
  padding-inline-end: 44px;
}

@media (max-width: 900px) {
  .lg {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .lg-brand {
    padding: 20px;
    min-height: auto;
  }

  .lg-say {
    display: none;
  }

  .lg-panel {
    min-height: calc(100vh - 78px);
    padding: 20px;
  }

  .lg-form {
    margin: 24px auto;
  }

  .lg-form h2 {
    font-size: 25px;
    margin-bottom: 22px;
  }
}

@media (max-width: 480px) {
  .lg-back {
    font-size: 13px;
  }

  .lg-lang {
    padding: 6px 12px;
    font-size: 12.5px;
  }

  .lg-row {
    gap: 10px;
  }
}
