:root {
    --bs-font-sans-serif: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
    --eff-primary: #198754;
    --eff-primary-dark: #157347;
    --eff-primary-light: #d1e7dd;
    --eff-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --eff-shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    --eff-transition: all 0.3s ease;
    /* Sidebar variables */
    --sidebar-width-expanded: 260px;
    --sidebar-width-collapsed: 72px;
    --sidebar-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 60px;
}

* {
    font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8f9fa;
}

/* ==================== GLOBAL ENHANCEMENTS ==================== */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hover-lift {
    transition: var(--eff-transition);
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--eff-shadow-hover);
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
}

.toast-notification {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid var(--eff-primary);
}

.toast-notification.toast-success { border-left-color: #198754; }
.toast-notification.toast-error { border-left-color: #dc3545; }
.toast-notification.toast-warning { border-left-color: #ffc107; }
.toast-notification.toast-info { border-left-color: #0dcaf0; }

.toast-notification .toast-icon {
    font-size: 1.25rem;
}

.toast-notification.toast-success .toast-icon { color: #198754; }
.toast-notification.toast-error .toast-icon { color: #dc3545; }
.toast-notification.toast-warning .toast-icon { color: #ffc107; }
.toast-notification.toast-info .toast-icon { color: #0dcaf0; }

.toast-notification .toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 8px;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
    z-index: 10;
    position: relative;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-notification .toast-close:hover {
    color: #dc3545;
    transform: scale(1.2);
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Modal Enhancements */
.modal-confirm {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    align-items: center;
    justify-content: center;
}

.modal-confirm.show {
    display: flex;
}

.modal-confirm-content {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    text-align: center;
    animation: fadeIn 0.2s ease-out;
}

.modal-confirm-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.modal-confirm-icon.success { background: #d1e7dd; color: #198754; }
.modal-confirm-icon.warning { background: #fff3cd; color: #664d03; }
.modal-confirm-icon.danger { background: #f8d7da; color: #dc3545; }

/* Notification Dropdown */
.notification-dropdown {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.notification-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.notification-menu.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #f0fff4;
}

.notification-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-item-icon.success { background: #d1e7dd; color: #198754; }
.notification-item-icon.info { background: #cfe2ff; color: #084298; }
.notification-item-icon.warning { background: #fff3cd; color: #664d03; }

.notification-footer {
    padding: 0.75rem;
    text-align: center;
    border-top: 1px solid #dee2e6;
}

/* Search Box Enhancement */
.search-box {
    position: relative;
}

.search-box input {
    padding-left: 2.5rem;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    transition: var(--eff-transition);
}

.search-box input:focus {
    border-color: var(--eff-primary);
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.1);
}

.search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* Global Search Results */
.global-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1050;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 4px;
}

.search-result-section {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.search-result-section:last-child {
    border-bottom: none;
}

.search-result-section-title {
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item .result-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.search-result-item .result-icon.claim { background: #d1e7dd; color: #198754; }
.search-result-item .result-icon.deceased { background: #cfe2ff; color: #0d6efd; }

.search-result-item .result-info {
    flex: 1;
    min-width: 0;
}

.search-result-item .result-title {
    font-weight: 500;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-item .result-subtitle {
    font-size: 12px;
    color: #6c757d;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #6c757d;
}

/* ==================== INTRO/LOGIN STYLES ==================== */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 50%, #1a472a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: introFadeOut 0.5s ease-out 2.5s forwards;
}

@keyframes introFadeOut {
    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

.intro-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.intro-overlay.hidden {
    display: none;
}

.intro-logo {
    width: 300px;
    height: 300px;
    animation: assembleFromChaos 2s ease-out forwards;
}

@keyframes assembleFromChaos {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-180deg);
        filter: blur(20px);
    }
    30% {
        opacity: 0.5;
        transform: scale(0.6) rotate(-90deg);
        filter: blur(10px);
    }
    60% {
        opacity: 0.8;
        transform: scale(0.9) rotate(-20deg);
        filter: blur(5px);
    }
    80% {
        transform: scale(1.05) rotate(5deg);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: blur(0);
    }
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.login-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
}

.login-logo {
    max-width: 280px;
    height: auto;
    margin-bottom: 1.5rem;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 500;
    color: #212529;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #6c757d;
    margin-bottom: 2rem;
}

/* Demo User Selection */
.demo-users-section {
    margin-top: 0.5rem;
}

.demo-user-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.demo-user-card {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.demo-user-card.admin {
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    border-color: #fecaca;
}

.demo-user-card.admin:hover {
    border-color: #f87171;
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.2);
    transform: translateX(4px);
}

.demo-user-card.standard {
    background: linear-gradient(135deg, #f0fdf4 0%, #fff 100%);
    border-color: #bbf7d0;
}

.demo-user-card.standard:hover {
    border-color: #22c55e;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
    transform: translateX(4px);
}

.demo-user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 0.875rem;
    flex-shrink: 0;
}

.demo-user-avatar.admin {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: #fff;
}

.demo-user-avatar.standard {
    background: linear-gradient(135deg, #22c55e 0%, #4ade80 100%);
    color: #fff;
}

.demo-user-info {
    flex: 1;
}

.demo-user-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.demo-user-email {
    font-size: 0.8rem;
    color: #6b7280;
}

.demo-user-badge {
    display: inline-block;
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    margin-top: 0.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.demo-user-badge.admin {
    background: #fef2f2;
    color: #dc2626;
}

.demo-user-badge.standard {
    background: #f0fdf4;
    color: #16a34a;
}

.demo-user-arrow {
    color: #9ca3af;
    transition: transform 0.3s ease;
}

.demo-user-card:hover .demo-user-arrow {
    transform: translateX(4px);
    color: #6b7280;
}

/* ==================== HEADER STYLES ==================== */
.main-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 0 1.5rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1030;
}

/* Header Mobile Logo (visible only on mobile) */
.header-mobile-logo {
    display: none;
    text-decoration: none;
}

.header-mobile-logo img {
    height: 32px;
    width: auto;
}

@media (max-width: 991px) {
    .header-mobile-logo {
        display: flex;
        align-items: center;
        margin-left: 0.75rem;
    }
}

.header-logo {
    height: 40px;
    padding: 0;
}

.nav-item .nav-link {
    color: #212529;
    font-size: 1.125rem;
    padding: 1.125rem 1rem;
    position: relative;
}

.nav-item .nav-link:hover {
    color: #198754;
}

.nav-item .nav-link.active {
    color: #198754;
}

.nav-item .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #198754;
}

.draft-badge {
    position: absolute;
    top: 8px;
    right: -2px;
    font-size: 0.65rem;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

.profile-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

/* ==================== SIDEBAR NAVIGATION ==================== */

/* Main Sidebar Container */
.app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width-expanded);
    background: #fff;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: var(--sidebar-transition);
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}

/* Collapsed State */
.app-sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
}

.app-sidebar.collapsed .sidebar-text,
.app-sidebar.collapsed .sidebar-brand-text {
    opacity: 0;
    visibility: hidden;
    width: 0;
    white-space: nowrap;
}

.app-sidebar.collapsed .sidebar-toggle-icon {
    transform: rotate(180deg);
}

.app-sidebar.collapsed .sidebar-header {
    padding: 1rem 0.75rem;
    justify-content: center;
}

.app-sidebar.collapsed .sidebar-brand {
    justify-content: center;
}

.app-sidebar.collapsed .sidebar-logo {
    margin-right: 0;
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
    min-height: var(--header-height);
    gap: 0.75rem;
}

.app-sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 1rem 0.75rem;
    flex-direction: column;
    gap: 0.5rem;
}

/* Sidebar Brand (Logo/Avatar) */
.sidebar-brand-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
    height: 40px;
    overflow: hidden;
}

.sidebar-brand-logo {
    display: flex;
    align-items: center;
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand-logo img {
    height: 36px;
    width: auto;
}

.sidebar-brand-avatar {
    position: absolute;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand-avatar span {
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Collapsed state - show avatar, hide logo */
.app-sidebar.collapsed .sidebar-brand-logo {
    opacity: 0;
    transform: scale(0.5);
}

.app-sidebar.collapsed .sidebar-brand-avatar {
    opacity: 1;
    transform: scale(1);
}

.app-sidebar.collapsed .sidebar-brand-container {
    width: 40px;
    height: 40px;
    justify-content: center;
}

.sidebar-toggle {
    background: none;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    cursor: pointer;
    transition: var(--sidebar-transition);
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: #f8f9fa;
    color: #198754;
    border-color: #198754;
}

.sidebar-toggle-icon {
    transition: transform 0.3s ease;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    margin: 0.25rem 0.75rem;
}

/* Sidebar Separators with Labels */
.sidebar-separator {
    margin: 0.75rem 0.75rem 0.25rem 0.75rem;
    padding: 0.5rem 1rem 0.25rem 1rem;
    border-top: 1px solid #e9ecef;
}

.sidebar-separator:first-of-type {
    border-top: none;
    margin-top: 0.25rem;
}

.sidebar-separator-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
}

.app-sidebar.collapsed .sidebar-separator {
    padding: 0.5rem 0;
    margin: 0.5rem 0.75rem;
}

.app-sidebar.collapsed .sidebar-separator-label {
    display: none;
}

.app-sidebar.collapsed .sidebar-separator::after {
    content: '';
    display: block;
    height: 1px;
    background: #e9ecef;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--sidebar-transition);
    position: relative;
    overflow: hidden;
}

.sidebar-link:hover {
    background: #f0fff4;
    color: #198754;
}

.sidebar-link.active {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.3);
}

.sidebar-link.active .sidebar-icon {
    color: #fff;
}

.sidebar-icon {
    width: 20px;
    font-size: 1.125rem;
    margin-right: 0.875rem;
    text-align: center;
    flex-shrink: 0;
    color: #6c757d;
    transition: var(--sidebar-transition);
}

.sidebar-link:hover .sidebar-icon {
    color: #198754;
}

.sidebar-text {
    font-size: 0.975rem;
    font-weight: 500;
    transition: var(--sidebar-transition);
    white-space: nowrap;
}

.sidebar-badge {
    margin-left: auto;
    background: #dc3545;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--sidebar-transition);
    animation: badge-pulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 8px 2px rgba(220, 53, 69, 0.3);
    }
}

.app-sidebar.collapsed .sidebar-link {
    overflow: visible;
}

.app-sidebar.collapsed .sidebar-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    padding: 1px 4px;
    font-size: 0.55rem;
    min-width: 16px;
    text-align: center;
    z-index: 10;
    border: 2px solid #f8f9fa;
}

.sidebar-badge-new {
    margin-left: auto;
    background: linear-gradient(135deg, #198754, #20c997);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--sidebar-transition);
    animation: new-badge-glow 1.5s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.5);
}

@keyframes new-badge-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 5px 0 rgba(25, 135, 84, 0.5);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 12px 3px rgba(32, 201, 151, 0.6);
    }
}

.app-sidebar.collapsed .sidebar-badge-new {
    position: absolute;
    top: 2px;
    right: 2px;
    padding: 1px 4px;
    font-size: 0.5rem;
    z-index: 10;
    border: 2px solid #f8f9fa;
}

/* Sidebar Footer - Profile Section */
.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid #e9ecef;
    position: relative;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--sidebar-transition);
    gap: 0.75rem;
}

.sidebar-profile:hover {
    background: #f3f4f6;
}

.sidebar-profile-avatar {
    position: relative;
    flex-shrink: 0;
}

.sidebar-profile-avatar img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
}

.sidebar-role-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.sidebar-role-indicator.admin {
    background: #198754;
}

.sidebar-role-indicator.user {
    background: #0d6efd;
}

.sidebar-profile-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sidebar-profile-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-role {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
}

.sidebar-profile-more {
    color: #6c757d;
    font-size: 0.85rem;
}

.app-sidebar.collapsed .sidebar-profile-info,
.app-sidebar.collapsed .sidebar-profile-more {
    display: none;
}

.app-sidebar.collapsed .sidebar-profile {
    justify-content: center;
    padding: 0.5rem;
}

/* Sidebar Profile Menu */
.sidebar-profile-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0.75rem;
    right: 0.75rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.sidebar-profile-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sidebar-profile-menu hr {
    margin: 0.25rem 0;
    border-color: #e9ecef;
}

.sidebar-profile-menu-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    color: #495057;
    text-decoration: none;
    font-size: 0.875rem;
    gap: 0.75rem;
    transition: background 0.15s;
}

.sidebar-profile-menu-item:hover {
    background: #f8f9fa;
    color: #212529;
}

.sidebar-profile-menu-item i {
    width: 18px;
    text-align: center;
    color: #6c757d;
}

.sidebar-profile-menu-item.logout {
    color: #dc3545;
}

.sidebar-profile-menu-item.logout i {
    color: #dc3545;
}

.sidebar-profile-menu-item.logout:hover {
    background: #fff5f5;
}

.app-sidebar.collapsed .sidebar-profile-menu {
    left: calc(100% + 10px);
    bottom: 0;
    right: auto;
    min-width: 200px;
}

/* Tooltip for Collapsed State */
.app-sidebar.collapsed .sidebar-link::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #212529;
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 1050;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.app-sidebar.collapsed .sidebar-link::before {
    content: '';
    position: absolute;
    left: calc(100% + 4px);
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #212529;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.app-sidebar.collapsed .sidebar-link:hover::after,
.app-sidebar.collapsed .sidebar-link:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Mobile Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1039;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #495057;
    padding: 0.5rem;
    margin-right: 0.5rem;
    cursor: pointer;
    display: none;
}

.mobile-menu-toggle:hover {
    color: #198754;
}

/* Main Content Wrapper */
.main-content-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: var(--sidebar-width-expanded);
    transition: var(--sidebar-transition);
}

.sidebar-collapsed .main-content-wrapper {
    margin-left: var(--sidebar-width-collapsed);
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.mobile-open {
        transform: translateX(0);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-logo-link {
        display: flex !important;
    }

    .main-content-wrapper {
        margin-left: 0 !important;
    }

    .main-footer {
        left: 0 !important;
    }
}

@media (min-width: 992px) {
    .header-logo-link {
        display: none;
    }
}

/* ==================== MAIN CONTENT LAYOUT ==================== */
.main-content {
    flex: 1;
    display: flex;
    overflow-y: auto;
    padding-bottom: 50px; /* Space for fixed footer */
}

.page-section {
    display: none;
    width: 100%;
    height: 100%;
}

.page-section.active {
    display: flex;
    flex-direction: column;
}

.page-section.flex-section.active {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

#page-create-claim.active {
    padding-top: 1.5rem;
    flex-direction: row;
}

#page-create-claim .form-area {
    padding-top: 1.5rem;
    overflow-y: visible;
    margin-left: 280px; /* Account for fixed step-nav width */
}

#page-create-claim .step-nav {
    padding-top: 1.5rem;
}

/* Full-height content containers */
#page-reports.active .dashboard-content,
#page-claims.active .dashboard-content,
#page-drafts.active .dashboard-content,
#page-deceased.active .dashboard-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

#page-reports .reports-page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

#page-reports .reports-table-container,
#page-claims .table-container,
#page-deceased .table-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#page-reports .reports-table-wrap,
#page-claims .table-container,
#page-deceased .table-container {
    flex: 1;
    overflow-y: auto;
}

/* Drafts grid takes full height */
#page-drafts .drafts-grid {
    flex: 1;
    overflow-y: auto;
    align-content: flex-start;
}

/* Make tables fill available space with sticky headers */
#page-claims .table-container table,
#page-deceased .table-container table {
    margin-bottom: 0;
}

