/**
 * HRMS Login — International Premium Split-Screen Design
 * ============================================================ */

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

/* ── Variables ───────────────────────────────────────────── */
:root {
    --llp-primary:       #1a56db;
    --llp-primary-dark:  #1240ab;
    --llp-primary-light: #eff6ff;
    --llp-accent-sky:    #0ea5e9;
    --llp-accent-violet: #7c3aed;
    --llp-accent-em:     #10b981;
    --llp-text:          #0f172a;
    --llp-text-muted:    #64748b;
    --llp-text-light:    #94a3b8;
    --llp-border:        #e2e8f0;
    --llp-surface:       #f8fafc;
    --llp-white:         #ffffff;
    --llp-grad-left:     linear-gradient(160deg, #0f2167 0%, #1a56db 50%, #0ea5e9 100%);
    --llp-r-sm:  8px;
    --llp-r:     12px;
    --llp-r-lg:  16px;
    --llp-ease:  cubic-bezier(.4,0,.2,1);
    --llp-trans: all .25s var(--llp-ease);
}

/* ══════════════════════════════════════════════════════════
   FULL-PAGE SPLIT WRAPPER  (login only)
   ══════════════════════════════════════════════════════════ */
body.page-login { background: var(--llp-surface) !important; }

body.page-login .custom-login {
    background: var(--llp-white) !important;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

/* Hide the old SVG background images on login page */
body.page-login .login-bg-img,
body.page-login .bg-login { display: none !important; }

/* Adjust inner wrapper for full-height split */
body.page-login .custom-login-inner {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100vh;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}
body.page-login .custom-login {
    justify-content: flex-start !important;
    align-items: stretch !important;
}

/* ── Split-screen main wrapper ───────────────────────────── */
body.page-login .custom-wrapper-login-only {
    flex: 1;
    display: flex;
    align-items: stretch;
    padding: 0;
    margin: 0;
    max-width: 100%;
    min-height: 100vh;
}
body.page-login .custom-wrapper-login-only .custom-row {
    flex: 1;
    display: flex;
    align-items: stretch;
    width: 100%;
    justify-content: flex-start;
    z-index: auto;
}

/* Left brand panel — injected via pseudo or template edit */
body.page-login .custom-wrapper-login-only .custom-row::before {
    content: '';
    display: block;
    width: 45%;
    min-height: 100vh;
    background: var(--llp-grad-left);
    flex-shrink: 0;
    position: relative;
}

/* Right card panel */
body.page-login .custom-wrapper-login-only .card {
    flex: 1;
    min-height: 100vh;
    border-radius: 0;
    border: none;
    box-shadow: none !important;
    background: var(--llp-white) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: none;
    margin: 0;
}
body.page-login .custom-wrapper-login-only .card .card-body {
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 100%;
    max-width: 420px;
    margin: auto;
    padding: 48px 40px !important;
    background: transparent !important;
}

/* ══════════════════════════════════════════════════════════
   LOGIN BRAND PANEL (left side)
   Built via .login-split-screen structure in auth.blade.php
   ══════════════════════════════════════════════════════════ */
.login-split-screen {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* LEFT PANEL */
.login-brand-panel {
    width: 45%;
    min-height: 100vh;
    background: var(--llp-grad-left);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* Decorative circles */
.login-brand-panel::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 480px; height: 480px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
    pointer-events: none;
}
.login-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    pointer-events: none;
}

/* Inner content */
.lbp-inner {
    position: relative;
    z-index: 2;
    max-width: 400px;
    width: 100%;
    color: #fff;
}

/* Logo */
.lbp-logo { margin-bottom: 40px; }
.lbp-logo-img {
    max-height: 44px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(.95);
}
.lbp-logo-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.03em;
}

/* Title */
.lbp-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -.03em;
    margin-bottom: 14px;
}
.lbp-title span {
    background: linear-gradient(90deg, #93c5fd, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

/* Description */
.lbp-desc {
    color: rgba(255,255,255,.75);
    font-size: .9375rem;
    line-height: 1.65;
    margin-bottom: 36px;
}

/* Feature list */
.lbp-features { display: flex; flex-direction: column; gap: 20px; margin-bottom: 40px; }
.lbp-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.lbp-feature-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.15);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    color: #fff;
    transition: var(--llp-trans);
}
.lbp-feature-item:hover .lbp-feature-icon {
    background: rgba(255,255,255,.2);
    transform: scale(1.05);
}
.lbp-feature-item strong {
    display: block;
    color: #fff;
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 3px;
}
.lbp-feature-item p {
    color: rgba(255,255,255,.65);
    font-size: .8125rem;
    line-height: 1.4;
    margin: 0;
}

