﻿/* claims.css - Create claim form, claims page, advanced filter bar, advanced filters panel */

/* ==================== CREATE CLAIM STYLES ==================== */
.step-nav {
    width: 280px;
    flex-shrink: 0;
    padding: 2.5rem 1.5rem 2.5rem 2.5rem;
    background: #fff;
    position: fixed;
    left: var(--sidebar-width-expanded);
    top: var(--header-height);
    bottom: 50px; /* Above footer */
    overflow-y: auto;
    z-index: 10;
    border-right: 1px solid #f0f0f0;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed sidebar state */
.sidebar-collapsed .step-nav {
    left: var(--sidebar-width-collapsed);
}

.step-item {
    display: flex;
    align-items: center;
    position: relative;
    padding-bottom: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-item:last-child {
    padding-bottom: 0;
}

/* Connecting line */
.step-item::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 50px;
    bottom: -6px;
    width: 2px;
    background-color: #dee2e6;
    transition: background-color 0.3s ease;
}

.step-item:last-child::before {
    display: none;
}

/* Completed step line turns green */
.step-item.completed::before {
    background-color: #1E6332;
}

.step-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: #6b7280;
    margin-right: 1rem;
    min-width: 46px;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: #fff;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

/* Active step - larger and highlighted */
.step-item.active .step-number {
    color: #1f2937;
    border-color: #9ca3af;
    background-color: #f9fafb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Completed step - green circle with checkmark */
.step-item.completed .step-number {
    color: #fff;
    border-color: #1E6332;
    background: #fff;
    border-width: 2.5px;
}

.step-item.completed .step-number::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.1rem;
    color: #1E6332;
}

.step-item.completed .step-number span {
    display: none;
}

.step-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.step-item:hover .step-label {
    color: #6b7280;
}

.step-item.active .step-label {
    color: #1f2937;
    text-decoration: underline;
    text-decoration-color: #1E6332;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

.step-item.completed .step-label {
    color: #1f2937;
}

.form-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2.5rem 3rem 2rem 0;
    overflow-y: auto;
}

.form-content {
    width: 100%;
    max-width: 650px;
}

.step-title {
    font-size: 2.25rem;
    font-weight: 400;
    color: #212529;
    margin-bottom: 2rem;
}

.form-label {
    font-weight: 400;
    color: #212529;
    margin-bottom: 0.625rem;
    font-size: 1.125rem;
}

.form-label .required {
    color: #dc3545;
}

.form-select, .form-control {
    font-size: 1.125rem;
    padding: 0.625rem 1rem;
    border-color: #ced4da;
    border-radius: 0.25rem;
}

.form-select:focus, .form-control:focus {
    border-color: #1E6332;
    box-shadow: 0 0 0 0.2rem rgba(30, 99, 50, 0.15);
}


.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-group .form-check {
    margin-bottom: 0;
}

.radio-group .form-check-label {
    font-size: 1.05rem;
    color: #212529;
}

.form-check-input:checked {
    background-color: #1E6332;
    border-color: #1E6332;
}

.info-notes {
    margin-top: 1.5rem;
}

.info-notes-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #212529;
    margin-bottom: 0.5rem;
}

.info-note-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 0.375rem;
}

.info-note-item i {
    color: #6c757d;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.add-card {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

.add-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.add-card-header i {
    color: #1E6332;
}

.list-table-header {
    display: flex;
    justify-content: space-between;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: #6c757d;
}

.add-link {
    color: #1E6332;
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.add-link:hover {
    text-decoration: underline;
}

.card-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.form-nav {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
}

.form-nav .save-draft-link {
    margin-left: auto;
    color: #6c757d;
    text-decoration: none;
    cursor: pointer;
}

.form-nav .save-draft-link:hover {
    text-decoration: underline;
}

.form-nav .btn-submit-claim {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #6c757d;
}

.btn-next, .btn-prev {
    padding: 0.5rem 1.5rem;
    font-size: 1.125rem;
}

.input-with-toggle {
    position: relative;
}

.input-with-toggle input {
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
}


/* ==================== CLAIMS PAGE STYLES ==================== */
.claims-page {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 2rem;
    border-radius: 1rem;
}

.claims-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(30, 99, 50, 0.1);
}

.claims-header-left h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
}

.claims-header-left h2 i {
    color: #1E6332;
    background: linear-gradient(135deg, #F4F0E9, #E8DFD0);
    padding: 0.75rem;
    border-radius: 0.75rem;
}

.claims-header-left p {
    margin: 0.5rem 0 0 0;
    color: #6b7280;
}

/* Reports Page Header */
.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(30, 99, 50, 0.1);
}

.reports-header-left h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
}

