﻿/* modals.css - Claim detail modal, settings modal, detail panel, centered detail modal */

/* ==================== CLAIM DETAIL MODAL STYLES ==================== */
.claim-detail-modal {
    max-width: 800px !important;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.claim-modal-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.claim-modal-id {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.claim-modal-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0 1rem;
}

.claim-modal-tab {
    padding: 0.875rem 1.25rem;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.claim-modal-tab:hover {
    color: #1f2937;
}

.claim-modal-tab.active {
    color: var(--eff-primary);
}

.claim-modal-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--eff-primary);
    border-radius: 3px 3px 0 0;
}

.claim-msg-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 0.75rem;
    font-weight: 600;
}

.claim-modal-panel {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.claim-modal-panel.active {
    display: flex;
}

/* Messages Tab Styles */
.claim-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
    background: #fafbfc;
    min-height: 300px;
    max-height: 400px;
}

.claim-messages-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
    text-align: center;
    padding: 2rem;
}

.claim-messages-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.claim-messages-empty p {
    margin: 0;
    font-size: 1rem;
    color: #6b7280;
}

.claim-messages-empty span {
    font-size: 0.85rem;
}

.claim-messages-list:not(:empty) + .claim-messages-empty {
    display: none;
}

.claim-detail-msg {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.claim-detail-msg.user {
    flex-direction: row-reverse;
}

.claim-msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--eff-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.claim-detail-msg.user .claim-msg-avatar {
    background: #6b7280;
}

.claim-msg-bubble {
    max-width: 70%;
    background: #fff;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border: 1px solid #e9ecef;
}

.claim-detail-msg.user .claim-msg-bubble {
    background: var(--eff-primary);
    color: #fff;
    border-color: var(--eff-primary);
}

.claim-msg-bubble .sender {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.claim-detail-msg.user .claim-msg-bubble .sender {
    color: rgba(255,255,255,0.8);
}

.claim-msg-bubble .text {
    font-size: 0.9rem;
    line-height: 1.4;
}

.claim-msg-bubble .time {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.claim-detail-msg.user .claim-msg-bubble .time {
    color: rgba(255,255,255,0.7);
}

.claim-message-input {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
    background: #fff;
}

.claim-message-recipient {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.claim-message-recipient label {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

.claim-message-recipient select {
    flex: 1;
    max-width: 300px;
}

.claim-message-compose {
    display: flex;
    gap: 0.75rem;
}

.claim-message-compose textarea {
    flex: 1;
    resize: none;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 0.9rem;
}

.claim-message-compose textarea:focus {
    outline: none;
    border-color: var(--eff-primary);
}

/* Documents Tab Styles */
.claim-docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.claim-doc-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.claim-doc-item:hover {
    background: #F4F0E9;
    border-color: var(--eff-primary);
}

.claim-doc-item i {
    font-size: 2rem;
    color: #ef4444;
    margin-bottom: 0.5rem;
}

.claim-doc-item i.fa-file-image {
    color: #3b82f6;
}

.claim-doc-item i.fa-file-alt {
    color: #6b7280;
}

.claim-doc-item span {
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    color: #374151;
}

.claim-doc-item small {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.claim-doc-upload {
    text-align: center;
}

/* ==================== SETTINGS MODAL STYLES ==================== */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.settings-modal.show {
    opacity: 1;
    visibility: visible;
}

.settings-modal-content {
    background: #fff;
    border-radius: 1rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.settings-modal-content.wide {
    max-width: 700px;
}

.settings-modal.show .settings-modal-content {
    transform: translateY(0);
}

.settings-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #F4F0E9, #F4F0E9);
    border-radius: 1rem 1rem 0 0;
}

.settings-modal-header h5 {
    margin: 0;
    font-weight: 700;
    color: #166534;
}

.settings-modal-body {
    padding: 1.5rem;
}

.settings-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.strength-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 80px;
}

.strength-weak { background: #ef4444; }
.strength-fair { background: #f59e0b; }
.strength-good { background: #3b82f6; }
.strength-strong { background: #18A74B; }

/* Password Requirements */
.password-requirements {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

.req-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.req-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
}

.req-list li {
    padding: 0.25rem 0;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.req-list li i {
    font-size: 0.5rem;
}

.req-list li.valid {
    color: #18A74B;
}

.req-list li.valid i::before {
    content: "\f00c";
}

/* 2FA Styles */
.tfa-intro {
    text-align: center;
    padding: 1rem 0;
}

.tfa-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #F4F0E9, #E8DFD0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #166534;
    margin: 0 auto 1rem;
}

.tfa-intro h6 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tfa-intro p {
    color: #6b7280;
    font-size: 0.9rem;
}

.tfa-method-select {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.tfa-method {
    flex: 1;
    padding: 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tfa-method:hover {
    border-color: #1E6332;
}

.tfa-method.active {
    border-color: #1E6332;
    background: linear-gradient(135deg, #F4F0E9, #F4F0E9);
}

.tfa-method i {
    font-size: 2rem;
    color: #1E6332;
    display: block;
    margin-bottom: 0.75rem;
}

.tfa-method span {
    display: block;
    font-weight: 600;
    color: #1f2937;
}

.tfa-method small {
    font-size: 0.75rem;
    color: #6b7280;
}

.qr-placeholder {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 2px dashed #cbd5e1;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1rem auto;
    color: #64748b;
}

.qr-placeholder i {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.manual-code {
    text-align: center;
    margin-top: 1rem;
}

.manual-code code {
    font-size: 1.1rem;
    background: #f1f5f9;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    letter-spacing: 2px;
}

.tfa-code-input {
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.5rem;
    font-weight: 600;
}

.tfa-success {
    text-align: center;
    padding: 1rem 0;
}

.tfa-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #F4F0E9, #E8DFD0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #166534;
    margin: 0 auto 1rem;
}

.backup-codes {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 1.5rem;
    text-align: left;
}

.backup-codes-header {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.codes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.codes-grid span {
    background: #fff;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.85rem;
    text-align: center;
    border: 1px solid #e5e7eb;
}

/* Notifications List */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.notification-item:hover {
    background: #F4F0E9;
}

.notification-item.unread {
    background: #fff;
    border-left: 3px solid #1E6332;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.notification-icon.claims { background: #dbeafe; color: #1d4ed8; }
.notification-icon.documents { background: #fef3c7; color: #d97706; }
.notification-icon.docs { background: #fef3c7; color: #d97706; }
.notification-icon.system { background: #e0e7ff; color: #4338ca; }
.notification-icon.success { background: #F4F0E9; color: #166534; }
.notification-icon.danger { background: #fee2e2; color: #dc2626; }
.notification-icon.messages { background: #e0f2fe; color: #0284c7; }

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.notification-desc {
    font-size: 0.85rem;
    color: #6b7280;
}

.notification-time {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.notifications-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Account Assignment Checkboxes */
.account-checkbox-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.5rem;
}

.account-checkbox-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background 0.2s ease;
}

.account-checkbox-item:hover {
    background: #f9fafb;
}

.account-checkbox-item input {
    margin-right: 0.75rem;
}

.account-checkbox-item label {
    margin: 0;
    cursor: pointer;
    flex: 1;
}

/* ==================== DETAIL PANEL STYLES ==================== */
.detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9990;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.detail-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ==================== DETAIL MODAL (CENTERED) ==================== */
.detail-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: none;
    height: auto;
    max-height: 92vh;
    background: #fff;
    z-index: 9991;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    border-radius: 16px;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
}

.detail-panel.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Detail modals: near-full-screen (98% w/h). Same size + proportions for the
   Claim AND Deceased panels (sizing only — the base .detail-panel keeps the
   fixed-centered position/transform). */
#claimDetailPanel.detail-panel,
#deceasedDetailPanel.detail-panel {
    width: 98%;
    max-width: none;
    height: 98vh;        /* fixed tall height so both panels are the same size */
    max-height: 98vh;
}


.detail-panel-header {
    padding: 1.25rem 4rem 1.25rem 1.5rem; /* Extra right padding for close button */
    background: linear-gradient(135deg, #1E6332 0%, #2F8542 100%);
    color: #fff;
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.detail-panel-header-info {
    flex: 1;
}

/* Claim header: status badge relocated to the top-right (Gross/Net boxes
   removed). flex-shrink:0 keeps it from squashing; the header's right
   padding reserves space so it never collides with the absolute close X. */
.detail-panel-header-status-wrap {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.detail-panel-header-status-wrap .detail-panel-status {
    margin-top: 0;
}

/* Compact the claim detail green bar (scoped so the Deceased panel header,
   which shares .detail-panel-header, is unaffected). */
#claimDetailPanel .detail-panel-header {
    padding: 0.85rem 4rem 0.85rem 1.5rem;
    gap: 16px;
}
#claimDetailPanel .detail-panel-title {
    font-size: 1.35rem;
    margin-bottom: 0.15rem;
}
#claimDetailPanel .detail-panel-subtitle {
    font-size: 0.85rem;
}
#claimDetailPanel .detail-panel-close {
    top: 0.7rem;
    right: 0.85rem;
    width: 34px;
    height: 34px;
    font-size: 1rem;
}

.detail-panel-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.detail-panel-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.detail-panel-id {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-panel-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.detail-panel-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}
.detail-panel-subtitle .fh-link {
    color: #fff !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.detail-panel-subtitle .fh-link:hover {
    opacity: 0.85;
}

.detail-panel-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.75rem;
}

.detail-panel-status.funded,
.detail-panel-status.approved { background: rgba(255,255,255,0.25); }
.detail-panel-status.in-process { background: rgba(193,154,107,0.35); }
.detail-panel-status.closed { background: rgba(71,84,83,0.4); }
.detail-panel-status.withdrawn { background: rgba(219,0,0,0.28); }
.detail-panel-status.pending { background: rgba(245,158,11,0.3); }
.detail-panel-status.processing { background: rgba(245,158,11,0.3); }

.detail-panel-body {
    flex: 1;
    min-height: 0; /* allow the body to shrink so its scroll panes engage */
    overflow-y: auto;
    padding: 0;
    display: flex;
}

/* Two Column Layout */
.detail-panel-main {
    flex: 1;
    min-width: 0;
    min-height: 0; /* lets the content scroll instead of overflowing the panel */
    padding: 1.25rem;
    overflow-y: auto;
}

.detail-panel-sidebar {
    width: 400px;
    flex-shrink: 0;
    min-height: 0; /* scroll the sidebar independently instead of overflowing */
    background: #f8fafc;
    border-left: 1px solid #e5e7eb;
    padding: 1.5rem;
    overflow-y: auto;
}

/* ==================== Documents Required Banner ==================== */

.docs-request-banner {
    display: none;
    background: #fff;
    border: 1px solid #e5e1da;
    border-radius: 12px;
    overflow: hidden;
}

.docs-request-banner.show {
    display: block;
}

.docs-request-banner-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-bottom: 1px solid #f0dda0;
}

.docs-request-banner-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(217, 119, 6, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d97706;
    font-size: 14px;
    flex-shrink: 0;
}

.docs-request-banner-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: #92400e;
}

.docs-request-banner-subtitle {
    font-size: 0.72rem;
    color: #a16207;
}

.docs-request-list {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.docs-request-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fafaf8;
    transition: background 0.12s;
}

.docs-request-list-item:hover {
    background: #f5f3f0;
}

.docs-request-list-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #fff7ed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d97706;
    font-size: 12px;
    flex-shrink: 0;
}

.docs-request-list-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.docs-request-list-item-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #3d3a37;
    line-height: 1.3;
}

.doc-status-badge.pending {
    font-size: 0.62rem;
    font-weight: 700;
    color: #d97706;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.upload-doc-btn {
    padding: 4px 10px;
    border: 1px solid #1E6332;
    border-radius: 6px;
    background: #fff;
    color: #1E6332;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    flex-shrink: 0;
}

.upload-doc-btn:hover {
    background: #1E6332;
    color: #fff;
}

/* Panel Messages Section */
.claim-panel-messages .detail-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-msg-count {
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
}

.panel-messages-container {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    max-height: 200px;
    min-height: 120px;
    overflow-y: auto;
    margin-bottom: 0.75rem;
}

.panel-messages-list {
    padding: 0.75rem;
}

.panel-messages-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
    color: #9ca3af;
    font-size: 0.85rem;
}

.panel-messages-empty i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.panel-messages-list:not(:empty) + .panel-messages-empty {
    display: none;
}

.panel-msg-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

.panel-msg-item:last-child {
    margin-bottom: 0;
}

.panel-msg-item.user {
    flex-direction: row-reverse;
}

.panel-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--eff-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    flex-shrink: 0;
}

.panel-msg-item.user .panel-msg-avatar {
    background: #6b7280;
}

.panel-msg-content {
    max-width: 85%;
    background: #f3f4f6;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    line-height: 1.3;
}

.panel-msg-item.user .panel-msg-content {
    background: var(--eff-primary);
    color: #fff;
}

.panel-msg-time {
    font-size: 0.65rem;
    color: #9ca3af;
    margin-top: 0.15rem;
}

.panel-msg-item.user .panel-msg-time {
    text-align: right;
}

.panel-message-input {
    display: flex;
    gap: 0.5rem;
}

.panel-message-input textarea {
    flex: 1;
    resize: none;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.5rem;
    font-size: 0.85rem;
}

.panel-message-input textarea:focus {
    outline: none;
    border-color: var(--eff-primary);
}

/* Two-column layout within main panel */
.detail-panel-columns {
    display: flex;
    gap: 1rem;
}

.detail-panel-col {
    flex: 1;
    min-width: 0;
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    color: #374151;
}

.quick-action-btn:hover {
    background: #F4F0E9;
    border-color: #1E6332;
    color: #1E6332;
}

.quick-action-btn i {
    font-size: 1.25rem;
    color: #1E6332;
}

.quick-action-btn span {
    font-weight: 500;
}

.detail-section {
    margin-bottom: 1.25rem;
}

.detail-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.claim-docs-folder-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #1E6332;
    background: #F4F0E9;
    border: 1px solid #d9e7df;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.claim-docs-folder-btn:hover {
    background: #1E6332;
    border-color: #1E6332;
    color: #fff;
}

.claim-docs-folder-btn i {
    font-size: 0.78rem;
}

body.dark-theme .claim-docs-folder-btn {
    color: #6ee7b7;
    background: var(--theme-surface);
    border-color: var(--theme-border);
}

body.dark-theme .claim-docs-folder-btn:hover {
    background: #1E6332;
    border-color: #1E6332;
    color: #fff;
}

.detail-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-deceased-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1E6332;
    background: #F4F0E9;
    border: 1px solid #b7ebc9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.view-deceased-btn:hover {
    background: #1E6332;
    color: #fff;
    border-color: #1E6332;
}
.view-deceased-btn i {
    font-size: 0.7rem;
}

.detail-section-title i {
    color: #1E6332;
}

.detail-card {
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.75rem;
}

.detail-row {
    display: flex;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    width: 160px;
    color: #6c757d;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-right: 12px;
}

.detail-value {
    flex: 1;
    color: #212529;
    font-size: 0.9rem;
    font-weight: 500;
}

.detail-value a {
    color: #1E6332;
    text-decoration: none;
}

.detail-value a:hover {
    text-decoration: underline;
}

/* Financial Breakdown — reconciling ledger. Same visual rhythm as the
   manual-claim Step 3 Financial Summary (.v3-financial-readonly): a single
   bordered light box, clean rows with no per-row dividers, an emphasized
   starting figure, red negatives, and a prominent green Net with a 2px
   green top border — but using the detail-panel's own fonts/colors.
   Scoped to #claimDetailPanel so the Deceased panel is unaffected. */
#claimDetailPanel .fin-ledger {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
}
#claimDetailPanel .fin-ledger-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
}
#claimDetailPanel .fin-ledger-label {
    color: #6c757d;
    font-size: 0.9rem;
}
#claimDetailPanel .fin-ledger-value {
    color: #212529;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
}
#claimDetailPanel .fin-ledger-row.fin-ledger-sub .fin-ledger-value {
    font-weight: 700;
}
/* Section caption ("Requested" / "Funded") inside the Payment Summary ledger. */
#claimDetailPanel .fin-ledger-section {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #94a3b8;
    padding: 10px 0 3px;
    margin-top: 4px;
    border-top: 1px solid #ece7dd;
}
#claimDetailPanel .fin-ledger-section:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 2px;
}
body.dark-theme #claimDetailPanel .fin-ledger-section {
    color: var(--theme-text-muted, #94a3b8);
    border-top-color: var(--theme-border, #374151);
}
#claimDetailPanel .fin-ledger-value.fin-neg {
    color: #4b5563;
}
#claimDetailPanel .fin-ledger-value.fin-pos {
    color: #1E6332;
    font-weight: 700;
}

