/* =========================================================
   RESET & BASE
========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f6f7f9;
    color: #222;
}

/* =========================================================
   LAYOUT GLOBAL
========================================================= */
.admin-dashboard {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-section {
    width: 100%;
}

/* =========================================================
   CARDS
========================================================= */
.dashboard-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    width: 100%;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

.dashboard-card h2 {
    margin: 0 0 12px;
    font-size: 1rem;
}

/* =========================================================
   KPI / SYNTHÈSE CAISSE
========================================================= */
.dashboard-caisse-synthese .dashboard-card {
    text-align: center;
}

.dashboard-caisse-synthese .dashboard-card > div {
    display: flex;
    flex-direction: column !important;
    gap: 12px !important;
}

.kpi-title {
    font-size: 0.8rem;
    color: #666;
}

.kpi-value {
    font-weight: 600;
    font-size: 1rem;
}

/* =========================================================
   FILTRES
========================================================= */
.dashboard-filters-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-filters-form label {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}

.dashboard-filters-form select,
.dashboard-filters-form button {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 0.9rem;
}

.dashboard-filters-form button {
    background: #111;
    color: #fff;
    cursor: pointer;
}

/* =========================================================
   ALERTES
========================================================= */
.dashboard-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.dashboard-alert-warning {
    background: #fff7ed;
    color: #9a3412;
}

.dashboard-alert-info {
    background: #eff6ff;
    color: #1d4ed8;
}

/* =========================================================
   GRAPHIQUE
========================================================= */
.dashboard-graph canvas {
    width: 100% !important;
    height: auto !important;
}

/* =========================================================
   LISTES (TOP, CLIENTS, RÉSERVATIONS)
========================================================= */
.dashboard-top5 ol,
.dashboard-last-users ul,
.dashboard-operational ul,
.dashboard-finance ul {
    padding-left: 16px;
    margin: 0;
}

.dashboard-top5 li,
.dashboard-last-users li,
.dashboard-operational li,
.dashboard-finance li {
    font-size: 0.85rem;
    margin-bottom: 6px;
}

/* =========================================================
   BARRES (TAUX / OBJECTIF)
========================================================= */
.dashboard-taux-bar,
.dashboard-objectif-bar {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin: 8px 0;
}

.dashboard-taux-bar-inner {
    height: 100%;
    background: #16a34a;
}

.dashboard-objectif-bar-inner {
    height: 100%;
    background: #2563eb;
}

/* =========================================================
   EXECUTIVE / INDICATORS / CLIENT
========================================================= */
.dashboard-bar-group,
.dashboard-indicators,
.dashboard-client {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-bar,
.dashboard-indicator,
.dashboard-client-segment,
.dashboard-client-value {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 10px;
    font-size: 0.85rem;
}

.dashboard-indicator-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
}

.dashboard-indicator-icon-in {
    background: #dcfce7;
    color: #166534;
}

.dashboard-indicator-icon-out {
    background: #fee2e2;
    color: #991b1b;
}

/* =========================================================
   EXPORT
========================================================= */
.dashboard-card-export {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-export-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: #111;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}

/* =========================================================
   TABLETTE ≥ 768px
========================================================= */
@media (min-width: 768px) {

    .admin-dashboard {
        padding: 24px;
        gap: 24px;
    }

    .dashboard-caisse-synthese .dashboard-card > div {
        flex-direction: row !important;
        justify-content: space-between;
    }

    .dashboard-bar-group,
    .dashboard-indicators,
    .dashboard-client {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .dashboard-bar,
    .dashboard-indicator {
        flex: 1 1 45%;
    }

    .dashboard-card-export {
        flex-direction: row;
    }

    .dashboard-export-btn {
        width: auto;
        flex: 1;
    }
}

/* =========================================================
   DESKTOP ≥ 1024px
========================================================= */
@media (min-width: 1024px) {

    .dashboard-bar,
    .dashboard-indicator {
        flex: 1 1 22%;
    }
}
/* --- Responsive Mobile First --- */
@media (max-width: 700px) {
    .admin-dashboard {
        padding: 0;
    }
    .dashboard-header, .dashboard-section {
        padding-left: 6px;
        padding-right: 6px;
    }
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 6px;
    }
    .dashboard-header-center {
        text-align: left;
        width: 100%;
    }
    .dashboard-title {
        font-size: 1rem;
        padding: 8px 12px;
        width: 100%;
        box-sizing: border-box;
    }
    .dashboard-header-right {
        width: 100%;
        justify-content: flex-end;
    }
    .dashboard-card {
        padding: 14px 6px 12px 6px;
        border-radius: 10px;
        margin-bottom: 14px;
    }
    .dashboard-section {
        margin: 12px 0 0 0;
        padding: 0 4px;
    }
    .dashboard-section h2 {
        font-size: 1rem;
        gap: 4px;
    }
    .dashboard-bar-group {
        flex-direction: column;
        gap: 10px;
    }
    .dashboard-bar {
        padding: 10px 6px;
        font-size: 0.98rem;
    }
    .dashboard-executive, .dashboard-finance, .dashboard-operational {
        padding: 8px 0;
    }
    .dashboard-client {
        flex-direction: column;
        gap: 10px;
    }
    .dashboard-client-segment, .dashboard-client-value {
        width: 100%;
        justify-content: flex-start;
        font-size: 0.98rem;
    }
    .dashboard-indicators {
        flex-direction: column;
        gap: 10px;
    }
    .dashboard-indicator {
        width: 100%;
        padding: 8px 0;
    }
    .dashboard-card-export {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    .dashboard-export-btn {
        width: 100%;
        font-size: 1em;
    }
    .dashboard-card ol, .dashboard-card ul {
        margin-left: 10px;
    }
}
/* Styles admin dashboard (header, cards, etc.) déplacés depuis dashboard.html.twig */
.dashboard-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f3f4f6 100%);
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(44,44,44,0.10), 0 1.5px 4px rgba(44,44,44,0.06);
    border: 1.5px solid #e0e7ef;
    padding: 24px 20px 20px 20px;
    margin-bottom: 24px;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
}
.dashboard-card:hover {
    box-shadow: 0 8px 32px rgba(44,44,44,0.16), 0 2px 8px rgba(44,44,44,0.10);
    transform: translateY(-2px) scale(1.01);
}
.dashboard-card h2 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dashboard-card ol, .dashboard-card ul {
    margin: 0 0 0 18px;
    padding: 0;
}
.dashboard-card ol li, .dashboard-card ul li {
    margin-bottom: 7px;
    color: #333;
    font-size: 0.98rem;
}
.dashboard-card:last-child {
    margin-bottom: 0;
}
.dashboard-card-export {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: flex-start;
    background: none;
    box-shadow: none;
    border: none;
    padding: 0;
    margin: 0;
}
.admin-dashboard {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #FAFAFA;
    color: #1A1A1A;
    padding: 0;
    margin: 0;
    min-height: 100vh;
}
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 12px;
    background: #FFFFFF;
    border-bottom: 1px solid #E5E5E5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.dashboard-header-left {
    flex: 0 0 auto;
}
.dashboard-logo {
    height: 32px;
    display: block;
}
.dashboard-header-center {
    flex: 1 1 auto;
    text-align: center;
}
.dashboard-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #F5F5F5 0%, #ECECEC 100%);
    border-radius: 10px;
    padding: 10px 20px;
    display: inline-block;
    color: #2C2C2C;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.dashboard-header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}
