/* ===============================
   COMPONENTS.CSS - CARDS, BUTTONS, MODALS, SEARCH
   =============================== */

/* Page active */
.page.active { 
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Cards */
.card { 
    background: white; 
    border-radius: 16px; 
    padding: 18px; 
    margin-bottom: 14px; 
    box-shadow: 0 2px 12px rgba(0,0,0,0.06); 
    border: 1px solid #f0f0f0; 
    transition: transform 0.3s ease; 
    word-wrap: break-word; 
    overflow-wrap: break-word; 
    max-width: 100%; 
}

.card:hover { 
    transform: translateY(-2px); 
}

.enhanced-card { 
    background: white;
    border-radius: 20px; 
    padding: 24px; 
    margin-bottom: 20px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); 
    position: relative; 
    overflow: hidden; 
    border: 1px solid #f0f0f0;
}

.enhanced-card::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    height: 4px; 
    background: linear-gradient(135deg, #667eea, #764ba2); 
}

.enhanced-card:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 12px 40px rgba(0,0,0,0.15); 
}

.card-header { 
    display: flex; 
    align-items: center; 
    margin-bottom: 20px; 
}

.card-title { 
    font-size: 1.1rem; 
    font-weight: 700; 
    color: #000; 
}

.card-subtitle { 
    font-size: 0.85rem; 
    color: #000; 
}

/* ===============================
   NOUVELLE VUE D'ENSEMBLE - DESIGN MODERNE
   =============================== */

/* Filtres temporels pour les graphiques */
.chart-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.filter-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.overview-master-card {
    background: 
        linear-gradient(145deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.95) 100%);
    backdrop-filter: blur(25px) saturate(180%);
    border-radius: 28px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 
        0 25px 50px rgba(102, 126, 234, 0.15),
        0 15px 35px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.overview-master-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 33%, #f093fb 66%, #667eea 100%);
    border-radius: 28px 28px 0 0;
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
}

.overview-master-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 35px 70px rgba(102, 126, 234, 0.2),
        0 20px 40px rgba(0, 0, 0, 0.12);
}

.overview-header-redesigned {
    display: flex;
    align-items: center;
    margin-bottom: 32px !important;
    gap: 20px;
}

.overview-icon-wrapper {
    width: 68px;
    height: 68px;
    border-radius: 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    position: relative;
    flex-shrink: 0;
}

.overview-icon-wrapper::before {
    content: '';
    position: absolute;
    inset: 3px;
    background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.05));
    border-radius: 19px;
}

.overview-icon {
    width: 34px;
    height: 34px;
    stroke: white;
    fill: none;
    stroke-width: 2.5;
    z-index: 1;
}

.overview-title-section {
    flex: 1;
    min-width: 0;
}

.overview-main-title {
    font-size: 1.9rem;
    font-weight: 900;
    color: transparent;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    background-clip: text;
    margin: 0 0 6px 0;
    line-height: 1.1;
}

.overview-subtitle-text {
    font-size: 0.85rem;
    color: #000;
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

/* MÉTRIQUES PRINCIPALES - Layout amélioré */
.main-metrics {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 28px;
}

.metric-row {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.metric-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.9);
}

.metric-content {
    display: flex;
    align-items: flex-start !important;
    gap: 24px;
}

.metric-icon-large {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.profit-icon-large {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.roi-icon-large {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.metric-icon-large::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.05));
    border-radius: 18px;
}

.metric-icon-large svg {
    width: 30px;
    height: 30px;
    stroke: white;
    fill: none;
    stroke-width: 2.5;
    z-index: 1;
}

.metric-data {
    flex: 1;
    min-width: 0;
    min-height: fit-content;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.metric-label-large {
    font-size: 0.9rem;
    font-weight: 600;
    color: #000 !important;
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value-large {
    font-size: 2.4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    margin: 0 0 6px 0;
    line-height: 1;
    letter-spacing: -0.02em;
}

.metric-extra {
    margin-top: 0;
    display: flex;
    justify-content: center;
    align-self: center;
    flex-shrink: 0;
    position: absolute;
    right: 80px;
    top: 40%;
    transform: translateY(-50%);
}

.roi-badge-new {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 0.8rem;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.1));
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(10px);
    margin-left: auto;
}

