@media (min-width:992px) {
    .wrapper {
        display: block;
    }
}

@media (min-width:1280px) {
    .wrapper {
        display: block !important;
    }
}

body:not(.ea-content-width-full) .content-wrapper {
    display: block !important;
}

@media (min-width:992px) {
    body.ea-sidebar-width-compact .wrapper {
        display: block !important;
    }
}

.dropdown-settings .dropdown-settings-button {
    padding: 0;
}

.nav-item span.icon {
    width: auto !important;
    height: auto !important;
    inline-size: auto;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
}

.user-menu-wrapper .user-avatar {
    inline-size: auto;
    max-inline-size: none;
    block-size: auto;
    width: 30px;
    height: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.user-menu-wrapper .dropdown-menu .dropdown-user-details .user-avatar {
    width: 30px;
    height: 30px;
}

.user-menu-wrapper .dropdown-menu .dropdown-user-details .user-avatar .icon {
    margin: 0;
}

.user-menu-wrapper .dropdown-menu .dropdown-user-details .user-name {
    font-size: var(--bs-body-font-size);
}

.user-menu-wrapper .user-avatar svg,
.dropdown-settings .dropdown-settings-button svg {
    height: 20px;
    inline-size: auto;
    max-block-size: none;
    max-inline-size: none;
    color: var(--app-blue-color);
}

.dropdown-settings .dropdown-item.active,
.dropdown-settings .dropdown-item.active .icon,
.dropdown-settings .dropdown-item.active i {
    color: var(--app-blue-color);
}

.admin-dashboard-section4 .nav.nav-tabs a.nav-link {
    font-size: 12px;
}

/* 

.sidebar-wrapper
{
    top: 0;
    height: calc(100vh - 100px);
    box-sizing: border-box;
    position: sticky;
}

@media only screen and (min-width: 768px) and (max-width: 991px), only screen and (max-width: 767px) {
    .sidebar-wrapper
    {
        top: auto;
        height: auto;
        box-sizing: border-box;
        position: relative;
    }

    .responsive-header {
        top: 0;
        position: sticky;
        z-index: 1;
        text-align: center;
    }
    
    .responsive-header img
    {
        width: 30%;
    }
}

#header-logo
{
    text-align: center;
}

#header-logo img
{
    width: 40%;
}

#User_sex
{
    display: flex;
}

.form-check + .form-check
{
    margin: 0 0 0 10px !important;
    padding: 0;
}

 */

.search-container .navbar-search .form-widget input {
    width: 100%;
    height: 35px;
    border: 1px solid var(--app-blue-variant1-color);
    border-radius: 50px;
    background-color: transparent;
    color: var(--app-blue-color);
    padding-left: 40px;
    font-size: 12px;
}

.search-container .navbar-search .form-widget .content-search-icon,
.search-container .navbar-search .form-widget .content-search-reset {
    position: absolute;
    top: 0;
    left: 0;
    color: var(--app-blue-color);
    width: 40px !important;
    height: 35px !important;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.search-container .navbar-search .form-widget .content-search-reset {
    right: 0;
    left: auto;
}

.search-container .navbar-search .form-group,
.search-container .navbar-search .form-group label {
    padding: 0;
}

.content-body {
    margin-top: 10px;
}

.content-body:has(table) {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.content-header {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.content-header-title .title {
    font-weight: 600;
    font-size: 1.2rem !important;
}

.custom-checkbox-field .form-widget>div {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1.5rem;
}

.custom-checkbox-field .form-widget .form-check {
    padding-left: 1.5em;
}

.custom-checkbox-field .form-widget .form-check,
.custom-checkbox-field .form-widget .form-check+.form-check {
    margin-block-start: 5px;
}

.custom-phone-field .iti {
    display: block;
}

.custom-file-input-field .form-widget .ea-vich-image-actions>div {
    color: var(--app-blue-color) !important;
    border: 1px solid var(--app-blue-color) !important;
    background-color: transparent;
    transition: all 0.5s ease-in-out;
}

.custom-file-input-field .form-widget .ea-vich-image-actions>div:hover {
    color: var(--app-white-color) !important;
    background-color: var(--app-blue-color) !important;
    border: 1px solid var(--app-blue-color) !important;
    background: var(--app-blue-color) !important;
    border-color: var(--app-blue-color) !important;
}

.wrapper .main-container .datagrid td {
    box-shadow: inset 0 1px 0 var(--table-cell-border-color) !important;
    /* Valeurs en texte brut (ID, nombres, prix, PV…) : couleur adaptative light/dark */
    color: var(--adm-text);
}

/* Couleur des cellules : Bootstrap colore via --bs-table-color sur .table.
   On l'aligne sur la couleur de texte admin (adaptatif light/dark) — corrige les
   valeurs brutes (ID, montants, dates, PV…) invisibles en dark. */
table.datagrid {
    --bs-table-color: var(--adm-text);
    --bs-table-color-type: var(--adm-text);
    --cui-table-color: var(--adm-text);
    --cui-table-color-type: var(--adm-text);
}

/* Boutons d'action inline : Accepter/Valider en vert, Refuser/Rejeter en rouge */
.datagrid td.actions a.action-accepter,
.datagrid td.actions a.action-valider {
    color: #16a34a !important;
    border-color: rgba(22, 163, 74, .5) !important;
}
.datagrid td.actions a.action-accepter:hover,
.datagrid td.actions a.action-valider:hover {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
}
.datagrid td.actions a.action-refuser,
.datagrid td.actions a.action-rejeter {
    color: #dc2626 !important;
    border-color: rgba(220, 38, 38, .5) !important;
}
.datagrid td.actions a.action-refuser:hover,
.datagrid td.actions a.action-rejeter:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

/* En-tête du modal de filtres : icône + libellé alignés horizontalement.
   Sans cela, l'icône (.icon en display:grid) empile le texte en dessous,
   coupé par la faible hauteur du bouton (Effacer / Appliquer). */
body.ea .modal-header .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    overflow: visible;
}
body.ea .modal-header .btn .icon,
body.ea .modal-header .btn .btn-icon {
    margin: 0;
}
body.ea .modal-header .btn.btn-app-blue,
body.ea .modal-header .btn.btn-primary {
    color: #ffffff !important;
}

.wrapper .main-container .form-check .form-check-input {
    -webkit-margin-start: 0;
    margin-inline-start: 0;
}

.wrapper .main-container .form-check .form-check-input {
    float: none !important;
}

.wrapper .main-container .form-check .form-check-input:checked {
    background-color: var(--app-blue-color) !important;
    border-color: var(--app-blue-color) !important;
}

@media (min-width: 992px) {

    .wrapper .main-container .datagrid tbody tr:hover td,
    .wrapper .main-container .datagrid tbody tr:hover th {
        background: var(--table-hover-cell-bg) !important;
    }
}

.wrapper .main-container .datagrid .dropdown-actions .dropdown-toggle svg {
    vertical-align: top !important;
}

.modal-body {
    border-top-left-radius: var(--bs-modal-inner-border-radius);
    border-top-right-radius: var(--bs-modal-inner-border-radius);
    border-bottom-left-radius: var(--bs-modal-inner-border-radius);
    border-bottom-right-radius: var(--bs-modal-inner-border-radius);
}

.modal-footer {
    align-items: center;
    background-color: #f1f5f9;
    border-bottom-left-radius: var(--bs-modal-inner-border-radius);
    border-bottom-right-radius: var(--bs-modal-inner-border-radius);
    border-top: var(--bs-modal-footer-border-width) solid #e2e8f0;
}

.modal-footer .btn {
    display: inline-flex;
    align-items: center;
}

.modal-footer .btn:hover {
    color: var(--app-white-color) !important;
}

.modal-footer .btn.btn-secondary {
    color: var(--app-blue-color) !important;
    background-color: transparent !important;
    border: 1px solid var(--app-blue-color) !important;
    transition: all 0.5s ease-in-out;
}

.modal-footer .btn.btn-secondary:hover {
    color: var(--app-white-color) !important;
    background-color: var(--app-blue-color) !important;
    border: 1px solid var(--app-blue-color) !important;
    transition: all 0.5s ease-in-out;
}

/**** Detail view styles ****/
.ea-detail .field-group .field-label {
    text-align: justify;
    width: 220px;
}

.ea-detail .field-group.field-boolean {
    flex-direction: initial;
}

.ea-detail .field-group.field-boolean .field-label {
    min-width: auto;
}

.ea-detail .field-group.field-boolean .field-label {
    flex: initial;
    margin: 0 15px 0 0;
    text-align: justify;
}

.ea-detail .field-group.field-boolean .field-value {
    flex: 1;
    min-width: 66%;
    text-align: justify;
    width: 130px;
}

.ea-detail .field-image img {
    max-height: 200px;
    max-width: 200px;
}

.ea-detail .field-image .ea-lightbox-thumbnail {
    max-inline-size: 200px;
}

.pager .pagination {
    --bs-pagination-font-size: var(--bs-body-font-size) !important;
}

.pagination {
    --cui-pagination-font-size: var(--bs-body-font-size) !important;
}

.pagination .page-item:not(.pagination .page-item:last-child) {
    padding-right: 5px;
}

.page-item .page-link:focus, .page-item .page-link:hover {
    background-color: #e4e4e4 !important;
}

.global-actions form,
.page-actions form,
.batch-actions form {
    display: inline;
}

.global-actions .btn,
.page-actions .btn,
.batch-actions .btn {
    display: inline-flex;
    align-items: center;
}

.content-header-title > .title.d-none {
    display: block !important;
}

/* ── Bouton « Filtres » (barre d'outils des listes) ── */
.action-filters .action-filters-button,
.datagrid-filters .action-filters-button {
    background: var(--btn-blue-soft-bg);
    border: 1px solid rgba(0, 62, 205, .22);
    color: var(--btn-blue);
    font-weight: 600;
    border-radius: 10px;
    opacity: 1;
    transition: background .18s, color .18s, border-color .18s;
}
.action-filters .action-filters-button:hover,
.action-filters .action-filters-button:focus,
.action-filters .action-filters-button.action-filters-applied {
    background: var(--btn-blue);
    border-color: var(--btn-blue);
    color: #fff;
}
.action-filters .action-filters-button .icon,
.action-filters .action-filters-button svg {
    color: inherit;
}
.action-filters .action-filters-reset {
    color: var(--btn-blue);
    border-color: rgba(0, 62, 205, .22);
}
[data-bs-theme="dark"] .action-filters .action-filters-button {
    border-color: rgba(253, 253, 255, .18);
    color: #fff;
}

/* ════════════════════════════════════════════════════════════════
   ADMIN REDESIGN — IFN Global
   Modern dark sidebar + card-based dashboard, full dark/light mode
════════════════════════════════════════════════════════════════ */

/* ── Utility ── */
.min-width-0 { min-width: 0; }

/* ── CSS tokens ── */
:root {
    --adm-sb-from: #002a62;
    --adm-sb-to:   #002a62;
    --adm-sb-text: rgba(253,253,255,.7);
    --adm-sb-active-bg: rgba(255,188,0,.12);
    --adm-sb-active-border: #ffbc00;
    --adm-sb-active-text: #fdfdff;
    --adm-sb-hover: rgba(253,253,255,.07);
    --adm-sb-w: 68px;
    --adm-sb-w-exp: 220px;

    --adm-surface:   #fdfdff;
    --adm-surface-2: #eef3fb;
    --adm-text:      #002a62;
    --adm-muted:     rgba(0,42,98,.6);
    --adm-border:    rgba(0,42,98,.12);
    --adm-input-bg:  #fdfdff;
    --adm-shadow:    0 1px 3px rgba(0,0,0,.07), 0 6px 20px rgba(0,62,205,.06);
    --adm-radius:    14px;
    --adm-icon-sz:   44px;
}

[data-bs-theme="dark"] {
    --adm-surface:   #002a62;
    --adm-surface-2: #001a3d;
    --adm-text:      #fdfdff;
    --adm-muted:     rgba(253,253,255,.64);
    --adm-border:    rgba(253,253,255,.10);
    --adm-input-bg:  #00316f;
    --adm-shadow:    0 2px 8px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25);
}

/* ════════════════════════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════════════════════════ */
.main-container {
    flex: 1 1 0%;
    min-width: 0;
    background: var(--adm-surface-2);
    min-height: 100vh;
    transition: background .3s;
}

[data-bs-theme="dark"] .main-container { background: #001a3d; }

/* ════════════════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════════════════ */
.user-dashboard-sidebar {
    background: var(--adm-sb-from) !important;
    border-right: none !important;
    width: var(--adm-sb-w) !important;
    min-width: var(--adm-sb-w) !important;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: width .25s cubic-bezier(.4,0,.2,1), min-width .25s cubic-bezier(.4,0,.2,1);
}

.user-dashboard-sidebar::-webkit-scrollbar { display: none; }

.user-dashboard-sidebar.sidebar-expanded {
    width: var(--adm-sb-w-exp) !important;
    min-width: var(--adm-sb-w-exp) !important;
}

/* logo */
.user-dashboard-sidebar .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 0 16px !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
}

.user-dashboard-sidebar .sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 !important;
}

.user-dashboard-sidebar .sidebar-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.user-dashboard-sidebar .sidebar-logo-link img {
    height: 34px;
    width: auto;
    object-fit: contain;
}

/* nav */
.user-dashboard-sidebar .sidebar-nav {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.user-dashboard-sidebar .nav-item .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 11px 4px;
    color: var(--adm-sb-text) !important;
    text-decoration: none;
    position: relative;
    transition: background .2s ease, color .2s ease;
    gap: 4px;
    min-height: 52px;
    border-radius: 0;
}

.user-dashboard-sidebar .nav-item .nav-link:hover {
    background: var(--adm-sb-hover);
    color: #fff !important;
}

.user-dashboard-sidebar .nav-item .nav-link.active {
    background: var(--adm-sb-active-bg);
    color: var(--adm-sb-active-text) !important;
}

.user-dashboard-sidebar .nav-item .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 56%;
    width: 3px;
    background: var(--adm-sb-active-border);
    border-radius: 0 3px 3px 0;
}

