/**
 * MC Manager v135+ - Commercial Dashboard Styling
 *
 * Styles pour le dashboard mensuel commercial avec navigation mois/année,
 * KPIs synthétiques, comparaisons, et tableaux filtrés.
 */

/* ============================================================
 * COMMERCIAL DASHBOARD CONTAINER
 * ============================================================ */

.commercial-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0;
}

.commercial-dashboard .commercial-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ============================================================
 * MONTH SELECTOR / NAVIGATION
 * ============================================================ */

.month-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg3);
    border: 1px solid var(--border2);
    padding: 16px 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.month-nav-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 300px;
}

.month-nav-btn {
    width: 36px;
    height: 36px;
    background: var(--bg2);
    border: 1px solid var(--border2);
    color: var(--text2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.15s;
    flex-shrink: 0;
}

.month-nav-btn:hover {
    background: var(--bg4);
    color: var(--text);
    border-color: var(--border);
}

.month-nav-btn:active {
    transform: scale(0.95);
}

.month-display {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    min-width: 150px;
}

.month-select {
    background: var(--bg2);
    border: 1px solid var(--border2);
    color: var(--text);
    padding: 8px 12px;
    font-size: 13.5px;
    cursor: pointer;
    font-family: var(--font);
    transition: border-color 0.15s;
}

.month-select:hover {
    border-color: var(--border);
}

.month-select:focus {
    outline: none;
    border-color: var(--accent);
}

.month-today-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
    font-family: var(--font);
}

.month-today-btn:hover {
    background: var(--accent2);
}

.month-today-btn:active {
    transform: scale(0.95);
}

.badge-today {
    background: rgba(152, 202, 62, 0.2);
    color: #98ca3e;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: none;
    white-space: nowrap;
}

.badge-today.active {
    display: inline-block;
}

/* ============================================================
 * KPIs GRID
 * ============================================================ */

.kpis-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    width: 100%;
}

.kpi-card {
    background: var(--bg3);
    border: 1px solid var(--border2);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.15s;
    min-width: 0;
    overflow: hidden;
}

.kpi-card:hover {
    border-color: var(--border);
    background: var(--bg4);
}

.kpi-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--mono);
    flex: 1;
}

.kpi-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    color: var(--text3);
}

.kpi-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    word-break: break-word;
}

.kpi-value.status-green { color: #10b981; }
.kpi-value.status-red { color: #ef4444; }
.kpi-value.status-blue { color: #3b82f6; }

.kpi-detail {
    font-size: 12px;
    color: var(--text2);
    margin-top: 4px;
}

.kpi-compare {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text2);
    padding: 8px 0;
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 8px;
}

.kpi-compare.positive {
    color: #10b981;
}

.kpi-compare.positive::before {
    content: '↑';
    font-weight: 700;
    font-size: 14px;
}

.kpi-compare.negative {
    color: #ef4444;
}

.kpi-compare.negative::before {
    content: '↓';
    font-weight: 700;
    font-size: 14px;
}

.kpi-compare.neutral {
    color: var(--text3);
}

.kpi-compare.neutral::before {
    content: '→';
    font-weight: 700;
    font-size: 14px;
}

/* ============================================================
 * SECTION CARDS (QUOTES & INVOICES)
 * ============================================================ */

.commercial-section {
    background: var(--bg3);
    border: 1px solid var(--border2);
    padding: 0;
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border2);
    background: var(--bg4);
}

.section-icon {
    width: 28px;
    height: 28px;
    background: #98ca3e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    color: white;
}

.section-icon svg {
    stroke: white !important;
}

body.theme-light .section-icon {
    background: #98ca3e !important;
}

body.theme-light .section-icon svg {
    stroke: white !important;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--mono);
    flex: 1;
}

.section-count {
    font-size: 12px;
    color: var(--text2);
    background: var(--bg3);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
}

/* ============================================================
 * TABLES (QUOTES & INVOICES)
 * ============================================================ */

.commercial-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.commercial-table thead {
    background: var(--bg4);
    border-bottom: 1px solid var(--border2);
}

.commercial-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
    font-family: var(--mono);
}

.commercial-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border2);
    color: var(--text);
}

.commercial-table tbody tr:hover {
    background: var(--bg4);
}

.commercial-table tbody tr:last-child td {
    border-bottom: none;
}

.table-ref {
    font-family: var(--mono);
    font-weight: 600;
    color: var(--accent);
    font-size: 12px;
}

