/* Couleurs montants */
.amount-credit { color: #2ecc71; }
.amount-debit  { color: #e74c3c; }

/* Badges catégories — couleurs */
.badge {
    display: inline-block;
    padding: 0.2em 0.55em;
    font-size: 0.78em;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.cat-Alimentation   { background:#d4f1d4; color:#1a6b1a; }
.cat-Restaurants    { background:#ffe8cc; color:#b85c00; }
.cat-Transport      { background:#cce5ff; color:#004085; }
.cat-Logement       { background:#e2d9f3; color:#4b2d8f; }
.cat-Loisirs        { background:#fff3cd; color:#856404; }
.cat-Sante          { background:#ffd6d6; color:#8b0000; }
.cat-Abonnements    { background:#d0f0ea; color:#0d6e5a; }
.cat-Shopping       { background:#fce4ec; color:#880e4f; }
.cat-Salaire        { background:#c8f7c5; color:#145214; }
.cat-Epargne        { background:#b2dfdb; color:#00413b; }
.cat-Virements      { background:#e0e0e0; color:#333; }
.cat-ImpotsTaxes    { background:#ffccbc; color:#7c2800; }
.cat-Assurance      { background:#dce1ff; color:#2536b0; }
.cat-BanqueFrais    { background:#f0f0f0; color:#555; }
.cat-Divers         { background:#eeeeee; color:#444; }

/* Badge éditable */
.badge-edit-wrap { position: relative; display: inline-block; }
.badge-edit-wrap select {
    position: absolute;
    top: 0; left: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    font-size: 0.78em;
}

/* Flash messages */
.flash { padding:0.75rem 1rem; margin-bottom:1rem; border-radius:4px; }
.flash-success { background:#d4edda; color:#155724; border:1px solid #c3e6cb; }
.flash-error   { background:#f8d7da; color:#721c24; border:1px solid #f5c6cb; }
.flash-warning { background:#fff3cd; color:#856404; border:1px solid #ffeeba; }

/* Graphiques */
canvas { max-height: 300px; }

/* Table scroll */
.overflow-auto { overflow-x: auto; }

/* Cartes résumé */
article h2 { margin-bottom:0; font-size:1.8rem; }

/* Tri colonnes */
.sortable:hover { background: rgba(0,0,0,0.04); }
