/* ============================================================
   SWARM PLATFORM — Admin Dashboard Styles
   ============================================================ */

/* --- Reset & Variables --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --bg-deep: #0a0e1a;
    --bg-surface: #111827;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-hover: rgba(17, 24, 39, 0.85);
    --bg-input: rgba(30, 41, 59, 0.6);
    --bg-input-focus: rgba(30, 41, 59, 0.9);

    --border: rgba(148, 163, 184, 0.08);
    --border-hover: rgba(148, 163, 184, 0.15);
    --border-focus: rgba(167, 139, 250, 0.4);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-dim: #475569;

    --accent-purple: #a78bfa;
    --accent-cyan: #06b6d4;
    --accent-green: #34d399;
    --accent-red: #f87171;
    --accent-amber: #fbbf24;
    --accent-blue: #60a5fa;
    --accent-pink: #f472b6;

    --gradient-main: linear-gradient(135deg, #a78bfa, #06b6d4);
    --gradient-green: linear-gradient(135deg, #34d399, #06b6d4);
    --gradient-red: linear-gradient(135deg, #f87171, #f472b6);
    --gradient-amber: linear-gradient(135deg, #fbbf24, #f59e0b);

    /* Class colors */
    --color-retail: #a78bfa;
    --color-jamla: #06b6d4;
    --color-docs: #60a5fa;
    --color-risk: #f87171;
    --color-long: #34d399;
    --color-short: #f87171;
    --color-hold: #fbbf24;

    /* Sizing */
    --header-h: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Shadows */
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--border);
    --shadow-glow: 0 0 30px rgba(167, 139, 250, 0.08);

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Background Particles --- */
.bg-particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-particles::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.06) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation: float 20s infinite ease-in-out;
}

.bg-particles::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.05) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    animation: float 25s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* --- Header --- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-left, .header-right {
    flex: 1;
}

.header-right {
    display: flex;
    justify-content: flex-end;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo-text {
    font-weight: 700;
    font-size: 1.1rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-version {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
}

/* Domain Tabs */
.header-center {
    display: flex;
    justify-content: center;
}

.domain-tabs {
    position: relative;
    display: flex;
    gap: 4px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 4px;
}

.domain-tab {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.2rem;
    border: none;
    background: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: color 0.3s var(--ease-out);
}

.domain-tab.active {
    color: var(--text-primary);
}

.domain-tab:hover:not(.active) {
    color: var(--text-secondary);
}

.tab-icon {
    font-size: 1rem;
}

.tab-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    width: calc(50% - 4px);
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: var(--radius-sm);
    transition: transform 0.4s var(--ease-spring);
    pointer-events: none;
}

.tab-indicator.btc {
    transform: translateX(calc(100% + 4px));
}

/* Status Badge */
.status-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
    animation: pulse 2s infinite;
}

.status-badge.error .status-dot {
    background: var(--accent-red);
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.4);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* --- Main Layout --- */
.main {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.2rem;
    padding: 1.2rem 1.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

.col-primary {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.col-secondary {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* --- Cards --- */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

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

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

.card-body {
    padding: 1.2rem;
}

/* --- Input Area --- */
.input-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.text-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    direction: auto;
}

.text-input:focus {
    outline: none;
    border-color: var(--border-focus);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.08);
}

.text-input::placeholder {
    color: var(--text-dim);
}

/* Signal grid (BTC) */
.signal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

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

.signal-field {
    display: flex;
    flex-direction: column;
}

.field-input {
    padding: 0.55rem 0.7rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    transition: border-color 0.2s, background 0.2s;
}

.field-input:focus {
    outline: none;
    border-color: var(--border-focus);
    background: var(--bg-input-focus);
}

.rsi-bar {
    height: 4px;
    background: var(--bg-input);
    border-radius: 2px;
    margin-top: 0.4rem;
    overflow: hidden;
}

.rsi-fill {
    height: 100%;
    width: 64%;
    background: var(--gradient-main);
    border-radius: 2px;
    transition: width 0.3s var(--ease-out), background 0.3s;
}

.toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.toggle-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.toggle-item input[type="checkbox"] {
    accent-color: var(--accent-purple);
    cursor: pointer;
}

/* Process Button */
.btn-process {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
    padding: 0.85rem 1.5rem;
    background: var(--gradient-main);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s var(--ease-spring), box-shadow 0.3s;
}

.btn-process:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.3);
}

.btn-process:active {
    transform: translateY(0);
}

.btn-process.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* --- Results --- */
.card-results {
    animation: slideUp 0.5s var(--ease-out);
}

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

.run-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.decision-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(167, 139, 250, 0.04);
    border: 1px solid rgba(167, 139, 250, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 1.2rem;
}

.decision-class {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.class-label, .conf-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.class-value {
    font-size: 1.4rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
}

.action-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.action-badge.route { background: rgba(52, 211, 153, 0.12); color: var(--accent-green); border: 1px solid rgba(52, 211, 153, 0.2); }
.action-badge.escalate { background: rgba(248, 113, 113, 0.12); color: var(--accent-red); border: 1px solid rgba(248, 113, 113, 0.2); }
.action-badge.ask_clarification { background: rgba(251, 191, 36, 0.12); color: var(--accent-amber); border: 1px solid rgba(251, 191, 36, 0.2); }
.action-badge.review { background: rgba(96, 165, 250, 0.12); color: var(--accent-blue); border: 1px solid rgba(96, 165, 250, 0.2); }
.action-badge.enter_long { background: rgba(52, 211, 153, 0.12); color: var(--accent-green); border: 1px solid rgba(52, 211, 153, 0.2); }
.action-badge.enter_short { background: rgba(248, 113, 113, 0.12); color: var(--accent-red); border: 1px solid rgba(248, 113, 113, 0.2); }
.action-badge.hold { background: rgba(251, 191, 36, 0.12); color: var(--accent-amber); border: 1px solid rgba(251, 191, 36, 0.2); }
.action-badge.risk_off { background: rgba(248, 113, 113, 0.15); color: var(--accent-red); border: 1px solid rgba(248, 113, 113, 0.25); }
.action-badge.route_with_secondary_flag { background: rgba(167, 139, 250, 0.12); color: var(--accent-purple); border: 1px solid rgba(167, 139, 250, 0.2); }

.decision-confidence {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}

.conf-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-green);
}