.table-client {
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-amount {
    font-weight: 600;
    color: var(--text);
    text-align: right;
    min-width: 120px;
}

.table-date {
    color: var(--text2);
    font-size: 12px;
    white-space: nowrap;
}

.table-age {
    color: var(--text3);
    font-size: 12px;
    text-align: right;
    min-width: 60px;
}

/* ============================================================
 * BADGES (STATUS INDICATORS)
 * ============================================================ */

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--mono);
    white-space: nowrap;
}

.badge-green {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.badge-red {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.badge-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.badge-amber {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.badge-gray {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text2);
}

/* ============================================================
 * EMPTY STATE
 * ============================================================ */

.commercial-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text2);
    text-align: center;
    background: var(--bg3);
    border: 1px solid var(--border2);
    min-height: 200px;
}

.commercial-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.commercial-empty-text {
    font-size: 14px;
    font-weight: 500;
}

/* ============================================================
 * STATUS FILTER TABS
 * ============================================================ */

.status-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border2);
    background: var(--bg3);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.status-tabs::-webkit-scrollbar {
    display: none;
}

.status-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    font-family: var(--font);
    border-radius: 4px;
}

.status-tab:hover {
    color: var(--text);
    background: var(--bg4);
}

.status-tab.active {
    color: var(--text);
    background: var(--bg2);
    border-color: var(--border2);
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--mono);
    background: var(--bg4);
    color: var(--text3);
    border-radius: 9px;
}

.status-tab.active .tab-count {
    background: var(--accent);
    color: white;
}

/* ============================================================
 * PAGINATION
 * ============================================================ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 20px;
    border-top: 1px solid var(--border2);
    background: var(--bg3);
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    background: transparent;
    border: 1px solid var(--border2);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--mono);
    border-radius: 4px;
}

.page-btn:hover:not(.active):not(.disabled) {
    background: var(--bg4);
    color: var(--text);
    border-color: var(--border);
}

.page-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.page-btn.disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 12px;
    color: var(--text3);
    font-family: var(--mono);
}

.page-info {
    font-size: 12px;
    color: var(--text3);
    margin: 0 8px;
    font-family: var(--mono);
}

/* ============================================================
 * LOADING STATE
 * ============================================================ */

.commercial-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text2);
}

.commercial-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--border2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 12px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================================
 * RESPONSIVE DESIGN
 * ============================================================ */

@media (max-width: 1200px) {
    .kpis-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .month-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .month-nav-controls {
        width: 100%;
        min-width: auto;
    }

    .month-display {
        width: 100%;
    }

    .commercial-table {
        font-size: 12px;
    }

    .commercial-table th,
    .commercial-table td {
        padding: 10px 12px;
    }

    .table-client {
        max-width: 120px;
    }

    .kpis-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kpi-value {
        font-size: 24px;
    }

    .table-amount {
        min-width: 100px;
    }

    .table-age {
        min-width: 50px;
    }

    .status-tabs {
        padding: 8px 12px;
        gap: 2px;
    }

    .status-tab {
        padding: 5px 10px;
        font-size: 11px;
    }

    .pagination {
        padding: 10px 12px;
        gap: 2px;
    }

    .page-btn {
        min-width: 28px;
        height: 28px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .month-selector {
        padding: 12px 16px;
    }

    .month-nav-btn {
        width: 32px;
        height: 32px;
    }

    .kpi-card {
        padding: 16px;
    }

    .kpi-value {
        font-size: 20px;
    }

    .commercial-table {
        font-size: 11px;
    }

    .commercial-table th,
    .commercial-table td {
        padding: 8px 10px;
    }

    .section-header {
        padding: 12px 16px;
    }

    .badge {
        font-size: 10px;
        padding: 3px 6px;
    }

    .kpis-grid {
        grid-template-columns: 1fr;
    }

    .status-tabs {
        padding: 6px 10px;
        gap: 2px;
    }

    .status-tab {
        padding: 4px 8px;
        font-size: 10px;
    }

    .tab-count {
        font-size: 9px;
        min-width: 16px;
        height: 15px;
    }

    .pagination {
        padding: 8px 10px;
        flex-wrap: wrap;
    }

    .page-btn {
        min-width: 26px;
        height: 26px;
        font-size: 10px;
    }
}

/* ============================================================
 * LIGHT THEME OVERRIDES
 * ============================================================ */

body.theme-light .commercial-dashboard {
    /* Inherits from root */
}

body.theme-light .kpi-card {
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
}

body.theme-light .commercial-section {
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

body.theme-light .month-select,
body.theme-light .month-nav-btn {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.13);
}

body.theme-light .month-select:hover,
body.theme-light .month-nav-btn:hover {
    border-color: rgba(0, 0, 0, 0.2);
    background: #f9fafb;
}

body.theme-light .status-tab.active {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.13);
}

