/* =========================================================
   Rooster HRMS — Premium Login Experience (Admin & Employee)
   Dark navy + gold glassmorphism theme — v2
   ========================================================= */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

:root {
  --al-navy-950: #060b16;
  --al-navy-900: #071525;
  --al-navy-800: #0d2037;
  --al-navy-700: #16294a;
  --al-gold-200: #f5dc8a;
  --al-gold-300: #EDC768;
  --al-gold-400: #E2B24C;
  --al-gold-500: #D4A040;
  --al-gold-600: #B8922E;
  --al-gold-700: #9A7A28;
  --al-text-soft: rgba(226, 232, 240, 0.82);
  --al-text-muted: rgba(148, 163, 184, 0.55);
  --al-border-soft: rgba(226, 178, 76, 0.18);
  --al-border-glow: rgba(226, 178, 76, 0.35);
  --al-radius-lg: 28px;
  --al-radius-md: 16px;
  --al-radius-sm: 12px;
}

/* ---------- Page shell ---------- */
.auth-login-page {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  height: 100vh;
  margin: 0;
  background-color: var(--al-navy-950);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: alPageIn 0.25s ease 0.05s forwards;
}

@keyframes alPageIn {
  to { opacity: 1; }
}

.auth-login-page.bg-image-admin {
  background: url('/static/login-bg-hero.png')
    no-repeat center center / cover;
}

.auth-login-page.bg-image-employee {
  background: url('/static/login-bg-hero.png')
    no-repeat center center / cover;
}

.auth-login-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(5,12,20,0.10) 0%, rgba(5,12,20,0.05) 100%);
  pointer-events: none;
  z-index: 0;
}

.auth-shell {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ---------- Grid layout ---------- */
.auth-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 3rem;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 3rem 1rem 1.25rem;
  box-sizing: border-box;
}

/* ---------- Brand row ---------- */
.al-brand-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  margin-left: -1.5rem;
  animation: alFadeIn 0.3s ease both;
}

.al-brand-icon-wrap {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 14px;
  background: radial-gradient(circle at 35% 30%, rgba(245, 220, 138, 0.16), rgba(255, 255, 255, 0.06) 70%);
  border: 1px solid rgba(226, 178, 76, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: alBrandBlink 2.6s ease-in-out infinite;
}

.al-brand-icon-wrap::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 50%, rgba(226, 178, 76, 0.45), transparent 72%);
  pointer-events: none;
  z-index: -1;
  animation: alPulseGlow 2.6s ease-in-out infinite;
}

.al-brand-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)) brightness(1.15) contrast(1.1);
}

.al-brand-name {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--al-gold-200), var(--al-gold-400), var(--al-gold-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.al-brand-name span {
  background: linear-gradient(135deg, var(--al-gold-200), var(--al-gold-500), var(--al-gold-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.al-brand-tag {
  font-size: 0.92rem;
  color: rgba(226, 232, 240, 0.82);
  margin-top: 0.15rem;
  letter-spacing: 0.01em;
  text-transform: none;
  font-weight: 500;
}

/* ---------- Hero panel ---------- */
.al-hero-panel {
  padding-right: 2rem;
}

.al-eyebrow {
  color: var(--al-gold-400);
  font-size: 1rem;
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  margin-bottom: 0.6rem;
  opacity: 0.9;
  animation: alFadeIn 0.25s ease 0.05s both;
}

.al-hero-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 800;
  font-size: clamp(2.8rem, 4.5vw, 4.5rem);
  line-height: 1.05;
  color: #ffffff;
  margin-bottom: 1.75rem;
  letter-spacing: -0.01em;
  animation: alSlideUp 0.3s ease 0.08s both;
}

.al-hero-rule {
  width: 80px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--al-gold-300), var(--al-gold-600), var(--al-gold-700));
  margin-bottom: 1.75rem;
  box-shadow: 0 0 12px rgba(226, 178, 76, 0.25);
  animation: alFadeIn 0.25s ease 0.12s both;
}

.al-hero-highlight {
  color: var(--al-gold-300);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  animation: alFadeIn 0.25s ease 0.15s both;
}

.al-hero-desc {
  color: var(--al-text-soft);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 2.25rem;
  animation: alFadeIn 0.25s ease 0.18s both;
}

/* ---------- Feature cards (glass grid) ---------- */
.al-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  border-radius: var(--al-radius-md);
  padding: 0;
  animation: alFadeIn 0.3s ease 0.2s both;
}

