/* ═══════════════════════════════════════════════════════════
   Joelogy Theme — Login Page
   Split-screen: Blue news left, White login right
   Matching hosting.joelogy.de design
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Exo:wght@400;500;600;700&family=Fira+Sans:wght@400;500;600&display=swap');

/* ─── Hide Original ──────────────────────────────────────── */
body.jl-login-page .authentication-form-wrapper,
body.jl-login-page .company-logo,
body.jl-login-page > .tw-max-w-md,
body.jl-login-page > h1,
body.jl-login-page > h3 {
    display: none !important;
}

/* ─── Base ────────────────────────────────────────────────── */
body.jl-login-page {
    margin: 0;
    padding: 0;
    background: #F5F7FA;
    font-family: 'Fira Sans', sans-serif;
    overflow: hidden;
    height: 100vh;
    color: #1A1A1A;
}

/* ─── Split Layout ────────────────────────────────────────── */
.jl-login-wrapper {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════
   LEFT SIDE — Blue Branding + News
   ═══════════════════════════════════════════════════════════ */
.jl-login-left {
    flex: 1;
    background: linear-gradient(160deg, #0E5AF2 0%, #0A4AD0 100%);
    display: flex;
    align-items: flex-end;
    padding: 0 60px 60px;
    position: relative;
    overflow: hidden;
}

/* Subtle radial glow */
.jl-login-left::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 188, 250, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.jl-login-left-inner {
    max-width: 560px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Brand — top left */
.jl-login-brand {
    position: absolute;
    top: 40px;
    left: 60px;
    z-index: 2;
    animation: jl-fadeIn 0.5s ease both;
}

.jl-login-brand-logo {
    max-height: 44px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.jl-login-brand-text {
    font-family: 'Exo', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   NEWS CAROUSEL — Text on blue, no card background
   Matching hosting.joelogy.de Swiper style
   ═══════════════════════════════════════════════════════════ */
.jl-news-section {
    animation: jl-fadeInUp 0.6s ease 0.2s both;
}

.jl-news-heading {
    font-family: 'Exo', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 32px;
}

.jl-news-carousel {
    position: relative;
    min-height: 220px;
    overflow: hidden;
}

.jl-news-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
}

.jl-news-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    position: relative;
}

.jl-news-slide.jl-slide-out {
    opacity: 0;
    transform: translateX(-40px);
}

.jl-news-date {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 400;
    letter-spacing: 0.3px;
    margin-bottom: 10px;
}

.jl-news-title {
    font-family: 'Exo', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 18px;
    line-height: 1.3;
}

.jl-news-text {
    font-size: 16px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    max-width: 520px;
}

/* Dots — matching Swiper pagination */
.jl-news-dots {
    display: flex;
    gap: 10px;
    margin-top: 32px;
}

.jl-news-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.jl-news-dot.active {
    background: #fff;
}

.jl-news-dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.55);
}

/* ═══════════════════════════════════════════════════════════
   RIGHT SIDE — Login Form (white)
   ═══════════════════════════════════════════════════════════ */
.jl-login-right {
    flex: 0 0 480px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 50px 40px 50px;
    background: #fff;
    position: relative;
}

/* ── Login Card ─────────────────────────────────── */
.jl-login-card {
    width: 100%;
    max-width: 380px;
    animation: jl-fadeInUp 0.5s ease 0.15s both;
}

.jl-login-welcome {
    font-size: 14px;
    color: #878D97;
    margin: 0 0 4px;
    font-weight: 400;
}

.jl-login-heading {
    font-family: 'Exo', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 28px;
    line-height: 1.2;
}

/* ── Alerts ─────────────────────────────────────── */
.jl-login-alerts {
    margin-bottom: 18px;
}

.jl-login-alerts .alert {
    border-radius: 10px;
    font-size: 13px;
    padding: 10px 16px;
    border: none;
}

.jl-login-alerts .alert-danger {
    background: #FEE2E2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.jl-login-alerts .alert-success {
    background: #D1FAE5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

/* ── Fields ─────────────────────────────────────── */
.jl-field {
    margin-bottom: 20px;
}

.jl-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #4B5563;
    margin-bottom: 6px;
}

.jl-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.jl-field-header label {
    margin-bottom: 0;
}

.jl-forgot {
    font-size: 13px;
    color: #0E5AF2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.jl-forgot:hover {
    color: #0A4AD0;
}

.jl-field input[type="email"],
.jl-field input[type="password"],
.jl-field input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    background: #F9FAFB;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Fira Sans', sans-serif;
    color: #1A1A1A;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.jl-field input:focus {
    outline: none;
    border-color: #0E5AF2;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(14, 90, 242, 0.1);
}

