@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #131b2e;
    --bg-glass: rgba(19, 27, 46, 0.65);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #0ea5e9;
    --primary-hover: #38bdf8;
    --primary-glow: rgba(14, 165, 233, 0.25);
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.2);
    
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.2);
    
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.2);
    
    --indigo: #6366f1;
    --indigo-glow: rgba(99, 102, 241, 0.2);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 16px;
}

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

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(14, 165, 233, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Layout */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 80px 1fr;
    }
    .sidebar .logo span, 
    .sidebar nav a span {
        display: none;
    }
    .sidebar {
        align-items: center;
        padding: 1.5rem 0.5rem !important;
    }
    .sidebar nav a {
        justify-content: center;
        padding: 0.8rem !important;
    }
    .sidebar nav a i {
        margin: 0 !important;
        font-size: 1.3rem;
    }
}

/* Sidebar */
.sidebar {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glass);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-heading);
}

.logo i {
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
}

.logo span {
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 500;
}

.sidebar nav a i {
    font-size: 1.15rem;
    width: 20px;
    text-align: center;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar nav a.active {
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    background: linear-gradient(90deg, var(--primary-glow), transparent);
    color: var(--primary);
}

.sidebar-footer {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* Main Content Area */
.main-content {
    padding: 2.5rem;
    overflow-y: auto;
}

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

.header-title h1 {
    font-size: 2.2rem;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--text-primary), #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-title p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

/* Cards & Glassmorphism */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
}

/* Dashboard Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

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

.stat-icon.primary { background: var(--primary-glow); color: var(--primary); }
.stat-icon.success { background: var(--success-glow); color: var(--success); }
.stat-icon.warning { background: var(--warning-glow); color: var(--warning); }
.stat-icon.danger { background: var(--danger-glow); color: var(--danger); }
.stat-icon.indigo { background: var(--indigo-glow); color: var(--indigo); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    font-family: var(--font-heading);
}

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

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.grid-section-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grid-section-title span {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--primary);
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: var(--font-heading);
    transition: var(--transition);
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 15px var(--primary-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

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

.btn-danger:hover {
    background: #ff5a5a;
    box-shadow: 0 0 15px var(--danger-glow);
}

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

.btn-success:hover {
    background: #14d495;
    box-shadow: 0 0 15px var(--success-glow);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* Badge components */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success { background: var(--success-glow); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: var(--warning-glow); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { background: var(--danger-glow); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-primary { background: var(--primary-glow); color: var(--primary); border: 1px solid rgba(14, 165, 233, 0.3); }
.badge-indigo { background: var(--indigo-glow); color: var(--indigo); border: 1px solid rgba(99, 102, 241, 0.3); }

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="password"],
select,
textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    background: rgba(15, 23, 42, 0.8);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* Modals & Overlays */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 16, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--border-radius);
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

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

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

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

/* View Sections visibility */
.view-section {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.view-section.active {
    display: block;
}

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

/* Tables */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 1rem;
    border-bottom: 1px solid var(--border-glass);
    font-family: var(--font-heading);
}

td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

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

tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Quick Diagnostic Screen styles */
.diagnostic-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

.risk-meter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.gauge-canvas {
    width: 180px;
    height: 100px;
}

.risk-value-display {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: -10px;
    font-family: var(--font-heading);
}

.risk-stage {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0.5rem;
    text-transform: uppercase;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

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

.activity-dot.primary { background: var(--primary); box-shadow: 0 0 8px var(--primary); }
.activity-dot.success { background: var(--success); box-shadow: 0 0 8px var(--success); }
.activity-dot.warning { background: var(--warning); box-shadow: 0 0 8px var(--warning); }
.activity-dot.danger { background: var(--danger); box-shadow: 0 0 8px var(--danger); }

.activity-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.activity-text {
    font-size: 0.85rem;
    color: var(--text-primary);
}

.activity-text strong {
    color: var(--primary);
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Patient Detail Subtabs */
.tab-nav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--primary-glow);
    color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out forwards;
}

/* Search bar styling */
.search-wrapper {
    position: relative;
    width: 300px;
}

.search-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-wrapper input {
    padding-left: 2.25rem;
}

@media (max-width: 600px) {
    .search-wrapper {
        width: 100%;
    }
}

/* Treatment Recommendation block */
.rec-box {
    background: rgba(255, 255, 255, 0.02);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    margin-top: 1rem;
}

.rec-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

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

/* Dashboard Action Cards */
.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.action-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.15);
}