/* Stats */
.lbp-stats {
    display: flex;
    gap: 24px;
    padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,.12);
}
.lbp-stat { text-align: center; }
.lbp-stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.03em;
    line-height: 1.1;
}
.lbp-stat-label {
    display: block;
    font-size: .75rem;
    color: rgba(255,255,255,.6);
    font-weight: 500;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Testimonial quote on left panel */
.lbp-testimonial {
    margin-top: 32px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--llp-r);
    padding: 20px 22px;
    backdrop-filter: blur(4px);
}
.lbp-testimonial blockquote {
    color: rgba(255,255,255,.85);
    font-size: .875rem;
    line-height: 1.6;
    font-style: italic;
    margin: 0 0 12px 0;
    position: relative;
    padding-left: 18px;
}
.lbp-testimonial blockquote::before {
    content: '"';
    position: absolute;
    left: 0; top: -4px;
    font-size: 2rem;
    font-style: normal;
    color: rgba(255,255,255,.3);
    line-height: 1;
}
.lbp-testimonial .testi-author { display: flex; align-items: center; gap: 10px; }
.lbp-testimonial .testi-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .875rem; color: #fff;
    flex-shrink: 0;
}
.lbp-testimonial .testi-name { color: #fff; font-weight: 600; font-size: .8125rem; }
.lbp-testimonial .testi-role { color: rgba(255,255,255,.55); font-size: .75rem; }

/* RIGHT PANEL */
.login-form-panel {
    flex: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--llp-white);
    padding: 48px 40px;
    position: relative;
}

/* Subtle grid background */
.login-form-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(26,86,219,.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(14,165,233,.03) 0%, transparent 50%);
    pointer-events: none;
}

.lfp-inner {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}
.lfp-inner .card {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
}

/* ══════════════════════════════════════════════════════════
   LOGIN CARD BODY (form area)
   ══════════════════════════════════════════════════════════ */
.custom-login .login-card-body {
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Logo in form panel */
.custom-login .login-page-logo {
    text-align: left;
    margin-bottom: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}
.custom-login .login-logo-link {
    display: inline-block;
    line-height: 0;
    transition: opacity .2s;
}
.custom-login .login-logo-link:hover { opacity: .85; }
.custom-login .login-form-logo {
    max-height: 44px;
    height: auto;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}
.custom-login .login-logo-fallback {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--llp-text);
    letter-spacing: -.03em;
}

/* Title */
.custom-login .login-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--llp-text);
    line-height: 1.2;
    letter-spacing: -.03em;
    margin: 0 0 8px 0;
}
.custom-login .login-subtitle {
    font-size: .9375rem;
    color: var(--llp-text-muted);
    margin-bottom: 32px;
    line-height: 1.5;
}

/* Form labels */
.custom-login .login-form .form-label {
    font-size: .875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    letter-spacing: -.005em;
}