.user-dashboard-sidebar .nav-label {
    font-size: 9px;
    line-height: 1.2;
    text-align: center;
    max-width: 60px;
    word-break: break-word;
    color: inherit;
    display: block;
}

/* Expanded mode */
.user-dashboard-sidebar.sidebar-expanded .nav-item .nav-link {
    flex-direction: row;
    align-items: center;
    padding: 12px 18px;
    gap: 12px;
    min-height: 46px;
}

.user-dashboard-sidebar.sidebar-expanded .nav-item .nav-link.active::before {
    height: 100%;
}

.user-dashboard-sidebar.sidebar-expanded .nav-label {
    font-size: 13px;
    font-weight: 500;
    max-width: none;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
}

.user-dashboard-sidebar .sidebar-sep {
    height: 1px;
    background: rgba(255,255,255,.07);
    margin: 6px 12px;
}

/* ════════════════════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════════════════════ */
.user-dashboard-navbar-container {
    background: var(--adm-surface) !important;
    border-bottom: 1px solid var(--adm-border) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.06) !important;
    transition: background .3s, border-color .3s;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 60px;
}

[data-bs-theme="dark"] .user-dashboard-navbar-container {
    background: #1a2845 !important;
    border-bottom-color: rgba(255,255,255,.07) !important;
}

