/* Hub Relances clients — page comptes, historique et modals (style Jupiter) */

body:has(.rl-hub-page) .container,
body:has(.rl-hub-page) #content,
body:has(.rl-hub-page).has-navbar > .content,
body:has(.rl-hub-page)[data-navbar="side"].minimized #content,
body:has(.rl-hub-page)[data-navbar="side"].has-navbar > .content {
    max-width: none !important;
    width: 100%;
}

.rl-hub-page,
.rl-modal {
    --rl-brand: #1d4ed8;
    --rl-brand-dark: #1e3a8a;
    --rl-brand-soft: #eff4ff;
    --rl-bg: #f5f7fb;
    --rl-surface: #ffffff;
    --rl-border: #e3e8ef;
    --rl-text: #1a2235;
    --rl-muted: #6b7689;
    --rl-muted2: #9aa3b2;
    --rl-ok: #15803d;
    --rl-ok-bg: #e7f6ec;
    --rl-warn: #b45309;
    --rl-warn-bg: #fef3e2;
    --rl-danger: #b91c1c;
    --rl-danger-bg: #fdeaea;
    --rl-info: #1d4ed8;
    --rl-info-bg: #e8eefe;
    --rl-neutral: #475467;
    --rl-neutral-bg: #eef1f6;
    --rl-violet: #6d28d9;
    --rl-violet-bg: #f3efff;
    --rl-radius: 11px;
    --rl-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}

.rl-hub-page {
    margin: -10px -14px 0;
}

.rl-hub {
    background: var(--rl-bg);
    color: var(--rl-text);
    font-size: 14px;
    line-height: 1.45;
    padding: 18px;
    min-height: calc(100vh - 120px);
}

.rl-hub input,
.rl-hub select,
.rl-modal input,
.rl-modal select,
.rl-modal textarea {
    font-family: inherit;
    color: var(--rl-text);
}

/* ---------- En-tête ---------- */
.rl-header {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.rl-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1d4ed8, #6d28d9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    box-shadow: var(--rl-shadow);
}

.rl-crumb {
    font-size: 12px;
    color: var(--rl-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.rl-title {
    font-size: 21px;
    font-weight: 700;
    color: var(--rl-brand-dark);
    line-height: 1.2;
}

.rl-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--rl-brand-soft);
    color: var(--rl-brand-dark);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
}

.rl-spacer {
    flex: 1;
}

/* ---------- Boutons ---------- */
.rl-hub-page .rl-btn,
.rl-modal .rl-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 9px;
    font-weight: 600;
    font-size: 13px;
    background: var(--rl-surface);
    border: 1px solid var(--rl-border);
    color: var(--rl-text);
    transition: .15s;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
}

.rl-hub-page .rl-btn:hover,
.rl-modal .rl-btn:hover {
    background: #f7f9fc;
    border-color: #cdd5e1;
    text-decoration: none;
    color: var(--rl-text);
}

.rl-hub-page .rl-btn-primary {
    background: var(--rl-brand);
    border-color: var(--rl-brand);
    color: #fff;
}

.rl-hub-page .rl-btn-primary:hover {
    background: var(--rl-brand-dark);
    color: #fff;
}

.rl-hub-page .rl-btn[disabled] {
    opacity: .45;
    cursor: not-allowed;
}

.rl-hub-page .rl-btn-sm {
    padding: 5px 10px;
    font-size: 12.5px;
}

.rl-hub-page .rl-btn-count {
    background: rgba(255, 255, 255, .25);
    border-radius: 10px;
    padding: 0 7px;
    font-size: 11.5px;
}

.rl-hub-page .rl-btn-bell {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}

.rl-hub-page .rl-btn-bell:hover {
    background: #ffedd5;
    color: #9a3412;
}

.rl-hub-page .rl-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--rl-border);
    background: #fff;
    color: var(--rl-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .15s;
}

.rl-hub-page .rl-icon-btn:hover {
    color: var(--rl-brand);
    border-color: #c7d2fe;
    background: var(--rl-brand-soft);
}

