:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --panel: #ffffff;
  --soft: #f8fafc;
  --navy: #0b1220;
  --navy-2: #101b2d;
  --teal: #0f766e;
  --teal-dark: #0b5f59;
  --focus: rgba(15, 118, 110, .16);
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #991b1b;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--soft);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.auth-page { min-height: 100vh; }
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(430px, .92fr) minmax(540px, 1.08fr);
}

.auth-brand-panel {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 48px clamp(40px, 5vw, 78px);
  display: flex;
  flex-direction: column;
  color: #fff;
  background: var(--navy);
}
.auth-brand-panel::before {
  content: "";
  position: absolute;
  width: 470px;
  height: 470px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 50%;
  right: -235px;
  top: 145px;
  box-shadow: 0 0 0 92px rgba(255,255,255,.023), 0 0 0 184px rgba(255,255,255,.015);
  pointer-events: none;
}
.auth-brand-top,
.auth-brand-copy,
.auth-capabilities,
.auth-brand-foot { position: relative; z-index: 1; }
.auth-brand-top { display: flex; gap: 14px; align-items: center; }
.auth-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--navy);
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -1px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.auth-brand-top div:last-child,
.auth-mobile-brand div:last-child { display: flex; flex-direction: column; gap: 3px; }
.auth-brand-top strong { font-size: 14px; letter-spacing: .08em; }
.auth-brand-top span { color: #94a3b8; font-size: 12px; }
.auth-brand-copy { margin-top: auto; max-width: 620px; padding-top: 80px; }
.auth-eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  color: #5eead4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}
.auth-eyebrow.dark { color: var(--teal); margin-bottom: 12px; }
.auth-brand-copy h1 {
  margin: 0;
  max-width: 590px;
  font-size: clamp(38px, 4vw, 61px);
  line-height: 1.04;
  letter-spacing: -.045em;
}
.auth-brand-copy p {
  margin: 24px 0 0;
  max-width: 570px;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.72;
}
.auth-capabilities { margin-top: 48px; border-top: 1px solid rgba(255,255,255,.1); }
.auth-capabilities > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.auth-capabilities > div > span {
  color: #5eead4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  padding-top: 4px;
}
.auth-capabilities p { margin: 0; color: #94a3b8; line-height: 1.5; font-size: 13px; }
.auth-capabilities strong { display: block; color: #fff; font-size: 14px; margin-bottom: 2px; }
.auth-brand-foot { margin-top: auto; padding-top: 36px; color: #64748b; font-size: 11px; letter-spacing: .06em; }

.auth-login-panel {
  min-height: 100vh;
  padding: 42px;
  display: grid;
  place-items: center;
  background: #f8fafc;
}
.auth-login-card {
  width: min(100%, 520px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 42px 40px;
  box-shadow: 0 24px 70px rgba(15,23,42,.08);
}
.auth-mobile-brand { display: none; }
.auth-card-head { margin-bottom: 28px; }
.auth-card-head h2,
.auth-login-card h2 { margin: 0; font-size: 31px; line-height: 1.15; letter-spacing: -.025em; }
.auth-flashes { display: grid; gap: 10px; margin-bottom: 16px; }
.auth-alert {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 15px;
}
.auth-flashes .auth-alert { margin-bottom: 0; }
.auth-alert-error { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger-text); }
.auth-alert-success { background: var(--success-bg); border-color: var(--success-border); color: var(--success-text); }

.auth-form { display: grid; gap: 17px; }
.auth-field { display: grid; gap: 7px; }
.auth-label { color: #334155; font-size: 12px; font-weight: 750; }
.auth-input-wrap { position: relative; display: block; }
.auth-input-wrap input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
  padding: 0 78px 0 46px;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.auth-input-wrap input#username { padding-right: 14px; }
.auth-input-wrap input::placeholder { color: #94a3b8; }
.auth-input-wrap input:hover { border-color: #94a3b8; }
.auth-input-wrap input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px var(--focus); }
.auth-input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}
.auth-input-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  padding: 7px 8px;
  background: transparent;
  color: var(--teal);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}
.password-toggle:hover { background: #f0fdfa; }
.password-toggle:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }

.mis-login-button {
  width: 100%;
  min-height: 64px;
  margin-top: 3px;
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15,118,110,.18);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.mis-login-button:hover:not(:disabled) { background: var(--teal-dark); transform: translateY(-1px); box-shadow: 0 14px 30px rgba(15,118,110,.22); }
.mis-login-button:focus-visible { outline: 3px solid rgba(15,118,110,.24); outline-offset: 3px; }
.mis-login-button:disabled { opacity: .58; cursor: not-allowed; box-shadow: none; }
.mis-login-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.15);
  font-weight: 900;
}
.mis-login-copy { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.mis-login-copy strong { font-size: 13px; }
.mis-login-copy small { color: rgba(255,255,255,.73); font-size: 10px; }
.auth-button-arrow { font-size: 20px; padding-right: 3px; }
.mis-login-button.is-loading .auth-button-arrow { animation: pulse-arrow 1s ease-in-out infinite; }
@keyframes pulse-arrow { 50% { transform: translateX(3px); opacity: .62; } }


@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .auth-login-panel { min-height: 100vh; padding: 24px; }
  .auth-mobile-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 32px; }
  .auth-mobile-brand .auth-logo { background: var(--navy); color: #fff; box-shadow: none; }
  .auth-mobile-brand strong { font-size: 14px; letter-spacing: .04em; }
  .auth-mobile-brand span { color: var(--muted); font-size: 11px; }
}

@media (max-width: 560px) {
  .auth-login-panel { padding: 12px; align-items: start; background: #fff; }
  .auth-login-card { margin-top: 8px; padding: 22px 18px 28px; border: 0; border-radius: 0; box-shadow: none; }
  .auth-mobile-brand { margin-bottom: 28px; }
  .auth-card-head h2,
  .auth-login-card h2 { font-size: 27px; }
  .auth-input-wrap input { height: 54px; font-size: 16px; }
  .mis-login-button { min-height: 66px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Remember-me uses browser/password-manager autofill. The MIS only remembers the username. */
.remember-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  width: fit-content;
  cursor: pointer;
  color: #334155;
  user-select: none;
}
.remember-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.remember-box {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: transparent;
  font-size: 12px;
  font-weight: 900;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.remember-row input:checked + .remember-box {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.remember-row input:focus-visible + .remember-box {
  box-shadow: 0 0 0 4px var(--focus);
  border-color: var(--teal);
}
.remember-copy { display: flex; flex-direction: column; gap: 2px; }
.remember-copy strong { font-size: 12px; line-height: 1.25; }
.remember-copy small { color: var(--muted); font-size: 10px; line-height: 1.35; }

/* With the old capability strip removed, center the message more naturally. */
.auth-brand-copy { margin-top: auto; margin-bottom: auto; padding-top: 70px; padding-bottom: 70px; }
.auth-brand-foot { margin-top: 0; }
