    /* ===== VARIABLES & RESET ===== */
    :root {
        --primary: #0d6efd;
        --dark: #111827;
        --gray: #6b7280;
        --light-bg: #f3f6fb;
        --border-light: #e7ecf5;
        --shadow-sm: 0 10px 30px rgba(17, 24, 39, 0.08);
        --radius-lg: 24px;
        --radius-md: 18px;
        --radius-sm: 14px;
    }

    body {
        background: var(--light-bg);
        padding-bottom: 80px; /* Espace pour la bottom nav */
    }

    /* Conteneur principal responsive */
    .app-shell {
        max-width: 1100px;
        margin: 0 auto;
        padding: 0 12px;
    }

    /* ===== HERO SECTION ===== */
    .hero {
        border-radius: var(--radius-lg);
        color: #fff;
        background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 65%);
        box-shadow: 0 16px 45px rgba(0, 0, 0, 0.15);
        overflow: hidden;
        position: relative;
    }

    .hero::after {
        content: "";
        position: absolute;
        inset: -60px -40px auto auto;
        width: 220px;
        height: 220px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 999px;
        transform: rotate(15deg);
        pointer-events: none;
    }

    /* Chip badge */
    .chip {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.45rem 0.75rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.18);
        font-size: 0.85rem;
        backdrop-filter: blur(6px);
    }

    /* Cartes KPIs */
    .cardx {
        border-radius: var(--radius-md);
        border: 0;
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(4px);
        transition: transform 0.2s ease;
    }

    .cardx:active {
        transform: scale(0.98);
    }

    .kpi {
        font-weight: 900;
        font-size: 1.4rem;
        letter-spacing: 0.5px;
    }

    .kpi-sub {
        color: rgba(255, 255, 255, 0.8);
        font-size: 0.8rem;
    }

    /* ===== TUILES D'ACTIONS ===== */
    .tile {
        border-radius: var(--radius-md);
        background: #fff;
        border: 0;
        box-shadow: var(--shadow-sm);
        padding: 14px;
        height: 100%;
        transition: all 0.2s ease;
        text-decoration: none;
        color: inherit;
        display: flex;
        gap: 12px;
        align-items: center;
        cursor: pointer;
    }

    .tile:active {
        transform: scale(0.98);
        background: #f8f9fa;
    }

    .icon {
        width: 48px;
        height: 48px;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        background: #f1f5ff;
        flex-shrink: 0;
    }

    .tile-title {
        font-weight: 800;
        margin: 0;
        font-size: 1rem;
    }

    .tile-sub {
        margin: 0;
        color: var(--gray);
        font-size: 0.8rem;
    }

    /* ===== LISTE DES FACTURES ===== */
    .list-card {
        border-radius: var(--radius-md);
        border: 0;
        box-shadow: var(--shadow-sm);
        overflow: hidden;
        background: #fff;
    }

    .rowline {
        padding: 16px;
        border-bottom: 1px solid #eef2f7;
        transition: background 0.2s ease;
    }

    .rowline:active {
        background: #f8f9fa;
    }

    .rowline:last-child {
        border-bottom: 0;
    }

    .badge-pill {
        border-radius: 999px;
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    /* ===== BOTTOM NAVIGATION ===== */
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(243, 246, 251, 0.95);
        backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-light);
        padding: 8px 0;
        z-index: 1000;
    }

    .navbtn {
        border-radius: var(--radius-sm);
        padding: 12px;
        background: #fff;
        border: 1px solid var(--border-light);
        box-shadow: 0 4px 12px rgba(17, 24, 39, 0.06);
        text-decoration: none;
        color: var(--dark);
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        transition: all 0.2s ease;
        cursor: pointer;
    }

    .navbtn:active {
        transform: scale(0.97);
        background: #f8f9fa;
    }

    /* Bouton déconnexion corrigé */
    .logout-btn {
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: var(--radius-sm);
        padding: 8px 14px;
        color: white;
        font-weight: 600;
        font-size: 0.85rem;
        transition: all 0.2s ease;
        cursor: pointer;
    }

    .logout-btn:active {
        transform: scale(0.96);
        background: rgba(255, 255, 255, 0.25);
    }

    /* ===== RESPONSIVE TABLETTE ===== */
    @media (min-width: 768px) {
        .app-shell {
            padding: 0 20px;
        }
        
        .kpi {
            font-size: 1.6rem;
        }
        
        .tile {
            padding: 16px;
        }
        
        .icon {
            width: 52px;
            height: 52px;
            font-size: 24px;
        }
    }

    /* ===== RESPONSIVE GRAND ÉCRAN ===== */
    @media (min-width: 1024px) {
        .app-shell {
            padding: 0 24px;
        }
    }

    /* Support notch / safe area */
    @supports (padding-bottom: env(safe-area-inset-bottom)) {
        .bottom-nav {
            padding-bottom: calc(8px + env(safe-area-inset-bottom));
        }
        
        body {
            padding-bottom: calc(80px + env(safe-area-inset-bottom));
        }
    }