:root {
    --dash-primary: #8b2942;
    --dash-primary-dark: #6b1f33;
    --dash-accent: #c45c26;
    --dash-filter-bg: linear-gradient(135deg, #014e61 0%, #1a7a8c 55%, #3498db 100%);
    --dash-card-shadow: 0 4px 18px rgba(139, 41, 66, 0.08);
}

.dashboard-page {
    width: 100%;
    padding: 0 0 0.5rem;
    --dash-gap: 3px;
}

/* Annule le margin-bottom: 30px global sur .card */
.dashboard-page .card {
    margin-bottom: 0 !important;
}

.dashboard-page .dashboard-section {
    margin-bottom: 0;
}

/* Gouttières minimales entre les cartes */
.dashboard-page .dashboard-kpi-row,
.dashboard-page .dashboard-rows-equal {
    margin-left: calc(var(--dash-gap) * -1);
    margin-right: calc(var(--dash-gap) * -1);
}

.dashboard-page .dashboard-kpi-row>[class*="col-"],
.dashboard-page .dashboard-rows-equal>[class*="col-"] {
    padding-left: var(--dash-gap);
    padding-right: var(--dash-gap);
    margin-bottom: var(--dash-gap);
}

.dashboard-page .dashboard-kpi-row>[class*="col-"] {
    margin-top: 0 !important;
}

.dashboard-page .dashboard-kpi-row {
    margin-bottom: var(--dash-gap);
}

.dashboard-page .container-fluid.px-0 {
    padding-top: 0;
    padding-bottom: 0;
}

.dashboard-page .dashboard-rows-equal:last-child>[class*="col-"] {
    margin-bottom: 0;
}

.card.dashboard-card {
    border-radius: 14px;
    border: 1px solid #eee;
    box-shadow: var(--dash-card-shadow);
    background: #fff;
    overflow: hidden;
}

.card.dashboard-card .header {
    border-bottom: 1px solid #f0e6ea;
    padding: 0.85rem 1.1rem;
    background: linear-gradient(180deg, #fff 0%, #fdfafb 100%);
}

.card.dashboard-card .header h2 {
    font-size: 0.95rem;
    color: var(--dash-primary);
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.01em;
}

#dashboardFilterModal .modal-content {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(1, 78, 97, 0.18);
}

#dashboardFilterModal .modal-header {
    background: #fff;
    color: #1f2937;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.25rem;
}

#dashboardFilterModal .modal-header .close {
    color: #6b7280;
    opacity: 0.92;
    text-shadow: none;
}

#dashboardFilterModal .modal-header .close:hover {
    opacity: 1;
    color: #111827;
}

#dashboardFilterModal .modal-title {
    color: #1f2937;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.dash-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid #f3eef0;
    gap: 0.5rem;
}

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

.dash-list-scroll {
    max-height: 300px;
    overflow-y: auto;
    background: #faf7f8;
    border-radius: 10px;
    padding: 0.25rem;
}

.dash-list-scroll.dash-list-stretch {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 100%;
    padding: 0.5rem 0.65rem;
    overflow-y: auto;
}

.dash-list-stretch .dash-list-item {
    flex: 1;
    align-items: center;
    padding: 0.85rem 0.9rem;
    min-height: 3.75rem;
    gap: 0.75rem;
    border-bottom: 1px solid #ebe3e6;
    border-radius: 10px;
    margin-bottom: 0.25rem;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

.dash-list-stretch .dash-list-item:hover {
    box-shadow: 0 4px 14px rgba(139, 41, 66, 0.06);
}

.dash-list-stretch .dash-list-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.dash-list-stretch .dash-list-item .dash-list-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.dash-list-stretch .dash-list-item .dash-list-icon i {
    font-size: 1.35rem;
    line-height: 1;
}

.dash-cmd-icon--wait {
    background: linear-gradient(135deg, rgba(196, 92, 38, 0.24) 0%, rgba(196, 92, 38, 0.08) 100%);
    border: 1px solid rgba(196, 92, 38, 0.18);
}

.dash-cmd-icon--wait i {
    color: #c45c26;
}

.dash-cmd-icon--paid {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.24) 0%, rgba(39, 174, 96, 0.08) 100%);
    border: 1px solid rgba(39, 174, 96, 0.18);
}

.dash-cmd-icon--paid i {
    color: #1e8449;
}

.dash-cmd-icon--ship {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.24) 0%, rgba(52, 152, 219, 0.08) 100%);
    border: 1px solid rgba(52, 152, 219, 0.18);
}

.dash-cmd-icon--ship i {
    color: #2980b9;
}

.dash-cmd-icon--done {
    background: linear-gradient(135deg, rgba(139, 41, 66, 0.22) 0%, rgba(139, 41, 66, 0.07) 100%);
    border: 1px solid rgba(139, 41, 66, 0.16);
}

.dash-cmd-icon--done i {
    color: var(--dash-primary);
}

.dash-ticket-icon--receipt {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.22) 0%, rgba(52, 152, 219, 0.08) 100%);
    border: 1px solid rgba(52, 152, 219, 0.16);
}

.dash-ticket-icon--receipt i {
    color: #2980b9;
}