/* Inputs */
.custom-login .login-form .form-control-lg {
    padding: .7rem 1rem;
    font-size: .9375rem;
    border-radius: var(--llp-r-sm);
    border: 1.5px solid var(--llp-border);
    background: var(--llp-surface);
    color: var(--llp-text);
    transition: var(--llp-trans);
    font-family: 'Inter', sans-serif;
    height: 48px;
    line-height: 1;
}
.custom-login .login-form .form-control-lg:focus {
    border-color: var(--llp-primary);
    background: var(--llp-white);
    box-shadow: 0 0 0 4px rgba(26,86,219,.1);
    outline: 0;
}
.custom-login .login-form .form-control-lg::placeholder { color: #b0bec5; }
.custom-login .login-form .form-control-lg.is-invalid {
    border-color: #ef4444;
    background: #fff5f5;
}
.custom-login .login-form .invalid-feedback { font-size: .8125rem; color: #ef4444; margin-top: 5px; }

/* Remember / forgot row */
.custom-login .login-form .form-check-input {
    width: 16px; height: 16px; margin-top: 3px;
    cursor: pointer; border-color: var(--llp-border);
    border-radius: 4px;
}
.custom-login .login-form .form-check-input:checked {
    background-color: var(--llp-primary);
    border-color: var(--llp-primary);
}
.custom-login .login-form .form-check-input:focus { box-shadow: 0 0 0 3px rgba(26,86,219,.12); }
.custom-login .login-form .form-check-label {
    font-size: .875rem;
    color: var(--llp-text-muted);
    cursor: pointer;
}
.custom-login .login-forgot-link {
    font-size: .875rem;
    color: var(--llp-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color .2s;
}
.custom-login .login-forgot-link:hover { color: var(--llp-primary-dark); text-decoration: underline; }

/* reCaptcha */
.custom-login .login-form .g-recaptcha { transform-origin: left top; }

/* Submit button */
.custom-login .login-submit-btn {
    height: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.01em;
    border-radius: var(--llp-r-sm);
    border: none;
    background: linear-gradient(135deg, var(--llp-primary) 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(26,86,219,.35);
    transition: var(--llp-trans);
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.custom-login .login-submit-btn:hover,
.custom-login .login-submit-btn.btn-primary:hover {
    background: linear-gradient(135deg, var(--llp-primary-dark) 0%, var(--llp-primary) 100%);
    box-shadow: 0 6px 20px rgba(26,86,219,.45);
    transform: translateY(-1px);
    color: #fff;
}
.custom-login .login-submit-btn:active { transform: translateY(0); }
.custom-login .login-submit-btn.loading,
.custom-login .login-submit-btn:disabled { opacity: .7; cursor: not-allowed; transform: none; }
/* Override theme color for submit */
.custom-login .login-submit-btn.btn-primary {
    background: linear-gradient(135deg, var(--llp-primary) 0%, #2563eb 100%) !important;
    border-color: transparent !important;
}

/* Divider */
.custom-login .login-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0; color: var(--llp-text-light); font-size: .8125rem; font-weight: 500;
}
.custom-login .login-divider::before,
.custom-login .login-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--llp-border);
}

/* Register link */
.custom-login .login-register-text {
    font-size: .9375rem;
    color: var(--llp-text-muted);
    text-align: center;
    margin: 24px 0 0 0;
}
.custom-login .login-register-link {
    color: var(--llp-primary);
    font-weight: 700;
    text-decoration: none;
    transition: color .2s;
}
.custom-login .login-register-link:hover { color: var(--llp-primary-dark); text-decoration: underline; }

/* Footer on login */
body.page-login .custom-login-inner > footer {
    display: none;
}

/* ── Non-login pages (register, forgot-password) ─────────── */
body:not(.page-login) .custom-login { background: var(--llp-surface); }
body:not(.page-login) .custom-login .login-bg-1,
body:not(.page-login) .custom-login .login-bg-2 { opacity: .25; }
body:not(.page-login) .custom-login .bg-login { opacity: .95; }
body:not(.page-login) .custom-wrapper {
    padding: 40px 16px;
    max-width: 960px; margin: 0 auto;
    display: flex; align-items: center; flex: 1;
}
body:not(.page-login) .custom-wrapper .custom-row {
    width: 100%; display: flex; justify-content: center;
}
body:not(.page-login) .custom-wrapper .card {
    width: 100%; max-width: 480px;
    border-radius: var(--llp-r-lg);
    border: 1px solid var(--llp-border);
    box-shadow: 0 8px 32px rgba(0,0,0,.08);
    background: var(--llp-white) !important;
}
body:not(.page-login) .custom-wrapper .card .card-body {
    padding: 36px 32px !important;
    border-radius: var(--llp-r-lg) !important;
    box-shadow: none !important;
    background: var(--llp-white) !important;
    margin: 0 !important;
    max-width: 100%;
}
body:not(.page-login) .custom-login .login-page-logo { text-align: center; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    .login-split-screen { flex-direction: column; }
    .login-brand-panel {
        width: 100%; min-height: auto;
        padding: 40px 24px;
    }
    .login-brand-panel::before, .login-brand-panel::after { display: none; }
    .lbp-inner { max-width: 100%; }
    .lbp-features { display: none; }
    .lbp-testimonial { display: none; }
    .lbp-stats { justify-content: center; }
    .lbp-title { font-size: 1.5rem; }
    .login-form-panel { min-height: auto; padding: 40px 24px 56px; }
    .lfp-inner { max-width: 100%; }
    body.page-login .custom-wrapper-login-only { flex-direction: column; min-height: auto; }
    body.page-login .custom-wrapper-login-only .custom-row::before { width: 100%; min-height: 240px; }
    body.page-login .custom-wrapper-login-only .card { min-height: auto; }
    body.page-login .custom-wrapper-login-only .card .card-body { padding: 32px 24px !important; }
}

@media (max-width: 575.98px) {
    .login-brand-panel { padding: 32px 20px; }
    .login-form-panel { padding: 32px 20px 48px; }
    body.page-login .custom-wrapper-login-only .card .card-body { padding: 28px 20px !important; }
    .custom-login .login-title { font-size: 1.5rem; }
    .lbp-title { font-size: 1.35rem; }
    .lbp-stats { flex-wrap: wrap; gap: 16px; }
}

/* ── Language dropdown on auth pages ─────────────────────── */
.custom-login .lang-dropdown-only-desk .btn {
    background: var(--llp-surface);
    border: 1px solid var(--llp-border);
    border-radius: var(--llp-r-sm);
    padding: 7px 14px;
    font-size: .875rem;
    color: var(--llp-text);
    font-weight: 500;
}
.custom-login .lang-dropdown-only-desk .drp-text { margin-right: 4px; }
