/* ============================================
   Landing Page + Login — Modern redesign
   ============================================ */

:root {
    --lp-font: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
    --lp-hero-bg: #0b1220;
    --lp-hero-text: #f8fafc;
    --lp-hero-muted: #94a3b8;
    --lp-accent: #10b981;
    --lp-accent-dark: #059669;
    --lp-accent-glow: rgba(16, 185, 129, 0.35);
    --lp-auth-bg: #f1f5f9;
    --lp-card-bg: #ffffff;
    --lp-text: #0f172a;
    --lp-text-muted: #64748b;
    --lp-border: #e2e8f0;
    --lp-danger: #ef4444;
    --lp-radius: 16px;
    --lp-radius-sm: 12px;
    --lp-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15);
}

/* Base */
body.login-page {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: var(--lp-font);
    background: var(--lp-auth-bg);
    overflow-x: hidden;
    overflow-y: auto;
    direction: rtl;
    text-align: right;
}

body.login-page[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

body.login-page .container-fluid {
    padding: 0 !important;
    min-height: 100vh;
}

/* Layout shell */
.lp-page {
    min-height: 100vh;
}

.lp-shell {
    display: grid;
    grid-template-columns: 1fr 480px;
    min-height: 100vh;
}

[dir="ltr"] .lp-shell {
    grid-template-columns: 480px 1fr;
}

/* ===================== HERO / LANDING ===================== */
.lp-hero {
    position: relative;
    background: var(--lp-hero-bg);
    color: var(--lp-hero-text);
    overflow: hidden;
    display: flex;
    align-items: center;
    order: 1;
}

[dir="ltr"] .lp-hero {
    order: 2;
}

.lp-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.lp-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
}

.lp-blob-1 {
    width: 420px;
    height: 420px;
    background: #10b981;
    top: -120px;
    right: -80px;
}

.lp-blob-2 {
    width: 360px;
    height: 360px;
    background: #3b82f6;
    bottom: -100px;
    left: -60px;
}

.lp-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

.lp-hero-inner {
    position: relative;
    z-index: 1;
    padding: 48px 56px;
    max-width: 720px;
}

.lp-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.lp-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--lp-accent), #34d399);
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px var(--lp-accent-glow);
}

.lp-brand-name {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.lp-eyebrow {
    display: inline-block;
    margin: 0 0 16px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.lp-headline {
    margin: 0 0 16px;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.lp-headline span {
    background: linear-gradient(90deg, #6ee7b7, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lp-lead {
    margin: 0 0 36px;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--lp-hero-muted);
    max-width: 540px;
}

.lp-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 36px;
}

.lp-feature-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    border-radius: var(--lp-radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.lp-feature-card:hover {
    transform: translateY(-2px);
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(255, 255, 255, 0.06);
}

.lp-feature-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

.lp-feature-icon svg {
    width: 22px;
    height: 22px;
}

.lp-feature-title {
    margin: 0 0 4px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #f1f5f9;
}

.lp-feature-desc {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--lp-hero-muted);
}

.lp-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lp-trust-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lp-trust-item strong {
    font-size: 1.25rem;
    font-weight: 800;
    color: #f8fafc;
}

.lp-trust-item span {
    font-size: 0.8125rem;
    color: var(--lp-hero-muted);
}

/* ===================== AUTH / LOGIN ===================== */
.lp-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: var(--lp-auth-bg);
    order: 2;
}

[dir="ltr"] .lp-auth {
    order: 1;
}

.lp-auth-inner {
    width: 100%;
    max-width: 400px;
}

.lp-auth-card {
    background: var(--lp-card-bg);
    border-radius: var(--lp-radius);
    padding: 36px 32px;
    box-shadow: var(--lp-shadow);
    border: 1px solid var(--lp-border);
}

.lp-auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.lp-auth-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--lp-accent), #34d399);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 28px var(--lp-accent-glow);
}