.action-card i {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.action-card h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.action-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Hospital layout cards */
.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.info-row span:first-child {
    color: var(--text-secondary);
}

.info-row span:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

/* Sidebar User Profile */
.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

.profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
    box-shadow: 0 0 10px var(--primary-glow);
}

.profile-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.profile-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.profile-role {
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Medicine Info Card */
.medicine-info-card {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05), rgba(16, 185, 129, 0.05));
    border: 1px solid var(--border-glass);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.med-image-container {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.med-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.medicine-info-card:hover .med-image-container img {
    transform: scale(1.1);
}

.med-text h5 {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.med-text p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Treatment Banner */
.treatment-banner {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-glass);
    margin-bottom: 1rem;
}

.treatment-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6) contrast(1.1);
}

.treatment-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(11, 15, 25, 0.9), transparent);
    display: flex;
    align-items: flex-end;
}

.treatment-banner-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Slider styling */
.slider-group {
    margin-bottom: 1.25rem;
}
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.slider-header label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}
.slider-val {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-glow);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(14, 165, 233, 0.3);
}
.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.range-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    transition: var(--transition);
}
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary-glow);
    transition: var(--transition);
}
.range-slider::-webkit-slider-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.2);
}

/* Preprocessing Pipeline Visuals */
.pipeline-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}
.pipeline-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
}
.pipeline-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-glow);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    border: 1px solid rgba(14, 165, 233, 0.3);
}
.pipeline-step-content {
    flex: 1;
}
.pipeline-step-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}
.pipeline-step-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Interactive Canvas Scatter Plot */
.scatter-plot-container {
    position: relative;
    width: 100%;
    background: rgba(11, 15, 25, 0.5);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}
.scatter-canvas {
    width: 100%;
    height: 220px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}
.canvas-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}
.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.legend-dot.benign { background: var(--success); box-shadow: 0 0 6px var(--success); }
.legend-dot.malignant { background: var(--danger); box-shadow: 0 0 6px var(--danger); }
.legend-dot.target { background: var(--primary); box-shadow: 0 0 6px var(--primary); }

/* Model Performance Matrices */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}
@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}
.matrix-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1rem;
}
.matrix-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.5rem;
}
.confusion-matrix {
    display: grid;
    grid-template-columns: 30px 1fr 1fr;
    gap: 0.5rem;
    align-items: center;
    text-align: center;
    font-size: 0.8rem;
}
.matrix-label-vert {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: var(--text-secondary);
    font-weight: 600;
}
.matrix-header-row {
    grid-column: 2 / span 2;
    display: flex;
    justify-content: space-around;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.matrix-cell {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 700;
}
.matrix-cell.tp { background: rgba(16, 185, 129, 0.15); color: var(--success); border-color: rgba(16, 185, 129, 0.3); }
.matrix-cell.tn { background: rgba(16, 185, 129, 0.15); color: var(--success); border-color: rgba(16, 185, 129, 0.3); }
.matrix-cell.fp { background: rgba(239, 68, 68, 0.15); color: var(--danger); border-color: rgba(239, 68, 68, 0.3); }
.matrix-cell.fn { background: rgba(239, 68, 68, 0.15); color: var(--danger); border-color: rgba(239, 68, 68, 0.3); }

.report-table {
    width: 100%;
    margin-top: 1rem;
    font-size: 0.75rem;
    border-collapse: collapse;
}
.report-table th, .report-table td {
    padding: 0.4rem;
    text-align: center;
    border-bottom: 1px solid var(--border-glass);
}
.report-table th {
    color: var(--text-secondary);
}
