/* Modern Medical Dashboard Styles */
:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

.app-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    position: relative;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-card);
    padding: 1.5rem 0.3rem 1rem 1rem;
    height: 100vh;
    position: fixed;
    transition: all 0.3s ease;
    z-index: 100;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.logo-icon {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text {
    border-top: 3px solid transparent;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-text .logo-image {
    width: 140px;
    height: auto;
    max-height: 50px;
}

.nav-links {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding-top: 0.5rem;
    padding-right: 1rem;
}

.nav-item {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-item:hover,
.nav-item.active {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item i {
    width: 24px;
    text-align: center;
}

/* Main Content */
/* Desktop Layout */
.desktop-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    width: calc(100% - 260px);
    max-width: calc(100vw - 260px);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100vw;
        padding: 0;
        position: relative;
    }
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box {
    background-color: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 250px;
    min-width: 150px;
    flex: 1;
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    outline: none;
    width: 100%;
    min-width: 0;
    flex: 1;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    color: white;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* margin-bottom: 1rem; */
    flex-wrap: wrap;
    gap: 1rem;
}

.card-header .search-input-wrapper {
    flex: 0 0 auto;
    min-width: 280px;
    max-width: 500px;
    position: relative;
}

.card-header .search-input-wrapper .form-control {
    margin-bottom: 0;
    padding-left: 2.5rem;
}

.card-header .search-input-wrapper .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 2;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    flex-shrink: 0;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bg-primary {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--primary);
}

.bg-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.bg-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.bg-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.8rem;
    white-space: nowrap;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: center;
    min-height: 38px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: #475569;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

/* Charts */
.chart-container {
    height: 300px;
    margin-top: 1rem;
}

/* Table */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    /* Minimum width for horizontal scroll */
    background: var(--bg-card);
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 10;
}

tr:hover {
    background: var(--bg-hover);
}

/* Form */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Grouped form fields for better organization */
.form-row-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .form-row-group {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.form-group {
    margin-bottom: 1.25rem;
}

/* Remove bottom margin for form-groups inside grid containers since gap handles spacing */
.form-grid .form-group,
.form-row-group .form-group {
    margin-bottom: 0;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    font-size: 0.8rem;
    transition: border-color 0.2s ease;
    height: auto;
    min-height: 38px;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

/* Page content */
.page-content {
    display: none;
    padding: 1.5rem;
}

.page-content.active {
    display: block;
}

/* Patient Card Enhancements */
.patient-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    position: relative;
}

.patient-card:hover {
    background-color: var(--bg-hover);
}

.patient-checkbox {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 5;
}

.patient-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.patient-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 2rem;
    /* Space for checkbox */
}

.patient-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
    color: white;
}

.patient-name {
    font-weight: 600;
    font-size: 1.125rem;
}

.patient-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

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

/* Bulk Actions Bar */
.bulk-actions-bar {
    display: none;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    animation: slideDown 0.3s ease;
}

.bulk-info {
    font-weight: 600;
    color: var(--primary);
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile adjustments for patient cards */
@media (max-width: 768px) {
    .patient-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }

    .patient-checkbox {
        top: 0.75rem;
        left: 0.75rem;
    }

    .patient-info {
        margin-left: 1.5rem;
        justify-content: flex-start;
    }

    .patient-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .bulk-actions-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .bulk-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Patient List */
.patient-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    position: relative;
}

.patient-card:hover {
    background-color: var(--bg-hover);
}

.patient-checkbox {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 5;
}

.patient-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.patient-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 2rem;
    /* Space for checkbox */
}

.patient-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
    color: white;
}

.patient-name {
    font-weight: 600;
    font-size: 1.125rem;
}

.patient-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

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

/* Alert messages */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: var(--success) !important;
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: none !important;
}

.alert-success i {
    color: var(--success) !important;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: var(--danger) !important;
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: none !important;
}

.alert-error i {
    color: var(--danger) !important;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    max-width: 400px;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 4px 6px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateX(calc(100% + 40px));
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: slideIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.toast.show {
    transform: translateX(0);
}

.toast.hide {
    animation: slideOut 0.3s ease-in forwards;
}

.toast-success {
    background: rgba(16, 185, 129, 0.95);
    color: white;
    border: 1px solid rgba(16, 185, 129, 1);
}

.toast-error {
    background: rgba(239, 68, 68, 0.95);
    color: white;
    border: 1px solid rgba(239, 68, 68, 1);
}

.toast-warning {
    background: rgba(245, 158, 11, 0.95);
    color: white;
    border: 1px solid rgba(245, 158, 11, 1);
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    color: inherit;
}

.toast-icon i {
    color: inherit;
}

.toast-content {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.8;
    padding: 0.25rem;
    border-radius: 4px;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

@keyframes slideIn {
    from {
        transform: translateX(calc(100% + 40px));
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(calc(100% + 40px));
        opacity: 0;
    }
}

/* Mobile toast adjustments */
@media (max-width: 768px) {
    .toast {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        width: calc(100% - 20px);
        top: 10px;
        transform: translateY(-100px);
        animation: slideInMobile 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    }

    .toast.show {
        transform: translateY(0);
    }

    .toast.hide {
        animation: slideOutMobile 0.3s ease-in forwards;
    }
}

@keyframes slideInMobile {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutMobile {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(-100px);
        opacity: 0;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);

    /* From https://css.glass */
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4.3px);
    -webkit-backdrop-filter: blur(4.3px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;

    /* backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background-color: rgba(17, 25, 40, 0.75);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.125); */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.close:hover {
    color: var(--text-primary);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background: var(--bg-hover);
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

.pagination-controls .btn {
    min-width: auto;
    padding: 0.5rem 0.75rem;
}

/* Mobile pagination adjustments */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 1rem;
        padding: 0.75rem;
    }

    .pagination-controls {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Enhanced Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Desktop layout - rearrange the new structure for desktop */
@media (min-width: 769px) {
    .topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
        padding: 1rem 1.5rem;
    }

    .topbar-main-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 2rem;
    }

    .mobile-menu-btn {
        display: none;
    }

    .page-title {
        text-align: left;
        font-size: 1.5rem;
        flex-shrink: 0;
    }

    .search-box {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        max-width: 300px;
        width: 300px;
    }

    .topbar-actions {
        margin-left: auto;
        flex-shrink: 0;
    }
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 1;
    min-width: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.notification-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-button {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    min-width: 80px;
    justify-content: center;
}

.lang-button:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.lang-button i {
    font-size: 1rem;
    color: var(--primary);
}

.lang-button #current-lang {
    font-weight: 600;
    letter-spacing: 1px;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    color: white;
    background-color: var(--success);
}

.badge-secondary {
    color: white;
    background-color: #6c757d;
}

.badge-warning {
    color: #212529;
    background-color: #ffc107;
}

.badge-danger {
    color: white;
    background-color: var(--danger);
}

/* Search Interface */
.simple-search-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-input-wrapper {
    flex: 1;
    min-width: 0;
    position: relative;
}

.search-input-wrapper .form-control {
    padding-left: 2.5rem;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 2;
}

.simple-search-container .form-control {
    margin-bottom: 0;
}

.advanced-filters {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

.advanced-filters .form-grid {
    margin-top: 0;
}

/* Mobile responsive adjustments for search */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .card-title {
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .card-header>div:last-child {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .card-header .search-input-wrapper {
        max-width: 100%;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .card-header {
        gap: 0.5rem;
    }

    .card-header>div:last-child {
        gap: 0.5rem;
    }
}

/* Enhanced Dashboard Grid */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stat-card {
    min-height: 120px;
}

.full-width {
    width: 100%;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar {
        width: 80px;
    }

    .logo-text,
    .nav-text {
        display: none;
    }

    .main-content {
        margin-left: 80px;
        width: calc(100% - 80px);
        max-width: calc(100vw - 80px);
    }

    .nav-item {
        justify-content: center;
    }

    .topbar {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        width: 250px;
        left: 0;
        top: 0;
    }

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

    /* Show labels in mobile menu */
    .sidebar .logo-text,
    .sidebar .nav-text {
        display: block !important;
    }

    .sidebar .nav-item {
        justify-content: flex-start !important;
        padding: 1rem 1.5rem;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100vw;
        padding: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-overlay.active {
        display: block;
    }

    .topbar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding: 1rem;
        width: 100%;
        max-width: 100%;
    }

    .topbar-left {
        flex: 1;
        justify-content: flex-start;
        min-width: 0;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .topbar-right {
        flex-shrink: 0;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        justify-content: flex-end;
    }

    /* First row: hamburger + title + notifications + profile */
    .topbar-main-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 1rem;
    }

    .page-title {
        font-size: 1.1rem;
        flex: 1;
        min-width: 0;
        text-align: left;
    }

    .topbar-actions {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    /* Second row: search box full width */
    .search-box {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0;
    }

    .search-box input {
        width: 100%;
    }

    .page-title {
        font-size: 1.25rem;
        flex: 1;
        min-width: 0;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        width: 100%;
        max-width: 100%;
    }

    .page-content {
        padding: 1rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .card {
        margin: 0;
        border-radius: 8px;
        width: 100%;
        max-width: 100%;
    }

    /* Responsive tables */
    .table-container {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
        max-width: calc(100vw - 2rem);
        overflow-x: auto;
    }

    table {
        min-width: 500px;
    }

    th,
    td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .topbar {
        padding: 0.75rem;
    }

    .topbar-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        width: 100%;
    }

    .page-title {
        font-size: 1.1rem;
        width: 100%;
    }

    .card {
        padding: 1rem;
        margin: 0;
    }

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

    .dashboard-grid {
        gap: 1rem;
        width: 100%;
    }

    .modal-content {
        margin: 0.5rem;
        width: calc(100% - 1rem);
        max-height: calc(100vh - 1rem);
        overflow-y: auto;
    }

    .form-grid {
        gap: 1rem;
        padding: 0 0.75rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 100%;
    }

    /* Mobile table optimizations */
    table {
        min-width: 400px;
    }

    th,
    td {
        padding: 0.5rem 0.25rem;
        font-size: 0.85rem;
    }

    /* Hide less important columns on very small screens */
    .table-hide-mobile {
        display: none;
    }

    /* Ensure all containers respect viewport */
    .page-content,
    .dashboard-grid,
    .card,
    .form-grid {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Fix any potential horizontal scroll */
    body,
    html {
        max-width: 100vw;
        overflow-x: hidden;
    }
}

@media (max-width: 360px) {
    .stats-row {
        gap: 0.75rem;
    }

    .card {
        padding: 0.75rem;
    }

    .topbar {
        padding: 0.5rem;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

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

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        /* iOS recommended touch target */
        padding: 0.75rem 1rem;
    }

    .nav-item {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }

    .user-avatar {
        min-width: 44px;
        min-height: 44px;
    }

    .notification-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Print styles */
@media print {

    .sidebar,
    .topbar,
    .mobile-menu-toggle,
    .mobile-overlay {
        display: none !important;
    }

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

    .page-content {
        padding: 0 !important;
    }

    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-card));
}

.login-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    margin: 1rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Error page styles */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
}

.error-icon {
    font-size: 4rem;
    color: var(--warning);
    margin-bottom: 1rem;
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.error-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* New Pages Styles */

/* ECMO Page Styles */

#ecmo-page h2 {
    margin-bottom: 1.5rem;
}

#ecmo-page .stat-desc {
    margin-top: 5px;
}

.ecmo-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ecmo-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .ecmo-row {
        grid-template-columns: 1fr;
    }
}

.ecmo-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ecmo-form-group {
    margin-bottom: 1rem;
}

.ecmo-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--bg-hover);
}

.upload-icon {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.file-list {
    margin-bottom: 1rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--bg-hover);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.file-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-action {
    cursor: pointer;
    color: var(--danger);
}

.medical-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.image-placeholder {
    height: 200px;
    background: var(--bg-dark);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success) !important;
    animation: none !important;
}

.alert-success i {
    color: var(--success) !important;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger) !important;
    animation: none !important;
}