.reports-header-left h2 i {
    color: #1E6332;
    background: linear-gradient(135deg, #F4F0E9, #E8DFD0);
    padding: 0.75rem;
    border-radius: 0.75rem;
}

.reports-header-left p {
    margin: 0.5rem 0 0 0;
    color: #6b7280;
}

.reports-header-actions {
    display: flex;
    gap: 0.75rem;
}

/* ==================== ADVANCED FILTER BAR ==================== */
.claims-content .claims-filter-bar {
    position: fixed;
    top: var(--header-height);
    left: var(--sidebar-width-expanded);
    right: 0;
    z-index: 100;
    margin: 0;
    padding: 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: left 0.3s ease;
}

.sidebar-collapsed .claims-content .claims-filter-bar {
    left: var(--sidebar-width-collapsed);
}

.claims-content {
    padding-top: 90px;
    transition: padding-top 0.3s ease;
}

.claims-content.filters-open {
    padding-top: 500px;
}

@media (max-width: 991.98px) {
    .claims-content .claims-filter-bar {
        left: 0;
    }
}

/* Filter Bar Top Row */
.filter-bar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

/* Search Box */
.filter-search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
    display: flex;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 1rem;
    transition: all 0.2s ease;
}

.filter-search-box:focus-within {
    background: #fff;
    border-color: #1E6332;
    box-shadow: 0 0 0 3px rgba(30, 99, 50, 0.1);
}

.filter-search-box i {
    color: #9ca3af;
    font-size: 0.9rem;
}

.filter-search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    outline: none;
}

.filter-search-box input::placeholder {
    color: #9ca3af;
}

.search-shortcut {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: #e5e7eb;
    border-radius: 4px;
    color: #6b7280;
    font-weight: 500;
}

/* Filter Bar Actions */
.filter-bar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-toggle-btn:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e5e7eb 100%);
    border-color: #d1d5db;
}

.filter-toggle-btn.active {
    background: linear-gradient(135deg, #1E6332 0%, #214A3E 100%);
    border-color: #1E6332;
    color: #fff;
}

.filter-toggle-btn .filter-count {
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

/* Sort Control (Advanced) */
.sort-control {
    position: relative;
}

.sort-trigger-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-trigger-btn:hover {
    border-color: #1E6332;
    background: #fff;
}

.sort-trigger-btn.active {
    border-color: #1E6332;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30, 99, 50, 0.1);
}

.sort-trigger-btn i:first-child {
    color: #1E6332;
}

.sort-chevron {
    font-size: 0.65rem;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.sort-trigger-btn.active .sort-chevron {
    transform: rotate(180deg);
}

/* Sort Panel */
.sort-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    z-index: 1000;
    display: none;
    overflow: hidden;
    animation: sortPanelIn 0.2s ease-out;
}

.sort-panel.open {
    display: block;
}

@keyframes sortPanelIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sort-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #1E6332 0%, #214A3E 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}

.sort-panel-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.sort-panel-close:hover {
    background: rgba(255,255,255,0.3);
}

.sort-panel-body {
    padding: 1rem;
}

.sort-section-group {
    margin-bottom: 1rem;
}

.sort-section-group:last-child {
    margin-bottom: 0;
}

.sort-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.sort-select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #374151;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-select:hover {
    border-color: #d1d5db;
}

.sort-select:focus {
    outline: none;
    border-color: #1E6332;
    box-shadow: 0 0 0 3px rgba(30, 99, 50, 0.1);
}

.sort-select optgroup {
    font-weight: 600;
    color: #374151;
}

/* Quick Sort Presets */
.sort-quick-section {
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
}

.sort-preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.sort-preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem 0.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-preset-btn i {
    font-size: 0.9rem;
    color: #9ca3af;
    transition: color 0.2s ease;
}

.sort-preset-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.sort-preset-btn:hover i {
    color: #1E6332;
}

.sort-preset-btn.active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #1E6332;
    color: #065f46;
}

.sort-preset-btn.active i {
    color: #1E6332;
}

/* Quick Filter Presets */
.quick-filter-presets {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.5rem 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    border-top: 1px solid #f3f4f6;
}

.quick-filter-presets::-webkit-scrollbar {
    display: none;
}

.quick-filter-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.quick-filter-chip .qf-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #9ca3af;
}

.quick-filter-chip:hover {
    transform: translateY(-1px);
    opacity: 0.85;
}

.quick-filter-chip .chip-count {
    background: rgba(0, 0, 0, 0.08);
    padding: 0.05rem 0.4rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.1rem;
    min-width: 1.1rem;
    text-align: center;
}

