/* ============================================================================
   HR PORTAL — SHARED LOGIN EXPERIENCE (Admin + Employee)
   ----------------------------------------------------------------------------
   One design system for both login pages. Pages differ only through the
   --login-accent custom properties (set inline per page) and their text
   content — layout, spacing, typography, and components are identical.
   Depends on assets/css/typography.css being loaded first (design tokens).
   ============================================================================ */

:root {
    --login-accent: #4f46e5;
    --login-accent-hover: #4338ca;
    --login-accent-soft: rgba(79, 70, 229, .14);
    --login-accent-soft-bg: rgba(79, 70, 229, .08);
    --login-accent-shadow: rgba(79, 70, 229, .28);
}

html, body { height: 100%; margin: 0; }
body {
    font-family: var(--app-font-sans);
    background: #F8FAFC;
    overflow-x: hidden;
}

.lg-shell { display: flex; min-height: 100vh; }

/* ══════════════════════════════════════════════════════════════
   LEFT — Hero panel (shared, brand-level — not per-portal)
   ══════════════════════════════════════════════════════════════ */
.lg-hero {
    flex: 1 1 58%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px 72px;
    color: #ffffff;
    background: linear-gradient(150deg, #0d1b2a 0%, #1b2f5c 48%, #3730a3 100%);
    overflow: hidden;
}
.lg-hero::before,
.lg-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}
.lg-hero::before {
    width: 420px; height: 420px;
    top: -140px; right: -120px;
    background: radial-gradient(circle, rgba(124,58,237,.35) 0%, transparent 70%);
}
.lg-hero::after {
    width: 380px; height: 380px;
    bottom: -160px; left: -100px;
    background: radial-gradient(circle, rgba(79,70,229,.30) 0%, transparent 70%);
}
.lg-hero-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 80% 70% at 40% 40%, #000 40%, transparent 90%);
}

.lg-hero-content { position: relative; z-index: 1; max-width: 480px; }
.lg-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 48px; }
.lg-brand img { height: 55px; }

.lg-hero-title {
    font-size: var(--fs-h2);
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-tight);
    line-height: var(--lh-heading);
    margin: 0 0 14px;
    color: #ffffff;
}
.lg-hero-sub {
    font-size: var(--fs-body);
    font-weight: var(--fw-regular);
    line-height: var(--lh-body);
    color: rgba(255,255,255,.68);
    margin: 0 0 40px;
}

.lg-features { display: flex; flex-direction: column; gap: 18px; margin-bottom: 56px; }
.lg-feature { display: flex; align-items: center; gap: 14px; }
.lg-feature-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 11px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    display: flex; align-items: center; justify-content: center;
    font-size: var(--fs-h5); color: #ffffff;
}
.lg-feature-text {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: rgba(255,255,255,.9);
}

.lg-hero-footer {
    font-size: var(--fs-caption);
    color: rgba(255,255,255,.45);
    font-weight: var(--fw-regular);
}

/* ══════════════════════════════════════════════════════════════
   RIGHT — Sign-in panel
   ══════════════════════════════════════════════════════════════ */
.lg-panel {
    flex: 1 1 42%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #F8FAFC;
}

.lg-card {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, .06), 0 2px 8px rgba(15, 23, 42, .04);
    padding: 40px 40px 44px;
}

.lg-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--login-accent-soft-bg);
    color: var(--login-accent);
    border: 1px solid var(--login-accent-soft);
    border-radius: 999px;
    padding: 5px 13px;
    font-size: var(--fs-caption);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
    margin-bottom: 16px;
}
.lg-badge i { font-size: var(--fs-sm); }

.lg-card-title {
    font-size: var(--fs-h2);
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-tight);
    color: #0f172a;
    margin: 0 0 6px;
}
.lg-card-sub {
    font-size: var(--fs-body);
    font-weight: var(--fw-regular);
    line-height: var(--lh-body);
    color: #64748b;
    margin: 0 0 30px;
}