/* Badge ROI avec couleurs adaptatives */
.roi-badge-new.poor {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.15), rgba(192, 57, 43, 0.1));
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.2);
}

.roi-badge-new.toImprove {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.15), rgba(230, 126, 34, 0.1));
    color: #f39c12;
    border-color: rgba(243, 156, 18, 0.2);
}

.roi-badge-new.good {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15), rgba(39, 174, 96, 0.1));
    color: #2ecc71;
    border-color: rgba(46, 204, 113, 0.2);
}

.roi-badge-new.veryGood {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15), rgba(41, 128, 185, 0.1));
    color: #3498db;
    border-color: rgba(52, 152, 219, 0.2);
}

.roi-badge-new.excellent {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.15), rgba(34, 153, 84, 0.1));
    color: #27ae60;
    border-color: rgba(39, 174, 96, 0.2);
}

.roi-badge-new.exceptional {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.15), rgba(142, 68, 173, 0.1));
    color: #9b59b6;
    border-color: rgba(155, 89, 182, 0.2);
}

/* Statistiques secondaires - Layout horizontal amélioré */
.secondary-stats-redesigned {
    display: flex;
    gap: 18px;
    margin-bottom: 28px;
}

.stat-item-fluid {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 24px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    min-width: 0;
}

.stat-item-fluid:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(102, 126, 234, 0.15);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.stat-item-fluid:hover .stat-icon-circle {
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scale(1.1);
}

.stat-icon-circle svg {
    width: 22px;
    height: 22px;
    stroke: #667eea;
    fill: none;
    stroke-width: 2.5;
    transition: all 0.3s ease;
}

.stat-item-fluid:hover .stat-icon-circle svg {
    stroke: white;
}

.stat-content-fluid {
    flex: 1;
    min-width: 0;
}

.stat-value-fluid {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 4px 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-label-fluid {
    font-size: 0.8rem;
    color: #000 !important;
    margin: 0;
    font-weight: 500;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.chart-section-redesigned {
    border-top: 1px solid rgba(102, 126, 234, 0.15);
    padding-top: 32px;
}

.chart-header-redesigned {
    margin-bottom: 24px;
}

.chart-title-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
}

.chart-title-icon {
    width: 32px;
    height: 32px;
    stroke: #667eea;
    fill: none;
    stroke-width: 2.5;
    padding: 6px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.05));
}

.chart-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.chart-container-redesigned {
    height: 180px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(102, 126, 234, 0.12);
    position: relative;
    overflow: hidden;
    animation: chartFadeIn 0.8s ease-out;
}

.chart-container-redesigned::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(102, 126, 234, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.04) 0%, transparent 50%);
}

/* SECTION ACTIVITÉ RÉCENTE - Design moderne */
.recent-activity-section {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(25px) saturate(180%);
    border-radius: 24px;
    padding: 28px;
    margin-top: 24px;
    box-shadow: 
        0 12px 32px rgba(102, 126, 234, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.recent-activity-section:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 16px 40px rgba(102, 126, 234, 0.12),
        0 6px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.recent-activity-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.recent-activity-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
    position: relative;
    flex-shrink: 0;
}

.recent-activity-icon-wrapper::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    border-radius: 16px;
}

.recent-activity-icon-wrapper svg {
    width: 28px;
    height: 28px;
    stroke: white;
    fill: none;
    stroke-width: 2.5;
    z-index: 1;
}

.recent-activity-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.recent-activity-subtitle {
    font-size: 0.9rem;
    color: #000;
    margin: 0;
    font-weight: 500;
    line-height: 1.3;
}

.recent-activity-content {
    position: relative;
}