.alert-danger i {
    color: var(--danger) !important;
}

.alert-warning i {
    color: var(--warning) !important;
}

.alert-icon {
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.btn-analysis {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-analysis:hover {
    background: var(--primary-hover);
}

.result-box {
    background: var(--bg-hover);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.risk-indicator {
    width: 100%;
    height: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    margin-top: 0.5rem;
}

.risk-level {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.results-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.recommendation {
    background: var(--bg-hover);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.recommendation h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.recommendation h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.recommendation ul {
    margin-left: 1.5rem;
}

/* Exams Page Styles */
.exam-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.exam-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.exam-icon {
    font-size: 1.5rem;
    color: var(--primary);
}

.exam-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.exam-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.exam-label {
    font-weight: 500;
    color: var(--text-primary);
    min-width: 200px;
}

.exam-value {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background: var(--bg-hover);
}

.file-upload i {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Calculator Page Styles */
.calculator-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem;
    margin-top: 1.5rem;
    max-width: 100%;
}

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

@media (min-width: 1201px) {
    .calculator-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

.calculator-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.calculator-title {
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary);
    font-size: 1.25rem;
    font-weight: 600;
}

.calculator-result {
    background-color: rgba(16, 185, 129, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border-left: 4px solid var(--success);
}

.result-item {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed var(--border-color);
}

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

.result-title {
    font-weight: 600;
    color: var(--primary);
}

.calculator-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    padding: 12px;
    border-radius: 5px;
    margin: 10px 0;
    border-left: 4px solid var(--warning);
}

.calculator-info {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    padding: 12px;
    border-radius: 5px;
    margin: 10px 0;
    border-left: 4px solid var(--primary);
}

/* IA Surveillance Page Styles */
.ia-surveillance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.camera-container {
    width: 100%;
    height: 300px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 30, 60, 0.2), rgba(0, 30, 60, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.camera-placeholder {
    text-align: center;
    color: white;
    font-size: 1.1rem;
}

.ai-analysis {
    background-color: rgba(25, 55, 85, 0.7);
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.analysis-title {
    color: rgb(77, 182, 172);
    font-weight: bold;
    margin-bottom: 10px;
}

.detection-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.detection-item {
    background: rgba(25, 55, 85, 0.7);
    padding: 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.detection-icon {
    width: 30px;
    height: 30px;
    background: #29b6f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 1.2rem;
    color: white;
}

.patient-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.info-card {
    background: rgba(25, 55, 85, 0.7);
    padding: 15px;
    border-radius: 8px;
}

.info-title {
    color: rgb(77, 182, 172);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e0e0e0;
}

.vital-signs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.vital-card {
    background: rgba(25, 55, 85, 0.7);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.vital-title {
    color: rgb(77, 182, 172);
    margin-bottom: 10px;
}

.vital-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #e0e0e0;
}

.vital-trend {
    font-size: 0.9rem;
    margin-top: 5px;
}

.up {
    color: #81c784;
}

.down {
    color: #e57373;
}

.stable {
    color: #64b5f6;
}

.patient-report {
    background: rgba(25, 55, 85, 0.7);
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.report-title {
    color: rgb(77, 182, 172);
    margin-bottom: 10px;
}

.report-content {
    line-height: 1.6;
}

.alert {
    color: rgb(255, 82, 82);
    font-weight: bold;
    animation: blink 2s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.ia-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

/* AI Stats Cards */
.ai-stat-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.ai-stat-card:hover {
    transform: translateY(-5px);
}

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

.ai-stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ai-stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Video simulation */
.video-simulation {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* AI Stats Cards */
.ai-stat-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.ai-stat-card:hover {
    transform: translateY(-5px);
}

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

.ai-stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ai-stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* IA Surveillance Page Specific Styles */
#ia-surveillance-page .info-card {
    background: rgba(25, 55, 85, 0.7) !important;
    padding: 15px;
    border-radius: 8px;
}

#ia-surveillance-page .info-title {
    color: rgb(77, 182, 172) !important;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

#ia-surveillance-page .info-value {
    font-size: 1.5rem !important;
    font-weight: bold;
    color: #e0e0e0 !important;
}

#ia-surveillance-page .vital-card {
    background: rgba(25, 55, 85, 0.7) !important;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 120px !important;
}

#ia-surveillance-page .vital-title {
    color: rgb(77, 182, 172) !important;
    margin-bottom: 10px;
    flex-shrink: 0 !important;
}

#ia-surveillance-page .vital-value {
    font-size: 1.8rem !important;
    font-weight: bold;
    color: #e0e0e0 !important;
    flex-grow: 1 !important;
    display: flex !important;
    align-items: start !important;
    justify-content: center !important;
}

#ia-surveillance-page .vital-trend {
    font-size: 0.9rem !important;
    margin-top: auto !important;
    flex-shrink: 0 !important;
}

#ia-surveillance-page .report-title {
    color: rgb(77, 182, 172) !important;
    margin-bottom: 10px;
}

#ia-surveillance-page .alert {
    color: rgb(255, 82, 82) !important;
    font-weight: bold;
    animation: blink 2s infinite;
}

#ia-surveillance-page .detection-item {
    background: rgba(25, 55, 85, 0.7) !important;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

#ia-surveillance-page .detection-icon {
    width: 30px;
    height: 30px;
    background: #29b6f6 !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 1.2rem;
    color: white !important;
}

#ia-surveillance-page .patient-report {
    background: rgba(25, 55, 85, 0.7) !important;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

/* IA Surveillance responsive grid for statistics cards */
#ia-surveillance-page .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    margin-top: 1.5rem;
}

/* Responsive breakpoints for IA surveillance cards */
@media (max-width: 1200px) {
    #ia-surveillance-page .dashboard-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    #ia-surveillance-page .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    #ia-surveillance-page .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* IA Surveillance h2 headings spacing */
#ia-surveillance-page h2.card-title {
    margin-bottom: 1rem !important;
}

/* Hide camera overlay in IA surveillance to show video */
#ia-surveillance-page .camera-overlay {
    display: none !important;
}