#page-claims .table-container table thead,
#page-deceased .table-container table thead {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}

/* ==================== DECEASED PAGE CARDS ==================== */
.deceased-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.deceased-header-left h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.deceased-header-left h2 i {
    color: #198754;
}

.deceased-header-left p {
    color: #6c757d;
    margin: 0.25rem 0 0 0;
    font-size: 0.95rem;
}

.deceased-filters-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.deceased-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.deceased-search-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.deceased-search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.deceased-search-input:focus {
    outline: none;
    border-color: #198754;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.1);
}

.deceased-filter-select {
    padding: 0.625rem 2rem 0.625rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") no-repeat right 0.75rem center/12px;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s;
}

.deceased-filter-select:focus {
    outline: none;
    border-color: #198754;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.1);
}

.deceased-filter-actions {
    display: flex;
    gap: 0.5rem;
}

.deceased-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 1rem;
}

.deceased-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 2px solid transparent;
}

.deceased-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #198754;
}

.deceased-card-header {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    color: #fff;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.deceased-card-info {
    flex: 1;
    min-width: 0;
}

.deceased-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deceased-card-ssn {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 2px;
}

.deceased-card-status {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.deceased-card-status.funded { background: rgba(255,255,255,0.25); }
.deceased-card-status.in-process { background: rgba(255,193,7,0.3); color: #fff; }
.deceased-card-status.closed { background: rgba(108,117,125,0.3); }

.deceased-card-body {
    padding: 1.25rem;
}

.deceased-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.deceased-card-row:last-child {
    border-bottom: none;
}

.deceased-card-label {
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.deceased-card-label i {
    width: 16px;
    color: #198754;
}

.deceased-card-value {
    font-weight: 500;
    color: #212529;
}

.deceased-card-value.amount {
    color: #198754;
    font-weight: 600;
}

.deceased-card-footer {
    padding: 0.75rem 1.25rem;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deceased-card-policies {
    display: flex;
    gap: 0.5rem;
}

.deceased-card-policy-badge {
    padding: 0.25rem 0.5rem;
    background: #e7f5ee;
    color: #198754;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.deceased-card-actions {
    display: flex;
    gap: 0.5rem;
}

.deceased-card-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.deceased-card-btn.view {
    background: #e7f5ee;
    color: #198754;
}

.deceased-card-btn.view:hover {
    background: #198754;
    color: #fff;
}

.deceased-card-btn.add {
    background: #f0f0f0;
    color: #6c757d;
}

.deceased-card-btn.add:hover {
    background: #198754;
    color: #fff;
}

.deceased-card-btn.view,
.deceased-card-btn.add {
    width: auto;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    gap: 0.35rem;
}

/* Claims count badge in card header */
.deceased-card-policies-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #e7f5ee;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    min-width: 50px;
}

.deceased-card-policies-count .count-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #198754;
    line-height: 1;
}

.deceased-card-policies-count .count-label {
    font-size: 0.65rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Claims section in decedent card */
.decedent-claims-section {
    padding: 0 1.25rem 1rem;
    border-top: 1px solid #eee;
    margin-top: 0.5rem;
}

.decedent-claims-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.decedent-claims-header i {
    color: #198754;
}

.decedent-claims-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
}

.decedent-claim-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.85rem;
}

.decedent-claim-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.decedent-claim-name {
    font-weight: 500;
    color: #333;
}

.decedent-claim-amount {
    font-size: 0.8rem;
    color: #198754;
    font-weight: 600;
}

.decedent-claim-status {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.decedent-claim-status.success {
    background: #d1e7dd;
    color: #0f5132;
}

.decedent-claim-status.warning {
    background: #fff3cd;
    color: #856404;
}

.decedent-claim-status.secondary {
    background: #e9ecef;
    color: #6c757d;
}

.deceased-pagination-nav {
    margin-top: 1.5rem;
}

/* ==================== DECEASED DETAIL HEADER COMPACT ==================== */
.deceased-header-compact {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    padding: 1rem 1.5rem !important;
    padding-right: 4rem !important; /* Space for close button */
}

.deceased-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
}

.deceased-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.deceased-header-compact .deceased-name-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.deceased-header-compact .deceased-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    color: #fff;
    font-weight: 500;
    font-size: 0.8rem;
    margin: 0;
}

.deceased-header-stats-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.deceased-stat-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
}

.deceased-stat-chip.highlight {
    background: rgba(255,255,255,0.25);
}

.stat-chip-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.stat-chip-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

