/* ==========================================================================
   Premigest custom UI — global application styles
   Palette: navy #243b55, violet #7047ee, bleu #3596f7
   ========================================================================== */

/* --- Navbar compacte (alignée sur la sidebar : margin 0.75rem) --- */
:root {
    --pg-layout-edge: 0.75rem;
    --pg-surface-bg: linear-gradient(135deg, #f8fafc 0%, #fff 55%, #f5f3ff 100%);
    --pg-surface-border: 1px solid #e2e8f0;
    --pg-surface-radius: 10px;
    --pg-surface-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}
.main-header {
    max-height: none !important;
    height: auto !important;
    background: #00000000 !important;
}
.main-header .navbar {
    min-height: 0 !important;
    height: auto !important;
    margin-top: var(--pg-layout-edge) !important;
    margin-bottom: var(--pg-layout-edge) !important;
    padding: 0.3rem 1.1rem !important;
    background: var(--pg-surface-bg) !important;
    border: var(--pg-surface-border) !important;
    border-radius: var(--pg-surface-radius) !important;
    box-shadow: var(--pg-surface-shadow) !important;
    overflow: hidden;
}

/* Blocs du content-wrapper — même border-radius que la sidebar */
.content-wrapper .box,
.content-wrapper .po-list-card,
.content-wrapper .po-upd-card,
.content-wrapper .po-list-hero,
.content-wrapper .po-upd-hero,
.content-wrapper .gr-show-hero,
.content-wrapper .cp-set-hero,
.content-wrapper .pg-page-header,
.content-wrapper .po-list-stat,
.content-wrapper .usr-stat-card,
.content-wrapper .ctyp-stat-card,
.content-wrapper .icat-stat-card,
.content-wrapper .exp-stat-card,
.content-wrapper .cp-set-form-section,
.content-wrapper .cp-set-asset,
.content-wrapper .cp-set-fac-card,
.content-wrapper .usr-perm-group,
.content-wrapper .exp-filters,
.content-wrapper .inv-summary-card {
    border-radius: var(--pg-surface-radius) !important;
}
.main-header .navbar .app-menu,
.main-header .navbar .navbar-custom-menu {
    display: flex;
    align-items: center;
}
.main-header .header-megamenu .nav-item {
    margin: 0 !important;
}
.main-header .push-btn,
.main-header .full-screen,
.main-header .svg-bt-icon {
    height: 36px !important;
    width: 36px !important;
    /* padding: 6px !important; */
    line-height: 22px !important;
    font-size: 1.25rem !important;
    margin: 0 3px !important;
    border-radius: 8px;
}
.navbar-custom-menu .navbar-nav > li,
.main-header .navbar-custom-menu .navbar-nav > li {
    height: auto !important;
    min-height: 0 !important;
    display: flex;
    align-items: center;
}
.navbar-custom-menu .navbar-nav > li > a.dropdown-toggle,
.navbar-custom-menu .navbar-nav > li:last-child > a,
.navbar-custom-menu .navbar-nav > li:last-child > form,
.main-header .r-side .app-menu,
.main-header .r-side .btn-group a,
.main-header .r-side .btn-group .nav-item,
.main-header .r-side .btn-group form {
    margin: 0 4px !important;
    height: 36px !important;
    width: auto !important;
    min-width: 36px;
    padding: 6px 10px !important;
    line-height: 1.2 !important;
    font-size: 0.88rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: transparent !important;
    box-shadow: none !important;
}
.main-header .navbar-custom-menu .btn-as-text {
    height: auto !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0.88rem !important;
    line-height: 1.2 !important;
    display: inline !important;
}
.stock-alert-menu {
    display: flex;
    align-items: center;
}
.navbar-logout-form {
    padding: 0 !important;
    margin: 0 4px !important;
}
.navbar-logout-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border: 0;
    background: transparent;
    color: #dc2626;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: none;
}
.navbar-logout-btn:hover,
.navbar-logout-btn:focus {
    background: #fef2f2;
    color: #b91c1c;
    outline: none;
}
.stock-alert-toggle {
    padding: 0.2rem 0.35rem !important;
    min-height: 0 !important;
    height: 36px !important;
}
.navbar-stock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0d9488;
    font-size: 1.15rem;
    line-height: 1;
    border-radius: 8px;
    text-decoration: none;
}
.navbar-stock-btn:hover,
.navbar-stock-btn:focus {
    color: #0f766e;
    background: rgba(13, 148, 136, 0.08);
    text-decoration: none;
}
.navbar-stock-btn--sale {
    color: #16a34a;
}
.navbar-stock-btn--sale:hover,
.navbar-stock-btn--sale:focus {
    color: #15803d;
    background: rgba(22, 163, 74, 0.1);
}
.navbar-stock-btn--invoice {
    color: #2563eb;
}
.navbar-stock-btn--invoice:hover,
.navbar-stock-btn--invoice:focus {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.1);
}
.navbar-stock-btn--proforma {
    color: #d97706;
}
.navbar-stock-btn--proforma:hover,
.navbar-stock-btn--proforma:focus {
    color: #b45309;
    background: rgba(217, 119, 6, 0.1);
}
.navbar-stock-btn--expense {
    color: #e11d48;
}
.navbar-stock-btn--expense:hover,
.navbar-stock-btn--expense:focus {
    color: #be123c;
    background: rgba(225, 29, 72, 0.1);
}
.fixed .content-wrapper {
    margin-top: calc(var(--pg-layout-edge) + 0.3rem + 36px + 0.3rem + var(--pg-layout-edge)) !important;
}
@media (max-width: 767px) {
    .main-header .navbar {
        margin-top: var(--pg-layout-edge) !important;
        padding: 0.25rem 0.75rem !important;
    }
    .fixed .content-wrapper {
        margin-top: calc(var(--pg-layout-edge) + 0.25rem + 36px + 0.25rem + var(--pg-layout-edge)) !important;
    }
}