/* Ensure video is visible in IA surveillance */
#ia-surveillance-page .video-simulation {
    width: 100% !important;
    height: 300px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    background: #000 !important;
    z-index: 1 !important;
    cursor: pointer !important;
}

/* Video overlay for fullscreen */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.video-overlay.active {
    display: flex;
}

.video-overlay video {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.video-overlay .close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.video-overlay .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Language Selector Styles */
.language-selector {
    position: relative;
}

.language-selector .dropdown-toggle {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.language-selector .dropdown-toggle:hover,
.language-selector .dropdown-toggle:focus {
    background-color: var(--bg-hover);
    border-color: var(--primary);
    color: var(--text-primary);
    box-shadow: none;
}

.language-selector .dropdown-menu {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 0.5rem 0;
    min-width: 160px;
}

.language-selector .dropdown-item {
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    transition: background-color 0.2s ease;
    border: none;
    background: none;
}

.language-selector .dropdown-item:hover,
.language-selector .dropdown-item:focus {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.language-selector .dropdown-item i {
    width: 20px;
    text-align: center;
}

/* RTL Support */
.rtl {
    direction: rtl;
    text-align: right;
}

.rtl .topbar-actions {
    flex-direction: row-reverse;
}

.rtl .dropdown-menu {
    right: 0;
    left: auto;
}

.rtl .nav-links .nav-item {
    text-align: right;
}

.rtl .nav-text {
    text-align: right;
}

.rtl .card-header {
    text-align: right;
}

.rtl .table th,
.rtl .table td {
    text-align: right;
}

.rtl .form-label {
    text-align: right;
}

.rtl .btn {
    text-align: center;
}

.rtl .pagination {
    justify-content: flex-end;
}

.rtl .modal-title {
    text-align: right;
}

.rtl .topbar-main-row {
    flex-direction: row-reverse;
}

.rtl .page-title {
    text-align: right;
}

/* Hemodiafiltration Styles */
.hdf-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.hdf-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    flex: 1 1 calc(50% - 0.75rem);
    min-width: 300px;
}

.hdf-title {
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary);
    font-size: 1.25rem;
    font-weight: 600;
}

.hdf-result {
    background-color: rgba(59, 130, 246, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border-left: 4px solid var(--primary);
}

.hdf-alert {
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger);
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 0.5rem;
}

.prediction-indicator {
    height: 10px;
    background-color: var(--bg-hover);
    border-radius: 5px;
    margin: 10px 0;
    overflow: hidden;
}

.prediction-value {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.prediction-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.hdf-card-full {
    flex: 1 1 100%;
}

/* Share buttons in content */
.share-section {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive adjustments for HDF */
@media (max-width: 1024px) {
    .hdf-card {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .hdf-card {
        min-width: 100%;
    }
}

/* Neurological Surveillance Styles */
.neuro-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.brain-death-detection {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.brain-death-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.brain-death-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.brain-death-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.brain-death-content {
    display: grid;
    gap: 1.5rem;
}

.eeg-monitoring {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.eeg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eeg-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.eeg-canvas-container {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.eeg-canvas {
    width: 100%;
    height: 200px;
}

.eeg-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

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

.eeg-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.eeg-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.clinical-tests {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tests-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tests-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.test-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.test-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.test-content {
    flex: 1;
}

.test-name {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.test-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.test-result {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.test-negative {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.test-positive {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.test-pending {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.risk-assessment {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.risk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.risk-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.risk-matrix {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.risk-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    border-radius: 8px;
    border: 2px solid;
    transition: transform 0.2s ease;
}

.risk-item:hover {
    transform: translateY(-2px);
}

.risk-high {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}

.risk-medium {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: var(--warning);
}

.risk-low {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
}

.risk-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.risk-high .risk-value {
    color: var(--danger);
}

.risk-medium .risk-value {
    color: var(--warning);
}

.risk-low .risk-value {
    color: var(--success);
}

.risk-label {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    text-align: center;
}

.ai-recommendations {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.ai-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ai-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recommendation-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.recommendation-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--primary);
}

.recommendation-text {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.recommendation-priority {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.priority-high {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.priority-medium {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

/* Responsive Design for Neurological Surveillance */
@media (max-width: 768px) {
    .risk-matrix {
        grid-template-columns: repeat(2, 1fr);
    }

    .eeg-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Neurological Surveillance Styles ===== */

/* Medical Control Room Layout */
.medical-control-room {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Control Panel Grid */
.control-panel {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

/* Patient Monitoring Section */
.patient-monitoring {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.patient-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.patient-title {
    font-weight: 600;
    font-size: 1.1rem;
}

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

.patient-info {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.patient-badge {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.3);
}

.badge-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.badge-content {
    flex: 1;
}

.badge-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.badge-value {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Vitals Grid */
.vitals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.vital-card {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.vital-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.vital-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.vital-status {
    font-size: 1rem;
}

.vital-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* .vital-chart removed - not needed for value-only display */

/* Alert Panel */
.alert-panel {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.alert-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.alert-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-item {
    padding: 1rem;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    border-left: 4px solid;
}

.alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.alert-content {
    flex: 1;
}

.alert-message {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.alert-critical {
    border-left-color: var(--danger);
}

.alert-warning {
    border-left-color: var(--warning);
}

.alert-info {
    border-left-color: var(--primary);
}

/* Advanced Behavioral Analysis */
.advanced-behavioral-analysis {
    margin-top: 1.5rem;
    display: block;
    /* grid-template-columns: 1fr 1fr; */
    /* gap: 1.5rem; */
}

.body-spectrum-analysis {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    /* position: relative; */
    overflow: hidden;
}

.spectrum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.spectrum-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.spectrum-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    min-height: 400px;
}

.body-spectrum-container {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.body-spectrum-visualization {
    width: 100%;
    height: 100%;
    position: relative;
}

.spectrum-point {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--success);
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 10px currentColor;
    transition: all 0.3s ease;
    cursor: pointer;
}

.spectrum-point.active {
    width: 16px;
    height: 16px;
    box-shadow: 0 0 15px 5px currentColor;
    animation: pulsePoint 2s infinite;
}

.spectrum-point.critical {
    background-color: var(--danger);
    animation: pulseCritical 1s infinite;
}

.spectrum-connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.spectrum-connection {
    stroke: rgba(59, 130, 246, 0.3);
    stroke-width: 1;
}

.spectrum-legend {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.spectrum-stats {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.spectrum-stats-title {
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.spectrum-zones {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.zone-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
}

.zone-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 0.75rem;
}

.zone-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.zone-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.zone-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.zone-activity {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--primary);
}

/* Brain Death Detection */
.brain-death-detection {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.brain-death-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.brain-death-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.brain-death-alert {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brain-death-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* EEG Monitoring */
.eeg-monitoring {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

.eeg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.eeg-title {
    font-weight: 600;
    font-size: 1rem;
}

.eeg-canvas-container {
    height: 150px;
    background-color: #000;
    border-radius: 6px;
    overflow: hidden;
}

.eeg-canvas {
    width: 100%;
    height: 100%;
}

.eeg-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.eeg-stat {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 6px;
    text-align: center;
}

.eeg-stat-value {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.eeg-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Clinical Tests */
.clinical-tests {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.tests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tests-title {
    font-weight: 600;
    font-size: 1rem;
}

.tests-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.test-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
}

.test-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.9rem;
}

.test-content {
    flex: 1;
}

.test-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.test-status {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.test-result {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

.test-positive {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.test-negative {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.test-pending {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

/* Predictive Analytics */
.predictive-analytics {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
}

.predictive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.predictive-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.predictive-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.risk-assessment {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.risk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.risk-title {
    font-weight: 600;
    font-size: 1rem;
}

.risk-actions i {
    cursor: help;
    color: var(--text-secondary);
}

.risk-matrix {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.risk-item {
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
}

.risk-value {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.risk-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.risk-high {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.risk-medium {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.risk-low {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.trend-analysis {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.trend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.trend-title {
    font-weight: 600;
    font-size: 1rem;
}

.trend-actions i {
    cursor: pointer;
    color: var(--text-secondary);
}

.trend-canvas-container {
    height: 200px;
}

/* AI Recommendations */
.ai-recommendations {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
}

.ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.ai-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.ai-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.recommendation-list {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.recommendation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.recommendation-title {
    font-weight: 600;
    font-size: 1rem;
}

.recommendation-actions i {
    cursor: pointer;
    color: var(--text-secondary);
}

.recommendation-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recommendation-item {
    padding: 0.75rem;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.recommendation-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.9rem;
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--primary);
}

.recommendation-text {
    flex: 1;
    font-size: 0.9rem;
}

.recommendation-priority {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

.priority-high {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.priority-medium {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.priority-low {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

/* Treatment Plan */
.treatment-plan {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.plan-title {
    font-weight: 600;
    font-size: 1rem;
}

.plan-actions i {
    cursor: pointer;
    color: var(--text-secondary);
}

.plan-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.plan-step {
    padding: 0.75rem;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    background-color: rgba(59, 130, 246, 0.3);
    color: var(--primary);
    flex-shrink: 0;
}

.step-text {
    flex: 1;
    font-size: 0.9rem;
}

.step-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--primary);
}

/* 3D Brain Visualization */
.brain-3d-visualization {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
    position: relative;
}

.brain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.brain-title {
    font-weight: 600;
    font-size: 1.1rem;
}

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

.brain-container {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

#brain-3d-video {
    width: 100%;
    height: auto;
    display: block;
}

/* Animations */
@keyframes pulsePoint {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes pulseCritical {
    0% {
        box-shadow: 0 0 5px var(--danger);
    }

    50% {
        box-shadow: 0 0 20px var(--danger);
    }

    100% {
        box-shadow: 0 0 5px var(--danger);
    }
}

/* Responsive Design for Neurological Surveillance */
@media (max-width: 1200px) {
    .advanced-behavioral-analysis {
        grid-template-columns: 1fr;
    }

    .brain-death-content {
        grid-template-columns: 1fr;
    }

    .predictive-content {
        grid-template-columns: 1fr;
    }

    .ai-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 968px) {
    .control-panel {
        grid-template-columns: 1fr;
    }

    .vitals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .spectrum-body {
        grid-template-columns: 1fr;
        height: auto;
    }

    .body-spectrum-container {
        height: 300px;
    }

    .vitals-grid {
        grid-template-columns: 1fr;
    }

    .patient-info {
        flex-direction: column;
        gap: 1rem;
    }

    .risk-matrix {
        grid-template-columns: repeat(2, 1fr);
    }
}


#specialites-page .patient-card {
    padding: 10px;
    margin-bottom: 0;
}

#specialites-page #specialites-list {
    padding-top: 20px !important;
}

#specialites-page .patient-info {
    padding-top: 20px !important;
}


#specialites-page .patient-actions {
    padding-right: 20px !important;
}




#neurological-surveillance-page .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

#neurological-surveillance-page .stat-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

#neurological-surveillance-page .stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

#neurological-surveillance-page .stat-title {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#neurological-surveillance-page .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

#neurological-surveillance-page .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

#neurological-surveillance-page .stat-trend {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

#neurological-surveillance-page .trend-up {
    color: var(--success);
}

#neurological-surveillance-page .trend-down {
    color: var(--danger);
}

/* Medical Control Room */
#neurological-surveillance-page .medical-control-room {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#neurological-surveillance-page .control-panel {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

#neurological-surveillance-page .patient-monitoring {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

#neurological-surveillance-page .patient-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

#neurological-surveillance-page .patient-title {
    font-weight: 600;
    font-size: 1.1rem;
}

#neurological-surveillance-page .patient-info {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

#neurological-surveillance-page .patient-badge {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.3);
}

#neurological-surveillance-page .badge-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

#neurological-surveillance-page .badge-content {
    flex: 1;
}

#neurological-surveillance-page .badge-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

#neurological-surveillance-page .badge-value {
    font-weight: 600;
    font-size: 1.1rem;
}

#neurological-surveillance-page .vitals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

#neurological-surveillance-page .vital-card {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

#neurological-surveillance-page .vital-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

#neurological-surveillance-page .vital-title {
    font-weight: 600;
    font-size: 0.9rem;
}

#neurological-surveillance-page .vital-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

#neurological-surveillance-page .vital-chart {
    height: 40px;
    width: 100%;
}

#neurological-surveillance-page .alert-panel {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

#neurological-surveillance-page .alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

#neurological-surveillance-page .alert-title {
    font-weight: 600;
    font-size: 1.1rem;
}

#neurological-surveillance-page .alert-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#neurological-surveillance-page .alert-item {
    padding: 1rem;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    border-left: 4px solid;
}

#neurological-surveillance-page .alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

#neurological-surveillance-page .alert-content {
    flex: 1;
}

#neurological-surveillance-page .alert-message {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

#neurological-surveillance-page .alert-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

#neurological-surveillance-page .alert-critical {
    border-left-color: var(--danger);
}

#neurological-surveillance-page .alert-warning {
    border-left-color: var(--warning);
}

#neurological-surveillance-page .alert-info {
    border-left-color: var(--primary);
}

/* NOUVEAUX STYLES POUR L'ANALYSE COMPORTEMENTALE AVANCÉE */
#neurological-surveillance-page .advanced-behavioral-analysis {
    grid-column: 1 / span 2;
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

#neurological-surveillance-page .body-spectrum-analysis {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    /* position: relative; */
    margin-top: 1.5rem;
    overflow: hidden;
}

#neurological-surveillance-page .spectrum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

#neurological-surveillance-page .spectrum-title {
    font-weight: 600;
    font-size: 1.1rem;
}

#neurological-surveillance-page .spectrum-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    min-height: 400px;
}

#neurological-surveillance-page .body-spectrum-container {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#neurological-surveillance-page .body-spectrum-visualization {
    width: 100%;
    height: 100%;
    position: relative;
}

#neurological-surveillance-page .spectrum-point {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--success);
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 10px currentColor;
    transition: all 0.3s ease;
    cursor: pointer;
}

#neurological-surveillance-page .spectrum-point.active {
    width: 16px;
    height: 16px;
    box-shadow: 0 0 15px 5px currentColor;
    animation: pulsePoint 2s infinite;
}

#neurological-surveillance-page .spectrum-point.critical {
    background-color: var(--danger);
    animation: pulseCritical 1s infinite;
}

#neurological-surveillance-page .spectrum-connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#neurological-surveillance-page .spectrum-connection {
    stroke: rgba(59, 130, 246, 0.3);
    stroke-width: 1;
}

#neurological-surveillance-page .spectrum-legend {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#neurological-surveillance-page .spectrum-stats {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

#neurological-surveillance-page .spectrum-stats-title {
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

#neurological-surveillance-page .spectrum-zones {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#neurological-surveillance-page .zone-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
}

#neurological-surveillance-page .zone-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 0.75rem;
}

#neurological-surveillance-page .zone-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#neurological-surveillance-page .zone-name {
    font-weight: 600;
    font-size: 0.9rem;
}

#neurological-surveillance-page .zone-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

#neurological-surveillance-page .zone-activity {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--primary);
}

/* NOUVEAUX STYLES POUR LA DÉTECTION DE MORT CÉRÉBRALE */
#neurological-surveillance-page .brain-death-detection {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

#neurological-surveillance-page .brain-death-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

#neurological-surveillance-page .brain-death-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--danger);
}

#neurological-surveillance-page .brain-death-alert {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#neurological-surveillance-page .brain-death-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

#neurological-surveillance-page .eeg-monitoring {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

#neurological-surveillance-page .eeg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

#neurological-surveillance-page .eeg-title {
    font-weight: 600;
    font-size: 1rem;
}

#neurological-surveillance-page .eeg-canvas-container {
    height: 150px;
    background-color: #000;
    border-radius: 6px;
    overflow: hidden;
}

#neurological-surveillance-page .eeg-canvas {
    width: 100%;
    height: 100%;
}

#neurological-surveillance-page .eeg-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

#neurological-surveillance-page .eeg-stat {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 6px;
    text-align: center;
}

#neurological-surveillance-page .eeg-stat-value {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

#neurological-surveillance-page .eeg-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

#neurological-surveillance-page .clinical-tests {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

#neurological-surveillance-page .tests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

#neurological-surveillance-page .tests-title {
    font-weight: 600;
    font-size: 1rem;
}

#neurological-surveillance-page .tests-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#neurological-surveillance-page .test-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
}

#neurological-surveillance-page .test-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.9rem;
}

#neurological-surveillance-page .test-content {
    flex: 1;
}

#neurological-surveillance-page .test-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

#neurological-surveillance-page .test-status {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

#neurological-surveillance-page .test-result {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

#neurological-surveillance-page .test-positive {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

#neurological-surveillance-page .test-negative {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

#neurological-surveillance-page .test-pending {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

/* NOUVELLES SECTIONS */

#neurological-surveillance-page .predictive-analytics {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
}

#neurological-surveillance-page .predictive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

#neurological-surveillance-page .predictive-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--cyber-blue);
}

#neurological-surveillance-page .predictive-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

#neurological-surveillance-page .risk-assessment {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

#neurological-surveillance-page .risk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

#neurological-surveillance-page .risk-title {
    font-weight: 600;
    font-size: 1rem;
}

#neurological-surveillance-page .risk-matrix {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

#neurological-surveillance-page .risk-item {
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: none !important
}

#neurological-surveillance-page .risk-value {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

#neurological-surveillance-page .risk-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

#neurological-surveillance-page .risk-high {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

#neurological-surveillance-page .risk-medium {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

#neurological-surveillance-page .risk-low {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

#neurological-surveillance-page .trend-analysis {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

#neurological-surveillance-page .trend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

#neurological-surveillance-page .trend-title {
    font-weight: 600;
    font-size: 1rem;
}