.lg-field { margin-bottom: 18px; }
.lg-label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: #334155;
    margin-bottom: 7px;
}
.lg-input-wrap { position: relative; }
.lg-input-wrap i.lg-input-icon {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    color: #94a3b8; font-size: var(--fs-h6); pointer-events: none;
    transition: color .15s ease;
}
.lg-input {
    width: 100%;
    height: 48px;
    border: 1px solid #E2E8F0;
    border-radius: 11px;
    padding: 0 16px 0 44px;
    font-size: var(--fs-body);
    font-weight: var(--fw-regular);
    font-family: var(--app-font-sans);
    color: #0f172a;
    background: #ffffff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.lg-input::placeholder { color: #9ca3af; }
.lg-input:hover { border-color: #cbd5e1; }
.lg-input:focus {
    outline: none;
    border-color: var(--login-accent);
    box-shadow: 0 0 0 3.5px var(--login-accent-soft);
}
.lg-input:focus + i.lg-input-icon,
.lg-input-wrap:focus-within i.lg-input-icon { color: var(--login-accent); }

.lg-toggle-pass {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px;
    background: none; border: none; border-radius: 8px;
    color: #94a3b8; font-size: var(--fs-h6);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s ease, color .15s ease;
}
.lg-toggle-pass:hover { background: #f1f5f9; color: #475569; }
.lg-toggle-pass:focus-visible { outline: 2px solid var(--login-accent); outline-offset: 1px; }

.lg-row-between { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 26px; }
.lg-remember { display: flex; align-items: center; gap: 8px; }
.lg-remember input {
    width: 16px; height: 16px; border-radius: 5px; accent-color: var(--login-accent); cursor: pointer;
}
.lg-remember label {
    font-size: var(--fs-sm); font-weight: var(--fw-regular); color: #475569; cursor: pointer; margin: 0;
}
.lg-forgot {
    font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--login-accent); text-decoration: none;
}
.lg-forgot:hover { text-decoration: underline; }

.lg-btn-submit {
    width: 100%; height: 48px;
    border: none; border-radius: 11px;
    background: var(--login-accent); color: #ffffff;
    font-size: var(--fs-body); font-weight: var(--fw-semibold);
    display: flex; align-items: center; justify-content: center; gap: 9px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
    transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}
.lg-btn-submit:hover { background: var(--login-accent-hover); box-shadow: 0 6px 16px var(--login-accent-shadow); }
.lg-btn-submit:active { transform: translateY(1px); }
.lg-btn-submit:focus-visible { outline: 2px solid var(--login-accent); outline-offset: 2px; }
.lg-btn-submit:disabled { opacity: .75; cursor: default; }

.lg-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    display: none;
    animation: lg-spin .7s linear infinite;
}
.lg-btn-submit.is-loading .lg-spinner { display: inline-block; }
.lg-btn-submit.is-loading .lg-btn-label { opacity: .85; }
@keyframes lg-spin { to { transform: rotate(360deg); } }

.lg-alert {
    display: flex; align-items: flex-start; gap: 9px;
    background: #FEF2F2; border: 1px solid #FECACA;
    color: #B91C1C; border-radius: 11px;
    padding: 12px 14px; margin-bottom: 20px;
    font-size: var(--fs-sm); font-weight: var(--fw-regular); line-height: var(--lh-compact);
}
.lg-alert i { font-size: var(--fs-h6); margin-top: 1px; flex-shrink: 0; }

.lg-card-footer {
    text-align: center; margin-top: 28px;
    font-size: var(--fs-caption); color: #94a3b8;
}

/* ══════════════════════════════════════════════════════════════
   Animations — subtle fade + slide, respects reduced motion
   ══════════════════════════════════════════════════════════════ */
.lg-anim { animation: lg-fade-up .5s ease both; }
.lg-hero-content.lg-anim { animation-delay: .05s; }
.lg-card.lg-anim { animation-delay: .12s; }
@keyframes lg-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .lg-anim { animation: none; }
}

/* ══════════════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1199.98px) {
    .lg-hero { padding: 52px 48px; }
    .lg-features { gap: 14px; margin-bottom: 40px; }
}
@media (max-width: 991.98px) {
    /* Tablet: keep the hero visible but reduced, per spec */
    .lg-hero { flex: 1 1 42%; padding: 40px 36px; }
    .lg-hero-title { font-size: var(--fs-h3); }
    .lg-features { gap: 12px; margin-bottom: 32px; }
    .lg-brand { margin-bottom: 32px; }
    .lg-panel { flex: 1 1 58%; }
}
@media (max-width: 767.98px) {
    /* Mobile: hide hero entirely, card fills the viewport */
    .lg-hero { display: none; }
    .lg-panel { flex: 1 1 100%; background: #F8FAFC; min-height: 100vh; }
}
@media (max-width: 575.98px) {
    .lg-panel { padding: 24px 16px; }
    .lg-card { padding: 32px 22px; border-radius: 18px; }
    .lg-card-title { font-size: var(--fs-h3); }
}
