/* =====================================================
   DASHBOARD
===================================================== */

.dashboard-page {
    min-height: 100vh;

    display: flex;

    background: #f4f8f7;
}


/* =====================================================
   SIDEBAR
===================================================== */

.dashboard-sidebar {
    position: fixed;

    left: 0;
    top: 0;
    bottom: 0;

    width: 250px;

    display: flex;
    flex-direction: column;

    padding: 28px 18px;

    background: #ffffff;

    border-right: 1px solid #e8efed;

    z-index: 100;
}


.sidebar-brand {
    display: flex;
    align-items: center;

    gap: 11px;

    padding: 4px 10px;

    margin-bottom: 40px;
}


.sidebar-logo {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: #0c9b84;

    color: white;

    font-size: 18px;
    font-weight: 900;

    box-shadow: 0 8px 20px rgba(12,155,132,0.18);
}


.sidebar-brand-text {
    display: flex;
    flex-direction: column;

    gap: 2px;
}

.sidebar-brand-text strong {
    font-size: 15px;

    color: #17312d;

    letter-spacing: .6px;
}

.sidebar-brand-text span {
    font-size: 7px;

    color: #0c9b84;

    font-weight: 800;

    letter-spacing: 1.7px;
}


/* =====================================================
   NAVIGATION
===================================================== */

.sidebar-nav {
    display: flex;
    flex-direction: column;

    gap: 5px;

    flex: 1;
}


.nav-section-title {
    padding: 14px 12px 7px;

    color: #a0afac;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 1.3px;
}


.nav-link {
    position: relative;

    display: flex;
    align-items: center;

    gap: 12px;

    min-height: 44px;

    padding: 0 12px;

    border-radius: 11px;

    color: #667a76;

    text-decoration: none;

    font-size: 12px;

    font-weight: 600;

    transition:
        background .2s ease,
        color .2s ease;
}


.nav-link:hover {
    background: #f1f8f6;

    color: #0c9b84;
}


.nav-link.active {
    background: #e9f8f4;

    color: #087d6b;

    font-weight: 750;
}


.nav-icon {
    width: 22px;
    height: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
}


.nav-count {
    margin-left: auto;

    min-width: 22px;
    height: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 6px;

    border-radius: 20px;

    background: #f0f4f3;

    color: #81908d;

    font-size: 9px;
}


.nav-link.active .nav-count {
    background: #d3f1e9;

    color: #087d6b;
}


/* =====================================================
   UTILISATEUR SIDEBAR
===================================================== */

.sidebar-bottom {
    padding-top: 18px;

    border-top: 1px solid #edf2f0;
}


.sidebar-user {
    display: flex;

    align-items: center;

    gap: 10px;

    padding: 10px;
}


.sidebar-user-avatar {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 10px;

    background: #dff4ef;

    color: #087d6b;

    font-size: 12px;

    font-weight: 800;
}


.sidebar-user-info {
    display: flex;
    flex-direction: column;

    gap: 3px;

    overflow: hidden;
}


.sidebar-user-info strong {
    max-width: 135px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    color: #304642;

    font-size: 11px;
}


.sidebar-user-info span {
    color: #9aa8a5;

    font-size: 9px;
}


.logout-link {
    display: flex;
    align-items: center;

    gap: 9px;

    padding: 9px 11px;

    margin-top: 5px;

    color: #9a7774;

    text-decoration: none;

    border-radius: 9px;

    font-size: 10px;

    font-weight: 600;
}


.logout-link:hover {
    background: #fff3f1;

    color: #c35e55;
}


/* =====================================================
   CONTENU PRINCIPAL
===================================================== */

.dashboard-main {
    width: calc(100% - 250px);

    margin-left: 250px;

    min-height: 100vh;

    padding: 0 40px 50px;
}


/* =====================================================
   TOPBAR
===================================================== */

.dashboard-topbar {
    height: 78px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid #e9efed;
}


.dashboard-breadcrumb {
    color: #82918e;

    font-size: 11px;

    font-weight: 600;
}


.topbar-right {
    display: flex;
    align-items: center;

    gap: 15px;
}


.topbar-date {
    padding: 8px 12px;

    background: white;

    border: 1px solid #e8efed;

    border-radius: 9px;

    color: #82918e;

    font-size: 10px;
}


.topbar-avatar {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #0c9b84;

    color: white;

    font-size: 11px;

    font-weight: 800;
}