.user-dashboard-navbar-container .user-sidebar-toggler {
    background: none;
    border: none;
    color: var(--adm-text);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
    flex-shrink: 0;
}

.user-dashboard-navbar-container .user-sidebar-toggler:hover {
    background: var(--adm-surface-2);
}

[data-bs-theme="dark"] .user-sidebar-toggler { color: rgba(255,255,255,.8) !important; }
[data-bs-theme="dark"] .user-sidebar-toggler:hover { background: rgba(255,255,255,.07) !important; }

/* Theme toggle */
.admin-theme-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 8px;
    color: var(--adm-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
}

.admin-theme-btn:hover { background: var(--adm-surface-2); }

[data-bs-theme="light"] .admin-theme-btn .theme-icon-moon { display: none; }
[data-bs-theme="dark"]  .admin-theme-btn .theme-icon-sun  { display: none; }
[data-bs-theme="dark"]  .admin-theme-btn { color: rgba(255,255,255,.8); }
[data-bs-theme="dark"]  .admin-theme-btn:hover { background: rgba(255,255,255,.08); }

/* Notif dropdown */
.notification-dropdown .dropdown-toggle {
    background: none !important;
    border: none !important;
    color: var(--adm-text) !important;
    padding: 8px !important;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    transition: background .2s;
}

.notification-dropdown .dropdown-toggle:hover { background: var(--adm-surface-2) !important; }
.notification-dropdown .dropdown-toggle::after { display: none; }

[data-bs-theme="dark"] .notification-dropdown .dropdown-toggle { color: rgba(255,255,255,.8) !important; }
[data-bs-theme="dark"] .notification-dropdown .dropdown-toggle:hover { background: rgba(255,255,255,.07) !important; }

/* Selects */
.devise-select, .internationalisation-select {
    background: var(--adm-surface-2);
    border: 1px solid var(--adm-border);
    border-radius: 8px;
    color: var(--adm-text);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    cursor: pointer;
    transition: background .2s, border-color .2s;
    outline: none;
    appearance: none;
}

.devise-select:focus, .internationalisation-select:focus {
    border-color: var(--app-blue-color);
    box-shadow: 0 0 0 3px rgba(0, 62, 205,.1);
}

[data-bs-theme="dark"] .devise-select,
[data-bs-theme="dark"] .internationalisation-select {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.1);
    color: rgba(255,255,255,.8);
}

/* ════════════════════════════════════════════════════════════════
   STAT CARDS
════════════════════════════════════════════════════════════════ */
.admin-stat-card {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius);
    box-shadow: var(--adm-shadow);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
    animation: adm-card-in .5s ease both;
    height: 100%;
}

.admin-stat-card::after {
    content: '';
    position: absolute;
    top: -45px;
    right: -25px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    pointer-events: none;
    opacity: .7;
}

.admin-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(0, 62, 205,.14);
}

.adm-stat-icon {
    width: var(--adm-icon-sz);
    height: var(--adm-icon-sz);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.adm-stat-icon svg { width: 22px; height: 22px; }

.stat-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--adm-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--adm-text);
    line-height: 1.1;
    margin-bottom: 6px;
}

