﻿/* ==================== UNIFIED MEDICAL RECORDS STYLES (FLUENT DESIGN) ==================== */

/* Unified Medical Records Container */
.unified-medical-records-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
}

/* Global Search Bar - Fluent Style */
.global-search-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.95) 100%);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    max-width: 600px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 20px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 44px 10px 48px;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.search-input:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(59, 130, 246, 0.3);
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12), 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.clear-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.clear-search-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: translateY(-50%) scale(1.1);
}

.clear-search-btn .material-icons {
    font-size: 18px;
    color: #6b7280;
}

.clear-search-btn:hover .material-icons {
    color: #ef4444;
}

.quick-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.action-btn:hover {
    background: white;
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn.primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.action-btn .material-icons {
    font-size: 20px;
}

.btn-text {
    font-size: 14px;
    font-weight: 600;
}

.view-mode-toggle {
    display: flex;
    gap: 2px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.view-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #6b7280;
}

.view-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.view-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.view-btn .material-icons {
    font-size: 20px;
}

/* Unified Content Layout - Fluent Style */
.unified-content {
    display: flex;
    height: calc(100vh - 140px);
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    position: relative;
    overflow: hidden;
}

/* Filter Sidebar - Fluent Acrylic */
.filter-sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    padding: 20px;
    overflow-y: auto;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.04);
}

.filter-sidebar.collapsed {
    width: 0;
    padding: 0;
    overflow: hidden;
    border-right: none;
}

.filter-sidebar::-webkit-scrollbar {
    width: 6px;
}

.filter-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.filter-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.filter-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.sidebar-header h3 .material-icons {
    font-size: 22px;
    color: #3b82f6;
}

.clear-filters-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    background: rgba(254, 226, 226, 0.5);
    color: #dc2626;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.clear-filters-btn:hover {
    background: rgba(254, 226, 226, 1);
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.clear-filters-btn .material-icons {
    font-size: 16px;
}

.filter-section {
    margin-bottom: 24px;
}

.filter-section h4 {
    margin: 0 0 12px 0;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.filter-section h4 .material-icons {
    font-size: 16px;
    color: #9ca3af;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    background: rgba(255, 255, 255, 0.5);
}

.filter-checkbox:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #3b82f6;
}

.filter-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.filter-mini-icon {
    font-size: 18px;
    color: #6b7280;
}

.count {
    margin-left: auto;
    font-size: 12px;
    color: #6b7280;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 12px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.status-dot.pending {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.status-dot.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.status-dot.critical {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.status-dot.draft {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.priority-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.date-range-picker {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.date-input-group label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.date-input {
    padding: 8px 12px;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: rgba(255, 255, 255, 0.7);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.date-input:hover {
    background: white;
    border-color: rgba(59, 130, 246, 0.3);
}

.date-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.patient-search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: rgba(255, 255, 255, 0.7);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.patient-search-input:hover {
    background: white;
    border-color: rgba(59, 130, 246, 0.3);
}

.patient-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* Unified Record List - Fluent Cards */
.unified-record-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
    min-width: 380px;
    max-width: 480px;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.list-header {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.list-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.list-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.record-count {
    font-size: 14px;
    color: #6b7280;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 10px;
    border-radius: 12px;
}

.bulk-actions-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.8) 0%, rgba(191, 219, 254, 0.8) 100%);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.bulk-count {
    font-size: 13px;
    font-weight: 700;
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.bulk-count .material-icons {
    font-size: 18px;
}

.bulk-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(191, 219, 254, 0.5);
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #1e40af;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.bulk-btn:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.bulk-btn.delete {
    color: #dc2626;
    border-color: rgba(254, 226, 226, 0.5);
}

