/* =========================================================
   Professional HRMS Auth / Login Layout
   ========================================================= */

.auth-page {
    margin: 0;
    min-height: 100vh;
    background: #f4f7fb;
    overflow-x: hidden;
}

.auth-page.dark-theme {
    background: #12151a;
}

.auth-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ---------- Left visual panel ---------- */
.auth-visual {
    position: relative;
    flex: 1 1 52%;
    min-height: 100vh;
    overflow: hidden;
    color: #ffffff;
    background:
        var(--auth-bg-image, none) center center / cover no-repeat,
        linear-gradient(145deg, #0b1f3a 0%, #123456 48%, #1a4a6e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 56px;
}

.auth-visual__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg, rgba(8, 24, 48, 0.72) 0%, rgba(14, 42, 72, 0.55) 55%, rgba(20, 58, 92, 0.45) 100%);
    z-index: 1;
}

.auth-visual__pattern {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}

.auth-visual__shapes {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.auth-shape {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.auth-shape--1 {
    width: 340px;
    height: 340px;
    top: -80px;
    right: -60px;
    background: radial-gradient(circle, rgba(90, 168, 220, 0.22), transparent 70%);
    animation: authFloat 9s ease-in-out infinite;
}

.auth-shape--2 {
    width: 220px;
    height: 220px;
    bottom: 12%;
    left: -50px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
    animation: authFloat 11s ease-in-out infinite reverse;
}

.auth-shape--3 {
    width: 120px;
    height: 120px;
    top: 42%;
    right: 14%;
    background: rgba(255, 255, 255, 0.06);
    animation: authPulse 6s ease-in-out infinite;
}

.auth-visual__content {
    position: relative;
    z-index: 3;
    max-width: 520px;
    width: 100%;
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 48px;
    animation: authFadeUp 0.7s ease both;
}

.auth-brand__logo {
    max-height: 88px;
    width: auto;
    max-width: 260px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 14px;
    padding: 12px 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.auth-visual__copy {
    animation: authFadeUp 0.8s ease 0.08s both;
}

.auth-visual__eyebrow {
    display: inline-block;
    margin: 0 0 14px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d7ebf8;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.auth-visual__title {
    margin: 0 0 14px;
    font-size: clamp(1.75rem, 2.4vw, 2.35rem);
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
}

.auth-visual__subtitle {
    margin: 0;
    max-width: 420px;
    font-size: 1.02rem;
    line-height: 1.6;
    color: rgba(232, 242, 250, 0.88);
}

.auth-visual__highlights {
    list-style: none;
    margin: 40px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
    animation: authFadeUp 0.9s ease 0.16s both;
}

.auth-visual__highlights li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    backdrop-filter: blur(6px);
    font-size: 0.95rem;
    color: #eef6fc;
}

.auth-visual__highlights i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 14px;
}

/* ---------- Right form panel ---------- */
.auth-panel {
    flex: 1 1 48%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    background: #f4f7fb;
}

.auth-page.dark-theme .auth-panel {
    background: #12151a;
}

.auth-panel__inner {
    width: 100%;
    max-width: 440px;
    animation: authFadeUp 0.65s ease both;
}

.auth-panel__mobile-brand {
    display: none;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.auth-panel__mobile-brand img {
    max-height: 42px;
    width: auto;
    object-fit: contain;
}

/* Override old centered card look */
.auth-page .login_box {
    width: 100% !important;
    max-width: 440px;
    margin: 0 auto;
    padding: 36px 32px !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    box-shadow:
        0 1px 2px rgba(16, 24, 40, 0.04),
        0 18px 40px rgba(16, 38, 68, 0.08) !important;
    text-align: left !important;
    border: 1px solid rgba(15, 40, 70, 0.06);
}

.auth-page.dark-theme .login_box {
    background: #1b2129 !important;
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35) !important;
}

.auth-page .login_box h3 {
    font-size: 1.65rem !important;
    font-weight: 700 !important;
    color: #152536 !important;
    margin-bottom: 8px !important;
    text-align: left;
}

.auth-page.dark-theme .login_box h3 {
    color: #f8fafc !important;
}

.auth-page .auth-form-lead {
    margin: 0;
    font-size: 0.92rem !important;
    line-height: 1.5;
    color: #6b7c8f !important;
    text-align: left;
}

.auth-page .auth-form-lead:before,
.auth-page .auth-form-lead:after {
    display: none !important;
    content: none !important;
}

.auth-page.dark-theme .auth-form-lead {
    color: #9aa8b8 !important;
}

.auth-page .login_box .form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #4b5c6e;
    margin-bottom: 6px;
}

.auth-page .login_box .form-control {
    border-radius: 10px;
    border-color: #d7e0ea;
    background: #fbfcfe;
}

.auth-page .login_box .form-control:focus {
    background: #ffffff;
    border-color: #3b82c4;
    box-shadow: 0 0 0 3px rgba(59, 130, 196, 0.15);
}

.auth-page .forgot_pswd a {
    color: #2f6fad !important;
    font-size: 13px !important;
    text-decoration: none !important;
    border: none !important;
    justify-content: flex-start !important;
    width: auto !important;
    padding: 0 !important;
    display: inline-flex !important;
}

.auth-page .forgot_pswd a:hover {
    text-decoration: underline !important;
    color: #1f4f7d !important;
}

.auth-page .login_box .btn-primary,
.auth-page .login_box button.btn-primary {
    border-radius: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 18px rgba(37, 99, 160, 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-page .login_box .btn-primary:hover,
.auth-page .login_box button.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(37, 99, 160, 0.28);
}

.auth-page .login_box > a {
    border-radius: 10px;
}

.auth-languages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
    margin-top: 22px;
}

.auth-languages a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #5b6b7c;
    text-decoration: none;
}

.auth-languages a:hover {
    color: #1f3b57;
}

.auth-page.dark-theme .auth-languages a {
    color: #9aa8b8;
}

/* Hide legacy thin header if somehow present */
.auth-page .login_header,
.auth-page header.login_header {
    display: none !important;
}

.auth-page .login_section {
    min-height: auto !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .auth-shell {
        flex-direction: column;
    }

    .auth-visual {
        flex: 0 0 auto;
        min-height: auto;
        padding: 36px 24px 40px;
    }

    .auth-brand {
        margin-bottom: 28px;
        justify-content: center;
    }

    .auth-visual__copy {
        text-align: center;
    }

    .auth-visual__subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .auth-visual__highlights {
        display: none;
    }

    .auth-panel {
        min-height: auto;
        padding: 28px 16px 40px;
        align-items: flex-start;
    }

    .auth-panel__mobile-brand {
        display: none; /* logo already shown in left panel */
    }

    .auth-page .login_box {
        padding: 28px 20px !important;
    }
}

@media (max-width: 575.98px) {
    .auth-brand__logo {
        max-height: 58px;
        max-width: 180px;
    }

    .auth-visual__title {
        font-size: 1.45rem;
    }
}

/* ---------- Motion ---------- */
@keyframes authFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes authFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-14px);
    }
}

@keyframes authPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-brand,
    .auth-visual__copy,
    .auth-visual__highlights,
    .auth-panel__inner,
    .auth-shape {
        animation: none !important;
    }
}