/* ---------- Badges ---------- */
.rl-hub-page .rl-badge,
.rl-modal .rl-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.rl-badge .pt {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.rl-hub-page .b-ok, .rl-modal .b-ok { color: var(--rl-ok); background: var(--rl-ok-bg); }
.rl-hub-page .b-warn, .rl-modal .b-warn { color: var(--rl-warn); background: var(--rl-warn-bg); }
.rl-hub-page .b-danger, .rl-modal .b-danger { color: var(--rl-danger); background: var(--rl-danger-bg); }
.rl-hub-page .b-info, .rl-modal .b-info { color: var(--rl-info); background: var(--rl-info-bg); }
.rl-hub-page .b-neutral, .rl-modal .b-neutral { color: var(--rl-neutral); background: var(--rl-neutral-bg); }
.rl-hub-page .b-violet, .rl-modal .b-violet { color: var(--rl-violet); background: var(--rl-violet-bg); }

/* ---------- KPI ---------- */
.rl-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.rl-kpi {
    background: var(--rl-surface);
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    box-shadow: var(--rl-shadow);
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    cursor: default;
    transition: .15s;
}

.rl-kpi.is-clickable {
    cursor: pointer;
}

.rl-kpi.is-clickable:hover,
.rl-kpi.is-active {
    border-color: #c7d2fe;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .08);
}

.rl-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.rl-kpi-label {
    font-size: 12px;
    color: var(--rl-muted);
    font-weight: 600;
}

.rl-kpi-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.rl-kpi-sub {
    font-size: 11.5px;
    color: var(--rl-muted2);
}

/* ---------- Bandeau impayés antérieurs ---------- */
.rl-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--rl-warn-bg);
    border: 1px solid #fcd9a5;
    color: #7c3d06;
    border-radius: var(--rl-radius);
    padding: 11px 14px;
    margin-bottom: 14px;
    font-size: 13px;
}

.rl-banner .fas {
    font-size: 16px;
}

/* ---------- Filtres ---------- */
.rl-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    background: var(--rl-surface);
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    box-shadow: var(--rl-shadow);
    padding: 10px 14px;
    margin-bottom: 16px;
}

.rl-filter-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--rl-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.rl-chips-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rl-chip {
    border: 1px solid var(--rl-border);
    background: #fff;
    color: var(--rl-neutral);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: .15s;
    white-space: nowrap;
}

.rl-chip:hover {
    border-color: #c7d2fe;
    color: var(--rl-brand);
}

.rl-chip.is-active {
    background: var(--rl-brand);
    border-color: var(--rl-brand);
    color: #fff;
}

.rl-chip .rl-chip-count {
    opacity: .75;
    margin-left: 4px;
    font-weight: 500;
}

.rl-period {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rl-period input,
.rl-search input,
.rl-hub .rl-select {
    height: 34px;
    border: 1px solid var(--rl-border);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 13px;
    background: #fff;
}

.rl-search {
    position: relative;
    margin-left: auto;
}

.rl-search .fa-search {
    position: absolute;
    left: 11px;
    top: 10px;
    color: var(--rl-muted2);
    font-size: 13px;
}

.rl-search input {
    padding-left: 32px;
    width: 240px;
}

/* ---------- Cartes entité ---------- */
.rl-card {
    background: var(--rl-surface);
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    box-shadow: var(--rl-shadow);
    margin-bottom: 16px;
    overflow: hidden;
}

.rl-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--rl-border);
    background: linear-gradient(180deg, #fbfcfe, #f5f7fb);
}

.rl-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--rl-brand-dark);
}

.rl-card-meta {
    margin-left: auto;
    display: flex;
    gap: 16px;
    font-size: 12.5px;
    color: var(--rl-muted);
}

.rl-card-meta b {
    color: var(--rl-text);
}

.rl-card-meta .rl-danger b {
    color: var(--rl-danger);
}

/* ---------- Tableau ---------- */
.rl-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.rl-table > thead > tr > th {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--rl-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 9px 12px;
    border-bottom: 1px solid var(--rl-border);
    background: #fafbfd;
    white-space: nowrap;
}

.rl-table > tbody > tr > td {
    padding: 12px;
    border-bottom: 1px solid #eef1f6;
    vertical-align: middle;
    font-size: 13px;
}

.rl-table > tbody > tr.rl-row:hover > td {
    background: #f8faff;
}

.rl-table > tbody > tr.rl-row.is-selected > td {
    background: #eef3ff;
}

.rl-table .rl-num {
    text-align: right;
    white-space: nowrap;
}

.rl-table .col-check {
    width: 38px;
    text-align: center;
}

.rl-table .col-actions {
    width: 150px;
    text-align: right;
    white-space: nowrap;
}

.rl-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--rl-brand);
}

.rl-client {
    display: flex;
    align-items: center;
    gap: 11px;
}

.rl-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rl-client-name {
    font-weight: 700;
    color: var(--rl-text);
}

.rl-client-name:hover {
    color: var(--rl-brand);
}