.dash-ticket-icon--pending {
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.28) 0%, rgba(241, 196, 15, 0.08) 100%);
    border: 1px solid rgba(241, 196, 15, 0.22);
}

.dash-ticket-icon--pending i {
    color: #b7950b;
}

.dash-ticket-icon--valid {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.24) 0%, rgba(39, 174, 96, 0.08) 100%);
    border: 1px solid rgba(39, 174, 96, 0.18);
}

.dash-ticket-icon--valid i {
    color: #1e8449;
}

.dash-list-stretch .dash-list-item .font-weight-bold {
    flex: 1;
    font-size: 1.02rem;
    color: #2d2a2c;
}

.dash-list-stretch .dash-list-item .badge {
    font-size: 0.95rem;
    padding: 0.45rem 0.75rem;
    min-width: 2.6rem;
    font-weight: 600;
    border-radius: 8px;
}

.dash-list-scroll.dash-list-trophy .dash-list-item {
    padding: 0.65rem 0.75rem;
    gap: 0.65rem;
    align-items: flex-start;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 0.35rem;
}

.dash-list-trophy .dash-list-item .dash-list-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.22) 0%, rgba(196, 92, 38, 0.12) 100%);
    flex-shrink: 0;
    margin-top: 0.1rem;
    border: 1px solid rgba(184, 134, 11, 0.18);
}

.dash-list-trophy .dash-list-item .dash-list-icon i {
    font-size: 1.2rem;
    line-height: 1;
    color: #b8860b;
}

.dash-list-scroll.dash-list-alert .dash-list-item {
    padding: 0.65rem 0.75rem;
    gap: 0.65rem;
    align-items: flex-start;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 0.35rem;
}

.dash-list-alert .dash-list-item .dash-list-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.18) 0%, rgba(139, 41, 66, 0.1) 100%);
    flex-shrink: 0;
    margin-top: 0.1rem;
    border: 1px solid rgba(192, 57, 43, 0.16);
}

.dash-list-alert .dash-list-item .dash-list-icon i {
    font-size: 1.2rem;
    line-height: 1;
    color: #c0392b;
}

.dash-list-scroll.dash-list-alert-scroll {
    --dash-alert-row-height: 4.75rem;
    max-height: calc(5 * var(--dash-alert-row-height) + 0.5rem);
    overflow-y: auto;
    overflow-x: hidden;
}

.dash-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1.5rem;
    text-align: center;
    color: #8a7a82;
    background: linear-gradient(180deg, #faf8f9 0%, #f3ecef 100%);
    border-radius: 10px;
    border: 1px dashed #e0d4d8;
}

.dash-empty-state i {
    font-size: 2.25rem;
    opacity: 0.4;
    color: var(--dash-primary);
}

.dash-empty-state span {
    font-size: 0.9rem;
    font-weight: 500;
    max-width: 220px;
    line-height: 1.45;
}

.dash-list-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem 0.75rem;
    text-align: center;
    color: #8a7a82;
    min-height: 140px;
}

.dash-list-empty i {
    font-size: 2rem;
    opacity: 0.35;
    color: var(--dash-primary);
}

.periode-option {
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.periode-option.active {
    border-color: var(--dash-primary) !important;
    background: #fdf5f7;
}

#filtrePersonnaliseFields-dashboardFilterModal {
    display: none;
}

#filtrePersonnaliseFields-dashboardFilterModal.show {
    display: flex;
}

.dashboard-rows-equal {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.dashboard-rows-equal>[class*="col-"] {
    display: flex;
    flex-direction: column;
}

.dashboard-rows-equal>[class*="col-"]>.card {
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: 14px;
    border: 1px solid #eee;
    box-shadow: var(--dash-card-shadow);
}

.dashboard-card--list {
    min-height: 260px;
}

.dashboard-card--chart {
    min-height: 280px;
}

.dashboard-card--chart-wide {
    min-height: 300px;
}

.dashboard-rows-equal .card .body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0.35rem 0.5rem 0.5rem !important;
}

.dashboard-rows-equal .dash-chart-wrap {
    flex: 1 1 auto;
    position: relative;
    width: 100%;
    height: 220px;
    min-height: 200px;
}

.dashboard-rows-equal .dash-chart-wrap--wide {
    height: 280px;
    min-height: 260px;
}

.dashboard-rows-equal .dash-chart-wrap canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
}

.dashboard-rows-equal .dash-list-scroll {
    flex: 1;
    min-height: 0;
    max-height: none;
}

.dashboard-rows-equal .dash-panel-fill {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.dashboard-rows-equal .dash-list-scroll.dash-list-alert-scroll {
    flex: none;
    min-height: 0;
    max-height: calc(5 * 3.75rem + 0.5rem);
    overflow-y: auto;
}

.dashboard-page .card.dashboard-card .header {
    padding: 0.65rem 0.85rem;
}

.dashboard-page .dashboard-kpi-row .top_widget.dashboard-kpi {
    min-height: 100px;
}

.dashboard-page .dashboard-kpi-row .top_widget.dashboard-kpi .body {
    padding: 0.9rem 1rem !important;
}