/* Edclex academic login — cream card + separate mobile/desktop art backgrounds */
:root {
  --login-cream: #f7f1e8;
  --login-card: #fffdf9;
  --login-green: #0f4d3a;
  --login-green-hover: #0b3d2e;
  --login-terracotta: #a33b20;
  --login-terracotta-hover: #872f18;
  --login-ink: #2c2a27;
  --login-muted: #6b6560;
  --login-border: #ddd4c8;
  --login-serif: "Libre Baskerville", "Iowan Old Style", Georgia, serif;
  --login-sans: "Source Sans 3", "Segoe UI", sans-serif;
}

body.login-page {
  background-color: var(--login-cream);
  /* Desktop art fills the viewport behind the card */
  background-image: url("../img/login/login-bg-desktop.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  /* Stretch so pen / building / books stay in-frame (art is composed for full bleed) */
  background-size: 100% 100%;
  background-attachment: fixed;
}

body.login-page .site-footer,
body.login-page footer {
  margin-top: 0;
}

.login-shell {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem 3rem;
  overflow: hidden;
  background: transparent;
}

.login-shell::before,
.login-shell::after {
  display: none;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 448px;
  background: rgba(255, 253, 249, 0.96);
  border: 1px solid rgba(42, 42, 40, 0.06);
  border-radius: 20px;
  box-shadow:
    0 1px 2px rgba(42, 42, 40, 0.04),
    0 22px 56px rgba(42, 42, 40, 0.12);
  overflow: hidden;
  backdrop-filter: blur(2px);
}

.login-card__mark {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 236px;
  height: 188px;
  object-fit: cover;
  object-position: 72% 12%;
  opacity: 0.95;
  mix-blend-mode: multiply;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to left, #000 18%, transparent 78%);
  mask-image: linear-gradient(to left, #000 18%, transparent 78%);
}

.login-card .card-body {
  position: relative;
  z-index: 1;
  padding: 1.85rem 1.85rem 1.75rem;
}

.login-card .login-brand {
  position: relative;
  z-index: 1;
  align-self: center;
  margin: 0 auto 1.15rem;
  gap: 12px;
}

.login-card .login-brand .site-brand__img {
  width: 72px;
  height: 72px;
}

.login-card .login-brand .site-brand__name {
  height: 34px;
  max-width: 200px;
}

.login-card .login-brand .site-brand__rule {
  max-width: 200px;
}

.login-card .login-brand .site-brand__tag {
  font-size: 14px;
}

.login-card h1.login-title {
  font-family: var(--login-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: #1a382c;
  text-align: center;
  margin: 0.2rem 0 0.4rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.login-card .login-lead {
  text-align: center;
  color: #6a645e;
  font-family: var(--login-sans);
  font-size: 0.98rem;
  margin-bottom: 1.35rem;
  line-height: 1.45;
}

.login-card .form-label {
  font-family: var(--login-sans);
  font-size: 0.88rem;
  font-weight: 700;
  color: #3d3a36;
  margin-bottom: 0.4rem;
}

.login-field {
  position: relative;
}

.login-field__icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fbf8f4;
  border: 1px solid #e6dfd4;
  color: #6e675f;
  font-size: 0.82rem;
  pointer-events: none;
  z-index: 2;
}

.login-card .form-control {
  font-family: var(--login-sans);
  background: #fff;
  border: 1px solid #e3dbd1;
  border-radius: 14px;
  min-height: 52px;
  padding-left: 52px;
  padding-right: 1rem;
  color: var(--login-ink);
  box-shadow: none;
}

.login-card .form-control:-webkit-autofill,
.login-card .form-control:-webkit-autofill:hover,
.login-card .form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--login-ink);
  caret-color: var(--login-ink);
  box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-out;
}

.login-card .form-control.login-field--password {
  padding-right: 48px;
}

.login-card .form-control::placeholder {
  color: #a39b92;
}

.login-card .form-control:focus {
  background: #fff;
  border-color: var(--login-green);
  box-shadow: 0 0 0 3px rgba(15, 77, 58, 0.14);
}

.login-forgot {
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-bottom: 1.1rem;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--login-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--login-terracotta);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.login-forgot:hover {
  color: var(--login-terracotta-hover);
}

.login-submit {
  position: relative;
  overflow: hidden;
  font-family: var(--login-serif);
  font-size: 1.05rem;
  font-weight: 700;
  background: var(--login-green);
  color: #fff;
  border: 0;
  border-radius: 14px;
  letter-spacing: 0.01em;
  min-height: 50px;
  transition: background 0.15s ease, transform 0.12s ease;
}

.login-submit::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 62px;
  height: 46px;
  transform: translateY(-46%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 56'%3E%3Cpath fill='%23083b2c' opacity='.45' d='M58 8c-6 2-10 8-12 14 6-2 12-1 16 3-8 1-14 6-16 12 8-1 14 2 18 7-10 0-16 6-18 13 2-8 8-14 16-16-6 6-8 14-6 22 4-8 12-12 20-12-8-2-12-8-12-16 6 2 10 1 14-2-6-2-10-7-10-14 4 4 8 6 14 6-6-6-8-12-8-17z'/%3E%3Cpath fill='%23083b2c' opacity='.28' d='M28 18c-4 2-7 6-8 10 4-1 8 0 11 3-5 1-9 4-10 8 5 0 9 2 12 6-6 0-10 4-12 9 2-5 6-9 11-10-4 4-5 9-4 14 3-5 8-8 13-8-5-1-8-5-8-10 4 1 7 0 9-2-4-1-7-4-7-9 3 2 5 4 9 4-4-4-5-8-5-11z'/%3E%3C/svg%3E") right center / contain no-repeat;
  pointer-events: none;
}

.login-submit:hover {
  background: var(--login-green-hover);
  color: #fff;
}

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

.login-or {
  position: relative;
  text-align: center;
  margin: 1.15rem 0;
}

.login-or hr {
  border-color: #e0d8cc;
  opacity: 1;
  margin: 0;
}

.login-or span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--login-card);
  color: var(--login-muted);
  padding: 0 0.75rem;
  font-family: var(--login-sans);
  font-size: 0.9rem;
}