.rl-client-sub {
    font-size: 12px;
    color: var(--rl-muted);
    max-width: 330px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rl-client-sub.is-warn {
    color: var(--rl-warn);
}

.rl-client-sub.is-danger {
    color: var(--rl-danger);
    font-weight: 600;
}

.rl-counters {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.rl-amount {
    font-size: 15px;
    font-weight: 700;
}

.rl-amount-sub {
    font-size: 12px;
    color: var(--rl-danger);
    font-weight: 600;
}

.rl-last {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: flex-start;
}

.rl-last-date {
    font-size: 12px;
    color: var(--rl-muted);
}

.rl-note {
    font-size: 12px;
    color: var(--rl-neutral);
    background: #fffbea;
    border: 1px solid #f6e7a6;
    border-radius: 7px;
    padding: 3px 8px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rl-docs {
    display: flex;
    gap: 6px;
}

.rl-doc {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--rl-border);
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--rl-neutral);
    background: #fff;
    white-space: nowrap;
    text-decoration: none;
}

.rl-doc .fa-file-pdf {
    color: #dc2626;
}

.rl-doc:hover {
    border-color: #fecaca;
    background: #fff5f5;
    color: var(--rl-danger);
    text-decoration: none;
}

.rl-toggle-invoices {
    cursor: pointer;
    color: var(--rl-muted);
    transition: transform .15s;
    display: inline-block;
}

.rl-row.is-open .rl-toggle-invoices {
    transform: rotate(90deg);
    color: var(--rl-brand);
}

/* ---------- Détail factures ---------- */
.rl-detail > td {
    background: #f8fafd !important;
    padding: 0 12px 12px 62px !important;
}

.rl-subtable {
    width: 100%;
    background: #fff;
    border: 1px solid var(--rl-border);
    border-radius: 9px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
}

.rl-subtable th {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--rl-muted);
    padding: 7px 10px;
    background: #fafbfd;
    border-bottom: 1px solid var(--rl-border);
}

.rl-subtable td {
    padding: 7px 10px;
    font-size: 12.5px;
    border-bottom: 1px solid #f1f3f7;
}

.rl-subtable tr:last-child td {
    border-bottom: 0;
}

.rl-subtable tr.is-overdue td {
    background: #fff7f7;
}

/* ---------- États vides / chargement ---------- */
.rl-empty,
.rl-loading {
    text-align: center;
    color: var(--rl-muted);
    padding: 50px 20px;
}

.rl-empty .fas {
    font-size: 34px;
    color: #c7d2fe;
    display: block;
    margin-bottom: 10px;
}

/* ---------- Pagination historique ---------- */
.rl-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 12.5px;
    color: var(--rl-muted);
}

/* ================= MODALS ================= */
.rl-modal .modal-content {
    border-radius: 14px;
    overflow: hidden;
    border: 0;
}

.rl-modal .modal-header {
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8 60%, #6d28d9);
    color: #fff;
    border-bottom: 0;
}

.rl-modal .modal-header .modal-title,
.rl-modal .modal-header a,
.rl-modal .modal-header .close {
    color: #fff;
}

.rl-modal .modal-body {
    background: var(--rl-bg);
    color: var(--rl-text);
}

.rl-modal .modal-footer {
    background: #fff;
    border-top: 1px solid var(--rl-border);
}

.rl-m-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.rl-m-stat {
    background: #fff;
    border: 1px solid var(--rl-border);
    border-radius: 10px;
    padding: 10px 14px;
}

.rl-m-stat-label {
    font-size: 11.5px;
    color: var(--rl-muted);
    font-weight: 600;
}

.rl-m-stat-value {
    font-size: 18px;
    font-weight: 700;
}

.rl-m-section {
    background: #fff;
    border: 1px solid var(--rl-border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.rl-m-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--rl-brand-dark);
}

.rl-m-step {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--rl-brand-soft);
    color: var(--rl-brand);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rl-types {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.rl-type {
    border: 2px solid var(--rl-border);
    border-radius: 11px;
    padding: 12px;
    cursor: pointer;
    transition: .15s;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fff;
}

.rl-type:hover {
    border-color: #c7d2fe;
}

.rl-type.is-active {
    border-color: var(--rl-brand);
    background: var(--rl-brand-soft);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .1);
}

.rl-type-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rl-type-name {
    font-weight: 700;
    font-size: 13.5px;
}

.rl-type-desc {
    font-size: 11.5px;
    color: var(--rl-muted);
    line-height: 1.35;
}

.rl-type-suggest {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--rl-ok);
    text-transform: uppercase;
}

.rl-m-clients {
    max-height: 190px;
    overflow: auto;
}

.rl-m-client {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f7;
}

.rl-m-client:last-child {
    border-bottom: 0;
}

.rl-m-client .rl-avatar {
    width: 30px;
    height: 30px;
    font-size: 11.5px;
    border-radius: 8px;
}

.rl-m-client-name {
    font-weight: 700;
    font-size: 13px;
}

.rl-m-client-mails {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 3px;
}

.rl-m-client-amount {
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
    font-size: 12.5px;
}

.rl-mail-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--rl-info-bg);
    color: var(--rl-brand-dark);
    border-radius: 14px;
    padding: 2px 9px;
    font-size: 11.5px;
    font-weight: 600;
}

