:root {
  color-scheme: light;
  --ink: #18283f;
  --muted: #607087;
  --blue: #2463db;
  --line: #dce3ed;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: #f7f9fc; }
body {
  display: grid;
  align-items: center;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 20px;
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.login-shell { width: min(100%, 400px); margin: auto; }
.login-card { padding: 36px; border: 1px solid #e5eaf1; border-radius: 20px; background: #fff; box-shadow: 0 8px 32px -16px #18345b18; }
.login-brand { display: flex; align-items: center; gap: 9px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--blue); background: #edf3ff; }
.brand-mark svg { width: 20px; height: 20px; }
.login-brand b { font-size: 17px; font-weight: 650; letter-spacing: -.5px; }
.login-card header { margin-top: 28px; }
h1 { margin: 0; font-size: 26px; line-height: 1.3; font-weight: 600; letter-spacing: -.8px; }
form { margin-top: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.login-role { min-width: 0; margin: 0 0 24px; padding: 0; border: 0; }
.role-options { display: flex; padding: 3px; border: 1px solid #eef1f6; border-radius: 10px; background: #f3f5f8; }
.role-options label { position: relative; flex: 1; min-width: 0; cursor: pointer; }
.role-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.role-options span { display: flex; justify-content: center; align-items: center; min-height: 40px; padding: 8px 6px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); font-size: 13px; font-weight: 500; transition: background .15s, color .15s; }
.role-options input:checked + span { color: #2059c2; border-color: #e2e7ef; background: #fff; box-shadow: 0 1px 3px #18283f08; }
.role-options input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
.role-options input:disabled + span { cursor: wait; opacity: .7; }
#credentialLabel { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 500; }
.employee-code-control { position: relative; }
#employeeCode { width: 100%; min-height: 48px; padding: 11px 48px 11px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
#employeeCode:hover { border-color: #acbdd5; }
#employeeCode:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px #2463db12; }
#employeeCode[aria-invalid=true] { border-color: #b3261e; }
#employeeCode[aria-invalid=true]:focus { box-shadow: 0 0 0 3px #b3261e12; }
#employeeCode::placeholder { color: #718097; font-size: 13px; }
.credential-toggle { position: absolute; display: grid; place-items: center; top: 2px; right: 2px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; }
.credential-toggle:hover { color: var(--blue); background: #f3f6fc; }
.credential-toggle svg { width: 18px; height: 18px; }
.eye-slash { display: none; }
.credential-toggle[aria-pressed=true] .eye-slash { display: block; }
.credential-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.login-error { margin: 9px 0 0; color: #b3261e; font-size: 13px; }
.login-error:empty { display: none; }
.login-submit { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 20px; padding: 12px; border: 1px solid transparent; border-radius: 9px; color: #fff; background: var(--blue); font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s; }
.login-submit:hover { background: #1d56c3; }
.login-submit:active { background: #194cae; }
.login-submit:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.login-submit:disabled { background: #7185a6; cursor: not-allowed; }
.login-submit.loading { background: #2059c2; cursor: wait; }
.login-spinner { display: none; width: 16px; height: 16px; border: 2px solid #ffffff60; border-top-color: #fff; border-radius: 50%; }
.loading .login-spinner { display: block; animation: login-spin .75s linear infinite; }
.login-connection { margin: 16px 0 0; color: #8c4d08; font-size: 13px; }
@keyframes login-spin { to { transform: rotate(360deg); } }
@media (max-width: 440px) {
  body { padding: 24px 16px; }
  .login-card { padding: 28px 24px; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (prefers-contrast: more) { :root { --muted: #43536b; --line: #65758d; } }