.login-passkey {
  font-family: var(--login-serif);
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(180deg, #fffdf9 0%, #f3ece3 100%);
  color: var(--login-ink);
  border: 1px solid var(--login-border);
  border-radius: 14px;
  letter-spacing: 0.01em;
  line-height: 1.35;
  min-height: 50px;
  white-space: normal;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.login-passkey:hover {
  background: #ebe3d8;
  color: var(--login-ink);
  border-color: #cfc5b6;
}

.login-passkey-hint {
  text-align: center;
  font-family: var(--login-sans);
  font-size: 0.8rem;
  color: var(--login-muted);
  margin: 0.55rem 0 0;
}

.login-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: #7a746c;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  cursor: pointer;
}

.login-eye:hover {
  color: var(--login-ink);
}

.login-create {
  display: inline-block;
  margin-top: 1.35rem;
  font-family: var(--login-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--login-terracotta);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-create:hover {
  color: var(--login-terracotta-hover);
}

.login-verify-link {
  color: var(--login-terracotta) !important;
}

/* Mobile art (portrait stationery) — 100% 100% keeps corner props visible on tall phones */
@media (max-width: 767.98px) {
  body.login-page {
    background-image: url("../img/login/login-bg-mobile.jpg");
    background-position: center center;
    background-size: 100% 100%;
    background-attachment: scroll;
  }

  .login-shell {
    min-height: calc(100vh - 160px);
    min-height: calc(100dvh - 160px);
    padding: 1.35rem 1rem 6.5rem;
  }

  .login-card {
    max-width: 400px;
  }

  .login-card .card-body {
    padding: 1.5rem 1.2rem 1.4rem;
  }

  .login-card .login-brand .site-brand__img {
    width: 58px;
    height: 58px;
  }

  .login-card .login-brand .site-brand__name {
    height: 28px;
    max-width: 160px;
  }

  .login-card .login-brand .site-brand__rule {
    max-width: 160px;
  }

  .login-card h1.login-title {
    font-size: 1.75rem;
  }

  .login-card__mark {
    width: 168px;
    height: 132px;
  }
}

@media (min-width: 768px) {
  body.login-page {
    background-image: url("../img/login/login-bg-desktop.jpg");
    background-position: center center;
    background-size: 100% 100%;
    background-attachment: fixed;
  }
}