/* ── Left column contrast ──
   The right sidebar already sits on a soft surface (#f8fafc), so its cards read
   as distinct panels. The left column was plain white, so its white cards blended
   into the background. Give the left column the same soft surface + crisp white
   cards with a subtle shadow so each section stands out and is easy to scan.
   Scoped to #claimDetailPanel (the Deceased panel is unaffected). */
#claimDetailPanel .detail-panel-main {
    background: #f8fafc;
}
#claimDetailPanel .detail-card,
#claimDetailPanel .fin-ledger {
    background: #fff;
    border: 1px solid #e6e8ec;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}
#claimDetailPanel .detail-section-title {
    color: #214A3E;
}
#claimDetailPanel .detail-section-header {
    border-bottom-color: #d7e3db;
}
body.dark-theme #claimDetailPanel .detail-card,
body.dark-theme #claimDetailPanel .fin-ledger {
    background: var(--theme-surface-alt) !important;
    border-color: var(--theme-border) !important;
    box-shadow: none !important;
}
body.dark-theme #claimDetailPanel .detail-section-title {
    color: var(--theme-text) !important;
}

/* Claim detail loading overlay — covers the panel until all data (incl. the
   live Zoho beneficiaries / associated contacts) has loaded & rendered, or
   until the 10s safety timeout fires. NOTE: do NOT add a `position` rule on
   #claimDetailPanel here — the base .detail-panel is `position:fixed`, which
   already establishes the containing block for this absolute overlay; an ID
   override (higher specificity) would knock the panel out of `fixed` and
   break its centered modal positioning. */
