/* NeuroVision - Beyin Cerrahisi Görüntü Analiz Sistemi
   Modern, koyu tema, tıbbi estetik */

/* CSS Variables */
:root {
    /* Primary Colors - Deep Medical Blue */
    --primary-50: #e8f4fc;
    --primary-100: #c5e4f7;
    --primary-200: #9dd2f2;
    --primary-300: #6ebfec;
    --primary-400: #45aee7;
    --primary-500: #1a9de0;
    --primary-600: #0d87c7;
    --primary-700: #0a6fa3;
    --primary-800: #085780;
    --primary-900: #064060;

    /* Accent Colors - Neural Cyan */
    --accent-50: #e0fffe;
    --accent-100: #b3fffc;
    --accent-200: #80fff9;
    --accent-300: #4dfff6;
    --accent-400: #26fff4;
    --accent-500: #00e5db;
    --accent-600: #00b8b0;
    --accent-700: #008a85;
    --accent-800: #005d5a;
    --accent-900: #003030;

    /* Background - Deep Space */
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2234;
    --bg-card: #151d2e;
    --bg-card-hover: #1c2640;
    --bg-input: #0d1421;

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #00e5db;

    /* Status Colors */
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.15);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.15);

    /* Borders */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    --border-accent: rgba(0, 229, 219, 0.3);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(0, 229, 219, 0.15);

    /* Typography */
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Sizing */
    --sidebar-width: 260px;
    --header-height: 80px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.neural-network {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(0, 229, 219, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(26, 157, 224, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 229, 219, 0.03) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-normal);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent-500), var(--primary-500));
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-400), var(--primary-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.nav-menu {
    list-style: none;
    padding: 16px 12px;
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    margin-bottom: 4px;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item span {
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(0, 229, 219, 0.15), rgba(26, 157, 224, 0.15));
    color: var(--accent-400);
    border: 1px solid var(--border-accent);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar svg {
    width: 20px;
    height: 20px;
    color: white;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 32px 40px;
    position: relative;
    z-index: 1;
}

/* Pages */
.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Page Header */
.page-header {
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.header-left {
    flex: 1;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-fast);
}

.stat-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 26px;
    height: 26px;
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.stat-icon.orange {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 20px 24px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent-500);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.btn-link:hover {
    color: var(--accent-400);
}

/* Patient List */
.patient-list {
    list-style: none;
}

.patient-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.patient-list li:last-child {
    border-bottom: none;
}

.patient-list .empty-state {
    color: var(--text-muted);
    justify-content: center;
    padding: 32px 0;
    flex-direction: column;
    text-align: center;
}

.patient-list .empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.action-btn svg {
    width: 28px;
    height: 28px;
}

.action-btn span {
    font-size: 0.85rem;
    font-weight: 500;
}

.action-btn:hover {
    background: var(--bg-card-hover);
    color: var(--accent-400);
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent-500), var(--primary-500));
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary svg {
    width: 18px;
    height: 18px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1rem;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    transition: border-color var(--transition-fast);
}

.search-bar:focus-within {
    border-color: var(--accent-500);
}

.search-bar svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.search-bar input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

/* Patients Grid */
.patients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.patient-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.patient-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.patient-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.patient-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
}

.patient-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.patient-status.active {
    background: var(--success-bg);
    color: var(--success);
}

.patient-status.completed {
    background: var(--info-bg);
    color: var(--info);
}

.patient-card-body h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.patient-card-body p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.patient-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.patient-images-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.patient-images-count svg {
    width: 16px;
    height: 16px;
}

.patient-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Empty State */
.empty-state-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state-large svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.4;
}