.mobile-menu-button {
    display: none;
}


/* =====================================================
   BIENVENUE
===================================================== */

.dashboard-welcome {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    padding: 38px 0 30px;
}


.welcome-label {
    color: #0c9b84;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 1.4px;
}


.dashboard-welcome h1 {
    margin-top: 8px;

    color: #17312d;

    font-size: clamp(25px, 3vw, 34px);

    letter-spacing: -1px;
}


.dashboard-welcome p {
    margin-top: 8px;

    color: #82918e;

    font-size: 12px;
}


.welcome-date {
    display: flex;
    flex-direction: column;

    align-items: flex-end;

    gap: 4px;
}


.welcome-date span {
    color: #9aa8a5;

    font-size: 9px;
}


.welcome-date strong {
    color: #52645f;

    font-size: 11px;
}


/* =====================================================
   STATISTIQUES
===================================================== */

.stats-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 15px;
}


.stat-card {
    padding: 20px;

    background: white;

    border: 1px solid #e8efed;

    border-radius: 16px;

    box-shadow: 0 8px 25px rgba(25,73,64,.035);
}


.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.stat-icon {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #e5f7f2;

    color: #0c9b84;

    font-size: 14px;

    font-weight: 800;
}


.stat-icon.orange {
    background: #fff2df;
    color: #e79a35;
}


.stat-icon.blue {
    background: #e9f2ff;
    color: #5187d8;
}


.stat-icon.purple {
    background: #f2ebff;
    color: #8c67ce;
}


.stat-label {
    color: #9aa7a4;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 1px;
}


.stat-value {
    margin-top: 20px;

    color: #17312d;

    font-size: 28px;

    font-weight: 800;

    letter-spacing: -1px;
}


.stat-description {
    display: block;

    margin-top: 5px;

    color: #99a7a4;

    font-size: 9px;
}


/* =====================================================
   ACTIONS RAPIDES
===================================================== */

.quick-actions-section {
    margin-top: 30px;
}


.section-heading {
    margin-bottom: 15px;
}


.section-heading > div > span {
    color: #9aa7a4;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 1.2px;
}


.section-heading h2 {
    margin-top: 5px;

    color: #263c37;

    font-size: 17px;

    letter-spacing: -.3px;
}


.quick-actions-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 13px;
}


.quick-action {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 16px;

    background: white;

    border: 1px solid #e8efed;

    border-radius: 14px;

    color: #253b36;

    text-decoration: none;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}


.quick-action:hover {
    transform: translateY(-2px);

    border-color: #cce8e1;

    box-shadow: 0 12px 30px rgba(25,73,64,.07);
}


.quick-action.primary {
    background: #0c9b84;

    color: white;

    border-color: #0c9b84;
}


.quick-action-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 10px;

    background: #e9f8f4;

    color: #0c9b84;

    font-size: 19px;

    font-weight: 500;
}


.quick-action.primary .quick-action-icon {
    background: rgba(255,255,255,.14);

    color: white;
}


.quick-action > div:nth-child(2) {
    display: flex;
    flex-direction: column;

    gap: 4px;

    flex: 1;
}


.quick-action strong {
    font-size: 11px;
}


.quick-action span {
    color: #98a7a4;

    font-size: 9px;
}


.quick-action.primary span {
    color: rgba(255,255,255,.72);
}


.quick-action-arrow {
    color: #a1afac;

    font-size: 15px;
}


.quick-action.primary .quick-action-arrow {
    color: white;
}


/* =====================================================
   COLONNES
===================================================== */

.dashboard-columns {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 16px;

    margin-top: 30px;
}


.dashboard-panel {
    background: white;

    border: 1px solid #e8efed;

    border-radius: 16px;

    overflow: hidden;
}


.panel-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 20px;

    border-bottom: 1px solid #edf2f0;
}


.panel-small-title {
    color: #9aa7a4;

    font-size: 7px;

    font-weight: 800;

    letter-spacing: 1.1px;
}


.panel-header h2 {
    margin-top: 5px;

    color: #263c37;

    font-size: 15px;
}


.panel-link {
    color: #0c9b84;

    text-decoration: none;

    font-size: 9px;

    font-weight: 700;
}


.recent-list {
    display: flex;
    flex-direction: column;
}


.recent-item {
    display: flex;

    align-items: center;

    gap: 11px;

    padding: 14px 20px;

    text-decoration: none;

    border-bottom: 1px solid #f0f3f2;

    transition: background .2s ease;
}