/* Dashboard grids */
.dashboard-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 12px; 
}

.dashboard-card { 
    background: white; 
    border-radius: 15px; 
    padding: 14px; 
    text-align: center; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); 
    border: 2px solid transparent; 
}

.dashboard-card.gains { 
    border-color: rgba(39, 174, 96, 0.3); 
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.05), rgba(46, 204, 113, 0.03)); 
}

.dashboard-card.gains .dashboard-value { 
    color: #27ae60; 
}

.dashboard-card.expenses { 
    border-color: rgba(231, 76, 60, 0.3); 
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.05), rgba(192, 57, 43, 0.03)); 
}

.dashboard-card.expenses .dashboard-value { 
    color: #e74c3c; 
}

.dashboard-value { 
    font-size: 1.1rem; 
    font-weight: 700; 
    color: #333; 
    margin-bottom: 4px; 
}

.dashboard-label { 
    font-size: 0.7rem; 
    color: #000; 
    font-weight: 500; 
    text-transform: uppercase; 
    letter-spacing: 0.3px; 
}

/* Stats cards */
.stat-card { 
    text-align: center; 
    position: relative; 
    overflow: hidden; 
    cursor: pointer; 
}

.stat-value { 
    font-size: 2rem; 
    font-weight: 800; 
    margin-bottom: 8px; 
    background: linear-gradient(135deg, #667eea, #764ba2); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    background-clip: text; 
}

.stat-label { 
    font-size: 0.85rem; 
    color: #000; 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}

.roi-indicator { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    padding: 4px 10px; 
    border-radius: 20px; 
    font-size: 0.75rem; 
    font-weight: 600; 
    margin-top: 8px; 
}

.roi-indicator.poor { 
    background: rgba(231, 76, 60, 0.1); 
    color: #e74c3c; 
}

.roi-indicator.toImprove { 
    background: rgba(243, 156, 18, 0.1); 
    color: #f39c12; 
}

.roi-indicator.good { 
    background: rgba(46, 204, 113, 0.1); 
    color: #2ecc71; 
}

.roi-indicator.veryGood { 
    background: rgba(52, 152, 219, 0.1); 
    color: #3498db; 
}

.roi-indicator.excellent { 
    background: rgba(39, 174, 96, 0.1); 
    color: #27ae60; 
}

.roi-indicator.exceptional { 
    background: rgba(155, 89, 182, 0.1); 
    color: #9b59b6; 
}

/* Boutons */
.action-btn { 
    width: 100%; 
    padding: 16px; 
    color: white; 
    font-size: 1rem; 
    background: linear-gradient(135deg, #667eea, #764ba2); 
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25); 
    margin-top: 8px; 
    border: none; 
    border-radius: 12px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    text-align: center; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
}

.action-btn:active { 
    transform: translateY(2px); 
}

.edit-btn, .delete-btn { 
    border: none; 
    padding: 10px 14px; 
    border-radius: 15px; 
    font-size: 0.8rem; 
    font-weight: 700; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    backdrop-filter: blur(10px); 
    border: 2px solid transparent; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    position: relative; 
    overflow: hidden; 
}

.edit-btn { 
    background: linear-gradient(135deg, #3b82f6, #1d4ed8); 
    color: white; 
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); 
}

.edit-btn:hover { 
    transform: translateY(-2px) scale(1.05); 
    border-color: rgba(255,255,255,0.3); 
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4); 
}

.delete-btn { 
    background: linear-gradient(135deg, #ef4444, #dc2626); 
    color: white; 
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3); 
}

.delete-btn:hover { 
    transform: translateY(-2px) scale(1.05); 
    border-color: rgba(255,255,255,0.3); 
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4); 
}

/* FAB */
.fab { 
    position: fixed !important; 
    right: 20px !important; 
    width: 64px; 
    height: 64px; 
    background: linear-gradient(135deg, #27ae60, #2ecc71); 
    border: none; 
    border-radius: 50%; 
    color: white; 
    font-size: 1.8rem; 
    font-weight: 700; 
    cursor: pointer; 
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4); 
    z-index: 1001 !important; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    bottom: calc(135px + env(safe-area-inset-bottom)) !important; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    border: 3px solid rgba(255, 255, 255, 0.2); 
}

