/** * Confusion Matrix Component * * Visual representation of classification model performance metrics * with TP, TN, FP, FN quadrants and error rates */ .confusion-matrix-card { padding: var(--space-md); border: 1px solid var(--admin-border-color); border-radius: var(--admin-border-radius); background: var(--admin-card-bg); } .confusion-matrix-card__title { margin: 0 0 var(--space-md); font-size: var(--font-size-md); font-weight: 600; color: var(--admin-text-primary); } /* Confusion Matrix Grid - 2x2 Layout */ .confusion-matrix__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xs); margin-bottom: var(--space-md); } /* Matrix Cells */ .confusion-matrix__cell { padding: var(--space-md); border-radius: var(--admin-border-radius); text-align: center; transition: transform 0.2s ease, box-shadow 0.2s ease; } .confusion-matrix__cell:hover { transform: translateY(-2px); box-shadow: var(--admin-shadow-md); } .confusion-matrix__cell-label { font-size: var(--font-size-sm); font-weight: 500; margin-bottom: var(--space-xs); text-transform: uppercase; letter-spacing: 0.5px; } .confusion-matrix__cell-value { font-size: var(--font-size-xl); font-weight: 700; } /* Color-coded cells */ .confusion-matrix__cell--tp { background: oklch(95% 0.05 150); /* Light green */ border: 2px solid oklch(70% 0.15 150); color: oklch(30% 0.1 150); } .confusion-matrix__cell--tn { background: oklch(95% 0.05 220); /* Light blue */ border: 2px solid oklch(65% 0.15 220); color: oklch(30% 0.1 220); } .confusion-matrix__cell--fp { background: oklch(95% 0.05 30); /* Light red/orange */ border: 2px solid oklch(70% 0.15 30); color: oklch(35% 0.1 30); } .confusion-matrix__cell--fn { background: oklch(95% 0.05 60); /* Light yellow */ border: 2px solid oklch(75% 0.15 60); color: oklch(35% 0.1 60); } /* Rates Section */ .confusion-matrix__rates { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); padding-top: var(--space-md); border-top: 1px solid var(--admin-border-color); } .confusion-matrix__rates .admin-stat-item { padding: var(--space-sm); background: var(--admin-bg-secondary); border-radius: var(--admin-border-radius-sm); } .confusion-matrix__rates .admin-stat-item__label { font-size: var(--font-size-sm); font-weight: 500; color: var(--admin-text-secondary); } .confusion-matrix__rates .admin-stat-item__value { font-size: var(--font-size-md); font-weight: 600; color: var(--admin-text-primary); } /* Dark Mode Support */ :root[data-theme="dark"] .confusion-matrix__cell--tp { background: oklch(25% 0.08 150); border-color: oklch(45% 0.12 150); color: oklch(85% 0.05 150); } :root[data-theme="dark"] .confusion-matrix__cell--tn { background: oklch(25% 0.08 220); border-color: oklch(45% 0.12 220); color: oklch(85% 0.05 220); } :root[data-theme="dark"] .confusion-matrix__cell--fp { background: oklch(25% 0.08 30); border-color: oklch(45% 0.12 30); color: oklch(85% 0.05 30); } :root[data-theme="dark"] .confusion-matrix__cell--fn { background: oklch(25% 0.08 60); border-color: oklch(45% 0.12 60); color: oklch(85% 0.05 60); } /* Responsive Design */ @media (max-width: 768px) { .confusion-matrix__grid { gap: var(--space-xxs); } .confusion-matrix__cell { padding: var(--space-sm); } .confusion-matrix__cell-label { font-size: var(--font-size-xs); } .confusion-matrix__cell-value { font-size: var(--font-size-lg); } .confusion-matrix__rates { grid-template-columns: 1fr; } }