.stat-desc {
    font-size: 12px;
    color: var(--adm-muted);
    line-height: 1.4;
}

/* Icon colour variants */
/* Harmonisation charte : bleu (#003ecd) / bleu2 (#002a62) / jaune (#ffbc00).
   Vert et rouge conservés uniquement pour les statuts (payé / en attente). */
.adm-icon-blue   { background: rgba(0, 62, 205,.12);  color: #003ecd; }
.adm-icon-yellow { background: rgba(255, 188, 0,.18); color: #9a7a00; }
.adm-icon-orange { background: rgba(255, 188, 0,.16); color: #9a7a00; }  /* → jaune */
.adm-icon-purple { background: rgba(0, 42, 98,.12);   color: #002a62; }  /* → bleu2 */
.adm-icon-teal   { background: rgba(0, 62, 205,.12);  color: #003ecd; }  /* → bleu */
.adm-icon-green  { background: rgba(34,197,94,.12);   color: #16a34a; }  /* statut */
.adm-icon-red    { background: rgba(239,68,68,.12);   color: #dc2626; }  /* statut */

[data-bs-theme="dark"] .adm-icon-yellow { color: #e2b800; }

/* Card glow rings */
.adm-accent-blue::after   { background: transparent; }
.adm-accent-yellow::after { background: transparent; }
.adm-accent-orange::after { background: transparent; }
.adm-accent-green::after  { background: transparent; }
.adm-accent-purple::after { background: transparent; }
.adm-accent-red::after    { background: transparent; }
.adm-accent-teal::after   { background: transparent; }

/* Stagger delays */
.admin-dashboard-section1 .col:nth-child(1) .admin-stat-card { animation-delay: .04s; }
.admin-dashboard-section1 .col:nth-child(2) .admin-stat-card { animation-delay: .09s; }
.admin-dashboard-section1 .col:nth-child(3) .admin-stat-card { animation-delay: .14s; }
.admin-dashboard-section1 .col:nth-child(4) .admin-stat-card { animation-delay: .19s; }
.admin-dashboard-section1 .col:nth-child(5) .admin-stat-card { animation-delay: .24s; }
.admin-dashboard-section1 .col:nth-child(6) .admin-stat-card { animation-delay: .29s; }
.admin-dashboard-section1 .col:nth-child(7) .admin-stat-card { animation-delay: .34s; }
.admin-dashboard-section1 .col:nth-child(8) .admin-stat-card { animation-delay: .39s; }
.admin-dashboard-section1 .col:nth-child(9) .admin-stat-card { animation-delay: .44s; }
.admin-dashboard-section1 .col:nth-child(10) .admin-stat-card { animation-delay: .49s; }

/* ════════════════════════════════════════════════════════════════
   CHART + CONTENT PANELS
════════════════════════════════════════════════════════════════ */
.admin-panel {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius);
    box-shadow: var(--adm-shadow);
    padding: 20px;
    height: 100%;
    animation: adm-card-in .5s ease both;
}

.admin-panel .panel-title {
    font-size: .92rem;
    font-weight: 700;
    color: var(--adm-text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-panel .panel-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(0, 62, 205,.1);
    color: var(--app-blue-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-panel .nav-tabs {
    border-bottom: 1px solid var(--adm-border);
    gap: 2px;
}

.admin-panel .nav-tabs .nav-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--adm-muted);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 6px 12px;
    margin-bottom: -1px;
    transition: color .2s, border-color .2s;
    background: none !important;
}

.admin-panel .nav-tabs .nav-link:hover { color: var(--app-blue-color); }
.admin-panel .nav-tabs .nav-link.active {
    color: var(--app-blue-color) !important;
    border-bottom-color: var(--app-blue-color);
}

.admin-panel-section2:nth-child(1) { animation-delay: .32s; }
.admin-panel-section2:nth-child(2) { animation-delay: .44s; }

/* ── List panels ── */
.adm-list-panel {
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius);
    box-shadow: var(--adm-shadow);
    padding: 20px;
    height: 100%;
    animation: adm-card-in .5s ease both;
}

.adm-list-panel .panel-title {
    font-size: .88rem;
    font-weight: 700;
    color: var(--adm-text);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.adm-list-panel .pt-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.adm-list-panel .nav-tabs {
    border-bottom: 1px solid var(--adm-border);
    gap: 2px;
}

.adm-list-panel .nav-tabs .nav-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--adm-muted);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 6px 12px;
    margin-bottom: -1px;
    transition: color .2s, border-color .2s;
    background: none !important;
}

.adm-list-panel .nav-tabs .nav-link:hover { color: var(--app-blue-color); }
.adm-list-panel .nav-tabs .nav-link.active {
    color: var(--app-blue-color) !important;
    border-bottom-color: var(--app-blue-color);
}

.admin-dashboard-section3 .col:nth-child(1) .adm-list-panel { animation-delay: .28s; }
.admin-dashboard-section3 .col:nth-child(2) .adm-list-panel { animation-delay: .38s; }
.admin-dashboard-section3 .col:nth-child(3) .adm-list-panel { animation-delay: .48s; }

/* ── Row items ── */
.income-list-item,
.commission-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--adm-border);
    font-size: 13px;
    color: var(--adm-text);
}

.income-list-item:last-child,
.commission-list-item:last-child { border-bottom: none; }

.income-list-price-item,
.commission-list-price-item {
    background: rgba(0, 62, 205,.08) !important;
    color: var(--app-blue-color) !important;
    border-radius: 6px !important;
    padding: 3px 10px !important;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--adm-border);
}

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

.adm-txn-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(0, 62, 205,.1);
    color: var(--app-blue-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.transaction-price-item {
    background: rgba(0, 62, 205,.08) !important;
    color: var(--app-blue-color) !important;
    border-radius: 6px !important;
    padding: 3px 10px !important;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.new-member-item,
.best-recruiters-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--adm-border);
}

.new-member-item:last-child,
.best-recruiters-list-item:last-child { border-bottom: none; }

.adm-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.adm-member-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--adm-text);
    line-height: 1.3;
}

.adm-member-sub {
    font-size: 11px;
    color: var(--adm-muted);
}

.adm-member-date {
    font-size: 11px;
    color: var(--adm-muted);
    font-style: italic;
    white-space: nowrap;
    flex-shrink: 0;
}

.recruits-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--app-blue-color);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.package-presentation-list-item,
.ranking-overview-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--adm-border);
}