.al-feature {
  padding: 1.25rem 0.75rem;
  border-radius: var(--al-radius-sm);
  text-align: center;
  background: rgba(8, 18, 30, 0.5);
  border: 1px solid rgba(226, 178, 76, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  will-change: transform;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.al-feature:hover {
  transform: translateY(-5px);
  background: rgba(226, 178, 76, 0.08);
  border-color: rgba(226, 178, 76, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 20px rgba(226, 178, 76, 0.08);
}

.al-feature i {
  color: var(--al-gold-400);
  font-size: 1.65rem;
  margin-bottom: 0.55rem;
  display: inline-block;
  transition: transform 0.3s ease, color 0.3s ease;
  filter: drop-shadow(0 2px 6px rgba(226, 178, 76, 0.2));
}

.al-feature:hover i {
  transform: scale(1.2);
  color: var(--al-gold-200);
}

.al-feature h4 {
  color: var(--al-gold-200);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  letter-spacing: 0.02em;
}

.al-feature p {
  color: var(--al-text-soft);
  font-size: 0.74rem;
  line-height: 1.45;
  max-width: 140px;
  margin: 0 auto;
  opacity: 0.85;
}

/* ---------- Login card ---------- */
.al-login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: alSlideUp 0.3s ease 0.1s both;
}

.al-login-card {
  width: 100%;
  max-width: 470px;
  background: linear-gradient(180deg, #0d2037, #081a2d);
  border: 1px solid rgba(226, 178, 76, 0.45);
  border-radius: var(--al-radius-lg);
  padding: 2.25rem 2rem 1.75rem;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(226, 178, 76, 0.06) inset;
  position: relative;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow: visible;
}

/* Subtle glass shine + golden border glow */
.al-login-card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: var(--al-radius-lg);
  background: linear-gradient(135deg, rgba(226,178,76,0.08) 0%, transparent 30%, transparent 70%, rgba(226,178,76,0.08) 100%);
  pointer-events: none;
  z-index: -1;
}

.al-login-card::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--al-radius-lg) + 2px);
  border: 1px solid rgba(226, 178, 76, 0.08);
  pointer-events: none;
  z-index: -1;
  animation: alBorderPulse 4s ease-in-out infinite;
}

.al-logo-circle {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(226, 178, 76, 0.12), rgba(10, 22, 40, 0.92) 70%);
  border: 2px solid rgba(226, 178, 76, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: alFloat 3.5s ease-in-out infinite;
  will-change: transform;
  box-shadow: 0 0 30px rgba(226, 178, 76, 0.06);
  position: relative;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.al-logo-circle:hover {
  box-shadow: 0 0 40px rgba(226, 178, 76, 0.25), 0 0 80px rgba(226, 178, 76, 0.08);
  border-color: rgba(226, 178, 76, 0.45);
}

.al-logo-circle::after {
  content: '';
  position: absolute;
  inset: -24px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(226, 178, 76, 0.4), transparent 72%);
  pointer-events: none;
  z-index: -1;
  animation: alPulseGlow 3s ease-in-out infinite;
}

.al-login-logo-img {
  width: 86px;
  height: auto;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 8px rgba(226, 178, 76, 0.15));
  image-rendering: auto;
}