.bulk-btn.delete:hover {
    background: rgba(254, 226, 226, 0.5);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.bulk-btn .material-icons {
    font-size: 16px;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-options .material-icons {
    font-size: 20px;
    color: #6b7280;
}

.sort-select {
    padding: 8px 32px 8px 12px;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7280' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sort-select:hover {
    background-color: white;
    border-color: rgba(59, 130, 246, 0.3);
}

.sort-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.records-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.records-list::-webkit-scrollbar {
    width: 8px;
}

.records-list::-webkit-scrollbar-track {
    background: transparent;
}

.records-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.records-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 18px;
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 8px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.empty-state small {
    font-size: 14px;
    color: #9ca3af;
}

/* Record Items - Fluent Cards with Elevation */
.record-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.record-item:hover {
    background: white;
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(4px) translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.record-item:active {
    transform: translateX(4px) translateY(0);
}

.record-item.selected {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.95) 0%, rgba(191, 219, 254, 0.95) 100%);
    border-color: #3b82f6;
    border-width: 2px;
    padding: 13px 15px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25), 0 0 0 1px rgba(59, 130, 246, 0.1);
}

.record-item.unread {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(90deg, rgba(219, 234, 254, 0.4) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.record-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-top: 4px;
    flex-shrink: 0;
    accent-color: #3b82f6;
    border-radius: 4px;
}

.record-avatar {
    position: relative;
    flex-shrink: 0;
}

.avatar-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.avatar-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
}

.avatar-circle.progress-note {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.avatar-circle.lab-order {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.avatar-circle.xray-request {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.avatar-circle.admission {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.avatar-circle.prescription {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.new-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5);
    animation: pulse-indicator 2s infinite;
}

@keyframes pulse-indicator {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 2px 12px rgba(59, 130, 246, 0.8);
    }
}

.record-content {
    flex: 1;
    min-width: 0;
}

.record-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.record-type-icon {
    font-size: 16px;
    color: #6b7280;
}

.record-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.priority-icon {
    font-size: 18px;
}

.priority-icon.stat {
    color: #ef4444;
    filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.5));
}

.priority-icon.urgent {
    color: #f59e0b;
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.5));
}

.record-date {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 600;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.record-patient {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.patient-icon-small {
    font-size: 16px;
}

.record-preview {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.record-metadata {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.8) 0%, rgba(186, 230, 253, 0.8) 100%);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    font-size: 11px;
    color: #0369a1;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(3, 105, 161, 0.1);
}

.meta-icon {
    font-size: 14px;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(241, 245, 249, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    font-size: 11px;
    color: #475569;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.category-icon {
    font-size: 14px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.status-badge.status-pending {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.9) 0%, rgba(253, 230, 138, 0.9) 100%);
    color: #92400e;
}

.status-badge.status-completed {
    background: linear-gradient(135deg, rgba(209, 250, 229, 0.9) 0%, rgba(167, 243, 208, 0.9) 100%);
    color: #065f46;
}

.status-badge.status-critical {
    background: linear-gradient(135deg, rgba(254, 202, 202, 0.9) 0%, rgba(252, 165, 165, 0.9) 100%);
    color: #991b1b;
}

.status-badge.status-draft {
    background: linear-gradient(135deg, rgba(224, 231, 255, 0.9) 0%, rgba(199, 210, 254, 0.9) 100%);
    color: #3730a3;
}

.record-quick-actions {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    gap: 6px;
}

.record-item:hover .record-quick-actions {
    display: flex;
}

.quick-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.quick-action-btn .material-icons {
    font-size: 18px;
    color: #6b7280;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-action-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.quick-action-btn:hover .material-icons {
    color: #3b82f6;
}

.quick-action-btn.edit:hover {
    background: linear-gradient(135deg, #fef3c7 0%, #fde047 100%);
    border-color: #f59e0b;
}

.quick-action-btn.edit:hover .material-icons {
    color: #92400e;
}

.quick-action-btn.delete:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #ef4444;
}

.quick-action-btn.delete:hover .material-icons {
    color: #991b1b;
}

/* Record Detail View - Fluent Glass Morphism */
.record-detail-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.95) 100%);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    overflow-y: auto;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.04);
}

.record-detail-view::-webkit-scrollbar {
    width: 8px;
}

.record-detail-view::-webkit-scrollbar-track {
    background: transparent;
}

.record-detail-view::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.record-detail-view::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.empty-detail-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 60px 40px;
    text-align: center;
}

.empty-detail-icon {
    font-size: 80px;
    color: #d1d5db;
    margin-bottom: 24px;
}

.empty-detail-state h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    color: #6b7280;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.empty-detail-state p {
    margin: 0;
    font-size: 16px;
    color: #9ca3af;
}

