/* ============================================
   QHRM Modern Login — "Aurora" Theme
   Created: 2026-02-15
   ============================================ */

/* ---- Google Font ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Custom Properties ---- */
:root {
    --qhrm-primary: #667eea;
    --qhrm-primary-dark: #764ba2;
    --qhrm-bg-dark: #0f0c29;
    --qhrm-bg-mid: #302b63;
    --qhrm-bg-light: #24243e;
    --qhrm-card-bg: #ffffff;
    --qhrm-text-dark: #1a202c;
    --qhrm-text-mid: #4a5568;
    --qhrm-text-light: #718096;
    --qhrm-text-muted: #a0aec0;
    --qhrm-border: #e2e8f0;
    --qhrm-border-focus: #667eea;
    --qhrm-error-bg: #fff5f5;
    --qhrm-error-border: #fc8181;
    --qhrm-error-text: #e53e3e;
    --qhrm-radius-lg: 24px;
    --qhrm-radius-md: 12px;
    --qhrm-radius-sm: 8px;
    --qhrm-shadow-card: 0 25px 60px rgba(0, 0, 0, 0.3);
    --qhrm-shadow-input: 0 0 0 3px rgba(102, 126, 234, 0.15);
    --qhrm-shadow-btn: 0 8px 25px rgba(102, 126, 234, 0.4);
    --qhrm-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --qhrm-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* ---- Global Reset ---- */
.qhrm-login-page,
.qhrm-login-page *,
.qhrm-login-page *::before,
.qhrm-login-page *::after {
    box-sizing: border-box;
}

/* ---- Page Wrapper ---- */
.qhrm-login-page {
    font-family: var(--qhrm-font);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--qhrm-bg-dark) 0%, var(--qhrm-bg-mid) 50%, var(--qhrm-bg-light) 100%);
    overflow: hidden;
    position: relative;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Animated Background Blobs ---- */
.qhrm-login-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.qhrm-bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
}

.qhrm-blob-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    top: -20%;
    left: -10%;
    animation: qhrm-float-1 25s infinite ease-in-out;
}

.qhrm-blob-2 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    bottom: -15%;
    right: -10%;
    animation: qhrm-float-2 20s infinite ease-in-out;
}

.qhrm-blob-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    top: 40%;
    left: 55%;
    animation: qhrm-float-3 22s infinite ease-in-out;
}

@keyframes qhrm-float-1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(60px, -40px) rotate(120deg);
    }

    66% {
        transform: translate(-30px, 50px) rotate(240deg);
    }
}

@keyframes qhrm-float-2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(-50px, -30px) rotate(-120deg);
    }

    66% {
        transform: translate(40px, 20px) rotate(-240deg);
    }
}

@keyframes qhrm-float-3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-60px, -40px) scale(1.15);
    }
}

/* ---- Card Container ---- */
.qhrm-login-container {
    position: relative;
    z-index: 1;
    display: flex;
    width: 1000px;
    max-width: 95vw;
    border-radius: var(--qhrm-radius-lg);
    overflow: hidden;
    box-shadow: var(--qhrm-shadow-card);
    animation: qhrm-entrance 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(40px) scale(0.98);
}