.empty-state-large h3 {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state-large p {
    font-size: 0.9rem;
}

/* Upload Page */
.upload-container {
    max-width: 800px;
}

.patient-selector {
    margin-bottom: 24px;
}

.patient-selector label,
.upload-type-selector label,
.image-type-selector label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.patient-selector select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.patient-selector select:focus {
    outline: none;
    border-color: var(--accent-500);
}

.upload-type-selector {
    margin-bottom: 24px;
}

.type-buttons {
    display: flex;
    gap: 12px;
}

.type-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.type-btn svg {
    width: 22px;
    height: 22px;
}

.type-btn:hover {
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

.type-btn.active {
    background: linear-gradient(135deg, rgba(0, 229, 219, 0.1), rgba(26, 157, 224, 0.1));
    border-color: var(--accent-500);
    color: var(--accent-400);
}

.image-type-selector {
    margin-bottom: 24px;
}

.image-type-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.img-type-btn {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.img-type-btn:hover {
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

.img-type-btn.active {
    background: var(--accent-500);
    border-color: var(--accent-500);
    color: white;
}

/* Dropzone */
.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 60px 40px;
    text-align: center;
    background: var(--bg-card);
    transition: all var(--transition-fast);
    cursor: pointer;
    margin-bottom: 24px;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--accent-500);
    background: rgba(0, 229, 219, 0.05);
}

.dropzone-content svg {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.dropzone-content h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.dropzone-content p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.supported-formats {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 16px;
}

/* Upload Preview */
.upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.preview-item .remove-btn:hover {
    background: var(--error);
}

.preview-item .remove-btn svg {
    width: 16px;
    height: 16px;
}

.preview-item .file-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    font-size: 0.75rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Analysis Page */
.analysis-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

.analysis-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    height: fit-content;
}

.analysis-sidebar .patient-selector {
    margin-bottom: 20px;
}

.analysis-sidebar .patient-selector select {
    background: var(--bg-input);
}

.image-list-container h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.image-list {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
}

.image-list li {
    padding: 12px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 8px;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
}

.image-list li:hover {
    background: var(--bg-card-hover);
}

.image-list li.active {
    border-color: var(--accent-500);
    background: rgba(0, 229, 219, 0.1);
}

.image-list li.empty-state-small {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    cursor: default;
    background: transparent;
}

.image-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.image-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    background: var(--bg-input);
}

.image-info {
    flex: 1;
    min-width: 0;
}

.image-info .name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-info .meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.image-tag {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
}

.image-tag.pre-op {
    background: var(--warning-bg);
    color: var(--warning);
}

.image-tag.post-op {
    background: var(--success-bg);
    color: var(--success);
}

/* Analysis Main */
.analysis-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.image-viewer {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.image-viewer img,
.image-viewer video {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.viewer-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
}

.viewer-placeholder svg {
    width: 64px;
    height: 64px;
    opacity: 0.4;
}

.analysis-controls {
    display: flex;
    justify-content: center;
}

.analysis-results {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    min-height: 200px;
}

.results-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 150px;
    color: var(--text-muted);
}

.analysis-result-content {
    line-height: 1.8;
}

.analysis-result-content h4 {
    color: var(--accent-400);
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.analysis-result-content p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.analysis-result-content ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.analysis-result-content li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* Compare Page */
.compare-container {
    max-width: 1400px;
}

.compare-header {
    margin-bottom: 24px;
}

.compare-header .patient-selector {
    max-width: 400px;
    margin-bottom: 0;
}

.compare-panels {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.compare-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.pre-op-panel .panel-header h3 {
    color: var(--warning);
}

.post-op-panel .panel-header h3 {
    color: var(--success);
}

.panel-header select {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.85rem;
}

.panel-viewer {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.panel-viewer img,
.panel-viewer video {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
}

.compare-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.divider-line {
    width: 2px;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--border-color), transparent);
}

.divider-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.compare-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.compare-results {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    min-height: 200px;
}

/* Reports Page */
.reports-container {
    max-width: 1200px;
}

.reports-filters {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-group select,
.filter-group input {
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.9rem;
}

.filter-group span {
    color: var(--text-muted);
}

.reports-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.report-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.report-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
}

.report-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.report-card-header h4 {
    font-size: 1rem;
    color: var(--text-primary);
}

.report-type {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.report-type.single {
    background: var(--info-bg);
    color: var(--info);
}

.report-type.compare {
    background: var(--accent-500);
    background: rgba(0, 229, 219, 0.15);
    color: var(--accent-400);
}

.report-card-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.report-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.report-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.report-actions {
    display: flex;
    gap: 8px;
}

.report-action-btn {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.report-action-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 540px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--error);
    color: white;
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-body {
    padding: 24px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* Forms */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-500);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 23, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast.info {
    border-left: 4px solid var(--info);
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--error); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--info); }

.toast-message {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .compare-panels {
        grid-template-columns: 1fr;
    }
    
    .compare-divider {
        flex-direction: row;
        padding: 12px 0;
    }
    
    .divider-line {
        width: 100px;
        height: 2px;
    }
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .analysis-container {
        grid-template-columns: 1fr;
    }
    
    .analysis-sidebar {
        order: -1;
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .type-buttons {
        flex-direction: column;
    }
    
    .page-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .page-header .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