.detail-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.detail-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.detail-icon-badge {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.detail-icon-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
}

.detail-icon-badge .material-icons {
    font-size: 32px;
    color: white;
    position: relative;
    z-index: 1;
}

.detail-icon-badge.progress-note {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.detail-icon-badge.lab-order {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.detail-icon-badge.xray-request {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.detail-icon-badge.admission {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.detail-icon-badge.prescription {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.detail-title-content {
    flex: 1;
    min-width: 0;
}

.detail-title-content h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.detail-metadata-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.detail-type-badge .material-icons {
    font-size: 16px;
}

.detail-type-badge.progress-note {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.detail-type-badge.lab-order {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.detail-type-badge.xray-request {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.detail-type-badge.admission {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.detail-type-badge.prescription {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.detail-priority {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.detail-priority.priority-stat {
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.9) 0%, rgba(252, 165, 165, 0.9) 100%);
    color: #991b1b;
}

.detail-priority.priority-urgent {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.9) 0%, rgba(253, 230, 138, 0.9) 100%);
    color: #92400e;
}

.detail-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-action-btn {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.detail-action-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.detail-action-btn:active {
    transform: translateY(0);
}

.detail-action-btn.edit {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.9) 0%, rgba(253, 230, 138, 0.9) 100%);
    color: #92400e;
    border-color: #fde047;
}

.detail-action-btn.edit:hover {
    background: linear-gradient(135deg, #fde047 0%, #facc15 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.detail-action-btn.danger {
    color: #dc2626;
    border-color: rgba(254, 226, 226, 0.8);
}

.detail-action-btn.danger:hover {
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.9) 0%, rgba(252, 165, 165, 0.9) 100%);
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.detail-action-btn .material-icons {
    font-size: 20px;
}

.detail-content {
    padding: 24px 32px;
    flex: 1;
    overflow-y: auto;
}

.detail-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.12);
}

.detail-card.patient-card {
    background: linear-gradient(135deg, rgba(240, 249, 255, 0.95) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-color: rgba(191, 219, 254, 0.5);
}

.detail-card-title {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-card-title .material-icons {
    font-size: 22px;
    color: #3b82f6;
}

.detail-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.detail-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-field.full-width {
    grid-column: 1 / -1;
}

.detail-field-label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.field-icon {
    font-size: 16px;
}

.detail-field-value {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.detail-field-value.text-content {
    line-height: 1.6;
    color: #374151;
    font-weight: 500;
}

.metadata-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.metadata-title {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
}

.metadata-title .material-icons {
    font-size: 18px;
    color: #6b7280;
}

.attachments-placeholder {
    padding: 40px;
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.8) 0%, rgba(243, 244, 246, 0.8) 100%);
    border: 2px dashed rgba(209, 213, 219, 0.8);
    border-radius: 12px;
    text-align: center;
}

.attachments-placeholder .material-icons {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 12px;
}

.attachments-placeholder p {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.attachments-placeholder small {
    font-size: 13px;
    color: #9ca3af;
}

.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.activity-icon.created {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.activity-icon.created .material-icons {
    color: #065f46;
    font-size: 20px;
}

.activity-icon.updated {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.activity-icon.updated .material-icons {
    color: #1e40af;
    font-size: 20px;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: #9ca3af;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* Loading Overlay - Fluent */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.loading-spinner {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    padding: 40px 60px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    text-align: center;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-spinner .material-icons {
    font-size: 48px;
    color: #3b82f6;
    margin-bottom: 16px;
}

.loading-spinner .material-icons.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* Responsive Design - Fluent Adaptive */
@media (max-width: 1200px) {
    .unified-content {
        flex-direction: column;
    }
    
    .filter-sidebar {
        width: 100%;
        max-height: 300px;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
    
    .unified-record-list {
        max-width: none;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
}

@media (max-width: 768px) {
    .global-search-bar {
        flex-wrap: wrap;
        padding: 12px 16px;
    }
    
    .search-input-wrapper {
        width: 100%;
        max-width: none;
    }
    
    .quick-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn-text {
        display: none;
    }
    
    .detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detail-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .detail-action-btn {
        flex: 1;
        justify-content: center;
    }
}