.package-presentation-list-item:last-child,
.ranking-overview-list-item:last-child { border-bottom: none; }

/* ── Team perf vertical tabs ── */
.adm-perf-nav {
    background: rgba(0, 62, 205,.05);
    border-radius: 10px;
    padding: 8px 6px;
    border-right: 1px solid var(--adm-border);
}

/* Sélecteur composé (.adm-perf-nav.nav.nav-tabs a.nav-link) pour battre
   la règle générique .nav.nav-tabs a.nav-link (onglets horizontaux soulignés)
   qui imposait padding:0 / border-bottom et collait les onglets inactifs au bord. */
.adm-perf-nav.nav.nav-tabs a.nav-link {
    color: var(--adm-muted);
    font-size: 12px;
    font-weight: 500;
    border: none;
    border-bottom: none;
    border-radius: 8px;
    padding: 9px 12px;
    margin: 0 0 2px;
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    text-align: left;
    background: none;
    line-height: 1.3;
    white-space: nowrap;
    transition: background .2s, color .2s;
}

.adm-perf-nav.nav.nav-tabs a.nav-link:hover {
    color: var(--app-blue-color);
    background: rgba(0, 62, 205,.08);
    border-bottom: none;
}
.adm-perf-nav.nav.nav-tabs a.nav-link.active {
    color: var(--app-blue-color);
    background: rgba(0, 62, 205,.12);
    border-bottom: none;
    font-weight: 600;
}

[data-bs-theme="dark"] .adm-perf-nav { background: rgba(255,255,255,.04); border-right-color: rgba(255,255,255,.08); }
[data-bs-theme="dark"] .adm-perf-nav.nav.nav-tabs a.nav-link:hover { background: rgba(255,255,255,.08); }
[data-bs-theme="dark"] .adm-perf-nav.nav.nav-tabs a.nav-link.active { background: rgba(255,255,255,.1); }

/* ════════════════════════════════════════════════════════════════
   DASHBOARD PROMOTEUR
════════════════════════════════════════════════════════════════ */
.promo-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 188, 0, 0.10);
    border: 1px solid rgba(255, 188, 0, 0.35);
    color: var(--adm-text);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 0.88rem;
}
.promo-alert-icon { color: #d99e00; display: flex; flex-shrink: 0; }
.promo-alert strong { color: var(--adm-text); }

.promo-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--btn-blue);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}
.promo-btn-add:hover { background: var(--btn-blue-hover); color: #fff; }

.promo-empty-products { text-align: center; padding: 40px 16px; color: var(--adm-muted); }
.promo-empty-products p { margin: 12px 0 16px; }

.promo-table { --bs-table-color: var(--adm-text); --bs-table-bg: transparent; margin: 0; }
.promo-table thead th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--adm-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--adm-border);
    padding: 8px 12px;
    background: transparent;
}
.promo-table tbody td {
    font-size: 0.82rem;
    color: var(--adm-text);
    border-bottom: 1px solid var(--adm-border);
    padding: 11px 12px;
    background: transparent;
}
.promo-table tbody tr:last-child td { border-bottom: none; }

.promo-ref {
    font-family: monospace;
    font-size: 0.74rem;
    background: var(--adm-surface-2);
    color: var(--adm-muted);
    padding: 2px 7px;
    border-radius: 5px;
}
.promo-stock {
    display: inline-block;
    min-width: 30px;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: 50px;
}
.promo-stock.in  { background: rgba(0, 209, 28, 0.12); color: #0a8f1e; }
.promo-stock.out { background: rgba(216, 29, 29, 0.12); color: var(--app-red-color); }
[data-bs-theme="dark"] .promo-stock.in { color: #4ade80; }

.promo-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 7px;
    color: var(--btn-blue);
    background: var(--btn-blue-soft-bg);
    text-decoration: none;
    transition: background .2s, color .2s;
}
.promo-edit-btn:hover { background: var(--btn-blue); color: #fff; }

.promo-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--btn-blue);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}
.promo-link:hover { text-decoration: underline; }

/* ── Dashboard utilisateur : profil & parrainage ── */
.udash-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 0 16px;
    border-bottom: 1px solid var(--adm-border);
    margin-bottom: 16px;
}
.udash-avatar {
    width: 60px; height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--btn-blue-soft-bg);
    flex-shrink: 0;
}
.udash-name { font-weight: 700; font-size: 1rem; color: var(--adm-text); }
.udash-username { font-size: 0.8rem; color: var(--adm-muted); margin-bottom: 6px; }
.udash-rang {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--btn-blue);
    background: var(--btn-blue-soft-bg);
    border: 1px solid rgba(0, 62, 205, .25);
    padding: 2px 10px;
    border-radius: 50px;
}

.udash-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.udash-meta-item { display: flex; flex-direction: column; }
.udash-meta-label { font-size: 0.72rem; color: var(--adm-muted); }
.udash-meta-value { font-size: 0.95rem; font-weight: 700; color: var(--adm-text); }

.udash-refcard {
    background: var(--btn-blue-soft-bg);
    border: 1px solid var(--adm-border);
    border-radius: 12px;
    padding: 14px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}