#neurological-surveillance-page .trend-canvas-container {
    height: 200px;
}

#neurological-surveillance-page .ai-recommendations {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
}

#neurological-surveillance-page .ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

#neurological-surveillance-page .ai-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--neon-green);
}

#neurological-surveillance-page .ai-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

#neurological-surveillance-page .recommendation-list {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

#neurological-surveillance-page .recommendation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

#neurological-surveillance-page .recommendation-title {
    font-weight: 600;
    font-size: 1rem;
}

#neurological-surveillance-page .recommendation-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#neurological-surveillance-page .recommendation-item {
    padding: 0.75rem;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

#neurological-surveillance-page .recommendation-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.9rem;
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--primary);
}

#neurological-surveillance-page .recommendation-text {
    flex: 1;
    font-size: 0.9rem;
}

#neurological-surveillance-page .recommendation-priority {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

#neurological-surveillance-page .priority-high {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

#neurological-surveillance-page .priority-medium {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

#neurological-surveillance-page .priority-low {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

#neurological-surveillance-page .treatment-plan {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

#neurological-surveillance-page .plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

#neurological-surveillance-page .plan-title {
    font-weight: 600;
    font-size: 1rem;
}

#neurological-surveillance-page .plan-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#neurological-surveillance-page .plan-step {
    padding: 0.75rem;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