.recent-item:last-child {
    border-bottom: none;
}


.recent-item:hover {
    background: #f8fbfa;
}


.recent-icon {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;

    background: #e9f8f4;

    color: #0c9b84;

    font-size: 12px;
}


.recent-icon.orange {
    background: #fff2df;

    color: #e79a35;
}


.recent-info {
    display: flex;
    flex-direction: column;

    gap: 4px;

    min-width: 0;

    flex: 1;
}


.recent-info strong {
    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    color: #344944;

    font-size: 10px;
}


.recent-info span {
    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    color: #9aa7a4;

    font-size: 8px;
}


.recent-right {
    display: flex;
    flex-direction: column;

    align-items: flex-end;

    gap: 4px;
}


.recent-right strong {
    color: #344944;

    font-size: 9px;
}


.recent-right span {
    color: #a1aeab;

    font-size: 8px;
}


/* =====================================================
   EMPTY STATE
===================================================== */

.empty-state {
    display: flex;
    flex-direction: column;

    align-items: center;

    justify-content: center;

    min-height: 220px;

    padding: 25px;

    text-align: center;
}


.empty-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 12px;

    border-radius: 12px;

    background: #eef6f4;

    color: #8ca29e;

    font-size: 17px;
}


.empty-state strong {
    color: #52645f;

    font-size: 11px;
}


.empty-state p {
    max-width: 230px;

    margin-top: 5px;

    color: #a0adaa;

    font-size: 9px;

    line-height: 1.5;
}


.empty-button {
    margin-top: 14px;

    padding: 8px 12px;

    border-radius: 8px;

    background: #e9f8f4;

    color: #087d6b;

    text-decoration: none;

    font-size: 9px;

    font-weight: 700;
}


/* =====================================================
   RÉSUMÉ FINANCIER
===================================================== */

.financial-summary {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 15px;

    margin-top: 18px;
}


.financial-card {
    display: flex;

    align-items: center;

    gap: 14px;

    padding: 18px 20px;

    background: white;

    border: 1px solid #e8efed;

    border-radius: 14px;
}


.financial-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: #e9f8f4;

    color: #0c9b84;

    font-size: 8px;

    font-weight: 900;
}


.financial-icon.orange {
    background: #fff2df;

    color: #e79a35;
}


.financial-content {
    display: flex;
    flex-direction: column;

    gap: 5px;
}


.financial-content span {
    color: #9aa7a4;

    font-size: 7px;

    font-weight: 800;

    letter-spacing: 1px;
}


.financial-content strong {
    color: #263c37;

    font-size: 16px;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1100px) {

    .dashboard-main {
        padding-left: 25px;
        padding-right: 25px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}


@media (max-width: 850px) {

    .dashboard-sidebar {
        transform: translateX(-100%);

        transition: transform .25s ease;
    }

    .dashboard-sidebar.open {
        transform: translateX(0);
    }

    .dashboard-main {
        width: 100%;

        margin-left: 0;
    }

    .mobile-menu-button {
        display: flex;

        align-items: center;
        justify-content: center;

        width: 34px;
        height: 34px;

        margin-right: 12px;

        border-radius: 9px;

        background: white;

        color: #52645f;

        cursor: pointer;

        font-size: 16px;
    }

    .dashboard-breadcrumb {
        display: flex;

        align-items: center;

        flex: 1;
    }

}


@media (max-width: 700px) {

    .dashboard-main {
        padding: 0 15px 35px;
    }

    .dashboard-topbar {
        height: 65px;
    }

    .dashboard-welcome {
        align-items: flex-start;

        flex-direction: column;

        gap: 15px;

        padding: 28px 0 22px;
    }

    .welcome-date {
        align-items: flex-start;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;

        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-value {
        font-size: 23px;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-columns {
        grid-template-columns: 1fr;
    }

    .financial-summary {
        grid-template-columns: 1fr;
    }

}
.sidebar-logo {
    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    overflow: hidden;

    background: transparent;

    border: none;

    box-shadow: none;
}

.sidebar-logo img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    display: block;

    background: transparent;

    border: none;

    box-shadow: none;

    /* Permet au blanc de l'image de se fondre
       avec le fond clair de la sidebar */
    mix-blend-mode: multiply;
}

@media (max-width: 450px) {

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .topbar-date {
        display: none;
    }

}