@keyframes qhrm-entrance {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---- Brand Panel (Left Side) ---- */
.qhrm-login-brand {
    flex: 0 0 440px;
    background: linear-gradient(135deg, var(--qhrm-primary) 0%, var(--qhrm-primary-dark) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 32px;
    position: relative;
    overflow: hidden;
}

    /* Decorative animated circles */
    .qhrm-login-brand::before,
    .qhrm-login-brand::after {
        content: '';
        position: absolute;
        border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .qhrm-login-brand::before {
        width: 350px;
        height: 350px;
        top: -100px;
        right: -100px;
        animation: qhrm-spin 30s linear infinite;
    }

    .qhrm-login-brand::after {
        width: 250px;
        height: 250px;
        bottom: -70px;
        left: -70px;
        animation: qhrm-spin 20s linear infinite reverse;
    }

@keyframes qhrm-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Additional decorative dots */
.qhrm-brand-dots {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;
}

    .qhrm-brand-dots span {
        position: absolute;
        width: 4px;
        height: 4px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
    }

        .qhrm-brand-dots span:nth-child(1) {
            top: 15%;
            left: 20%;
            animation: qhrm-twinkle 3s infinite 0s;
        }

        .qhrm-brand-dots span:nth-child(2) {
            top: 30%;
            left: 80%;
            animation: qhrm-twinkle 3s infinite 0.5s;
        }

        .qhrm-brand-dots span:nth-child(3) {
            top: 60%;
            left: 15%;
            animation: qhrm-twinkle 3s infinite 1s;
        }

        .qhrm-brand-dots span:nth-child(4) {
            top: 75%;
            left: 70%;
            animation: qhrm-twinkle 3s infinite 1.5s;
        }

        .qhrm-brand-dots span:nth-child(5) {
            top: 45%;
            left: 50%;
            animation: qhrm-twinkle 3s infinite 2s;
        }

        .qhrm-brand-dots span:nth-child(6) {
            top: 85%;
            left: 35%;
            animation: qhrm-twinkle 3s infinite 2.5s;
        }

@keyframes qhrm-twinkle {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.5);
    }
}

.qhrm-brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.qhrm-brand-logo {
    width: 160px;
    margin-bottom: 20px;
    animation: qhrm-logo-float 6s ease-in-out infinite;
    background: #ffffff;
    padding: 14px 22px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

@keyframes qhrm-logo-float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* ---- Trust Label ---- */
.qhrm-trust-label {
    color: #fff;
    font-size: 15px;
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto 28px;
    font-weight: 500;
    letter-spacing: 0.2px;
    opacity: 0.9;
}

/* ---- Stats Grid ---- */
.qhrm-stats {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 14px;
    width: 100%;
    max-width: 370px;
    margin: 0 auto 28px;
}

.qhrm-stat-card {
    flex: 1 1 0% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
    padding: 20px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-width: 0;
}

    .qhrm-stat-card:hover {
        background: rgba(255, 255, 255, 0.28);
        transform: translateY(-4px);
        border-color: rgba(255, 255, 255, 0.4);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    }

.qhrm-stat-number {
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Middle card (Employees) gets more flex space for longer text */
.qhrm-stat-card:nth-child(2) {
    flex: 1.5 1 0% !important;
}

.qhrm-stat-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---- Trust Badges (Chips) ---- */
.qhrm-trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.qhrm-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 7px 16px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 11px;
    font-weight: 500;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    white-space: nowrap;
}

    .qhrm-badge:hover {
        background: rgba(255, 255, 255, 0.22);
        border-color: rgba(255, 255, 255, 0.35);
        transform: translateY(-2px);
    }

    .qhrm-badge i {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.8);
    }

/* ---- Tagline ---- */
.qhrm-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Form Panel (Right Side) ---- */
.qhrm-login-form-panel {
    flex: 1;
    background: var(--qhrm-card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-x: hidden;
    overflow-y: auto;
    min-width: 0;
}

.qhrm-login-form-inner {
    width: 100%;
    max-width: 380px;
    min-width: 0;
}

    .qhrm-login-form-inner form {
        width: 100%;
        max-width: 100%;
    }

/* ---- Mobile Logo (hidden on desktop) ---- */
.qhrm-mobile-logo {
    display: none;
    width: 90px;
    margin-bottom: 16px;
}

/* ---- Form Header ---- */
.qhrm-form-header {
    margin-bottom: 24px;
}

    .qhrm-form-header h2 {
        font-size: 28px;
        font-weight: 800;
        color: var(--qhrm-text-dark);
        margin: 0 0 6px 0;
        letter-spacing: -0.5px;
        line-height: 1.2;
    }

    .qhrm-form-header p {
        font-size: 14px;
        color: var(--qhrm-text-light);
        font-weight: 400;
        margin: 0;
        line-height: 1.4;
    }

/* ---- Error Alert ---- */
.qhrm-login-page .alert.alert-danger {
    background: var(--qhrm-error-bg);
    border: 1px solid var(--qhrm-error-border);
    border-radius: var(--qhrm-radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
    font-size: 13px;
    color: var(--qhrm-error-text);
    animation: qhrm-shake 0.5s ease-in-out;
    position: relative;
    text-align: left;
}

    .qhrm-login-page .alert.alert-danger.hide {
        display: none !important;
    }

    .qhrm-login-page .alert.alert-danger #strongMessage {
        color: var(--qhrm-error-text);
        font-size: 13px;
        font-weight: 500;
        flex: 1;
    }

.qhrm-login-page .alert .closebtn {
    cursor: pointer;
    color: var(--qhrm-error-text);
    font-size: 20px;
    font-weight: 300;
    opacity: 0.6;
    transition: opacity 0.2s;
    line-height: 1;
}

    .qhrm-login-page .alert .closebtn:hover {
        opacity: 1;
    }

@keyframes qhrm-shake {
    0%, 100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-3px);
    }

    80% {
        transform: translateX(3px);
    }
}

