/* Login Landing – professional, compact, muted corporate style – full viewport */

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

/* Ensure landing page covers full display (no gaps) – override admin.css / Bootstrap */
html.landing-html {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

body.login-landing-page {
    width: 100% !important;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    overflow-x: hidden;
}

:root {
    --bg-main: #f8f9fa;
    --bg-card: #ffffff;
    --bg-hero: #2c3e50;

    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-invert: #ffffff;

    --border-color: #e2e8f0;
    --accent: #475569;
    --accent-soft: rgba(71, 85, 105, 0.08);

    --hover-border: #94a3b8;
    --hover-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* When app theme is POS Modern (or other), landing uses same palette from theme-loader vars */
html.theme-pos-modern body.login-landing-page {
    --bg-main: var(--color-gray-bg, #f8fafc);
    --bg-card: var(--color-white, #ffffff);
    --bg-hero: var(--color-primary, #1e293b);
    --accent: var(--color-accent, #0d9488);
    --accent-soft: rgba(13, 148, 136, 0.12);
    --border-color: #e2e8f0;
}

.login-landing-page.dark {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-hero: #0f172a;

    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --text-invert: #f1f5f9;

    --border-color: #334155;
    --accent: #94a3b8;
    --accent-soft: rgba(148, 163, 184, 0.08);

    --hover-border: #64748b;
    --hover-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.login-landing-page {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-main);
    background-attachment: fixed;
    color: var(--text-main);
    overflow-x: hidden;
    overflow-y: auto;
    transition: background 0.25s, color 0.25s;
    font-size: 15px;
    /* Slightly increased base font size (was 14px) */
}

.landing-center-wrap {
    width: 95%;
    /* Full width */
    max-width: 1400px;
    /* Reduced max-width (was 1600px, originally 640px) */
    text-align: center;
    padding: 1rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    box-sizing: border-box;
}

/* Hero – compact, no gradient */
.landing-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.25rem;
    margin: 0 -0.75rem 1.75rem;
    border-radius: 8px;
    background: var(--bg-hero);
    color: var(--text-invert);
}

.landing-hero-content {
    animation: landingFadeIn 0.5s ease-out;
}

@keyframes landingFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.landing-logo {
    width: 54px;
    /* 1.5x size */
    height: 54px;
    /* 1.5x size */
    margin: 0 auto 0.5rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    /* ~1.5x size */
    color: var(--text-invert);
}

.landing-hero h1 {
    font-size: 1.75rem;
    /* 1.5x size */
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 0.25rem 0;
    color: #ffffff;
    /* Explicitly white */
}

.landing-tagline {
    font-size: 1.1rem;
    /* 1.5x size */
    opacity: 1;
    /* Removed opacity for full visibility */
    margin: 0;
    color: #ffffff;
    /* Explicitly white */
    font-weight: 500;
    /* Increased weight slightly for better visibility */
}

/* Dark mode toggle – smaller */
.landing-dark-toggle {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 54px;
    /* 1.5x size */
    height: 54px;
    /* 1.5x size */
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    cursor: pointer;
    font-size: 1.35rem;
    /* ~1.5x size */
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    z-index: 10;
}

.landing-dark-toggle:hover {
    color: var(--text-main);
}

[dir="rtl"] .landing-dark-toggle {
    right: auto;
    left: 18px;
}

/* Cards section – smaller grid and cards */
.landing-cards-section {
    width: 100%;
    padding: 0;
    background: transparent;
}

.landing-cards-title {
    font-size: 1rem;
    /* ~1.5x size */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
}

.landing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    /* Increased gap but less than previous attempt */
    width: 100%;
    max-height: none;
    min-height: 0;
}

/* Cards – small, clean, one accent */
.landing-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    border-left-width: 4px;
    /* Thicker border */
    border-left-color: var(--accent);
    padding: 1.25rem 0.8rem;
    /* Adjusted padding */
    text-decoration: none;
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    opacity: 0;
    transform: translateY(10px);
    text-align: center;
    min-height: 0;
}

[dir="rtl"] .landing-card {
    border-left-width: 1px;
    border-right-width: 4px;
    border-right-color: var(--accent);
    border-left-color: var(--border-color);
}

.login-landing-page .landing-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.35s ease, opacity 0.35s ease, border-color 0.2s, box-shadow 0.2s;
}

.landing-card:hover {
    border-left-color: var(--hover-border);
    box-shadow: var(--hover-shadow);
    text-decoration: none;
    color: var(--text-main);
    background: var(--accent-soft);
}

[dir="rtl"] .landing-card:hover {
    border-right-color: var(--hover-border);
    border-left-color: var(--border-color);
}

.landing-card-icon {
    flex-shrink: 0;
}

.landing-card-icon i {
    font-size: 2.25rem;
    /* ~2x+ visual impact (requested 1.5x but icons need pop) - adjusting down from 4rem */
    color: var(--accent);
    opacity: 0.9;
    transition: opacity 0.2s;
}

.landing-card:hover .landing-card-icon i {
    opacity: 1;
}

.landing-card-text {
    min-width: 0;
}

.landing-card h3 {
    margin: 0 0 4px 0;
    font-weight: 600;
    font-size: 1.15rem;
    /* ~1.5x size */
    letter-spacing: -0.01em;
    color: var(--text-main);
    line-height: 1.25;
}

.landing-card p {
    font-size: 0.95rem;
    /* ~1.5x size */
    color: var(--text-muted);
    margin: 0;
    line-height: 1.35;
}

.landing-card-arrow {
    flex-shrink: 0;
    font-size: 1rem;
    /* ~1.5x size */
    color: var(--text-muted);
    opacity: 0.6;
    transition: opacity 0.2s;
    margin-top: 5px;
}

.landing-card:hover .landing-card-arrow {
    opacity: 0.9;
}

/* Single accent for all cards */
.landing-card.register,
.landing-card.forgot {
    border-left-color: var(--accent);
}

[dir="rtl"] .landing-card.register,
[dir="rtl"] .landing-card.forgot {
    border-right-color: var(--accent);
}

/* Footer */
.landing-footer {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem 1rem;
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
    /* ~1.5x size */
    color: var(--text-muted);
    background: transparent;
    margin-top: 2rem;
}

.landing-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.landing-footer-link i {
    font-size: 1.2rem;
}

.landing-footer-link:hover {
    color: var(--text-main);
    text-decoration: underline;
}

.landing-footer-sep {
    opacity: 0.5;
    user-select: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .landing-grid {
        gap: 1rem;
    }

    .landing-center-wrap {
        width: 100%;
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .landing-grid {
        grid-template-columns: 1fr 1fr;
        max-height: none;
    }

    .landing-center-wrap {
        padding: 1rem;
    }

    .landing-hero {
        margin: 0 -0.5rem 1rem;
        padding: 1rem;
    }

    .landing-hero h1 {
        font-size: 1.5rem;
    }

    .landing-tagline {
        font-size: 1rem;
    }

    .landing-card h3 {
        font-size: 1.15rem;
    }

    .landing-card p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .landing-grid {
        grid-template-columns: 1fr;
    }

    .landing-card-icon i {
        font-size: 2rem;
    }
}

@media (max-height: 800px) {
    .login-landing-page {
        max-height: none;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: auto;
    }

    .landing-grid {
        max-height: none;
    }
}