#neurological-surveillance-page .step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    background-color: rgba(139, 92, 246, 0.2);
    color: var(--secondary);
}

#neurological-surveillance-page .step-text {
    flex: 1;
    font-size: 0.9rem;
}

#neurological-surveillance-page .step-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--primary);
}

/* 3D Brain Visualization */
#neurological-surveillance-page .brain-3d-visualization {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
    position: relative;
}

#neurological-surveillance-page .brain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

#neurological-surveillance-page .brain-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--cyber-purple);
}

#neurological-surveillance-page .brain-container {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

#brain-3d-video {
    width: 100%;
    height: auto;
    display: block;
}

/* Animations */
@keyframes pulsePoint {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes pulseCritical {
    0% {
        box-shadow: 0 0 5px var(--danger);
    }

    50% {
        box-shadow: 0 0 20px var(--danger);
    }

    100% {
        box-shadow: 0 0 5px var(--danger);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px currentColor;
    }

    50% {
        box-shadow: 0 0 20px currentColor;
    }

    100% {
        box-shadow: 0 0 5px currentColor;
    }
}

@keyframes cyberPulse {
    0% {
        text-shadow: 0 0 5px var(--cyber-blue), 0 0 10px var(--cyber-blue);
    }

    50% {
        text-shadow: 0 0 20px var(--cyber-blue), 0 0 30px var(--cyber-blue);
    }

    100% {
        text-shadow: 0 0 5px var(--cyber-blue), 0 0 10px var(--cyber-blue);
    }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    #neurological-surveillance-page .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #neurological-surveillance-page .advanced-behavioral-analysis {
        grid-template-columns: 1fr;
    }

    #neurological-surveillance-page .brain-death-content {
        grid-template-columns: 1fr;
    }

    #neurological-surveillance-page .predictive-content {
        grid-template-columns: 1fr;
    }

    #neurological-surveillance-page .ai-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 968px) {
    #neurological-surveillance-page .sidebar {
        transform: translateX(-100%);
    }

    #neurological-surveillance-page .main-content {
        margin-left: 0;
    }

    #neurological-surveillance-page .sidebar.active {
        transform: translateX(0);
    }

    #neurological-surveillance-page .control-panel {
        grid-template-columns: 1fr;
    }

    #neurological-surveillance-page .vitals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    #neurological-surveillance-page .spectrum-body {
        grid-template-columns: 1fr;
        height: auto;
    }

    #neurological-surveillance-page .body-spectrum-container {
        height: 300px;
    }

    #neurological-surveillance-page .vitals-grid {
        grid-template-columns: 1fr;
    }

    #neurological-surveillance-page .patient-info {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Cyber elements */
#neurological-surveillance-page .cyber-glow {
    animation: cyberPulse 3s infinite;
}

#neurological-surveillance-page .cyber-border {
    position: relative;
}

#neurological-surveillance-page .cyber-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyber-blue), var(--cyber-purple));
    z-index: 5;
}

#neurological-surveillance-page .holographic-effect {
    background: linear-gradient(125deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1), rgba(16, 185, 129, 0.1));
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}



/******** controle global ***********************************************/

:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --cyber-blue: #00f7ff;
    --cyber-purple: #bd00ff;
    --neon-green: #39ff14;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar Styles for Entire App */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-card);
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--bg-card);
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 10px;
    border: 2px solid var(--bg-card);
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-hover), var(--secondary));
}

/* Sidebar with scroll support */
.sidebar_cg {
    width: 260px;
    background-color: var(--bg-card);
    padding: 1.5rem 1rem;
    height: 100vh;
    position: fixed;
    transition: all 0.3s ease;
    z-index: 100;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    overflow-x: hidden;
}