.dashboard-user-btn {
    background: #2C2C2C;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dashboard-user-btn:hover {
    background: #1A1A1A;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.dashboard-section {
    margin: 20px 0 0 0;
    padding: 0 12px;
}
.dashboard-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    margin-top: 0;
    color: #2C2C2C;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-icon {
    color: #666;
}
.dashboard-executive {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #F0F0F0;
}
.dashboard-bar-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.dashboard-bar {
    background: linear-gradient(135deg, #F8F8F8 0%, #F0F0F0 100%);
    border-radius: 12px;
    flex: 1 1 calc(50% - 6px);
    min-width: 120px;
    padding: 14px 12px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    border: 1px solid #E8E8E8;
}
.dashboard-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.bar-icon {
    flex-shrink: 0;
    color: #555;
}
.dashboard-bar span {
    flex: 1;
}
.dashboard-finance {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #F0F0F0;
}
.dashboard-finance-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2C2C2C;
}
.dashboard-finance ul {
    margin: 0 0 16px 0;
    padding-left: 20px;
}
.dashboard-finance ul li {
    margin-bottom: 6px;
    color: #444;
}
.dashboard-finance-graph {
    height: 80px;
    background: linear-gradient(135deg, #F8F8F8 0%, #F0F0F0 100%);
    border-radius: 12px;
    border: 1px solid #E8E8E8;
}
.dashboard-indicators {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.dashboard-indicator {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #FFFFFF;
    border-radius: 16px;
    padding: 16px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #F0F0F0;
    transition: all 0.2s ease;
}
.dashboard-indicator:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.dashboard-indicator-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #F5F5F5 0%, #ECECEC 100%);
    border-radius: 50%;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
}
.dashboard-indicator-icon-in {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: #2E7D32;
}
.dashboard-indicator-icon-out {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    color: #C62828;
}
.dashboard-indicator-label {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    line-height: 1.4;
}
.dashboard-indicator-label b {
    color: #2C2C2C;
    font-size: 0.95rem;
}
.dashboard-client {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.dashboard-client-segment,
.dashboard-client-value {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 16px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #F0F0F0;
    transition: all 0.2s ease;
}
.dashboard-client-segment:hover,
.dashboard-client-value:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.client-icon {
    flex-shrink: 0;
    color: #555;
}
.dashboard-operational {
    background: #FFFFFF;
    border-radius: 12px;
    min-height: 60px;
    margin-bottom: 20px;
    padding: 16px;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #F0F0F0;
}
.dashboard-operational ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}
.dashboard-operational ul li {
    margin-bottom: 8px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 8px;
}
.list-icon {
    flex-shrink: 0;
    color: #666;
}
@media (min-width: 700px) {
    .dashboard-header,
    .dashboard-section {
        padding-left: 32px;
        padding-right: 32px;
    }
    .dashboard-title {
        font-size: 1.15rem;
        padding: 10px 28px;
    }
    .dashboard-bar,
    .dashboard-client-segment,
    .dashboard-client-value,
    .dashboard-operational {
        font-size: 1rem;
    }
    .dashboard-executive,
    .dashboard-finance,
    .dashboard-operational {
        padding: 20px;
    }
    .dashboard-bar {
        padding: 16px 14px;
    }
}
@media (min-width: 1024px) {
    .dashboard-bar-group {
        flex-wrap: nowrap;
    }
    .dashboard-bar {
        flex: 1 1 0;
    }
}
