/* Consistent sign-in presentation for HRMS and the TEMPO portal. */
body.hrms-auth {
  background: radial-gradient(circle at 12% 14%, rgba(48, 194, 177, .17), transparent 28rem),
              radial-gradient(circle at 88% 82%, rgba(48, 128, 177, .15), transparent 32rem),
              linear-gradient(150deg, #132d40, #0b1d2d 65%, #0b262b);
}
body.tempo-auth {
  background: radial-gradient(circle at 16% 12%, rgba(244, 114, 182, .2), transparent 28rem),
              radial-gradient(circle at 86% 86%, rgba(168, 85, 247, .18), transparent 29rem),
              linear-gradient(150deg, #281638, #1d1230 70%, #30183d);
}
body.hrms-auth::before, body.tempo-auth::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.6), transparent);
}
.login-card, body.tempo-auth .card {
  position: relative;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 20px;
  box-shadow: 0 28px 76px rgba(3,15,28,.35);
}
.login-heading, body.tempo-auth h2 { letter-spacing: -.035em; }
.login-sub, body.tempo-auth .sub { color: #607287; }
.btn-login { background: #087f77; box-shadow: 0 9px 22px rgba(8,127,119,.2); }
.btn-login:hover { background: #066b65; box-shadow: 0 13px 28px rgba(8,127,119,.26); }
body.tempo-auth .btn { box-shadow: 0 9px 22px rgba(236,72,153,.2); }
.btn-login, body.tempo-auth .btn { transition: background .18s, box-shadow .18s, transform .18s; }
.btn-login:hover, body.tempo-auth .btn:hover { transform: translateY(-2px); }
:is(.hrms-auth, .tempo-auth) :is(a, button, input):focus-visible { outline: 3px solid rgba(20,184,166,.3); outline-offset: 3px; }
.tempo-auth :is(a, button, input):focus-visible { outline-color: rgba(244,114,182,.35); }
.auth-loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8,22,34,.65);
  backdrop-filter: blur(9px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s;
}
body.auth-submitting .auth-loading { opacity: 1; visibility: visible; }
.auth-loading-card {
  width: min(290px, calc(100vw - 48px));
  padding: 28px;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 25px 70px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #172c40;
  text-align: center;
}
.auth-loading-card strong { font-size: 15px; }
.auth-loading-card small { font-size: 12px; color: #667c8e; }
.auth-spinner {
  width: 42px;
  height: 42px;
  margin-bottom: 11px;
  border-radius: 50%;
  border: 4px solid #dcefeb;
  border-top-color: #087f77;
  animation: auth-spin .8s linear infinite;
}
.tempo-auth .auth-spinner { border-color: #fce1ef; border-top-color: #ec4899; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) {
  .login-card, body.tempo-auth .card { padding: 32px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-spinner { animation-duration: 1.8s; }
  .auth-loading, .btn-login, body.tempo-auth .btn { transition: none; }
}

/* Split sign-in layout with a distinct phone treatment. */
body.hrms-auth {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 5vw;
  padding: 0 8vw 0 0;
  background: #f2f5fb;
}
body.hrms-auth::before {
  inset: 0 auto 0 0;
  width: 46%;
  background: radial-gradient(circle at 18% 82%, rgba(93, 121, 234, .4), transparent 30rem),
              linear-gradient(145deg, #203e82, #102447 72%);
  mask-image: none;
  z-index: 0;
}
.auth-brand {
  position: relative;
  z-index: 1;
  width: 46%;
  min-height: 100vh;
  padding: 9vh 6vw;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  color: #fff;
}
.auth-brand .login-logo { width: 320px; height: 118px; object-fit: cover; object-position: center; margin: 0; }
.auth-brand-copy { max-width: 470px; margin-bottom: 11vh; }
.auth-brand-copy span { display: block; margin-bottom: 19px; font-size: 11px; font-weight: 700; letter-spacing: .18em; color: #9ec6ff; }
.auth-brand-copy h1 { margin: 0 0 18px; font-size: clamp(32px, 3.2vw, 51px); font-weight: 700; line-height: 1.13; letter-spacing: -.05em; }
.auth-brand-copy p { color: #c5d7ef; font-size: 15px; line-height: 1.7; }
body.hrms-auth .login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  padding: 47px;
  border: 1px solid #e3eaf4;
  box-shadow: 0 21px 55px rgba(30, 54, 90, .12);
}
body.hrms-auth .login-heading { font-size: 27px; color: #182f52; }
body.hrms-auth .login-sub { margin-bottom: 34px; }
body.hrms-auth input:focus { border-color: #3158d5; box-shadow: 0 0 0 3px rgba(49,88,213,.14); }
body.hrms-auth .btn-login { background: #3158d5; box-shadow: 0 10px 22px rgba(49,88,213,.19); }
body.hrms-auth .btn-login:hover { background: #2345b7; }
body.hrms-auth .forgot-link { color: #3158d5; }
body.hrms-auth .footer-note { position: absolute; right: 8vw; bottom: 23px; color: #8191a8; }
body.hrms-auth .flash-messages { position: absolute; top: 20px; right: 8vw; }

body.tempo-auth {
  background: #f6f2fb;
}
body.tempo-auth::before {
  inset: 0 0 auto;
  height: 40vh;
  background: radial-gradient(circle at 18% 20%, rgba(219,155,255,.27), transparent 24rem),
              linear-gradient(125deg, #5b328a, #2e2059);
  mask-image: none;
  z-index: 0;
}
body.tempo-auth .portal-badge, body.tempo-auth .card, body.tempo-auth .footer { position: relative; z-index: 1; }
body.tempo-auth .portal-badge { color: #f8deff; }
body.tempo-auth .card { box-shadow: 0 21px 55px rgba(48, 31, 80, .18); border: 1px solid #eadff6; }
body.tempo-auth .footer { color: #877d99; }

@media (max-width: 980px) {
  body.hrms-auth { display: flex; flex-direction: column; justify-content: flex-start; gap: 0; padding: 0 18px 30px; background: #f1f4fa; }
  body.hrms-auth::before { width: 100%; height: 295px; bottom: auto; background: radial-gradient(circle at 82% 20%, rgba(91,128,240,.42), transparent 16rem), linear-gradient(145deg, #1e3e81, #142a55); }
  .auth-brand { width: 100%; min-height: 0; padding: 32px 9px 0; display: block; }
  .auth-brand .login-logo { width: 240px; height: 92px; margin: 0 0 34px; }
  .auth-brand-copy { margin: 0 0 28px; }
  .auth-brand-copy span { margin-bottom: 9px; font-size: 9px; }
  .auth-brand-copy h1 { font-size: 26px; margin-bottom: 0; }
  .auth-brand-copy p { display: none; }
  body.hrms-auth .login-card { width: 100%; max-width: 440px; padding: 34px 28px 29px; margin-top: 0; border-radius: 20px; }
  body.hrms-auth .login-heading { font-size: 24px; }
  body.hrms-auth .login-sub { margin-bottom: 26px; }
  body.hrms-auth .footer-note { position: static; margin-top: 22px; color: #73849a; }
  body.hrms-auth .flash-messages { position: static; margin-top: 15px; }
  body.tempo-auth { justify-content: flex-start; padding-top: 82px; }
  body.tempo-auth::before { height: 275px; }
  body.tempo-auth .portal-badge { margin-bottom: 23px; }
  body.tempo-auth .card { padding: 34px 28px; }
  body.tempo-auth .footer { margin-top: 22px; }
}
@media (max-width: 390px) {
  body.hrms-auth .login-card, body.tempo-auth .card { padding: 29px 23px; }
  .auth-brand-copy h1 { font-size: 24px; }
}

/* Sign-in action states match the app's controls. */
.btn-login, body.tempo-auth .btn {
  min-height: 48px;
  border-radius: 12px;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s ease, background .2s ease;
  -webkit-tap-highlight-color: transparent;
}
body.hrms-auth .btn-login { background: linear-gradient(110deg, #3158d5, #5378eb); }
body.tempo-auth .btn { background: linear-gradient(110deg, #dd4ba0, #ee75b9); box-shadow: 0 9px 20px rgba(221,75,160,.18); }
@media (hover: hover) and (pointer: fine) {
  body.hrms-auth .btn-login:hover { background: linear-gradient(110deg, #2345b7, #3158d5); box-shadow: 0 14px 28px rgba(49,88,213,.24); transform: translateY(-2px); }
  body.tempo-auth .btn:hover { background: linear-gradient(110deg, #c93d8c, #e462a8); box-shadow: 0 14px 28px rgba(221,75,160,.24); transform: translateY(-2px); }
  .eye-btn:hover { color: #3158d5; transform: translateY(-50%) scale(1.12); }
}
.btn-login:active, body.tempo-auth .btn:active { transform: translateY(1px) scale(.975); box-shadow: 0 3px 9px rgba(30,52,87,.12); }
.btn-login:focus-visible, body.tempo-auth .btn:focus-visible { outline: 3px solid rgba(49,88,213,.23); outline-offset: 3px; }
body.tempo-auth .btn:focus-visible { outline-color: rgba(221,75,160,.26); }
@media (hover: none), (pointer: coarse) {
  .btn-login:hover, body.tempo-auth .btn:hover { transform: none; }
}
