/* ==========================================================================
   PWMP MIS — sign-in screen
   ========================================================================== */
.auth {
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: 1fr;
}
@media (min-width: 900px) { .auth { grid-template-columns: 1.05fr .95fr; } }

/* ---- Brand panel -------------------------------------------------------- */
.auth-brand {
  display: none;
  position: relative; overflow: hidden;
  background: var(--brand-gradient);
  color: #fff;
  padding: var(--sp-12) var(--sp-10);
  flex-direction: column; justify-content: space-between;
}
@media (min-width: 900px) {
  /* Pinned to the viewport: the form column can be long (demo roster), and the
     headline should stay in view rather than drift to the middle of that length. */
  .auth-brand { display: flex; position: sticky; top: 0; height: 100vh; height: 100dvh; align-self: start; }
}

.auth-brand::before, .auth-brand::after {
  content: ''; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.08); pointer-events: none;
}
.auth-brand::before { width: 460px; height: 460px; top: -180px; right: -160px; }
.auth-brand::after  { width: 320px; height: 320px; bottom: -140px; left: -110px; }
.auth-brand > * { position: relative; z-index: 1; }

.auth-brand-top { display: flex; align-items: center; gap: var(--sp-4); }
.auth-brand-top img {
  width: 62px; height: 62px; border-radius: 50%;
  background: #fff; padding: 4px; box-shadow: 0 8px 26px rgba(0,0,0,.2);
}
.auth-brand-top b { font-family: var(--font-display); font-size: var(--fs-lg); display: block; line-height: 1.3; }
.auth-brand-top span { font-size: var(--fs-xs); opacity: .85; }

.auth-brand h1 {
  font-family: var(--font-display); font-size: clamp(1.6rem, 2.4vw, 2.3rem);
  line-height: 1.5; color: #fff; margin: 0 0 var(--sp-4); max-width: 20ch;
  animation: auth-rise .7s var(--ease-out) .1s both;
}
.auth-brand p {
  font-size: var(--fs-md); line-height: var(--lh-loose);
  opacity: .9; max-width: 46ch; margin: 0;
  animation: auth-rise .7s var(--ease-out) .2s both;
}
@keyframes auth-rise { from { opacity: 0; transform: translateY(16px); } }

.auth-features { display: grid; gap: var(--sp-3); margin-top: var(--sp-8); }
.auth-feature {
  display: flex; align-items: center; gap: var(--sp-3);
  font-size: var(--fs-base); opacity: .94;
  animation: auth-rise .7s var(--ease-out) both;
}
.auth-feature:nth-child(1) { animation-delay: .3s; }
.auth-feature:nth-child(2) { animation-delay: .38s; }
.auth-feature:nth-child(3) { animation-delay: .46s; }
.auth-feature:nth-child(4) { animation-delay: .54s; }
.auth-feature .ic {
  width: 34px; height: 34px; padding: 8px; flex: none;
  background: rgba(255,255,255,.16); border-radius: var(--r-sm);
}

.auth-brand-foot {
  font-size: var(--fs-xs); opacity: .78; line-height: var(--lh-base);
  border-top: 1px solid rgba(255,255,255,.18); padding-top: var(--sp-4);
}

/* ---- Form panel --------------------------------------------------------- */
.auth-panel {
  display: flex; flex-direction: column; justify-content: center;
  /* Top padding clears the language switch pinned in the corner. */
  padding: calc(var(--sp-8) + 40px) var(--sp-5) var(--sp-8);
  background: var(--bg);
  position: relative;
}
.auth-card { width: 100%; max-width: 420px; margin: 0 auto; }

.auth-mobile-brand { text-align: center; margin-bottom: var(--sp-6); }
@media (min-width: 900px) { .auth-mobile-brand { display: none; } }
.auth-mobile-brand img {
  width: 78px; height: 78px; margin: 0 auto var(--sp-3);
  border-radius: 50%; box-shadow: var(--shadow-md);
  animation: splash-pop .7s var(--ease-spring) both;
}
.auth-mobile-brand b {
  font-family: var(--font-display); font-size: var(--fs-lg); display: block; line-height: 1.35;
}
.auth-mobile-brand span { font-size: var(--fs-xs); color: var(--text-muted); }

.auth-card h2 { font-size: var(--fs-2xl); margin-bottom: var(--sp-1); }
.auth-card .lede { color: var(--text-muted); margin-bottom: var(--sp-6); }

.auth-form { display: flex; flex-direction: column; gap: var(--sp-4); }
.auth-form .field .input { padding: 12px 14px; font-size: var(--fs-md); }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 46px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: grid; place-items: center;
  background: none; border: 0; cursor: pointer; color: var(--text-subtle);
  border-radius: var(--r-xs);
}
.pw-toggle:hover { color: var(--text); background: var(--surface-3); }

.auth-notice {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  margin-top: var(--sp-6); padding: var(--sp-3) var(--sp-4);
  background: var(--surface-3); border-radius: var(--r-sm);
  font-size: var(--fs-xs); color: var(--text-muted); line-height: var(--lh-base);
}
.auth-notice .ic { flex: none; margin-top: 1px; color: var(--text-subtle); }

.auth-lang {
  position: absolute; top: var(--sp-4); right: var(--sp-4);
  display: flex; gap: var(--sp-1);
}
.auth-lang a {
  padding: 5px 12px; border-radius: var(--r-full);
  font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted);
  border: 1px solid var(--border);
}
.auth-lang a.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }

.auth-foot {
  margin-top: var(--sp-8); text-align: center;
  font-size: var(--fs-2xs); color: var(--text-subtle); line-height: var(--lh-base);
}

/* Password strength meter on the change-password screen */
.pw-meter { display: flex; gap: 4px; margin-top: 6px; }
.pw-meter i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); transition: background var(--dur-base); }
.pw-meter[data-score="1"] i:nth-child(-n+1) { background: var(--danger); }
.pw-meter[data-score="2"] i:nth-child(-n+2) { background: var(--warning); }
.pw-meter[data-score="3"] i:nth-child(-n+3) { background: var(--info); }
.pw-meter[data-score="4"] i { background: var(--success); }

/* Link back to the public landing page */
.auth-about { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .8rem; border-radius: var(--r-full);
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); color: #fff; font-size: var(--fs-sm); font-weight: 600;
  text-decoration: none; white-space: nowrap; transition: background var(--dur-fast); }
.auth-about:hover { background: rgba(255, 255, 255, .24); }
.auth-about-m { position: absolute; top: var(--sp-4); left: var(--sp-4); display: inline-flex; align-items: center; gap: .3rem; padding: 5px 12px;
  border-radius: var(--r-full); border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: var(--fs-sm);
  font-weight: 600; text-decoration: none; }
.auth-about-m:hover { color: var(--primary); border-color: var(--primary); }
@media (min-width: 900px) { .auth-about-m { display: none; } }