@media (max-width: 768px) {
    .deceased-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .deceased-header-stats-compact {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ==================== DASHBOARD STYLES ==================== */
.dashboard-content {
    padding: 2rem;
    background: #f8f9fa;
}

.stats-card {
    background: #fff;
    border: none;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: var(--eff-transition);
    position: relative;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    border-color: #e0e0e0;
}

.stats-card::before {
    display: none;
}

.stats-card-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stats-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stats-card-icon.deceased { background: #e7f5ee; color: #198754; }
.stats-card-icon.claims { background: #e7f5ee; color: #198754; }
.stats-card-icon.pending { background: #fef3e2; color: #e67e22; }
.stats-card-icon.funded { background: #e7f5ee; color: #198754; }

.stats-card-info {
    flex: 1;
    text-align: left;
}

.stats-card h3 {
    font-size: 1.85rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.15rem;
    line-height: 1.1;
}

.stats-card p {
    color: #6c757d;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 400;
}

.stats-card-trend {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.stats-card-trend.up { color: #198754; }
.stats-card-trend.down { color: #dc3545; }

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #dee2e6;
    color: #212529;
    text-decoration: none;
    font-weight: 500;
    transition: var(--eff-transition);
}

.quick-action-btn:hover {
    border-color: var(--eff-primary);
    color: var(--eff-primary);
    background: #f0fff4;
}

.quick-action-btn i {
    font-size: 1.1rem;
}

/* Activity Feed */
.activity-feed {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--eff-shadow);
    overflow: hidden;
}

.activity-feed-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-feed-header h5 {
    margin: 0;
    font-weight: 600;
}

.activity-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 12px;
    transition: background 0.2s;
}

.activity-item:hover {
    background: #f8f9fa;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.875rem;
}

.activity-icon.new { background: #d1e7dd; color: #198754; }
.activity-icon.update { background: #cfe2ff; color: #084298; }
.activity-icon.approved { background: #d1e7dd; color: #0f5132; }
.activity-icon.denied { background: #f8d7da; color: #842029; }

.activity-content {
    flex: 1;
}

.activity-content p {
    margin: 0;
    font-size: 0.9rem;
}

.activity-content .activity-time {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-banner h2 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.welcome-banner p {
    opacity: 0.9;
    margin: 0;
}

.welcome-banner .btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
}

.welcome-banner .btn:hover {
    background: rgba(255,255,255,0.3);
}

.welcome-banner-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ==================== ENHANCED DASHBOARD ==================== */
.welcome-banner-enhanced {
    background: linear-gradient(135deg, #198754 0%, #157347 50%, #0f5132 100%);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(25, 135, 84, 0.3);
}

.welcome-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.welcome-greeting h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.welcome-date {
    opacity: 0.85;
    font-size: 0.9rem;
    margin: 0;
}

.welcome-summary {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.summary-number {
    font-size: 1.5rem;
    font-weight: 700;
}

.summary-label {
    font-size: 0.75rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-divider {
    width: 1px;
    height: 35px;
    background: rgba(255,255,255,0.3);
}

.welcome-right {
    display: flex;
    align-items: center;
}

.welcome-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.welcome-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.85rem 1.25rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 10px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    position: relative;
}

.welcome-action-btn i {
    font-size: 1.1rem;
}

.welcome-action-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

.welcome-action-btn.primary {
    background: #fff;
    color: #198754;
    border-color: #fff;
}

.welcome-action-btn.primary:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.action-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #dc3545;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Compact Welcome Banner */
.welcome-banner-compact {
    background: linear-gradient(135deg, #198754 0%, #157347 50%, #0f5132 100%);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #fff;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.25);
}

.welcome-main {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.welcome-greeting-compact h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0;
}

.welcome-greeting-compact .welcome-date {
    opacity: 0.8;
    font-size: 0.8rem;
    margin: 0.15rem 0 0 0;
}

.welcome-stats-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.stat-pill .stat-number {
    font-weight: 700;
    font-size: 1rem;
}

.stat-pill .stat-label {
    opacity: 0.9;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.welcome-actions-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.welcome-action-btn-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.welcome-action-btn-compact:hover {
    background: rgba(255,255,255,0.25);
}

.welcome-action-btn-compact i {
    font-size: 0.9rem;
}

.welcome-action-btn-compact .action-badge {
    position: static;
    background: #fff;
    color: #198754;
    margin-left: 0.25rem;
    animation: badge-pulse-white 2s ease-in-out infinite;
}

/* Compact Banner Documents Button */
.welcome-actions-compact .docs-header-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.welcome-actions-compact .docs-header-btn:hover {
    background: rgba(255,255,255,0.25);
}

.welcome-actions-compact .docs-header-btn i {
    font-size: 0.9rem;
}

.welcome-actions-compact .docs-header-btn .docs-count {
    background: #fff;
    color: #198754;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
    margin-left: 0.25rem;
    animation: badge-pulse-white 2s ease-in-out infinite;
}

@keyframes badge-pulse-white {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.3);
    }
}

/* Responsive compact banner */
@media (max-width: 992px) {
    .welcome-banner-compact {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .welcome-main {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .welcome-stats-inline {
        flex-wrap: wrap;
        justify-content: center;
    }

    .welcome-actions-compact {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .stat-pill {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    .stat-pill .stat-number {
        font-size: 0.9rem;
    }

    .stat-pill .stat-label {
        font-size: 0.65rem;
    }
}

/* Dashboard Stats Row */
.dashboard-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dash-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.dash-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-color: #198754;
}

.dash-stat-card.highlight {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    color: #fff;
    border: none;
}

.dash-stat-card.highlight:hover {
    box-shadow: 0 6px 25px rgba(25, 135, 84, 0.4);
}

.dash-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.dash-stat-icon.green { background: #d1e7dd; color: #198754; }
.dash-stat-icon.blue { background: #cfe2ff; color: #0d6efd; }
.dash-stat-icon.orange { background: #fff3cd; color: #fd7e14; }
.dash-stat-icon.white { background: rgba(255,255,255,0.2); color: #fff; }

.dash-stat-info {
    flex: 1;
}

.dash-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.dash-stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 2px;
}

.dash-stat-card.highlight .dash-stat-label {
    color: rgba(255,255,255,0.85);
}

.dash-stat-trend {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.dash-stat-trend.up {
    background: #d1e7dd;
    color: #198754;
}

.dash-stat-trend.down {
    background: #f8d7da;
    color: #dc3545;
}

.dash-stat-progress {
    width: 60px;
}

.mini-progress-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.mini-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.mini-progress-fill.orange { background: #fd7e14; }
.mini-progress-fill.green { background: #198754; }

.dash-stat-badge {
    font-size: 0.75rem;
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 20px;
}

/* Financial Summary Row */
.financial-summary-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.financial-summary-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #fff;
    border-radius: 12px;
    flex: 1;
    max-width: 280px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.financial-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.financial-summary-card.gross {
    border-left: 4px solid #0d6efd;
}

.financial-summary-card.fees {
    border-left: 4px solid #fd7e14;
}

.financial-summary-card.net {
    border-left: 4px solid #198754;
}

.financial-summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.financial-summary-card.gross .financial-summary-icon {
    background: rgba(13,110,253,0.1);
    color: #0d6efd;
}

.financial-summary-card.fees .financial-summary-icon {
    background: rgba(253,126,20,0.1);
    color: #fd7e14;
}

.financial-summary-card.net .financial-summary-icon {
    background: rgba(25,135,84,0.1);
    color: #198754;
}

.financial-summary-content {
    flex: 1;
}

.financial-summary-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.2;
}

.financial-summary-card.net .financial-summary-value {
    color: #198754;
}

.financial-summary-label {
    font-size: 0.85rem;
    color: #495057;
    font-weight: 600;
}

.financial-summary-sublabel {
    font-size: 0.75rem;
    color: #6c757d;
}

.financial-summary-divider {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #6c757d;
    flex-shrink: 0;
}

@media (max-width: 1200px) {
    .financial-summary-row {
        flex-wrap: wrap;
    }
    .financial-summary-card {
        flex: 1 1 200px;
    }
    .financial-summary-divider {
        display: none;
    }
}

@media (max-width: 768px) {
    .financial-summary-row {
        flex-direction: column;
        align-items: stretch;
    }
    .financial-summary-card {
        max-width: none;
    }
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 350px;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.dash-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.dash-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dash-card-header h5 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.dash-card-header h5 i {
    color: #198754;
}

.view-all-link {
    font-size: 0.8rem;
    color: #198754;
    text-decoration: none;
    font-weight: 500;
}

.view-all-link:hover {
    text-decoration: underline;
}

.dash-card-body {
    padding: 1.25rem;
}

.dash-card-body.no-padding {
    padding: 0;
}

.dash-card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #f0f0f0;
    background: #fafbfc;
}

.dash-card-footer a {
    font-size: 0.8rem;
    color: #198754;
    text-decoration: none;
    font-weight: 500;
}

.dash-card-footer a:hover {
    text-decoration: underline;
}

.dash-period-select {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    color: #495057;
    cursor: pointer;
}

/* Claims Overview */
.claims-overview-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.25rem;
}

.overview-stat {
    text-align: center;
}

.overview-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.overview-stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 130px;
    gap: 6px;
    padding: 0;
}

.mini-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.mini-bar-value {
    font-size: 0.7rem;
    font-weight: 600;
    color: #198754;
    margin-bottom: 4px;
}

.mini-bar {
    width: 100%;
    max-width: 45px;
    background: linear-gradient(180deg, #198754 0%, #20c997 100%);
    border-radius: 4px 4px 0 0;
    min-height: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mini-bar:hover {
    filter: brightness(1.1);
    transform: scaleY(1.03);
}

.mini-bar-label {
    font-size: 0.65rem;
    color: #6c757d;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Recent Claims List */
.recent-claims-list {
    max-height: 320px;
    overflow-y: auto;
}

.recent-claim-item {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.15s ease;
}

.recent-claim-item:hover {
    background: #f8fdf9;
}

.recent-claim-item:last-child {
    border-bottom: none;
}

.claim-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #e7f5ee;
    color: #198754;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    margin-right: 0.85rem;
    flex-shrink: 0;
}

.claim-info {
    flex: 1;
    min-width: 0;
}

.claim-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.claim-meta {
    font-size: 0.75rem;
    color: #6c757d;
    display: flex;
    gap: 0.75rem;
}

.claim-amount {
    font-weight: 700;
    font-size: 0.95rem;
    color: #198754;
    margin-left: auto;
    padding-left: 1rem;
}

.claim-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 0.5rem;
}

.claim-status-dot.funded { background: #198754; }
.claim-status-dot.in-process { background: #fd7e14; }
.claim-status-dot.closed { background: #6c757d; }
.claim-status-dot.withdrawn { background: #dc3545; }

/* Right Column */
.dash-right-column {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.attention-card .dash-card-header {
    background: #fff8e6;
}

.attention-card .dash-card-header h5 i {
    color: #fd7e14;
}

.attention-count {
    background: #fd7e14;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.attention-list {
    max-height: 140px;
    overflow-y: auto;
}

.attention-item {
    display: flex;
    align-items: center;
    padding: 0.65rem 1.25rem;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.15s ease;
}

.attention-item:hover {
    background: #fffbf5;
}

.attention-item:last-child {
    border-bottom: none;
}

.attention-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.attention-icon.doc { background: #fff3cd; color: #856404; }
.attention-icon.pending { background: #cfe2ff; color: #0d6efd; }
.attention-icon.urgent { background: #f8d7da; color: #dc3545; }

.attention-text {
    flex: 1;
    font-size: 0.8rem;
    color: #495057;
    line-height: 1.3;
}

.attention-text strong {
    color: #333;
}

/* Activity List */
.activity-list {
    max-height: 200px;
    overflow-y: auto;
}

.activity-item-new {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f5f5f5;
}

.activity-item-new:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.75rem;
    margin-top: 4px;
    flex-shrink: 0;
}

.activity-dot.success { background: #198754; }
.activity-dot.info { background: #0dcaf0; }
.activity-dot.warning { background: #fd7e14; }
.activity-dot.danger { background: #dc3545; }

.activity-content-new {
    flex: 1;
}

.activity-title {
    font-size: 0.8rem;
    color: #333;
    margin-bottom: 2px;
}

.activity-time-new {
    font-size: 0.7rem;
    color: #adb5bd;
}

/* Bottom Stats Row */
.dashboard-bottom-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.bottom-stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    border: 1px solid #eee;
}

.bottom-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f0f0f0;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.bottom-stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #333;
}

.bottom-stat-label {
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Responsive Dashboard */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
    .dash-right-column {
        grid-column: span 2;
        flex-direction: row;
    }
    .dash-right-column .dash-card {
        flex: 1;
    }
}

@media (max-width: 992px) {
    .dashboard-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-bottom-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .welcome-banner-enhanced {
        flex-direction: column;
        gap: 1.25rem;
        text-align: center;
    }
    .welcome-summary {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .dash-right-column {
        flex-direction: column;
        grid-column: span 1;
    }
    .welcome-actions-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Documents Needed Header Button - Grid Version */
.welcome-actions-grid .docs-header-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.85rem 1.25rem;
    background: rgba(255, 193, 7, 0.25);
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 10px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.welcome-actions-grid .docs-header-btn i {
    font-size: 1.1rem;
}

.welcome-actions-grid .docs-header-btn:hover {
    background: rgba(255, 193, 7, 0.35);
    transform: translateY(-2px);
}

.welcome-actions-grid .docs-header-btn .docs-count {
    position: absolute;
    top: -6px;
    right: -6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #dc3545;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 10px;
}

/* Legacy Documents Button */
.docs-header-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.docs-header-btn:hover {
    background: rgba(255,255,255,0.25);
}

.docs-header-btn.has-docs {
    background: rgba(255, 193, 7, 0.3);
    border-color: rgba(255, 193, 7, 0.5);
}

.docs-header-btn.has-docs:hover {
    background: rgba(255, 193, 7, 0.4);
}

.docs-header-btn .docs-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.4rem;
    background: #fff;
    color: #dc2626;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 1rem;
}

.docs-header-btn.no-docs .docs-count {
    background: #22c55e;
    color: #fff;
}

.docs-header-btn.no-docs .docs-count::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* Pulse Animation */
.docs-header-btn.has-docs::before {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 12px;
    height: 12px;
    background: #fbbf24;
    border-radius: 50%;
    animation: docsPulse 2s ease-in-out infinite;
}

@keyframes docsPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7);
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
        box-shadow: 0 0 0 8px rgba(251, 191, 36, 0);
    }
}

/* Documents Dropdown Popup */
.docs-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    color: #333;
}

/* Dropdown in welcome grid - position to the left */
.welcome-actions-grid .docs-dropdown {
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
}

.welcome-actions-grid .docs-dropdown.show {
    transform: translateX(-50%) translateY(0);
}

.docs-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.docs-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg);
    border-top: 1px solid #e2e8f0;
    border-left: 1px solid #e2e8f0;
}

.docs-dropdown-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 0.75rem 0.75rem 0 0;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.docs-dropdown-header.no-docs {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.docs-dropdown-header h6 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.docs-dropdown-close {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255,255,255,0.2);
    border-radius: 0.375rem;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.docs-dropdown-close:hover {
    background: rgba(255,255,255,0.3);
}

.docs-dropdown-body {
    max-height: 320px;
    overflow-y: auto;
}

.docs-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.15s ease;
}

.docs-dropdown-item:hover {
    background: #fffbeb;
}

.docs-dropdown-item:last-child {
    border-bottom: none;
}

.docs-item-priority {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.docs-item-priority.urgent { background: #ef4444; }
.docs-item-priority.high { background: #f59e0b; }
.docs-item-priority.medium { background: #3b82f6; }
.docs-item-priority.low { background: #22c55e; }

.docs-item-content {
    flex: 1;
    min-width: 0;
}

.docs-item-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.875rem;
}

.docs-item-meta {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

.docs-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.docs-item-claim {
    font-size: 0.7rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
}

.docs-required-section {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    padding: 8px 10px;
    margin-top: 4px;
}

.docs-required-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.docs-required-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.8rem;
    color: #1f2937;
    border-bottom: 1px dashed #fcd34d;
}

.docs-required-item:last-child {
    border-bottom: none;
}

.docs-required-item i {
    color: #f59e0b;
    font-size: 0.75rem;
}

/* Document Request Banner for Claim Detail */
.docs-request-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: none;
}

.docs-request-banner.show {
    display: block;
}

.docs-request-banner-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.docs-request-banner-icon {
    width: 36px;
    height: 36px;
    background: #f59e0b;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.docs-request-banner-title {
    font-weight: 600;
    color: #92400e;
    font-size: 0.95rem;
}

.docs-request-banner-subtitle {
    font-size: 0.8rem;
    color: #b45309;
}

.docs-request-list {
    background: #fff;
    border-radius: 6px;
    padding: 10px;
}

.docs-request-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #fef3c7;
}

.docs-request-list-item:last-child {
    border-bottom: none;
}

.docs-request-list-item-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #1f2937;
}

.docs-request-list-item-name i {
    color: #f59e0b;
}

.docs-request-list-item button {
    padding: 4px 12px;
    font-size: 0.75rem;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.docs-request-list-item button:hover {
    background: #15803d;
}

.docs-item-actions {
    display: flex;
    gap: 0.375rem;
}

.docs-item-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    font-size: 0.85rem;
}

.docs-item-btn.upload {
    background: #dcfce7;
    color: #16a34a;
}

.docs-item-btn.upload:hover {
    background: #16a34a;
    color: #fff;
}

.docs-item-btn.info {
    background: #e0f2fe;
    color: #0284c7;
}

.docs-item-btn.info:hover {
    background: #0284c7;
    color: #fff;
}

.docs-dropdown-footer {
    padding: 0.75rem 1.25rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 0.75rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.docs-dropdown-footer .help-text {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.docs-dropdown-footer .help-text i {
    color: #198754;
}

/* No Documents Message */
.docs-no-items {
    padding: 2rem 1.5rem;
    text-align: center;
}

.docs-no-items i {
    font-size: 2.5rem;
    color: #22c55e;
    margin-bottom: 0.75rem;
}

.docs-no-items h6 {
    margin: 0 0 0.25rem 0;
    color: #1f2937;
    font-weight: 600;
}

.docs-no-items p {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
}

/* ==================== TABLE STYLES ==================== */
.table-container {
    background: #fff;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--eff-shadow);
}

.table-header {
    background: #fff;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h5 {
    margin: 0;
    font-weight: 600;
    color: #212529;
}

.table {
    margin: 0;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding: 0.875rem 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr {
    transition: background 0.2s;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.status-badge {
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-approved { background-color: #d1e7dd; color: #0f5132; }
.status-pending { background-color: #fff3cd; color: #664d03; }
.status-processing { background-color: #cfe2ff; color: #084298; }
.status-denied { background-color: #f8d7da; color: #842029; }
.status-funded { background-color: #d1e7dd; color: #0f5132; }

/* Action buttons in tables */
.table-actions {
    display: flex;
    gap: 0.5rem;
}

.table-actions .btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #6c757d;
    transition: var(--eff-transition);
}

.table-actions .btn-icon:hover {
    border-color: var(--eff-primary);
    color: var(--eff-primary);
    background: #f0fff4;
}

.table-actions .btn-icon.danger:hover {
    border-color: #dc3545;
    color: #dc3545;
    background: #fff5f5;
}

/* ==================== 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: #198754;
}

.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: #198754;
    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: #198754;
}

.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: #198754;
    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: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.15);
}

.contact-section {
    margin-top: 2.25rem;
}

.contact-section h5 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: #212529;
}

.contact-section .update-link {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.contact-section .update-link a {
    color: #0d6efd;
    text-decoration: underline;
    cursor: pointer;
}

.contact-name {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.1rem;
}

.contact-info-item i {
    width: 18px;
    font-size: 1rem;
}

.contact-info-item .fa-phone { color: #17a2b8; }
.contact-info-item .fa-envelope { color: #6c757d; }

.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: #198754;
    border-color: #198754;
}

.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: #198754;
}

.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: #198754;
    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;
}

/* ==================== ACCOUNT PREFERENCES STYLES ==================== */
.preferences-content {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.preferences-content h2 {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    padding: 0.75rem 1.5rem;
}

.nav-tabs .nav-link.active {
    color: #198754;
    border-bottom: 2px solid #198754;
    background: transparent;
}

/* ==================== FOOTER STYLES ==================== */
.main-footer {
    background-color: #fff;
    border-top: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width-expanded);
    right: 0;
    z-index: 100;
    transition: var(--sidebar-transition);
}

.sidebar-collapsed .main-footer {
    left: var(--sidebar-width-collapsed);
}

.footer-logo {
    height: 32px;
}

.footer-brand {
    font-weight: 600;
}

/* ==================== PROFILE & USER STYLES ==================== */
.profile-avatar-container {
    position: relative;
    display: inline-block;
}

.role-indicator {
    position: absolute;
    bottom: 0;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.role-indicator.admin {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.role-indicator.standard {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.profile-menu-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.75rem;
}

.profile-menu-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-menu-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.profile-menu-email {
    font-size: 0.8rem;
    color: #6b7280;
}

/* ==================== ENHANCED PROFILE PAGE ==================== */
.profile-page-container {
    max-width: 1000px;
    margin: 0 auto;
}

.profile-header {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    border-radius: 1rem;
    padding: 2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-header-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
    object-fit: cover;
    background: #fff;
}

.profile-header-info h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.75rem;
}

.profile-header-info p {
    margin: 0;
    opacity: 0.9;
}

.profile-role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
}

.profile-role-badge.admin {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.profile-role-badge.standard {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.profile-tabs {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.profile-tabs .nav-tabs {
    border-bottom: 2px solid #e9ecef;
    padding: 0 1rem;
    background: #f8f9fa;
}

.profile-tabs .nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    padding: 1rem 1.5rem;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.profile-tabs .nav-tabs .nav-link:hover {
    color: #198754;
}

.profile-tabs .nav-tabs .nav-link.active {
    color: #198754;
    background: transparent;
}

.profile-tabs .nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #198754;
    border-radius: 3px 3px 0 0;
}

.profile-tabs .nav-tabs .nav-link i {
    margin-right: 0.5rem;
}

.profile-tab-content {
    padding: 2rem;
}

.profile-section {
    margin-bottom: 2rem;
}

.profile-section:last-child {
    margin-bottom: 0;
}

.profile-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-section-title i {
    color: #198754;
}

.form-floating-custom {
    position: relative;
    margin-bottom: 1rem;
}

.form-floating-custom label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    display: block;
}

.security-card {
    background: #f8f9fa;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.security-card-info h6 {
    margin: 0 0 0.25rem 0;
    font-weight: 600;
}

.security-card-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.preference-item:last-child {
    border-bottom: none;
}

.preference-info h6 {
    margin: 0 0 0.25rem 0;
    font-weight: 500;
}

.preference-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* ==================== SETTINGS PAGE ==================== */
.settings-container {
    max-width: 900px;
    margin: 0 auto;
}

.settings-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.settings-card-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-card-header i {
    color: #198754;
    font-size: 1.25rem;
}

.settings-card-header h5 {
    margin: 0;
    font-weight: 600;
}

.settings-card-body {
    padding: 1.5rem;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.settings-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.settings-item:first-child {
    padding-top: 0;
}

.settings-item-info {
    flex: 1;
    padding-right: 1rem;
}

.settings-item-info h6 {
    margin: 0 0 0.25rem 0;
    font-weight: 500;
    color: #1f2937;
}

.settings-item-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Custom Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: 0.3s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #198754;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* ==================== ANALYTICS PAGE ==================== */
.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.analytics-header h2 {
    margin: 0;
}

.analytics-filters {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Advanced Filters Toolbar */
.analytics-toolbar {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    border: 1px solid #e2e8f0;
}

.analytics-toolbar-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analytics-toolbar-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analytics-toolbar-divider {
    width: 1px;
    height: 32px;
    background: #cbd5e1;
    margin: 0 0.5rem;
}

.filter-select {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    min-width: 140px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:hover {
    border-color: #198754;
}

.filter-select:focus {
    outline: none;
    border-color: #198754;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
}

/* Date Range Picker */
.date-range-picker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-range-picker:hover {
    border-color: #198754;
}

.date-range-picker i {
    color: #198754;
}

.date-range-picker span {
    font-size: 0.85rem;
    color: #374151;
}

/* Export Dropdown */
.export-dropdown {
    position: relative;
}

.export-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #198754;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-dropdown-btn:hover {
    background: #157347;
}

.export-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
    min-width: 200px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.export-dropdown.active .export-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.export-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.15s ease;
    cursor: pointer;
}

.export-dropdown-item:hover {
    background: #f0fdf4;
    color: #198754;
}

.export-dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.export-dropdown-item i.fa-file-csv { color: #22c55e; }
.export-dropdown-item i.fa-file-excel { color: #16a34a; }
.export-dropdown-item i.fa-file-pdf { color: #ef4444; }
.export-dropdown-item i.fa-print { color: #3b82f6; }

.export-dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.25rem 0;
}

/* Quick Actions in Toolbar */
.toolbar-quick-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    background: #f0fdf4;
    border-color: #198754;
    color: #198754;
}

.toolbar-btn.active {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

/* Chart Bar Hover Effects */
.chart-bar {
    transition: all 0.2s ease;
    position: relative;
}

.chart-bar:hover {
    transform: scaleY(1.02);
    filter: brightness(1.1);
}

.chart-bar-group {
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-bar-group:hover .chart-bar-value {
    opacity: 1;
    transform: translateY(-5px);
}

.chart-bar-value {
    opacity: 1;
    transition: all 0.2s ease;
}

/* Donut Chart Hover */
.donut-legend-item {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.donut-legend-item:hover {
    background: #f0fdf4;
}

/* KPI Drill-down Modal */
.kpi-drilldown-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.kpi-drilldown-modal.show {
    display: flex;
}

.kpi-drilldown-content {
    background: #fff;
    border-radius: 1rem;
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kpi-drilldown-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kpi-drilldown-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.kpi-drilldown-header h4 i {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.kpi-drilldown-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.kpi-drilldown-close:hover {
    background: #fee2e2;
    color: #ef4444;
}

.kpi-drilldown-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(85vh - 120px);
}

.kpi-drilldown-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kpi-summary-card {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
}

.kpi-summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.kpi-summary-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.kpi-drilldown-table {
    width: 100%;
    border-collapse: collapse;
}

.kpi-drilldown-table th {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.kpi-drilldown-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

.kpi-drilldown-table tr:hover {
    background: #f0fdf4;
}

/* Comparison Period Badge */
.comparison-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.comparison-badge.up {
    background: #dcfce7;
    color: #16a34a;
}

.comparison-badge.down {
    background: #fee2e2;
    color: #dc2626;
}

.comparison-badge.neutral {
    background: #f3f4f6;
    color: #6b7280;
}

/* Refresh Animation */
.refresh-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==================== 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(25, 135, 84, 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: #198754;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    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(25, 135, 84, 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: #198754;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    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;
}

.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, #dcfce7, #bbf7d0); 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: #198754;
    box-shadow: 0 0 0 4px rgba(25, 135, 84, 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: #198754;
    box-shadow: 0 0 0 4px rgba(25, 135, 84, 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, #f0fdf4, #dcfce7);
    border-color: #198754;
    color: #198754;
    transform: translateY(-2px);
}

.claims-action-btn.primary {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    border-color: transparent;
    color: #fff;
}

.claims-action-btn.primary:hover {
    background: linear-gradient(135deg, #157347 0%, #0f5132 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);
    overflow: hidden;
    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, #f0fdf4 0%, #dcfce7 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;
    max-height: 500px;
}

.claims-table {
    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;
}

.claims-table td {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.claims-table tbody tr {
    transition: all 0.2s ease;
    cursor: pointer;
}

.claims-table tbody tr:hover {
    background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
}

.claims-table .claim-id-link {
    color: #198754;
    font-weight: 600;
    text-decoration: none;
}

.claims-table .claim-id-link:hover {
    text-decoration: underline;
}

.claims-pagination-nav {
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 0 0 1rem 1rem;
}

/* 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: #198754;
    background: rgba(25, 135, 84, 0.05);
}

.claims-tab.active {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(25, 135, 84, 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, #dcfce7, #bbf7d0); 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, #f0fdf4 0%, #dcfce7 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: #22c55e; }
.legend-dot.processing { background: #f59e0b; }
.legend-dot.closed { background: #6366f1; }

.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, #f0fdf4 0%, #dcfce7 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, #f0fdf4 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: #198754;
}

/* 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: #22c55e; }
.trend-segment.processing { background: #f59e0b; }
.trend-segment.closed { background: #6366f1; }

.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: #dcfce7; color: #166534; }
.mini-badge.processing { background: #fef3c7; color: #d97706; }
.mini-badge.closed { background: #e0e7ff; color: #4338ca; }
.mini-badge.withdrawn { background: #fee2e2; color: #dc2626; }

/* ==================== REPORTS PAGE STYLES ==================== */
.reports-page {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 2rem;
    border-radius: 1rem;
    min-height: calc(100vh - 200px);
}

.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(25, 135, 84, 0.1);
}

.reports-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reports-header h2 i {
    color: #198754;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    padding: 0.75rem;
    border-radius: 0.75rem;
    -webkit-text-fill-color: #198754;
}

.reports-toolbar {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.04);
}

.reports-toolbar-section {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.reports-toolbar-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.75px;
}

.reports-filter-select {
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    min-width: 140px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.reports-filter-select:focus {
    outline: none;
    border-color: #198754;
    box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.1);
}

.reports-filter-select:hover {
    border-color: #cbd5e1;
}

.reports-toolbar-actions {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
}

.reports-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.reports-action-btn:hover {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #198754;
    color: #198754;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.15);
}

.reports-action-btn.primary {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
}

.reports-action-btn.primary:hover {
    background: linear-gradient(135deg, #157347 0%, #0f5132 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 135, 84, 0.4);
}

/* Column Manager */
.column-manager {
    position: relative;
}

.column-manager-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    width: 280px;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
    z-index: 100;
    display: none;
    max-height: 400px;
    overflow: hidden;
}

.column-manager-dropdown.show {
    display: block;
}

.column-manager-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-manager-header h6 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
}

.column-manager-body {
    padding: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
}

.column-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.column-item:hover {
    background: #f0fdf4;
}

.column-item input[type="checkbox"] {
    accent-color: #198754;
}

.column-item label {
    flex: 1;
    cursor: pointer;
    font-size: 0.85rem;
    margin: 0;
}

.column-item .drag-handle {
    color: #9ca3af;
    cursor: grab;
}

.column-manager-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

/* Export Options Modal */
.export-options-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.export-options-modal.show {
    display: flex;
}

.export-options-content {
    background: #fff;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.export-options-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.export-options-header h5 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.export-options-body {
    padding: 1.5rem;
}

.export-format-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.export-format-option {
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.export-format-option:hover {
    border-color: #198754;
}

.export-format-option.selected {
    border-color: #198754;
    background: #f0fdf4;
}

.export-format-option i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.export-format-option i.fa-file-csv { color: #22c55e; }
.export-format-option i.fa-file-excel { color: #16a34a; }
.export-format-option i.fa-file-pdf { color: #ef4444; }
.export-format-option i.fa-print { color: #3b82f6; }

.export-format-option span {
    font-size: 0.85rem;
    font-weight: 500;
}

.export-options-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Reports Table */
.reports-table-container {
    background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
}

.reports-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, #f0fdf4 0%, #dcfce7 100%);
}

.reports-table-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #166534;
}

.reports-table-header h5 i {
    background: #fff;
    padding: 0.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.reports-table-info {
    font-size: 0.85rem;
    color: #166534;
    font-weight: 500;
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.reports-table-wrap {
    overflow-x: auto;
    max-height: 600px;
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.reports-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;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.reports-table th.sortable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.reports-table th.sortable:hover {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
}

.reports-table th.sorted {
    color: #198754;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.reports-table th i.sort-icon {
    margin-left: 0.35rem;
    font-size: 0.7rem;
}

.reports-table td {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    transition: all 0.15s ease;
}

.reports-table tr {
    transition: all 0.2s ease;
}

.reports-table tbody tr:hover {
    background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
    cursor: pointer;
}

.reports-table tbody tr:hover td {
    color: #166534;
}

.claim-link {
    color: #198754;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.claim-link:hover {
    color: #166534;
    text-decoration: underline;
}

.mini-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-badge.funded {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
}

.mini-badge.in-process {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.mini-badge.closed {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4338ca;
}

.mini-badge.withdrawn {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

.reports-table tr:hover {
    background: #f8fafc;
}

.reports-table tr.selected {
    background: #f0fdf4;
}

.reports-table .claim-link {
    color: #198754;
    font-weight: 600;
    text-decoration: none;
}

.reports-table .claim-link:hover {
    text-decoration: underline;
}

.reports-table .mini-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.reports-table .mini-badge.funded { background: #dcfce7; color: #16a34a; }
.reports-table .mini-badge.in-process { background: #dbeafe; color: #2563eb; }
.reports-table .mini-badge.closed { background: #f3f4f6; color: #6b7280; }
.reports-table .mini-badge.withdrawn { background: #fee2e2; color: #dc2626; }

.reports-table .compact-cell {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Pagination */
.reports-pagination {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.85rem;
    color: #64748b;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.8rem;
}

.pagination-btn:hover:not(:disabled) {
    background: #f0fdf4;
    border-color: #198754;
    color: #198754;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

.per-page-select {
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
}

.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.analytics-kpi-grid.extended {
    grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 1400px) {
    .analytics-kpi-grid.extended {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .analytics-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .analytics-kpi-grid.extended {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .analytics-kpi-grid {
        grid-template-columns: 1fr;
    }
    .analytics-kpi-grid.extended {
        grid-template-columns: 1fr;
    }
}

.analytics-kpi-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.analytics-kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.analytics-kpi-card:hover::after {
    content: '\f35d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.9rem;
    color: #9ca3af;
    opacity: 1;
}

.analytics-kpi-card::after {
    content: '\f35d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.9rem;
    color: #d1d5db;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.analytics-kpi-card .kpi-drilldown-hint {
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
    font-size: 0.7rem;
    color: #9ca3af;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.analytics-kpi-card:hover .kpi-drilldown-hint {
    opacity: 1;
}

.analytics-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.analytics-kpi-card.primary::before { background: #198754; }
.analytics-kpi-card.warning::before { background: #f59e0b; }
.analytics-kpi-card.info::before { background: #3b82f6; }
.analytics-kpi-card.success::before { background: #10b981; }
.analytics-kpi-card.danger::before { background: #ef4444; }
.analytics-kpi-card.purple::before { background: #8b5cf6; }

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.kpi-icon.primary { background: #dcfce7; color: #198754; }
.kpi-icon.warning { background: #fef3c7; color: #f59e0b; }
.kpi-icon.info { background: #dbeafe; color: #3b82f6; }
.kpi-icon.success { background: #d1fae5; color: #10b981; }
.kpi-icon.danger { background: #fee2e2; color: #ef4444; }
.kpi-icon.purple { background: #ede9fe; color: #8b5cf6; }

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.kpi-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.kpi-trend {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.kpi-trend.up { color: #10b981; }
.kpi-trend.down { color: #ef4444; }

.chart-container {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.chart-header h5 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-header h5 i {
    color: #198754;
}

.chart-toggle-group {
    display: flex;
    gap: 0.5rem;
}

.chart-toggle-btn {
    padding: 0.4rem 1rem;
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-toggle-btn:hover {
    border-color: #198754;
    color: #198754;
}

.chart-toggle-btn.active {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

.chart-toggle-btn[data-mode="count"].active {
    background: #3b82f6;
    border-color: #3b82f6;
}

.chart-body {
    min-height: 300px;
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    padding: 1rem 0;
}

.chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.chart-bar {
    width: 100%;
    max-width: 60px;
    border-radius: 0.5rem 0.5rem 0 0;
    transition: all 0.3s ease;
    position: relative;
}

.chart-bar:hover {
    opacity: 0.8;
    transform: scaleY(1.02);
}

.chart-bar.primary { background: linear-gradient(180deg, #198754 0%, #20c997 100%); }
.chart-bar.secondary { background: linear-gradient(180deg, #6b7280 0%, #9ca3af 100%); }
.chart-bar.info { background: linear-gradient(180deg, #3b82f6 0%, #60a5fa 100%); }

.chart-bar-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
}

.chart-bar-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
}

/* Donut Chart */
.donut-chart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
}

.donut-chart {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-center {
    position: absolute;
    width: 100px;
    height: 100px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donut-center-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.donut-center-label {
    font-size: 0.75rem;
    color: #6b7280;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.donut-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.donut-legend-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.donut-legend-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin-left: auto;
}

/* Line Chart */
.line-chart {
    position: relative;
    height: 250px;
    display: flex;
    align-items: flex-end;
}

.line-chart-grid {
    position: absolute;
    top: 0;
    left: 50px;
    right: 0;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.line-chart-grid-line {
    border-bottom: 1px dashed #e5e7eb;
    position: relative;
}

.line-chart-grid-line span {
    position: absolute;
    left: -50px;
    top: -8px;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Reports Table */
.reports-table {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.reports-table-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.reports-table-header h5 {
    margin: 0;
    font-weight: 600;
}

/* ==================== ADMIN PAGE ==================== */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.admin-stat-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.admin-stat-icon.users { background: #dbeafe; color: #3b82f6; }
.admin-stat-icon.accounts { background: #dcfce7; color: #198754; }
.admin-stat-icon.active { background: #fef3c7; color: #f59e0b; }
.admin-stat-icon.pending { background: #fee2e2; color: #ef4444; }

.admin-stat-info h3 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
}

.admin-stat-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.admin-section {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.admin-section-header {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    padding: 1.25rem 1.5rem;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-section-header h5 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-section-body {
    padding: 1.5rem;
}

.user-list-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s ease;
}

.user-list-item:hover {
    background: #f9fafb;
}

.user-list-item:last-child {
    border-bottom: none;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.user-avatar.admin-role {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

.user-avatar.standard-role {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
}

.user-info {
    flex: 1;
}

.user-info h6 {
    margin: 0 0 0.25rem 0;
    font-weight: 600;
}

.user-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.user-role-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 1rem;
}

.user-role-tag.admin {
    background: #fef2f2;
    color: #dc2626;
}

.user-role-tag.standard {
    background: #f0fdf4;
    color: #16a34a;
}

.user-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 1rem;
}

.user-status.active { background: #22c55e; }
.user-status.inactive { background: #d1d5db; }

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.user-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.account-access-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.account-access-tag {
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
}

/* Analytics Drilldown Modal */
.analytics-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.analytics-modal.show {
    display: flex;
}

.analytics-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.analytics-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    color: white;
}

.analytics-modal-header h5 {
    margin: 0;
    font-weight: 600;
}

.analytics-modal-header .close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.analytics-modal-header .close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.analytics-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.analytics-modal-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.analytics-modal-summary .summary-stat {
    flex: 1;
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.analytics-modal-summary .summary-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #198754;
}

.analytics-modal-summary .summary-label {
    font-size: 0.85rem;
    color: #6b7280;
}

.analytics-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #f8fafc;
}

/* Add User Modal */
.add-user-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    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;
}

.add-user-modal.show {
    opacity: 1;
    visibility: visible;
}

.add-user-modal-content {
    background: #fff;
    border-radius: 1rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.add-user-modal.show .add-user-modal-content {
    transform: scale(1);
}

.add-user-modal-header {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    padding: 1.5rem;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-user-modal-header h5 {
    margin: 0;
    font-weight: 600;
}

.add-user-modal-header .close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-user-modal-body {
    padding: 1.5rem;
}

.add-user-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ==================== 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: #f0fdf4;
    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, #f0fdf4, #dcfce7);
    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: #22c55e; }

/* 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: #22c55e;
}

.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, #dcfce7, #bbf7d0);
    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: #198754;
}

.tfa-method.active {
    border-color: #198754;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.tfa-method i {
    font-size: 2rem;
    color: #198754;
    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, #dcfce7, #bbf7d0);
    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: #f0fdf4;
}

.notification-item.unread {
    background: #fff;
    border-left: 3px solid #198754;
}

.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.docs { background: #fef3c7; color: #d97706; }
.notification-icon.system { background: #e0e7ff; color: #4338ca; }
.notification-icon.success { background: #dcfce7; color: #166534; }

.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-panel-header {
    padding: 1.25rem 4rem 1.25rem 1.5rem; /* Extra right padding for close button */
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    color: #fff;
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.detail-panel-header-info {
    flex: 1;
}

.detail-panel-header-stats {
    display: flex;
    gap: 20px;
}

.detail-panel-stat {
    text-align: center;
    padding: 8px 20px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
}

.detail-panel-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.detail-panel-stat-label {
    font-size: 0.75rem;
    opacity: 0.9;
}

.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-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(59,130,246,0.3); }
.detail-panel-status.closed { background: rgba(245,158,11,0.3); }
.detail-panel-status.withdrawn { background: rgba(156,163,175,0.3); }
.detail-panel-status.pending { background: rgba(255,193,7,0.3); }
.detail-panel-status.processing { background: rgba(13,202,240,0.3); }

.detail-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    display: flex;
}

/* Two Column Layout */
.detail-panel-main {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.detail-panel-sidebar {
    width: 340px;
    background: #f8fafc;
    border-left: 1px solid #e5e7eb;
    padding: 1.5rem;
    overflow-y: auto;
}

/* 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: 1.5rem;
}

.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: #f0fdf4;
    border-color: #198754;
    color: #198754;
}

.quick-action-btn i {
    font-size: 1.25rem;
    color: #198754;
}

.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;
}

.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;
}

.detail-section-title i {
    color: #198754;
}

.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: 140px;
    color: #6c757d;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.detail-value {
    flex: 1;
    color: #212529;
    font-size: 0.9rem;
    font-weight: 500;
}

.detail-value a {
    color: #198754;
    text-decoration: none;
}

.detail-value a:hover {
    text-decoration: underline;
}

/* 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: 1.25rem;
}

.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 #198754;
}

.timeline-dot.pending { border-color: #ffc107; }
.timeline-dot.processing { border-color: #0dcaf0; }
.timeline-dot.denied { border-color: #dc3545; }
.timeline-dot.success { border-color: #198754; background: #198754; }

.timeline-content {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.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: #198754;
}

.timeline-claim-status {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.timeline-claim-status.success {
    background: #d1e7dd;
    color: #0f5132;
}

.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;
}

.mini-card:hover {
    border-color: #198754;
    box-shadow: 0 2px 8px rgba(25,135,84,0.15);
}

.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-amount {
    font-weight: 700;
    color: #198754;
    font-size: 1.1rem;
}

.mini-card-details {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.mini-card-details span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* 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(25,135,84,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: #198754;
}

.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: #198754; }
.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;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

.document-actions a {
    color: #6c757d;
    padding: 0.35rem;
    transition: color 0.2s;
}

.document-actions a:hover {
    color: #198754;
}

/* 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: #198754;
}

.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;
}

/* Beneficiary card */
.beneficiary-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

.beneficiary-card-info {
    flex: 1;
}

.beneficiary-card-name {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
}

.beneficiary-card-relation {
    font-size: 0.85rem;
    color: #6c757d;
}

.beneficiary-card-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    background: #d1e7dd;
    color: #0f5132;
}

/* Responsive for detail panel */
@media (max-width: 700px) {
    .detail-panel {
        width: 100%;
        right: -100%;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .quick-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 992px) {
    .page-section.flex-section.active {
        flex-direction: column;
    }
    .step-nav {
        width: 100%;
        display: flex;
        overflow-x: auto;
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid #dee2e6;
        position: static;
        max-height: none;
        left: auto;
        top: auto;
        bottom: auto;
        border-right: none;
    }
    .step-item {
        padding-bottom: 0;
        padding-right: 2rem;
        flex-shrink: 0;
    }
    .step-item::before {
        display: none;
    }
    .form-area {
        padding: 2rem;
    }
    #page-create-claim .form-area {
        margin-left: 0;
    }
    .form-content {
        max-width: 100%;
    }
    .stats-card-content {
        flex-direction: column;
        text-align: center;
    }
    .stats-card-info {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .dashboard-content {
        padding: 1rem;
    }
    .welcome-banner {
        padding: 1rem 1.25rem;
    }
    .quick-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    .quick-action-btn {
        justify-content: center;
        padding: 0.65rem 0.75rem;
        font-size: 0.9rem;
    }
    .stats-card {
        padding: 1rem;
    }
    .stats-card h3 {
        font-size: 1.5rem;
    }
    .table-container {
        margin-bottom: 1rem;
    }
    .main-header {
        padding: 0.5rem;
    }
    .notification-menu {
        position: fixed;
        right: 10px;
        left: 10px;
        width: auto;
    }
    .toast-container {
        left: 10px;
        right: 10px;
    }
    .toast-notification {
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .quick-actions {
        grid-template-columns: 1fr;
    }
    .main-footer {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    .main-footer > div {
        justify-content: center !important;
    }
}

.app-container {
    display: none;
    flex-direction: column;
    min-height: 100vh;
}

.app-container.active {
    display: flex;
}

.step-panel {
    display: none;
}

.step-panel.active {
    display: block;
}

/* ==================== MY ACCOUNTS PAGE STYLES ==================== */
.account-selector-wrapper {
    min-width: 300px;
}

.account-selector {
    border: 2px solid #198754;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    background-color: #fff;
}

.account-selector:focus {
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.25);
    border-color: #198754;
}

/* My Account(s) page background */
#page-my-accounts {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0f9ff 100%);
    padding: 1.5rem;
    border-radius: 0.5rem;
}

#page-my-accounts .page-header {
    background: rgba(255, 255, 255, 0.7);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.account-kpis-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .account-kpis-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .account-kpis-grid {
        grid-template-columns: 1fr;
    }
}

.account-kpi-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid #198754;
}

.account-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.account-kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.account-kpi-icon.claims { background: #dbeafe; color: #3b82f6; }
.account-kpi-icon.funded { background: #dcfce7; color: #198754; }
.account-kpi-icon.pending { background: #fef3c7; color: #f59e0b; }
.account-kpi-icon.time { background: #f3e8ff; color: #9333ea; }

.account-kpi-content {
    display: flex;
    flex-direction: column;
}

.account-kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.account-kpi-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.account-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .account-details-grid {
        grid-template-columns: 1fr;
    }
}

.account-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    border-top: 3px solid #198754;
}

.account-card-header {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #d1fae5;
}

.account-card-header h5 {
    margin: 0;
    font-weight: 600;
    color: #1f2937;
}

.account-card-header i.fa-chevron-up,
.account-card-header i.fa-chevron-down {
    cursor: pointer;
    color: #6b7280;
    transition: transform 0.3s ease;
}

.account-card-header i.fa-chevron-down {
    transform: rotate(180deg);
}

.account-card-body {
    padding: 1.5rem;
}

.account-card-body.collapsed {
    display: none;
}

.account-field {
    margin-bottom: 1rem;
}

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

.account-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.account-field-value {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: #1f2937;
    font-size: 0.95rem;
    border: 1px solid #e9ecef;
}

.notification-pref-item {
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.notification-pref-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.notification-pref-item:first-child {
    padding-top: 0;
}

.notification-pref-header {
    margin-bottom: 0.5rem;
}

.notification-pref-title {
    display: block;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.notification-pref-desc {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
}

.notification-pref-value {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: #166534;
    font-size: 0.9rem;
    border: 1px solid #bbf7d0;
}

.update-request-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    gap: 1rem;
}

.update-request-item:last-child {
    border-bottom: none;
}

.update-request-status {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.update-request-status.completed {
    background: #dcfce7;
    color: #198754;
}

.update-request-status.pending {
    background: #fef3c7;
    color: #f59e0b;
}

.update-request-content {
    flex: 1;
}

.update-request-text {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.update-request-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
}

/* ==================== INSURANCE COMPANY INFO PANEL ==================== */
.ic-info-panel {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-top: 1rem;
    display: none;
}

.ic-info-panel.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ic-info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #bae6fd;
}

.ic-info-icon {
    width: 40px;
    height: 40px;
    background: #0284c7;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
}

.ic-info-title {
    font-weight: 600;
    color: #0c4a6e;
    font-size: 1rem;
    margin: 0;
}

.ic-info-subtitle {
    font-size: 0.8rem;
    color: #0369a1;
}

.ic-info-grid {
    display: grid;
    gap: 0.75rem;
}

.ic-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.ic-info-item-label {
    font-size: 0.8rem;
    color: #0369a1;
    font-weight: 500;
    min-width: 200px;
}

.ic-info-item-value {
    font-size: 0.85rem;
    color: #0c4a6e;
    font-weight: 600;
}

.ic-info-item-value.yes {
    color: #198754;
}

.ic-info-item-value.no {
    color: #dc3545;
}

.ic-info-note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
}

.ic-info-note i {
    color: #f59e0b;
    margin-right: 0.25rem;
}

.ic-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.ic-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.ic-badge.success {
    background: #dcfce7;
    color: #166534;
}

.ic-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.ic-badge.info {
    background: #dbeafe;
    color: #1e40af;
}

.ic-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

/* ==================== DOCUMENT REQUESTS SECTION ==================== */
.doc-requests-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 1rem;
    padding: 0;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
    overflow: hidden;
}

.doc-requests-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

.doc-requests-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.doc-requests-title h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.doc-requests-title p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.doc-requests-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.doc-requests-icon.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.doc-requests-badge {
    text-align: center;
    background: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
}

.doc-requests-badge .badge-count {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #dc2626;
    line-height: 1;
}

.doc-requests-badge .badge-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doc-requests-list {
    padding: 0.5rem 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.doc-request-item {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-left: 4px solid #d1d5db;
    transition: all 0.2s ease;
}

.doc-request-item:last-child {
    margin-bottom: 0;
}

.doc-request-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.doc-request-item.urgent {
    border-left-color: #dc2626;
    background: linear-gradient(to right, #fef2f2, #fff);
}

.doc-request-item.high {
    border-left-color: #f59e0b;
    background: linear-gradient(to right, #fffbeb, #fff);
}

.doc-request-item.medium {
    border-left-color: #3b82f6;
    background: linear-gradient(to right, #eff6ff, #fff);
}

.doc-request-item.low {
    border-left-color: #10b981;
    background: linear-gradient(to right, #ecfdf5, #fff);
}

.doc-request-urgency {
    flex-shrink: 0;
}

.urgency-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.urgency-badge.urgent {
    background: #dc2626;
    color: #fff;
}

.urgency-badge.high {
    background: #f59e0b;
    color: #fff;
}

.urgency-badge.medium {
    background: #3b82f6;
    color: #fff;
}

.urgency-badge.low {
    background: #10b981;
    color: #fff;
}

.doc-request-info {
    flex: 1;
}

.doc-request-claim {
    margin-bottom: 0.5rem;
}

.doc-request-claim strong {
    color: #1f2937;
}

.doc-request-ic {
    display: inline-block;
    background: #e0e7ff;
    color: #4f46e5;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.doc-request-docs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.doc-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #f3f4f6;
    color: #374151;
    padding: 0.35rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    border: 1px dashed #d1d5db;
}

.doc-request-note {
    font-size: 0.8rem;
    color: #6b7280;
}

.doc-request-note i {
    color: #3b82f6;
}

.doc-request-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.doc-requests-footer {
    background: #fffbeb;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #fde68a;
}

.doc-requests-help {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #92400e;
}

.doc-requests-help a {
    color: #d97706;
    font-weight: 500;
}

/* ==================== DOCUMENT MANAGEMENT MODAL ==================== */
.doc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    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;
}

.doc-modal.show {
    opacity: 1;
    visibility: visible;
}

.doc-modal-content {
    background: #fff;
    border-radius: 1rem;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.doc-modal.show .doc-modal-content {
    transform: scale(1);
}

.doc-modal-header {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    padding: 1.25rem 1.5rem;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.doc-modal-header h5 {
    margin: 0;
    font-weight: 600;
}

.doc-modal-header .close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.doc-modal-header .close-btn:hover {
    background: rgba(255,255,255,0.3);
}

.doc-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.doc-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.doc-sections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .doc-sections-grid {
        grid-template-columns: 1fr;
    }
}

.doc-section {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
}

.doc-section-header {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    color: #374151;
}

.doc-section-header .doc-count {
    background: #198754;
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    margin-left: auto;
}

.doc-section-body {
    padding: 1rem;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
}

.attached-file {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.attached-file:last-child {
    margin-bottom: 0;
}

.file-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.file-icon.pdf {
    background: #fee2e2;
    color: #dc2626;
}

.file-icon.img {
    background: #dbeafe;
    color: #3b82f6;
}

.file-icon.doc {
    background: #dbeafe;
    color: #2563eb;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.9rem;
}

.file-meta {
    font-size: 0.75rem;
    color: #6b7280;
}

.file-actions {
    display: flex;
    gap: 0.25rem;
}

.upload-dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: #198754;
    background: #f0fdf4;
}

.dropzone-icon {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.upload-dropzone:hover .dropzone-icon,
.upload-dropzone.dragover .dropzone-icon {
    color: #198754;
}

.dropzone-text {
    font-size: 1rem;
    color: #374151;
    margin-bottom: 0.25rem;
}

.dropzone-or {
    color: #9ca3af;
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.dropzone-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.75rem;
}

.upload-queue {
    margin-top: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.upload-queue-header {
    background: #f9fafb;
    padding: 0.5rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    border-bottom: 1px solid #e5e7eb;
}

.upload-queue-list {
    max-height: 150px;
    overflow-y: auto;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.queue-item:last-child {
    border-bottom: none;
}

.queue-item-info {
    flex: 1;
}

.queue-item-name {
    font-size: 0.85rem;
    color: #1f2937;
}

.queue-item-size {
    font-size: 0.75rem;
    color: #6b7280;
}

.queue-item-remove {
    color: #dc2626;
    cursor: pointer;
    padding: 0.25rem;
}

.doc-type-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.doc-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .doc-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.doc-type-option {
    cursor: pointer;
}

.doc-type-option input {
    display: none;
}

.doc-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    text-align: center;
    transition: all 0.2s ease;
}

.doc-type-card i {
    font-size: 1.5rem;
    color: #6b7280;
}

.doc-type-card span {
    font-size: 0.8rem;
    color: #374151;
}

.doc-type-option input:checked + .doc-type-card {
    border-color: #198754;
    background: #f0fdf4;
}

.doc-type-option input:checked + .doc-type-card i {
    color: #198754;
}

.doc-type-card:hover {
    border-color: #9ca3af;
}

/* ==================== ENHANCED DRAFTS PAGE ==================== */
.drafts-kpis-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
    .drafts-kpis-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .drafts-kpis-grid { grid-template-columns: 1fr; }
}

.draft-kpi-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
}

.draft-kpi-card:hover { transform: translateY(-2px); }
.draft-kpi-card.warning { border-left: 4px solid #f59e0b; }
.draft-kpi-card.danger { border-left: 4px solid #dc2626; }

.draft-kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.draft-kpi-icon.total { background: #e0e7ff; color: #4f46e5; }
.draft-kpi-icon.expiring { background: #fef3c7; color: #f59e0b; }
.draft-kpi-icon.expired { background: #fee2e2; color: #dc2626; }
.draft-kpi-icon.progress-kpi { background: #dcfce7; color: #198754; }

.draft-kpi-content { display: flex; flex-direction: column; }
.draft-kpi-value { font-size: 1.5rem; font-weight: 700; color: #1f2937; }
.draft-kpi-label { font-size: 0.85rem; color: #6b7280; }
.draft-kpi-sub { font-size: 0.75rem; color: #9ca3af; }

.draft-expiration-notice {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #1e40af;
}

.draft-expiration-notice i { font-size: 1.25rem; color: #3b82f6; }

/* Drafts Tabs */
.drafts-tabs {
    display: flex;
    gap: 0.5rem;
    background: #f1f5f9;
    padding: 0.375rem;
    border-radius: 0.75rem;
}

.drafts-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drafts-tab:hover {
    background: rgba(255,255,255,0.5);
    color: #475569;
}

.drafts-tab.active {
    background: #fff;
    color: #198754;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.drafts-tab .tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.375rem;
    background: #198754;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.75rem;
}

.drafts-tab .tab-badge.secondary {
    background: #94a3b8;
}

.drafts-tab.active .tab-badge.secondary {
    background: #64748b;
}

/* Archived draft card styling */
.draft-card.archived {
    opacity: 0.75;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
}

.draft-card.archived::before {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.draft-card.archived .draft-expires {
    background: #94a3b8;
}

.draft-archived-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #64748b;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 600;
    padding: 0.15rem 0.35rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.drafts-filter-bar {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.85rem;
    color: #6b7280;
    white-space: nowrap;
}

.filter-actions { margin-left: auto; }

.drafts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 1600px) { .drafts-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1200px) { .drafts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .drafts-grid { grid-template-columns: 1fr; } }

.draft-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid rgba(0,0,0,0.06);
    position: relative;
}

.draft-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #198754, #20c997);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.draft-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.06);
}

.draft-card:hover::before {
    opacity: 1;
}

.draft-card.urgent {
    border-left: 4px solid #dc2626;
    background: linear-gradient(145deg, #fff5f5 0%, #fef2f2 100%);
}
.draft-card.urgent::before { background: linear-gradient(90deg, #dc2626, #f87171); opacity: 1; }

.draft-card.warning {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
}
.draft-card.warning::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); opacity: 1; }

.draft-card-header {
    padding: 0.75rem 1rem 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.draft-id {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.75rem;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.draft-expires {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.65rem;
    font-weight: 600;
    background: #f3f4f6;
    color: #6b7280;
}

.draft-expires.text-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
    animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

.draft-expiry-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.draft-expiry-badge.danger { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #dc2626; }
.draft-expiry-badge.warning { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }
.draft-expiry-badge.info { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); color: #4f46e5; }
.draft-expiry-badge.success { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: #166534; }

.draft-card-body {
    padding: 0.375rem 1rem 0.75rem;
}

.draft-deceased {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.draft-funeral {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.draft-funeral i { color: #9ca3af; font-size: 0.7rem; }

.draft-deceased-name { font-size: 0.95rem; font-weight: 600; color: #1f2937; margin-bottom: 0.2rem; }
.draft-funeral-home { font-size: 0.75rem; color: #6b7280; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.375rem; }

.draft-progress-section { margin-bottom: 0.5rem; }

.draft-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.draft-progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.draft-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #198754, #20c997);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Progress section used in JS rendering */
.draft-progress {
    padding: 0.5rem 1rem;
    border-top: 1px solid #f3f4f6;
}

.draft-progress .progress {
    height: 4px;
    margin-bottom: 0.25rem;
}

.draft-progress small {
    font-size: 0.65rem;
}

.draft-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.65rem;
    color: #9ca3af;
}

.draft-meta i { margin-right: 0.25rem; }

.draft-card-footer {
    padding: 0.625rem 1rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 0.375rem;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.draft-card-footer .btn {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
}

.draft-card-footer .draft-actions {
    display: flex;
    gap: 0.375rem;
    margin-left: auto;
}

.draft-card-footer .btn-outline-danger,
.draft-card-footer .btn-outline-secondary {
    padding: 0.25rem 0.5rem;
}

.draft-policies-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.375rem;
}

.draft-policy-item {
    display: flex;
    gap: 0.2rem;
    align-items: center;
}

.draft-policy-item .badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
}

.draft-beneficiaries-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.375rem;
}

.draft-beneficiaries-row small {
    font-size: 0.7rem;
}

.beneficiary-names {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
}

.beneficiary-names .badge {
    font-size: 0.6rem;
    font-weight: 500;
    padding: 0.15rem 0.35rem;
}

.draft-meta-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.draft-meta-row small {
    display: flex;
    align-items: center;
    font-size: 0.65rem;
}

/* Enhanced Draft Card Styles */
.draft-info-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.draft-info-row span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.draft-info-row i { color: #9ca3af; }

.draft-step-map {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.step-map-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    position: relative;
}

.step-map-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.step-map-item.completed:not(:last-child)::after {
    background: #198754;
}

.step-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    z-index: 1;
    background: #e5e7eb;
    color: #9ca3af;
}

.step-map-item.completed .step-dot {
    background: #198754;
    color: #fff;
}

.step-map-item.current .step-dot {
    background: #3b82f6;
    color: #fff;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.step-name {
    font-size: 0.6rem;
    color: #9ca3af;
    text-align: center;
    line-height: 1.1;
}

.step-map-item.completed .step-name { color: #198754; }
.step-map-item.current .step-name { color: #3b82f6; font-weight: 600; }

.draft-next-step {
    font-size: 0.8rem;
    color: #3b82f6;
    padding: 0.5rem 0.75rem;
    background: #eff6ff;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.draft-next-step.success {
    background: #dcfce7;
    color: #166534;
}

.draft-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #9ca3af;
}

.draft-meta-row span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.draft-funeral-home {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.draft-funeral-home i { color: #9ca3af; font-size: 0.75rem; }

/* Compact Document Widget Styles */
.dashboard-top-row {
    position: relative;
    margin-bottom: 1.5rem;
}

.quick-actions-inline {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-right: 340px; /* Space for doc widget */
}

.qa-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 2rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.qa-chip:hover {
    background: #198754;
    color: #fff;
    border-color: #198754;
    transform: translateY(-1px);
}

.qa-chip i { font-size: 0.9rem; }
.qa-badge {
    background: #dc2626;
    color: #fff;
    padding: 0.1rem 0.4rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.doc-widget {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #fde68a;
    overflow: hidden;
    z-index: 10;
}

.doc-widget-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

.doc-widget-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.doc-widget-count {
    background: #fff;
    color: #d97706;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.doc-widget-list {
    max-height: 180px;
    overflow-y: auto;
}

.doc-widget-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.15s;
}

.doc-widget-row:hover { background: #fffbeb; }
.doc-widget-row:last-child { border-bottom: none; }

.dw-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dw-dot.urgent { background: #dc2626; }
.dw-dot.high { background: #f59e0b; }
.dw-dot.medium { background: #3b82f6; }
.dw-dot.low { background: #10b981; }

.dw-content {
    flex: 1;
    min-width: 0;
}

.dw-name {
    display: block;
    font-weight: 500;
    font-size: 0.85rem;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dw-meta {
    font-size: 0.7rem;
    color: #9ca3af;
}

.dw-actions {
    display: flex;
    gap: 0.25rem;
}

.dw-btn, .dw-btn-info {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.15s;
}

.dw-btn {
    background: #198754;
    color: #fff;
}

.dw-btn:hover { background: #157347; }

.dw-btn-info {
    background: #e5e7eb;
    color: #6b7280;
}

.dw-btn-info:hover { background: #d1d5db; color: #374151; }

.doc-widget-footer {
    padding: 0.5rem 1rem;
    background: #fffbeb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #fde68a;
}

.dw-help {
    font-size: 0.7rem;
    color: #92400e;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
}

.no-docs-needed {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%) !important;
    border: 1px solid #86efac !important;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #166534;
    font-size: 0.85rem;
    width: auto;
    min-width: 280px;
}

.no-docs-needed i {
    font-size: 1.25rem;
    color: #22c55e;
}

@media (max-width: 900px) {
    .dashboard-top-row {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .quick-actions-inline {
        margin-right: 0;
    }
    .doc-widget {
        position: relative;
        width: 100%;
    }
}

/* When no documents needed, remove the margin */
.dashboard-top-row:has(.doc-widget[style*="display: none"]) .quick-actions-inline,
.dashboard-top-row:has(#noDocsWidget:not([style*="display: none"])) .quick-actions-inline {
    margin-right: 0;
}

/* ==================== MESSAGING MODULE ==================== */
.messaging-page {
    display: flex;
    height: calc(100vh - var(--header-height) - 2rem - 50px); /* Account for footer */
    background: #fff;
    border-radius: 1rem;
    box-shadow: var(--eff-shadow);
    overflow: hidden;
}

/* Messaging Sidebar / Conversations List */
.messaging-sidebar {
    width: 360px;
    min-width: 360px;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    background: #fafbfc;
}

.messaging-sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.messaging-sidebar-header h5 {
    margin: 0;
    font-weight: 600;
    color: #1f2937;
    font-size: 1.1rem;
}

.unread-count {
    background: var(--eff-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 1rem;
}

.messaging-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.new-message-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--eff-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.new-message-btn:hover {
    background: var(--eff-primary-dark);
    transform: scale(1.05);
}

/* New Message Modal Styles */
.new-msg-claim-search {
    position: relative;
    margin-bottom: 0.5rem;
}

.new-msg-claim-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.new-msg-claim-search input {
    padding-left: 38px;
}

.new-msg-claim-results {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    background: #fafbfc;
}

.new-msg-claim-results:empty {
    display: none;
}

/* Claim conversation indicator */
.claim-conv-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #dbeafe;
    color: #3b82f6;
    border-radius: 50%;
    font-size: 0.65rem;
    margin-left: 0.25rem;
}

.new-msg-claim-item.has-conversation {
    background: linear-gradient(90deg, #f0f9ff 0%, transparent 100%);
    border-left: 3px solid #3b82f6;
}

.new-msg-claim-item.has-conversation:hover {
    background: linear-gradient(90deg, #dbeafe 0%, #f0fdf4 100%);
}

/* Existing conversation notice */
.existing-conv-notice {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
    border: 1px solid #93c5fd;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
}

.existing-conv-notice > i {
    font-size: 1.75rem;
    color: #3b82f6;
    margin-top: 0.125rem;
}

.existing-conv-notice .notice-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.existing-conv-notice .notice-text strong {
    color: #1e40af;
    font-size: 0.95rem;
}

.existing-conv-notice .notice-text span {
    color: #3b82f6;
    font-size: 0.85rem;
}

.new-msg-claim-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: background 0.15s ease;
}

.new-msg-claim-item:last-child {
    border-bottom: none;
}

.new-msg-claim-item:hover {
    background: #f0fdf4;
}

.new-msg-claim-item .claim-item-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.new-msg-claim-item .claim-item-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 0.25rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.new-msg-claim-item .claim-item-details i {
    color: #9ca3af;
    font-size: 0.7rem;
}

.new-msg-claim-item .claim-id {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--eff-primary);
    background: rgba(34, 197, 94, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    white-space: nowrap;
}

.new-msg-claim-item .claim-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
}

.new-msg-claim-item .claim-status,
.new-msg-claim-item .status-badge.small {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
}

.new-msg-selected-claim {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f0fdf4;
    border: 1px solid var(--eff-primary);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.selected-claim-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.selected-claim-info > span:first-child {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.selected-claim-id {
    font-weight: 600;
    color: var(--eff-primary);
}

.selected-claim-name {
    font-weight: 500;
    color: #374151;
}

.selected-claim-extra {
    font-size: 0.8rem;
    color: #6b7280;
}

.selected-claim-extra .claim-fh,
.selected-claim-extra .claim-ins {
    font-size: 0.8rem;
}

/* Claims table message button - Base styles */
.claim-msg-btn {
    position: relative;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

/* STATE 1: No conversation - Gray outline, dashed border */
.claim-msg-btn.claim-msg-new {
    background: transparent;
    border: 1.5px dashed #9ca3af;
    color: #9ca3af;
}

.claim-msg-btn.claim-msg-new:hover {
    background: #f3f4f6;
    border-color: #6b7280;
    color: #6b7280;
    border-style: solid;
}

.claim-msg-btn.claim-msg-new i {
    font-size: 0.8rem;
}

/* STATE 2: Has conversation (no unread) - Blue filled */
.claim-msg-btn.claim-msg-active {
    background: #3b82f6;
    border: none;
    color: white;
}

.claim-msg-btn.claim-msg-active:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.claim-msg-btn.claim-msg-active i {
    font-size: 0.85rem;
}

/* STATE 3: Has unread messages - Orange/Yellow with badge and pulse */
.claim-msg-btn.claim-msg-unread {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    color: white;
    animation: pulse-unread 1.5s infinite;
}

.claim-msg-btn.claim-msg-unread:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: scale(1.1);
    animation: none;
}

.claim-msg-btn.claim-msg-unread i {
    font-size: 0.85rem;
}

.claim-msg-btn .claim-msg-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.65rem;
    font-weight: 700;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

@keyframes pulse-unread {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
    }
}

.new-msg-no-results {
    padding: 1.5rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

.messaging-search {
    padding: 1rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.messaging-search i {
    color: #9ca3af;
    font-size: 0.9rem;
}

.messaging-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9rem;
    background: transparent;
}

.messaging-search input::placeholder {
    color: #9ca3af;
}

.messaging-filters {
    padding: 0.75rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    gap: 0.5rem;
}

.msg-filter-btn {
    padding: 0.4rem 0.9rem;
    border: 1px solid #e9ecef;
    border-radius: 2rem;
    background: #fff;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.msg-filter-btn:hover {
    border-color: var(--eff-primary);
    color: var(--eff-primary);
}

.msg-filter-btn.active {
    background: var(--eff-primary);
    border-color: var(--eff-primary);
    color: #fff;
}

.msg-filter-btn.active .unread-filter-count {
    background: #fff;
    color: var(--eff-primary);
}

.unread-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 4px;
    background: var(--eff-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9px;
}

.unread-filter-count:empty {
    display: none;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f0f1f3;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    gap: 0.75rem;
}

.conversation-item:hover {
    background: #f3f4f6;
}

.conversation-item.active {
    background: #e8f5e9;
    border-left: 3px solid var(--eff-primary);
}

.conversation-item.unread {
    background: #fefefe;
}

.conversation-item.unread .conv-preview {
    font-weight: 600;
    color: #1f2937;
}

.conv-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--eff-primary) 0%, var(--eff-primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

.conv-avatar.staff {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.conv-content {
    flex: 1;
    min-width: 0;
}

.conv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.conv-claim-id {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--eff-primary);
    background: var(--eff-primary-light);
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
}

.conv-time {
    font-size: 0.7rem;
    color: #9ca3af;
    white-space: nowrap;
}

.conv-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-preview {
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.conv-preview .staff-badge {
    font-size: 0.65rem;
    color: #3b82f6;
    font-weight: 600;
}

.conv-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.conv-started {
    font-size: 0.7rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.conv-started i {
    font-size: 0.6rem;
}

.conv-indicators {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.conv-unread-badge {
    background: var(--eff-primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 1rem;
    min-width: 18px;
    text-align: center;
}

.conv-starred {
    color: #f59e0b;
    font-size: 0.75rem;
}

/* Messaging Main Panel */
.messaging-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    min-height: 0; /* Allow flex child to shrink below content size */
    overflow: hidden;
}

.messaging-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    text-align: center;
    padding: 2rem;
}

.messaging-empty i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.messaging-empty h4 {
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.messaging-empty p {
    font-size: 0.9rem;
}

/* Chat Panel */
.messaging-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Allow flex child to shrink below content size */
    overflow: hidden;
}

.chat-header {
    padding: 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    background: #fafbfc;
    flex-shrink: 0; /* Prevent header from shrinking */
}

.chat-header-top {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f1f3;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-claim-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--eff-primary);
    background: var(--eff-primary-light);
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
}

.chat-header-details h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

/* Chat Claim Details Row */
.chat-claim-details {
    padding: 0.75rem 1.5rem;
    background: #fff;
}

.chat-claim-info-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.chat-claim-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.chat-stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #9ca3af;
}

.chat-stat-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f2937;
}

.chat-claim-info-row .btn {
    margin-left: auto;
}

/* Compact Chat Header - Single Row */
.chat-header-compact {
    flex-direction: row !important;
    padding: 0.75rem 1rem !important;
    align-items: center;
}

.chat-header-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    flex-wrap: wrap;
}

.chat-header-compact .chat-claim-badge {
    flex-shrink: 0;
}

.chat-header-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.chat-header-name > span:first-child {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.chat-header-divider {
    color: #d1d5db;
    font-weight: 300;
}

.chat-funeral-home {
    color: #6b7280;
    font-size: 0.85rem;
}

.chat-stat-inline {
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
}

.chat-stat-inline strong {
    color: #9ca3af;
    font-weight: 500;
}

.chat-header-compact .chat-header-actions {
    margin-left: auto;
    flex-shrink: 0;
}

.chat-header-details span {
    font-size: 0.8rem;
    color: #6b7280;
}

.chat-header-actions {
    display: flex;
    gap: 0.5rem;
}

.chat-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e9ecef;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-action-btn:hover {
    background: #f3f4f6;
    color: var(--eff-primary);
    border-color: var(--eff-primary);
}

.chat-action-btn.starred i {
    color: #f59e0b;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #f8f9fa;
    min-height: 0; /* Allow flex child to shrink and enable scrolling */
}

.message-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.message-date-divider {
    text-align: center;
    padding: 1rem 0;
}

.message-date-divider span {
    background: #e9ecef;
    color: #6b7280;
    font-size: 0.75rem;
    padding: 0.35rem 1rem;
    border-radius: 1rem;
}

.message {
    display: flex;
    gap: 0.75rem;
    max-width: 75%;
}

.message.outgoing {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.message.incoming .message-avatar {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
}

.message.outgoing .message-avatar {
    background: linear-gradient(135deg, var(--eff-primary) 0%, var(--eff-primary-dark) 100%);
    color: #fff;
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.message-sender {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}

.message.outgoing .message-sender {
    text-align: right;
}

.message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.message.incoming .message-bubble {
    background: #fff;
    color: #1f2937;
    border: 1px solid #e9ecef;
    border-top-left-radius: 0.25rem;
}

.message.outgoing .message-bubble {
    background: var(--eff-primary);
    color: #fff;
    border-top-right-radius: 0.25rem;
}

.message-time {
    font-size: 0.7rem;
    color: #9ca3af;
}

.message.outgoing .message-time {
    text-align: right;
}

/* Chat Input */
.chat-input-area {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    background: #fff;
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    background: #f3f4f6;
    border-radius: 1.5rem;
    padding: 0.5rem;
}

.chat-attach-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-attach-btn:hover {
    background: #e9ecef;
    color: var(--eff-primary);
}

.chat-input-wrapper textarea {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    outline: none;
    font-size: 0.9rem;
    padding: 0.5rem;
    max-height: 120px;
    font-family: inherit;
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--eff-primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-send-btn:hover {
    background: var(--eff-primary-dark);
    transform: scale(1.05);
}

/* ==================== RICH TEXT EDITOR TOOLBAR ==================== */
.chat-toolbar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0.75rem 0.75rem 0 0;
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: #d1d5db;
    margin: 0 0.375rem;
}

.toolbar-spacer {
    flex: 1;
}

.toolbar-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.15s ease;
    position: relative;
}

.toolbar-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.toolbar-btn:active,
.toolbar-btn.active {
    background: #d1d5db;
    color: var(--eff-primary);
}

.toolbar-btn .color-indicator {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 3px;
    border-radius: 2px;
}

.toolbar-btn.clear-btn {
    color: #9ca3af;
}

.toolbar-btn.clear-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Toolbar Dropdowns */
.toolbar-dropdown {
    position: relative;
}

.color-picker-dropdown,
.emoji-picker-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    padding: 0.5rem;
    z-index: 100;
    display: none;
}

.color-picker-dropdown.show,
.emoji-picker-dropdown.show {
    display: block;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border: 2px solid transparent;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.15s;
}

.color-swatch:hover {
    transform: scale(1.1);
    border-color: #374151;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.25rem;
    max-height: 200px;
    overflow-y: auto;
}

.emoji-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.emoji-btn:hover {
    background: #f3f4f6;
    transform: scale(1.15);
}

/* Rich Text Input Area */
.chat-input-area {
    padding: 0 !important;
    border-top: 1px solid #e9ecef;
    background: #f3f4f6;
    display: flex;
    flex-direction: column;
    flex-shrink: 0; /* Prevent input area from shrinking - always visible at bottom */
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    background: #f3f4f6;
    border-radius: 0;
    padding: 0.75rem;
}

.rich-text-input {
    flex: 1;
    min-height: 60px;
    max-height: 150px;
    overflow-y: auto;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rich-text-input:focus {
    border-color: var(--eff-primary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.rich-text-input:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
}

.rich-text-input table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
    font-size: 0.85rem;
}

.rich-text-input table td,
.rich-text-input table th {
    border: 1px solid #d1d5db;
    padding: 0.5rem;
    min-width: 60px;
}

.rich-text-input table th {
    background: #f3f4f6;
    font-weight: 600;
}

.rich-text-input ul,
.rich-text-input ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.rich-text-input hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 0.75rem 0;
}


/* Message content with rich formatting */
.message-bubble .rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
    font-size: 0.8rem;
}

.message-bubble .rich-content table td,
.message-bubble .rich-content table th {
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.35rem 0.5rem;
}

.message-bubble.staff .rich-content table td,
.message-bubble.staff .rich-content table th {
    border-color: #d1d5db;
}

.message-bubble .rich-content ul,
.message-bubble .rich-content ol {
    margin: 0.25rem 0;
    padding-left: 1.25rem;
}

.message-bubble .rich-content hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.3);
    margin: 0.5rem 0;
}

.message-bubble.staff .rich-content hr {
    border-color: #d1d5db;
}


/* Responsive */
@media (max-width: 992px) {
    .messaging-page {
        flex-direction: column;
        height: calc(100vh - var(--header-height) - 2rem - 50px);
    }

    .messaging-sidebar {
        width: 100%;
        min-width: 100%;
        max-height: 40vh;
        flex-shrink: 0;
    }

    .messaging-main {
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }
}