.logo_cg {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo-icon_cg {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text_cg {
    font-size: 1.25rem;
    font-weight: 700;
}

.nav-links_cg {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item_cg {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-item_cg:hover,
.nav-item_cg.active_cg {
    background-color: var(--bg-hover);
}

.nav-item_cg i {
    width: 24px;
    text-align: center;
}

/* Main Content */
.main-content_cg {
    flex: 1;
    margin-left: 260px;
    padding: 1.5rem;
}

.topbar_cg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.page-title_cg {
    font-size: 1.5rem;
    font-weight: 700;
}

.user-menu_cg {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box_cg {
    background-color: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-box_cg input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    outline: none;
    width: 200px;
}

.user-avatar_cg {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
}

/* Dashboard Grid */
.dashboard-grid_cg {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card_cg {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.card_cg:hover {
    transform: translateY(-5px);
}

.card-header_cg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-title_cg {
    font-size: 1.125rem;
    font-weight: 600;
}

.card-icon_cg {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bg-primary_cg {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--primary);
}

.bg-success_cg {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.bg-warning_cg {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.bg-danger_cg {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.stat-value_cg {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-desc_cg {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Global Control Room */
.global-control-room_cg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 1.5rem;
    margin-top: 0;
}

/* Patients Grid */
.patients-grid_cg {
    grid-column: 1 / span 2;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.patient-card_cg {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border-left: 4px solid var(--primary);
}

.patient-card_cg.critical_cg {
    border-left-color: var(--danger);
    animation: pulse_cg 2s infinite;
}

.patient-card_cg.warning_cg {
    border-left-color: var(--warning);
}

.patient-card_cg.stable_cg {
    border-left-color: var(--success);
}

.patient-card_cg:hover {
    transform: translateY(-5px);
}

.patient-header_cg {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.patient-avatar_cg {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    margin-right: 1rem;
    font-size: 1.25rem;
}

.patient-info_cg {
    flex: 1;
}

.patient-name_cg {
    font-weight: 600;
    font-size: 1.1rem;
}

.patient-meta_cg {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.patient-status_cg {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-critical_cg {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.status-warning_cg {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.status-stable_cg {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.patient-vitals_cg {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.vital-item_cg {
    text-align: center;
    padding: 0.5rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.vital-value_cg {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.vital-label_cg {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.view-details-btn_cg {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--primary);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.patient-card_cg:hover .view-details-btn_cg {
    opacity: 1;
}

/* Alertes globales */
.global-alerts_cg {
    grid-column: 1 / span 2;
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.alerts-header_cg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.alerts-list_cg {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.alert-item_cg {
    padding: 1rem;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(30, 41, 59, 0.9));
    display: flex;
    align-items: flex-start;
    border-left: 4px solid var(--danger);
    animation: fadeIn_cg 0.5s ease;
}

.alert-icon_cg {
    margin-right: 1rem;
    font-size: 1.25rem;
    color: var(--danger);
}

.alert-content_cg {
    flex: 1;
}

.alert-title_cg {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.alert-desc_cg {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.alert-meta_cg {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.alert-critical_cg {
    border-left-color: var(--danger);
}

.alert-warning_cg {
    border-left-color: var(--warning);
}

.alert-info_cg {
    border-left-color: var(--primary);
}

.alert-actions_cg {
    display: flex;
    gap: 0.5rem;
}

/* Statistiques globales */
.global-stats_cg {
    grid-column: 1 / span 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stat-card_cg {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
}

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

.stat-number_cg {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-text_cg {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Page de détail patient */
.patient-detail-page_cg {
    display: none;
}

.patient-detail-page_cg.active_cg {
    display: block;
}

.back-button_cg {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-hover);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: background-color 0.3s ease;
}

.back-button_cg:hover {
    background-color: #475569;
}

/* Medical Control Room (détail patient) */
.medical-control-room_cg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.live-feed_cg {
    grid-column: 1 / span 2;
    background-color: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}

.feed-header_cg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
}

.feed-title_cg {
    font-size: 1.125rem;
    font-weight: 600;
}

.feed-controls_cg {
    display: flex;
    gap: 0.5rem;
}

.feed-body_cg {
    display: grid;
    grid-template-columns: 3fr 1fr;
    height: 400px;
}

.video-container_cg {
    position: relative;
    overflow: hidden;
    background-color: #000;
}

.video-container_cg iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-overlay_cg {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.patient-info-overlay_cg {
    display: flex;
    align-items: center;
}

.patient-status-overlay_cg {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 1rem;
}

.feed-sidebar_cg {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    overflow-y: auto;
    border-left: 1px solid var(--border-color);
}

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

.quick-stat_cg {
    background-color: rgba(30, 41, 59, 0.6);
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
}

.quick-stat-value_cg {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.quick-stat-label_cg {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.critical-alerts-sidebar_cg {
    margin-top: 1rem;
}

.alert-sidebar-item_cg {
    padding: 0.75rem;
    border-radius: 8px;
    background-color: rgba(239, 68, 68, 0.2);
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--danger);
}

.alert-sidebar-title_cg {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.alert-sidebar-desc_cg {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Section des visualisations temps réel après le flux vidéo */
.real-time-visualizations_cg {
    grid-column: 1 / span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.ecg-respiration-container_cg {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.ecg-monitor_cg,
.respiration-monitor_cg {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(30, 41, 59, 0.9));
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.monitor-header_cg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.monitor-title_cg {
    font-weight: 600;
    font-size: 1.1rem;
}

.monitor-canvas_cg {
    width: 100%;
    height: 150px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.ecg-canvas_cg,
.respiration-canvas_cg {
    width: 100%;
    height: 100%;
    background-color: #000;
}

.monitor-stats_cg {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.monitor-stat_cg {
    text-align: center;
}

.monitor-stat-value_cg {
    font-weight: 700;
    font-size: 1.25rem;
}

.monitor-stat-label_cg {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Visualisation thermique 3D */
.thermal-visualization_cg {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(30, 41, 59, 0.9));
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.thermal-header_cg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.thermal-title_cg {
    font-weight: 600;
    font-size: 1.1rem;
}

.thermal-body_cg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    height: 400px;
}

.body-3d-container_cg {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.human-body_cg {
    width: 80%;
    height: 90%;
    background: linear-gradient(135deg, #2d3748, #4a5568);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.body-part_cg {
    position: absolute;
    border-radius: 50%;
    opacity: 0.7;
    transition: all 0.5s ease;
    cursor: pointer;
}

.body-part_cg:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.head_cg {
    width: 70px;
    height: 70px;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(to right, #00b09b, #96c93d);
}

.heart_cg {
    width: 60px;
    height: 60px;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(to right, #ff416c, #ff4b2b);
    animation: pulse_cg 2s infinite;
}

.lungs_cg {
    width: 80px;
    height: 40px;
    top: 100px;
    left: 50%;
    transform: translateX(-65%);
    border-radius: 40%;
    background: linear-gradient(to right, #36d1dc, #5b86e5);
}

.lungs_cg.right_cg {
    transform: translateX(15%);
}

.liver_cg {
    width: 70px;
    height: 50px;
    top: 170px;
    left: 50%;
    transform: translateX(-60%);
    border-radius: 30%;
    background: linear-gradient(to right, #f7971e, #ffd200);
}

.kidneys_cg {
    width: 50px;
    height: 30px;
    top: 220px;
    left: 50%;
    transform: translateX(-80%);
    border-radius: 40%;
    background: linear-gradient(to right, #8e2de2, #4a00e0);
}

.kidneys_cg.right_cg {
    transform: translateX(30%);
}

.intestines_cg {
    width: 100px;
    height: 40px;
    top: 260px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px;
    background: linear-gradient(to right, #c471f5, #fa71cd);
}

.thermal-legend_cg {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.thermal-stats_cg {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.thermal-stats-title_cg {
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.thermal-organs_cg {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.organ-item_cg {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
}

.organ-color_cg {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 0.75rem;
}

.organ-info_cg {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.organ-name_cg {
    font-weight: 600;
    font-size: 0.9rem;
}

.organ-temp_cg {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.thermal-scale_cg {
    margin-top: 1rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.scale-title_cg {
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

.scale-gradient_cg {
    height: 20px;
    background: linear-gradient(to right, blue, cyan, green, yellow, orange, red);
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.scale-labels_cg {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Vitals dashboard - COMPACT VERSION */
.vitals-dashboard_cg {
    grid-column: 1;
    grid-row: 3;
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow);
}

.vitals-header_cg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.vitals-grid_cg {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.vital-card-compact_cg {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(30, 41, 59, 0.9));
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    border-left: 3px solid var(--primary);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.vital-card-compact_cg.critical_cg {
    border-left-color: var(--danger);
    animation: pulse_cg 2s infinite;
}

.vital-card-compact_cg.warning_cg {
    border-left-color: var(--warning);
}

.vital-header-compact_cg {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.vital-icon-compact_cg {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background-color: rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    color: var(--primary);
    font-size: 0.9rem;
}

.vital-title-compact_cg {
    font-weight: 600;
    font-size: 0.9rem;
}

.vital-value-compact_cg {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.25rem 0;
}

.vital-trend-compact_cg {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.vital-chart-mini_cg {
    height: 40px;
    margin-top: 0.25rem;
}

.vital-unit_cg {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.expand-icon_cg {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0.6;
    font-size: 0.8rem;
}

/* Medical devices panel - COMPACT VERSION */
.medical-devices-panel_cg {
    grid-column: 2;
    grid-row: 3;
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow);
}

.devices-header_cg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

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

.device-card-compact_cg {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(30, 41, 59, 0.9));
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    border-top: 2px solid var(--primary);
    cursor: pointer;
    position: relative;
}

.device-card-compact_cg.alert_cg {
    border-top-color: var(--danger);
}

.device-header-compact_cg {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.device-icon-compact_cg {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background-color: rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    color: var(--primary);
    font-size: 0.9rem;
}

.device-name-compact_cg {
    font-weight: 600;
    font-size: 0.9rem;
}

.device-status-compact_cg {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-top: 0.25rem;
    display: inline-block;
    width: fit-content;
}

.device-params-compact_cg {
    margin-top: 0.5rem;
}

.param-row_cg {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.param-name_cg {
    color: var(--text-secondary);
}

.param-value_cg {
    font-weight: 600;
}

/* Alerts panel */
.alerts-panel-large_cg {
    grid-column: 1 / span 2;
    grid-row: 4;
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.alerts-header-large_cg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.alerts-list-large_cg {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.alert-item-large_cg {
    padding: 1.25rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(30, 41, 59, 0.9));
    display: flex;
    align-items: flex-start;
    border-left: 4px solid var(--danger);
    animation: fadeIn_cg 0.5s ease;
}

.alert-icon-large_cg {
    margin-right: 1rem;
    font-size: 1.5rem;
    color: var(--danger);
}

.alert-content-large_cg {
    flex: 1;
}

.alert-title-large_cg {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.alert-desc-large_cg {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.alert-meta-large_cg {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn_cg {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary_cg {
    background-color: var(--primary);
    color: white;
}

.btn-primary_cg:hover {
    background-color: var(--primary-hover);
}

.btn-secondary_cg {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.btn-secondary_cg:hover {
    background-color: #475569;
}

.btn-sm_cg {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-icon_cg {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}

/* Filter Buttons */
.alerts-filter_cg {
    display: flex;
    gap: 0.5rem;
}

.filter-btn_cg {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.filter-btn_cg:hover {
    background-color: #475569;
}

.filter-btn_cg.active_cg {
    background-color: var(--primary);
    color: white;
}

/* Modal Styles */
.modal-overlay_cg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay_cg.active_cg {
    opacity: 1;
    visibility: visible;
}

.modal-container_cg {
    background-color: var(--bg-card);
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay_cg.active_cg .modal-container_cg {
    transform: scale(1);
}

.modal-close_cg {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-header_cg {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title_cg {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-body_cg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.modal-chart_cg {
    height: 300px;
    margin-bottom: 1.5rem;
}

.modal-stats_cg {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.modal-stats-grid_cg {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-item_cg {
    display: flex;
    flex-direction: column;
}

.stat-label_cg {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-number_cg {
    font-size: 1.25rem;
    font-weight: 700;
}

.ia-predictions_cg {
    grid-column: 1 / span 2;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.ia-title_cg {
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ia-title_cg i {
    color: var(--cyber-blue);
}

.ia-prediction-item_cg {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    margin-bottom: 0.5rem;
}

.ia-prediction-icon_cg {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.9rem;
}

.ia-prediction-content_cg {
    flex: 1;
}

.ia-prediction-title_cg {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.ia-prediction-desc_cg {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ia-prediction-confidence_cg {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--primary);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .global-control-room_cg {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .patients-grid_cg {
        grid-column: 1;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .global-alerts_cg {
        grid-column: 1;
    }

    .global-stats_cg {
        grid-column: 1;
        grid-template-columns: repeat(2, 1fr);
    }

    .medical-control-room_cg {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto auto;
    }

    .live-feed_cg {
        grid-column: 1;
    }

    .real-time-visualizations_cg {
        grid-column: 1;
        grid-template-columns: 1fr;
    }

    .vitals-dashboard_cg {
        grid-column: 1;
        grid-row: 3;
    }

    .medical-devices-panel_cg {
        grid-column: 1;
        grid-row: 4;
    }

    .alerts-panel-large_cg {
        grid-column: 1;
        grid-row: 5;
    }

    .vitals-grid_cg {
        grid-template-columns: repeat(2, 1fr);
    }

    .thermal-body_cg {
        grid-template-columns: 1fr;
        height: auto;
    }

    .body-3d-container_cg {
        height: 300px;
    }

    .modal-body_cg {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .feed-body_cg {
        grid-template-columns: 1fr;
        height: auto;
    }

    .feed-sidebar_cg {
        height: 200px;
    }

    .vitals-grid_cg {
        grid-template-columns: 1fr;
    }

    .devices-grid_cg {
        grid-template-columns: 1fr;
    }

    .quick-stats_cg {
        grid-template-columns: repeat(4, 1fr);
        overflow-x: auto;
    }

    .thermal-body_cg {
        grid-template-columns: 1fr;
    }

    .body-3d-container_cg {
        height: 250px;
    }

    .global-stats_cg {
        grid-template-columns: 1fr;
    }

    .patient-vitals_cg {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive sidebar */
@media (max-width: 1024px) {
    .sidebar_cg {
        width: 80px;
    }

    .logo-text_cg,
    .nav-text_cg {
        display: none;
    }

    .main-content_cg {
        margin-left: 80px;
    }

    .nav-item_cg {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .dashboard-grid_cg {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes pulse_cg {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fadeIn_cg {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.data-updated_cg {
    animation: pulse_cg 0.5s ease;
}

/* Styles pour les autres pages */
.page-content_cg {
    display: none;
}

.page-content_cg.active_cg {
    display: block;
}

/* Styles pour le lecteur vidéo HTML5 */
.video-player_cg {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
}

.video-player_cg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Nouveaux styles pour les statistiques avancées */
.advanced-stats_cg {
    grid-column: 1 / span 2;
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stats-card_cg {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.stats-header_cg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stats-title_cg {
    font-weight: 600;
    font-size: 1.1rem;
}

.stats-filters_cg {
    display: flex;
    gap: 0.5rem;
}

.stats-filter_cg {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    background-color: var(--bg-hover);
    font-size: 0.875rem;
    cursor: pointer;
}

.stats-filter_cg.active_cg {
    background-color: var(--primary);
}

.stats-chart_cg {
    height: 250px;
    margin-bottom: 1.5rem;
}

.stats-grid_cg {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stats-item_cg {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.stats-item-label_cg {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stats-item-value_cg {
    font-size: 1.5rem;
    font-weight: 700;
}

.stats-item-change_cg {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.change-up_cg {
    color: var(--success);
}

.change-down_cg {
    color: var(--danger);
}

/* Enhanced Mobile Responsive Styles for Surveillance Page */
@media (max-width: 480px) {
    .topbar_cg {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .page-title_cg {
        font-size: 1rem;
        text-align: center;
    }

    .user-menu_cg {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-box_cg {
        width: 100%;
    }

    .back-button_cg {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .medical-control-room_cg {
        gap: 1rem;
        margin-top: 1rem;
    }

    .live-feed_cg {
        border-radius: 8px;
    }

    .feed-header_cg {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .feed-title_cg {
        font-size: 0.875rem;
    }

    .feed-controls_cg {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .btn-icon_cg {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    .video-container_cg {
        height: 200px;
    }

    .video-player_cg video {
        object-fit: contain;
    }

    .feed-sidebar_cg {
        padding: 0.75rem;
    }

    .quick-stats_cg {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .quick-stat_cg {
        padding: 0.5rem;
    }

    .quick-stat-value_cg {
        font-size: 1.25rem;
    }

    .quick-stat-label_cg {
        font-size: 0.625rem;
    }

    .ecg-respiration-container_cg {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .monitor-header_cg {
        flex-direction: column;
        gap: 0.5rem;
    }

    .monitor-stats_cg {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .monitor-stat_cg {
        padding: 0.5rem;
    }

    .monitor-stat-value_cg {
        font-size: 1rem;
    }

    .monitor-stat-label_cg {
        font-size: 0.625rem;
    }

    .vitals-header_cg {
        flex-direction: column;
        gap: 0.5rem;
    }

    .chart-tabs_cg {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }

    .chart-tab_cg {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    .vitals-grid_cg {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .vital-card-compact_cg {
        padding: 0.75rem;
    }

    .vital-value-compact_cg {
        font-size: 1.5rem;
    }

    .devices-header_cg {
        flex-direction: column;
        gap: 0.5rem;
    }

    .devices-grid_cg {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .device-card-compact_cg {
        padding: 0.75rem;
    }

    .alerts-header-large_cg {
        flex-direction: column;
        gap: 0.5rem;
    }

    .alerts-filter_cg {
        width: 100%;
        justify-content: center;
    }

    .filter-btn_cg {
        flex: 1;
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }

    .alert-item-large_cg {
        flex-direction: column;
        gap: 0.75rem;
    }

    .alert-content-large_cg {
        flex: 1;
    }

    .alert-actions_cg {
        width: 100%;
        justify-content: stretch;
    }

    .alert-actions_cg .btn_cg {
        flex: 1;
    }

    .advanced-stats_cg {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stats-header_cg {
        flex-direction: column;
        gap: 0.5rem;
    }

    .stats-filters_cg {
        width: 100%;
        justify-content: center;
    }

    .stats-filter_cg {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    .stats-grid_cg {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .thermal-header_cg {
        flex-direction: column;
        gap: 0.5rem;
    }

    .body-3d-container_cg {
        height: 200px;
    }

    .thermal-organs_cg {
        grid-template-columns: 1fr;
    }

    .sidebar_cg {
        width: 60px;
    }

    .main-content_cg {
        margin-left: 60px;
    }

    .logo-icon_cg {
        width: 40px;
        height: 40px;
    }

    .nav-item_cg {
        padding: 0.75rem;
    }
}

/* .share-btn_cg {
            margin-top: 10px;
        } */


/***** Collaboration Page *****************************************************/

.main-content_collab {
    flex: 1;
    margin-left: 260px;
    padding: 1.5rem;
}

.topbar_collab {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.page-title_collab {
    font-size: 1.5rem;
    font-weight: 700;
}

.user-menu_collab {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box_collab {
    background-color: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-box_collab input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    outline: none;
    width: 200px;
}

.user-avatar_collab {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
}

/* Dashboard Grid */
.dashboard-grid_collab {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card_collab {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.card_collab:hover {
    transform: translateY(-5px);
}

.card-header_collab {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-title_collab {
    font-size: 1.125rem;
    font-weight: 600;
}

.card-icon_collab {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bg-primary_collab {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--primary);
}

.bg-success_collab {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.bg-warning_collab {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.bg-danger_collab {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.stat-value_collab {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-desc_collab {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Buttons */
.btn_collab {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary_collab {
    background-color: var(--primary);
    color: white;
}

.btn-primary_collab:hover {
    background-color: var(--primary-hover);
}

.btn-secondary_collab {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.btn-secondary_collab:hover {
    background-color: #475569;
}

.btn-sm_collab {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Charts */
.chart-container_collab {
    height: 300px;
    margin-top: 1rem;
}

/* Table */
.table-container_collab {
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
}

/* Form */
.form-grid_collab {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.form-group_collab {
    margin-bottom: 1.25rem;
}

.form-group_collab label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-control_collab {
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-control_collab:focus {
    outline: none;
    border-color: var(--primary);
}

/* Page content */
.page-content_collab {
    display: none;
}

.page-content_collab.active_collab {
    display: block;
}

/* Patient List */
.patient-card_collab {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.patient-card_collab:hover {
    background-color: var(--bg-hover);
}

.patient-info_collab {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.patient-avatar_collab {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
}

.patient-name_collab {
    font-weight: 600;
    font-size: 1.125rem;
}

.patient-meta_collab {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Collaboration Styles Innovantes */
.collaboration-grid_collab {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 1.5rem;
    height: calc(100vh - 200px);
}

.staff-list_collab {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    overflow-y: auto;
}

.staff-section-title_collab {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.staff-item_collab {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.staff-item_collab:hover {
    background-color: var(--bg-hover);
}

.staff-item_collab.active_collab {
    background-color: var(--primary);
}

.staff-avatar_collab {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    position: relative;
    margin-right: 0.75rem;
}

.status-indicator_collab {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--success);
    border: 2px solid var(--bg-card);
    bottom: 0;
    right: 0;
}

.status-offline_collab {
    background-color: var(--text-secondary);
}

.staff-details_collab {
    flex: 1;
}

.staff-name_collab {
    font-weight: 600;
    font-size: 0.95rem;
}

.staff-role_collab {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.channels-list_collab {
    margin-top: 1.5rem;
}

.channel-item_collab {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.channel-item_collab:hover {
    background-color: var(--bg-hover);
}

.channel-item_collab.active_collab {
    background-color: var(--primary);
}

.channel-icon_collab {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    color: var(--primary);
}

.channel-name_collab {
    font-weight: 600;
    font-size: 0.95rem;
}

.channel-members_collab {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.chat-container_collab {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
}

.chat-header_collab {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-recipient_collab {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar_collab {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.chat-actions_collab {
    display: flex;
    gap: 0.5rem;
}

.chat-messages_collab {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message_collab {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    position: relative;
    animation: fadeIn_collab 0.3s ease;
}

@keyframes fadeIn_collab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message_collab.sent_collab {
    align-self: flex-end;
    background-color: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.message_collab.received_collab {
    align-self: flex-start;
    background-color: var(--bg-hover);
    border-bottom-left-radius: 4px;
}

.message-time_collab {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
    text-align: right;
}

.message-file_collab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin-top: 0.5rem;
}

.shared-data_collab {
    background-color: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--success);
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 0.5rem;
}

.shared-alert_collab {
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger);
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 0.5rem;
}

.chat-input_collab {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

.chat-input_collab input {
    flex: 1;
    padding: 0.75rem;
    background-color: var(--bg-hover);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
}

.chat-input-actions_collab {
    display: flex;
    gap: 0.5rem;
}

.share-options_collab {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: var(--bg-hover);
    border-radius: 8px;
}

.share-btn_collab {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.share-btn_collab:hover {
    transform: translateY(-2px);
}

/* Share buttons in content */
.share-section_collab {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Examens Styles */
.exam-section_collab {
    margin-bottom: 2rem;
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.exam-header_collab {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.exam-title_collab {
    font-size: 1.25rem;
    font-weight: 600;
}

.exam-icon_collab {
    margin-right: 0.75rem;
    font-size: 1.5rem;
    color: var(--primary);
}

.exam-row_collab {
    display: flex;
    margin-bottom: 1rem;
    align-items: center;
}

.exam-label_collab {
    width: 200px;
    font-weight: 500;
}

.exam-value_collab {
    flex: 1;
    font-weight: 600;
}

/* Calculator Styles */
.calculator-grid_collab {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.calculator-card_collab {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.calculator-title_collab {
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary);
    font-size: 1.25rem;
    font-weight: 600;
}

.calculator-result_collab {
    background-color: rgba(16, 185, 129, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border-left: 4px solid var(--success);
}

/* ECMO Styles */
.ecmo-grid_collab {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Badge */
.badge_collab {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

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

.modal_collab {
    background-color: var(--bg-card);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.modal-header_collab {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title_collab {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close_collab {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body_collab {
    padding: 1.5rem;
}

.modal-footer_collab {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar_collab {
        width: 80px;
    }

    .logo-text_collab,
    .nav-text_collab {
        display: none;
    }

    .main-content_collab {
        margin-left: 80px;
    }

    .nav-item_collab {
        justify-content: center;
    }

    .collaboration-grid_collab {
        grid-template-columns: 1fr;
    }

    .ecmo-grid_collab {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-grid_collab {
        grid-template-columns: 1fr;
    }

    .form-grid_collab {
        grid-template-columns: 1fr;
    }

    .calculator-grid_collab {
        grid-template-columns: 1fr;
    }

    .message_collab {
        max-width: 85%;
    }

    .exam-row_collab {
        flex-direction: column;
        align-items: flex-start;
    }

    .exam-label_collab {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}



/***** Stats Page *****************************************************/

.topbar_st {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--border-color);
        }
        
        .page-title_st {
            font-size: 1.5rem;
            font-weight: 700;
        }
        
        .user-menu_st {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .user-menu_st .form-control_st,
        .user-menu_st #stats-period_st {
            background-color: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 0.5rem 1rem;
            color: var(--text-primary);
            font-size: 0.875rem;
            transition: all 0.2s ease;
            cursor: pointer;
            outline: none;
        }

        .user-menu_st .form-control_st:hover,
        .user-menu_st #stats-period_st:hover {
            border-color: var(--primary);
            background-color: var(--bg-hover);
        }

        .user-menu_st .form-control_st:focus,
        .user-menu_st #stats-period_st:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .user-menu_st .form-control_st option,
        .user-menu_st #stats-period_st option {
            background-color: var(--bg-secondary);
            color: var(--text-primary);
            padding: 0.5rem;
        }
        
        .search-box_st {
            background-color: var(--bg-card);
            padding: 0.5rem 1rem;
            border-radius: 8px;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .search-box_st input {
            background: transparent;
            border: none;
            color: var(--text-primary);
            outline: none;
            width: 200px;
        }

/* Dashboard Grid */
.dashboard-grid_st {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card_st {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.card_st:hover {
    transform: translateY(-5px);
}

.card-header_st {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-title_st {
    font-size: 1.125rem;
    font-weight: 600;
}

.card-icon_st {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bg-primary_st {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--primary);
}

.bg-success_st {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.bg-warning_st {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.bg-danger_st {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.stat-value_st {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-desc_st {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Charts */
.chart-container_st {
    height: 300px;
    margin-top: 1rem;
}

/* Page content */
.page-content_st {
    display: none;
}

.page-content_st.active_st {
    display: block;
}

/* ECharts Styles */
.echarts-chart_st {
    width: 100%;
    height: 100%;
}

.stats-grid_st {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.stats-card_st {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.stats-card-lg_st {
    grid-column: span 2;
}

.stats-card-header_st {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stats-card-title_st {
    font-size: 1.125rem;
    font-weight: 600;
}

.stats-card-actions_st {
    display: flex;
    gap: 0.5rem;
}

.stats-card-content_st {
    height: 300px;
}

/* AI Stats Grid */
.ai-stats-grid_st {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.ai-stat-card_st {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ai-stat-icon_st {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.ai-stat-value_st {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ai-stat-label_st {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.ai-stat-trend_st {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.trend-up_st {
    color: var(--success);
}

.trend-down_st {
    color: var(--danger);
}

/* Nouveaux styles pour les graphiques avancés */
.chart-grid_st {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-row .card_st {
    flex: 1;
    min-width: 0;
}

.chart-card_st {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.chart-card-lg_st {
    grid-column: span 2;
}

.chart-card-xl_st {
    grid-column: 1 / -1;
}

.chart-card-header_st {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-card-title_st {
    font-size: 1.125rem;
    font-weight: 600;
}

.chart-card-content_st {
    height: 350px;
}

.chart-tabs_st {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.chart-tab_st {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background-color: var(--bg-hover);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.chart-tab_st.active_st {
    background-color: var(--primary);
    color: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar_st {
        width: 80px;
    }

    .logo-text_st,
    .nav-text_st {
        display: none;
    }

    .main-content_st {
        margin-left: 80px;
    }

    .nav-item_st {
        justify-content: center;
    }

    .stats-grid_st {
        grid-template-columns: 1fr;
    }

    .stats-card-lg_st {
        grid-column: 1;
    }

    .chart-grid_st {
        grid-template-columns: 1fr;
    }

    .chart-card-lg_st,
    .chart-card-xl_st {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .dashboard-grid_st {
        grid-template-columns: 1fr;
    }

    .ai-stats-grid_st {
        grid-template-columns: 1fr;
    }
}