/* ============================================================
   Recovery Module — rc-* class definitions
   Auto-applied by theme engine; no <link> tag needed.
   ============================================================ */

/* ── Page shell ─────────────────────────────────────────── */
.rc-page {
    padding: 20px;
    font-family: 'Roboto', sans-serif;
    color: #444;
}

.rc-page-header {
    margin-bottom: 18px;
}

    .rc-page-header h2 {
        margin: 0 0 4px 0;
        font-size: 22px;
        color: #333;
    }

.rc-page-actions {
    margin-bottom: 16px;
}

/* ── Stat cards (dashboard top row) ─────────────────────── */
.rc-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.rc-stat-card {
    flex: 1 1 140px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 14px 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.rc-stat-number {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
}

.rc-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    margin-top: 4px;
    letter-spacing: .4px;
}

/* colour modifiers */
.rc-stat-primary .rc-stat-number  { color: #337ab7; }
.rc-stat-warning .rc-stat-number  { color: #f0ad4e; }
.rc-stat-info    .rc-stat-number  { color: #5bc0de; }
.rc-stat-success .rc-stat-number  { color: #5cb85c; }
.rc-stat-danger  .rc-stat-number  { color: #d9534f; }
.rc-stat-default .rc-stat-number  { color: #555;    }

/* ── Secondary stats row ─────────────────────────────────── */
.rc-secondary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.rc-secondary-card {
    flex: 1 1 120px;
    background: #f9f9f9;
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    padding: 10px 14px;
    text-align: center;
}

.rc-secondary-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: .3px;
}

.rc-secondary-value {
    font-size: 20px;
    font-weight: 600;
    color: #555;
    margin-top: 2px;
}

/* ── Filter tabs ─────────────────────────────────────────── */
.rc-filter-links {
    margin-bottom: 14px;
}

.rc-filter-tabs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 4px;
}

.rc-tab-break {
    flex-basis: 100%;
    height: 4px;
    margin: 0;
    padding: 0;
    border-top: 1px solid #ddd;
}

.rc-tab {
    display: inline-flex;
    flex-direction: column;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #f5f5f5;
    color: #555;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.3;
}

.rc-tab-title {
    font-weight: 600;
    white-space: nowrap;
}

.rc-tab-desc {
    font-size: 10px;
    color: #888;
    font-weight: normal;
    white-space: nowrap;
}

.rc-tab-active .rc-tab-desc,
.rc-tab-active:hover .rc-tab-desc {
    color: rgba(255,255,255,0.8);
}

    .rc-tab:hover {
        background: #e8e8e8;
        text-decoration: none;
        color: #333;
    }

.rc-tab-active,
.rc-tab-active:hover {
    background: #337ab7;
    border-color: #2e6da4;
    color: #fff !important;
}

/* ── Filter bar ──────────────────────────────────────────── */
.rc-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 16px;
    padding: 10px 14px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin: 10px 0 16px;
}

.rc-filter-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.rc-filter-label {
    font-size: 11px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.rc-filter-select,
.rc-filter-input {
    height: 30px;
    padding: 3px 7px;
    font-size: 13px;
    min-width: 140px;
}

.rc-filter-actions {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding-top: 18px; /* align with labelled controls */
}

.rc-reconcile-result {
    display: inline-block;
    margin-left: 12px;
    padding: 4px 10px;
    background: #dff0d8;
    border: 1px solid #d6e9c6;
    border-radius: 3px;
    color: #3c763d;
    font-size: 13px;
}

.rc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 16px;
    table-layout: fixed;
}

    .rc-table th {
        background: #f0f0f0;
        border: 1px solid #ddd;
        padding: 8px 10px;
        text-align: left;
        font-weight: 600;
        color: #555;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .rc-table td {
        border: 1px solid #e8e8e8;
        padding: 7px 10px;
        vertical-align: middle;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* col 1: checkbox, col 2: Case#, col 3: Account, col 4: Status, col 5: Susp Date,
       col 6: Case Bal, col 7: Live Bal, col 8: Days, col 9: Idle,
       col 10: Follow-Up, col 11: Actions, col 12: Assigned, col 13: btn */
    .rc-table th:nth-child(1),  .rc-table td:nth-child(1)  { width: 28px; padding: 0 4px; }
    .rc-table th:nth-child(2),  .rc-table td:nth-child(2)  { width: 55px; }
    .rc-table th:nth-child(3),  .rc-table td:nth-child(3)  { width: 180px; white-space: nowrap; }
    .rc-table th:nth-child(4),  .rc-table td:nth-child(4)  { width: 110px; }
    .rc-table th:nth-child(5),  .rc-table td:nth-child(5)  { width: 85px; }
    .rc-table th:nth-child(6),  .rc-table td:nth-child(6)  { width: 100px; }
    .rc-table th:nth-child(7),  .rc-table td:nth-child(7)  { width: 100px; }
    .rc-table th:nth-child(8),  .rc-table td:nth-child(8)  { width: 60px; }
    .rc-table th:nth-child(9),  .rc-table td:nth-child(9)  { width: 45px; }
    .rc-table th:nth-child(10), .rc-table td:nth-child(10) { width: 85px; }
    .rc-table th:nth-child(11), .rc-table td:nth-child(11) { width: 65px; }
    .rc-table th:nth-child(12), .rc-table td:nth-child(12) { width: 75px; }
    .rc-table th:nth-child(13), .rc-table td:nth-child(13) { width: 50px; }

.rc-case-row:hover td {
    background: #f7fbff;
}

.rc-row-overdue td {
    background: #fff8f8;
}

.rc-row-new td {
    background: #fffff8;
}

.rc-row-escalating td {
    background: #fef0e6;
}

.rc-stale {
    color: #e67e22;
    font-weight: 600;
}

.rc-esc-badge {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    background: #d9534f;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .2px;
}

.rc-tab-danger {
    color: #a94442 !important;
    font-weight: 600;
}

.rc-tab-warning {
    color: #8a6d3b !important;
    font-weight: 600;
}

/* Tab count badges */
.rc-cnt {
    display: inline-block;
    min-width: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    background: rgba(0,0,0,.15);
    color: inherit;
    vertical-align: middle;
    margin-left: 2px;
}

.rc-tab-active .rc-cnt {
    background: rgba(255,255,255,.3);
}

.rc-cnt.rc-cnt-warn {
    background: #e67e22;
    color: #fff;
}

.rc-cnt.rc-cnt-danger {
    background: #d9534f;
    color: #fff;
}

/* ── Status badges ───────────────────────────────────────── */
.rc-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.rc-status-new           { background: #fcf8e3; color: #8a6d3b; border: 1px solid #faebcc; }
.rc-status-inprogress    { background: #d9edf7; color: #31708f; border: 1px solid #bce8f1; }
.rc-status-promised      { background: #dff0d8; color: #3c763d; border: 1px solid #d6e9c6; }
.rc-status-promisebreach { background: #f2dede; color: #a94442; border: 1px solid #ebccd1; }
.rc-status-resolved      { background: #dff0d8; color: #3c763d; border: 1px solid #d6e9c6; }
.rc-status-closed        { background: #f5f5f5; color: #777;    border: 1px solid #ddd;    }

/* ── Misc table helpers ──────────────────────────────────── */
.rc-amount  { font-family: monospace; text-align: right; white-space: nowrap; }
.rc-muted   { color: #aaa; font-size: 11px; }
.rc-overdue { color: #d9534f; font-weight: 600; }
.rc-nowrap  { white-space: nowrap; }
.rc-empty   { color: #999; font-style: italic; padding: 20px; text-align: center; }
.rc-error   { color: #a94442; background: #f2dede; padding: 10px 14px; border-radius: 3px; border: 1px solid #ebccd1; }

/* ── Pagination ──────────────────────────────────────────── */
.rc-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 13px;
}

.rc-pages {
    display: flex;
    gap: 4px;
}

.rc-page-link {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    color: #337ab7;
    text-decoration: none;
    font-size: 12px;
}

    .rc-page-link:hover {
        background: #eaf2fb;
        text-decoration: none;
    }

.rc-page-info {
    color: #888;
    font-size: 12px;
}

/* ── Case detail page — outer wrapper ───────────────────── */
.rc-detail-page {
    padding: 0;
}

.rc-content-body {
    padding: 0 28px;
}

/* ── Hero bar ────────────────────────────────────────────── */
.rc-hero {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    background: #1F4E79;
    color: #fff;
    padding: 16px 20px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.rc-hero-back {
    color: rgba(255,255,255,.75);
    text-decoration: none;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

    .rc-hero-back:hover { color: #fff; text-decoration: none; }

.rc-hero-id {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.rc-hero-case {
    font-size: 12px;
    opacity: .75;
    white-space: nowrap;
}

.rc-hero-company {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.2px;
}

.rc-hero-acct {
    font-size: 11px;
    opacity: .6;
    white-space: nowrap;
}

.rc-hero-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
}

.rc-hero-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    flex-wrap: wrap;
}

.rc-hero-bal {
    font-size: 16px;
    font-weight: 700;
}

.rc-hero-vatlabel {
    font-size: 10px;
    opacity: .6;
    margin-left: -4px;
}

.rc-hero-sep {
    opacity: .4;
}

.rc-hero-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: .8;
    margin-left: auto;
    flex-wrap: wrap;
}

.rc-next-case-btn {
    flex-shrink: 0;
    margin-left: 10px;
    opacity: .85;
    font-size: 11px;
}

/* ── Action strip ────────────────────────────────────────── */
.rc-action-strip {
    background: #fff;
    border: 1px solid #c8dff0;
    border-left: 4px solid #337ab7;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 10px;
}

.rc-action-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: nowrap;
}

.rc-atype {
    flex: 0 0 170px;
    align-self: center;
}

.rc-anote {
    flex: 1;
    min-width: 0;
    height: 60px;
    padding: 6px 9px;
    resize: none;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.4;
    overflow: auto;
}

    .rc-anote:focus {
        border-color: #66afe9;
        outline: none;
        box-shadow: 0 0 4px rgba(102,175,233,.4);
    }

.rc-aextra {
    flex: 0 0 110px;
    align-self: center;
    padding: 6px 9px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    box-sizing: border-box;
}

    .rc-aextra:focus {
        border-color: #66afe9;
        outline: none;
    }

/* wrapping div around hidden extras — flex child */
#divAmountPromised,
#divFollowUp { display: flex; align-items: center; gap: 6px; }

.rc-input-label {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    margin: 0;
}

.rc-abtn {
    flex: 0 0 auto;
    align-self: center;
    white-space: nowrap;
}

.rc-assign-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eef3f8;
    flex-wrap: wrap;
}

.rc-assign-label {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
}

.rc-aassign {
    flex: 0 0 160px;
}

/* ── Action strip + Notes wrapper ───────────────────────── */
.rc-strip-wrapper {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.rc-strip-wrapper .rc-action-strip {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.rc-strip-wrapper .rc-sidebar-card {
    flex: 0 0 300px;
    margin-bottom: 0;
}

/* ── Main content area ───────────────────────────────────── */
.rc-main-area {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.rc-main-lhs {
    flex: 1;
    min-width: 0;
}

.rc-main-timeline {
}
/* ── Stats + Contacts + Invoice entries row (three columns) ── */
.rc-stats-contacts-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.rc-stats-contacts-row .rc-sidebar-card {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

/* Invoice entries table inside the card */
.rc-inv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}
.rc-inv-table th {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: #999;
    border-bottom: 1px solid #eee;
    padding: 2px 4px 4px;
    text-align: left;
}
.rc-inv-table th:last-child,
.rc-inv-table td:last-child { text-align: right; }
.rc-inv-table td {
    padding: 3px 4px;
    border-bottom: 1px solid #f3f3f3;
    color: #444;
    white-space: nowrap;
}
.rc-inv-table tr:last-child td { border-bottom: none; }
.rc-inv-amount-neg { color: #a94442; }
.rc-inv-amount-pos { color: #3c763d; }
.rc-sidebar {
    flex: 0 0 250px;
}

/* ── Section heading ─────────────────────────────────────── */
.rc-section-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #888;
    margin: 0 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

/* ── Sidebar cards ───────────────────────────────────────── */
.rc-sidebar-card {
    background: #fafafa;
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 10px;
    font-size: 12px;
}

.rc-sc-heading {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #999;
    margin-bottom: 7px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.rc-sc-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

    .rc-sc-row .rc-info-label { font-size: 10px; flex-shrink: 0; }
    .rc-sc-row .rc-info-value { font-size: 12px; text-align: right; }

/* ── Last system login block (bottom of contacts card) ────── */
.rc-last-access-block {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
    background: #f0f4f8;
    border-radius: 3px;
    padding: 7px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rc-last-access-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #5b7fa6;
}
.rc-last-access-user {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}
.rc-last-access-date {
    font-size: 11px;
    color: #666;
}

/* ── Info panel (contact panel, shared) ─────────────────── */
.rc-info-panel {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.rc-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0 16px;
}

.rc-info-item {
    min-width: 120px;
    margin-bottom: 8px;
}

.rc-info-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: .3px;
}

.rc-info-value {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #333;
}

/* ── Shared input/select styles ─────────────────────────── */
.rc-select,
.rc-input,
.rc-textarea,
.rc-datepicker {
    width: 100%;
    padding: 6px 9px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
}

    .rc-select:focus,
    .rc-input:focus,
    .rc-textarea:focus,
    .rc-datepicker:focus {
        border-color: #66afe9;
        outline: none;
        box-shadow: 0 0 4px rgba(102,175,233,.4);
    }

/* rc-form-row kept for escalation panel buttons */
.rc-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.rc-action-msg {
    font-size: 12px;
    color: #888;
}

/* ── Timeline ────────────────────────────────────────────── */
.rc-timeline-section { }

.rc-timeline-section h4,
.rc-timeline-section .rc-section-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #888;
    margin: 0 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.rc-timeline-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

    .rc-timeline-table th {
        background: #f5f5f5;
        border: 1px solid #e0e0e0;
        padding: 6px 10px;
        text-align: left;
        color: #666;
        font-weight: 600;
    }

    .rc-timeline-table td {
        border: 1px solid #eee;
        padding: 6px 10px;
        vertical-align: top;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .rc-timeline-table td:nth-child(1),
    .rc-timeline-table td:nth-child(2),
    .rc-timeline-table td:nth-child(3),
    .rc-timeline-table td:nth-child(5),
    .rc-timeline-table td:nth-child(6) { white-space: nowrap; }

.rc-action-human   td { background: #fafff8; }
.rc-action-system  td { background: #f8fbff; }
.rc-action-blocked td { background: #fff5f5; }
.rc-action-blocked td:nth-child(3) { color: #c0392b; font-weight: 600; }

/* ── Source badges ───────────────────────────────────────── */
.rc-source-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.rc-source-human  { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.rc-source-system { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }

/* ── Scorecard ───────────────────────────────────────────── */
.rc-scorecard-filter {
    background: #fafafa;
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    padding: 14px 18px;
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

    .rc-scorecard-filter label {
        font-size: 11px;
        text-transform: uppercase;
        color: #888;
        display: block;
        margin-bottom: 3px;
    }

.rc-scorecard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.rc-metric-card {
    flex: 1 1 150px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 14px 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.rc-metric-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    letter-spacing: .3px;
}

.rc-metric-value {
    font-size: 26px;
    font-weight: 700;
    color: #333;
    margin-top: 4px;
}

.rc-metric-good .rc-metric-value { color: #5cb85c; }
.rc-metric-warn .rc-metric-value { color: #f0ad4e; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .rc-stat-card    { flex: 1 1 calc(50% - 12px); }
    .rc-metric-card  { flex: 1 1 calc(50% - 12px); }
    .rc-form-group   { flex: 1 1 100%; }
    .rc-info-item    { min-width: 100%; }
    .rc-table        { font-size: 11px; }
    .rc-table th,
    .rc-table td     { padding: 5px 6px; }
}

/* ── Escalation action panel ─────────────────────────────── */
.rc-escalation-panel {
    background: #fff8f0;
    border: 1px solid #f0ad4e;
    border-left: 4px solid #e67e22;
    border-radius: 4px;
    padding: 14px 18px;
    margin-bottom: 18px;
}

    .rc-escalation-panel h4 {
        margin: 0 0 10px 0;
        font-size: 14px;
        color: #8a6d3b;
        border-bottom: 1px solid #fcefd3;
        padding-bottom: 6px;
    }

.rc-esc-status {
    margin-bottom: 10px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

/* PassedToLegal status badge */
.rc-status-passedtolegal { background: #e8d5f5; color: #6f42c1; border: 1px solid #d5b8ea; }

/* ── Contact info panel (case detail) ───────────────────── */
.rc-contact-panel {
    background: #f5f9fd;
    border-color: #c9dff0;
}

.rc-contact-heading {
    margin: 0 0 10px 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #666;
    border-bottom: 1px solid #dde8f0;
    padding-bottom: 6px;
}

/* ── Accounts notes panel (sidebar) ─────────────────────── */
.rc-notes-sidebar {
    background: #fffdf5;
    border-color: #e8dfc0;
}

.rc-notes-readonly {
    width: 100%;
    box-sizing: border-box;
    height: 120px;
    max-height: 120px;
    resize: none;
    overflow-y: auto;
    padding: 6px 8px;
    border: 1px solid #d8ceaa;
    border-radius: 3px;
    font-size: 11px;
    color: #666;
    background: #fffef8;
    line-height: 1.5;
    font-family: inherit;
}

/* ── Bulk action bar ──────────────────────────────────────────────────── */
.rc-bulk-bar {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: #eaf3fb;
    border: 1px solid #b8d4ea;
    border-radius: 4px;
}

.rc-bulk-count {
    font-weight: 600;
    font-size: 13px;
    color: #2a6496;
    margin-right: 4px;
}

.rc-dry-run-toggle {
    margin-left: auto;
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.rc-dry-run-toggle input[type="checkbox"] {
    cursor: pointer;
}

/* ── Checkbox column ──────────────────────────────────────────────────── */
.rc-chk-col {
    width: 28px;
    text-align: center;
    padding: 0 4px;
}

.rc-chk-all {
    cursor: pointer;
}

input.rc-chk {
    cursor: pointer;
}

input.rc-chk:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

/* ── Reconcile bar ────────────────────────────────────────────────────── */
.rc-reconcile-bar {
    margin-bottom: 6px;
    text-align: right;
}

/* ── Escalation stage badge ───────────────────────────────────────────── */
.rc-esc-badge {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 3px;
    background: #f2dede;
    color: #a94442;
    vertical-align: middle;
    white-space: nowrap;
}

/* ── Recommended next step badge ─────────────────────────────────────── */
.rc-next-step {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 3px;
    background: #dff0d8;
    color: #3c763d;
    vertical-align: middle;
    white-space: nowrap;
}

/* ── Case detail warning banners ─────────────────────────────────────── */
.rc-warning-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    margin-bottom: 6px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}
.rc-warn-red {
    background: #f2dede;
    color: #a94442;
    border-left: 4px solid #a94442;
}
.rc-warn-amber {
    background: #fcf8e3;
    color: #8a6d3b;
    border-left: 4px solid #f0ad4e;
}

/* ══════════════════════════════════════════════════════════
   DASHBOARD — KPI band, status tiles, activity strip, charts
   ══════════════════════════════════════════════════════════ */

/* ── Header meta line ────────────────────────────────────── */
.rc-dash-header {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
}

.rc-dash-meta {
    font-size: 12px;
    color: #aaa;
}

/* ── Hero KPI band ───────────────────────────────────────── */
.rc-kpi-band {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.rc-kpi-hero {
    flex: 1 1 160px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 16px 18px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,.06);
    text-decoration: none;
    color: inherit;
    display: block;
}

a.rc-kpi-hero:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,.12);
    border-color: #bbb;
    text-decoration: none;
    color: inherit;
}

.rc-kpi-hero-value {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    color: #333;
    display: block;
}

.rc-kpi-unit {
    font-size: 16px;
    font-weight: 400;
    color: #888;
    margin-left: 2px;
}

.rc-kpi-hero-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    margin-top: 6px;
    letter-spacing: .4px;
}

.rc-kpi-sub {
    font-size: 10px;
    color: #bbb;
    margin-top: 4px;
}

/* KPI colour modifiers */
.rc-kpi-financial .rc-kpi-hero-value { color: #27ae60; }
.rc-kpi-primary   .rc-kpi-hero-value { color: #337ab7; }
.rc-kpi-alert     .rc-kpi-hero-value { color: #d9534f; }
.rc-kpi-neutral   .rc-kpi-hero-value { color: #555; }
.rc-kpi-good    { color: #5cb85c !important; }
.rc-kpi-warn    { color: #f0ad4e !important; }
.rc-kpi-danger  { color: #d9534f !important; }

/* KPI tooltip icon */
.rc-kpi-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #777;
    font-size: 9px;
    font-weight: 700;
    cursor: help;
    vertical-align: middle;
    margin-left: 2px;
    text-decoration: none;
    flex-shrink: 0;
}

/* ── Section dividers ────────────────────────────────────── */
.rc-section-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #aaa;
    letter-spacing: .7px;
    margin: 20px 0 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.rc-section-sub {
    font-weight: 400;
    font-size: 11px;
    color: #ccc;
    text-transform: none;
    letter-spacing: 0;
}

/* ── Status tiles grid ───────────────────────────────────── */
.rc-status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 8px;
}

.rc-status-tile {
    background: #fff;
    border: 1px solid #ddd;
    border-left: 4px solid #ddd;
    border-radius: 5px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    transition: box-shadow .15s;
}

.rc-status-tile:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,.12);
    text-decoration: none;
    color: inherit;
}

.rc-status-count {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
}

.rc-status-name {
    font-size: 12px;
    font-weight: 600;
    color: #444;
    margin-top: 2px;
}

.rc-status-desc {
    font-size: 10px;
    color: #999;
    margin-top: 3px;
    line-height: 1.35;
}

.rc-status-badge {
    display: inline-block;
    padding: 0 5px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 700;
    background: rgba(0,0,0,.1);
    vertical-align: middle;
    margin-left: 2px;
}

/* tile colour variants — use rc-stile-* to avoid collision with inline badge classes */
.rc-stile-warning { border-left-color: #f0ad4e; }
.rc-stile-warning .rc-status-count { color: #f0ad4e; }
.rc-stile-info    { border-left-color: #5bc0de; }
.rc-stile-info    .rc-status-count { color: #5bc0de; }
.rc-stile-success { border-left-color: #5cb85c; }
.rc-stile-success .rc-status-count { color: #5cb85c; }
.rc-stile-default { border-left-color: #aaa; }
.rc-stile-default .rc-status-count { color: #888; }
.rc-stile-muted   { border-left-color: #e67e22; }
.rc-stile-muted   .rc-status-count { color: #e67e22; }
.rc-stile-danger  { border-left-color: #d9534f; }
.rc-stile-danger  .rc-status-count { color: #d9534f; }

/* ── Activity strip ──────────────────────────────────────── */
.rc-activity-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.rc-activity-item {
    flex: 1 1 140px;
    background: #f9f9f9;
    border: 1px solid #e4e4e4;
    border-radius: 5px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rc-activity-value {
    font-size: 26px;
    font-weight: 700;
    color: #555;
}

.rc-activity-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #999;
    margin-top: 4px;
    letter-spacing: .3px;
    text-align: center;
}

.rc-activity-good .rc-activity-value { color: #5cb85c; }
.rc-activity-auto .rc-activity-value { color: #337ab7; }

/* ── Chart panel ─────────────────────────────────────────── */
.rc-chart-panel {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.rc-chart-toggle {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.rc-chart-btn {
    padding: 5px 16px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #f5f5f5;
    color: #555;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}

.rc-chart-btn:hover { background: #e8e8e8; }

.rc-chart-btn-active {
    background: #337ab7;
    border-color: #2e6da4;
    color: #fff;
}

.rc-range-btn {
    padding: 3px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #f5f5f5;
    color: #555;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
}

.rc-range-btn:hover { background: #e8e8e8; }

.rc-range-btn-active {
    background: #5c7a99;
    border-color: #4a6480;
    color: #fff;
}

.rc-chart-wrap {
    position: relative;
    height: 300px;
}

/* ── Dashboard responsive ────────────────────────────────── */
@media (max-width: 900px) {
    .rc-status-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .rc-status-grid { grid-template-columns: 1fr 1fr; }
    .rc-kpi-hero    { flex: 1 1 calc(50% - 12px); }
}

/* ── Recovery Rate Strip ─────────────────────────────────── */
.rc-recovery-rate-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.rc-rr-block {
    flex: 1 1 180px;
    background: #fff;
    border: 1px solid #ddd;
    border-top: 4px solid #ccc;
    border-radius: 5px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.rc-rr-pct {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.1;
    color: #bbb;
}

.rc-rr-window {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-top: 4px;
}

.rc-rr-sub {
    font-size: 11px;
    color: #999;
    margin-top: 3px;
}

.rc-rr-opened {
    font-size: 10px;
    color: #bbb;
    margin-top: 2px;
}

.rc-rr-green              { border-top-color: #5cb85c; }
.rc-rr-green .rc-rr-pct   { color: #5cb85c; }
.rc-rr-amber              { border-top-color: #f0ad4e; }
.rc-rr-amber .rc-rr-pct   { color: #f0ad4e; }
.rc-rr-red                { border-top-color: #d9534f; }
.rc-rr-red .rc-rr-pct     { color: #d9534f; }
.rc-rr-none               { border-top-color: #ccc; }

/* ── Agent Performance Table ─────────────────────────────── */
.rc-agent-table-wrap {
    overflow-x: auto;
    margin-bottom: 24px;
}

.rc-agent-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.rc-agent-table th {
    background: #f5f5f5;
    padding: 9px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #888;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.rc-agent-table th.rc-th-right,
.rc-agent-table td.rc-td-right {
    text-align: right;
}

.rc-agent-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.rc-agent-table tr:last-child td {
    border-bottom: none;
}

.rc-agent-table tr:hover td {
    background: #fafafa;
}

.rc-agent-name {
    font-weight: 600;
    color: #333;
}

.rc-agent-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: #eee;
    color: #666;
}

.rc-agent-badge-danger  { background: #fdecea; color: #c0392b; }
.rc-agent-badge-warn    { background: #fef9e7; color: #e67e22; }
.rc-agent-badge-success { background: #eafaf1; color: #27ae60; }
.rc-agent-badge-info    { background: #ebf5fb; color: #2980b9; }

/* ── Email audit panel ───────────────────────────────────── */
.rc-email-toggle {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    color: #337ab7;
    cursor: pointer;
    text-decoration: underline;
    user-select: none;
}
.rc-email-toggle:hover { color: #23527c; }

.rc-email-panel {
    margin-top: 6px;
    border: 1px solid #d0e8f8;
    border-radius: 3px;
    background: #f5fbff;
    font-size: 12px;
    overflow: hidden;
}

.rc-email-hdr {
    padding: 3px 8px;
    border-bottom: 1px solid #d0e8f8;
    color: #555;
    background: #eaf4fd;
    white-space: normal;
}

.rc-email-body {
    padding: 8px;
    max-height: 300px;
    overflow-y: auto;
    white-space: normal;
    color: #333;
}

@media (max-width: 900px) {
    .rc-recovery-rate-strip { flex-direction: column; }
    .rc-rr-block            { flex: none; }
}