.cd-loading {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: inherit;
}
.cd-loading.show { display: flex; animation: cdLoadingFade 0.18s ease; }
@keyframes cdLoadingFade { from { opacity: 0; } to { opacity: 1; } }
.cd-loading-inner { text-align: center; padding: 24px; }
.cd-loading-spinner {
    width: 52px;
    height: 52px;
    margin: 0 auto 18px;
    border: 4px solid #e5e7eb;
    border-top-color: #1E6332;
    border-radius: 50%;
    animation: progressSpin 0.85s linear infinite;
}
.cd-loading-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1E6332;
    letter-spacing: 0.2px;
}
.cd-loading-sub {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 5px;
}
body.dark-theme .cd-loading { background: var(--theme-surface) !important; }
body.dark-theme .cd-loading-spinner { border-color: var(--theme-border); border-top-color: #6ee7b7; }
body.dark-theme .cd-loading-title { color: #6ee7b7 !important; }
body.dark-theme .cd-loading-sub { color: var(--theme-text-muted) !important; }
#claimDetailPanel .fin-ledger-row.fin-ledger-total {
    border-top: 2px solid #1E6332;
    margin-top: 0.45rem;
    padding-top: 0.7rem;
}
#claimDetailPanel .fin-ledger-row.fin-ledger-total .fin-ledger-label {
    color: #1f2937;
    font-weight: 700;
    font-size: 0.95rem;
}
#claimDetailPanel .fin-ledger-row.fin-ledger-total .fin-ledger-value {
    color: #1E6332;
    font-weight: 700;
    font-size: 1.25rem;
}