.rl-mail-chip.is-fallback {
    background: var(--rl-warn-bg);
    color: var(--rl-warn);
}

.rl-mail-chip .rl-chip-remove {
    cursor: pointer;
    opacity: .6;
}

.rl-mail-chip .rl-chip-remove:hover {
    opacity: 1;
}

.rl-chips-input {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--rl-border);
    border-radius: 9px;
    padding: 5px 8px;
    min-height: 38px;
    background: #fff;
    cursor: text;
}

.rl-chips-input:focus-within {
    border-color: #93a8f4;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .1);
}

.rl-chips-input input {
    border: 0;
    outline: 0;
    flex: 1;
    min-width: 200px;
    font-size: 13px;
    padding: 3px 2px;
}

.rl-switch-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid #f1f3f7;
}

.rl-switch-row:last-child {
    border-bottom: 0;
}

.rl-switch-body {
    flex: 1;
}

.rl-switch-label {
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.rl-switch-hint {
    font-size: 11.5px;
    color: var(--rl-muted);
}

.rl-switch {
    position: relative;
    width: 38px;
    height: 22px;
    flex-shrink: 0;
    margin: 0;
}

.rl-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.rl-switch .rl-track {
    position: absolute;
    inset: 0;
    background: #d0d5dd;
    border-radius: 22px;
    transition: .15s;
    cursor: pointer;
}

.rl-switch .rl-track::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: .15s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.rl-switch input:checked + .rl-track {
    background: var(--rl-brand);
}

.rl-switch input:checked + .rl-track::after {
    transform: translateX(16px);
}

.rl-field {
    margin-bottom: 12px;
}

.rl-field:last-child {
    margin-bottom: 0;
}

.rl-field-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--rl-muted);
    margin-bottom: 5px;
}

.rl-field-label .req {
    color: var(--rl-danger);
}

.rl-modal .rl-input,
.rl-modal .rl-textarea,
.rl-modal .rl-select {
    width: 100%;
    border: 1px solid var(--rl-border);
    border-radius: 9px;
    padding: 8px 10px;
    font-size: 13px;
    background: #fff;
}

.rl-modal .rl-input:focus,
.rl-modal .rl-textarea:focus,
.rl-modal .rl-select:focus {
    outline: 0;
    border-color: #93a8f4;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .1);
}

.rl-modal .rl-textarea {
    min-height: 260px;
    line-height: 1.5;
    resize: vertical;
}

.rl-segmented {
    display: inline-flex;
    flex-wrap: wrap;
    background: var(--rl-neutral-bg);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.rl-segmented button {
    border: 0;
    background: transparent;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--rl-neutral);
    cursor: pointer;
}

.rl-segmented button.is-active {
    background: #fff;
    color: var(--rl-brand);
    box-shadow: var(--rl-shadow);
}

.rl-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
}

.rl-placeholders {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    align-items: center;
    font-size: 11.5px;
    color: var(--rl-muted);
}

.rl-placeholders button {
    border: 1px dashed #a5b4fc;
    background: var(--rl-brand-soft);
    color: var(--rl-brand);
    border-radius: 7px;
    padding: 2px 8px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
}

.rl-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rl-result {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--rl-border);
    border-left: 4px solid var(--rl-ok);
    border-radius: 10px;
    padding: 10px 14px;
}

.rl-result.is-error {
    border-left-color: var(--rl-danger);
}

.rl-result-icon {
    font-size: 18px;
    color: var(--rl-ok);
}

.rl-result.is-error .rl-result-icon {
    color: var(--rl-danger);
}

.rl-result-msg {
    font-size: 12.5px;
    color: var(--rl-muted);
}

/* Timeline historique client */
.rl-timeline {
    position: relative;
    padding-left: 22px;
}

.rl-timeline::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--rl-border);
}

.rl-tl-item {
    position: relative;
    background: #fff;
    border: 1px solid var(--rl-border);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 10px;
}

.rl-tl-item::before {
    content: "";
    position: absolute;
    left: -19px;
    top: 14px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--rl-brand);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--rl-border);
}

.rl-tl-item.t-note::before { background: #eab308; }
.rl-tl-item.t-r2::before { background: var(--rl-danger); }
.rl-tl-item.t-r1::before { background: #f59e0b; }
.rl-tl-item.is-failed::before { background: #6b7280; }

.rl-tl-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rl-tl-date {
    margin-left: auto;
    font-size: 12px;
    color: var(--rl-muted);
}

.rl-tl-body {
    font-size: 12.5px;
    color: var(--rl-neutral);
    margin-top: 6px;
    word-break: break-word;
}

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

@media (max-width: 768px) {
    .rl-kpis, .rl-types, .rl-grid-2, .rl-m-summary { grid-template-columns: 1fr; }
    .rl-search { margin-left: 0; }
}