.lp-auth-title {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--lp-text);
    letter-spacing: -0.02em;
}

.lp-auth-subtitle {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--lp-text-muted);
}

/* Form */
.lp-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lp-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lp-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--lp-text);
}

.lp-input-wrap {
    position: relative;
}

.lp-input-icon {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
}

.lp-input-icon svg {
    width: 18px;
    height: 18px;
}

[dir="ltr"] .lp-input-icon {
    right: auto;
    left: 14px;
}

.lp-input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 16px;
    border: 1.5px solid var(--lp-border);
    border-radius: var(--lp-radius-sm);
    font-family: var(--lp-font);
    font-size: 0.9375rem;
    color: var(--lp-text);
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

[dir="ltr"] .lp-input {
    padding: 0 16px 0 44px;
}

.lp-input::placeholder {
    color: #94a3b8;
}

.lp-input:focus {
    outline: none;
    border-color: var(--lp-accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.lp-input--error {
    border-color: var(--lp-danger);
}

.lp-input--error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.lp-password-toggle {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.lp-password-toggle:hover {
    color: var(--lp-accent-dark);
    background: rgba(16, 185, 129, 0.08);
}

.lp-password-toggle svg {
    width: 20px;
    height: 20px;
}

[dir="ltr"] .lp-password-toggle {
    left: auto;
    right: 12px;
}

.lp-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.lp-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--lp-text-muted);
    user-select: none;
}

.lp-checkbox input {
    width: 17px;
    height: 17px;
    accent-color: var(--lp-accent);
    cursor: pointer;
}

.lp-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--lp-accent-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.lp-link:hover {
    color: var(--lp-accent);
    text-decoration: underline;
}

.lp-submit {
    width: 100%;
    height: 50px;
    margin-top: 4px;
    border: none;
    border-radius: var(--lp-radius-sm);
    background: linear-gradient(135deg, var(--lp-accent), var(--lp-accent-dark));
    color: #fff;
    font-family: var(--lp-font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 24px var(--lp-accent-glow);
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.lp-submit svg {
    width: 18px;
    height: 18px;
}

[dir="rtl"] .lp-submit svg {
    transform: scaleX(-1);
}

.lp-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px var(--lp-accent-glow);
}

.lp-submit:active {
    transform: translateY(0);
}

.lp-submit:focus-visible {
    outline: 2px solid var(--lp-accent);
    outline-offset: 2px;
}

.lp-submit--loading {
    opacity: 0.75;
    pointer-events: none;
}

.lp-submit--loading span::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lp-spin 0.65s linear infinite;
    vertical-align: middle;
}

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

.lp-error {
    font-size: 0.8125rem;
    color: var(--lp-danger);
}

.lp-footer-note {
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--lp-border);
    text-align: center;
    font-size: 0.75rem;
    color: var(--lp-text-muted);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1100px) {
    .lp-shell {
        grid-template-columns: 1fr;
    }

    .lp-hero,
    .lp-auth,
    [dir="ltr"] .lp-hero,
    [dir="ltr"] .lp-auth {
        order: unset;
    }

    .lp-hero {
        min-height: auto;
    }

    .lp-hero-inner {
        padding: 40px 28px 32px;
        max-width: none;
    }

    .lp-feature-grid {
        grid-template-columns: 1fr;
    }

    .lp-trust {
        gap: 16px;
    }

    .lp-auth {
        padding: 24px 20px 40px;
    }
}

@media (max-width: 480px) {
    .lp-auth-card {
        padding: 28px 20px;
    }

    .lp-headline {
        font-size: 1.625rem;
    }

    .lp-hero-inner {
        padding: 32px 20px 24px;
    }
}

/* Legacy class aliases (other auth pages) */
.login-page-wrapper,
.login-form-column,
.login-features-column,
.login-card,
.login-button {
    /* kept empty — old login uses lp-* classes now */
}