/* Document tracking section — stacked label/content layout */
.doc-tracking-card {
    padding: 0 !important;
    overflow: hidden;
}
.doc-tracking-field {
    padding: 1rem 1.25rem;
}
.doc-tracking-field + .doc-tracking-field {
    border-top: 1px solid #e9ecef;
}
.doc-tracking-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #1E6332 0%, #2F8542 100%);
    color: #fff !important;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: filter 0.15s, transform 0.15s;
}
.doc-tracking-link:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    color: #fff !important;
}
.doc-tracking-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    white-space: nowrap;
    margin-bottom: 0.5rem;
}
.doc-tracking-label i {
    margin-right: 5px;
    color: #9ca3af;
}
.doc-tracking-content {
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    line-height: 1.6;
}

/* Timeline styles */
.detail-timeline {
    position: relative;
    padding-left: 24px;
}

.detail-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    padding-bottom: 0.6rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -24px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #1E6332;
}

.timeline-dot.pending { border-color: #ffc107; }
.timeline-dot.processing { border-color: #0dcaf0; }
.timeline-dot.denied { border-color: #dc3545; }
.timeline-dot.success { border-color: #1E6332; background: #1E6332; }

.timeline-content {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
}

.timeline-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.timeline-text {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.timeline-date {
    font-size: 0.8rem;
    color: #adb5bd;
}

/* Timeline claim info */
.timeline-claim-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #dee2e6;
}

.timeline-claim-id {
    font-weight: 600;
    color: #0d6efd;
    cursor: pointer;
    font-size: 0.85rem;
}

.timeline-claim-id:hover {
    text-decoration: underline;
}

.timeline-claim-insurance {
    font-size: 0.8rem;
    color: #495057;
    background: #e9ecef;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.timeline-claim-amount {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1E6332;
}

.timeline-claim-status {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.timeline-claim-status.success {
    background: #F4F0E9;
    color: #214A3E;
}

.timeline-claim-status.warning {
    background: #fff3cd;
    color: #664d03;
}

.timeline-claim-status.secondary {
    background: #e2e3e5;
    color: #41464b;
}

.timeline-claim-status.info {
    background: #cff4fc;
    color: #055160;
}

.timeline-claim-status.danger {
    background: #f8d7da;
    color: #842029;
}

/* Avatar in detail */
.detail-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.detail-avatar-sm {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Action buttons */
.detail-panel-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
    background: #fff;
    display: flex;
    gap: 0.75rem;
}

.detail-action-btn {
    flex: 1;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--eff-transition);
}

/* Mini cards for policies/claims */
.mini-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: var(--eff-transition);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.mini-card:hover {
    border-color: #1E6332;
    box-shadow: 0 4px 12px rgba(30, 99, 50,0.18);
}

.mini-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.mini-card-title {
    font-weight: 600;
    color: #212529;
}

.mini-card-claim-name {
    font-size: 0.78rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.mini-card-amount {
    font-weight: 700;
    color: #1E6332;
    font-size: 1.1rem;
}

.mini-card-details {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
}

.mini-card-details span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Docs needed alert in mini-cards (deceased detail → claim cards) */
.mini-card-docs-alert {
    margin-top: 0.5rem;
    padding: 0.5rem 0.6rem;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 6px;
}
.mini-card-docs-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 0.35rem;
}
.mini-card-docs-header i {
    color: #d97706;
    margin-right: 2px;
}
.mini-card-docs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.mini-card-doc-chip {
    display: inline-block;
    padding: 1px 7px;
    font-size: 0.68rem;
    font-weight: 500;
    color: #92400e;
    background: #fff7e0;
    border: 1px solid #fde68a;
    border-radius: 10px;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Financial breakdown in mini-cards */
.mini-card-financial {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #dee2e6;
}

.financial-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 0.25rem 0;
}

.financial-row span:first-child {
    color: #6c757d;
}

.financial-row span:last-child {
    font-weight: 500;
    color: #212529;
}

.financial-row.highlight {
    background: linear-gradient(90deg, rgba(30, 99, 50,0.08) 0%, transparent 100%);
    margin: 0.25rem -0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
}

.financial-row.highlight span:last-child {
    font-weight: 600;
    color: #1E6332;
}

.financial-row.fee span:last-child {
    color: #fd7e14;
}

/* Documents list */
.document-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: background 0.2s;
}

.document-item:hover {
    background: #e9ecef;
}

.document-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.25rem;
}

.document-icon.pdf { color: #dc3545; }
.document-icon.image { color: #1E6332; }
.document-icon.doc { color: #0d6efd; }

.document-info {
    flex: 1;
}

.document-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: #212529;
}

.document-meta {
    font-size: 0.8rem;
    color: #6c757d;
}

/* ── Claim detail "Uploaded Documents" — compact folder-style grid ── */
.cd-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(102px, 1fr));
    gap: 10px;
    padding: 2px 0;
}
.cd-doc-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 6px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}
.cd-doc-tile:hover {
    background: #f4f0e9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
/* Page-with-folded-corner icon (matches the Documents Finder) */
.cd-doc-icon {
    width: 52px;
    height: 64px;
    position: relative;
    margin-bottom: 8px;
    background: linear-gradient(180deg, #fff 0%, #f5f5f7 100%);
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1), inset 0 0 0 1px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.cd-doc-icon::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 13px;
    height: 13px;
    background: linear-gradient(135deg, #e5e5ea 50%, transparent 50%);
}
.cd-doc-icon i { font-size: 22px; }
.cd-doc-name {
    font-size: 11.5px;
    font-weight: 600;
    color: #1a1a1a;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cd-doc-meta {
    font-size: 10px;
    color: #9a9484;
    margin-top: 2px;
}
.cd-doc-dl {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #b8b2a6;
    cursor: pointer;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.cd-doc-tile:hover .cd-doc-dl { opacity: 1; }
.cd-doc-dl:hover { background: #e6efe9; color: #1E6332; }

body.dark-theme .cd-doc-tile:hover { background: var(--theme-surface-alt) !important; }
body.dark-theme .cd-doc-name { color: var(--theme-text) !important; }
body.dark-theme .cd-doc-meta { color: var(--theme-text-secondary) !important; }
body.dark-theme .cd-doc-icon { background: linear-gradient(180deg, #2c2c30 0%, #232327 100%) !important; }

.document-actions {
    display: flex;
    gap: 0.5rem;
}

.document-actions a {
    color: #6c757d;
    padding: 0.35rem;
    transition: color 0.2s;
}

.document-actions a:hover {
    color: #1E6332;
}

/* Amount summary box */
.amount-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    margin-bottom: 1rem;
}

.amount-summary-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.amount-summary-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1E6332;
}

.amount-summary-sub {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Info grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.info-grid-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.info-grid-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.info-grid-value {
    font-weight: 600;
    color: #212529;
}

/* SSN toggle eye button */
.ssn-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.ssn-eye-btn {
    background: none;
    border: none;
    padding: 2px 4px;
    cursor: pointer;
    color: #adb5bd;
    font-size: 0.82rem;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
}

.ssn-eye-btn:hover {
    color: #1E6332;
    background: rgba(30, 99, 50, 0.08);
}

/* Beneficiary cards */
.beneficiaries-count {
    font-size: 0.85rem;
    font-weight: 400;
    color: #6c757d;
}

.beneficiaries-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    color: #6c757d;
}

.beneficiaries-spinner .content-spinner-icon {
    width: 28px;
    height: 28px;
    border: 3px solid #e9ecef;
    border-top-color: #1E6332;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.beneficiaries-spinner .content-spinner-text {
    font-size: 0.85rem;
}

.beneficiaries-empty {
    text-align: center;
    padding: 1.5rem 1rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.beneficiaries-empty i {
    margin-right: 0.4rem;
    opacity: 0.6;
}

/* Beneficiary card - expandable */
.ben-card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 0.45rem;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.ben-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ben-card.expanded {
    border-color: #1E6332;
    box-shadow: 0 2px 12px rgba(30, 99, 50, 0.1);
}

.ben-card-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    background: #fff;
    transition: background 0.15s;
}

.ben-card-header:hover {
    background: #f8faf9;
}

.ben-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E6332, #20c077);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 600;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.ben-header-info {
    flex: 1;
    min-width: 0;
}

/* Associated Contacts — title shown inline next to the name */
.ben-header-inline {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    min-width: 0;
}
.ben-header-inline .ben-name {
    flex-shrink: 0;
    max-width: 55%;
}
.ben-inline-title {
    font-size: 0.82rem;
    color: #6c757d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    position: relative;
    padding-left: 0.55rem;
}
.ben-inline-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #c3c8ce;
}

.ben-name {
    font-weight: 600;
    font-size: 1.02rem;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ben-subtitle {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 2px;
}

.ben-toggle-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #1E6332;
    font-size: 0.78rem;
    font-weight: 500;
    flex-shrink: 0;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    background: rgba(30, 99, 50, 0.06);
    transition: background 0.15s, color 0.15s;
}

.ben-card-header:hover .ben-toggle-hint {
    background: rgba(30, 99, 50, 0.12);
}

.ben-toggle-hint i {
    font-size: 0.7rem;
    transition: transform 0.25s ease;
}

.ben-card.expanded .ben-toggle-hint {
    background: rgba(30, 99, 50, 0.1);
}

.ben-card.expanded .ben-toggle-hint .ben-hint-text {
    display: none;
}

.ben-card.expanded .ben-toggle-hint::before {
    content: 'Hide';
}

.ben-card.expanded .ben-toggle-hint i {
    transform: rotate(180deg);
}

.ben-card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8faf9;
}

.ben-card.expanded .ben-card-body {
    max-height: 1500px;
    border-top: 1px solid #e9ecef;
}

.ben-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #eef0f2;
    font-size: 0.92rem;
}

.ben-row:last-child {
    border-bottom: none;
}

.ben-label {
    color: #6c757d;
    font-size: 0.88rem;
    min-width: 100px;
    flex-shrink: 0;
}

.ben-value {
    color: #212529;
    font-weight: 500;
    font-size: 0.92rem;
    text-align: right;
    word-break: break-word;
    line-height: 1.45;
}

.ben-value a {
    color: #1E6332;
    text-decoration: none;
}

.ben-value a:hover {
    text-decoration: underline;
}

/* Responsive for detail panel */
@media (max-width: 700px) {
    .detail-panel {
        width: 100%;
        right: -100%;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------------------------
   Other Claims for this Decedent
   The claim tile is reused here, but the detail panel is far narrower than the
   claims grid it was designed for: the 110px ledger left the label and the
   amount fighting for the same line. Stacking the label above the figure keeps
   every amount readable no matter how large it gets.
--------------------------------------------------------------------------- */
.related-claims-stack .claim-card-ledger {
    width: 156px;
    padding: 0.5rem 0.65rem;
}
.related-claims-stack .claim-ledger-row {
    display: block;
    padding: 0.3rem 0;
    line-height: 1.3;
}
.related-claims-stack .claim-ledger-label {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}
.related-claims-stack .claim-ledger-value {
    display: block;
    text-align: right;
    font-size: 0.8rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .related-claims-stack .claim-card-ledger {
        width: 100%;
    }
}
