/* ==========================================================================
   FATOURATI SAAS - 2026 NEXT-GEN DESIGN SYSTEM & COMPLETE STYLESHEET
   ========================================================================== */

/* 1. DESIGN TOKENS & CSS VARIABLES */
:root {
    /* Brand Colors */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #e0e7ff;
    --primary-subtle: #f5f7ff;
    --primary-glow: rgba(99, 102, 241, 0.35);

    --violet: #8b5cf6;
    --violet-hover: #7c3aed;
    --violet-light: #f5f3ff;

    --emerald: #10b981;
    --emerald-dark: #059669;
    --emerald-light: #ecfdf5;

    --amber: #f59e0b;
    --amber-dark: #d97706;
    --amber-light: #fffbeb;

    --rose: #f43f5e;
    --rose-dark: #e11d48;
    --rose-light: #fff1f2;

    --sky: #0ea5e9;
    --sky-dark: #0284c7;
    --sky-light: #f0f9ff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(248, 250, 252, 0.5) 100%);

    /* Backgrounds & Neutrals */
    --bg-app: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #090d16;
    --bg-sidebar-card: #131b2e;
    --border-sidebar: #1e293b;
    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;

    /* Text Colors */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 10px 25px -5px rgba(99, 102, 241, 0.04), 0 0 1px 0 rgba(0, 0, 0, 0.08);

    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. BASE & RESET */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 15px;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-app);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-hover);
}

img, svg {
    display: inline-block;
    vertical-align: middle;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

/* Helpers */
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.text-xs { font-size: 0.75rem !important; }
.text-sm { font-size: 0.85rem !important; }
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--emerald) !important; }
.text-warning { color: var(--amber) !important; }
.text-danger { color: var(--rose) !important; }
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 2rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 2rem !important; }
.p-0 { padding: 0 !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-5 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
.font-weight-bold { font-weight: 700 !important; }

@media print {
    @page {
        size: A4 portrait;
        margin: 12mm 15mm 15mm 15mm;
    }
    
    *, *::before, *::after {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    html, body {
        background: #ffffff !important;
        font-size: 11pt !important;
        color: #0f172a !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .no-print,
    .sidebar, .sidebar-modern,
    .topbar, .topbar-modern,
    .print-actions-bar,
    .impersonate-top-strip,
    .top-banner-warning-glow,
    .top-banner-info,
    .signature-box.no-print {
        display: none !important;
    }

    .dashboard-layout,
    .main-container, .main-container-modern,
    .content-body, .content-body-modern {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border: none !important;
        background: #ffffff !important;
    }

    .printable-document-card {
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        background: #ffffff !important;
        page-break-after: avoid;
    }

    .print-sep {
        background: #6366f1 !important;
        height: 2px !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .print-items-table {
        page-break-inside: auto;
    }

    .print-items-table thead th {
        background-color: #f1f5f9 !important;
        color: #1e293b !important;
        border-bottom: 2px solid #cbd5e1 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .print-items-table tbody tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    .print-items-table tbody tr:nth-child(even) {
        background-color: #f8fafc !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .recipient-meta {
        background-color: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .print-totals-section {
        background-color: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .print-footer-grid {
        page-break-inside: avoid;
    }

    .company-legal-mentions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   3. LAYOUT (SIDEBAR & MAIN CONTAINER)
   ========================================================================== */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* Sidebar */
.sidebar, .sidebar-modern {
    width: 260px;
    min-width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-sidebar);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: hidden;
}

.sidebar-glow-blob {
    position: absolute;
    top: -50px;
    left: -50px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(99, 102, 241, 0) 70%);
    pointer-events: none;
}

.sidebar-brand-header, .sidebar-brand {
    padding: 1.25rem 1.25rem 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand-link, .sidebar-brand .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-logo-icon, .logo-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.brand-logo-icon i, .logo-icon i {
    width: 20px;
    height: 20px;
}

.brand-text-block {
    display: flex;
    flex-direction: column;
}

.brand-title, .logo-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 0.65rem;
    font-weight: 700;
    color: #818cf8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-close-btn, .sidebar-close {
    display: none;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
}

/* User Widget in Sidebar */
.sidebar-user-widget, .sidebar-user {
    margin: 0.5rem 1rem 1rem 1rem;
    padding: 0.65rem 0.85rem;
    background: var(--bg-sidebar-card);
    border: 1px solid var(--border-sidebar);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-ring, .sidebar-user .avatar {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.user-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--emerald);
    border: 2px solid var(--bg-sidebar);
}

.user-details-text, .sidebar-user .user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-display-name, .sidebar-user .name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-company-pill, .sidebar-user .role {
    font-size: 0.7rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Nav Menu */
.sidebar-nav-scroll, .sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 0 0.75rem 2rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.45) rgba(15, 23, 42, 0.4);
}

.sidebar-nav-scroll::-webkit-scrollbar, .sidebar-menu::-webkit-scrollbar {
    width: 7px;
}
.sidebar-nav-scroll::-webkit-scrollbar-track, .sidebar-menu::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
}
.sidebar-nav-scroll::-webkit-scrollbar-thumb, .sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.sidebar-nav-scroll::-webkit-scrollbar-thumb:hover, .sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.8);
}

.nav-section-group, .menu-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 0.4rem;
}