.al-login-title {
  text-align: center;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.al-login-title span {
  background: linear-gradient(135deg, var(--al-gold-200), var(--al-gold-400), var(--al-gold-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

.al-login-subtitle {
  text-align: center;
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

/* ---------- Form fields ---------- */
.al-field {
  margin-bottom: 1rem;
}

.al-input-wrap {
  position: relative;
}

.al-input-wrap i.al-icon-left {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--al-gold-400);
  font-size: 0.85rem;
  opacity: 0.7;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.al-input-wrap:focus-within i.al-icon-left {
  opacity: 1;
}

.al-input {
  width: 100%;
  height: 54px;
  padding: 0 1rem 0 2.8rem;
  background: rgba(8, 18, 30, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--al-radius-sm);
  color: #f0f2f5;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  box-sizing: border-box;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

.al-input::placeholder {
  color: rgba(148, 163, 184, 0.45);
  font-weight: 400;
  font-size: 0.85rem;
}

.al-input:focus {
  outline: none;
  border-color: rgba(226, 178, 76, 0.6);
  background: rgba(8, 18, 30, 0.8);
  box-shadow: 0 0 0 3px rgba(226, 178, 76, 0.15), 0 0 28px rgba(226, 178, 76, 0.10);
}

.al-toggle-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(148, 163, 184, 0.6);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
  font-size: 0.9rem;
  line-height: 1;
}

.al-toggle-eye:hover {
  color: var(--al-gold-300);
}

.al-forgot-row {
  text-align: right;
  margin: -0.2rem 0 1.2rem;
}

.al-forgot-row a,
.al-forgot-link {
  font-size: 0.78rem;
  color: rgba(226, 178, 76, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.al-forgot-row a:hover,
.al-forgot-link:hover {
  color: var(--al-gold-300);
  text-decoration: underline;
}

/* ---------- Submit button (gold gradient) ---------- */
.al-submit-btn {
  width: 100%;
  height: 50px;
  padding: 0 1rem;
  border: none;
  border-radius: var(--al-radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  color: #1a1206;
  background: linear-gradient(90deg, #F7D06E, #E2B24C);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  will-change: transform;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 20px rgba(226, 178, 76, 0.3);
}

.al-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(226, 178, 76, 0.35), 0 0 0 1px rgba(226, 178, 76, 0.2);
}

.al-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(226, 178, 76, 0.2);
}

.al-submit-btn i {
  transition: transform 0.3s ease;
  font-size: 0.85rem;
}

.al-submit-btn:hover i {
  transform: translateX(5px);
}

.al-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* ---------- Alerts (session expired, error, success) ---------- */
.al-alert {
  border-radius: var(--al-radius-sm);
  padding: 0.65rem 0.95rem;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  line-height: 1.4;
  animation: alFadeIn 0.2s ease both;
}

.al-alert i {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.al-session-alert {
  background: rgba(180, 83, 9, 0.12);
  border: 1px solid rgba(180, 83, 9, 0.3);
  color: #fde68a;
  padding: 0.55rem 0.85rem;
  font-size: 0.78rem;
  border-radius: var(--al-radius-sm);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.35;
  animation: alFadeIn 0.2s ease both;
}

.al-session-alert i {
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* ---------- Trust badges ---------- */
.al-trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(226, 178, 76, 0.12);
}

.al-trust-item {
  text-align: center;
  padding: 0.5rem 0.25rem;
  transition: transform 0.25s ease;
}

.al-trust-item:hover {
  transform: translateY(-2px);
}

.al-trust-item i {
  color: var(--al-gold-400);
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
  display: inline-block;
  opacity: 0.9;
  transition: color 0.25s ease;
}

.al-trust-item:hover i {
  color: var(--al-gold-200);
}

.al-trust-item h5 {
  font-size: 0.75rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.al-trust-item p {
  font-size: 0.64rem;
  color: var(--al-text-muted);
  margin: 0;
}

/* ---------- Footer ---------- */
.al-footer-link {
  margin-top: 2rem;
  text-align: center;
}

.al-site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(226, 178, 76, 0.08);
  padding: 1.25rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: rgba(148, 163, 184, 0.55);
  background: rgba(5, 12, 20, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.al-site-footer a {
  color: rgba(148, 163, 184, 0.55);
  text-decoration: none;
  margin-left: 1.5rem;
  transition: color 0.25s ease, transform 0.25s ease;
  font-size: 0.74rem;
  display: inline-block;
}

.al-site-footer a:hover {
  color: var(--al-gold-200);
  transform: translateY(-1px);
}

.al-site-footer .al-footer-copy {
  color: var(--al-gold-400);
  opacity: 0.8;
}

.al-footer-copy i {
  margin-right: 0.4rem;
  font-size: 0.8rem;
}

/* ---------- Keyframe animations ---------- */
@keyframes alFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes alSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes alFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes alPulseGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.06); }
}

@keyframes alBrandBlink {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 6px rgba(226, 178, 76, 0.15), inset 0 0 0 1px rgba(255,255,255,0.03);
    border-color: rgba(226, 178, 76, 0.35);
  }
  50% {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 22px rgba(226, 178, 76, 0.65), inset 0 0 0 1px rgba(255,255,255,0.05);
    border-color: rgba(245, 220, 138, 0.8);
  }
}

@keyframes alBorderPulse {
  0%, 100% { border-color: rgba(226, 178, 76, 0.08); }
  50% { border-color: rgba(226, 178, 76, 0.2); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  html { overflow: auto; }
  .auth-login-page { height: auto; min-height: 100vh; overflow-y: auto; overflow-x: hidden; }
  .auth-shell { height: auto; min-height: 100vh; }
  .auth-grid {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem 1rem;
    gap: 2rem;
  }
  .al-hero-panel { padding-right: 0; text-align: left; }
  .al-hero-desc { max-width: none; }
  .al-login-card { max-width: 490px; margin: 0 auto; }
}

@media (max-width: 768px) {
  .auth-grid {
    padding: 1.5rem 1rem 1rem;
    gap: 1.75rem;
  }
  .al-brand-row { margin-bottom: 1.5rem; }
  .al-brand-icon { width: 40px; height: 40px; }
  .al-brand-name { font-size: 1.15rem; }
  .al-hero-title { font-size: clamp(2rem, 7vw, 2.6rem); }
  .al-hero-highlight { font-size: 1.05rem; }
  .al-hero-desc { font-size: 0.92rem; line-height: 1.6; }
  .al-feature-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0;
    gap: 0.75rem;
  }
  .al-feature { min-height: 100px; padding: 1rem 0.5rem; }
  .al-feature i { font-size: 1.35rem; }
  .al-feature h4 { font-size: 0.82rem; }
  .al-feature p { font-size: 0.7rem; }
  .al-login-card { max-width: 450px; padding: 2rem 1.5rem 1.5rem; }
  .al-logo-circle { width: 100px; height: 100px; margin-bottom: 0.9rem; }
  .al-login-logo-img { width: 72px; }
  .al-login-title { font-size: 1.5rem; }
  .al-input { height: 50px; padding: 0 0.85rem 0 2.5rem; }
  .al-submit-btn { height: 46px; font-size: 0.88rem; }
  .al-trust-row { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .al-trust-item i { font-size: 1.1rem; }
  .al-trust-item h5 { font-size: 0.7rem; }
  .al-trust-item p { font-size: 0.6rem; }
  .al-site-footer {
    flex-direction: column;
    text-align: center;
    padding: 0.9rem 1rem;
  }
  .al-site-footer a { margin: 0 0.6rem; font-size: 0.7rem; }
}

@media (max-width: 480px) {
  .auth-grid { padding: 0.85rem 0.75rem 0.75rem; gap: 1.25rem; }
  .al-hero-title { font-size: 1.8rem; }
  .al-hero-rule { width: 60px; }
  .al-hero-highlight { font-size: 0.95rem; }
  .al-hero-desc { font-size: 0.85rem; }
  .al-feature-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; padding: 0; }
  .al-feature { min-height: 90px; padding: 0.75rem 0.4rem; }
  .al-feature i { font-size: 1.25rem; }
  .al-feature h4 { font-size: 0.78rem; }
  .al-feature p { font-size: 0.66rem; }
  .al-login-card { padding: 1.5rem 1.15rem 1.25rem; }
  .al-logo-circle { width: 84px; height: 84px; margin-bottom: 0.8rem; }
  .al-login-logo-img { width: 60px; }
  .al-login-title { font-size: 1.3rem; }
  .al-login-subtitle { font-size: 0.76rem; }
  .al-input { height: 48px; padding: 0 0.75rem 0 2.2rem; font-size: 0.85rem; }
  .al-input-wrap i.al-icon-left { left: 12px; font-size: 0.8rem; }
  .al-submit-btn { height: 44px; font-size: 0.85rem; }
  .al-forgot-row a { font-size: 0.72rem; }
  .al-trust-row { gap: 0.35rem; }
  .al-trust-item i { font-size: 1rem; }
  .al-trust-item h5 { font-size: 0.65rem; }
  .al-trust-item p { font-size: 0.56rem; }
  .al-site-footer { font-size: 0.65rem; padding: 0.7rem 0.75rem; }
  .al-site-footer a { font-size: 0.65rem; margin: 0 0.4rem; }
}
