.erpcf-frontend-dashboard {
    max-width: 1180px;
    margin: 40px auto;
    padding: 24px 28px 32px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Header */

.erpcf-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
}

.erpcf-header__brand {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
}

.erpcf-header__title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.erpcf-header__subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    color: #6b7280;
}

.erpcf-header__right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.erpcf-header__icon-btn {
    border: none;
    background: #e5edff;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.erpcf-header__icon {
    width: 24px;   /* au lieu de 20 */
    height: 24px;
    color: #1f2937;
    display: block;
}





.erpcf-header__icon-btn:hover {
    background: #d4e2ff;
}


.erpcf-header__primary-btn {
    border: none;
    background: #2563eb;
    color: #ffffff;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* KPI cards */

.erpcf-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.erpcf-kpi-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Nouveau bloc pour aligner icône + valeur sur une ligne */
/* Ligne icône + chiffre */
.erpcf-kpi-card__top {
    display: grid;
    grid-template-columns: auto 1fr;   /* icône + zone centrale */
    align-items: center;
}

/* Icône collée à gauche (comme avant) */
.erpcf-kpi-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #ffffff;      /* texte blanc sur bleu */
    font-size: 20px;
    font-weight: 700;
}


.erpcf-kpi-card__icon-char {
    font-size: 22px;
    color: #ffffff;   /* essaie, mais sur certains navigateurs l’emoji reste coloré */
}

.erpcf-kpi-card__icon span {
    display: block;
    transform: translateY(1px);  /* ajuste si besoin : 1px, 2px */
}


/* Chiffre centré dans la zone centrale et plus gros */
.erpcf-kpi-card__value {
    text-align: center;
    font-size: 40px;        /* augmente/descends ici pour la taille */
    font-weight: 700;
    color: #111827;
}




.erpcf-kpi-card__icon--blue { background: #2563eb; }
.erpcf-kpi-card__icon--teal { background: #0f766e; }
.erpcf-kpi-card__icon--orange { background: #ea580c; }
.erpcf-kpi-card__icon--yellow { background: #f59e0b; }

.erpcf-kpi-card__label {
    font-size: 24px;          /* plus gros et harmonisé */
    font-weight: 500;
    color: #374151;
    white-space: nowrap;      /* reste sur une seule ligne */
    overflow: hidden;         /* masque si trop long */
    text-overflow: ellipsis;  /* ajoute "…" si ça déborde */
    width: 100%;              /* prend toute la largeur du container */
}



/* Module cards */

.erpcf-modules {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.erpcf-module-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.erpcf-module-card__bar {
    height: 6px;
    width: 100%;
}

.erpcf-module-card__bar--blue { background: #2563eb; }
.erpcf-module-card__bar--teal { background: #0f766e; }
.erpcf-module-card__bar--orange { background: #ea580c; }
.erpcf-module-card__bar--indigo { background: #4f46e5; }

.erpcf-module-card__body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.erpcf-module-card__text {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    flex-grow: 1;           /* pousse le texte pour que le bouton reste en bas */
}

.erpcf-module-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: #e5edff;   /* couleur de fond par défaut */
    color: #1f2937;              /* couleur du texte par défaut */
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.erpcf-module-card__btn:hover {
    background-color: #4f46e5;   /* couleur au survol */
    color: #ffffff;              /* texte blanc au survol */
}



.erpcf-module-card__icon-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.erpcf-module-card__icon {
    font-size: 18px;
}

.erpcf-module-card__title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}



/* Bas de page */

.erpcf-bottom {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.erpcf-bottom__title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
}

.erpcf-bottom__card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    padding: 12px 14px;
}

.erpcf-bottom__list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: #374151;
}

.erpcf-bottom__list li {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #f3f4f6;
}

.erpcf-bottom__list li:last-child {
    border-bottom: none;
}

/* Responsive léger */

@media (max-width: 900px) {
    .erpcf-kpis,
    .erpcf-modules {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .erpcf-frontend-dashboard {
        margin: 16px;
        padding: 16px;
    }

    .erpcf-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .erpcf-kpis,
    .erpcf-modules,
    .erpcf-bottom {
        grid-template-columns: 1fr;
    }
}