.fab:hover { 
    transform: scale(1.1) rotate(90deg); 
    box-shadow: 0 12px 35px rgba(39, 174, 96, 0.5); 
}

.fab:active { 
    transform: scale(0.95); 
}

/* Modales */
.modal { 
    position: fixed !important; 
    top: 0 !important; 
    left: 0 !important; 
    right: 0 !important; 
    bottom: 0 !important; 
    z-index: 100000 !important; 
    background: rgba(0, 0, 0, 0.7) !important; 
    backdrop-filter: blur(10px) !important; 
    display: none !important; 
    align-items: center !important; 
    justify-content: center !important; 
    padding: 15px !important; 
    overflow-y: auto !important; 
    -webkit-overflow-scrolling: touch !important; 
}

.modal.show { 
    display: flex !important; 
    animation: modalFadeIn 0.3s ease-out !important; 
}

@keyframes modalFadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

@keyframes chartFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content { 
    background: white !important; 
    border-radius: 16px !important; 
    padding: 20px !important; 
    width: 100% !important; 
    max-width: 420px !important; 
    max-height: 95vh !important; 
    overflow-y: auto !important; 
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4) !important; 
    transform: scale(0.95) !important; 
    transition: all 0.3s ease !important; 
    position: relative !important; 
    z-index: 100001 !important; 
    margin: auto !important; 
}

.modal.show .modal-content { 
    transform: scale(1) !important; 
}

.modal-header { 
    display: flex !important; 
    justify-content: space-between !important; 
    align-items: center !important; 
    margin-bottom: 20px !important; 
    padding-bottom: 15px !important; 
    border-bottom: 2px solid #f0f2f5 !important; 
}

.modal-title { 
    font-size: 1.25rem !important; 
    font-weight: 700 !important; 
    color: #1a1a1a !important; 
    display: flex !important; 
    align-items: center !important; 
    gap: 8px !important; 
}

.close-btn { 
    background: #f8f9fa !important; 
    border: 2px solid #e9ecef !important; 
    border-radius: 50% !important; 
    width: 36px !important; 
    height: 36px !important; 
    cursor: pointer !important; 
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    font-size: 1.1rem !important; 
    color: #495057 !important; 
    transition: all 0.2s ease !important; 
    font-weight: bold !important; 
}

.close-btn:hover { 
    background: #e9ecef !important; 
    border-color: #dee2e6 !important; 
    color: #212529 !important; 
    transform: scale(1.05) !important; 
}

.close-btn:active { 
    transform: scale(0.95) !important; 
}

/* Formulaires modales */
.quick-type-selector { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    margin-bottom: 20px; 
}

.quick-type-btn { 
    padding: 16px; 
    border: 1px solid #e0e0e0; 
    background: white; 
    cursor: pointer; 
    font-weight: 600; 
    font-size: 0.9rem; 
    color: #000; 
    border-radius: 12px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
    transition: all 0.2s ease; 
    min-height: 60px; 
}

.quick-type-btn.active { 
    border-color: #27ae60; 
    color: #27ae60; 
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(46, 204, 113, 0.1)); 
}

.quick-type-btn.active.expense { 
    border-color: #e74c3c; 
    color: #e74c3c; 
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(192, 57, 43, 0.1)); 
}

.quick-form-row { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 16px; 
}

.quick-form-group { 
    flex: 1; 
}

.quick-form-input { 
    width: 100%; 
    padding: 12px 14px; 
    border: 1px solid #e0e0e0; 
    border-radius: 10px; 
    font-size: 0.9rem; 
    background: white; 
    color: #333; 
    transition: all 0.2s ease; 
    max-width: 100%; 
    box-sizing: border-box; 
}