/* Status-specific dot colors (always visible) */
.quick-filter-chip.status-all .qf-dot { background: #1E6332; }
.quick-filter-chip.status-attention .qf-dot { background: #dc2626; }
.quick-filter-chip.status-pending-docs .qf-dot { background: #a855f7; }
.quick-filter-chip.status-in-process .qf-dot { background: #ea580c; }
.quick-filter-chip.status-funded .qf-dot { background: #18A74B; }
.quick-filter-chip.status-closed .qf-dot { background: #3b82f6; }
.quick-filter-chip.status-recent .qf-dot { background: #0ea5e9; }
.quick-filter-chip.status-withdrawn .qf-dot { background: #dc2626; }

/* All (green) */
.quick-filter-chip.status-all.active {
    background: #F4F0E9; color: #1E6332; border-color: #1E6332;
}
.quick-filter-chip.status-all.active .chip-count { background: rgba(30, 99, 50,0.15); color: #1E6332; }

/* Needs Attention (red/danger) */
.quick-filter-chip.status-attention.active {
    background: #fef2f2; color: #dc2626; border-color: #dc2626;
}
.quick-filter-chip.status-attention.active .chip-count { background: rgba(220,38,38,0.15); color: #dc2626; }

/* Pending Docs (purple) */
.quick-filter-chip.status-pending-docs.active {
    background: #faf5ff; color: #7c3aed; border-color: #a855f7;
}
.quick-filter-chip.status-pending-docs.active .chip-count { background: rgba(168,85,247,0.15); color: #7c3aed; }

/* In Process (orange) */
.quick-filter-chip.status-in-process.active {
    background: #fff7ed; color: #c2410c; border-color: #ea580c;
}
.quick-filter-chip.status-in-process.active .chip-count { background: rgba(234,88,12,0.15); color: #c2410c; }

/* Funded (green) */
.quick-filter-chip.status-funded.active {
    background: #F4F0E9; color: #1E6332; border-color: #18A74B;
}
.quick-filter-chip.status-funded.active .chip-count { background: rgba(47, 133, 66,0.15); color: #1E6332; }

/* Closed (blue) */
.quick-filter-chip.status-closed.active {
    background: #eff6ff; color: #1d4ed8; border-color: #3b82f6;
}
.quick-filter-chip.status-closed.active .chip-count { background: rgba(59,130,246,0.15); color: #1d4ed8; }

/* Recent (sky blue) */
.quick-filter-chip.status-recent.active {
    background: #f0f9ff; color: #0369a1; border-color: #0ea5e9;
}
.quick-filter-chip.status-recent.active .chip-count { background: rgba(14,165,233,0.15); color: #0369a1; }

/* Withdrawn (red) */
.quick-filter-chip.status-withdrawn.active {
    background: #fef2f2; color: #dc2626; border-color: #dc2626;
}
.quick-filter-chip.status-withdrawn.active .chip-count { background: rgba(220,38,38,0.15); color: #dc2626; }

/* Withdrawn Toggle — inline switch in quick filter bar */
.withdrawn-toggle-divider {
    width: 1px;
    height: 20px;
    background: #d1d5db;
    flex-shrink: 0;
    margin: 0 0.2rem;
}

.withdrawn-toggle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
    margin: 0;
    padding: 0.25rem 0.5rem;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.withdrawn-toggle:hover {
    background: #f3f4f6;
}

.withdrawn-toggle input[type="checkbox"] {
    display: none;
}

.withdrawn-toggle-slider {
    position: relative;
    width: 32px;
    height: 18px;
    background: #d1d5db;
    border-radius: 9px;
    transition: background 0.25s ease;
    flex-shrink: 0;
}

.withdrawn-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.withdrawn-toggle input:checked + .withdrawn-toggle-slider {
    background: #dc2626;
}

.withdrawn-toggle input:checked + .withdrawn-toggle-slider::after {
    transform: translateX(14px);
}

.withdrawn-toggle-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    transition: color 0.2s ease;
}

.withdrawn-toggle input:checked ~ .withdrawn-toggle-text {
    color: #dc2626;
    font-weight: 600;
}

/* Active Filters Row */
.active-filters-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.5rem;
    background: #fefce8;
    border-top: 1px solid #fef08a;
}

.active-filters-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #854d0e;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.active-filters-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    flex: 1;
}

.active-filter-chip {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    background: #fff;
    border: 1px solid #fde047;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #713f12;
}

.active-filter-chip .remove-filter {
    cursor: pointer;
    margin-left: 0.2rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.active-filter-chip .remove-filter:hover {
    opacity: 1;
}

.clear-all-filters-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    background: transparent;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #92400e;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-all-filters-btn:hover {
    background: #fef3c7;
}

/* ==================== SAVED FILTERS ROW ==================== */
.saved-filters-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    overflow-x: auto;
    scrollbar-width: none;
}
.saved-filters-row::-webkit-scrollbar {
    display: none;
}
.saved-filters-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.saved-filters-label i {
    color: #6366f1;
    font-size: 0.7rem;
}
.saved-filters-chips {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}
.saved-filters-chips::-webkit-scrollbar {
    display: none;
}
.saved-filter-chip {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 16px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #4338ca;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.saved-filter-chip:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.15);
}
.saved-filter-chip.active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}
.saved-filter-chip.active i {
    color: #fff;
}
.saved-filter-chip i.fa-bookmark {
    font-size: 0.65rem;
    color: #6366f1;
}
.saved-filter-chip.active i.fa-bookmark {
    color: rgba(255, 255, 255, 0.8);
}
.saved-filter-chip .saved-filter-delete {
    font-size: 0.6rem;
    color: #818cf8;
    margin-left: 0.15rem;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
    padding: 2px;
}
.saved-filter-chip:hover .saved-filter-delete {
    opacity: 1;
}
.saved-filter-chip.active .saved-filter-delete {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}
.saved-filter-chip .saved-filter-delete:hover {
    color: #dc2626 !important;
}
/* Save Filter Button */
.save-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    background: transparent;
    border: 1px dashed #94a3b8;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.save-filter-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #eef2ff;
}
/* Inline Name Prompt */
.saved-filter-prompt {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}
.saved-filter-prompt input {
    width: 150px;
    padding: 0.3rem 0.6rem;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    font-size: 0.78rem;
    background: #fff;
    color: #1e1b4b;
}
.saved-filter-prompt input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}
.saved-filter-confirm-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: #6366f1;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    transition: background 0.15s ease;
}
.saved-filter-confirm-btn:hover {
    background: #4f46e5;
}
.saved-filter-cancel-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    transition: all 0.15s ease;
}
.saved-filter-cancel-btn:hover {
    border-color: #dc2626;
    color: #dc2626;
}

/* ==================== ADVANCED FILTERS PANEL ==================== */
.advanced-filters-panel {
    max-height: calc(100vh - var(--header-height) - 200px);
    max-height: calc(100dvh - var(--header-height) - 200px);
    background: #fff;
    border-top: 1px solid #e5e7eb;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.advanced-filters-panel.open {
    display: flex;
}

/* Filters Grid - Scrollable */
.advanced-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    overflow-y: auto;
    flex: 1;
    align-content: start;
}

@media (min-width: 1400px) {
    .advanced-filters-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .advanced-filters-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }
}

@media (max-width: 900px) {
    .advanced-filters-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
}

@media (max-width: 600px) {
    .advanced-filters-grid {
        grid-template-columns: 1fr;
    }

    .filter-section-wide {
        grid-column: span 1 !important;
    }
}

/* Filter Section */
.filter-section {
    background: #f9fafb;
    border-radius: 8px;
    padding: 0.65rem;
    border: 1px solid #e5e7eb;
    min-width: 0;
    height: fit-content;
}

.filter-section-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-section-header i {
    color: #1E6332;
    font-size: 0.75rem;
}

/* Filter Checkbox Group */
.filter-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-checkbox-group.scrollable {
    max-height: 100px;
    overflow-y: auto;
    padding-right: 0.25rem;
    scrollbar-width: thin;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    padding: 0.25rem 0.35rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.filter-checkbox:hover {
    background: #e5e7eb;
}

.filter-checkbox input {
    display: none;
}

.checkbox-custom {
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.filter-checkbox input:checked + .checkbox-custom {
    background: #1E6332;
    border-color: #1E6332;
}

.filter-checkbox input:checked + .checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.55rem;
    color: #fff;
}

.checkbox-label {
    font-size: 0.75rem;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkbox-label i {
    font-size: 0.7rem;
}

/* Date Filter */
.filter-date-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.date-preset-btn {
    padding: 0.2rem 0.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-preset-btn:hover,
.date-preset-btn.active {
    background: #1E6332;
    border-color: #1E6332;
    color: #fff;
}

.filter-date-inputs {
    display: flex;
    gap: 0.35rem;
}

.date-input-group {
    flex: 1;
    min-width: 0;
}

.date-input-group label {
    display: block;
    font-size: 0.65rem;
    color: #6b7280;
    margin-bottom: 0.2rem;
}

.date-input-group input {
    width: 100%;
    padding: 0.3rem 0.4rem;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 0.7rem;
    background: #fff;
}

.date-input-group input:focus {
    outline: none;
    border-color: #1E6332;
}

/* Amount Filter */
.filter-amount-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.amount-preset-btn {
    padding: 0.2rem 0.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.amount-preset-btn:hover,
.amount-preset-btn.active {
    background: #1E6332;
    border-color: #1E6332;
    color: #fff;
}

.filter-range-inputs {
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
}

.range-input-group {
    flex: 1;
    min-width: 0;
}

.range-input-group label {
    display: block;
    font-size: 0.65rem;
    color: #6b7280;
    margin-bottom: 0.2rem;
}

.currency-input {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.currency-input span {
    padding: 0.4rem 0.5rem;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.8rem;
    border-right: 1px solid #e5e7eb;
}

.currency-input input {
    flex: 1;
    border: none;
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    outline: none;
    width: 100%;
    min-width: 0;
}

.range-separator {
    color: #9ca3af;
    padding-bottom: 0.4rem;
}

/* Fee Slider */
.filter-slider-container {
    padding: 0.5rem 0;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.slider-labels span:nth-child(2) {
    font-weight: 600;
    color: #1E6332;
}

.filter-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #1E6332 0%, #e5e7eb 0%);
    outline: none;
}

.filter-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1E6332;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.filter-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.fee-filter-options {
    margin-top: 0.75rem;
}

/* Search Select */
.filter-search-select {
    margin-bottom: 0.5rem;
}

.filter-search-select input {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.8rem;
    background: #fff;
}

.filter-search-select input:focus {
    outline: none;
    border-color: #1E6332;
}

/* Sort Options */
.filter-sort-options select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85rem;
    background: #fff;
    cursor: pointer;
    color: #374151;
}

.filter-sort-options select:focus {
    outline: none;
    border-color: #1E6332;
}

/* Full-width Select for Sort */
.filter-select-full {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.8rem;
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") right 0.5rem center/12px no-repeat;
    cursor: pointer;
    color: #374151;
    appearance: none;
}

.filter-select-full:focus {
    outline: none;
    border-color: #1E6332;
    box-shadow: 0 0 0 2px rgba(30, 99, 50, 0.1);
}

.filter-select-full optgroup {
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
}

.filter-select-full option {
    font-weight: normal;
    padding: 0.5rem;
}

/* Comprehensive Sort Section */
.filter-section-wide {
    grid-column: span 2;
}

@media (max-width: 1100px) {
    .filter-section-wide {
        grid-column: span 1;
    }
}

.filter-sort-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 500px) {
    .filter-sort-grid {
        grid-template-columns: 1fr;
    }
}

.sort-group label {
    display: block;
    font-size: 0.7rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.sort-group select {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.8rem;
    background: #fff;
    cursor: pointer;
    color: #374151;
}

.sort-group select:focus {
    outline: none;
    border-color: #1E6332;
    box-shadow: 0 0 0 2px rgba(30, 99, 50, 0.1);
}

.sort-group select optgroup {
    font-weight: 600;
    color: #374151;
}

.sort-group select option {
    font-weight: normal;
    padding: 0.5rem;
}

.sort-quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.sort-quick-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.55rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-quick-btn:hover {
    background: #1E6332;
    border-color: #1E6332;
    color: #fff;
}

.sort-quick-btn.active {
    background: #1E6332;
    border-color: #1E6332;
    color: #fff;
}

.sort-quick-btn i {
    font-size: 0.6rem;
}

/* Filter Panel Actions - Fixed at bottom */
.filter-panel-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.filter-panel-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-panel-btn.secondary {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #4b5563;
}

.filter-panel-btn.secondary:hover {
    background: #e5e7eb;
}

.filter-panel-btn.primary {
    background: linear-gradient(135deg, #1E6332 0%, #214A3E 100%);
    border: none;
    color: #fff;
}

.filter-panel-btn.primary:hover {
    background: linear-gradient(135deg, #214A3E 0%, #214A3E 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 99, 50, 0.3);
}

.claims-kpis-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1200px) { .claims-kpis-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .claims-kpis-grid { grid-template-columns: 1fr; } }

.claims-kpi-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.claims-kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.claims-kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.claims-kpi-icon.total { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); color: #4338ca; }
.claims-kpi-icon.funded { background: linear-gradient(135deg, #F4F0E9, #E8DFD0); color: #166534; }
.claims-kpi-icon.processing { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }
.claims-kpi-icon.value { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1d4ed8; }

.claims-kpi-content { display: flex; flex-direction: column; }
.claims-kpi-value { font-size: 1.5rem; font-weight: 700; color: #1f2937; }
.claims-kpi-label { font-size: 0.8rem; color: #6b7280; font-weight: 500; }

.claims-filter-bar {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.04);
}

.claims-filter-group { display: flex; align-items: center; }

.claims-search-wrapper {
    position: relative;
    width: 280px;
}

.claims-search-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.claims-search-input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.claims-search-input:focus {
    outline: none;
    border-color: #1E6332;
    box-shadow: 0 0 0 4px rgba(30, 99, 50, 0.1);
}

.claims-filter-select {
    padding: 0.65rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 140px;
    transition: all 0.2s ease;
}

.claims-filter-select:focus {
    outline: none;
    border-color: #1E6332;
    box-shadow: 0 0 0 4px rgba(30, 99, 50, 0.1);
}

.claims-filter-actions {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
}

.claims-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.25s ease;
}

.claims-action-btn:hover {
    background: linear-gradient(135deg, #F4F0E9, #F4F0E9);
    border-color: #1E6332;
    color: #1E6332;
    transform: translateY(-2px);
}

.claims-action-btn.primary {
    background: linear-gradient(135deg, #1E6332 0%, #214A3E 100%);
    border-color: transparent;
    color: #fff;
}

.claims-action-btn.primary:hover {
    background: linear-gradient(135deg, #214A3E 0%, #214A3E 100%);
    transform: translateY(-2px);
}

.claims-table-container {
    background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.04);
}

.claims-table-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #F4F0E9 0%, #F4F0E9 100%);
}

.claims-table-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #166534;
}

.claims-table-info {
    font-size: 0.85rem;
    color: #166534;
    font-weight: 500;
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

.claims-table-wrap {
    overflow-x: auto;
    position: relative;
    scrollbar-width: none; /* Firefox: hide native scrollbar */
}

.claims-table-wrap::-webkit-scrollbar {
    display: none; /* Chrome/Safari: hide native scrollbar */
}

/* Sticky horizontal scrollbar proxy — stays at viewport bottom */
.claims-sticky-scrollbar {
    position: sticky;
    bottom: 0;
    z-index: 13;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.claims-scrollbar-inner {
    overflow-x: auto;
    overflow-y: hidden;
}

.claims-scrollbar-spacer {
    height: 1px;
}

.claims-table {
    min-width: 1200px;
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.claims-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.claims-table td {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    white-space: nowrap;
}

/* Sticky Actions column (last column) */
.claims-table th:last-child,
.claims-table td:last-child {
    position: sticky;
    right: 0;
    z-index: 11;
    background: #fff;
    box-shadow: -4px 0 8px rgba(0,0,0,0.06);
}

.claims-table th:last-child {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    z-index: 12;
}

.claims-table tbody tr:hover td:last-child {
    background: linear-gradient(135deg, #F4F0E9 0%, #f8fafc 100%);
}

/* Sortable column headers */
.claims-sortable-th {
    cursor: pointer;
    user-select: none;
}
.claims-sortable-th:hover {
    color: #1E6332;
    background: linear-gradient(135deg, #F4F0E9 0%, #F4F0E9 100%);
}
.claims-sort-indicator {
    display: inline-block;
    width: 14px;
    font-size: 0.65rem;
    opacity: 0.35;
    vertical-align: middle;
    margin-left: 2px;
}
.claims-sort-indicator::after {
    content: '▲▼';
}
.claims-sort-indicator.asc::after {
    content: '▲';
    opacity: 1;
}
.claims-sort-indicator.desc::after {
    content: '▼';
    opacity: 1;
}
.claims-sort-indicator.asc,
.claims-sort-indicator.desc,
.claims-sort-indicator.active {
    color: #1E6332;
    opacity: 1;
}
.claims-sort-indicator.active::after {
    content: '▼';
}

.claims-table tbody tr {
    transition: all 0.2s ease;
    cursor: pointer;
}

.claims-table tbody tr:hover {
    background: linear-gradient(135deg, #F4F0E9 0%, #f8fafc 100%);
}

.claims-table .claim-id-link {
    color: #1E6332;
    font-weight: 600;
    text-decoration: none;
}

.claims-table .claim-id-link:hover {
    text-decoration: underline;
}

.claims-table .compact-cell {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.claims-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-radius: 0 0 1rem 1rem;
    gap: 1rem;
}

.claims-per-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
    white-space: nowrap;
}

.claims-per-page select {
    padding: 0.3rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: #374151;
    background: #fff;
    cursor: pointer;
    outline: none;
}

.claims-per-page select:focus {
    border-color: #1E6332;
    box-shadow: 0 0 0 2px rgba(30, 99, 50, 0.15);
}

.claims-pagination-nav {
    flex: 1;
}

.claims-pagination-nav .pagination {
    margin: 0;
}

.claims-pagination-nav .page-link {
    color: #1E6332;
    border-color: #d1d5db;
}

.claims-pagination-nav .page-link:hover {
    background: #e8f5e9;
    color: #146c43;
    border-color: #1E6332;
}

.claims-pagination-nav .page-item.active .page-link {
    background: #1E6332;
    border-color: #1E6332;
    color: #fff;
}

.claims-pagination-nav .page-item.disabled .page-link {
    color: #adb5bd;
}

/* ==================== CONTENT SPINNER (shared: claims + deceased) ==================== */
.content-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1rem;
    grid-column: 1 / -1; /* span full grid width */
    min-height: 200px;
}

.content-spinner-icon {
    width: 48px;
    height: 48px;
    border: 3px solid #e9ecef;
    border-top-color: #1E6332;
    border-radius: 50%;
    animation: progressSpin 0.8s linear infinite;
}

.content-spinner-text {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

/* Table spinner row */
.table-spinner-row td {
    text-align: center;
    padding: 3rem 1rem !important;
}

.table-spinner-row .content-spinner {
    padding: 2rem 1rem;
    min-height: auto;
}

/* Inline "still loading" banner — shown below cards while a data stream is in-flight */
.data-still-loading-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    margin-top: 0.75rem;
    background: #F4F0E9;
    border: 1px solid #c3e6cb;
    border-radius: 0.5rem;
    color: #1E6332;
    font-size: 0.85rem;
    font-weight: 500;
}

.data-still-loading-banner .sidebar-link-spinner {
    width: 16px;
    height: 16px;
    border-width: 2px;
    position: static;
    margin: 0;
}

/* Claims & Reports Tabs */
.claims-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.25rem;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 0.75rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.04);
    width: fit-content;
}

.claims-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.25s ease;
}

.claims-tab:hover {
    color: #1E6332;
    background: rgba(30, 99, 50, 0.05);
}

.claims-tab.active {
    background: linear-gradient(135deg, #1E6332 0%, #214A3E 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(30, 99, 50, 0.3);
}

.claims-tab i {
    font-size: 1rem;
}

.claims-tab-content {
    display: none;
}

.claims-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Reports KPIs Grid */
.reports-kpis-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.reports-kpis-grid.financial-grid {
    grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 1400px) { .reports-kpis-grid.financial-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1200px) { .reports-kpis-grid { grid-template-columns: repeat(2, 1fr); } .reports-kpis-grid.financial-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .reports-kpis-grid { grid-template-columns: 1fr; } .reports-kpis-grid.financial-grid { grid-template-columns: 1fr; } }

.reports-kpi-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.reports-kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.reports-kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #4338ca;
}

.reports-kpi-card.success .reports-kpi-icon { background: linear-gradient(135deg, #F4F0E9, #E8DFD0); color: #166534; }
.reports-kpi-card.info .reports-kpi-icon { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1d4ed8; }
.reports-kpi-card.warning .reports-kpi-icon { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }

.reports-kpi-content { display: flex; flex-direction: column; }
.reports-kpi-value { font-size: 1.5rem; font-weight: 700; color: #1f2937; }
.reports-kpi-label { font-size: 0.8rem; color: #6b7280; font-weight: 500; }

/* Reports Charts */
.reports-charts-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 992px) { .reports-charts-row { grid-template-columns: 1fr; } }

.reports-chart-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.04);
    overflow: hidden;
}

.reports-chart-card.full-width {
    margin-bottom: 1.5rem;
}

.reports-chart-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #F4F0E9 0%, #F4F0E9 100%);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reports-chart-header h5 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #166534;
}

.chart-legend {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #6b7280;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.funded { background: #18A74B; }
.legend-dot.processing { background: #f59e0b; }
.legend-dot.closed { background: #3b82f6; }

.reports-chart-body {
    padding: 1.25rem;
}

/* Reports Data Section */
.reports-data-section {
    background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
}

.reports-data-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #F4F0E9 0%, #F4F0E9 100%);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reports-data-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #166534;
}

.column-manager {
    position: relative;
}

.reports-action-btn.small {
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
}

.column-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 0.75rem;
    min-width: 180px;
    z-index: 100;
}

.column-dropdown.show {
    display: block;
}

.column-dropdown label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 0.25rem;
}

.column-dropdown label:hover {
    background: #f3f4f6;
}

.reports-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.reports-detail-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.reports-detail-table th.sortable {
    cursor: pointer;
    transition: background 0.2s ease;
}

.reports-detail-table th.sortable:hover {
    background: #e2e8f0;
}

.reports-detail-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.reports-detail-table tbody tr {
    transition: all 0.2s ease;
    cursor: pointer;
}

.reports-detail-table tbody tr:hover {
    background: linear-gradient(135deg, #F4F0E9 0%, #f8fafc 100%);
}

.reports-table-footer {
    padding: 1rem 1.25rem;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.reports-footer-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.reports-showing {
    font-size: 0.8rem;
    color: #6b7280;
}

.reports-per-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.reports-per-page select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.8rem;
    background: #fff;
    cursor: pointer;
}

.reports-per-page select:focus {
    outline: none;
    border-color: #1E6332;
}

/* Dynamic Chart Styles */
.simple-bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 180px;
    padding: 0 10px;
}

.bar-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 80px;
}

.bar-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.bar {
    width: 40px;
    min-height: 10px;
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease;
}

.bar-label {
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 0.5rem;
    text-align: center;
}

.donut-chart-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.5rem;
}

.donut-chart {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donut-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.donut-label {
    font-size: 0.65rem;
    color: #6b7280;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-name {
    color: #374151;
    flex: 1;
    min-width: 80px;
}

.legend-count {
    font-weight: 600;
    color: #1f2937;
}

.trend-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 130px;
    padding: 0 5px;
}

.trend-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.trend-bar-stack {
    width: 20px;
    display: flex;
    flex-direction: column;
    border-radius: 3px 3px 0 0;
    overflow: hidden;
    min-height: 5px;
}

.trend-segment {
    min-height: 0;
}

.trend-segment.funded { background: #18A74B; }
.trend-segment.processing { background: #f59e0b; }
.trend-segment.closed { background: #3b82f6; }

.trend-label {
    font-size: 0.65rem;
    color: #6b7280;
    margin-top: 0.35rem;
}

/* Mini badges for reports */
.mini-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.mini-badge.funded { background: #F4F0E9; color: #166534; }
.mini-badge.processing { background: #fef3c7; color: #d97706; }
.mini-badge.closed { background: #dbeafe; color: #1e40af; }
.mini-badge.withdrawn { background: #fee2e2; color: #dc2626; }

/* ==================== REVIEW & SUBMIT (Step 5) ==================== */
.review-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.review-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f8faf9;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.95rem;
}

.review-edit-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: #1E6332;
    cursor: pointer;
    text-decoration: none;
}

.review-edit-link:hover {
    text-decoration: underline;
    color: #214A3E;
}

.review-section-body {
    padding: 1rem;
}

.review-item {
    padding: 0.25rem 0;
    font-size: 0.9rem;
    color: #374151;
}

/* Review step number badge */
.review-step-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: #94a3b8;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 6px;
}

.review-section-body .table {
    font-size: 0.85rem;
}

/* Financial breakdown + summary styles → shared in create-claim-v2.css (.fp-bd-*, .fp-fs-*) */

.classic-info-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 4px;
}

.classic-info-note i {
    color: #1E6332;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Family Pay chip styles → shared in create-claim-v2.css (.fp-promo-*, .fp-chip*) */

.classic-action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.classic-action-buttons .btn {
    flex: 1;
    min-width: 200px;
    padding: 10px 20px;
    font-weight: 500;
    border-radius: 8px;
}

/* === Policy Completeness Checklist === */
.policy-checklist {
    background: #fffbeb;
    border: 1.5px solid #f59e0b;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.policy-checklist.complete {
    background: #F4F0E9;
    border-color: #18A74B;
}

.policy-checklist-header {
    margin-bottom: 10px;
}

.policy-checklist-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.policy-checklist-label {
    font-weight: 600;
    font-size: 0.82rem;
    color: #1f2937;
}

.policy-checklist-progress {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.policy-checklist-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.policy-checklist-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #18A74B);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.policy-checklist.complete .policy-checklist-bar-fill {
    background: #18A74B;
}

.policy-checklist-hint {
    font-size: 0.74rem;
    color: #6b7280;
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 8px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
}

.policy-checklist-hint i {
    color: #3b82f6;
    margin-right: 4px;
    font-style: normal;
}

.policy-checklist-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.8rem;
    line-height: 1.3;
}

.policy-checklist-row.provided i {
    color: #18A74B;
    font-size: 0.82rem;
}

.policy-checklist-row.provided span {
    color: #374151;
}

.policy-checklist-row.missing i {
    color: #f59e0b;
    font-size: 0.82rem;
}

.policy-checklist-row.missing span {
    color: #92400e;
    font-weight: 500;
}

/* === Policy Warning Badge (on cards + review headers) === */
.policy-warn-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: default;
    white-space: nowrap;
    vertical-align: middle;
}

.policy-warn-badge i {
    font-size: 0.7rem;
    color: #f59e0b;
}

.policy-warn-badge.review {
    padding: 3px 10px;
    font-size: 0.76rem;
    margin-left: 4px;
}

/* === Policy Tooltip (hover popover) === */
.policy-tooltip {
    position: fixed;
    z-index: 99999;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.06);
    display: none;
    width: 320px;
    max-height: 80vh;
    overflow-y: auto;
}

.policy-tooltip .policy-checklist {
    margin-bottom: 12px;
}

.policy-tooltip .policy-checklist:last-child {
    margin-bottom: 0;
}

/* === Live Policy Checklist (inline form) === */
.policy-live-checklist {
    margin: 16px 0 8px;
}

.policy-live-checklist .policy-checklist {
    margin-bottom: 0;
}

/* === Unsaved Changes Modal === */
.draft-unsaved-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: draftFadeIn 0.2s ease;
}

@keyframes draftFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.draft-unsaved-modal {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: draftScaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes draftScaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.draft-unsaved-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fef3c7;
    color: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 16px;
}

.draft-unsaved-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.draft-unsaved-text {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 24px;
}

.draft-unsaved-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.draft-unsaved-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}

.draft-unsaved-btn-save {
    background: #1E6332;
    color: #fff;
}

.draft-unsaved-btn-save:hover {
    background: #214A3E;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 99, 50, 0.3);
}

.draft-unsaved-btn-discard {
    background: #fee2e2;
    color: #dc2626;
}

.draft-unsaved-btn-discard:hover {
    background: #fecaca;
}

.draft-unsaved-btn-cancel {
    background: #f1f5f9;
    color: #475569;
}

.draft-unsaved-btn-cancel:hover {
    background: #e2e8f0;
}

/* === Classic Submission Warning === */

.review-section-body .table th {
    font-weight: 600;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.review-section-body .table td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
}