/* ---- Office 365 Button ---- */
.qhrm-social-login {
    margin-bottom: 0;
}

.qhrm-office365-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    background: #fff;
    border: 1.5px solid var(--qhrm-border);
    border-radius: var(--qhrm-radius-md);
    color: var(--qhrm-text-dark);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--qhrm-font);
    text-decoration: none;
    cursor: pointer;
    transition: var(--qhrm-transition);
}

    .qhrm-office365-btn:hover {
        background: #f7fafc;
        border-color: #cbd5e0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        text-decoration: none;
        color: var(--qhrm-text-dark);
    }

    .qhrm-office365-btn img {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

/* ---- Separator ---- */
.qhrm-separator {
    display: flex;
    align-items: center;
    margin: 22px 0;
    gap: 16px;
}

    .qhrm-separator::before,
    .qhrm-separator::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--qhrm-border);
    }

    .qhrm-separator span {
        font-size: 11px;
        font-weight: 600;
        color: var(--qhrm-text-muted);
        text-transform: uppercase;
        letter-spacing: 1.5px;
    }

/* ---- Form Reset ---- */
.qhrm-login-page form {
    margin: 0;
    padding: 0;
}

/* ---- Input Fields ---- */
.qhrm-field {
    position: relative;
    margin-bottom: 16px;
    width: 100%;
    max-width: 100%;
}

.qhrm-field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--qhrm-text-muted);
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 2;
    transition: color 0.3s;
}

.qhrm-field:focus-within .qhrm-field-icon {
    color: var(--qhrm-primary);
}

.qhrm-field-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.qhrm-input {
    width: 100%;
    max-width: 100%;
    height: 48px;
    padding: 0 48px 0 44px;
    background: #f7fafc;
    border: 1.5px solid var(--qhrm-border);
    border-radius: var(--qhrm-radius-md);
    font-size: 14px;
    font-family: var(--qhrm-font);
    color: var(--qhrm-text-dark);
    transition: var(--qhrm-transition);
    outline: none;
    margin: 0;
    -webkit-appearance: none;
    box-sizing: border-box;
}

    .qhrm-input:focus {
        background: #fff;
        border-color: var(--qhrm-border-focus);
        box-shadow: var(--qhrm-shadow-input);
    }

    .qhrm-input::placeholder {
        color: var(--qhrm-text-muted);
        font-weight: 400;
    }

    .qhrm-input:-webkit-autofill,
    .qhrm-input:-webkit-autofill:hover,
    .qhrm-input:-webkit-autofill:focus {
        -webkit-box-shadow: 0 0 0 30px #f7fafc inset !important;
        -webkit-text-fill-color: var(--qhrm-text-dark) !important;
        border-color: var(--qhrm-border);
        transition: background-color 5000s ease-in-out 0s;
    }

    /* Validation error state - used by jsLogin.js */
    .qhrm-input.Needed,
    input.Needed {
        background: var(--qhrm-error-bg) !important;
        border-color: var(--qhrm-error-border) !important;
        animation: qhrm-shake 0.4s ease-in-out;
    }

