/* ── LabCare Elite Reference-Matched Dashboard Styles ── */
:root {
    --db-bg: #f8fafc;
    --db-card-bg: #ffffff;
    --db-border: #e2e8f0;
    --db-text-main: #0f172a;
    --db-text-muted: #64748b;
    --db-primary-blue: #0984e3;
    --db-success-green: #00b894;
    --db-danger-red: #ff4757;
    --db-warning-orange: #ffa502;
    --db-purple: #6c5ce7;
    --db-teal: #00cec9;
}

.ref-dashboard-container {
    padding: 14px 18px 24px;
    background-color: var(--db-bg);
    min-height: calc(100vh - 65px);
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--db-text-main);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── Top Header Controls Bar ── */
.ref-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: #ffffff;
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.ref-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ref-header-title {
    font-size: 1.12rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
}

.ref-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ref-preset-pill {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}

.ref-preset-pill:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
}

.ref-preset-pill.active {
    background: #0984e3;
    color: #ffffff;
    border-color: #0984e3;
    box-shadow: 0 2px 6px rgba(9, 132, 227, 0.25);
}

.ref-date-box {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px 8px;
    height: 28px;
}

.ref-date-input {
    border: none;
    background: transparent;
    font-size: 11px;
    font-weight: 600;
    color: #1e293b;
    outline: none;
    width: 95px;
    font-family: inherit;
}

/* ── Top Row: 6 KPI Cards ── */
.ref-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.ref-kpi-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 12px 14px 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 4px 10px rgba(0, 0, 0, 0.01);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 108px;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ref-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.ref-kpi-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ref-kpi-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.ref-kpi-icon.blue {
    background: #e0f2fe;
    color: #0284c7;
}

.ref-kpi-icon.cyan {
    background: #e0f7fa;
    color: #00838f;
}

.ref-kpi-icon.green {
    background: #dcfce7;
    color: #15803d;
}

.ref-kpi-icon.purple {
    background: #ede9fe;
    color: #6d28d9;
}

.ref-kpi-icon.red {
    background: #fee2e2;
    color: #b91c1c;
}

.ref-kpi-icon.orange {
    background: #ffedd5;
    color: #c2410c;
}