.nav-section-tag, .menu-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 0.4rem 0.75rem 0.2rem 0.75rem;
    color: #94a3b8;
}

.tag-catalogue, .cat-catalogue .menu-label { color: #38bdf8; }
.tag-ventes, .cat-ventes .menu-label { color: #34d399; }
.tag-achats, .cat-achats .menu-label { color: #fbbf24; }
.tag-depenses, .cat-depenses .menu-label { color: #fb7185; }
.tag-collab, .cat-collaborateurs .menu-label { color: #c084fc; }
.tag-settings, .cat-monfingo .menu-label { color: #94a3b8; }
.tag-superadmin { color: #f43f5e; }

.nav-menu-link, .menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
}

.nav-menu-link:hover, .menu-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
}

.nav-menu-link.active, .menu-item.active {
    color: #ffffff;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.35);
}

.menu-icon-pill, .menu-item i {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    flex-shrink: 0;
}

.menu-icon-pill i {
    width: 15px;
    height: 15px;
}

.nav-menu-link.active .menu-icon-pill {
    background: var(--primary);
    color: #ffffff;
}

.icon-dashboard, .cat-dashboard i { color: #818cf8; }
.icon-catalogue, .cat-catalogue i { color: #38bdf8; }
.icon-ventes, .cat-ventes i { color: #34d399; }
.icon-achats, .cat-achats i { color: #fbbf24; }
.icon-depenses, .cat-depenses i { color: #fb7185; }
.icon-collab, .cat-collaborateurs i { color: #c084fc; }
.icon-settings, .cat-monfingo i { color: #94a3b8; }
.icon-superadmin { color: #f43f5e; }
.icon-logout, .menu-item.text-danger { color: #f87171 !important; }

/* Main Workspace */
.main-container, .main-container-modern {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-app);
}

/* Topbar */
.topbar, .topbar-modern {
    position: sticky;
    top: 0;
    z-index: 90;
    height: 64px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
}

.topbar-left-wrap, .topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-toggle-btn, .mobile-menu-open {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #ffffff;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
}

.topbar-title, .page-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.topbar-right-wrap, .topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.plan-status-pill, .plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.plan-status-pill i {
    width: 14px;
    height: 14px;
}

.badge-gold, .plan-badge.yearly {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}
.badge-indigo, .plan-badge.monthly {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}
.badge-emerald, .plan-badge.trial {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.badge-warning, .plan-status-pill.badge-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}
.badge-danger, .plan-status-pill.badge-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.badge-superadmin, .plan-badge.superadmin {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

/* Modern Search Inputs for Data Tables */
.table-search-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 280px;
}

.table-search-wrapper i {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.table-search-input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.25rem !important;
    border-radius: var(--radius-pill) !important;
    border: 1px solid var(--border-color) !important;
    background: #ffffff !important;
    font-size: 0.85rem !important;
    transition: var(--transition) !important;
}

.table-search-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-subtle) !important;
}

/* Server-side Pagination Component */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
    border-radius: 0 0 var(--radius-card) var(--radius-card);
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pagination-info strong {
    color: var(--text-main);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.pagination-limit-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-limit-select {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #f8fafc;
    color: var(--text-main);
    cursor: pointer;
}

.pagination-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
}

.pagination-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    background: #ffffff;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: var(--transition);
}

.pagination-nav-btn i {
    width: 15px;
    height: 15px;
}

.pagination-nav-btn:hover:not(.disabled):not(.active) {
    background: var(--primary-subtle);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-nav-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px var(--primary-glow);
}

.pagination-nav-btn.disabled {
    color: #cbd5e1;
    border-color: #f1f5f9;
    background: #f8fafc;
    cursor: not-allowed;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 34px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.topbar-user-menu-container {
    position: relative;
}

.topbar-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.85rem 0.3rem 0.3rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.topbar-user-chip:hover {
    border-color: var(--primary);
    background: var(--primary-subtle);
}

.user-chip-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.user-chip-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
}

.chip-chevron-icon {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.topbar-user-chip[aria-expanded="true"] .chip-chevron-icon {
    transform: rotate(180deg);
}

.topbar-user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 250px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    overflow: hidden;
    animation: dropdownPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.topbar-user-dropdown.show {
    display: block;
}

@keyframes dropdownPop {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-user-header {
    padding: 1rem 1.15rem;
    background: var(--bg-app);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-chip-avatar.lg {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-full-name {
    font-size: 0.875rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
}

.dropdown-links-list {
    padding: 0.4rem 0;
}

.dropdown-link-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1.15rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    transition: var(--transition);
}

.dropdown-link-item i {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.dropdown-link-item:hover {
    background: var(--primary-subtle);
    color: var(--primary);
}

.dropdown-link-item:hover i {
    color: var(--primary);
}

.dropdown-link-item.logout-link {
    color: var(--rose);
    padding: 0.75rem 1.15rem;
}

.dropdown-link-item.logout-link i {
    color: var(--rose);
}

.dropdown-link-item.logout-link:hover {
    background: var(--rose-light);
}

.content-body, .content-body-modern {
    flex: 1;
    padding: 1.75rem;
}

/* Flash alerts */
.impersonate-top-strip {
    background: #f59e0b;
    color: #000000;
    padding: 8px 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.impersonate-badge {
    background: #000000;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-impersonate-exit {
    background: #ffffff;
    color: #000000 !important;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid #000000;
}

.top-banner-warning-glow, .top-banner-info {
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    padding: 0.75rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.banner-cta-btn, .top-banner-info .btn {
    background: #d97706;
    color: #ffffff !important;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
}

.alert, .modern-flash-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.alert-success, .flash-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-danger, .flash-danger {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #9f1239;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.flash-message-text {
    flex: 1;
}

.flash-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
}

/* ==========================================================================
   4. BUTTONS & ACTIONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.2;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 12px var(--primary-glow);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}
.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-success {
    background: var(--emerald);
    color: #ffffff !important;
}
.btn-success:hover {
    background: var(--emerald-dark);
}

.btn-danger {
    background: var(--rose);
    color: #ffffff !important;
}
.btn-danger:hover {
    background: var(--rose-dark);
}

.btn-outline, .btn-outline-primary {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-outline:hover, .btn-outline-primary:hover {
    background: var(--primary-subtle);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-xs {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
}

.btn-glow-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.8rem 1.75rem;
    border-radius: var(--radius-pill);
    background: var(--gradient-primary);
    color: #ffffff !important;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: var(--transition);
}
.btn-glow-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.55);
}

.btn-block, .btn-full {
    width: 100%;
}

.btn-action-icon, .action-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}
.btn-action-icon:hover, .action-icon-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}
.action-icon-btn.edit-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}
.action-icon-btn.delete-btn:hover {
    background: var(--rose-light);
    border-color: var(--rose);
    color: var(--rose);
}

.artistic-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.page-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Quick Action Buttons on Dashboard */
.dashboard-header-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dash-main-title, .h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.dash-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.dashboard-quick-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-quick-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.btn-quick-action i {
    width: 15px;
    height: 15px;
}
.action-devis:hover { background: var(--primary-subtle); border-color: var(--primary); color: var(--primary); }
.action-facture:hover { background: var(--emerald-light); border-color: var(--emerald); color: var(--emerald-dark); }
.action-bl:hover { background: var(--sky-light); border-color: var(--sky); color: var(--sky-dark); }
.action-client:hover { background: var(--violet-light); border-color: var(--violet); color: var(--violet-hover); }

/* ==========================================================================
   5. CARDS & KPIS
   ========================================================================== */
.card, .table-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
}

.card-header.flex-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.card-header h2, .card-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.85rem;
}

.card-footer .btn {
    height: 42px;
    padding: 0 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.card-footer .btn i {
    width: 18px;
    height: 18px;
    margin-right: 4px;
}

/* Stats Grid & Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

.stat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.stat-header .title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    max-width: 80%;
}

.stat-header .icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-header .icon i {
    width: 18px;
    height: 18px;
}

.stat-card .value {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.35rem;
}

.stat-card .desc, .stat-card .label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.stat-card.primary { background: linear-gradient(180deg, rgba(99, 102, 241, 0.04) 0%, #ffffff 100%); }
.stat-card.primary .icon { background: var(--primary-light); color: var(--primary); }

.stat-card.purple { background: linear-gradient(180deg, rgba(139, 92, 246, 0.04) 0%, #ffffff 100%); }
.stat-card.purple .icon { background: var(--violet-light); color: var(--violet); }

.stat-card.success { background: linear-gradient(180deg, rgba(16, 185, 129, 0.04) 0%, #ffffff 100%); }
.stat-card.success .icon { background: var(--emerald-light); color: var(--emerald-dark); }
.stat-card.success .value { color: #059669; }

.stat-card.danger { background: linear-gradient(180deg, rgba(244, 63, 94, 0.04) 0%, #ffffff 100%); }
.stat-card.danger .icon { background: var(--rose-light); color: var(--rose-dark); }
.stat-card.danger .value { color: #e11d48; }

.stat-card.warning { background: linear-gradient(180deg, rgba(245, 158, 11, 0.04) 0%, #ffffff 100%); }
.stat-card.warning .icon { background: var(--amber-light); color: var(--amber-dark); }
.stat-card.warning .value { color: #d97706; }

.dashboard-dual-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 1.5rem;
}

/* Top 10 Clients List */
.top-clients-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-client-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition);
}
.top-client-item:last-child {
    border-bottom: none;
}
.top-client-item:hover {
    background: var(--bg-app);
}

.client-info-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rank-badge {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    width: 24px;
}
.rank-1 { color: #f59e0b; }
.rank-2 { color: #64748b; }
.rank-3 { color: #b45309; }

.client-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.client-ca-badge {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--emerald-dark);
    background: var(--emerald-light);
    padding: 3px 8px;
    border-radius: var(--radius-pill);
}

/* ==========================================================================
   6. TABLES & BADGES
   ========================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table, .modern-data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th, .modern-data-table th {
    background: var(--bg-app);
    padding: 0.85rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.data-table td, .modern-data-table td {
    padding: 0.95rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.875rem;
    color: var(--text-main);
    vertical-align: middle;
}

.data-table tbody tr:hover, .modern-data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.02);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-light { background: #f1f5f9; color: #475569; }
.badge-success { background: var(--emerald-light); color: var(--emerald-dark); }
.badge-warning { background: var(--amber-light); color: var(--amber-dark); }
.badge-danger { background: var(--rose-light); color: var(--rose-dark); }
.badge-primary { background: var(--primary-light); color: var(--primary); }

.cell-user-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

/* Tabs & Panes */
.tab-buttons {
    display: flex;
    gap: 0.35rem;
}

.tab-buttons button.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
}

.tab-container {
    margin-top: 1.5rem;
}

.tab-headers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    margin-bottom: -2px;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* ==========================================================================
   7. FORMS, AUTOCOMPLETE & MODALS (POPUP)
   ========================================================================== */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
}

.form-control, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
    color: var(--text-main);
    background-color: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.form-control:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3.5px rgba(99, 102, 241, 0.12);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.input-wrapper input {
    padding-left: 38px;
}

/* Autocomplete Suggestions Dropdown */
.items-table-wrapper,
.document-create-container .table-responsive,
.document-edit-container .table-responsive {
    overflow: visible !important;
}

#itemsTable tr.item-row {
    position: relative;
}

#itemsTable tr.item-row.is-open,
#itemsTable tr.item-row:focus-within {
    position: relative;
    z-index: 1000 !important;
}

.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.autocomplete-wrapper.is-open,
.autocomplete-wrapper:focus-within {
    z-index: 99999 !important;
}

.suggestions-list {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: max-content;
    min-width: 100%;
    max-width: 520px;
    background: #ffffff;
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 999999 !important;
    max-height: 280px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 0.65rem 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.15s ease, color 0.15s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover, .suggestion-item.selected {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
}

/* MODALS & QUICK POPUPS (MUST ALWAYS BE HIDDEN BY DEFAULT) */
.modal-overlay, .quick-modal-overlay {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 99999 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1.5rem !important;
    overflow-y: auto !important;
}

.modal-overlay.active, .modal-overlay.show, .modal-overlay.open,
.quick-modal-overlay.active, .quick-modal-overlay.show, .quick-modal-overlay.open {
    display: flex !important;
}

.modal-card, .quick-modal {
    background: #ffffff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 620px;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    margin: auto;
    animation: modalPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header, .quick-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}

.modal-header h3, .quick-modal-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.btn-close, .quick-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: var(--transition);
}

.btn-close:hover, .quick-modal-close:hover {
    color: var(--text-main);
    background: #f1f5f9;
}

.btn-close i, .quick-modal-close i {
    width: 18px;
    height: 18px;
}

.modal-body, .quick-modal-body {
    padding: 1.5rem;
    max-height: calc(85vh - 140px);
    overflow-y: auto;
}

.modal-footer, .quick-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: var(--bg-app);
}

/* ==========================================================================
   7.1. DOCUMENT TOTALS & FINANCIAL SUMMARY CARDS
   ========================================================================== */
.document-summary-box {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.document-summary-card, .summary-card {
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-left: auto;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #475569;
    padding: 0.35rem 0;
}

.summary-row span:first-child {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
}

.summary-row span:last-child,
.summary-row strong {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.summary-row input[type="number"] {
    width: 120px;
    padding: 0.35rem 0.65rem;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: right;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    background: #ffffff;
    color: var(--text-main);
}

.summary-row input[type="number"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.summary-row.total {
    border-top: 2px solid var(--border-color);
    padding-top: 0.85rem;
    margin-top: 0.35rem;
}

.summary-row.total span:first-child {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
}

.summary-row.total span:last-child {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

/* Printable / View Document Totals Section */
.print-footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    align-items: flex-start;
}

.print-notes-section {
    font-size: 0.9rem;
    color: #475569;
}

.notes-text {
    margin-top: 0.35rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.signature-box {
    margin-top: 2rem;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    text-align: center;
    width: 240px;
}

.sig-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.sig-line {
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.print-totals-section {
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.totals-table {
    width: 100%;
    border-collapse: collapse;
}

.totals-table td {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.totals-table td.text-right {
    text-align: right;
    font-weight: 700;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.totals-table tr.discount-row td {
    color: var(--rose-dark);
}

.totals-table tr.total-ttc-row {
    border-top: 2px solid var(--border-color);
}

.totals-table tr.total-ttc-row td {
    padding-top: 0.85rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

/* ==========================================================================
   7.2. LOGO UPLOADER COMPONENT (SETTINGS)
   ========================================================================== */
.logo-uploader-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-app);
    border: 1.5px dashed var(--border-color);
    border-radius: var(--radius-md);
}

.logo-preview-wrapper {
    width: 140px;
    height: 90px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.logo-preview-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.logo-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.logo-preview-placeholder i {
    width: 24px;
    height: 24px;
}

.logo-uploader-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.btn-upload-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 700;
}

.remove-logo-check {
    cursor: pointer;
}

.form-divider {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

/* ==========================================================================
   7.3. PRINTABLE COMMERCIAL DOCUMENT VIEW (DEVIS & FACTURES)
   ========================================================================== */
.print-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.print-actions-bar .btn-group {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.printable-document-card {
    background: #ffffff;
    width: 100%;
    max-width: 860px;
    margin: 0 auto 3rem auto;
    padding: 3.5rem 3.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    color: #0f172a;
    position: relative;
}

.print-custom-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    gap: 2rem;
}

.print-logo {
    max-height: 75px;
    max-width: 240px;
    object-fit: contain;
}

.print-logo-placeholder {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.print-header-text {
    text-align: right;
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.55;
}

.print-sep {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, rgba(99, 102, 241, 0.2) 100%);
    margin: 1.5rem 0 2rem 0;
}

.print-info-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 2rem;
    margin-bottom: 2.25rem;
    align-items: stretch;
}

.doc-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.doc-type-title {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 0.35rem;
}

.doc-ref {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.doc-dates {
    font-size: 0.875rem;
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.recipient-meta {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
}

.meta-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.35rem;
    display: block;
}

.recipient-meta h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.recipient-address {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.45;
    margin-bottom: 0.4rem;
}

.recipient-meta p {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.2rem;
}

.print-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.print-items-table thead th {
    background: #f1f5f9;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1rem;
    border-bottom: 2px solid #cbd5e1;
    border-top: 1px solid #e2e8f0;
    text-align: left;
}

.print-items-table thead th.text-right {
    text-align: right;
}

.print-items-table tbody td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
    color: #1e293b;
    vertical-align: top;
}

.print-items-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.ref-text {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: monospace;
    color: #475569;
}

.item-print-desc {
    font-size: 0.8rem;
    color: #64748b;
    font-style: italic;
    margin-top: 0.25rem;
}

.company-legal-mentions {
    margin-top: 3.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.6;
}

.print-custom-footer {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.5;
    font-style: italic;
}

/* ==========================================================================
   8. AUTHENTICATION PAGES (SPLIT SCREEN)
   ========================================================================== */
.auth-page-body {
    background-color: #0b0f19;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.auth-split-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.auth-visual-side {
    flex: 1.1;
    background: radial-gradient(circle at 20% 20%, #1e1b4b 0%, #0f172a 60%, #090d16 100%);
    position: relative;
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    color: #ffffff;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.visual-glow-circle-1 {
    position: absolute;
    top: -15%;
    left: -15%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(99, 102, 241, 0) 70%);
    pointer-events: none;
}

.visual-glow-circle-2 {
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 70, 239, 0.18) 0%, rgba(217, 70, 239, 0) 70%);
    pointer-events: none;
}

.brand-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
    backdrop-filter: blur(12px);
    width: fit-content;
    margin-bottom: 2rem;
}

.brand-icon-wrap {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}
.brand-icon-wrap i {
    width: 15px;
    height: 15px;
}

.brand-name {
    font-weight: 800;
    font-size: 1.05rem;
    color: #ffffff;
}

.version-tag {
    font-size: 0.7rem;
    background: rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-weight: 700;
}

.visual-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.visual-subtitle {
    font-size: 1rem;
    color: #94a3b8;
    line-height: 1.6;
    max-width: 500px;
    margin-bottom: 2rem;
}

.visual-feature-pills {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.feature-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
}
.feature-pill i {
    width: 18px;
    height: 18px;
}

.visual-card-preview {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    backdrop-filter: blur(16px);
    max-width: 440px;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.preview-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.preview-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
    font-size: 0.8rem;
}

.badge-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
}

.preview-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.85rem;
    border-radius: var(--radius-sm);
}

.p-stat .lbl {
    display: block;
    font-size: 0.7rem;
    color: #94a3b8;
    margin-bottom: 0.2rem;
}

.p-stat .val {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
}

.visual-testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    backdrop-filter: blur(16px);
    max-width: 440px;
}

.stars-row {
    display: flex;
    gap: 4px;
    color: #f59e0b;
    margin-bottom: 0.75rem;
}
.fill-gold {
    fill: #f59e0b;
    width: 16px;
    height: 16px;
}

.testimonial-quote {
    font-style: italic;
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.85rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.visual-footer {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 1.5rem;
}

/* Auth Right Side */
.auth-form-side {
    flex: 1;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.75rem;
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
}

.register-container {
    max-width: 460px;
}

.auth-card-header {
    margin-bottom: 1.75rem;
}

.auth-card-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.auth-card-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modern-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.form-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.field-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-forgot-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
}

.field-input-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.field-input-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3.5px rgba(99, 102, 241, 0.12);
}

.field-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    pointer-events: none;
}
.field-icon i {
    width: 18px;
    height: 18px;
}

.field-input-box input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 38px;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--text-main);
}

.field-toggle-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}
.field-toggle-btn:hover {
    color: var(--text-main);
}
.field-toggle-btn i {
    width: 16px;
    height: 16px;
}

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: #475569;
    user-select: none;
}
.custom-checkbox-label input {
    position: absolute;
    opacity: 0;
}

.checkbox-box {
    width: 16px;
    height: 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    display: inline-block;
    position: relative;
    transition: var(--transition);
}
.custom-checkbox-label input:checked ~ .checkbox-box {
    background: var(--primary);
    border-color: var(--primary);
}
.custom-checkbox-label input:checked ~ .checkbox-box::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-bottom-separator {
    position: relative;
    text-align: center;
    margin: 1.5rem 0 1rem 0;
}
.auth-bottom-separator::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
}
.auth-bottom-separator span {
    position: relative;
    background: #ffffff;
    padding: 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
}

.auth-bottom-switch {
    text-align: center;
}
.auth-bottom-switch p {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.btn-outline-subtle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem 1.2rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}
.btn-outline-subtle:hover {
    background: var(--primary-subtle);
    border-color: var(--primary);
    color: var(--primary);
}

.password-strength-container {
    margin-top: 0.35rem;
}
.strength-meter-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    transition: var(--transition);
    margin-bottom: 0.2rem;
}
.strength-meter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
}

/* ==========================================================================
   9. LANDING PAGE (SAAS 2026)
   ========================================================================== */
.landing-page-body {
    background-color: #ffffff;
    color: var(--text-main);
    overflow-x: hidden;
}

.container-landing {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.landing-top-nav-glass {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    height: 68px;
}

.nav-flex-wrapper {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-landing-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.logo-icon-gradient {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}
.logo-icon-gradient i {
    width: 18px;
    height: 18px;
}

.logo-text-group {
    display: flex;
    flex-direction: column;
}

.logo-title-bold {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.logo-sub-tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-links-desktop {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-link-item {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}
.nav-link-item:hover {
    color: var(--primary);
}

.nav-actions-desktop {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link-login {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}
.nav-link-login:hover {
    color: var(--primary);
}

.mobile-nav-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Landing Hero Section */
.landing-hero-section {
    position: relative;
    padding: 4.5rem 0 5.5rem 0;
    background: radial-gradient(circle at 50% 10%, rgba(99, 102, 241, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    overflow: hidden;
}

.hero-glow-blob-1 {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(99, 102, 241, 0) 70%);
    pointer-events: none;
}

.hero-glow-blob-2 {
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(217, 70, 239, 0.08) 0%, rgba(217, 70, 239, 0) 70%);
    pointer-events: none;
}

.hero-main-layout {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.hero-announcement-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    border: 1px solid #e0e7ff;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
    margin-bottom: 1.25rem;
}

.chip-sparkle {
    color: var(--primary);
    display: flex;
    align-items: center;
}
.chip-sparkle i {
    width: 15px;
    height: 15px;
}

.chip-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
}

.chip-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.hero-headline {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.04em;
    color: #0f172a;
    margin-bottom: 1.25rem;
}

.gradient-text-shimmer {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-lead-paragraph {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.65;
    margin-bottom: 1.75rem;
    max-width: 540px;
}

.hero-cta-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.btn-hero-large {
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

.hero-guarantee-note {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}
.hero-guarantee-note i {
    width: 15px;
    height: 15px;
}

.hero-social-proof-strip {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.social-avatars-group {
    display: flex;
}

.avatar-pill {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: #ffffff;
    margin-left: -8px;
}
.avatar-pill:first-child {
    margin-left: 0;
}
.bg-indigo { background: var(--primary); }
.bg-emerald { background: var(--emerald); }
.bg-violet { background: var(--violet); }
.bg-amber { background: var(--amber); }

.social-proof-text {
    font-size: 0.8rem;
    color: #475569;
}

/* 3D Glass Mockup */
.hero-mockup-wrapper {
    position: relative;
}

.floating-stat-badge {
    position: absolute;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.badge-top-left { top: -15px; left: -15px; }
.badge-bottom-right { bottom: -15px; right: -15px; }

.badge-icon-box {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}
.badge-icon-box i {
    width: 16px;
    height: 16px;
}
.bg-success-soft { background: var(--emerald-light); }
.bg-indigo-soft { background: var(--primary-light); }

.badge-title {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
}

.badge-value {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-main);
}

.glass-app-mockup {
    background: #0f172a;
    border-radius: var(--radius-xl);
    border: 1px solid #1e293b;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25);
    overflow: hidden;
    color: #ffffff;
}

.mockup-window-bar {
    background: #090d16;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.window-dots {
    display: flex;
    gap: 5px;
}

.dot-red, .dot-yellow, .dot-green {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.mockup-url-pill {
    background: #1e293b;
    font-size: 0.65rem;
    color: #94a3b8;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    font-family: monospace;
}

.mockup-screen-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.mockup-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mockup-brand-tag {
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #818cf8;
}
.mockup-brand-tag i {
    width: 15px;
    height: 15px;
}

.mockup-badge-active {
    font-size: 0.7rem;
    color: #34d399;
    font-weight: 700;
}

.mockup-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.m-card {
    background: #1e293b;
    border-radius: var(--radius-sm);
    padding: 0.65rem;
}

.m-label {
    display: block;
    font-size: 0.6rem;
    color: #94a3b8;
    margin-bottom: 0.2rem;
}

.m-num {
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffffff;
}

.mockup-chart-box {
    background: #131d33;
    border-radius: var(--radius-sm);
    height: 100px;
    padding: 0.75rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.4rem;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--primary) 0%, rgba(99, 102, 241, 0.2) 100%);
    border-radius: 4px 4px 0 0;
}

/* Landing Section Blocks */
.landing-section {
    padding: 4.5rem 0;
}
.bg-light-modern {
    background: var(--bg-app);
}

.section-title-block {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 3rem auto;
}

.section-tag-pill {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.6rem;
}

.section-heading {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 0.6rem;
}

.section-subtext {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Features Grid */
.features-cards-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.modern-feature-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}
.modern-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.08);
}

.feature-icon-wrapper {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.feature-icon-wrapper i {
    width: 22px;
    height: 22px;
}
.icon-emerald { background: var(--emerald-light); color: var(--emerald); }
.icon-indigo { background: var(--primary-light); color: var(--primary); }
.icon-violet { background: var(--violet-light); color: var(--violet); }
.icon-amber { background: var(--amber-light); color: var(--amber); }
.icon-rose { background: var(--rose-light); color: var(--rose); }
.icon-cyan { background: var(--sky-light); color: var(--sky); }

.feature-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}
.feature-card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* Pricing Cards */
.pricing-cards-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
    align-items: stretch;
}

.modern-pricing-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.25rem 1.75rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: var(--transition);
}

.featured-popular-card {
    border: 2px solid var(--primary);
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.25);
}

.popular-ribbon-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 14px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.05em;
}

.discount-pill-top {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--emerald);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
}