.udash-ref-label { font-size: 0.72rem; color: var(--adm-muted); }
.udash-refcode { font-size: 1.3rem; font-weight: 800; color: var(--btn-blue); letter-spacing: .02em; }
.udash-reflink {
    font-size: 0.7rem;
    color: var(--adm-muted);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.udash-copy-btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: var(--btn-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.udash-copy-btn:hover { background: var(--btn-blue-hover); color: #fff; }

/* ════════════════════════════════════════════════════════════════
   PORTEFEUILLE UTILISATEUR (+ utilitaires génériques espace user)
════════════════════════════════════════════════════════════════ */
.wallet-action-bar { display: flex; justify-content: flex-end; margin-bottom: 18px; }

/* Boutons génériques soft (réutilisables) */
.adm-btn-primary {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--btn-blue); color: #fff !important;
    border: none; border-radius: 9px;
    padding: 9px 18px; font-size: .85rem; font-weight: 600;
    text-decoration: none; cursor: pointer; transition: background .2s;
}
.adm-btn-primary:hover { background: var(--btn-blue-hover); color: #fff; }
.adm-btn-ghost {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--btn-blue-soft-bg); color: var(--btn-blue) !important;
    border: 1px solid rgba(0, 62, 205,.25); border-radius: 9px;
    padding: 9px 18px; font-size: .85rem; font-weight: 600;
    cursor: pointer; transition: background .2s;
}
.adm-btn-ghost:hover { background: rgba(0, 62, 205,.18); }

/* Onglets pilule horizontaux (sélecteur composé pour battre .nav.nav-tabs a.nav-link) */
.wallet-tabs {
    display: flex; flex-wrap: wrap; gap: 6px;
    background: var(--adm-surface-2); border: 1px solid var(--adm-border);
    border-radius: 12px; padding: 6px; margin-bottom: 18px;
}
.wallet-tabs.nav.nav-tabs a.nav-link {
    color: var(--adm-muted); font-size: .82rem; font-weight: 600;
    border: none; border-bottom: none; border-radius: 8px;
    padding: 9px 16px; margin: 0; background: none;
    transition: background .2s, color .2s;
}
.wallet-tabs.nav.nav-tabs a.nav-link:hover { color: var(--btn-blue); background: var(--btn-blue-soft-bg); border-bottom: none; }
.wallet-tabs.nav.nav-tabs a.nav-link.active { color: #fff; background: var(--btn-blue); border-bottom: none; }

/* Tableau de données générique (dark-aware) */
.adm-table { --bs-table-color: var(--adm-text); --bs-table-bg: transparent; margin: 0; width: 100%; }
.adm-table thead th {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
    color: var(--adm-muted); font-weight: 700;
    border-bottom: 1px solid var(--adm-border);
    padding: 10px 14px; background: transparent; white-space: nowrap;
}
.adm-table tbody td {
    font-size: .83rem; color: var(--adm-text);
    border-bottom: 1px solid var(--adm-border);
    padding: 12px 14px; background: transparent; vertical-align: middle;
}
.adm-table tbody tr:last-child td { border-bottom: none; }

.adm-amount-pos { color: #0a8f1e; font-weight: 700; }
.adm-amount-neg { color: var(--app-red-color); font-weight: 700; }
[data-bs-theme="dark"] .adm-amount-pos { color: #4ade80; }
[data-bs-theme="dark"] .adm-amount-neg { color: #f87171; }

/* État vide générique */
.adm-empty { text-align: center; padding: 40px 16px; color: var(--adm-muted); }
.adm-empty img { max-width: 110px; opacity: .85; margin-bottom: 12px; }
.adm-empty span { display: block; font-size: .85rem; }

/* Bloc filtre */
.wallet-filter {
    background: var(--adm-surface-2); border: 1px solid var(--adm-border);
    border-radius: 12px; padding: 14px; margin-bottom: 16px;
}
.wallet-filter .form-label { font-size: .75rem; color: var(--adm-muted); font-weight: 600; margin-bottom: 4px; }

/* Badges de statut soft (réutilisables) */
.adm-badge {
    display: inline-block; font-size: .72rem; font-weight: 700;
    padding: 3px 11px; border-radius: 50px;
    text-transform: capitalize; letter-spacing: .01em;
}
.adm-badge-success { background: rgba(0,209,28,.12);  color: #0a8f1e; border: 1px solid rgba(0,209,28,.25); }
.adm-badge-warning { background: rgba(255, 188, 0,.14); color: #b58900; border: 1px solid rgba(255, 188, 0,.35); }
.adm-badge-danger  { background: rgba(216,29,29,.10);  color: var(--app-red-color); border: 1px solid rgba(216,29,29,.25); }
.adm-badge-info    { background: var(--btn-blue-soft-bg); color: var(--btn-blue); border: 1px solid rgba(0, 62, 205,.25); }
[data-bs-theme="dark"] .adm-badge-success { color: #4ade80; }
[data-bs-theme="dark"] .adm-badge-warning { color: #fcd34d; }
[data-bs-theme="dark"] .adm-badge-danger  { color: #f87171; }

/* ════════════════════════════════════════════════════════════════
   RÉSEAU / ARBRE GÉNÉALOGIQUE
════════════════════════════════════════════════════════════════ */
.tree-search-form .form-control { max-width: 190px; font-size: .82rem; }

/* Canvas SVG */
.tree-svg-panel { position: relative; height: 70vh; min-height: 460px; overflow: hidden; }

/* Texte/liens des arbres D3 (dark-aware via variables, voir app.css) */
[data-bs-theme="dark"] .user-space main .node text { fill: #d4def5 !important; }
[data-bs-theme="dark"] .user-space main .link { stroke: rgba(255,255,255,.16) !important; }

/* Boutons d'action (zoom/refresh/fullscreen) */
.tree-action-btn {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    color: var(--btn-blue);
    cursor: pointer;
    transition: background .2s, color .2s;
}
.tree-action-btn:hover { background: var(--btn-blue-soft-bg); color: var(--btn-blue-hover); }

/* Vue en arbre — nœuds */
.tree-list-panel { max-height: 72vh; }
#tree-view .affiliate-data-container {
    width: auto; min-width: 360px; max-width: 460px;
    background: var(--adm-surface-2);
    border: 1px solid var(--adm-border);
    border-radius: 12px;
}
.tree-node-name { color: var(--adm-text); font-size: .9rem; }
.tree-node-sub { color: var(--adm-muted); font-size: .78rem; }
#tree-view .affiliate-data-container .level-container {
    width: auto; height: auto; min-width: 52px;
    border-radius: 50px; padding: 4px 10px;
    background: var(--btn-blue-soft-bg);
    color: var(--btn-blue);
    font-size: .7rem; font-weight: 700;
}
#tree-view .affiliate-data-container .about-data-container {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--adm-surface);
    border: 1px solid var(--adm-border);
    color: var(--adm-muted);
    cursor: pointer;
}
#tree-view .affiliate-data-container .btn-show-hide-affiliates {
    background: var(--btn-blue);
    color: #fff;
    border: none;
}
.user-data-container { background: var(--btn-blue-soft-bg) !important; color: var(--adm-text); }
.pv-container { color: var(--adm-text); }
.descendants-container, .descendants-container .descendants .line { border-color: var(--adm-border); background-color: var(--adm-border); }

[data-bs-theme="dark"] .tree-tooltip,
[data-bs-theme="dark"] .tree-view-tooltip { background: var(--adm-surface) !important; border-color: var(--adm-border) !important; }

/* ════════════════════════════════════════════════════════════════
   PARAMÈTRES UTILISATEUR
════════════════════════════════════════════════════════════════ */
.setting-profile-col {
    border-right: 1px solid var(--adm-border);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
@media (max-width: 767px) { .setting-profile-col { border-right: none; border-bottom: 1px solid var(--adm-border); padding-bottom: 16px; } }
.setting-avatar {
    width: 90px; height: 90px; border-radius: 50%;
    object-fit: cover; border: 3px solid var(--btn-blue-soft-bg);
}

.setting-info-col { display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.setting-info-item { display: flex; flex-direction: column; gap: 2px; }
.setting-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--btn-blue); font-size: .82rem; font-weight: 600;
    text-decoration: none; transition: color .2s;
}
.setting-link:hover { color: var(--btn-blue-hover); text-decoration: underline; }

.setting-status-col { display: flex; flex-direction: column; justify-content: center; }
.setting-status-row { padding: 6px 0; border-bottom: 1px dashed var(--adm-border); }
.setting-status-row:last-child { border-bottom: none; }

.setting-pv-gpv {
    display: flex; flex-wrap: wrap; gap: 28px;
    background: var(--btn-blue-soft-bg);
    border: 1px solid var(--adm-border);
    border-radius: 12px; padding: 16px 20px;
}
.setting-pv-item { display: flex; align-items: center; gap: 12px; }
.setting-pv-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* En-tête d'onglet + bouton édition */
.setting-tab-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 18px; padding-bottom: 12px;
    border-bottom: 1px solid var(--adm-border);
}
.setting-tab-title { font-size: .95rem; font-weight: 700; color: var(--adm-text); }
.setting-edit-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px;
    background: var(--btn-blue-soft-bg); color: var(--btn-blue);
    border: 1px solid rgba(0, 62, 205,.25); cursor: pointer; transition: background .2s;
}
.setting-edit-btn:hover { background: rgba(0, 62, 205,.18); }

/* Libellés de formulaire des réglages */
#personal-information .col-form-label,
#contact-details .col-form-label,
#bank-details .col-form-label,
#payment-details .col-form-label { color: var(--adm-muted); font-size: .82rem; font-weight: 600; }
.adm-btn-primary:disabled { opacity: .55; cursor: not-allowed; }

/* ════════════════════════════════════════════════════════════════
   MODE SOMBRE — ESPACE UTILISATEUR
   (dashboard, réseau, portefeuille, retrait, paramètres)
   Le contenu repose sur des cartes .bg-white / .section et des
   classes héritées : on les rend adaptatives au thème.
════════════════════════════════════════════════════════════════ */
[data-bs-theme="dark"] .user-space main { color: var(--text-primary); }

[data-bs-theme="dark"] .user-space main .bg-white,
[data-bs-theme="dark"] .user-space main .section,
[data-bs-theme="dark"] .user-space main .card {
    background: var(--surface-card) !important;
    color: var(--text-primary);
}

[data-bs-theme="dark"] .user-space main h1,
[data-bs-theme="dark"] .user-space main h2,
[data-bs-theme="dark"] .user-space main h3,
[data-bs-theme="dark"] .user-space main h4,
[data-bs-theme="dark"] .user-space main h5,
[data-bs-theme="dark"] .user-space main h6,
[data-bs-theme="dark"] .user-space main .fw-bold,
[data-bs-theme="dark"] .user-space main label { color: var(--text-primary); }

[data-bs-theme="dark"] .user-space main .text-secondary,
[data-bs-theme="dark"] .user-space main .text-muted { color: var(--adm-muted) !important; }
[data-bs-theme="dark"] .user-space main .text-app-blue { color: #6f9bff !important; }

/* Conteneurs d'icônes : accent bleu soft au lieu du noir */
[data-bs-theme="dark"] .user-space main .icon-container.bg-app-black,
[data-bs-theme="dark"] .user-space main .icon-container {
    background: rgba(0, 62, 205, 0.20) !important;
}

/* Variantes bleues claires (cartes parrainage…) */
[data-bs-theme="dark"] .user-space main .bg-app-blue-variant3,
[data-bs-theme="dark"] .user-space main .bg-app-blue-variant4 {
    background: rgba(0, 62, 205, 0.12) !important;
}

/* Bordures & séparateurs */
[data-bs-theme="dark"] .user-space main .border-bottom,
[data-bs-theme="dark"] .user-space main .border-end,
[data-bs-theme="dark"] .user-space main .border-top,
[data-bs-theme="dark"] .user-space main .border { border-color: var(--border-color) !important; }
[data-bs-theme="dark"] .user-space main .vertical-line { background: var(--border-color); }

/* Onglets internes */
[data-bs-theme="dark"] .user-space main .nav.nav-tabs a.nav-link { color: var(--adm-muted); }
[data-bs-theme="dark"] .user-space main .nav.nav-tabs a.nav-link.active,
[data-bs-theme="dark"] .user-space main .nav.nav-tabs a.nav-link:hover {
    color: #6f9bff;
    border-bottom-color: #6f9bff;
}

/* Items de listes (gagnants, recruteurs, membres, rangs) */
[data-bs-theme="dark"] .user-space main .best-winners-list-item,
[data-bs-theme="dark"] .user-space main .best-recruiters-list-item,
[data-bs-theme="dark"] .user-space main .new-member-item,
[data-bs-theme="dark"] .user-space main .rank-list-item { border-color: var(--border-color) !important; }
[data-bs-theme="dark"] .user-space main .rank-condition {
    border-color: var(--border-color) !important;
    background: var(--adm-surface-2) !important;
}

/* Champs de formulaire (paramètres, retrait…) */
[data-bs-theme="dark"] .user-space main .form-control,
[data-bs-theme="dark"] .user-space main input:not([type=checkbox]):not([type=radio]),
[data-bs-theme="dark"] .user-space main select,
[data-bs-theme="dark"] .user-space main textarea {
    background: var(--adm-input-bg) !important;
    color: #f1f5f9 !important;
    border-color: rgba(255,255,255,.16) !important;
}
[data-bs-theme="dark"] .user-space main .form-control:focus,
[data-bs-theme="dark"] .user-space main input:not([type=checkbox]):not([type=radio]):focus,
[data-bs-theme="dark"] .user-space main select:focus,
[data-bs-theme="dark"] .user-space main textarea:focus {
    border-color: var(--btn-blue) !important;
    box-shadow: 0 0 0 .2rem rgba(0, 62, 205,.25) !important;
}
[data-bs-theme="dark"] .user-space main .form-control::placeholder,
[data-bs-theme="dark"] .user-space main textarea::placeholder { color: rgba(255,255,255,.45) !important; }
[data-bs-theme="dark"] .user-space main .input-group-text {
    background: var(--adm-surface-2) !important;
    color: var(--adm-muted) !important;
    border-color: rgba(255,255,255,.16) !important;
}

/* Tables (portefeuille, retrait…) : couleur de texte adaptative */
[data-bs-theme="dark"] .user-space main table {
    --bs-table-color: var(--text-primary);
    --cui-table-color: var(--text-primary);
}
[data-bs-theme="dark"] .user-space main .table-light,
[data-bs-theme="dark"] .user-space main thead.table-light th {
    background: var(--adm-surface-2) !important;
    color: var(--adm-muted) !important;
}

/* Onglets « pilule » (paramètres) : actif sombre au lieu de blanc */
[data-bs-theme="dark"] .user-space main .user-setting-section2 .nav .nav-link.active {
    background-color: var(--adm-surface-2) !important;
    color: var(--text-primary) !important;
}
/* Onglets wallet / réseau : non-actifs sombres, actif bleu soft */
[data-bs-theme="dark"] .user-space main .wallet-details-container-header.nav.nav-tabs a.nav-link,
[data-bs-theme="dark"] .user-space main .tree-container-header.nav.nav-tabs a.nav-link {
    background-color: var(--adm-surface-2) !important;
    color: var(--text-primary) !important;
}
[data-bs-theme="dark"] .user-space main .wallet-details-container-header.nav.nav-tabs a.nav-link.active,
[data-bs-theme="dark"] .user-space main .tree-container-header.nav.nav-tabs a.nav-link.active {
    background-color: var(--btn-blue) !important;
    color: #ffffff !important;
}

.btn-show-more {
    font-size: 12px;
    color: var(--app-blue-color);
    background: rgba(0, 62, 205,.06);
    border: 1px solid rgba(0, 62, 205,.15);
    border-radius: 6px;
    padding: 5px 14px;
    transition: background .2s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-show-more:hover { background: rgba(0, 62, 205,.12); }

[data-bs-theme="dark"] .btn-show-more { background: rgba(0, 62, 205,.16); border-color: rgba(0, 62, 205,.3); }

/* ════════════════════════════════════════════════════════════════
   ANIMATIONS
════════════════════════════════════════════════════════════════ */
@keyframes adm-card-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.adm-stat-icon {
    animation: adm-pulse-icon 3.5s ease-in-out infinite;
}

@keyframes adm-pulse-icon {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.07); }
}

/* ════════════════════════════════════════════════════════════════
   EASYADMIN DARK MODE OVERRIDES
════════════════════════════════════════════════════════════════ */
[data-bs-theme="dark"] .datagrid thead th {
    background: rgba(255,255,255,.03) !important;
    color: rgba(255,255,255,.7) !important;
}

[data-bs-theme="dark"] .content-body { color: var(--adm-text); }

[data-bs-theme="dark"] .dropdown-menu {
    background: #002a62 !important;
    border-color: rgba(255,255,255,.1) !important;
}

[data-bs-theme="dark"] .dropdown-item { color: rgba(255,255,255,.8) !important; }
[data-bs-theme="dark"] .dropdown-item:hover { background: rgba(255,255,255,.07) !important; color: #fff !important; }

[data-bs-theme="dark"] .modal-footer {
    background: #162036;
    border-color: rgba(255,255,255,.08);
}

[data-bs-theme="dark"] .content-header-title .title { color: rgba(255,255,255,.9); }

/* Barre de titre (CRUD) en dark : slate doux des panneaux au lieu du quasi-noir */
[data-bs-theme="dark"] .content-header {
    background: var(--adm-surface) !important;
    border: 1px solid var(--adm-border);
}

[data-bs-theme="dark"] .search-container .navbar-search .form-widget input {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.15);
    color: rgba(255,255,255,.85);
}

[data-bs-theme="dark"] .search-container .navbar-search .form-widget .content-search-icon,
[data-bs-theme="dark"] .search-container .navbar-search .form-widget .content-search-reset {
    color: rgba(255,255,255,.6);
}

[data-bs-theme="dark"] .page-item .page-link:focus,
[data-bs-theme="dark"] .page-item .page-link:hover {
    background-color: rgba(255,255,255,.1) !important;
    color: #fff;
}

[data-bs-theme="dark"] .modal-body { background: #002a62; }
[data-bs-theme="dark"] .modal-footer .btn.btn-secondary { color: rgba(255,255,255,.8) !important; border-color: rgba(255,255,255,.2) !important; }

/* EasyAdmin user menu / settings dropdown */
[data-bs-theme="dark"] .user-menu-wrapper .user-avatar svg,
[data-bs-theme="dark"] .dropdown-settings .dropdown-settings-button svg {
    color: rgba(255,255,255,.7);
}

[data-bs-theme="dark"] .nav-tabs .nav-link { color: var(--adm-muted); }
[data-bs-theme="dark"] .nav-tabs .nav-link.active { color: var(--app-blue-color) !important; }
/* Mode light imposé (temporaire) — bascule de thème + réglages EA masqués côté admin */
#theme-toggle, .admin-theme-btn, .dropdown-appearance, .dropdown-settings { display: none !important; }