/* Password Eye Toggle */
.qhrm-eye-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--qhrm-text-muted);
    font-size: 16px;
    transition: color 0.2s;
    z-index: 2;
    line-height: 1;
}

    .qhrm-eye-btn:hover {
        color: var(--qhrm-text-mid);
    }

    .qhrm-eye-btn:focus {
        outline: none;
    }

/* ---- reCAPTCHA ---- */
.qhrm-captcha {
    margin-bottom: 16px;
}

    .qhrm-captcha .g-recaptcha {
        transform-origin: left center;
    }

/* ---- Options Row (Remember Me + Forgot Password) ---- */
.qhrm-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 8px;
}

/* Custom Checkbox */
.qhrm-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--qhrm-text-mid);
    font-weight: 400;
    user-select: none;
    position: relative;
    margin: 0;
    padding: 0;
    line-height: 1;
}

    .qhrm-checkbox input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
        margin: 0;
        padding: 0;
    }

.qhrm-checkmark {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border: 1.5px solid #cbd5e0;
    border-radius: 5px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--qhrm-transition);
    position: relative;
}

.qhrm-checkbox input[type="checkbox"]:checked ~ .qhrm-checkmark {
    background: var(--qhrm-primary);
    border-color: var(--qhrm-primary);
}

.qhrm-checkmark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
    margin-top: -1px;
}

.qhrm-checkbox input[type="checkbox"]:checked ~ .qhrm-checkmark::after {
    transform: rotate(45deg) scale(1);
}

/* Forgot Password Link */
.qhrm-forgot {
    font-size: 13px;
    color: var(--qhrm-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

    .qhrm-forgot:hover {
        color: var(--qhrm-primary-dark);
        text-decoration: underline;
    }

/* ---- Login Button ---- */
.qhrm-login-btn {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--qhrm-primary) 0%, var(--qhrm-primary-dark) 100%);
    border: none;
    border-radius: var(--qhrm-radius-md);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--qhrm-font);
    cursor: pointer;
    transition: var(--qhrm-transition);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

    /* Shimmer effect on hover */
    .qhrm-login-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.6s ease;
    }

    .qhrm-login-btn:hover {
        box-shadow: var(--qhrm-shadow-btn);
        transform: translateY(-2px);
    }

        .qhrm-login-btn:hover::before {
            left: 100%;
        }

    .qhrm-login-btn:active {
        transform: translateY(0);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }

    .qhrm-login-btn .qhrm-btn-arrow {
        width: 18px;
        height: 18px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        transition: transform 0.3s;
    }

    .qhrm-login-btn:hover .qhrm-btn-arrow {
        transform: translateX(3px);
    }

/* ---- Footer ---- */
.qhrm-login-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 11px;
    color: var(--qhrm-text-muted);
    line-height: 1.5;
}

    .qhrm-login-footer a {
        color: var(--qhrm-primary);
        text-decoration: none;
        font-weight: 500;
    }

        .qhrm-login-footer a:hover {
            text-decoration: underline;
        }

/* ---- Utility Classes (used by jsLogin.js) ---- */
.hide {
    display: none !important;
}

.show {
    display: block !important;
}

/* ---- Responsive Design ---- */
@media (max-width: 900px) {
    .qhrm-login-brand {
        display: none;
    }

    .qhrm-login-container {
        max-width: 460px;
    }

    .qhrm-mobile-logo {
        display: block;
    }

    .qhrm-login-form-panel {
        padding: 36px 28px;
    }
}

@media (max-width: 480px) {
    .qhrm-login-page {
        padding: 0;
        align-items: stretch;
    }

    .qhrm-login-container {
        max-width: 100%;
        width: 100%;
        border-radius: 0;
        min-height: 100vh;
    }

    .qhrm-login-form-panel {
        padding: 40px 24px;
        align-items: flex-start;
    }

    .qhrm-form-header h2 {
        font-size: 24px;
    }

    .qhrm-login-form-inner {
        max-width: 100%;
    }
}

/* ---- Override body background from layout ---- */
body {
    margin: 0;
    padding: 0;
    background: var(--qhrm-bg-dark) !important;
}