/* --- Layout: sidebar --- */
/* Sidebar Premigest — CSS uniquement, structure/JS inchangés */
    .main-sidebar.main-sidebar--app {
        background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
        border: 1px solid #e8ecf4;
        box-shadow: 0 8px 28px rgba(36, 59, 85, 0.07);
        margin-top: var(--pg-layout-edge) !important;
        margin-bottom: var(--pg-layout-edge) !important;
        margin-left: var(--pg-layout-edge) !important;
        border-radius: var(--pg-surface-radius) !important;
    }
    .main-sidebar--app .logo-box {
        padding-top: 0.85rem !important;
        padding-bottom: 0.65rem !important;
        border-bottom: 1px solid #eef2f7;
        margin-bottom: 0.15rem;
    }
    .main-sidebar--app .logo .logo-lg img {
        max-height: 42px;
        width: auto;
        object-fit: contain;
    }
    .main-sidebar--app .sidebar-user-card {
        background: linear-gradient(135deg, #f5f3ff 0%, #eef4ff 100%) !important;
        border: 1px solid #e0e7ff !important;
        box-shadow: none !important;
        margin-top: 0.75rem !important;
        margin-bottom: 0.5rem !important;
        padding: 0.85rem 0.9rem !important;
    }
    .main-sidebar--app .sidebar-user-card h4 {
        font-size: 1.08rem;
        color: #243b55;
    }
    .main-sidebar--app .sidebar-user-card p {
        font-size: 0.92rem;
        color: #64748b;
        margin-bottom: 0.25rem !important;
    }
    .main-sidebar--app .sidebar-user-card .badge {
        font-size: 0.78rem;
        font-weight: 600;
        padding: 0.25em 0.55em;
    }
    .main-sidebar--app .user-profile .dropdown-menu.user-profile-menu {
        padding: 0.45rem;
        border: var(--pg-surface-border);
        border-radius: var(--pg-surface-radius);
        box-shadow: var(--pg-surface-shadow);
    }
    .main-sidebar--app .user-profile .dropdown-menu .dropdown-item {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        padding: 0.5rem 0.55rem;
        border-radius: 8px;
        font-size: 0.88rem;
        font-weight: 600;
        color: #334155;
        transition: background 0.15s ease, color 0.15s ease;
    }
    .main-sidebar--app .user-profile .dropdown-menu .dropdown-item:hover,
    .main-sidebar--app .user-profile .dropdown-menu .dropdown-item:focus {
        background: #f5f3ff;
        color: #30497a;
    }
    .main-sidebar--app .user-profile .dropdown-menu .dropdown-item > i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.75rem;
        height: 1.75rem;
        border-radius: 7px;
        font-size: 0.82rem;
        flex-shrink: 0;
        vertical-align: middle;
        transition: background 0.15s ease, color 0.15s ease;
    }
    .main-sidebar--app .user-profile-menu__item--profile > i {
        background: #ede9fe;
        color: #7047ee;
    }
    .main-sidebar--app .user-profile-menu__item--password > i {
        background: #fef3c7;
        color: #d97706;
    }
    .main-sidebar--app .user-profile-menu__item--security > i {
        background: #dbeafe;
        color: #2563eb;
    }
    .main-sidebar--app .user-profile-menu__item--subscription > i {
        background: #d1fae5;
        color: #059669;
    }
    .main-sidebar--app .user-profile-menu__item--logout {
        color: #b91c1c;
    }
    .main-sidebar--app .user-profile-menu__item--logout > i {
        background: #fef2f2;
        color: #dc2626;
    }
    .main-sidebar--app .user-profile-menu__item--logout:hover,
    .main-sidebar--app .user-profile-menu__item--logout:focus {
        background: #fef2f2;
        color: #991b1b;
    }
    .main-sidebar--app .user-profile-menu__item--logout:hover > i,
    .main-sidebar--app .user-profile-menu__item--logout:focus > i {
        background: #fee2e2;
        color: #b91c1c;
    }
    .main-sidebar--app .multinav-scroll {
        scrollbar-width: thin;
        scrollbar-color: #c7d2fe transparent;
    }
    .main-sidebar--app .multinav-scroll::-webkit-scrollbar {
        width: 5px;
    }
    .main-sidebar--app .multinav-scroll::-webkit-scrollbar-thumb {
        background: #c7d2fe;
        border-radius: 999px;
    }
    .main-sidebar--app .sidebar-menu {
        padding: 0.35rem 0.5rem 1.5rem !important;
    }
    .main-sidebar--app .sidebar-menu > li {
        margin: 2px 0 !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
    }
    .main-sidebar--app .sidebar-menu > li > a {
        display: flex !important;
        align-items: center !important;
        padding: 0.65rem 0.75rem !important;
        border-radius: 10px !important;
        font-size: 1.04rem !important;
        font-weight: 600;
        color: #334155 !important;
        transition: background 0.15s ease, color 0.15s ease;
    }
    .main-sidebar--app .sidebar-menu > li > a > span:not(.pull-right-container) {
        line-height: 1.35;
        position: static !important;
        top: auto !important;
        flex: 1;
        min-width: 0;
    }
    .main-sidebar--app .sidebar-menu > li > a > .pull-right-container,
    .main-sidebar--app .treeview-menu > li > a > .pull-right-container {
        position: static !important;
        top: auto !important;
        right: auto !important;
        margin-top: 0 !important;
        margin-left: auto !important;
        display: inline-flex !important;
        align-items: center !important;
        vertical-align: middle;
        flex-shrink: 0;
        line-height: 1;
        height: auto;
    }
    .main-sidebar--app .sidebar-menu > li > a > i {
        width: 36px !important;
        height: 36px !important;
        line-height: 36px !important;
        font-size: 1.32rem !important;
        margin-right: 0.55rem !important;
        border-radius: 9px !important;
        background: #f1f5f9 !important;
        color: #475569 !important;
        transition: background 0.15s ease, color 0.15s ease;
    }
    .main-sidebar--app .sidebar-menu > li:hover > a,
    .main-sidebar--app .sidebar-menu > li.menu-open > a {
        background: #f5f3ff !important;
        color: #30497a !important;
    }
    .main-sidebar--app .sidebar-menu > li:hover > a > i,
    .main-sidebar--app .sidebar-menu > li.menu-open > a > i {
        background: #ede9fe !important;
        color: #7047ee !important;
    }
    .main-sidebar--app .sidebar-menu > li.active > a,
    .main-sidebar--app .sidebar-menu > li.active.treeview > a {
        background: linear-gradient(90deg, #f5f3ff, rgba(245, 243, 255, 0.4)) !important;
        color: #7047ee !important;
    }
    .main-sidebar--app .sidebar-menu > li.active > a > i,
    .main-sidebar--app .sidebar-menu > li.active.treeview > a > i {
        background: #7047ee !important;
        color: #fff !important;
    }
    .main-sidebar--app .sidebar-menu > li > a > .pull-right-container > .fa-angle-right,
    .main-sidebar--app .sidebar-menu > li > a > .pull-right-container > i,
    .main-sidebar--app .treeview-menu > li > a > .pull-right-container > .fa-angle-right,
    .main-sidebar--app .treeview-menu > li > a > .pull-right-container > i {
        font-size: 1rem;
        color: #94a3b8;
        margin: 0 !important;
        vertical-align: middle;
        line-height: 1;
        position: static !important;
        top: auto !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
    }
    .main-sidebar--app .sidebar-menu > li.active > a > .pull-right-container > .fa-angle-right,
    .main-sidebar--app .sidebar-menu > li.menu-open > a > .pull-right-container > .fa-angle-right {
        color: #7047ee;
    }
    .main-sidebar--app .sidebar-menu li.nav-devider {
        margin: 0.65rem 0.75rem !important;
        background: linear-gradient(90deg, transparent, #e2e8f0, transparent) !important;
        height: 1px;
    }
    .main-sidebar--app .treeview-menu {
        margin: 0.2rem 0 0.35rem 0.15rem !important;
        padding: 0.15rem 0 0.25rem 0.65rem !important;
        border-left: 2px solid #e0e7ff;
    }
    .main-sidebar--app .treeview-menu > li {
        margin: 1px 0 !important;
    }
    .main-sidebar--app .treeview-menu > li > a {
        display: flex !important;
        align-items: center !important;
        padding: 0.52rem 0.65rem 0.52rem 0.75rem !important;
        font-size: 0.96rem !important;
        font-weight: 500;
        color: #64748b !important;
        border-radius: 8px !important;
        transition: background 0.15s ease, color 0.15s ease;
    }
    .main-sidebar--app .treeview-menu > li > a > i {
        width: 22px !important;
        padding: 0 !important;
        margin-right: 0.5rem !important;
        font-size: 0.84rem !important;
        color: #94a3b8 !important;
        background: transparent !important;
        line-height: 1 !important;
        height: auto !important;
    }
    .main-sidebar--app .treeview-menu > li > a:hover {
        background: #f8fafc !important;
        color: #30497a !important;
    }
    .main-sidebar--app .treeview-menu > li.active > a {
        background: #ede9fe !important;
        color: #7047ee !important;
        font-weight: 600;
    }
    .main-sidebar--app .treeview-menu > li.active > a > i {
        color: #7047ee !important;
    }
    .main-sidebar--app .treeview-menu > li > a .badge {
        font-size: 0.76rem;
        padding: 0.2em 0.45em;
        border-radius: 999px;
        margin-left: 0.25rem;
        vertical-align: middle;
    }
    .main-sidebar--app .sidebar-widgets .copyright {
        padding: 0.5rem 0.75rem 1rem;
    }
    .main-sidebar--app .sidebar-widgets .copyright p {
        font-size: 0.84rem;
        color: #94a3b8;
        line-height: 1.45;
        margin: 0;
    }
    .main-sidebar--app .sidebar-widgets .copyright strong {
        color: #64748b;
        font-weight: 700;
    }

    /* Sidebar réduite : icônes centrées + sous-menus au survol */
    @media (min-width: 768px) {
        .sidebar-mini.sidebar-collapse .main-sidebar--app,
        .sidebar-mini.sidebar-collapse .main-sidebar--app > .sidebar,
        .sidebar-mini.sidebar-collapse .main-sidebar--app .multinav,
        .sidebar-mini.sidebar-collapse .main-sidebar--app .multinav-scroll,
        .sidebar-mini.sidebar-collapse .main-sidebar--app .multinav-scroll.ps {
            overflow: visible !important;
        }
        .sidebar-mini.sidebar-collapse .main-sidebar--app .logo-box {
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            width: 60px !important;
            padding-left: 0 !important;
            padding-right: 0 !important;
        }
        .sidebar-mini.sidebar-collapse .main-sidebar--app .logo {
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            width: 100% !important;
            padding: 0 !important;
        }
        .sidebar-mini.sidebar-collapse .main-sidebar--app .logo .logo-lg img {
            max-height: 34px;
            margin: 0 auto;
        }
        .sidebar-mini.sidebar-collapse .main-sidebar--app .sidebar-menu {
            padding-left: 0 !important;
            padding-right: 0 !important;
        }
        .sidebar-mini.sidebar-collapse .main-sidebar--app .sidebar-menu > li {
            padding-left: 0 !important;
            padding-right: 0 !important;
            margin: 3px 0 !important;
            position: relative;
            text-align: center;
        }
        .sidebar-mini.sidebar-collapse .main-sidebar--app .sidebar-menu > li > a {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            width: 46px !important;
            height: 46px !important;
            padding: 0 !important;
            margin: 0 auto !important;
        }
        .sidebar-mini.sidebar-collapse .main-sidebar--app .sidebar-menu > li > a > i {
            width: 36px !important;
            height: 36px !important;
            line-height: 36px !important;
            margin: 0 !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            text-align: center !important;
        }
        .sidebar-mini.sidebar-collapse .main-sidebar--app .sidebar-menu > li > a > .pull-right-container {
            display: none !important;
        }
        .sidebar-mini.sidebar-collapse .main-sidebar--app .sidebar-menu li.nav-devider {
            margin: 0.55rem 14px !important;
        }
        /* Flyout : sous-menus au survol (jQuery slideUp laisse height:0 / overflow:hidden) */
        .sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .main-sidebar--app .sidebar-menu > li:hover > .treeview-menu {
            display: block !important;
            height: auto !important;
            overflow: visible !important;
            position: absolute !important;
            width: 21.29rem !important;
            left: 64px !important;
            top: 0 !important;
            margin: 0 !important;
            padding: 0.65rem 0.75rem !important;
            z-index: 1060;
            text-align: left !important;
            background: #fff !important;
            border: var(--pg-surface-border) !important;
            border-left: 2px solid #e0e7ff !important;
            border-radius: var(--pg-surface-radius) !important;
            box-shadow: var(--pg-surface-shadow) !important;
        }
        .sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .main-sidebar--app .sidebar-menu > li:hover > .treeview-menu > li > a {
            display: flex !important;
            align-items: center !important;
            justify-content: flex-start !important;
            width: auto !important;
            height: auto !important;
            text-align: left !important;
        }
        .sidebar-mini.sidebar-collapse .main-sidebar--app .sidebar-menu .treeview-menu > .treeview {
            position: relative;
            text-align: left;
        }
        .sidebar-mini.sidebar-collapse .main-sidebar--app .sidebar-menu .treeview-menu > .treeview:hover > .treeview-menu {
            display: block !important;
            height: auto !important;
            overflow: visible !important;
            position: absolute !important;
            left: 21.29rem !important;
            top: 0 !important;
            width: 21.29rem !important;
            margin: 0 !important;
            padding: 0.65rem 0.75rem !important;
            z-index: 1061;
            text-align: left !important;
            background: #fff !important;
            border: var(--pg-surface-border) !important;
            border-radius: var(--pg-surface-radius) !important;
            box-shadow: var(--pg-surface-shadow) !important;
        }
        .sidebar-mini.sidebar-collapse .main-sidebar--app .sidebar-menu .treeview-menu > .treeview:hover > .treeview-menu > li > a {
            display: flex !important;
            align-items: center !important;
            justify-content: flex-start !important;
            width: auto !important;
            height: auto !important;
            text-align: left !important;
        }
    }

/* --- Layout: stock alerts --- */
.stock-alert-menu { position: relative; }
    .stock-alert-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: .4rem .55rem !important;
        margin: 0;
        border: 0 !important;
        background: transparent !important;
        background-color: transparent !important;
        box-shadow: none !important;
        cursor: pointer;
        color: #7047ee;
        line-height: 1;
        outline: none !important;
    }
    .stock-alert-toggle:hover,
    .stock-alert-toggle:focus,
    .stock-alert-toggle:active,
    .stock-alert-toggle:focus-visible,
    .stock-alert-toggle[aria-expanded="true"] {
        background: transparent !important;
        background-color: transparent !important;
        box-shadow: none !important;
        color: #7047ee !important;
        border: 0 !important;
        outline: none !important;
    }
    .stock-alert-toggle::before,
    .stock-alert-toggle::after {
        display: none !important;
    }
    .stock-alert-toggle__icon-wrap {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        font-size: 1.15rem;
        line-height: 1;
    }
    .stock-alert-badge {
        position: absolute;
        top: -8px;
        right: -10px;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        border-radius: 999px;
        background: linear-gradient(135deg, #7047ee, #3596f7);
        color: #fff;
        font-size: .62rem;
        font-weight: 800;
        line-height: 17px;
        text-align: center;
        box-shadow: 0 1px 4px rgba(112, 71, 238, 0.5);
        border: 2px solid #fff;
        pointer-events: none;
    }
    .stock-alert-panel {
        display: none;
        position: fixed;
        z-index: 10050;
        width: 360px;
        max-width: calc(100vw - 24px);
        border-radius: 14px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 16px 40px rgba(36, 59, 85, 0.18);
        border: 1px solid #e2e8f0;
    }
    .stock-alert-panel.is-open {
        display: block;
        animation: stockAlertIn .2s ease;
    }
    @keyframes stockAlertIn {
        from { opacity: 0; transform: translateY(-6px) scale(0.98); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }
    .stock-alert-panel__header {
        display: flex;
        align-items: center;
        gap: .75rem;
        padding: .9rem 1rem;
        background: linear-gradient(135deg, #f5f3ff, #eef4ff);
        border-bottom: 1px solid #ddd6fe;
    }
    .stock-alert-panel__header-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #30497a, #7047ee);
        color: #fff;
        font-size: .9rem;
        flex-shrink: 0;
    }
    .stock-alert-panel__header strong {
        display: block;
        color: #243b55;
        font-size: .92rem;
    }
    .stock-alert-panel__header small {
        color: #64748b;
        font-size: .75rem;
    }
    .stock-alert-panel__body {
        max-height: 340px;
        overflow-y: auto;
    }
    .stock-alert-panel__list {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .stock-alert-panel__item {
        display: flex;
        align-items: center;
        gap: .65rem;
        padding: .75rem 1rem;
        text-decoration: none;
        border-bottom: 1px solid #f1f5f9;
        transition: background .15s ease;
    }
    .stock-alert-panel__item:hover {
        background: #faf5ff;
    }
    .stock-alert-panel__item-content {
        flex: 1;
        min-width: 0;
    }
    .stock-alert-item__icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        font-size: .78rem;
    }
    .stock-alert-item__icon--warning {
        background: #f5f3ff;
        color: #7047ee;
    }
    .stock-alert-item__icon--critical {
        background: #eef4ff;
        color: #30497a;
    }
    .stock-alert-item__title {
        display: block;
        font-weight: 700;
        color: #243b55;
        font-size: .86rem;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .stock-alert-item__code {
        display: block;
        font-size: .72rem;
        color: #94a3b8;
        margin-top: .1rem;
    }
    .stock-alert-item__qty {
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 46px;
        padding: .3rem .45rem;
        border-radius: 10px;
        font-weight: 800;
        font-size: 1rem;
        line-height: 1.1;
        text-align: center;
    }
    .stock-alert-item__qty small {
        display: block;
        width: 100%;
        text-align: center;
        font-size: .58rem;
        font-weight: 700;
        letter-spacing: .02em;
        opacity: .85;
        margin-top: .12rem;
    }
    .stock-alert-item__qty--warning {
        background: #f5f3ff;
        color: #7047ee;
        border: 1px solid #ddd6fe;
    }
    .stock-alert-item__qty--critical {
        background: #eef4ff;
        color: #30497a;
        border: 1px solid #c7d2fe;
    }
    .stock-alert-empty {
        display: flex;
        align-items: center;
        gap: .6rem;
        padding: 1.25rem 1rem;
        color: #64748b;
        font-size: .86rem;
    }
    .stock-alert-empty i { color: #7047ee; font-size: 1.1rem; }
    .stock-alert-panel__footer {
        border-top: 1px solid #e2e8f0;
        background: #f8fafc;
    }
    .stock-alert-panel__footer > a {
        display: block;
        padding: .85rem 1rem;
        text-align: center;
        color: #7047ee !important;
        font-weight: 700;
        font-size: .82rem;
        text-decoration: none;
    }
    .stock-alert-panel__footer > a:hover {
        background: #f5f3ff;
    }

/* --- Lists (commandes, réceptions, inventaires, proformas…) --- */
.po-list-hero {
        background: linear-gradient(135deg, #243b55 0%, #3d5080 52%, #5b6eae 100%);
        border-radius: 18px;
        color: #fff;
        padding: 1.5rem 1.75rem;
        margin-bottom: 1.25rem;
        box-shadow: 0 14px 32px rgba(36, 59, 85, 0.2);
        position: relative;
        overflow: hidden;
    }
    .po-list-hero::after {
        content: "";
        position: absolute;
        right: -28px;
        top: -28px;
        width: 150px;
        height: 150px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
    }
    .po-list-hero__illus {
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 4.5rem;
        opacity: .12;
        z-index: 0;
        pointer-events: none;
    }
    .po-list-hero__row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        position: relative;
        z-index: 1;
    }
    .po-list-hero__title { font-size: 1.4rem; font-weight: 700; margin-bottom: .25rem; }
    .po-list-hero__sub { opacity: .9; font-size: .9rem; margin: 0; }
    .po-list-hero__btn {
        display: inline-flex;
        align-items: center;
        gap: .45rem;
        padding: .6rem 1.15rem;
        border-radius: 10px;
        border: 0;
        background: #fff;
        color: #7047ee;
        font-weight: 700;
        font-size: .88rem;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
        transition: all .18s ease;
        cursor: pointer;
    }
    .po-list-hero__btn:hover {
        background: #f5f3ff;
        color: #5b36c9;
        transform: translateY(-1px);
    }
    .po-list-stats { margin-bottom: 1.25rem; }
    .po-list-stat {
        border: 0;
        border-radius: 14px;
        padding: 1rem 1.15rem;
        color: #fff;
        height: 100%;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
        position: relative;
        overflow: hidden;
        display: flex;
        align-items: center;
        gap: .9rem;
    }
    .po-list-stat::after {
        content: "";
        position: absolute;
        right: -14px;
        top: -14px;
        width: 68px;
        height: 68px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
    }
    .po-list-stat--total { background: linear-gradient(135deg, #30497a, #4a5f8f); }
    .po-list-stat--draft { background: linear-gradient(135deg, #64748b, #94a3b8); }
    .po-list-stat--confirmed { background: linear-gradient(135deg, #4a6fa5, #3596f7); }
    .po-list-stat--received { background: linear-gradient(135deg, #3d6b6b, #5a9e9e); }
    .po-list-stat__label {
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .05em;
        opacity: .92;
        font-weight: 700;
    }
    .po-list-stat__value { font-size: 1.55rem; font-weight: 800; line-height: 1.15; margin-top: .2rem; }
    .po-list-stat__icon-left {
        width: 46px;
        height: 46px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.2);
        font-size: 1.25rem;
        flex-shrink: 0;
        border: 1px solid rgba(255, 255, 255, 0.25);
    }
    .po-list-stat__icon {
        position: absolute;
        right: .85rem;
        bottom: .7rem;
        font-size: 1.35rem;
        opacity: .35;
    }
    .po-list-card {
        border: 0;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
        overflow: hidden;
    }
    .po-list-card__head {
        padding: 1.15rem 1.35rem;
        border-bottom: 1px solid #e2e8f0;
        background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    }
    .po-list-card__head-title {
        font-size: 1rem;
        font-weight: 700;
        color: #0f172a;
        margin: 0 0 .15rem;
        display: flex;
        align-items: center;
        gap: .5rem;
    }
    .po-list-card__head-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #30497a, #7047ee);
        color: #fff;
        font-size: .95rem;
    }
    .po-list-card__head-sub { font-size: .82rem; color: #64748b; margin: 0; }
    .po-list-card__body { padding: 1.25rem 1.35rem; }
    .po-list-table-wrap {
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        overflow: hidden;
    }
    .po-dt-badge {
        display: inline-flex;
        align-items: center;
        gap: .3rem;
        padding: .22rem .6rem;
        border-radius: 999px;
        font-size: .75rem;
        font-weight: 700;
        white-space: nowrap;
    }
    .po-dt-badge--draft { background: #f1f5f9; color: #475569; }
    .po-dt-badge--confirmed { background: #eff6ff; color: #1d4ed8; }
    .po-dt-badge--received { background: #ecfdf5; color: #047857; }
    .po-dt-badge--canceled { background: #fef2f2; color: #b91c1c; }
    .po-dt-cell { display: inline-flex; align-items: center; gap: .5rem; }
    .po-dt-cell-icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: .75rem;
        flex-shrink: 0;
    }
    .po-dt-cell-icon--date { background: #f1f5f9; color: #475569; }
    .po-dt-cell-icon--ref { background: #f5f3ff; color: #7047ee; }
    .po-dt-cell-icon--supplier { background: #eff6ff; color: #2563eb; }
    .po-dt-ref { font-weight: 700; }
    .po-dt-muted { color: #94a3b8; }
    .po-th-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        border-radius: 6px;
        background: #ede9fe;
        color: #7047ee;
        font-size: .68rem;
        margin-right: .35rem;
        vertical-align: middle;
    }
    #datatable { margin: 0 !important; }
    #datatable thead th {
        background: #f5f3ff;
        color: #4338ca;
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .05em;
        font-weight: 700;
        border-bottom: 1px solid #ddd6fe !important;
        padding: .75rem .85rem !important;
        white-space: nowrap;
    }
    #datatable tbody td {
        padding: .7rem .85rem !important;
        vertical-align: middle !important;
        font-size: .9rem;
        border-color: #f1f5f9 !important;
    }
    #datatable tbody tr:hover { background: #faf5ff !important; }
    #datatable tbody tr.disabled-row { opacity: .55; }
    #datatable tbody td a:not(.btn) {
        color: #7047ee;
        font-weight: 600;
        text-decoration: none;
    }
    #datatable tbody td a:not(.btn):hover { text-decoration: underline; }
    .dataTables_wrapper .dt-buttons { margin-bottom: .75rem; }
    .dataTables_wrapper .dt-buttons .btn {
        border-radius: 8px !important;
        font-size: .8rem !important;
        font-weight: 600 !important;
    }
    .dataTables_wrapper .dataTables_filter input {
        border-radius: 8px;
        border: 1px solid #ddd6fe;
        padding: .35rem .65rem;
    }

/* --- Document show hero (réceptions, commandes, proformas…) --- */
.gr-show-hero {
        background: linear-gradient(135deg, #243b55 0%, #3d5080 52%, #5b6eae 100%);
        border-radius: 18px;
        color: #fff;
        padding: 1.35rem 1.5rem;
        margin-bottom: 1.25rem;
        box-shadow: 0 14px 32px rgba(36, 59, 85, 0.2);
        position: relative;
        z-index: 2;
    }
    .gr-show-hero__row {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
    }
    .gr-show-hero__title {
        font-size: 1.35rem;
        font-weight: 700;
        margin-bottom: .55rem;
    }
    .gr-show-hero__ref {
        font-size: .9rem;
        font-weight: 500;
        opacity: .85;
    }
    .gr-show-hero__meta {
        display: flex;
        flex-wrap: wrap;
        gap: .45rem;
        align-items: center;
        margin-top: .75rem;
    }
    .gr-show-hero__badge {
        display: inline-flex;
        align-items: center;
        gap: .3rem;
        padding: .25rem .65rem;
        border-radius: 999px;
        font-size: .76rem;
        font-weight: 700;
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.22);
    }
    .gr-show-toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        justify-content: flex-end;
        align-items: center;
    }
    .gr-show-toolbar--pdf .btn-as-text {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.35rem;
        height: 2.35rem;
        padding: 0;
        margin: 0 !important;
        border-radius: 9px;
        border: 1px solid rgba(255, 255, 255, 0.35);
        background: rgba(255, 255, 255, 0.12);
        color: #fff !important;
        font-size: 1rem;
        text-decoration: none;
        transition: background .15s ease, border-color .15s ease, color .15s ease;
    }
    .gr-show-toolbar--pdf .btn-as-text:hover,
    .gr-show-toolbar--pdf .btn-as-text:focus,
    .gr-show-toolbar--pdf .btn-as-text:active {
        background: rgba(255, 255, 255, 0.24);
        border-color: rgba(255, 255, 255, 0.55);
        color: #fff !important;
        text-decoration: none;
        box-shadow: none;
    }
    .gr-show-actions {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .5rem;
        margin-top: 1.1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.18);
        position: relative;
        z-index: 3;
    }
    .gr-show-action-form {
        display: inline-flex;
        margin: 0;
    }
    .gr-show-action-btn {
        display: inline-flex;
        align-items: center;
        gap: .4rem;
        padding: .5rem .95rem;
        border-radius: 9px;
        border: 1px solid rgba(255, 255, 255, 0.35);
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        font-size: .82rem;
        font-weight: 600;
        text-decoration: none;
        cursor: pointer;
        transition: background .15s ease, border-color .15s ease, color .15s ease;
        white-space: nowrap;
    }
    .gr-show-hero a.gr-show-action-btn,
    .gr-show-hero a.gr-show-action-btn:visited {
        color: #fff;
        text-decoration: none;
    }
    .gr-show-action-btn:hover,
    .gr-show-action-btn:focus,
    .gr-show-action-btn:active,
    .gr-show-hero a.gr-show-action-btn:hover,
    .gr-show-hero a.gr-show-action-btn:focus,
    .gr-show-hero a.gr-show-action-btn:active {
        background: rgba(255, 255, 255, 0.24);
        border-color: rgba(255, 255, 255, 0.55);
        color: #fff;
        text-decoration: none;
        box-shadow: none;
    }
    .gr-show-action-btn--order {
        background: rgba(112, 71, 238, 0.35);
        border-color: rgba(167, 139, 250, 0.55);
        color: #ede9fe;
    }
    .gr-show-hero a.gr-show-action-btn--order,
    .gr-show-hero a.gr-show-action-btn--order:visited {
        color: #ede9fe;
    }
    .gr-show-action-btn--order:hover,
    .gr-show-action-btn--order:focus,
    .gr-show-action-btn--order:active,
    .gr-show-hero a.gr-show-action-btn--order:hover,
    .gr-show-hero a.gr-show-action-btn--order:focus,
    .gr-show-hero a.gr-show-action-btn--order:active {
        background: rgba(112, 71, 238, 0.5);
        border-color: rgba(196, 181, 253, 0.7);
        color: #fff;
    }
    .gr-show-action-btn--confirm,
    .gr-show-action-btn--apply {
        background: #fff;
        color: #047857;
        border-color: #fff;
    }
    .gr-show-hero a.gr-show-action-btn--confirm,
    .gr-show-hero a.gr-show-action-btn--confirm:visited,
    .gr-show-hero a.gr-show-action-btn--apply,
    .gr-show-hero a.gr-show-action-btn--apply:visited {
        background: linear-gradient(135deg, #059669, #10b981);
        border-color: rgba(167, 243, 208, 0.55);
        color: #fff !important;
    }
    .gr-show-action-btn--confirm:hover,
    .gr-show-action-btn--confirm:focus,
    .gr-show-action-btn--confirm:active,
    .gr-show-action-btn--apply:hover,
    .gr-show-action-btn--apply:focus,
    .gr-show-action-btn--apply:active {
        background: #ecfdf5;
        border-color: #ecfdf5;
        color: #065f46;
    }
    .gr-show-hero a.gr-show-action-btn--confirm:hover,
    .gr-show-hero a.gr-show-action-btn--confirm:focus,
    .gr-show-hero a.gr-show-action-btn--confirm:active,
    .gr-show-hero a.gr-show-action-btn--apply:hover,
    .gr-show-hero a.gr-show-action-btn--apply:focus,
    .gr-show-hero a.gr-show-action-btn--apply:active {
        background: linear-gradient(135deg, #047857, #059669);
        border-color: rgba(167, 243, 208, 0.75);
        color: #fff !important;
    }
    .gr-show-action-btn--warning {
        background: rgba(251, 191, 36, 0.25);
        border-color: rgba(252, 211, 77, 0.55);
        color: #fef3c7;
    }
    .gr-show-action-btn--warning:hover,
    .gr-show-action-btn--warning:focus,
    .gr-show-action-btn--warning:active {
        background: rgba(251, 191, 36, 0.38);
        border-color: rgba(252, 211, 77, 0.7);
        color: #fff;
    }
    .gr-show-action-btn--danger {
        background: rgba(239, 68, 68, 0.3);
        border-color: rgba(252, 165, 165, 0.5);
        color: #fecaca;
    }
    .gr-show-action-btn--danger:hover,
    .gr-show-action-btn--danger:focus,
    .gr-show-action-btn--danger:active {
        background: rgba(239, 68, 68, 0.45);
        border-color: rgba(252, 165, 165, 0.65);
        color: #fff;
    }
    .gr-show-steps {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .35rem;
        margin-top: 1rem;
        padding: .85rem 1rem;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.18);
    }
    .gr-show-step {
        display: inline-flex;
        align-items: center;
        gap: .4rem;
        padding: .4rem .75rem;
        border-radius: 999px;
        font-size: .78rem;
        font-weight: 700;
        white-space: nowrap;
        transition: all .15s ease;
    }
    .gr-show-step__num {
        width: 1.35rem;
        height: 1.35rem;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: .7rem;
        font-weight: 800;
        flex-shrink: 0;
    }
    .gr-show-step--done {
        background: rgba(16, 185, 129, 0.22);
        border: 1px solid rgba(52, 211, 153, 0.45);
        color: #d1fae5;
    }
    .gr-show-step--done .gr-show-step__num {
        background: #10b981;
        color: #fff;
    }
    .gr-show-step--current {
        background: #fff;
        color: #243b55;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
    }
    .gr-show-step--current .gr-show-step__num {
        background: linear-gradient(135deg, #7047ee, #5b36c9);
        color: #fff;
    }
    .gr-show-step--pending {
        background: rgba(255, 255, 255, 0.06);
        border: 1px dashed rgba(255, 255, 255, 0.28);
        color: rgba(255, 255, 255, 0.55);
    }
    .gr-show-step--pending .gr-show-step__num {
        background: rgba(255, 255, 255, 0.12);
        color: rgba(255, 255, 255, 0.65);
    }
    .gr-show-step--canceled {
        background: rgba(239, 68, 68, 0.25);
        border: 1px solid rgba(252, 165, 165, 0.45);
        color: #fecaca;
    }
    .gr-show-step--canceled .gr-show-step__num {
        background: #ef4444;
        color: #fff;
    }
    .gr-show-step-connector {
        width: 1.5rem;
        height: 2px;
        background: rgba(255, 255, 255, 0.25);
        flex-shrink: 0;
    }
    .gr-show-step-connector--done {
        background: rgba(52, 211, 153, 0.65);
    }
    .gr-show-alert {
        margin-top: .85rem;
        padding: .75rem 1rem;
        border-radius: 10px;
        font-size: .84rem;
        font-weight: 600;
        display: flex;
        align-items: flex-start;
        gap: .55rem;
        line-height: 1.45;
    }
    .gr-show-alert i {
        margin-top: .1rem;
        flex-shrink: 0;
    }
    .gr-show-alert--pending-apply {
        background: rgba(251, 191, 36, 0.2);
        border: 1px solid rgba(252, 211, 77, 0.45);
        color: #fef3c7;
    }
    .gr-show-alert--draft {
        background: rgba(148, 163, 184, 0.2);
        border: 1px solid rgba(203, 213, 225, 0.35);
        color: #f1f5f9;
    }
    .gr-show-alert--applied {
        background: rgba(16, 185, 129, 0.2);
        border: 1px solid rgba(52, 211, 153, 0.4);
        color: #d1fae5;
    }
    .gr-show-alert--canceled {
        background: rgba(239, 68, 68, 0.2);
        border: 1px solid rgba(252, 165, 165, 0.4);
        color: #fecaca;
    }
    @media (max-width: 767px) {
        .gr-show-step-connector { width: .75rem; }
        .gr-show-steps { gap: .25rem; padding: .75rem; }
    }
    .gr-cost-summary {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 12px;
        padding: 0.85rem 1rem;
        margin-top: 0.75rem;
    }
    .gr-cost-summary__grid {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem 1.5rem;
    }
    .gr-cost-summary__item {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        font-size: 0.82rem;
    }
    .gr-cost-summary__label {
        opacity: 0.8;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }
    .gr-cost-summary__expenses li {
        font-size: 0.84rem;
        padding: 0.2rem 0;
        opacity: 0.92;
    }

/* --- Document update cards & tables --- */
/* Palette Premigest — alignée liste commandes */
    .po-upd-hero {
        background: linear-gradient(135deg, #243b55 0%, #3d5080 52%, #5b6eae 100%);
        border-radius: 18px;
        color: #fff;
        padding: 1.35rem 1.5rem;
        margin-bottom: 1.25rem;
        box-shadow: 0 14px 32px rgba(36, 59, 85, 0.2);
        position: relative;
        overflow: hidden;
    }
    .po-upd-hero__row {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        position: relative;
        z-index: 1;
    }
    .po-upd-hero__title { font-size: 1.35rem; font-weight: 700; margin-bottom: .4rem; }
    .po-upd-hero__meta { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
    .po-upd-hero__badge {
        display: inline-flex;
        align-items: center;
        gap: .3rem;
        padding: .25rem .65rem;
        border-radius: 999px;
        font-size: .76rem;
        font-weight: 700;
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.22);
    }
    .po-upd-toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        justify-content: flex-end;
    }
    .po-upd-tool-btn {
        display: inline-flex;
        align-items: center;
        gap: .4rem;
        padding: .5rem .9rem;
        border-radius: 9px;
        border: 1px solid rgba(255, 255, 255, 0.35);
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        font-size: .82rem;
        font-weight: 600;
        text-decoration: none;
        cursor: pointer;
        transition: all .15s ease;
    }
    .po-upd-tool-btn:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
    .po-upd-tool-btn--solid { background: #fff; color: #7047ee; border-color: #fff; }
    .po-upd-tool-btn--solid:hover { background: #f5f3ff; color: #5b36c9; }
    .po-upd-tool-btn--danger { background: rgba(239, 68, 68, 0.85); border-color: transparent; }
    .po-upd-card {
        border: 0;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
        margin-bottom: 1.25rem;
        overflow: hidden;
    }
    .po-upd-card__head {
        padding: 1rem 1.25rem;
        border-bottom: 1px solid #e2e8f0;
        background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    }
    .po-upd-card__head-title {
        font-size: .95rem;
        font-weight: 700;
        color: #0f172a;
        margin: 0;
        display: flex;
        align-items: center;
        gap: .5rem;
    }
    .po-upd-card__head-icon {
        width: 30px;
        height: 30px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #30497a, #7047ee);
        color: #fff;
        font-size: .8rem;
    }
    .po-upd-card__body { padding: 1.25rem; font-size: 0.95rem;}
    .po-upd-meta-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        align-items: stretch;
    }
    @media (max-width: 991px) {
        .po-upd-meta-grid { grid-template-columns: 1fr; }
    }
    .po-upd-field {
        display: flex;
        flex-direction: column;
        min-height: 100%;
    }
    .po-upd-field label {
        display: flex;
        align-items: center;
        gap: .35rem;
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #64748b;
        margin-bottom: .4rem;
    }
    .po-upd-field label i { color: #7047ee; }
    .po-upd-field__control {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .po-upd-check {
        display: flex;
        align-items: center;
        gap: .55rem;
        flex: 1;
        min-height: calc(1.5em + .75rem + 2px);
    }
    .po-upd-check__control {
        flex-shrink: 0;
        position: relative;
        width: 24px;
        height: 24px;
        margin: 0;
    }
    .po-upd-check__control .filled-in + label.basic_checkbox_2 {
        position: relative;
        top: 0;
        left: 0;
        margin: 0;
        padding: 0;
        width: 20px;
        height: 20px;
        display: block;
    }
    .po-upd-check__label {
        font-size: .875rem;
        font-weight: 500;
        color: #334155;
        cursor: pointer;
        margin: 0;
        line-height: 1.5;
        display: inline-flex;
        align-items: center;
        gap: .35rem;
    }
    .po-upd-check__label i {
        color: #7047ee;
        font-size: .8rem;
    }
    .po-upd-lines-wrap {
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        overflow: hidden;
    }
  .po-upd-table { margin: 0 !important; }
    .po-upd-table thead th {
        background: #f5f3ff;
        color: #4338ca;
        font-size: .7rem;
        text-transform: uppercase;
        letter-spacing: .05em;
        font-weight: 700;
        border-bottom: 1px solid #ddd6fe !important;
        padding: .7rem .85rem !important;
        white-space: nowrap;
    }
    .po-upd-th-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        border-radius: 5px;
        background: #ede9fe;
        color: #7047ee;
        font-size: .65rem;
        margin-right: .3rem;
    }
    .po-upd-table tbody td {
        padding: .65rem .85rem !important;
        vertical-align: middle !important;
        font-size: .88rem;
        border-color: #f1f5f9 !important;
    }
    .po-upd-table tbody tr:hover { background: #faf5ff !important; }
    .po-upd-table tfoot th {
        background: #f8fafc;
        font-size: .88rem;
        border-top: 2px solid #ddd6fe !important;
    }
    .po-upd-total {
        font-size: 1.1rem;
        font-weight: 800;
        color: #30497a;
    }
    .po-line-resource {
        display: inline-flex;
        align-items: center;
        gap: .5rem;
        font-weight: 600;
        color: #0f172a;
    }
    .po-line-resource__icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #f5f3ff;
        color: #7047ee;
        font-size: .75rem;
    }
    .po-line-num { font-weight: 700; color: #64748b; }
    .po-line-amount { font-weight: 700; color: #30497a; }
    .po-upd-actions {
        display: flex;
        flex-wrap: wrap;
        gap: .65rem;
        align-items: center;
        margin-top: 1.1rem;
        padding-top: 1rem;
        border-top: 1px solid #e2e8f0;
    }
    .po-upd-btn-save {
        display: inline-flex;
        align-items: center;
        gap: .45rem;
        padding: .6rem 1.2rem;
        border-radius: 10px;
        font-weight: 700;
    }
    .po-upd-empty {
        display: flex;
        align-items: center;
        gap: .75rem;
        padding: 1rem 1.1rem;
        border-radius: 10px;
        background: #f8fafc;
        border: 1px dashed #e2e8f0;
        color: #64748b;
        font-size: .9rem;
    }
    .po-upd-empty i { font-size: 1.15rem; color: #94a3b8; flex-shrink: 0; }

    /* Frais annexes — modal réception */
    .ancillary-expense-modal .modal-body {
        overflow-x: hidden;
    }
    .ancillary-expense-form {
        overflow-x: hidden;
        max-width: 100%;
    }
    .ancillary-expense-form .ancillary-form-section {
        padding: 1rem 1.1rem;
        border-radius: 12px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        margin-bottom: 1rem;
        overflow-x: hidden;
    }
    .ancillary-expense-form .ancillary-form-section:last-child { margin-bottom: 0; }
    .ancillary-form-section__title {
        display: flex;
        align-items: center;
        gap: .5rem;
        font-size: .82rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #64748b;
        margin: 0 0 .85rem;
    }
    .ancillary-form-section__title i { color: #7047ee; }
    .ancillary-form-section__badge {
        margin-left: auto;
        font-size: .72rem;
        font-weight: 700;
        padding: .15rem .5rem;
        border-radius: 999px;
        background: #ede9fe;
        color: #5b36c9;
        text-transform: none;
        letter-spacing: 0;
    }
    .ancillary-form-label {
        display: block;
        font-size: .875rem;
        font-weight: 600;
        color: #334155;
        margin-bottom: .4rem;
    }
    .ancillary-conversion-preview {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: .65rem;
        margin: 1rem 0;
        padding: .75rem 1rem;
        border-radius: 10px;
        background: #fff;
        border: 1px dashed #c4b5fd;
        font-size: .9rem;
        color: #475569;
    }
    .ancillary-conversion-preview__from,
    .ancillary-conversion-preview__to {
        font-weight: 700;
        color: #1e293b;
    }
    .ancillary-conversion-preview__arrow {
        color: #7047ee;
        font-size: 1rem;
    }
    .ancillary-converted-total {
        padding: .85rem 1rem;
        border-radius: 10px;
        background: linear-gradient(180deg, #f5f3ff 0%, #fff 100%);
        border: 1px solid #ddd6fe;
    }
    .ancillary-converted-total .form-control[readonly] {
        background-color: #fff !important;
        color: #1e293b !important;
        font-weight: 700;
        font-size: 1.05rem;
        border-color: #c4b5fd;
    }
    .ancillary-converted-total__hint {
        margin-top: .5rem;
        font-size: .78rem;
        color: #64748b;
    }
    .ancillary-converted-total__hint i { color: #7047ee; }
    .gr-pricing-allocation-bar {
        padding: 1rem 1.1rem;
        border-radius: 12px;
        background: linear-gradient(180deg, #f5f3ff 0%, #f8fafc 100%);
        border: 1px solid #ddd6fe;
    }
    .gr-pricing-allocation-bar__label {
        font-size: .82rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #64748b;
        margin-bottom: .35rem;
    }
    .gr-pricing-allocation-bar__label i { color: #7047ee; margin-right: .35rem; }
    .gr-pricing-allocation-bar__values {
        font-size: 1.1rem;
        margin-bottom: .5rem;
    }
    .gr-pricing-allocation-bar__values strong { color: #1e293b; }
    .gr-pricing-allocation-bar__track {
        height: 8px;
        border-radius: 999px;
        background: #e2e8f0;
        overflow: hidden;
        margin-bottom: .65rem;
    }
    .gr-pricing-allocation-bar__fill {
        height: 100%;
        width: 0;
        border-radius: 999px;
        background: linear-gradient(90deg, #7047ee, #3596f7);
        transition: width .2s ease;
    }
    .gr-pricing-allocation-bar__fill--over {
        background: linear-gradient(90deg, #ef4444, #f97316);
    }
    .gr-pricing-allocation-bar__hint {
        font-size: .8rem;
        color: #64748b;
    }
    .gr-pricing-allocation-bar__error {
        font-size: .82rem;
        color: #dc2626;
        font-weight: 600;
        margin-top: .35rem;
    }
    .ancillary-amount-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: .75rem;
        min-width: 0;
    }
    @media (min-width: 768px) {
        .ancillary-amount-grid {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
    }
    .ancillary-expense-form .form-floating > .form-control,
    .ancillary-expense-form .form-floating > .form-select {
        min-width: 0;
    }
    .ancillary-expense-modal .select2-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
    }

/* --- Modals & forms (commandes, proformas…) --- */
/* Palette logo Premigest : navy #243b55, violet #7047ee, bleu #3596f7 */
    .po-form-intro {
        display: flex;
        align-items: flex-start;
        gap: .85rem;
        padding: .9rem 1rem;
        border-radius: 12px;
        background: linear-gradient(180deg, #f5f3ff 0%, #f8fafc 100%);
        border: 1px solid #ddd6fe;
        margin-bottom: 1.1rem;
        font-size: .86rem;
        color: #475569;
        line-height: 1.45;
    }
    .po-form-intro__icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #30497a, #7047ee);
        color: #fff;
        flex-shrink: 0;
        font-size: 1rem;
    }
    .po-form-section {
        margin-bottom: 1.15rem;
        padding: 1rem 1.05rem;
        border-radius: 14px;
        border: 1px solid #e2e8f0;
        background: #fafbfc;
    }
    .po-form-section--supplier {
        border-color: #c7d2fe;
        background: linear-gradient(180deg, #f5f3ff 0%, #fff 100%);
    }
    .po-form-section--options {
        border-color: #e2e8f0;
        background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
        margin-bottom: 0;
    }
    .po-form-section__title {
        display: flex;
        align-items: center;
        gap: .5rem;
        font-size: .82rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: #334155;
        margin-bottom: .85rem;
        padding-bottom: .55rem;
        border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    }
    .po-form-section__title i {
        width: 26px;
        height: 26px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: .75rem;
        color: #fff;
        background: linear-gradient(135deg, #3596f7, #7047ee);
    }
    .po-form-section--options .po-form-section__title i {
        background: linear-gradient(135deg, #64748b, #94a3b8);
    }
    .po-form-field { margin-bottom: .85rem; }
    .po-form-field:last-child { margin-bottom: 0; }
    .po-form-label {
        display: flex;
        align-items: center;
        gap: .4rem;
        font-size: .78rem;
        font-weight: 700;
        color: #64748b;
        margin-bottom: .4rem;
        text-transform: uppercase;
        letter-spacing: .04em;
    }
    .po-form-label i { color: #7047ee; font-size: .82rem; }
    .po-form-hint { font-size: .76rem; color: #94a3b8; margin-top: .3rem; }
    .po-form-supplier-link {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        font-size: .78rem;
        font-weight: 600;
        margin-bottom: .5rem;
        text-decoration: none;
        color: #7047ee !important;
    }
    .po-form-check {
        display: flex;
        align-items: flex-start;
        gap: .75rem;
        padding: .75rem .85rem;
        border-radius: 10px;
        background: #fff;
        border: 1px solid #e2e8f0;
    }
    .po-form-check__control {
        flex-shrink: 0;
        position: relative;
        min-width: 24px;
        min-height: 24px;
        padding-top: .1rem;
    }
    .po-form-check__content { flex: 1; min-width: 0; }
    .po-form-check__label {
        display: block;
        font-size: .88rem;
        font-weight: 600;
        color: #334155;
        cursor: pointer;
        margin-bottom: .25rem;
    }
    .po-form .form-floating > .form-control,
    .po-form .form-floating > .form-select {
        border-radius: 10px;
        border-color: #e2e8f0;
    }
    .po-form .form-floating > .form-control:focus {
        border-color: #a78bfa;
        box-shadow: 0 0 0 3px rgba(112, 71, 238, 0.12);
    }
    .po-form .select2-container--default .select2-selection--single {
        border-radius: 10px !important;
        border-color: #e2e8f0 !important;
        min-height: var(--pg-input-height, calc(1.5em + 0.75rem + 2px));
    }

/* --- Item form modal --- */
.po-item-form-intro {
        display: flex;
        align-items: flex-start;
        gap: .75rem;
        padding: .8rem .95rem;
        border-radius: 10px;
        background: #f5f3ff;
        border: 1px solid #ddd6fe;
        margin-bottom: 1rem;
        font-size: .84rem;
        color: #475569;
    }
    .po-item-form-intro i {
        color: #7047ee;
        font-size: 1.1rem;
        margin-top: .1rem;
    }
    .po-item-form-section { margin-bottom: 1rem; }
    .po-item-form-section:last-child { margin-bottom: 0; }
    .po-item-form-section__title {
        font-size: .75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: #64748b;
        margin-bottom: .65rem;
        display: flex;
        align-items: center;
        gap: .4rem;
    }
    .po-item-form-section__title i { color: #7047ee; }
    .po-item-form-link {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        font-size: .78rem;
        font-weight: 600;
        margin-bottom: .5rem;
        color: #7047ee !important;
        text-decoration: none;
    }
    .po-item-form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .75rem;
    }
    @media (max-width: 576px) {
        .po-item-form-grid { grid-template-columns: 1fr; }
    }

/* --- Resource create/edit forms --- */
.res-form-intro {
        display: flex;
        align-items: flex-start;
        gap: .85rem;
        padding: .9rem 1rem;
        border-radius: 12px;
        background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
        border: 1px solid #bfdbfe;
        margin-bottom: 1.1rem;
        font-size: .86rem;
        color: #475569;
        line-height: 1.45;
    }
    .res-form-intro__icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #3b82f6, #6366f1);
        color: #fff;
        flex-shrink: 0;
        font-size: 1rem;
    }
    .res-form-section {
        margin-bottom: 1.15rem;
        padding: 1rem 1.05rem;
        border-radius: 14px;
        border: 1px solid #e2e8f0;
        background: #fafbfc;
    }
    .res-form-section--pricing {
        border-color: #fde68a;
        background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
    }
    .res-form-section--stock {
        border-color: #bbf7d0;
        background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
    }
    .res-form-section__title {
        display: flex;
        align-items: center;
        gap: .5rem;
        font-size: .82rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: #334155;
        margin-bottom: .85rem;
        padding-bottom: .55rem;
        border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    }
    .res-form-section__title i {
        width: 26px;
        height: 26px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: .75rem;
        color: #fff;
        background: linear-gradient(135deg, #64748b, #94a3b8);
    }
    .res-form-section--pricing .res-form-section__title i {
        background: linear-gradient(135deg, #d97706, #fbbf24);
    }
    .res-form-section--stock .res-form-section__title i {
        background: linear-gradient(135deg, #059669, #34d399);
    }
    .res-form-section--info .res-form-section__title i {
        background: linear-gradient(135deg, #2563eb, #60a5fa);
    }
    .res-form-section--class .res-form-section__title i {
        background: linear-gradient(135deg, #7c3aed, #a78bfa);
    }
    .res-form-field { margin-bottom: .85rem; }
    .res-form-field:last-child { margin-bottom: 0; }
    .res-form-label {
        display: flex;
        align-items: center;
        gap: .4rem;
        font-size: .78rem;
        font-weight: 700;
        color: #64748b;
        margin-bottom: .4rem;
        text-transform: uppercase;
        letter-spacing: .04em;
    }
    .res-form-label i { color: #3b82f6; font-size: .82rem; }
    .res-form-hint {
        font-size: .76rem;
        color: #94a3b8;
        margin-top: .3rem;
    }
    .res-form .form-floating > .form-control,
    .res-form .form-floating > .form-select {
        border-radius: 10px;
        border-color: #e2e8f0;
    }
    .res-form .form-floating > .form-control:focus {
        border-color: #93c5fd;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    }
    .res-form .select2-container--default .select2-selection--single {
        border-radius: 10px !important;
        border-color: #e2e8f0 !important;
        min-height: var(--pg-input-height, calc(1.5em + 0.75rem + 2px));
    }

/* --- Resource catalogue list --- */
.res-list-hero {
        background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 48%, #6366f1 100%);
        border-radius: 18px;
        color: #fff;
        padding: 1.5rem 1.75rem;
        margin-bottom: 1.25rem;
        box-shadow: 0 14px 32px rgba(59, 130, 246, 0.22);
        position: relative;
        overflow: hidden;
    }
    .res-list-hero::after {
        content: "";
        position: absolute;
        right: -28px;
        top: -28px;
        width: 150px;
        height: 150px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
    }
    .res-list-hero__row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        position: relative;
        z-index: 1;
    }
    .res-list-hero__illus {
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 4.5rem;
        opacity: .12;
        z-index: 0;
        pointer-events: none;
    }
    .res-list-hero__title { font-size: 1.4rem; font-weight: 700; margin-bottom: .25rem; }
    .res-list-hero__sub { opacity: .9; font-size: .9rem; margin: 0; }
    .res-list-hero__btn {
        display: inline-flex;
        align-items: center;
        gap: .45rem;
        padding: .6rem 1.15rem;
        border-radius: 10px;
        border: 0;
        background: #fff;
        color: #1e40af;
        font-weight: 700;
        font-size: .88rem;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
        transition: all .18s ease;
    }
    .res-list-hero__btn:hover {
        background: #eff6ff;
        color: #1d4ed8;
        transform: translateY(-1px);
    }
    .res-list-stats { margin-bottom: 1.25rem; }
    .res-list-stat {
        border: 0;
        border-radius: 14px;
        padding: 1rem 1.15rem;
        color: #fff;
        height: 100%;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
        position: relative;
        overflow: hidden;
        display: flex;
        align-items: center;
        gap: .9rem;
    }
    .res-list-stat::after {
        content: "";
        position: absolute;
        right: -14px;
        top: -14px;
        width: 68px;
        height: 68px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
    }
    .res-list-stat--total { background: linear-gradient(135deg, #1e40af, #3b82f6); }
    .res-list-stat--active { background: linear-gradient(135deg, #059669, #34d399); }
    .res-list-stat--inactive { background: linear-gradient(135deg, #64748b, #94a3b8); }
    .res-list-stat--stock { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
    .res-list-stat__label {
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .05em;
        opacity: .92;
        font-weight: 700;
    }
    .res-list-stat__value { font-size: 1.55rem; font-weight: 800; line-height: 1.15; margin-top: .2rem; }
    .res-list-stat__icon-left {
        width: 46px;
        height: 46px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.2);
        font-size: 1.25rem;
        flex-shrink: 0;
        border: 1px solid rgba(255, 255, 255, 0.25);
    }
    .res-list-stat__icon {
        position: absolute;
        right: .85rem;
        bottom: .7rem;
        font-size: 1.35rem;
        opacity: .35;
    }
    .res-list-card {
        border: 0;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
        overflow: hidden;
    }
    .res-list-card__head {
        padding: 1.15rem 1.35rem;
        border-bottom: 1px solid #e2e8f0;
        background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    }
    .res-list-card__head-title {
        font-size: 1rem;
        font-weight: 700;
        color: #0f172a;
        margin: 0 0 .15rem;
        display: flex;
        align-items: center;
        gap: .5rem;
    }
    .res-list-card__head-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #3b82f6, #6366f1);
        color: #fff;
        font-size: .95rem;
    }
    .res-list-card__head-sub { font-size: .82rem; color: #64748b; margin: 0; }
    .res-list-card__body { padding: 1.25rem 1.35rem; }
    .res-list-toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        align-items: flex-end;
        justify-content: space-between;
        margin-bottom: 1.1rem;
    }
    .res-list-bulk {
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
    }
    .res-list-bulk__btn {
        display: inline-flex;
        align-items: center;
        gap: .4rem;
        padding: .45rem .85rem;
        border-radius: 9px;
        border: 1px solid transparent;
        font-size: .82rem;
        font-weight: 600;
        cursor: pointer;
        transition: all .15s ease;
    }
    .res-list-bulk__btn--enable {
        background: #ecfdf5;
        color: #047857;
        border-color: #a7f3d0;
    }
    .res-list-bulk__btn--enable:hover { background: #d1fae5; }
    .res-list-bulk__btn--disable {
        background: #fef2f2;
        color: #b91c1c;
        border-color: #fecaca;
    }
    .res-list-bulk__btn--disable:hover { background: #fee2e2; }
    .res-list-filters {
        display: flex;
        flex-wrap: wrap;
        gap: .75rem;
        align-items: flex-end;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: .85rem 1rem;
    }
    .res-list-filter { min-width: 180px; }
    .res-list-filter label {
        display: flex;
        align-items: center;
        gap: .35rem;
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: #64748b;
        font-weight: 700;
        margin-bottom: .35rem;
    }
    .res-list-filter label i { color: #3b82f6; font-size: .85rem; }
    .res-list-filters-title {
        display: flex;
        align-items: center;
        gap: .4rem;
        font-size: .78rem;
        font-weight: 700;
        color: #475569;
        margin-right: .25rem;
        white-space: nowrap;
        padding-bottom: .35rem;
    }
    .res-list-filters-title i { color: #6366f1; }
    .res-list-table-wrap {
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        overflow: hidden;
    }
  /* Cellules rendues par le datatable */
    .res-dt-badge {
        display: inline-flex;
        align-items: center;
        gap: .3rem;
        padding: .22rem .6rem;
        border-radius: 999px;
        font-size: .75rem;
        font-weight: 700;
        white-space: nowrap;
    }
    .res-dt-badge--on { background: #ecfdf5; color: #047857; }
    .res-dt-badge--off { background: #f1f5f9; color: #64748b; }
    .res-dt-code {
        font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
        font-size: .8rem;
        font-weight: 700;
        padding: .18rem .5rem;
        border-radius: 6px;
        background: #eff6ff;
        color: #1d4ed8;
        letter-spacing: .03em;
    }
    .res-dt-price { font-weight: 700; color: #0f172a; }
    .res-dt-stock {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 2rem;
        padding: .2rem .55rem;
        border-radius: 8px;
        font-weight: 700;
        font-size: .85rem;
    }
    .res-dt-stock--ok { background: #ecfdf5; color: #047857; }
    .res-dt-stock--low { background: #fff7ed; color: #c2410c; }
    .po-list-table-wrap--stock-overview .stock-overview-th {
        background: rgba(13, 148, 136, 0.12) !important;
        color: #0f766e;
        font-weight: 700;
        border-left: 3px solid #0d9488;
        border-right: 3px solid #0d9488;
    }
    .po-list-table-wrap--stock-overview td.stock-overview-col {
        background: rgba(13, 148, 136, 0.05);
        border-left: 3px solid rgba(13, 148, 136, 0.25);
        border-right: 3px solid rgba(13, 148, 136, 0.25);
        vertical-align: middle;
    }
    .po-list-table-wrap--stock-overview tbody tr:hover td.stock-overview-col {
        background: rgba(13, 148, 136, 0.1);
    }
    .stock-overview-qty {
        min-width: 2.75rem;
        padding: .28rem .65rem;
        font-size: 0.92rem;
        letter-spacing: .02em;
        border: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 1px 4px rgba(15, 118, 110, 0.15);
    }
    .stock-overview-qty strong {
        font-weight: 700;
    }
    .res-dt-stock--ok.stock-overview-qty {
        background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
        color: #047857;
        border-color: rgba(4, 120, 87, 0.2);
    }
    .res-dt-stock--low.stock-overview-qty {
        background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
        color: #c2410c;
        border-color: rgba(194, 65, 12, 0.2);
        box-shadow: 0 1px 4px rgba(194, 65, 12, 0.15);
    }
    .stock-overview-col .res-dt-stock {
        margin-left: auto;
    }
    .res-dt-muted { color: #94a3b8; }
    .res-dt-cell {
        display: inline-flex;
        align-items: center;
        gap: .5rem;
    }
    .res-dt-cell-icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: .75rem;
        flex-shrink: 0;
    }
    .res-dt-cell-icon--name { background: #eff6ff; color: #2563eb; }
    .res-dt-cell-icon--type { background: #f5f3ff; color: #7c3aed; }
    .res-dt-cell-icon--section { background: #ecfdf5; color: #059669; }
    .res-dt-cell-icon--code { background: #eff6ff; color: #1d4ed8; }
    .res-dt-cell-icon--price { background: #fffbeb; color: #d97706; }
    .res-dt-cell-icon--stock { background: #ecfdf5; color: #047857; }
    .res-th-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        border-radius: 6px;
        background: #e2e8f0;
        color: #475569;
        font-size: .68rem;
        margin-right: .35rem;
        vertical-align: middle;
    }
    #datatable { margin: 0 !important; }
    #datatable thead th {
        background: #f1f5f9;
        color: #475569;
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .05em;
        font-weight: 700;
        border-bottom: 1px solid #e2e8f0 !important;
        padding: .75rem .85rem !important;
        white-space: nowrap;
    }
    #datatable tbody td {
        padding: .7rem .85rem !important;
        vertical-align: middle !important;
        font-size: .9rem;
        border-color: #f1f5f9 !important;
    }
    #datatable tbody tr:hover { background: #f8fbff !important; }
    #datatable tbody tr.disabled-row { opacity: .55; }
    #datatable tbody td a:not(.btn) {
        color: #2563eb;
        font-weight: 600;
        text-decoration: none;
    }
    #datatable tbody td a:not(.btn):hover { text-decoration: underline; }
    .dataTables_wrapper .dt-buttons { margin-bottom: .75rem; }
    .dataTables_wrapper .dt-buttons .btn {
        border-radius: 8px !important;
        font-size: .8rem !important;
        font-weight: 600 !important;
    }
    .dataTables_wrapper .dataTables_filter input {
        border-radius: 8px;
        border: 1px solid #e2e8f0;
        padding: .35rem .65rem;
    }
    @media (max-width: 767px) {
        .res-list-toolbar { flex-direction: column; align-items: stretch; }
        .res-list-filters { flex-direction: column; }
        .res-list-filter { min-width: 100%; }
    }

/* --- Lines, KPIs, filters (inventaire, rebuts, proformas…) --- */
.inv-gap-badge {
        display: inline-flex;
        align-items: center;
        gap: .3rem;
        padding: .2rem .6rem;
        border-radius: 999px;
        font-size: .78rem;
        font-weight: 700;
        white-space: nowrap;
    }
    .inv-gap-badge--zero { background: #f1f5f9; color: #64748b; }
    .inv-gap-badge--pos { background: #ecfdf5; color: #047857; }
    .inv-gap-badge--neg { background: #fef2f2; color: #b91c1c; }
    .inv-summary-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
        margin-bottom: 1.25rem;
    }
    @media (max-width: 991px) {
        .inv-summary-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 575px) {
        .inv-summary-grid { grid-template-columns: 1fr; }
    }
    .inv-summary-card {
        border-radius: 12px;
        padding: 1rem 1.1rem;
        background: #fff;
        border: 1px solid #e2e8f0;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    }
    .inv-summary-card__label {
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #64748b;
        font-weight: 700;
        margin-bottom: .35rem;
    }
    .inv-summary-card__value {
        font-size: 1.35rem;
        font-weight: 800;
        color: #0f172a;
        line-height: 1.2;
    }
    .inv-summary-card--pos .inv-summary-card__value { color: #047857; }
    .inv-summary-card--neg .inv-summary-card__value { color: #b91c1c; }
    .inv-lines-toolbar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
        margin-bottom: 1rem;
        padding: .85rem 1rem;
        border-radius: 12px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
    }
    .inv-lines-search {
        display: flex;
        align-items: center;
        gap: .5rem;
        flex: 1;
        min-width: 220px;
        max-width: 420px;
        background: #fff;
        border: 1px solid #ddd6fe;
        border-radius: 10px;
        padding: .45rem .75rem;
    }
    .inv-lines-search i { color: #7047ee; }
    .inv-lines-search input {
        border: 0;
        outline: none;
        width: 100%;
        font-size: .88rem;
        background: transparent;
    }
    .inv-lines-filters {
        display: flex;
        flex-wrap: wrap;
        gap: .4rem;
    }
    .inv-filter-btn {
        border: 1px solid #ddd6fe;
        background: #fff;
        color: #4338ca;
        border-radius: 999px;
        padding: .35rem .8rem;
        font-size: .78rem;
        font-weight: 700;
        cursor: pointer;
        transition: all .15s ease;
    }
    .inv-filter-btn:hover {
        background: #f5f3ff;
    }
    .inv-filter-btn--active {
        background: linear-gradient(135deg, #30497a, #7047ee);
        border-color: transparent;
        color: #fff;
    }
    .inv-line-hidden { display: none !important; }
    .js-inv-counted {
        max-width: 130px;
        text-align: center;
        font-weight: 600;
    }
    .inv-system-qty {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 3rem;
        padding: .35rem .65rem;
        border-radius: 8px;
        background: #f1f5f9;
        color: #334155;
        font-weight: 700;
        font-size: .9rem;
    }
    .inv-line-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2rem;
        height: 2rem;
        border-radius: 8px;
        border: 1px solid transparent;
        text-decoration: none;
        transition: background .15s ease, color .15s ease;
    }
    .inv-line-actions {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: .35rem;
    }
    .inv-line-action--edit {
        color: #4338ca;
        background: #f5f3ff;
        border-color: #ddd6fe;
    }
    .inv-line-action--edit:hover {
        color: #fff;
        background: #7047ee;
        border-color: #7047ee;
    }
    .inv-line-action--danger {
        color: #b91c1c;
        background: #fef2f2;
        border-color: #fecaca;
    }
    .inv-line-action--danger:hover {
        color: #fff;
        background: #ef4444;
        border-color: #ef4444;
    }
    .inv-lines-paging .dataTables_length,
    .inv-lines-paging .dataTables_info,
    .inv-lines-paging .dataTables_paginate {
        font-size: .84rem;
        color: #64748b;
    }
    .inv-lines-paging .dataTables_paginate .paginate_button {
        border-radius: 8px !important;
        margin: 0 .1rem;
    }
    .inv-lines-paging .dataTables_paginate .paginate_button.current {
        background: linear-gradient(135deg, #30497a, #7047ee) !important;
        border-color: transparent !important;
        color: #fff !important;
    }
    .gr-show-actions--icons .gr-show-action-btn {
        width: 2.25rem;
        height: 2.25rem;
        padding: 0;
        justify-content: center;
        gap: 0;
        font-size: .95rem;
    }

/* --- Billing: proforma extras --- */
.inv-line-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.1rem;
        height: 2.1rem;
        border-radius: 8px;
        border: 1px solid transparent;
        text-decoration: none;
        transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
        transform: translateY(0);
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
        position: relative;
    }
    .inv-line-actions {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: .4rem;
        opacity: .72;
        transition: opacity .18s ease;
    }
    .po-upd-table tbody tr:hover .inv-line-actions {
        opacity: 1;
    }
    .inv-line-action--edit {
        color: #4338ca;
        background: #f5f3ff;
        border-color: #ddd6fe;
    }
    .inv-line-action--edit:hover,
    .inv-line-action--edit:focus {
        color: #fff;
        background: linear-gradient(135deg, #30497a, #7047ee);
        border-color: #7047ee;
        transform: translateY(-2px);
        box-shadow: 0 4px 14px rgba(112, 71, 238, 0.35);
    }
    .inv-line-action--danger {
        color: #b91c1c;
        background: #fef2f2;
        border-color: #fecaca;
    }
    .inv-line-action--danger:hover,
    .inv-line-action--danger:focus {
        color: #fff;
        background: linear-gradient(135deg, #dc2626, #ef4444);
        border-color: #ef4444;
        transform: translateY(-2px);
        box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
    }
    .pf-list-bulk-bar {
        display: flex;
        align-items: center;
        gap: .75rem;
        margin-bottom: 1rem;
        padding: .65rem .85rem;
        border-radius: 10px;
        background: linear-gradient(180deg, #fff5f5 0%, #fff 100%);
        border: 1px solid #fecaca;
    }
    .pf-list-bulk-bar__hint {
        font-size: .8rem;
        color: #64748b;
        flex: 1;
        min-width: 0;
    }
    .pf-list-bulk-bar__hint i { color: #ef4444; margin-right: .25rem; }
    .pf-list-bulk-btn {
        display: inline-flex;
        align-items: center;
        gap: .4rem;
        padding: .45rem .9rem;
        border-radius: 8px;
        border: 1px solid #f87171;
        background: linear-gradient(135deg, #fef2f2, #fff);
        color: #b91c1c;
        font-size: .82rem;
        font-weight: 700;
        cursor: pointer;
        transition: background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
    }
    .pf-list-bulk-btn:hover {
        color: #fff;
        background: linear-gradient(135deg, #dc2626, #ef4444);
        border-color: #ef4444;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }
    .po-upd-table tfoot th {
        background: #f8fafc;
        border-top: 2px solid #e2e8f0;
        font-size: .84rem;
        vertical-align: middle;
    }
    .po-upd-table tfoot .po-upd-total {
        font-size: 1rem;
        font-weight: 800;
        color: #0f172a;
    }
    .po-upd-table tfoot tr:last-child th {
        background: linear-gradient(180deg, #f5f3ff 0%, #f8fafc 100%);
        border-top-color: #ddd6fe;
    }
    .po-upd-table tfoot tr:last-child .po-upd-total {
        color: #7047ee;
        font-size: 1.1rem;
    }
    .po-upd-tfoot-label {
        font-weight: 700;
        color: #475569;
    }
    .po-upd-tfoot-value {
        white-space: nowrap;
        min-width: 120px;
    }
    .po-upd-tfoot-actions {
        width: 5rem;
        min-width: 5rem;
    }
    .gr-show-actions--icons .gr-show-action-btn {
        width: auto;
        min-width: 2.25rem;
        height: 2.25rem;
        padding: 0 .65rem;
        justify-content: center;
        gap: .35rem;
        font-size: .84rem;
    }
    .pf-list-filters {
        display: flex;
        flex-wrap: wrap;
        gap: .75rem 1rem;
        align-items: flex-end;
        margin-bottom: 1rem;
        padding: 1rem 1.1rem;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
    }
    .pf-list-filters .form-label {
        font-size: .78rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .03em;
        color: #64748b;
        margin-bottom: .25rem;
    }
    .pf-list-filters__field { flex: 1 1 160px; min-width: 140px; }
    .pf-list-filters__field--sm { flex: 0 1 110px; min-width: 90px; }
    .pf-list-filters__apply { flex: 0 0 auto; }
    .inv-summary-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
        margin-bottom: 1.25rem;
    }
    @media (max-width: 991px) {
        .inv-summary-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 575px) {
        .inv-summary-grid { grid-template-columns: 1fr; }
    }
    .inv-summary-card {
        border-radius: 12px;
        padding: 1rem 1.1rem;
        background: #fff;
        border: 1px solid #e2e8f0;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    }
    .inv-summary-card__label {
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #64748b;
        font-weight: 700;
        margin-bottom: .35rem;
    }
    .inv-summary-card__value {
        font-size: 1.35rem;
        font-weight: 800;
        color: #0f172a;
        line-height: 1.2;
    }
    .inv-summary-card--pos .inv-summary-card__value { color: #047857; }
    .ck-editor__editable_inline {
        min-height: 100px !important;
        max-height: 300px;
        overflow-y: auto;
    }

/* --- Billing: document header fields --- */
.doc-header-fields-wrap {
        margin-bottom: 1.25rem;
    }
    .doc-header-fields {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        gap: 0.5rem 0.75rem;
    }
    .doc-header-fields-row1 {
        width: 100%;
    }
    @media (min-width: 1200px) {
        .doc-header-fields-row1 { flex-wrap: nowrap; }
        .doc-header-fields-row2 { flex-wrap: nowrap; }
    }
    .doc-header-fields-row2 {
        width: 100%;
        margin-top: 0.5rem;
    }
    .doc-header-fields .form-label {
        font-size: 0.85rem;
        white-space: nowrap;
    }
    .doc-field-date { flex: 0 1 155px; min-width: 140px; }
    .doc-field-customer { flex: 0 1 205px; min-width: 180px; max-width: 230px; }
    .doc-field-section { flex: 0 1 195px; min-width: 170px; max-width: 215px; }
    .doc-field-tva { flex: 0 1 72px; min-width: 64px; }
    .doc-field-discount { flex: 0 1 115px; min-width: 100px; }
    .doc-field-labor { flex: 0 1 115px; min-width: 100px; }
    .doc-field-check { flex: 0 0 auto; white-space: nowrap; }
    .doc-field-title { flex: 1 1 200px; min-width: 180px; }

/* --- Billing: labor amount toggle --- */
.js-labor-amount-field.doc-labor-hidden {
        display: none !important;
    }

/* --- Billing: date modal --- */
.doc-date-modal .modal-content {
        border: none;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    }
    .doc-date-modal .modal-header {
        background: linear-gradient(135deg, #243b55 0%, #3d5080 52%, #5b6eae 100%);
        color: #fff;
        border-bottom: none;
        padding: 1rem 1.25rem;
    }
    .doc-date-modal .modal-header .btn-close {
        filter: invert(1) grayscale(100%) brightness(200%);
        opacity: .85;
    }
    .doc-date-modal .modal-title {
        font-size: 1rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: .5rem;
    }
    .doc-date-modal .modal-body {
        padding: 1.25rem 1.25rem .5rem;
        background: #f8fafc;
    }
    .doc-date-modal .modal-footer {
        border-top: 1px solid #e2e8f0;
        background: #fff;
        padding: .85rem 1.25rem;
    }
    .doc-date-modal__intro {
        font-size: .84rem;
        color: #64748b;
        margin-bottom: 1rem;
        line-height: 1.45;
    }
    .doc-date-modal__ref {
        font-weight: 700;
        color: #334155;
    }
    .doc-date-modal .form-floating > .form-control {
        border-radius: 10px;
        border-color: #e2e8f0;
    }
    .doc-date-modal .form-floating > .form-control:focus {
        border-color: #a78bfa;
        box-shadow: 0 0 0 3px rgba(112, 71, 238, 0.12);
    }

/* --- Billing: proforma item form (CKEditor) --- */
.po-item-form-intro {
        display: flex;
        align-items: flex-start;
        gap: .75rem;
        padding: .8rem .95rem;
        border-radius: 10px;
        background: #f5f3ff;
        border: 1px solid #ddd6fe;
        margin-bottom: 1rem;
        font-size: .84rem;
        color: #475569;
    }
    .po-item-form-intro i {
        color: #7047ee;
        font-size: 1.1rem;
        margin-top: .1rem;
    }
    .po-item-form-section { margin-bottom: 1rem; }
    .po-item-form-section:last-child { margin-bottom: 0; }
    .po-item-form-section__title {
        font-size: .75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: #64748b;
        margin-bottom: .65rem;
        display: flex;
        align-items: center;
        gap: .4rem;
    }
    .po-item-form-section__title i { color: #7047ee; }
    .po-item-form-link {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        font-size: .78rem;
        font-weight: 600;
        margin-bottom: .5rem;
        color: #7047ee !important;
        text-decoration: none;
    }
    .po-item-form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .75rem;
    }
    @media (max-width: 576px) {
        .po-item-form-grid { grid-template-columns: 1fr; }
    }
    .po-item-form-desc .ck-editor__editable_inline {
        min-height: 90px !important;
        max-height: 200px;
        border-radius: 0 0 10px 10px !important;
    }
    .po-item-form-desc .ck.ck-editor {
        border-radius: 10px;
        overflow: hidden;
        border: 1px solid #e2e8f0;
    }

/* --- Two-factor authentication --- */
.tfa-hero {
        background: linear-gradient(135deg, #0f766e 0%, #059669 45%, #34d399 100%);
        border-radius: 18px;
        color: #fff;
        padding: 1.5rem 1.75rem;
        margin-bottom: 1.25rem;
        box-shadow: 0 14px 32px rgba(5, 150, 105, 0.22);
        position: relative;
        overflow: hidden;
    }
    .tfa-hero--danger {
        background: linear-gradient(135deg, #991b1b 0%, #dc2626 50%, #f87171 100%);
        box-shadow: 0 14px 32px rgba(220, 38, 38, 0.22);
    }
    .tfa-hero--purple {
        background: linear-gradient(135deg, #4c1d95 0%, #7047ee 50%, #9b6dff 100%);
        box-shadow: 0 14px 32px rgba(112, 71, 238, 0.22);
    }
    .tfa-hero::after {
        content: "";
        position: absolute;
        right: -24px;
        top: -24px;
        width: 140px;
        height: 140px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
    }
    .tfa-hero__title { font-size: 1.35rem; font-weight: 700; margin-bottom: .25rem; }
    .tfa-hero__sub { opacity: .92; font-size: .9rem; max-width: 680px; }
    .tfa-card {
        border: 0;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
        height: 100%;
    }
    .tfa-card__body { padding: 1.35rem; }
    .tfa-status {
        display: flex;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem 1.1rem;
        border-radius: 14px;
        border: 1px solid #bbf7d0;
        background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
        margin-bottom: 1.25rem;
    }
    .tfa-status--off {
        border-color: #fde68a;
        background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
    }
    .tfa-status__icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1.25rem;
        flex-shrink: 0;
    }
    .tfa-status__icon--on { background: linear-gradient(135deg, #059669, #34d399); }
    .tfa-status__icon--off { background: linear-gradient(135deg, #d97706, #fbbf24); }
    .tfa-status__title { font-weight: 700; color: #0f172a; margin-bottom: .2rem; }
    .tfa-status__desc { color: #64748b; font-size: .88rem; margin: 0; }
    .tfa-block {
        padding: 1rem 1.1rem;
        border-radius: 14px;
        border: 1px solid #e2e8f0;
        background: #f8fafc;
        margin-bottom: 1rem;
    }
    .tfa-block__title {
        font-size: .95rem;
        font-weight: 700;
        color: #0f172a;
        margin-bottom: .45rem;
    }
    .tfa-block__desc { color: #64748b; font-size: .86rem; margin-bottom: .85rem; }
    .tfa-token-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: .6rem;
        margin: 1rem 0;
        padding: 0;
        list-style: none;
    }
    .tfa-token-list li {
        font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
        font-size: .95rem;
        font-weight: 700;
        letter-spacing: .06em;
        text-align: center;
        padding: .65rem .5rem;
        border-radius: 10px;
        background: #0f172a;
        color: #f8fafc;
    }
    .tfa-wizard-card {
        border: 0;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
        padding: 1.5rem;
    }
    .tfa-step-badge {
        display: inline-block;
        padding: .25rem .65rem;
        border-radius: 999px;
        background: #ecfdf5;
        color: #047857;
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .05em;
        margin-bottom: .75rem;
    }
    .tfa-qr-wrap {
        text-align: center;
        padding: 1rem;
        border-radius: 14px;
        background: #f8fafc;
        border: 1px dashed #cbd5e1;
        margin: 1rem 0;
    }
    .tfa-qr-wrap img { max-width: 220px; border-radius: 8px; }
    .tfa-method-check .form-check {
        padding: .75rem 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        margin-bottom: .5rem;
        background: #fff;
    }
    .tfa-method-check .form-check:has(input:checked) {
        border-color: #6ee7b7;
        background: #ecfdf5;
    }
    .tfa-warn {
        padding: .9rem 1rem;
        border-radius: 12px;
        background: #fef2f2;
        border: 1px solid #fecaca;
        color: #991b1b;
        font-size: .9rem;
        margin-bottom: 1rem;
    }
    /* Sidebar actions (aligné sur le profil utilisateur) */
    .tfa-sidebar-title {
        font-weight: 700;
        color: #0f172a;
        margin-bottom: .15rem;
        padding: 0 .35rem;
    }
    .tfa-sidebar-sub {
        font-size: .82rem;
        color: #64748b;
        margin-bottom: 1rem;
        padding: 0 .35rem;
    }
    .tfa-action {
        display: flex;
        align-items: center;
        gap: .85rem;
        padding: 1rem 1.1rem;
        border-radius: 14px;
        border: 1px solid #e2e8f0;
        background: #fff;
        text-decoration: none;
        color: inherit;
        transition: all .18s ease;
        margin-bottom: .75rem;
    }
    .tfa-action:hover {
        border-color: #6ee7b7;
        background: #f0fdf4;
        transform: translateY(-1px);
        color: inherit;
    }
    .tfa-action__icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        flex-shrink: 0;
        font-size: 1rem;
    }
    .tfa-action__icon--profile { background: linear-gradient(135deg, #2563eb, #60a5fa); }
    .tfa-action__icon--password { background: linear-gradient(135deg, #7047ee, #9b6dff); }
    .tfa-action__title { font-weight: 700; color: #0f172a; margin-bottom: .1rem; font-size: .95rem; }
    .tfa-action__desc { font-size: .82rem; color: #64748b; margin: 0; }
    .tfa-tip {
        margin-top: .25rem;
        padding: 1rem 1.1rem;
        border-radius: 14px;
        background: linear-gradient(180deg, #ecfdf5 0%, #f8fafc 100%);
        border: 1px solid #a7f3d0;
    }
    .tfa-tip__title {
        font-size: .82rem;
        font-weight: 700;
        color: #047857;
        margin-bottom: .35rem;
    }
    .tfa-tip__text { font-size: .8rem; color: #64748b; margin: 0; line-height: 1.45; }
    /* Bloc codes de secours */
    .tfa-block--backup {
        border-color: #bae6fd;
        background: linear-gradient(180deg, #f0f9ff 0%, #f8fafc 100%);
    }
    .tfa-block--backup .tfa-block__title { color: #0369a1; }
    .tfa-btn-backup {
        display: inline-flex;
        align-items: center;
        gap: .5rem;
        padding: .55rem 1.1rem;
        border-radius: 10px;
        border: 0;
        background: linear-gradient(135deg, #0284c7, #38bdf8);
        color: #fff;
        font-weight: 600;
        font-size: .88rem;
        text-decoration: none;
        box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28);
        transition: all .18s ease;
    }
    .tfa-btn-backup:hover {
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
    }
    .tfa-token-badge {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        padding: .25rem .65rem;
        border-radius: 999px;
        background: #e0f2fe;
        color: #0369a1;
        font-size: .78rem;
        font-weight: 700;
        margin-bottom: .65rem;
    }
    /* Zone danger — désactivation 2FA */
    .tfa-danger-zone {
        padding: 1.25rem 1.35rem;
        border-radius: 14px;
        border: 1px solid #fecaca;
        background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
    }
    .tfa-danger-zone__header {
        display: flex;
        align-items: flex-start;
        gap: .85rem;
        margin-bottom: 1rem;
    }
    .tfa-danger-zone__icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #dc2626, #f87171);
        color: #fff;
        flex-shrink: 0;
        font-size: 1.1rem;
    }
    .tfa-danger-zone__title {
        font-weight: 700;
        color: #991b1b;
        margin-bottom: .2rem;
        font-size: .98rem;
    }
    .tfa-danger-zone__desc {
        color: #b91c1c;
        font-size: .84rem;
        margin: 0;
        opacity: .85;
        line-height: 1.45;
    }
    .tfa-btn-disable {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .6rem;
        width: 100%;
        padding: .75rem 1.25rem;
        border-radius: 12px;
        border: 1px solid #f87171;
        background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
        color: #fff !important;
        font-weight: 700;
        font-size: .92rem;
        text-decoration: none;
        transition: all .2s ease;
        box-shadow: 0 4px 14px rgba(220, 38, 38, 0.28);
    }
    .tfa-btn-disable:hover {
        background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
        transform: translateY(-1px);
        box-shadow: 0 8px 22px rgba(220, 38, 38, 0.38);
        color: #fff !important;
    }
    .tfa-btn-disable i { font-size: 1rem; opacity: .95; }
    .tfa-btn-enable {
        display: inline-flex;
        align-items: center;
        gap: .55rem;
        padding: .7rem 1.35rem;
        border-radius: 12px;
        border: 0;
        background: linear-gradient(135deg, #059669, #34d399);
        color: #fff;
        font-weight: 700;
        text-decoration: none;
        box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
        transition: all .18s ease;
    }
    .tfa-btn-enable:hover {
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35);
    }

/* --- Datatable cell icons (billing) --- */
.po-dt-cell-icon--amount { background: #fffbeb; color: #d97706; }


/* ==========================================================================
   Page-specific styles (migrated from inline <style> blocks)
   ========================================================================== */

/* --- Migrated from: companies/templates/companies/partials/_empty_doc.html --- */
@page {
            size: A4;
            margin: 2mm 10mm;
        }

        body {
            font-family: sans-serif;
            font-size: 12pt;
        }

        .header, .footer {
            width: 100%;
            padding: 10px 0;
        }

        .header {
            border-bottom: 1px solid #ccc;
        }

        .footer {
            border-top: 1px solid #ccc;
            /* position: fixed; */
            bottom: 0;
        }

        .content {
            margin-top: 2mm;
            margin-bottom: 2mm;
        }

/* --- Migrated from: expenses/templates/expenses/category/index.html --- */
.icat-stats { margin-bottom: 1.5rem; }
    .icat-stat-card {
        border: 0;
        border-radius: 14px;
        padding: 1.1rem 1.25rem;
        color: #fff;
        height: 100%;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
        position: relative;
        overflow: hidden;
    }
    .icat-stat-card::after {
        content: "";
        position: absolute;
        right: -18px;
        top: -18px;
        width: 88px;
        height: 88px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
    }
    .icat-stat-card--total { background: linear-gradient(135deg, #7047ee, #9b6dff); }
    .icat-stat-card--active { background: linear-gradient(135deg, #059669, #34d399); }
    .icat-stat-card--roots { background: linear-gradient(135deg, #0284c7, #38bdf8); }
    .icat-stat-card--children { background: linear-gradient(135deg, #d97706, #fbbf24); }
    .icat-stat-card__label {
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        opacity: 0.92;
        margin-bottom: 0.35rem;
    }
    .icat-stat-card__value {
        font-size: 1.75rem;
        font-weight: 700;
        line-height: 1.1;
    }
    .icat-stat-card__icon {
        position: absolute;
        right: 1rem;
        bottom: 0.85rem;
        font-size: 1.6rem;
        opacity: 0.35;
    }
    .icat-table thead th {
        background: #f8fafc;
        border-bottom-width: 1px;
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #64748b;
    }
    .icat-row--disabled { opacity: 0.72; }
    .icat-name {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        padding-left: calc(var(--icat-depth, 0) * 1.35rem);
    }
    .icat-name__branch {
        width: 10px;
        height: 10px;
        border-left: 2px solid #cbd5e1;
        border-bottom: 2px solid #cbd5e1;
        margin-right: 0.15rem;
        flex-shrink: 0;
    }
    .icat-name__icon { width: 1.25rem; text-align: center; flex-shrink: 0; }
    .icat-name__text { font-weight: 600; color: #0f172a; }
    .icat-root-badge,
    .icat-parent-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.28rem 0.65rem;
        border-radius: 999px;
        font-size: 0.78rem;
        font-weight: 600;
    }
    .icat-root-badge { background: #eef2ff; color: #4f46e5; }
    .icat-parent-badge { background: #f1f5f9; color: #475569; }
    .bg-success-light { background: #ecfdf5 !important; }
    .bg-danger-light { background: #fef2f2 !important; }
    .icat-empty {
        text-align: center;
        padding: 3rem 1rem;
        color: #64748b;
    }
    .icat-empty i { font-size: 2.5rem; color: #cbd5e1; margin-bottom: 0.75rem; }

/* --- Utilisateurs & profils (tables style dépenses) --- */
.usr-stats { margin-bottom: 1.5rem; }
.usr-stat-card {
    border: 0;
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    color: #fff;
    height: 100%;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
}
.usr-stat-card::after {
    content: "";
    position: absolute;
    right: -18px;
    top: -18px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}
.usr-stat-card--total { background: linear-gradient(135deg, #243b55, #3d5080); }
.usr-stat-card--active { background: linear-gradient(135deg, #059669, #34d399); }
.usr-stat-card--inactive { background: linear-gradient(135deg, #64748b, #94a3b8); }
.usr-stat-card__label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.92;
    margin-bottom: 0.35rem;
}
.usr-stat-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
}
.usr-stat-card__icon {
    position: absolute;
    right: 1rem;
    bottom: 0.85rem;
    font-size: 1.6rem;
    opacity: 0.35;
}
.usr-table thead th {
    background: #f8fafc;
    border-bottom-width: 1px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 700;
}
.usr-table tbody td {
    vertical-align: middle;
    font-size: 0.88rem;
    color: #334155;
}
.usr-row--disabled { opacity: 0.72; }
.usr-name {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.usr-name__icon {
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
    color: #7047ee;
}
.usr-name__text {
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
}
a.usr-name__text:hover { color: #7047ee; }
.usr-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}
.usr-badge--profil { background: #eef2ff; color: #4f46e5; }
.usr-badge--warn { background: #fff7ed; color: #c2410c; }

/* --- Types de clients --- */
.ctyp-stats { margin-bottom: 1.5rem; }
.ctyp-stat-card {
    border: 0;
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    color: #fff;
    height: 100%;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
}
.ctyp-stat-card::after {
    content: "";
    position: absolute;
    right: -18px;
    top: -18px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}
.ctyp-stat-card--total { background: linear-gradient(135deg, #0e7490, #22d3ee); }
.ctyp-stat-card--active { background: linear-gradient(135deg, #059669, #34d399); }
.ctyp-stat-card--inactive { background: linear-gradient(135deg, #64748b, #94a3b8); }
.ctyp-stat-card__label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.92;
    margin-bottom: 0.35rem;
}
.ctyp-stat-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
}
.ctyp-stat-card__icon {
    position: absolute;
    right: 1rem;
    bottom: 0.85rem;
    font-size: 1.6rem;
    opacity: 0.35;
}
.ctyp-table thead th {
    background: #f8fafc;
    border-bottom-width: 1px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 700;
}
.ctyp-table tbody td {
    vertical-align: middle;
    font-size: 0.88rem;
    color: #334155;
}
.ctyp-row--disabled { opacity: 0.72; }
.ctyp-name {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.ctyp-name__icon {
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
    color: #0e7490;
}
.ctyp-name__text {
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
}
a.ctyp-name__text:hover { color: #0e7490; }
.ctyp-code {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: #f1f5f9;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    font-family: ui-monospace, monospace;
}
.ctyp-flag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}
.ctyp-flag--yes { background: #ecfdf5; color: #047857; }
.ctyp-flag--no { background: #fef2f2; color: #b91c1c; }

/* --- Migrated from: expenses/templates/expenses/index.html --- */
.exp-stats { margin-bottom: 1.25rem; }
        .exp-stat-card {
            border: 0; border-radius: 14px; padding: 1rem 1.15rem; color: #fff;
            height: 100%; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); position: relative; overflow: hidden;
        }
        .exp-stat-card::after {
            content: ""; position: absolute; right: -16px; top: -16px;
            width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.12);
        }
        .exp-stat-card--total { background: linear-gradient(135deg, #dc2626, #f87171); }
        .exp-stat-card--count { background: linear-gradient(135deg, #7047ee, #9b6dff); }
        .exp-stat-card--auto { background: linear-gradient(135deg, #d97706, #fbbf24); }
        .exp-stat-card--manual { background: linear-gradient(135deg, #64748b, #94a3b8); }
        .exp-stat-card__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; opacity: .92; }
        .exp-stat-card__value { font-size: 1.55rem; font-weight: 700; line-height: 1.15; }
        .exp-stat-card__icon { position: absolute; right: .9rem; bottom: .75rem; font-size: 1.4rem; opacity: .35; }
        .exp-filters { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: .9rem 1rem; margin-bottom: 1rem; }
        .exp-source { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
        .exp-source--auto { background: #fff7ed; color: #c2410c; }
        .exp-source--manual { background: #f1f5f9; color: #64748b; }
        .exp-status { display: inline-block; padding: .2rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
        .exp-status--success { background: #ecfdf5; color: #059669; }
        .exp-status--warning { background: #fffbeb; color: #d97706; }
        .exp-status--secondary { background: #f1f5f9; color: #64748b; }
        .exp-amount { font-weight: 700; color: #dc2626; }
        .exp-ref { font-weight: 600; }
        .exp-badge--auto { color: #c2410c; }
        .ck-editor__editable_inline { min-height: 100px !important; max-height: 300px; overflow-y: auto; }

/* --- Migrated from: expenses/templates/expenses/stats.html --- */
.estat-hero {
        background: linear-gradient(135deg, #dc2626 0%, #ef4444 55%, #f87171 100%);
        border-radius: 16px; color: #fff; padding: 1.5rem 1.75rem; margin-bottom: 1.25rem;
        box-shadow: 0 12px 30px rgba(220, 38, 38, 0.22);
    }
    .estat-hero__title { font-size: 1.35rem; font-weight: 700; margin-bottom: .25rem; }
    .estat-hero__period { opacity: .92; font-size: .92rem; }
    .estat-kpi {
        border: 0; border-radius: 14px; padding: 1rem 1.1rem; height: 100%;
        background: #fff; box-shadow: 0 8px 20px rgba(15,23,42,.06);
    }
    .estat-kpi__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
    .estat-kpi__value { font-size: 1.45rem; font-weight: 700; color: #0f172a; line-height: 1.2; }
    .estat-kpi__sub { font-size: .8rem; margin-top: .25rem; }
    .estat-kpi__sub--up { color: #dc2626; }
    .estat-kpi__sub--down { color: #059669; }
    .estat-filter {
        background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
        padding: 1rem; margin-bottom: 1rem;
    }
    .estat-filter .form-control-sm,
    .estat-filter .btn-sm { height: calc(1.5em + 0.5rem + 2px); }
    .estat-presets {
        display: flex;
        flex-wrap: wrap;
        gap: .45rem;
        align-items: center;
    }
    .estat-presets__label {
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .06em;
        color: #64748b;
        margin-right: .25rem;
    }
    .estat-preset {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        padding: .38rem .85rem;
        border-radius: 999px;
        font-size: .78rem;
        font-weight: 600;
        text-decoration: none;
        color: #334155;
        background: #fff;
        border: 1px solid #cbd5e1;
        transition: all .18s ease;
        box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    }
    .estat-preset:hover {
        color: #dc2626;
        border-color: #fca5a5;
        background: #fef2f2;
        transform: translateY(-1px);
    }
    .estat-preset--active {
        color: #fff;
        background: linear-gradient(135deg, #dc2626, #ef4444);
        border-color: transparent;
        box-shadow: 0 6px 16px rgba(220, 38, 38, .28);
    }
    .estat-preset--active:hover {
        color: #fff;
        background: linear-gradient(135deg, #b91c1c, #dc2626);
    }
    .estat-actions .btn { border-radius: 999px; font-weight: 600; }
    .estat-table thead th {
        background: #f8fafc; font-size: .78rem; text-transform: uppercase;
        letter-spacing: .04em; color: #64748b;
    }
    .estat-share { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
    .estat-share__bar { height: 100%; background: linear-gradient(90deg, #ff3a6e, #dc2626); border-radius: 999px; }
    .estat-empty { text-align: center; padding: 2.5rem 1rem; color: #64748b; }

/* --- Migrated from: incomes/templates/incomes/category/index.html --- */
.icat-stats { margin-bottom: 1.5rem; }
    .icat-stat-card {
        border: 0;
        border-radius: 14px;
        padding: 1.1rem 1.25rem;
        color: #fff;
        height: 100%;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
        position: relative;
        overflow: hidden;
    }
    .icat-stat-card::after {
        content: "";
        position: absolute;
        right: -18px;
        top: -18px;
        width: 88px;
        height: 88px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
    }
    .icat-stat-card--total { background: linear-gradient(135deg, #7047ee, #9b6dff); }
    .icat-stat-card--active { background: linear-gradient(135deg, #059669, #34d399); }
    .icat-stat-card--roots { background: linear-gradient(135deg, #0284c7, #38bdf8); }
    .icat-stat-card--children { background: linear-gradient(135deg, #d97706, #fbbf24); }
    .icat-stat-card__label {
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        opacity: 0.92;
        margin-bottom: 0.35rem;
    }
    .icat-stat-card__value {
        font-size: 1.75rem;
        font-weight: 700;
        line-height: 1.1;
    }
    .icat-stat-card__icon {
        position: absolute;
        right: 1rem;
        bottom: 0.85rem;
        font-size: 1.6rem;
        opacity: 0.35;
    }
    .icat-table thead th {
        background: #f8fafc;
        border-bottom-width: 1px;
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #64748b;
    }
    .icat-row--disabled { opacity: 0.72; }
    .icat-name {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        padding-left: calc(var(--icat-depth, 0) * 1.35rem);
    }
    .icat-name__branch {
        width: 10px;
        height: 10px;
        border-left: 2px solid #cbd5e1;
        border-bottom: 2px solid #cbd5e1;
        margin-right: 0.15rem;
        flex-shrink: 0;
    }
    .icat-name__icon { width: 1.25rem; text-align: center; flex-shrink: 0; }
    .icat-name__text { font-weight: 600; color: #0f172a; }
    .icat-root-badge,
    .icat-parent-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.28rem 0.65rem;
        border-radius: 999px;
        font-size: 0.78rem;
        font-weight: 600;
    }
    .icat-root-badge { background: #eef2ff; color: #4f46e5; }
    .icat-parent-badge { background: #f1f5f9; color: #475569; }
    .bg-success-light { background: #ecfdf5 !important; }
    .bg-danger-light { background: #fef2f2 !important; }
    .icat-empty {
        text-align: center;
        padding: 3rem 1rem;
        color: #64748b;
    }
    .icat-empty i { font-size: 2.5rem; color: #cbd5e1; margin-bottom: 0.75rem; }

/* --- Migrated from: incomes/templates/incomes/index.html --- */
.inc-stats { margin-bottom: 1.25rem; }
        .inc-stat-card {
            border: 0; border-radius: 14px; padding: 1rem 1.15rem; color: #fff;
            height: 100%; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); position: relative; overflow: hidden;
        }
        .inc-stat-card::after {
            content: ""; position: absolute; right: -16px; top: -16px;
            width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.12);
        }
        .inc-stat-card--total { background: linear-gradient(135deg, #059669, #34d399); }
        .inc-stat-card--count { background: linear-gradient(135deg, #7047ee, #9b6dff); }
        .inc-stat-card--invoice { background: linear-gradient(135deg, #0284c7, #38bdf8); }
        .inc-stat-card--manual { background: linear-gradient(135deg, #d97706, #fbbf24); }
        .inc-stat-card__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; opacity: .92; }
        .inc-stat-card__value { font-size: 1.55rem; font-weight: 700; line-height: 1.15; }
        .inc-stat-card__icon { position: absolute; right: .9rem; bottom: .75rem; font-size: 1.4rem; opacity: .35; }
        .inc-filters { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: .9rem 1rem; margin-bottom: 1rem; }
        .inc-source { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
        .inc-source--invoice { background: #eff6ff; color: #2563eb; }
        .inc-source--manual { background: #f1f5f9; color: #64748b; }
        .inc-status { display: inline-block; padding: .2rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
        .inc-status--success { background: #ecfdf5; color: #059669; }
        .inc-status--warning { background: #fffbeb; color: #d97706; }
        .inc-status--secondary { background: #f1f5f9; color: #64748b; }
        .inc-amount { font-weight: 700; color: #059669; }
        .inc-ref { font-weight: 600; }
        .inc-row--clickable { cursor: pointer; }
        .inc-row--clickable:hover { background-color: #f0fdf4 !important; }
        .inc-badge--invoice { color: #2563eb; }
        .ck-editor__editable_inline { min-height: 100px !important; max-height: 300px; overflow-y: auto; }

/* --- Migrated from: incomes/templates/incomes/stats.html --- */
.istat-hero {
        background: linear-gradient(135deg, #059669 0%, #10b981 55%, #34d399 100%);
        border-radius: 16px; color: #fff; padding: 1.5rem 1.75rem; margin-bottom: 1.25rem;
        box-shadow: 0 12px 30px rgba(5, 150, 105, 0.22);
    }
    .istat-hero__title { font-size: 1.35rem; font-weight: 700; margin-bottom: .25rem; }
    .istat-hero__period { opacity: .92; font-size: .92rem; }
    .istat-kpi {
        border: 0; border-radius: 14px; padding: 1rem 1.1rem; height: 100%;
        background: #fff; box-shadow: 0 8px 20px rgba(15,23,42,.06);
    }
    .istat-kpi__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
    .istat-kpi__value { font-size: 1.45rem; font-weight: 700; color: #0f172a; line-height: 1.2; }
    .istat-kpi__sub { font-size: .8rem; margin-top: .25rem; }
    .istat-kpi__sub--up { color: #059669; }
    .istat-kpi__sub--down { color: #dc2626; }
    .istat-filter {
        background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
        padding: 1rem; margin-bottom: 1rem;
    }
    .istat-filter .form-control-sm,
    .istat-filter .btn-sm { height: calc(1.5em + 0.5rem + 2px); }
    .istat-presets {
        display: flex;
        flex-wrap: wrap;
        gap: .45rem;
        align-items: center;
    }
    .istat-presets__label {
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .06em;
        color: #64748b;
        margin-right: .25rem;
    }
    .istat-preset {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        padding: .38rem .85rem;
        border-radius: 999px;
        font-size: .78rem;
        font-weight: 600;
        text-decoration: none;
        color: #334155;
        background: #fff;
        border: 1px solid #cbd5e1;
        transition: all .18s ease;
        box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    }
    .istat-preset:hover {
        color: #059669;
        border-color: #6ee7b7;
        background: #ecfdf5;
        transform: translateY(-1px);
    }
    .istat-preset--active {
        color: #fff;
        background: linear-gradient(135deg, #059669, #10b981);
        border-color: transparent;
        box-shadow: 0 6px 16px rgba(5, 150, 105, .28);
    }
    .istat-preset--active:hover {
        color: #fff;
        background: linear-gradient(135deg, #047857, #059669);
    }
    .istat-actions .btn { border-radius: 999px; font-weight: 600; }
    .istat-table thead th {
        background: #f8fafc; font-size: .78rem; text-transform: uppercase;
        letter-spacing: .04em; color: #64748b;
    }
    .istat-share { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
    .istat-share__bar { height: 100%; background: linear-gradient(90deg, #7047ee, #059669); border-radius: 999px; }
    .istat-empty { text-align: center; padding: 2.5rem 1rem; color: #64748b; }

/* --- Migrated from: payments/templates/payments/payment/choose_payment_method.html --- */
/* --- Migrated from: resources/templates/resources/create.html --- */
.res-create-card {
            border: 0;
            border-radius: 16px;
            background: #fff;
            box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
            overflow: hidden;
        }
        .res-create-card__head {
            padding: 1.25rem 1.5rem;
            background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #6366f1 100%);
            color: #fff;
        }
        .res-create-card__head h2 {
            font-size: 1.25rem;
            font-weight: 700;
            margin: 0 0 .25rem;
        }
        .res-create-card__head p { margin: 0; opacity: .9; font-size: .88rem; }
        .res-create-card__body { padding: 1.35rem 1.5rem; }
        .res-create-submit {
            display: inline-flex;
            align-items: center;
            gap: .45rem;
            padding: .65rem 1.35rem;
            border-radius: 10px;
            font-weight: 700;
        }

/* --- Migrated from: resources/templates/resources/low_stock/index.html --- */
.ls-hero {
        background: linear-gradient(135deg, #243b55 0%, #3d5080 52%, #5b6eae 100%);
        border-radius: 18px;
        color: #fff;
        padding: 1.4rem 1.6rem;
        margin-bottom: 1.25rem;
        box-shadow: 0 14px 32px rgba(36, 59, 85, 0.2);
        position: relative;
        overflow: hidden;
    }
    .ls-hero::after {
        content: "";
        position: absolute;
        right: -20px;
        top: -20px;
        width: 130px;
        height: 130px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
    }
    .ls-hero__row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        position: relative;
        z-index: 1;
    }
    .ls-hero__title { font-size: 1.35rem; font-weight: 700; margin-bottom: .35rem; }
    .ls-hero__sub { opacity: .92; font-size: .9rem; margin: 0; }
    .ls-hero__badge {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        padding: .35rem .75rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.28);
        font-size: .8rem;
        font-weight: 700;
    }
    .ls-card {
        border: 0;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
        overflow: hidden;
    }
    .ls-card__head {
        padding: 1rem 1.25rem;
        border-bottom: 1px solid #e2e8f0;
        background: linear-gradient(180deg, #f5f3ff 0%, #fff 100%);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
        flex-wrap: wrap;
    }
    .ls-card__head-title {
        margin: 0;
        font-size: .95rem;
        font-weight: 700;
        color: #243b55;
        display: flex;
        align-items: center;
        gap: .5rem;
    }
    .ls-card__head-icon {
        width: 30px;
        height: 30px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #30497a, #7047ee);
        color: #fff;
        font-size: .8rem;
    }
    .ls-card__head .btn-outline-premigest {
        border-color: #7047ee;
        color: #7047ee;
        font-weight: 600;
    }
    .ls-card__head .btn-outline-premigest:hover {
        background: #f5f3ff;
        color: #5b36c9;
        border-color: #5b36c9;
    }
    .ls-list { list-style: none; margin: 0; padding: 0; }
    .ls-item {
        display: flex;
        align-items: center;
        gap: .9rem;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid #f1f5f9;
        transition: background .15s ease;
    }
    .ls-item:last-child { border-bottom: 0; }
    .ls-item:hover { background: #faf5ff; }
    .ls-item__icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        font-size: .95rem;
    }
    .ls-item__icon--warning { background: #f5f3ff; color: #7047ee; }
    .ls-item__icon--critical { background: #eef4ff; color: #30497a; }
    .ls-item__body { flex: 1; min-width: 0; }
    .ls-item__title {
        font-weight: 700;
        color: #243b55;
        font-size: .95rem;
        margin-bottom: .15rem;
    }
    .ls-item__title a { color: inherit; text-decoration: none; }
    .ls-item__title a:hover { color: #7047ee; }
    .ls-item__meta {
        font-size: .8rem;
        color: #64748b;
        display: flex;
        flex-wrap: wrap;
        gap: .5rem .85rem;
    }
    .ls-item__meta span { display: inline-flex; align-items: center; gap: .25rem; }
    .ls-item__meta i { color: #7047ee; font-size: .75rem; }
    .ls-item__stock {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .ls-item__qty {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 52px;
        padding: .35rem .55rem;
        border-radius: 10px;
        font-weight: 800;
        font-size: 1.05rem;
        line-height: 1.1;
        text-align: center;
    }
    .ls-item__qty--warning { background: #f5f3ff; color: #7047ee; border: 1px solid #ddd6fe; }
    .ls-item__qty--critical { background: #eef4ff; color: #30497a; border: 1px solid #c7d2fe; }
    .ls-item__qty-label {
        display: block;
        width: 100%;
        text-align: center;
        font-size: .62rem;
        font-weight: 700;
        color: #94a3b8;
        text-transform: none;
        letter-spacing: .02em;
        margin-top: .15rem;
    }
    .ls-empty {
        text-align: center;
        padding: 3rem 1.5rem;
        color: #64748b;
    }
    .ls-empty i {
        font-size: 2.5rem;
        color: #7047ee;
        margin-bottom: .75rem;
        display: block;
    }
    .ls-empty h4 { color: #243b55; font-weight: 700; margin-bottom: .35rem; }

/* --- Migrated from: resources/templates/resources/section/index.html --- */
.isec-stats { margin-bottom: 1.5rem; }
    .isec-stat-card {
        border: 0;
        border-radius: 14px;
        padding: 1.1rem 1.25rem;
        color: #fff;
        height: 100%;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
        position: relative;
        overflow: hidden;
    }
    .isec-stat-card::after {
        content: "";
        position: absolute;
        right: -18px;
        top: -18px;
        width: 88px;
        height: 88px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
    }
    .isec-stat-card--total { background: linear-gradient(135deg, #7047ee, #9b6dff); }
    .isec-stat-card--active { background: linear-gradient(135deg, #059669, #34d399); }
    .isec-stat-card--inactive { background: linear-gradient(135deg, #64748b, #94a3b8); }
    .isec-stat-card--resources { background: linear-gradient(135deg, #0284c7, #38bdf8); }
    .isec-stat-card__label {
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        opacity: 0.92;
        margin-bottom: 0.35rem;
    }
    .isec-stat-card__value {
        font-size: 1.75rem;
        font-weight: 700;
        line-height: 1.1;
    }
    .isec-stat-card__icon {
        position: absolute;
        right: 1rem;
        bottom: 0.85rem;
        font-size: 1.6rem;
        opacity: 0.35;
    }
    .isec-table thead th {
        background: #f8fafc;
        border-bottom-width: 1px;
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #64748b;
    }
    .isec-row--disabled { opacity: 0.72; }
    .isec-name {
        display: flex;
        align-items: center;
        gap: 0.55rem;
    }
    .isec-name__icon { width: 1.25rem; text-align: center; flex-shrink: 0; }
    .isec-name__text { font-weight: 600; color: #0f172a; }
    .isec-count-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.28rem 0.65rem;
        border-radius: 999px;
        font-size: 0.78rem;
        font-weight: 600;
        background: #f1f5f9;
        color: #475569;
    }
    .bg-success-light { background: #ecfdf5 !important; }
    .bg-danger-light { background: #fef2f2 !important; }
    .isec-empty {
        text-align: center;
        padding: 3rem 1rem;
        color: #64748b;
    }
    .isec-empty i { font-size: 2.5rem; color: #cbd5e1; margin-bottom: 0.75rem; }

/* --- Migrated from: resources/templates/resources/section/show.html --- */
.res-list-hero__badge {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        padding: .28rem .7rem;
        border-radius: 999px;
        font-size: .78rem;
        font-weight: 700;
        margin-top: .5rem;
        background: rgba(255, 255, 255, 0.18);
        border: 1px solid rgba(255, 255, 255, 0.28);
    }
    .res-list-hero__back {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        margin-top: .65rem;
        color: rgba(255, 255, 255, 0.88);
        font-size: .85rem;
        text-decoration: none;
    }
    .res-list-hero__back:hover { color: #fff; text-decoration: underline; }
    .res-list-hero .dropdown .btn-light {
        background: #fff;
        color: #1e40af;
        font-weight: 700;
        border: 0;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
    }

/* --- Migrated from: resources/templates/resources/show.html --- */
.res-hero {
        background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 48%, #6366f1 100%);
        border-radius: 18px;
        color: #fff;
        padding: 1.5rem 1.75rem;
        margin-bottom: 1.25rem;
        box-shadow: 0 14px 32px rgba(59, 130, 246, 0.22);
        position: relative;
        overflow: hidden;
    }
    .res-hero::after {
        content: "";
        position: absolute;
        right: -28px;
        top: -28px;
        width: 150px;
        height: 150px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
    }
    .res-hero__top {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        position: relative;
        z-index: 1;
    }
    .res-hero__title {
        font-size: 1.45rem;
        font-weight: 700;
        margin-bottom: .45rem;
        line-height: 1.25;
    }
    .res-hero__actions {
        position: relative;
        z-index: 1;
        margin-top: 1.15rem;
        padding-top: 1.1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
    .res-hero__actions-label {
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .06em;
        opacity: .85;
        font-weight: 700;
        margin-bottom: .65rem;
    }
    .res-hero__meta {
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        align-items: center;
    }
    .res-badge {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        padding: .28rem .7rem;
        border-radius: 999px;
        font-size: .78rem;
        font-weight: 700;
        background: rgba(255, 255, 255, 0.18);
        border: 1px solid rgba(255, 255, 255, 0.25);
    }
    .res-badge--code {
        font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
        letter-spacing: .04em;
    }
    .res-card {
        border: 0;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    }
    .res-card__body { padding: 1.35rem; }
    .res-section-title {
        font-size: .95rem;
        font-weight: 700;
        color: #0f172a;
        margin-bottom: 1rem;
    }
    .res-info-grid {
        display: grid;
        gap: .75rem;
    }
    .res-info-item {
        display: flex;
        align-items: flex-start;
        gap: .85rem;
        padding: .9rem 1rem;
        border-radius: 12px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
    }
    .res-info-item__icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        color: #3b82f6;
        flex-shrink: 0;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    }
    .res-info-item__label {
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: #64748b;
        font-weight: 700;
        margin-bottom: .15rem;
    }
    .res-info-item__value {
        font-size: .96rem;
        font-weight: 600;
        color: #0f172a;
        word-break: break-word;
    }
    .res-info-item__value a {
        color: #2563eb;
        text-decoration: none;
    }
    .res-info-item__value a:hover { text-decoration: underline; }
    .res-stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: .75rem;
        margin-bottom: 1.25rem;
    }
    .res-stat {
        padding: 1rem 1.1rem;
        border-radius: 14px;
        border: 1px solid #e2e8f0;
        background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    }
    .res-stat--highlight {
        border-color: #bfdbfe;
        background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
    }
    .res-stat--stock {
        border-color: #bbf7d0;
        background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
    }
    .res-stat--stock .res-stat__value { color: #047857; font-size: 1.5rem; }
    .res-stat__label {
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: #64748b;
        font-weight: 700;
        margin-bottom: .35rem;
    }
    .res-stat__value {
        font-size: 1.25rem;
        font-weight: 700;
        color: #0f172a;
        line-height: 1.2;
    }
    .res-stat__sub {
        font-size: .78rem;
        color: #64748b;
        margin-top: .2rem;
    }
    .res-desc {
        padding: 1rem 1.1rem;
        border-radius: 12px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        color: #334155;
        font-size: .92rem;
        line-height: 1.55;
        white-space: pre-wrap;
    }
    .res-desc--empty { color: #94a3b8; font-style: italic; }
    .res-meta {
        padding: .85rem 1rem;
        border-radius: 12px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        font-size: .82rem;
        color: #64748b;
        line-height: 1.5;
    }
    .res-status {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        padding: .35rem .75rem;
        border-radius: 999px;
        font-size: .8rem;
        font-weight: 700;
    }
    .res-status--on { background: #dcfce7; color: #166534; }
    .res-status--off { background: #f1f5f9; color: #475569; }
    /* Barre d'actions (hero) */
    .res-toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        justify-content: flex-end;
        align-items: center;
    }
    .res-tool-form { display: inline; margin: 0; }
    .res-tool-btn {
        display: inline-flex;
        align-items: center;
        gap: .45rem;
        padding: .55rem 1rem;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.35);
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        font-weight: 600;
        font-size: .86rem;
        text-decoration: none;
        cursor: pointer;
        transition: all .18s ease;
        line-height: 1.2;
        white-space: nowrap;
    }
    .res-tool-btn:hover {
        background: rgba(255, 255, 255, 0.22);
        color: #fff;
        transform: translateY(-1px);
    }
    .res-tool-btn--solid {
        background: #fff;
        color: #1e40af;
        border-color: #fff;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
    }
    .res-tool-btn--solid:hover {
        background: #eff6ff;
        color: #1d4ed8;
    }
    .res-tool-btn--success {
        background: rgba(16, 185, 129, 0.9);
        border-color: rgba(255, 255, 255, 0.4);
    }
    .res-tool-btn--success:hover { background: #059669; color: #fff; }
    .res-tool-btn--warning {
        background: rgba(245, 158, 11, 0.95);
        border-color: rgba(255, 255, 255, 0.4);
    }
    .res-tool-btn--warning:hover { background: #d97706; color: #fff; }
    .res-tool-btn--danger {
        background: rgba(239, 68, 68, 0.92);
        border-color: rgba(255, 255, 255, 0.4);
    }
    .res-tool-btn--danger:hover { background: #dc2626; color: #fff; }
    .res-tool-btn--ghost { background: transparent; }
    @media (max-width: 767px) {
        .res-hero__top { flex-direction: column; }
        .res-toolbar { justify-content: flex-start; width: 100%; }
    }

/* --- Migrated from: templates/two_factor/_base.html --- */
.ww-50{
      width: 50% !important;
    }
    .h-p100 {
        height: 100% !important;
    }
    .theme-primary .text-primary {
      color: #7047ee !important;
    }
    .theme-primary .btn-primary {
        background-color: #7047ee;
        border-color: #7047ee;
        color: #ffffff;
    }
    .form-control, .form-select {
        border-radius: 5px;
        box-shadow: none;
        border-color: #86a4c3;
        height: auto;
    }
    .theme-primary .form-control:focus {
        border-color: #7047ee;
    }
    .bg-transparent {
        background-color: transparent !important;
    }
    .translate-center {
        transform: translate(-50%, 20px) !important;
    }

/* --- Migrated from: templates/two_factor/core/login2.html --- */
html,body {
        height: 100%;
    }

/* --- Migrated from: user/templates/user/profil/change_password.html --- */
.upwd-hero {
        background: linear-gradient(135deg, #4c1d95 0%, #7047ee 50%, #9b6dff 100%);
        border-radius: 18px;
        color: #fff;
        padding: 1.5rem 1.75rem;
        margin-bottom: 1.25rem;
        box-shadow: 0 14px 32px rgba(112, 71, 238, 0.24);
    }
    .upwd-hero__title { font-size: 1.3rem; font-weight: 700; margin-bottom: .25rem; }
    .upwd-hero__sub { opacity: .92; font-size: .9rem; max-width: 640px; }
    .upwd-card {
        border: 0;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
        overflow: hidden;
    }
    .upwd-card__head {
        padding: 1.1rem 1.35rem;
        border-bottom: 1px solid #e2e8f0;
        background: linear-gradient(180deg, #faf5ff 0%, #fff 100%);
    }
    .upwd-card__body { padding: 1.35rem; }
    .upwd-notice {
        display: flex;
        gap: .75rem;
        align-items: flex-start;
        padding: .9rem 1rem;
        border-radius: 12px;
        background: #eff6ff;
        border: 1px solid #bfdbfe;
        color: #1e3a8a;
        margin-bottom: 1.25rem;
        font-size: .9rem;
    }
    .upwd-notice i { font-size: 1.1rem; margin-top: .1rem; }
    .upwd-rules {
        margin-top: 1rem;
        padding: .85rem 1rem;
        border-radius: 12px;
        background: #f8fafc;
        border: 1px dashed #cbd5e1;
        font-size: .82rem;
        color: #64748b;
    }
    .upwd-rules strong { color: #334155; display: block; margin-bottom: .35rem; }
    .upwd-back {
        display: inline-flex;
        align-items: center;
        gap: .4rem;
        margin-top: 1rem;
        font-size: .88rem;
        font-weight: 600;
        text-decoration: none;
        color: #64748b;
    }
    .upwd-back:hover { color: #7047ee; }
    .form-floating.has-pwd-toggle input { padding-right: 2.5rem; }
    .form-floating .pwd-toggle {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        cursor: pointer;
        color: #94a3b8;
        padding: 4px;
        line-height: 1;
    }
    .form-floating .pwd-toggle:hover { color: #7047ee; }

/* --- Migrated from: user/templates/user/profil/index.html --- */
.uprofile-hero {
        background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 45%, #7047ee 100%);
        border-radius: 18px;
        color: #fff;
        padding: 1.75rem 2rem;
        margin-bottom: 1.25rem;
        box-shadow: 0 16px 36px rgba(59, 130, 246, 0.22);
        position: relative;
        overflow: hidden;
    }
    .uprofile-hero::after {
        content: "";
        position: absolute;
        right: -30px;
        top: -30px;
        width: 160px;
        height: 160px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
    }
    .uprofile-hero__title { font-size: 1.4rem; font-weight: 700; margin-bottom: .2rem; }
    .uprofile-hero__sub { opacity: .9; font-size: .92rem; }
    .uprofile-card {
        border: 0;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
        height: 100%;
    }
    .uprofile-avatar-wrap { position: relative; display: inline-block; }
    .uprofile-avatar-wrap img {
        width: 110px;
        height: 110px;
        object-fit: cover;
        border: 4px solid #fff;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    }
    .uprofile-avatar-edit {
        position: absolute;
        right: 0;
        bottom: 0;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: #3b82f6;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid #fff;
        text-decoration: none;
    }
    .uprofile-name { font-size: 1.35rem; font-weight: 700; color: #0f172a; margin: 0; }
    .uprofile-email {
        display: inline-flex;
        align-items: center;
        gap: .4rem;
        margin-top: .5rem;
        padding: .3rem .7rem;
        border-radius: 999px;
        background: #eff6ff;
        color: #1d4ed8;
        font-size: .85rem;
        font-weight: 600;
    }
    .uprofile-info-grid { display: grid; gap: .85rem; }
    .uprofile-info-item {
        display: flex;
        align-items: flex-start;
        gap: .85rem;
        padding: .95rem 1rem;
        border-radius: 12px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
    }
    .uprofile-info-item__icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        color: #3b82f6;
        flex-shrink: 0;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    }
    .uprofile-info-item__label {
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: #64748b;
        font-weight: 700;
        margin-bottom: .15rem;
    }
    .uprofile-info-item__value {
        font-size: .98rem;
        font-weight: 600;
        color: #0f172a;
        word-break: break-word;
    }
    .uprofile-action {
        display: flex;
        align-items: center;
        gap: .85rem;
        padding: 1rem 1.1rem;
        border-radius: 14px;
        border: 1px solid #e2e8f0;
        background: #fff;
        text-decoration: none;
        color: inherit;
        transition: all .18s ease;
        margin-bottom: .75rem;
    }
    .uprofile-action:hover {
        border-color: #93c5fd;
        background: #f8fbff;
        transform: translateY(-1px);
        color: inherit;
    }
    .uprofile-action__icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        flex-shrink: 0;
    }
    .uprofile-action__icon--edit { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
    .uprofile-action__icon--password { background: linear-gradient(135deg, #7047ee, #9b6dff); }
    .uprofile-action__icon--security { background: linear-gradient(135deg, #059669, #34d399); }
    .uprofile-action__title { font-weight: 700; color: #0f172a; margin-bottom: .1rem; }
    .uprofile-action__desc { font-size: .82rem; color: #64748b; margin: 0; }

/* --- Migrated from: user/templates/user/subscription/choose.html --- */
/* --- Migrated from: user/templates/user/subscription/update.html --- */
/* --- Migrated from: user/templates/user/subscription/upgrade.html --- */
/* --- Migrated from: websites/templates/websites/media/document/add.html --- */
.logo-wrapper img, .picture-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 5px;
            border: 2px solid #7147ee99;
        }

/* --- Migrated from: websites/templates/websites/media/image/add.html --- */
.logo-wrapper img, .picture-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 5px;
            border: 2px solid #7147ee99;
        }

/* --- Migrated from: websites/templates/websites/project/document.html --- */
.logo-wrapper img, .picture-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 5px;
            border: 2px solid #7147ee99;
        }

/* --- Migrated from: websites/templates/websites/project/image.html --- */
.logo-wrapper img, .picture-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 5px;
            border: 2px solid #7147ee99;
        }

/* --- Migrated from: websites/templates/websites/publication/document.html --- */
.logo-wrapper img, .picture-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 5px;
            border: 2px solid #7147ee99;
        }

/* --- Migrated from: websites/templates/websites/publication/image.html --- */
.logo-wrapper img, .picture-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 5px;
            border: 2px solid #7147ee99;
        }

/* --- Migrated from: websites/templates/websites/website/create.html --- */
input[type="color"] {
            height: inherit !important;
        }

/* --- Migrated from: websites/templates/websites/website/image.html --- */
.logo-wrapper img, .picture-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 5px;
            border: 2px solid #7147ee99;
        }

/* --- Migrated from: websites/templates/websites/website/profile_update.html --- */
input[type="color"] {
            height: inherit !important;
        }

/* --- Migrated from: websites/templates/websites/website/update.html --- */
input[type="color"] {
            height: inherit !important;
        }

/* ==========================================================================
   Global form controls — Select2 & CKEditor 5 (override)
   ========================================================================== */
:root {
    --pg-input-height: calc(1.5em + 0.75rem + 2px);
}

/* Select2 — aligné sur .form-control Bootstrap */
.select2-results {
    font-size: 0.95rem !important;
}
.select2-container--default .select2-selection--single,
.select2-container .select2-selection--single {
    height: var(--pg-input-height) !important;
    min-height: var(--pg-input-height) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.375rem !important;
    display: flex !important;
    align-items: center !important;
    background: #fff !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #a78bfa !important;
    box-shadow: 0 0 0 3px rgba(112, 71, 238, 0.12) !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.5 !important;
    padding-left: 0.75rem !important;
    padding-right: 2rem !important;
    color: #334155 !important;
    font-size: 0.9rem !important;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8 !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 0.35rem !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #64748b transparent transparent transparent !important;
}
.select2-dropdown {
    border-color: #e2e8f0 !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1) !important;
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: #7047ee !important;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    border-radius: 0.375rem !important;
    border-color: #e2e8f0 !important;
    padding: 0.35rem 0.65rem !important;
}
.width-100 + .select2-container,
.select2.width-100 + .select2-container {
    width: 100% !important;
}

/* CKEditor 5 — champs description */
.ck-form-field,
.po-item-form-desc.ck-form-field {
    margin-bottom: 0;
    width: 100%;
}
.ck-form-field .ck-editor-container,
.ck-form-field .ck.ck-editor {
    width: 100% !important;
    max-width: 100%;
}
.ck-form-field .ck.ck-editor {
    border-radius: 10px;
    overflow: visible;
    border: 1px solid #e2e8f0;
    box-shadow: none;
}
.ck-form-field .ck.ck-toolbar {
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    border-radius: 10px 10px 0 0 !important;
}
.ck-form-field .ck.ck-editor__main > .ck-editor__editable,
.ck-form-field .ck-editor__editable_inline,
.ck-form-field .ck.ck-content.ck-editor__editable {
    min-height: 120px !important;
    max-height: 280px;
    overflow-y: auto;
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #334155;
    border-radius: 0 0 10px 10px !important;
    border-color: #e2e8f0 !important;
    background: #fff !important;
}
.ck-form-field .ck.ck-editor__main > .ck-editor__editable.ck-focused,
.ck-form-field .ck-editor__editable_inline:focus {
    border-color: #a78bfa !important;
    box-shadow: 0 0 0 3px rgba(112, 71, 238, 0.12) !important;
}
.ck-form-field .ck.ck-toolbar .ck-toolbar__items {
    flex-wrap: wrap;
}
/* Champs description préservés dans les formsets (sans éditeur) */
textarea.pg-ckeditor-preserve {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
    overflow: hidden !important;
}
/* Conteneur CKEditor hors wrapper ck-form-field */
.ck-editor-container {
    width: 100%;
}
.modal .ck-form-field .ck.ck-editor,
.modal .ck-editor-container .ck.ck-editor {
    width: 100% !important;
}

/* Invoice status badges (datatable) */
.po-dt-badge--unpaid { background: #eff6ff; color: #1d4ed8; }
.po-dt-badge--partial { background: #fff7ed; color: #c2410c; }
.po-dt-badge--paid { background: #ecfdf5; color: #047857; }

/* Invoice show — reste à payer */
.inv-summary-card--warn .inv-summary-card__value { color: #c2410c; }
.inv-summary-card--warn { border-color: #fed7aa; background: linear-gradient(135deg, #fff7ed 0%, #fff 100%); }

/* ==========================================================================
   Breadcrumb & page header
   ========================================================================== */
.pg-page-header {
    background: var(--pg-surface-bg);
    border: var(--pg-surface-border);
    border-radius: var(--pg-surface-radius);
    padding: 0;
    margin: 0.5rem 1.5rem 0.25rem;
    box-shadow: var(--pg-surface-shadow);
}
.pg-page-header__main {
    min-width: 0;
}
.content-wrapper .container-full > .content-header {
    padding: 0;
}
.pg-page-title {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin-bottom: .35rem !important;
    letter-spacing: -.02em;
}
.pg-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .15rem;
    padding: 0;
    background: transparent;
}
.pg-breadcrumb__list .breadcrumb-item {
    font-size: .88rem;
    font-weight: 600;
    color: #64748b;
    display: inline-flex;
    align-items: center;
}
.pg-breadcrumb__list .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #94a3b8;
    font-size: .9rem;
    padding: 0 .4rem;
    float: none;
}
.pg-breadcrumb__home a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #7047ee !important;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.pg-breadcrumb__home a:hover {
    background: #7047ee;
    border-color: #7047ee;
    color: #fff !important;
    transform: translateY(-1px);
}
.pg-breadcrumb__list .breadcrumb-item a {
    color: #475569;
    text-decoration: none;
    transition: color .15s ease;
}
.pg-breadcrumb__list .breadcrumb-item a:hover { color: #7047ee; }
.pg-breadcrumb__list .breadcrumb-item.active {
    color: #7047ee;
    font-weight: 700;
}

/* ==========================================================================
   DataTable — pied de tableau compact
   ========================================================================== */
table.dataTable tfoot th,
table.dataTable tfoot td,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_length label,
.po-list-table-wrap table tfoot th,
.po-list-table-wrap table tfoot td {
    font-size: .82rem !important;
    color: #475569 !important;
    font-weight: 700 !important;
    padding-top: .5rem !important;
    padding-bottom: .5rem !important;
}
.dataTables_wrapper .dataTables_paginate,
.dataTables_wrapper .dataTables_paginate .paginate_button {
    font-size: .8rem !important;
    font-weight: 700 !important;
}
.dataTables_wrapper .dataTables_length select {
    font-size: .8rem !important;
    font-weight: 600 !important;
    padding: .2rem 1.5rem .2rem .45rem !important;
    height: auto !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: .25rem .55rem !important;
}

/* ==========================================================================
   Lignes articles — actions au survol (proforma / facture update)
   ========================================================================== */
.po-upd-table tbody tr .inv-line-actions {
    opacity: 0;
    transform: translateX(6px);
    transition: opacity .2s ease, transform .2s ease;
}
.po-upd-table tbody tr:hover .inv-line-actions,
.po-upd-table tbody tr:focus-within .inv-line-actions {
    opacity: 1;
    transform: translateX(0);
}
.po-upd-table tbody tr .inv-line-action {
    transform: scale(0.92);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.po-upd-table tbody tr:hover .inv-line-action--edit:hover,
.po-upd-table tbody tr:focus-within .inv-line-action--edit:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 6px 16px rgba(112, 71, 238, 0.35);
}
.po-upd-table tbody tr:hover .inv-line-action--danger:hover,
.po-upd-table tbody tr:focus-within .inv-line-action--danger:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
}

/* ==========================================================================
   Paiements — actions icônes seules (datatable)
   ========================================================================== */
.po-dt-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .35rem;
}
.po-dt-row-action-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
}
.po-dt-row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
    padding: 0;
    line-height: 1;
}
.po-dt-row-action--view {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.po-dt-row-action--view:hover {
    color: #fff;
    background: #059669;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}
.po-dt-row-action--danger {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}
.po-dt-row-action--danger:hover {
    color: #fff;
    background: #ef4444;
    border-color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
.po-dt-row-action--edit {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}
.po-dt-row-action--edit:hover {
    color: #fff;
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.po-dt-row-action--key {
    color: #7c3aed;
    background: #f5f3ff;
    border-color: #ddd6fe;
}
.po-dt-row-action--key:hover {
    color: #fff;
    background: #7047ee;
    border-color: #7047ee;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(112, 71, 238, 0.3);
}
.po-dt-row-action--warn {
    color: #c2410c;
    background: #fff7ed;
    border-color: #fed7aa;
}
.po-dt-row-action--warn:hover {
    color: #fff;
    background: #ea580c;
    border-color: #ea580c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}
.po-dt-row-action--success {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.po-dt-row-action--success:hover {
    color: #fff;
    background: #059669;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}
.po-dt-row-action--copy {
    color: #0f766e;
    background: #f0fdfa;
    border-color: #99f6e4;
}
.po-dt-row-action--copy:hover {
    color: #fff;
    background: #0d9488;
    border-color: #0d9488;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

/* ==========================================================================
   Paramètres entreprise (companies/settings)
   ========================================================================== */
.cp-set-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #243b55 0%, #3d5080 52%, #5b6eae 100%);
    border-radius: 16px;
    color: #fff;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 14px 32px rgba(36, 59, 85, 0.22);
}
.cp-set-hero__illus {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 5rem;
    opacity: .08;
    pointer-events: none;
}
.cp-set-hero__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    z-index: 1;
}
.cp-set-hero__title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: .25rem;
}
.cp-set-hero__sub {
    font-size: .86rem;
    opacity: .88;
    margin-bottom: .5rem;
}
.cp-set-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.cp-set-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: .76rem;
    font-weight: 600;
}
.cp-set-hero__btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem 1rem;
    border-radius: 10px;
    background: #fff;
    color: #30497a !important;
    font-weight: 700;
    font-size: .84rem;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.cp-set-hero__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: #243b55 !important;
}
.cp-set-section-title {
    font-size: .88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #475569;
    margin-bottom: .85rem;
    display: flex;
    align-items: center;
    gap: .45rem;
}
.cp-set-section-title i { color: #7047ee; }
.cp-set-asset {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
    height: 100%;
}
.cp-set-asset:hover {
    border-color: #c4b5fd;
    box-shadow: 0 8px 24px rgba(112, 71, 238, 0.12);
    transform: translateY(-3px);
    color: inherit;
}
.cp-set-asset--empty { border-style: dashed; border-color: #cbd5e1; }
.cp-set-asset__img-wrap {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .65rem;
    border-radius: 10px;
    background: #f8fafc;
    overflow: hidden;
}
.cp-set-asset__img-wrap img {
    max-height: 90px;
    max-width: 100%;
    object-fit: contain;
}
.cp-set-asset__img-wrap--sig img,
.cp-set-asset__img-wrap--stamp img { max-height: 70px; }
.cp-set-asset__img-wrap--cover { height: 80px; }
.cp-set-asset__img-wrap--cover img { max-height: 70px; width: 100%; object-fit: cover; }
.cp-set-asset__placeholder {
    font-size: 2rem;
    color: #cbd5e1;
}
.cp-set-asset__label {
    font-weight: 700;
    font-size: .88rem;
    color: #0f172a;
}
.cp-set-asset__hint {
    font-size: .72rem;
    color: #94a3b8;
    margin-top: .15rem;
}
.cp-set-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .85rem 1.25rem;
}
@media (max-width: 575px) {
    .cp-set-info-grid { grid-template-columns: 1fr; }
}
.cp-set-info-item__label {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    margin-bottom: .35rem;
}
.cp-set-info-item__value {
    font-size: .95rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.45;
}
.cp-set-info-item--full { grid-column: 1 / -1; }
.cp-set-card-link {
    font-size: .8rem;
    font-weight: 700;
    color: #7047ee !important;
    text-decoration: none;
}
.cp-set-links { display: flex; flex-direction: column; gap: .65rem; }
.cp-set-link-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.cp-set-link-card:hover {
    border-color: #c4b5fd;
    box-shadow: 0 6px 18px rgba(112, 71, 238, 0.1);
    transform: translateX(3px);
    color: inherit;
}
.cp-set-link-card__icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 10px;
    background: #f5f3ff;
    color: #7047ee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.cp-set-link-card__body { flex: 1; min-width: 0; }
.cp-set-link-card__body strong { display: block; font-size: .88rem; color: #0f172a; }
.cp-set-link-card__body small { color: #64748b; font-size: .76rem; }
.cp-set-link-card__arrow { color: #cbd5e1; font-size: .8rem; }
.cp-set-toggles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem 1rem;
}
@media (max-width: 767px) {
    .cp-set-toggles { grid-template-columns: 1fr; }
}
.cp-set-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem .65rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}
.cp-set-toggle-row__label { font-size: .82rem; font-weight: 600; color: #334155; }
.cp-set-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
}
.cp-set-badge--on { background: #ecfdf5; color: #047857; }
.cp-set-badge--off { background: #fef2f2; color: #b91c1c; }
.cp-set-badge--warn { background: #fff7ed; color: #c2410c; }
.cp-set-toggles-hint {
    font-size: .78rem;
    color: #64748b;
    margin-top: .75rem;
    margin-bottom: 0;
}
.cp-set-rich-text { font-size: .92rem; color: #334155; line-height: 1.55; }
.cp-set-subnav { margin-bottom: 1rem; }
.cp-set-subnav__back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    font-weight: 700;
    color: #64748b !important;
    text-decoration: none;
    padding: .4rem .75rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    transition: color .15s ease, border-color .15s ease;
}
.cp-set-subnav__back:hover { color: #7047ee !important; border-color: #c4b5fd; }
.cp-set-fac-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
    height: 100%;
}
.cp-set-fac-card--active {
    border-color: #7047ee;
    box-shadow: 0 8px 24px rgba(112, 71, 238, 0.15);
}
.cp-set-fac-card__head {
    padding: .65rem 1rem;
    font-weight: 800;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
}
.cp-set-fac-card--active .cp-set-fac-card__head {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    color: #5b21b6;
}
.cp-set-fac-card__img-link { display: block; padding: 1rem; }
.cp-set-fac-card__img-link img { width: 100%; border-radius: 8px; }
.cp-set-fac-card__foot { padding: .75rem 1rem 1rem; }
.cp-set-crop-card { max-width: 100%; }
.cp-set-crop-zone {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color .15s ease;
}
.cp-set-crop-zone:hover { border-color: #7047ee; }
.cp-set-crop-zone img {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    padding: 1rem;
}
.cp-set-crop-zone--wide img { max-height: 160px; object-fit: cover; padding: 0; }
.cp-set-crop-zone__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    background: rgba(15, 23, 42, 0.45);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity .2s ease;
}
.cp-set-crop-zone:hover .cp-set-crop-zone__overlay { opacity: 1; }

/* Formulaire informations entreprise */
.cp-set-form-section {
    padding: 1.1rem 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    margin-bottom: 1rem;
}
.cp-set-form-section__title {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #475569;
    margin-bottom: 1rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid #f1f5f9;
}
.cp-set-form-section__title i { color: #7047ee; }
.cp-set-form-field .form-label {
    font-size: .82rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: .35rem;
}
.cp-set-form-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
}
@media (max-width: 767px) {
    .cp-set-form-checks { grid-template-columns: 1fr; }
}
.cp-set-form-check {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    padding: .6rem .75rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    margin: 0;
    min-height: 2.75rem;
}
.cp-set-form-check .form-check-input {
    width: 1.1em;
    height: 1.1em;
    margin-top: .2em;
    margin-left: 0;
    flex-shrink: 0;
    cursor: pointer;
    opacity: 1;
    border: 1px solid #94a3b8;
    background-color: #fff;
}
.cp-set-form-check .form-check-input:checked {
    background-color: #7047ee;
    border-color: #7047ee;
}
.cp-set-form-check__label {
    font-size: .82rem;
    font-weight: 600;
    color: #334155;
    margin: 0;
    line-height: 1.4;
    cursor: pointer;
}

/* Page logo — mise en page */
.cp-set-logo-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 991px) {
    .cp-set-logo-layout { grid-template-columns: 1fr; }
}
.cp-set-logo-tips {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.cp-set-logo-tip {
    display: flex;
    gap: .65rem;
    padding: .75rem .85rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: .82rem;
    color: #475569;
    line-height: 1.45;
}
.cp-set-logo-tip i {
    color: #7047ee;
    font-size: 1rem;
    margin-top: .1rem;
}
.cp-set-logo-tip strong { color: #0f172a; display: block; margin-bottom: .15rem; }
.cp-set-crop-zone--logo {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cp-set-crop-zone--logo img {
    max-height: 280px;
    padding: 1.25rem;
}

/* Permissions profils */
.usr-perm-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
@media (max-width: 991px) {
    .usr-perm-grid { grid-template-columns: 1fr; }
}
.usr-perm-group {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.usr-perm-group__head {
    padding: .7rem 1rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-bottom: 1px solid #e2e8f0;
    font-size: .82rem;
    font-weight: 800;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.usr-perm-group__list { list-style: none; margin: 0; padding: 0; }
.usr-perm-group__item {
    padding: .55rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}
.usr-perm-group__item:last-child { border-bottom: none; }
.usr-perm-group__item .form-check-label {
    font-size: .84rem;
    font-weight: 600;
    color: #334155;
}

.po-upd-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
}