.quick-form-input:focus { 
    outline: none; 
    border-color: #667eea; 
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1); 
}

.submit-btn { 
    width: 100%; 
    padding: 14px; 
    background: linear-gradient(135deg, #27ae60, #2ecc71); 
    color: white; 
    border: none; 
    border-radius: 12px; 
    font-size: 1rem; 
    font-weight: 700; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    margin-top: 8px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
}

.submit-btn:hover { 
    transform: translateY(-1px); 
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3); 
}

/* Barre de recherche */
.search-bar {
    background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(248,250,252,0.95));
    backdrop-filter: blur(25px) saturate(180%);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.06), 0 4px 8px rgba(0,0,0,0.03), inset 0 1px 0 rgba(255,255,255,0.7);
    border: 1px solid rgba(102, 126, 234, 0.08);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    opacity: 0.8;
}

.search-bar:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(102, 126, 234, 0.08), 0 6px 12px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.8);
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 14px;
    width: 20px;
    height: 20px;
    stroke: #667eea;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    z-index: 1;
    transition: all 0.3s ease;
}

.search-input:focus + .search-icon {
    stroke: #667eea;
    transform: scale(1.1);
}

.search-input {
    width: 100%;
    padding: 14px 110px 14px 50px;
    border: 2px solid rgba(102, 126, 234, 0.15);
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1f2937;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,250,252,0.9));
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    outline: none;
    min-width: 0;
}

.search-input:focus {
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(102, 126, 234, 0.15);
    background: linear-gradient(135deg, rgba(255,255,255,1), rgba(248,250,252,0.95));
}

.search-input::placeholder {
    color: #9ca3af;
    font-weight: 500;
}

.validate-search-btn {
    position: absolute;
    right: 54px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border: 2px solid rgba(39, 174, 96, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2);
}

.validate-search-btn:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-color: rgba(39, 174, 96, 0.5);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.validate-search-btn:active {
    transform: scale(0.95);
}

.validate-search-btn svg {
    width: 16px;
    height: 16px;
    stroke: white;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.clear-search-btn {
    position: absolute;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(107, 114, 128, 0.1);
    border: 2px solid rgba(107, 114, 128, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
}

.clear-search-btn:hover {
    background: rgba(107, 114, 128, 0.2);
    border-color: rgba(107, 114, 128, 0.3);
    transform: scale(1.05);
}

.clear-search-btn svg {
    width: 16px;
    height: 16px;
    stroke: #6b7280;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.search-info-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.search-info-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.search-info-btn svg {
    width: 20px;
    height: 20px;
    stroke: white;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Résumé de recherche */
.search-summary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1px 6px !important;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.summary-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.summary-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.summary-divider {
    width: 1px;
    height: 16px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.transaction-count {
    color: #667eea !important;
    font-size: 0.9rem;
    font-weight: 700;
}

.net-balance {
    color: #667eea !important;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Cards d'historique */
.simple-history-card {
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.simple-history-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    opacity: 0;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    transition: opacity 0.3s ease;
}

.simple-history-card:hover {
    transform: translateY(-3px) scale(1.015);
    box-shadow: 0 14px 28px rgba(0,0,0,0.11), 0 6px 14px rgba(0,0,0,0.07);
}

.simple-history-card:hover::before {
    opacity: 1;
}

.simple-history-card:active {
    transform: translateY(-1px) scale(1.005);
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.transaction-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.transaction-type-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.transaction-details {
    flex: 1;
    min-width: 0;
}

.prop-firm-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transaction-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.75rem;
    font-weight: 500;
}

.transaction-date {
    font-weight: 600;
}

.transaction-amount-simple {
    font-weight: 800;
    font-size: 1.05rem;
    white-space: nowrap;
    text-align: right;
    flex-shrink: 0;
    letter-spacing: -0.02em;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    padding: 16px;
}

.pagination-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.pagination-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.pagination-btn.disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pagination-info {
    background: rgba(102, 126, 234, 0.1);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #667eea;
}

/* Menu contextuel */
.context-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.context-menu-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.global-context-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: white;
    border-radius: 16px;
    padding: 16px;
    width: 280px;
    z-index: 99999 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(102, 126, 234, 0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.global-context-menu.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.context-menu-title {
    text-align: center;
    padding: 8px 16px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #667eea;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    border: 2px solid transparent;
}

.context-menu-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.05));
    color: #667eea;
    border-color: rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.context-menu-item.danger:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(220, 38, 38, 0.05));
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.15);
}

.context-menu-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

/* Timeline */
.timeline {
    position: relative;
    margin: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding-left: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(5px);
}

.timeline-marker {
    position: absolute;
    left: 12px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    border: 3px solid #667eea;
    z-index: 1;
}

.timeline-marker.urgent {
    border-color: #e74c3c;
    background: #e74c3c;
}

.timeline-content {
    background: white;
    border-radius: 12px;
    padding: 16px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #667eea;
}

.timeline-content.urgent {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.05), rgba(192, 57, 43, 0.02));
}