.ref-kpi-val {
    font-size: clamp(1.2rem, 1.4vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 4px 0 2px;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ref-kpi-val.blue {
    color: #0984e3;
}

.ref-kpi-val.cyan {
    color: #00cec9;
}

.ref-kpi-val.green {
    color: #00b894;
}

.ref-kpi-val.purple {
    color: #6c5ce7;
}

.ref-kpi-val.red {
    color: #ff4757;
}

.ref-kpi-val.orange {
    color: #e17055;
}

.ref-kpi-sub {
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

/* ── KPI Comparison Row & Badges ── */
.ref-kpi-compare-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
    font-size: 9.5px;
    font-weight: 700;
    min-width: 0;
}

.ref-kpi-compare-badge {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    padding: 1.5px 5px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}

.ref-kpi-compare-badge.up {
    background: #dcfce7;
    color: #15803d;
}

.ref-kpi-compare-badge.down {
    background: #fee2e2;
    color: #b91c1c;
}

.ref-kpi-compare-badge.neutral {
    background: #f1f5f9;
    color: #64748b;
}

.ref-kpi-compare-text {
    color: #64748b;
    font-size: 9.5px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ref-kpi-footer-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 9.5px;
    font-weight: 700;
}

.ref-kpi-footer-badge.green {
    background: #ecfdf5;
    color: #059669;
}

.ref-kpi-footer-badge.blue {
    background: #eff6ff;
    color: #2563eb;
}

.ref-kpi-footer-badge.red {
    background: #fef2f2;
    color: #dc2626;
}

.ref-kpi-footer-badge.purple {
    background: #faf5ff;
    color: #7c3aed;
}

.ref-kpi-footer-badge.orange {
    background: #fff7ed;
    color: #ea580c;
}

.ref-kpi-sparkline {
    width: 32px;
    height: 10px;
}

/* ── 3x2 Main Charts Grid ── */
.ref-charts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ref-chart-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 4px 10px rgba(0, 0, 0, 0.01);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    min-height: 275px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.ref-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.ref-card-header-left {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.ref-badge-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0984e3;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.ref-card-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ref-card-sub {
    font-size: 10.5px;
    color: #64748b;
    margin: 2px 0 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Donut & List Split Inside Card */
.ref-donut-split {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.ref-stat-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    width: 100%;
}

.ref-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 3.5px 7px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: background 0.15s ease;
    min-width: 0;
}

.ref-stat-item:hover {
    background: #f1f5f9;
}

.ref-stat-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 11px;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.ref-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.ref-dot.teal {
    background: #00cec9;
}

.ref-dot.purple {
    background: #6c5ce7;
}

.ref-dot.red {
    background: #ff4757;
}

.ref-dot.green {
    background: #00b894;
}

.ref-dot.orange {
    background: #ffa502;
}

.ref-stat-val {
    font-weight: 800;
    font-size: 11px;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Eye Icon Button in Cards ── */
.ref-eye-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
}

.ref-eye-btn .material-symbols-outlined {
    font-size: 15px;
}

.ref-eye-btn:hover {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #7dd3fc;
    transform: translateY(-1px);
}

.ref-kpi-eye-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid transparent;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
}

.ref-kpi-eye-btn .material-symbols-outlined {
    font-size: 14px;
}

.ref-kpi-eye-btn:hover {
    background: #f1f5f9;
    color: #0984e3;
    border-color: #cbd5e1;
}

/* ── ApexCharts Custom Styling & Tooltip Fixes ── */
.apexcharts-canvas {
    position: relative;
    user-select: none;
}

.apexcharts-tooltip {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 4px 6px -4px rgba(15, 23, 42, 0.1) !important;
    border-radius: 8px !important;
    color: #1e293b !important;
    padding: 6px 10px !important;
    font-size: 11px !important;
    font-family: 'Outfit', 'Inter', system-ui, sans-serif !important;
    max-width: 260px !important;
    white-space: normal !important;
    word-break: break-word !important;
    z-index: 100 !important;
}

.apexcharts-tooltip-title {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
    color: #0f172a !important;
}

.apexcharts-tooltip-series-group {
    padding: 3px 0 !important;
    display: flex !important;
    align-items: center !important;
}

.apexcharts-tooltip-text {
    font-weight: 600 !important;
    color: #334155 !important;
}

/* ── Dashboard Details Modal ── */
.ref-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: refModalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes refModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.ref-modal-container {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
    width: 95%;
    max-width: 1200px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: refModalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes refModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ref-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.ref-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ref-modal-icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.ref-modal-icon-badge.blue {
    background: #e0f2fe;
    color: #0284c7;
}

.ref-modal-icon-badge.orange {
    background: #ffedd5;
    color: #c2410c;
}

.ref-modal-icon-badge.cyan {
    background: #e0f7fa;
    color: #00838f;
}

.ref-modal-icon-badge.green {
    background: #dcfce7;
    color: #15803d;
}

.ref-modal-icon-badge.red {
    background: #fee2e2;
    color: #b91c1c;
}

.ref-modal-icon-badge.purple {
    background: #ede9fe;
    color: #6d28d9;
}

.ref-modal-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ref-modal-sub {
    font-size: 11.5px;
    color: #64748b;
    margin: 2px 0 0;
    font-weight: 500;
}

.ref-modal-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ref-modal-close-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

.ref-modal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 10px;
}

.ref-modal-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 12px;
    width: 320px;
    transition: all 0.15s ease;
}

.ref-modal-search-box:focus-within {
    border-color: #0984e3;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.15);
}

.ref-modal-search-box input {
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    outline: none;
    width: 100%;
}

.ref-modal-stats-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ref-modal-pill {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ref-modal-pill.blue {
    background: #e0f2fe;
    color: #0369a1;
}

.ref-modal-pill.green {
    background: #dcfce7;
    color: #15803d;
}

.ref-modal-pill.orange {
    background: #ffedd5;
    color: #c2410c;
}

.ref-modal-pill.red {
    background: #fee2e2;
    color: #b91c1c;
}

.ref-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: #ffffff;
}

.ref-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
    text-align: left;
}

.ref-detail-table thead {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 2px solid #e2e8f0;
}

.ref-detail-table th {
    padding: 10px 14px;
    font-size: 10.5px;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.ref-detail-table th.num,
.ref-detail-table td.num {
    text-align: right;
}

.ref-detail-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}

.ref-detail-table tbody tr:hover {
    background: #f8fafc;
}

.ref-patient-name {
    font-weight: 700;
    color: #0f172a;
    display: block;
}