/* Score Bars */
.section-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.6rem;
}

.score-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.score-bar-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.score-bar-label {
    width: 55px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.score-bar-track {
    flex: 1;
    height: 22px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.score-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.8s var(--ease-out);
    position: relative;
}

.score-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 60%, rgba(255,255,255,0.08));
    border-radius: 6px;
}

.score-bar-value {
    width: 50px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: right;
}

/* Signal Tags */
.signal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1.2rem;
}

.signal-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 500;
    border-radius: 100px;
    background: rgba(167, 139, 250, 0.08);
    color: var(--accent-purple);
    border: 1px solid rgba(167, 139, 250, 0.15);
    direction: auto;
}

/* Governor Detail */
.governor-detail {
    padding: 0.7rem 0.9rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.governor-detail strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Feedback */
.feedback-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-feedback {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-correct:hover {
    background: rgba(52, 211, 153, 0.08);
    border-color: rgba(52, 211, 153, 0.3);
    color: var(--accent-green);
}

.btn-wrong:hover {
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.3);
    color: var(--accent-red);
}

.correction-picker {
    margin-top: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.correction-label {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.correction-options {
    display: flex;
    gap: 0.35rem;
}

.correction-btn {
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: capitalize;
}

.correction-btn:hover {
    background: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.3);
    color: var(--accent-purple);
}

.feedback-done {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0;
    color: var(--accent-green);
    font-size: 0.82rem;
    animation: fadeIn 0.3s;
}

.feedback-icon {
    font-size: 1.1rem;
}

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

/* --- Pheromones --- */
.btn-icon-sm {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-sm:hover {
    background: var(--bg-input);
    color: var(--text-secondary);
    border-color: var(--border-hover);
}

.phero-bars {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.phero-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phero-label {
    width: 50px;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.phero-track {
    flex: 1;
    height: 14px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.phero-center {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border-hover);
}

.phero-fill {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 4px;
    transition: all 0.6s var(--ease-out);
}

.phero-fill.positive {
    left: 50%;
    background: var(--gradient-green);
}

.phero-fill.negative {
    right: 50%;
    background: var(--gradient-red);
}

.phero-value {
    width: 45px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: right;
}

/* Pattern List */
.pattern-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-height: 200px;
    overflow-y: auto;
}

.pattern-list::-webkit-scrollbar {
    width: 4px;
}

.pattern-list::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 2px;
}

.pattern-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.72rem;
    transition: background 0.15s;
}

.pattern-row:hover {
    background: var(--bg-input);
}

.pattern-key {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
}

.pattern-val {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}

.pattern-val.positive { color: var(--accent-green); }
.pattern-val.negative { color: var(--accent-red); }

/* --- History --- */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 400px;
    overflow-y: auto;
}

.history-list::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 2px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
    cursor: default;
}

.history-item:hover {
    background: var(--bg-input);
}

.history-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: var(--text-dim);
    width: 28px;
}

.history-class {
    font-size: 0.78rem;
    font-weight: 600;
    flex: 1;
    text-transform: capitalize;
}

.history-action {
    font-size: 0.68rem;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.history-action.route { color: var(--accent-green); background: rgba(52, 211, 153, 0.08); }
.history-action.escalate { color: var(--accent-red); background: rgba(248, 113, 113, 0.08); }
.history-action.ask_clarification { color: var(--accent-amber); background: rgba(251, 191, 36, 0.08); }
.history-action.enter_long { color: var(--accent-green); background: rgba(52, 211, 153, 0.08); }
.history-action.enter_short { color: var(--accent-red); background: rgba(248, 113, 113, 0.08); }
.history-action.hold { color: var(--accent-amber); background: rgba(251, 191, 36, 0.08); }
.history-action.risk_off { color: var(--accent-red); background: rgba(248, 113, 113, 0.08); }

.history-feedback {
    font-size: 0.82rem;
    width: 20px;
    text-align: center;
}

/* --- Metrics --- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.metric-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.7rem 0.4rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.metric-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-label {
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.conf-dist {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.conf-dist-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.conf-dist-label {
    width: 44px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    color: var(--text-muted);
    text-align: right;
}

.conf-dist-track {
    flex: 1;
    height: 12px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 3px;
    overflow: hidden;
}

.conf-dist-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--gradient-main);
    transition: width 0.5s var(--ease-out);
}

.conf-dist-count {
    width: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    color: var(--text-dim);
    text-align: right;
}

.confusion-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.confusion-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.4rem;
    font-size: 0.72rem;
    border-radius: 4px;
}

.confusion-row:hover {
    background: var(--bg-input);
}

.confusion-predicted {
    font-weight: 600;
    color: var(--accent-red);
}

.confusion-arrow {
    color: var(--text-dim);
}

.confusion-actual {
    font-weight: 600;
    color: var(--accent-green);
    flex: 1;
}

.confusion-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* --- Utilities --- */
.hidden {
    display: none !important;
}

.empty-state {
    padding: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-dim);
    font-style: italic;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 3px;
}