.card-plan-header {
    margin-bottom: 1.25rem;
}

.plan-type-tag {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.06em;
}
.tag-featured { color: var(--primary); }

.plan-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0.2rem 0;
}
.plan-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.plan-price-block {
    margin-bottom: 1.25rem;
}

.price-figure {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    letter-spacing: -0.03em;
}
.price-figure .currency {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}
.price-period {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.plan-divider {
    height: 1px;
    background: var(--border-color);
    margin-bottom: 1.25rem;
}

.plan-feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}
.plan-feature-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #334155;
}
.plan-feature-list li i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-pricing-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-pill);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.875rem;
    background: #ffffff;
    transition: var(--transition);
}
.btn-pricing-outline:hover {
    background: var(--primary-subtle);
    border-color: var(--primary);
    color: var(--primary);
}

/* Testimonials */
.testimonials-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.modern-testimonial-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
}

.stars-gold {
    color: #f59e0b;
    font-size: 1rem;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
}

.quote-text {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #334155;
    margin-bottom: 1.25rem;
    font-style: italic;
}

.author-info-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.author-avatar-chip {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.author-sub {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* FAQ */
.max-w-800 {
    max-width: 780px;
    margin: 0 auto;
}

.faq-accordion-container {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.faq-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.35rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.faq-item[open] {
    border-color: var(--primary);
}

.faq-question {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}
.faq-question::-webkit-details-marker {
    display: none;
}

.faq-answer {
    margin-top: 0.85rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* CTA Banner */
.landing-cta-banner-section {
    padding: 3.5rem 0 5rem 0;
}

.cta-banner-card-glow {
    background: radial-gradient(circle at 50% 50%, #312e81 0%, #1e1b4b 60%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    padding: 4rem 1.75rem;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 25px 60px -10px rgba(49, 46, 129, 0.4);
}

.cta-banner-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.cta-banner-desc {
    font-size: 1.05rem;
    color: #cbd5e1;
    max-width: 550px;
    margin: 0 auto 2rem auto;
}

.btn-white-glow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #ffffff;
    color: var(--primary-dark) !important;
    font-weight: 800;
    font-size: 1rem;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-pill);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Footer */
.landing-footer-modern {
    background: #090d16;
    border-top: 1px solid #1e293b;
    padding: 4rem 0 2rem 0;
    color: #94a3b8;
}

.footer-grid-modern {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-desc-text {
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0.85rem 0 1rem 0;
    max-width: 300px;
}

.footer-compliance-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 700;
}
.footer-compliance-badge i {
    width: 14px;
    height: 14px;
}

.footer-col-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.footer-links-col {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-nav-link {
    color: #94a3b8;
    font-size: 0.85rem;
    transition: var(--transition);
}
.footer-nav-link:hover {
    color: #ffffff;
    transform: translateX(2px);
}

.footer-security-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.footer-security-list li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
}
.footer-security-list li i {
    width: 15px;
    height: 15px;
}

.footer-bottom-bar {
    border-top: 1px solid #1e293b;
    padding-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
}

/* ==========================================================================
   10. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
    .auth-visual-side {
        display: none;
    }
    .sidebar, .sidebar-modern {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .sidebar.show-sidebar, .sidebar-modern.show-sidebar, .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-close-btn, .sidebar-close {
        display: block;
    }
    .mobile-toggle-btn, .mobile-menu-open {
        display: inline-flex;
    }
    .hero-main-layout {
        grid-template-columns: 1fr;
    }
    .dashboard-dual-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid-modern {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links-desktop, .nav-actions-desktop {
        display: none !important;
    }
    .mobile-nav-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        color: #0f172a;
        font-size: 1.25rem;
        cursor: pointer;
    }
    .form-row, .form-row-2col {
        grid-template-columns: 1fr;
    }
    .footer-grid-modern {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Navigation Drawer Overlay & Drawer */
.mobile-nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}
.mobile-nav-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: #ffffff;
    z-index: 9999;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}
.mobile-nav-drawer.active {
    transform: translateX(0);
}

.mobile-nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-nav-drawer-close {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
}
.mobile-nav-drawer-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.mobile-nav-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.mobile-nav-section-title {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.mobile-nav-solutions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-solution-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.15s ease;
}
.mobile-solution-card:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.mobile-solution-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mobile-solution-icon.icon-fatourati {
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
}
.mobile-solution-icon.icon-queuesaas {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.mobile-solution-name {
    display: block;
    font-size: 0.95rem;
    color: #0f172a;
    font-weight: 800;
}
.mobile-solution-desc {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
}

.mobile-nav-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mobile-nav-link-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    color: #334155;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.15s ease;
}
.mobile-nav-link-item:hover {
    background: #f1f5f9;
    color: var(--primary);
}
.mobile-nav-link-item i {
    width: 16px;
    height: 16px;
    color: #94a3b8;
}

/* Autocomplete suggestions dropdown (ICE & Raison Sociale) */
.autocomplete-suggestions-box {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1.5px solid var(--primary);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    z-index: 10000;
    max-height: 260px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: var(--primary-subtle);
}

.suggestion-item .s-title {
    font-size: 0.875rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.suggestion-item .s-title i {
    width: 14px;
    height: 14px;
    color: var(--primary);
}

.suggestion-item .s-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

.suggestion-item .s-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.suggestion-item .s-sub i {
    width: 12px;
    height: 12px;
}

/* ==========================================================================
   Navigation Solutions Dropdown Menu
   ========================================================================== */
.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    padding: 0.5rem 0;
    cursor: pointer;
    transition: color 0.15s;
}

.nav-dropdown-toggle i {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle {
    color: var(--primary);
}

.nav-dropdown:hover .nav-dropdown-toggle i {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: -10px;
    min-width: 290px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-lg);
    padding: 0.6rem;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.15s ease;
}

.nav-dropdown-item:hover {
    background: #f8fafc;
    transform: translateX(3px);
}

.dropdown-item-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dropdown-item-icon i {
    width: 20px;
    height: 20px;
}
.dropdown-icon-indigo { background: rgba(79, 70, 229, 0.1); color: #4f46e5; }
.dropdown-icon-emerald { background: rgba(16, 185, 129, 0.1); color: #10b981; }

.dropdown-item-text {
    display: flex;
    flex-direction: column;
}

.dropdown-item-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.dropdown-item-sub {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

/* ==========================================================================
   11. DRAG & DROP LINE REORDERING (DOCUMENTS - DEVIS / FACTURES / BC / BL)
   ========================================================================== */
.drag-handle-cell {
    cursor: grab;
    text-align: center;
    vertical-align: middle;
    color: #94a3b8;
    padding: 0.5rem 0.35rem !important;
    user-select: none;
    transition: var(--transition);
}

.drag-handle-cell:hover,
.item-row:hover .drag-handle-cell {
    color: var(--primary);
    background-color: var(--primary-subtle);
}

.drag-handle-cell:active {
    cursor: grabbing;
}

.drag-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
}

.item-row {
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.item-row.dragging {
    opacity: 0.45;
    background-color: #f1f5f9 !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.item-row.drag-over-top {
    border-top: 3px solid var(--primary) !important;
}

.item-row.drag-over-bottom {
    border-bottom: 3px solid var(--primary) !important;
}

