/**
 * LeadForge SaaS Stylesheet (BUILD-01)
 * Clean, modern, trustworthy, high-performance SaaS identity
 */

:root {
    --lf-primary: #2563eb;
    --lf-primary-dark: #1d4ed8;
    --lf-primary-light: #eff6ff;
    --lf-secondary: #475569;
    --lf-dark: #0f172a;
    --lf-sidebar-bg: #1e293b;
    --lf-sidebar-color: #cbd5e1;
    --lf-sidebar-active: #3b82f6;
    --lf-surface: #ffffff;
    --lf-bg: #f8fafc;
    --lf-border: #e2e8f0;
    --lf-text: #334155;
    --lf-text-heading: #0f172a;
    --lf-text-muted: #64748b;
    --lf-success: #10b981;
    --lf-warning: #f59e0b;
    --lf-danger: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--lf-text);
    background-color: var(--lf-bg);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--lf-text-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Navbar */
.lf-navbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--lf-border);
    padding: 0.85rem 1.5rem;
}

.lf-brand {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--lf-dark);
    display: flex;
    align-items: center;
    text-decoration: none;
}

.lf-brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.65rem;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

/* Hero Section */
.lf-hero {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    padding: 6rem 0 5rem;
    border-bottom: 1px solid var(--lf-border);
}

.lf-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #e0f2fe;
    color: #0369a1;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.lf-hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: #0f172a;
}

.lf-hero-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    max-width: 680px;
    margin: 0 auto 2.25rem;
    line-height: 1.6;
}

/* Buttons */
.btn-primary {
    background-color: var(--lf-primary);
    border-color: var(--lf-primary);
    font-weight: 500;
    padding: 0.55rem 1.25rem;
    border-radius: 6px;
    transition: all 0.15s ease-in-out;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--lf-primary-dark);
    border-color: var(--lf-primary-dark);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Card & Surfaces */
.lf-card {
    background: #ffffff;
    border: 1px solid var(--lf-border);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}

.lf-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* SaaS App Layout */
.lf-app-wrapper {
    display: flex;
    min-height: 100vh;
}

.lf-sidebar {
    width: 260px;
    background-color: var(--lf-sidebar-bg);
    color: var(--lf-sidebar-color);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #334155;
    transition: margin-left 0.25s ease-in-out;
}

.lf-sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
}

.lf-sidebar-brand {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.lf-sidebar-menu {
    list-style: none;
    padding: 1rem 0.75rem;
    margin: 0;
    flex-grow: 1;
}

.lf-sidebar-heading {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 0.85rem 0.75rem 0.4rem;
    font-weight: 700;
}

.lf-sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.85rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
    transition: all 0.15s ease;
}

.lf-sidebar-link i {
    font-size: 1.15rem;
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.lf-sidebar-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.06);
}

.lf-sidebar-link.active {
    color: #ffffff;
    background-color: var(--lf-primary);
}

.lf-sidebar-badge {
    margin-left: auto;
    font-size: 0.68rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
}

/* Sidebar Footer & Usage Indicator */
.lf-sidebar-footer {
    padding: 1rem 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background-color: rgba(0, 0, 0, 0.28);
    margin-top: auto;
}

.lf-sidebar-footer-title {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
}

.lf-sidebar-footer-label {
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.45rem;
}

.lf-sidebar-footer-meta {
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 500;
}

.lf-sidebar-footer .progress {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
}

.lf-sidebar-footer .progress-bar {
    border-radius: 999px;
}

.lf-main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.lf-topbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--lf-border);
    height: 64px;
    padding: 0 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lf-page-body {
    padding: 2rem 2rem;
    flex-grow: 1;
}

/* Stat Widgets */
.lf-stat-card {
    background: #ffffff;
    border: 1px solid var(--lf-border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
}

.lf-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-right: 1.25rem;
    flex-shrink: 0;
}

.lf-stat-icon.primary { background-color: #dbeafe; color: #2563eb; }
.lf-stat-icon.success { background-color: #dcfce7; color: #16a34a; }
.lf-stat-icon.warning { background-color: #fef3c7; color: #d97706; }
.lf-stat-icon.purple  { background-color: #f3e8ff; color: #9333ea; }

.lf-stat-val {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--lf-text-heading);
}

.lf-stat-lbl {
    font-size: 0.85rem;
    color: var(--lf-text-muted);
    font-weight: 500;
}

/* Auth Card */
.lf-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background-color: var(--lf-bg);
}

.lf-auth-card {
    background: #ffffff;
    border: 1px solid var(--lf-border);
    border-radius: 12px;
    width: 100%;
    max-width: 440px;
    padding: 2.25rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

/* Mobile Sidebar Toggle */
@media (max-width: 991.98px) {
    .lf-sidebar {
        margin-left: -260px;
        position: fixed;
        top: 0;
        bottom: 0;
        z-index: 1045;
    }
    .lf-sidebar.show {
        margin-left: 0;
    }
}