.jl-field input::placeholder {
    color: #9CA3AF;
}

/* Password wrap */
.jl-pw-wrap {
    position: relative;
}

.jl-pw-wrap input {
    padding-right: 44px;
}

.jl-pw-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: color 0.2s ease;
}

.jl-pw-eye:hover {
    color: #0E5AF2;
}

/* ── Remember Me ────────────────────────────────── */
.jl-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 24px;
    cursor: pointer;
}

.jl-remember input {
    accent-color: #0E5AF2;
    width: 16px;
    height: 16px;
}

/* ── Submit Button ──────────────────────────────── */
.jl-submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #0E5AF2 0%, #00BCFA 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Exo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.jl-submit-btn:hover {
    box-shadow: 0 6px 24px rgba(14, 90, 242, 0.35);
    transform: translateY(-1px);
}

.jl-submit-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ── Switch Link ────────────────────────────────── */
.jl-login-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #878D97;
}

.jl-login-switch a {
    color: #0E5AF2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.jl-login-switch a:hover {
    color: #1A1A1A;
}

/* ── Back Link (Forgot / Reset pages) ──────────── */
.jl-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #0E5AF2;
    text-decoration: none;
    transition: color 0.2s ease, gap 0.2s ease;
    margin-bottom: 4px;
}

.jl-back-link:hover {
    color: #0A4AD0;
    gap: 10px;
}

.jl-back-link i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.jl-back-link:hover i {
    transform: translateX(-2px);
}

/* ── Subtitle (Forgot / Reset pages) ──────────── */
.jl-login-subtitle {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.6;
    margin: 0 0 24px;
}

/* ═══════════════════════════════════════════════════════════
   SSO BUTTON (Microsoft 365 etc.)
   ═══════════════════════════════════════════════════════════ */
.jl-sso-section {
    margin-top: 20px;
}

/* Override Tailwind classes from M365 module for our layout */
.jl-sso-section .tw-mt-6 {
    margin-top: 0 !important;
}

.jl-sso-section .tw-flex.tw-items-center.tw-gap-3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.jl-sso-section .tw-h-px {
    height: 1px;
    flex: 1;
    background: #E5E7EB;
}

.jl-sso-section .tw-text-sm {
    font-size: 13px;
    color: #9CA3AF;
    white-space: nowrap;
}

.jl-sso-section a.btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    background: #fff;
    color: #374151 !important;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Fira Sans', sans-serif;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: none;
}

.jl-sso-section a.btn:hover {
    background: #F9FAFB;
    border-color: #0E5AF2;
    box-shadow: 0 0 0 3px rgba(14, 90, 242, 0.08);
}

.jl-sso-section a.btn svg {
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   TWO-FACTOR AUTH — Code Input
   ═══════════════════════════════════════════════════════════ */
#jl-2fa-code {
    font-size: 28px;
    font-family: 'Exo', sans-serif;
    font-weight: 600;
    letter-spacing: 8px;
    text-align: center;
    padding: 16px 20px;
}

#jl-2fa-code::placeholder {
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════
   OLD INFO SECTION (Legacy, kept for client login compat)
   ═══════════════════════════════════════════════════════════ */
.jl-login-info {
    animation: jl-fadeInUp 0.6s ease 0.1s both;
}

.jl-info-title {
    font-family: 'Exo', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 20px;
}

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
@keyframes jl-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes jl-fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
    .jl-login-wrapper {
        flex-direction: column;
    }

    .jl-login-left {
        flex: 0 0 auto;
        padding: 30px;
        min-height: auto;
        align-items: center;
    }

    .jl-login-brand {
        position: static;
        margin-bottom: 24px;
    }

    .jl-login-left-inner {
        max-width: 100%;
    }

    .jl-login-info,
    .jl-news-section {
        display: none;
    }

    .jl-login-right {
        flex: 1;
        padding: 30px;
        justify-content: center;
    }
}

@media (max-width: 500px) {
    .jl-login-right {
        padding: 20px;
    }

    .jl-login-heading {
        font-size: 24px;
    }
}