/* Sélecteur de langue */
.language-selector { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 16px 20px; 
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.08), rgba(142, 68, 173, 0.05)); 
    border-radius: 16px; 
    border: 2px solid rgba(155, 89, 182, 0.15); 
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.language-selector::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
}

.language-selector select { 
    background: transparent; 
    border: none; 
    font-size: 1rem; 
    font-weight: 700; 
    color: #9b59b6; 
    cursor: pointer; 
    outline: none; 
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.language-selector select:hover {
    background: rgba(155, 89, 182, 0.1);
}

.language-flag { 
    font-size: 1.8rem;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(155, 89, 182, 0.2);
    transition: all 0.3s ease;
}

.language-flag:hover {
    transform: scale(1.1);
    border-color: rgba(155, 89, 182, 0.4);
}

/* Ensure the home overview subtitle stays on a single line */
.card-header .card-subtitle[data-i18n="home.subtitle"] {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-hint {
    background: none;
    border: none;
    padding: 2px;
    margin-left: 6px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.info-hint:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.info-hint svg {
    color: #667eea;
    width: 14px;
    height: 14px;
}

.salary-period {
    font-size: 0.8rem;
    color: #000;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.salary-trend {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 700;
}

.chart-container {
    height: 200px;
    position: relative;
}

.salary-display {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
}

.salary-value {
    font-size: 1.2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.salary-info {
    text-align: right;
}

/* === Overrides cohérence page Accueil === */
.overview-master-card.enhanced-card::before {
	height: 4px;
	background: linear-gradient(135deg, #667eea, #764ba2);
	animation: none;
	border-radius: 20px 20px 0 0;
}

/* Icône d’en-tête de la vue d’ensemble alignée sur icon-container */
.overview-icon-wrapper.icon-container {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	box-shadow: none;
}

.overview-icon.icon {
	width: 24px;
	height: 24px;
	stroke-width: 2;
}

/* Titres de carte alignés avec les autres pages (légèrement plus grand pour l'overview) */
.overview-main-title.card-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #000;
	background: none;
	-webkit-text-fill-color: initial;
	margin-bottom: 4px;
}

.overview-subtitle-text.card-subtitle {
	font-size: 0.85rem;
	color: #000;
}

/* Mettre en valeur le Profit Total */
.metric-row.profit-row .metric-value-large {
	color: #27ae60;
}

/* Aérer un peu entre Profit Total et ROI */
.main-metrics {
	row-gap: 16px;
}

/* Étiquette pour le ROI */
.roi-label::after {
	content: " sur 30 jours";
	color: #555;
	font-size: 0.8rem;
	font-weight: 400;
	margin-left: 4px;
}

/* Styles pour les montants de profit selon leur valeur */
.profit-positive {
    color: #27ae60 !important;
}

.profit-negative {
    color: #e74c3c !important;
}

.profit-zero {
    color: #666 !important;
}