body.theme-light .page-btn {
    border-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .page-btn:hover:not(.active):not(.disabled) {
    background: #f3f4f6;
    border-color: rgba(0, 0, 0, 0.15);
}

/* ============================================================
 * v141 : tableaux Devis / Factures lisibles sur mobile
 * La regle globale mobile (styles.css : "table{width:100%!important}" et
 * "td{word-break:break-word}") ecrasait les 6 colonnes dans 390 px : la
 * reference s'affichait lettre par lettre (D-E-V-0-0...). Le tableau garde
 * maintenant une largeur lisible et defile horizontalement dans son
 * conteneur (deja en overflow-x:auto).
 * ============================================================ */
@media (max-width: 768px) {
    .commercial-table {
        width: auto !important;
        min-width: 560px !important;
    }
    .commercial-table th,
    .commercial-table td {
        white-space: nowrap;
        word-break: normal;
    }
}

/* ============================================================
 * v142 : bloc ARGENT (Facturé / Encaissé / En attente) + fenêtres de détail
 * ============================================================ */
.money-block {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}
.money-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.money-title { font-weight: 700; font-size: 15px; color: var(--text); }
.money-help { font-size: 11px; color: var(--text3); }
.money-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
/* v144 : tuiles « Argent » colorées (plus de simple bordure gauche) — fond teinté dans la couleur de la tuile */
.money-tile {
    --tile: var(--accent);
    --tile-rgb: 148, 163, 184;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    background: linear-gradient(180deg, rgba(var(--tile-rgb), 0.22) 0%, rgba(var(--tile-rgb), 0.10) 100%);
    border: 1px solid rgba(var(--tile-rgb), 0.45);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
    min-width: 0;
    transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.money-tile:hover {
    background: linear-gradient(180deg, rgba(var(--tile-rgb), 0.30) 0%, rgba(var(--tile-rgb), 0.16) 100%);
    border-color: rgba(var(--tile-rgb), 0.70);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(var(--tile-rgb), 0.18);
}
.money-tile:focus-visible { outline: 2px solid var(--tile); outline-offset: 2px; }
.money-facture  { --tile: #3b82f6; --tile-rgb: 59, 130, 246; }
.money-encaisse { --tile: #10b981; --tile-rgb: 16, 185, 129; }
.money-attente  { --tile: #f59e0b; --tile-rgb: 245, 158, 11; }
.money-tile-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.money-label {
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--tile); font-family: var(--mono);
}
.money-more { font-size: 11px; color: var(--text3); white-space: nowrap; }
.money-value { font-size: 22px; font-weight: 800; line-height: 1.15; color: var(--text); word-break: break-word; }
.money-sub { font-size: 12px; color: var(--text2); }
.money-note { font-size: 11px; color: var(--text3); line-height: 1.35; }
.money-note.warn { color: #f59e0b; }
.money-tile .kpi-compare { margin-top: 2px; padding: 6px 0 0; }
.money-legend {
    display: flex; flex-wrap: wrap; gap: 4px 18px;
    margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border);
    font-size: 11px; color: var(--text3); line-height: 1.4;
}
.money-legend b { color: var(--text2); }
.kpis-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Fenêtres de détail (liste lisible aussi sur téléphone : lignes, pas de tableau) */
.ledger { display: flex; flex-direction: column; gap: 14px; }
.ledger-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ledger-stat { background: var(--bg3); border: 1px solid var(--border2); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.ledger-stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text3); }
.ledger-stat-value { font-size: 15px; font-weight: 800; margin-top: 3px; word-break: break-word; color: var(--text); }
.ledger-stat.is-in .ledger-stat-value { color: #10b981; }
.ledger-stat.is-wait .ledger-stat-value { color: #f59e0b; }
.ledger-note { font-size: 12px; color: var(--text2); line-height: 1.45; background: var(--bg3); border-radius: 8px; padding: 8px 10px; }
.ledger-note b { color: var(--text); }
.ledger-section-head {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    font-weight: 700; font-size: 13px; padding-bottom: 6px; border-bottom: 2px solid var(--border2); margin-bottom: 2px;
}
.ledger-section-total { font-family: var(--mono); white-space: nowrap; }
.ledger-section .ledger-note { margin: 8px 0 2px; }
.ledger-row {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
    padding: 10px 6px; border-bottom: 1px solid var(--border); cursor: pointer; border-radius: 6px;
}
.ledger-row:hover { background: var(--bg3); }
.ledger-row.is-late .ledger-amount { color: #ef4444; }
.ledger-main { min-width: 0; flex: 1; }
.ledger-title { font-size: 13px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.ledger-ref { font-family: var(--mono); color: var(--text2); }
.ledger-sub { font-size: 11px; color: var(--text3); margin-top: 2px; line-height: 1.5; }
.ledger-nums { text-align: right; flex-shrink: 0; max-width: 46%; }
.ledger-amount { font-family: var(--mono); font-weight: 800; font-size: 14px; white-space: nowrap; color: var(--text); }
.ledger-amount.is-in { color: #10b981; }
.ledger-amount.is-pending { color: #f59e0b; }
.ledger-empty { font-size: 12px; color: var(--text3); text-align: center; padding: 16px 0; }
.ledger .badge { font-size: 10px; padding: 2px 6px; }

@media (max-width: 768px) {
    .money-grid { grid-template-columns: 1fr; gap: 10px; }
    .money-value { font-size: 20px; }
    .money-help { display: none; }
    .kpis-grid--3 { grid-template-columns: 1fr; }
    .ledger-stats { grid-template-columns: 1fr; }
    .ledger-stat { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
    .ledger-stat-value { margin-top: 0; text-align: right; }
    .ledger-nums { max-width: 50%; }
}

/* v143 : carte "Ma commission" — CA réalisé / commission acquise / versements reçus */
.comm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.comm-stat { min-width: 0; }
.comm-stat-label { font-size: 10px; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.3px; }
.comm-stat-value { font-size: 22px; font-weight: 800; font-family: var(--mono); word-break: break-word; }
.comm-stat-sub { font-size: 11px; opacity: 0.85; margin-top: 2px; line-height: 1.35; }
.comm-badge {
    display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.5px;
    padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,0.2); white-space: nowrap;
}
.comm-lines {
    display: flex; flex-direction: column; gap: 6px;
    border-top: 1px solid rgba(255,255,255,0.15); margin-top: 14px; padding-top: 10px;
    font-size: 12px; line-height: 1.45; opacity: 0.95;
}
@media (max-width: 768px) {
    .comm-stats { grid-template-columns: 1fr; gap: 12px; }
    .comm-stat-value { font-size: 20px; }
}

/* Fenêtres de détail : repli "Comment lire ces chiffres ?" / barème */
.ledger-help summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--text2); padding: 4px 0; }
.ledger-help[open] summary { margin-bottom: 6px; }

/* v143 : restes à encaisser (factures déjà validées par un premier paiement) — barre d'avancement + relance */
.followup-bar { height: 6px; border-radius: 999px; background: var(--bg3); overflow: hidden; margin: 6px 0 4px; }
.followup-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #10b981, #34d399); }
.followup-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.followup-btn {
    padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg3);
    color: var(--text); font-size: 12px; font-weight: 700; cursor: pointer; line-height: 1.2;
}
.followup-btn--call { background: rgba(37, 211, 102, 0.14); border-color: rgba(37, 211, 102, 0.5); color: #22c55e; }
.followup-nophone { font-size: 11px; color: var(--text3); align-self: center; }
.followup-row .ledger-main { min-width: 0; }

/* encart des pages (accueil + Mon Analytique) — v144 : fond teinté orange (plus de simple bordure gauche) */
.followup-card {
    --tile-rgb: 245, 158, 11;
    background: linear-gradient(180deg, rgba(var(--tile-rgb), 0.18) 0%, rgba(var(--tile-rgb), 0.07) 100%);
    border: 1px solid rgba(var(--tile-rgb), 0.45);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.followup-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.followup-title { font-weight: 700; font-size: 13px; }
.followup-total { font-family: var(--mono); font-weight: 800; font-size: 15px; color: #f59e0b; white-space: nowrap; }
.followup-sub { font-size: 11px; color: var(--text3); margin: 2px 0 10px; line-height: 1.4; }
.followup-mini { padding: 8px 0; border-top: 1px solid var(--border); }
.followup-mini-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.followup-mini-top > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.followup-mini-top > span:last-child { font-family: var(--mono); font-weight: 700; color: #f59e0b; white-space: nowrap; }
.followup-mini-sub { font-size: 10px; color: var(--text3); }
.followup-card .followup-btn { margin-top: 8px; }