.ref-patient-meta {
    font-size: 10px;
    color: #64748b;
    display: block;
    margin-top: 1px;
}

.ref-badge-status {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.ref-badge-status.settled {
    background: #dcfce7;
    color: #15803d;
}

.ref-badge-status.due {
    background: #fee2e2;
    color: #b91c1c;
}

.ref-badge-status.cash {
    background: #ede9fe;
    color: #6d28d9;
}

.ref-badge-status.credit {
    background: #ffedd5;
    color: #c2410c;
}

.ref-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.ref-modal-empty {
    padding: 50px 20px;
    text-align: center;
    color: #94a3b8;
}

.ref-modal-empty .material-symbols-outlined {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 8px;
}

/* ── Comparison Banner & Matrix ── */
.ref-comparison-banner {
    background: linear-gradient(135deg, #0984e3 0%, #6c5ce7 100%);
    border-radius: 12px;
    padding: 12px 18px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 14px rgba(9, 132, 227, 0.2);
}

.ref-comparison-banner-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ref-comparison-banner-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.2px;
    margin: 0;
}

.ref-comparison-banner-sub {
    font-size: 11px;
    opacity: 0.85;
    margin: 2px 0 0;
}

.ref-comparison-matrix-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    margin-bottom: 4px;
}

.ref-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.ref-comparison-table th {
    background: #f8fafc;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.ref-comparison-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}

.ref-comparison-table tr:hover td {
    background: #f8fafc;
}

.ref-variance-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
}

.ref-variance-pill.up {
    background: #dcfce7;
    color: #15803d;
}

.ref-variance-pill.down {
    background: #fee2e2;
    color: #b91c1c;
}

.ref-variance-pill.neutral {
    background: #f1f5f9;
    color: #64748b;
}

/* ── Responsive Scaling ── */
@media (max-width: 1300px) {
    .ref-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1050px) {
    .ref-charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ref-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ref-charts-grid {
        grid-template-columns: 1fr;
    }

    .ref-header-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .ref-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* ════════════════════════════════════════════════════════════════
   DUE COLLECTION HISTORY MODAL TABLE THEME (MATCHING IMAGE 2)
   ════════════════════════════════════════════════════════════════ */
.dch-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    text-align: left;
}

.dch-thead {
    background: #f8fafc !important;
}

.dch-th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8fafc !important;
    padding: 9px 8px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
    border-top: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    vertical-align: middle !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 0 #e2e8f0;
}

.dch-tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.12s ease;
}

.dch-tbody tr:hover {
    background-color: #f8fafc;
}

.dch-td {
    padding: 7px 8px;
    color: #334155;
    vertical-align: middle;
    border-bottom: 1px solid #f8fafc;
    font-size: 12px;
    overflow: hidden;
}

.dch-text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: block;
}

.dch-badge-receipt {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    white-space: nowrap;
}

.dch-badge-custcode {
    display: inline-flex;
    padding: 1px 5px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 3px;
    font-weight: 600;
    font-size: 10px;
    white-space: nowrap;
}

.dch-patient-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.dch-patient-text-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.dch-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dch-gender-letter {
    font-size: 11px;
    font-weight: 800;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1;
    text-transform: uppercase;
    user-select: none;
}

.dch-avatar-male {
    background: #e0f2fe;
    color: #1d4ed8;
    border: 1.5px solid #93c5fd;
}

.dch-avatar-female {
    background: #fce7f3;
    color: #be185d;
    border: 1.5px solid #f9a8d4;
}

.dch-avatar-child {
    background: #fef3c7;
    color: #b45309;
    border: 1.5px solid #fcd34d;
}

.dch-patient-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dch-amt-received {
    font-weight: 800;
    color: #15803d;
    font-size: 12.5px;
    white-space: nowrap;
}

.dch-paymode-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2.5px 8px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.dch-paymode-cash {
    background: #dcfce7;
    color: #15803d;
}

.dch-paymode-card {
    background: #eff6ff;
    color: #1d4ed8;
}

.dch-paymode-upi {
    background: #e0e7ff;
    color: #4338ca;
}

.dch-paymode-cheque {
    background: #fef3c7;
    color: #b45309;
}

.dch-action-btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
}

.dch-action-btn-patient {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.dch-action-btn-patient:hover {
    background: #2563eb;
    color: #ffffff;
}

.dch-action-btn-referral {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}

.dch-action-btn-referral:hover {
    background: #059669;
    color: #ffffff;
}