/* ============================================================
   PicoClaw Admin — Dark Monitoring Theme (Analytics V2)
   ============================================================ */

:root {
    --bg-body: #0b0d13;
    --bg-sidebar: #0f1119;
    --bg-content: #111320;
    --bg-card: #181b2a;
    --bg-card-hover: #1e2236;
    --bg-input: #1a1d2e;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-bg: rgba(99, 102, 241, 0.08);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-light: #ffffff;
    --border: #1e2236;
    --border-light: #2a2e42;
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
    --chart-1: #6366f1;
    --chart-2: #22c55e;
    --chart-3: #f59e0b;
    --chart-4: #ef4444;
    --chart-5: #3b82f6;
    --chart-6: #ec4899;
    --chart-7: #14b8a6;
    --gradient-card: linear-gradient(135deg, rgba(99,102,241,0.04) 0%, transparent 100%);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.3), 0 0 0 1px var(--border);
    --shadow-card-hover: 0 4px 16px rgba(0,0,0,0.4), 0 0 0 1px var(--border-light);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0b0d13 0%, #111320 50%, #0f1119 100%);
}

.login-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-card .logo { font-size: 3rem; margin-bottom: 0.5rem; }
.login-card h1 { font-size: 1.5rem; margin-bottom: 0.25rem; color: var(--text-light); }
.login-card .subtitle { color: var(--text-muted); margin-bottom: 2rem; font-size: 0.9rem; }

.form-group { margin-bottom: 1.25rem; text-align: left; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.85rem; color: var(--text-secondary); }

input, select, textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary {
    background: var(--accent);
    color: white;
    width: 100%;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #16a34a; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

.error-msg {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}
.error-msg.visible { display: block; }

/* ============================================================
   LAYOUT
   ============================================================ */
.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--bg-sidebar);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s;
    border-right: 1px solid var(--border);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    text-align: center;
}
.sidebar-header .logo { font-size: 2rem; }
.sidebar-header h2 { font-size: 1rem; margin-top: 0.25rem; font-weight: 600; color: var(--text-primary); }

.sidebar-nav { flex: 1; padding: 1rem 0; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(99,102,241,0.06); color: var(--text-primary); }
.nav-item.active {
    background: var(--accent-bg);
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
}
.nav-item .icon { font-size: 1.2rem; width: 24px; text-align: center; }

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}
.sidebar-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
}
.sidebar-footer a:hover { color: var(--accent); }

.main-content {
    margin-left: 250px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.header {
    background: var(--bg-sidebar);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
}
.header h1 { font-size: 1.3rem; color: var(--text-light); }
.header-actions { display: flex; gap: 1rem; align-items: center; }

.content { padding: 1.5rem 2rem; flex: 1; }

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-primary);
}

/* ============================================================
   CARDS
   ============================================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card {
    background: var(--bg-card);
    background-image: var(--gradient-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
    box-shadow: var(--shadow-card-hover);
}

.stat-card .stat-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
    font-variant-numeric: tabular-nums;
}
.stat-card .stat-label { color: var(--text-muted); font-size: 0.85rem; }

/* KPI accent colors */
.stat-card.kpi-accent .stat-value { color: var(--accent); }
.stat-card.kpi-success .stat-value { color: var(--success); }
.stat-card.kpi-warning .stat-value { color: var(--warning); }
.stat-card.kpi-danger .stat-value { color: var(--danger); }
.stat-card.kpi-info .stat-value { color: var(--info); }

/* ============================================================
   CHART CONTAINERS (Chart.js)
   ============================================================ */
.chart-card {
    background: var(--bg-card);
    background-image: var(--gradient-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    margin-bottom: 1rem;
}
.chart-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.chart-card h3 .icon { font-size: 1.1rem; }

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

/* Canvas wrapper for responsive Chart.js */
.chart-wrapper {
    position: relative;
    width: 100%;
}
.chart-wrapper-sm { height: 200px; }
.chart-wrapper-md { height: 280px; }
.chart-wrapper-lg { height: 350px; }

/* ============================================================
   HEATMAP (CSS Grid)
   ============================================================ */
.heatmap-grid {
    display: grid;
    grid-template-columns: 40px repeat(24, 1fr);
    gap: 2px;
    margin-top: 0.5rem;
}
.heatmap-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}
.heatmap-cell {
    aspect-ratio: 1;
    border-radius: 3px;
    min-height: 20px;
    transition: transform 0.15s;
}
.heatmap-cell:hover { transform: scale(1.3); z-index: 1; }
.heatmap-h0 { background: var(--bg-input); }
.heatmap-h1 { background: rgba(99,102,241,0.15); }
.heatmap-h2 { background: rgba(99,102,241,0.3); }
.heatmap-h3 { background: rgba(99,102,241,0.5); }
.heatmap-h4 { background: rgba(99,102,241,0.7); }
.heatmap-h5 { background: rgba(99,102,241,0.9); }

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.heatmap-legend-cell {
    width: 14px;
    height: 14px;
    border-radius: 2px;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; }
thead { background: rgba(99,102,241,0.04); }
th {
    padding: 0.8rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}
td {
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-secondary);
}
tr:hover { background: rgba(99,102,241,0.03); }
/* Sortable header */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--accent); }
th.sort-asc::after { content: ' ▲'; font-size: 0.6rem; }
th.sort-desc::after { content: ' ▼'; font-size: 0.6rem; }

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }

/* ============================================================
   FORM STEPS
   ============================================================ */
.steps { display: flex; gap: 0.5rem; margin-bottom: 2rem; }
.step {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.step.active { background: var(--accent); color: white; border-color: var(--accent); }
.step.done { background: var(--success); color: white; border-color: var(--success); }

.step-content { display: none; }
.step-content.active { display: block; }

.step-actions { display: flex; gap: 1rem; margin-top: 1.5rem; }

/* ============================================================
   TABS
   ============================================================ */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}
.tab {
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================
   LOGS TERMINAL
   ============================================================ */
.terminal {
    background: #080a10;
    color: #c9d1d9;
    border-radius: var(--radius);
    padding: 1rem;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.78rem;
    line-height: 1.7;
    height: calc(100vh - 220px);
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    border: 1px solid var(--border);
}

.terminal .log-error { color: #f85149; }
.terminal .log-warning { color: #d29922; }
.terminal .log-success { color: #3fb950; }
.terminal .log-info { color: #58a6ff; }

.log-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}
.log-controls input { max-width: 300px; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-overlay.visible { display: flex; }

.modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
}
.modal h3 { margin-bottom: 1rem; color: var(--text-light); }
.modal-actions { display: flex; gap: 1rem; margin-top: 1.5rem; justify-content: flex-end; }

/* ============================================================
   PERSONALITY TEMPLATES
   ============================================================ */
.personality-templates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.personality-template {
    padding: 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: var(--bg-input);
}
.personality-template:hover { border-color: var(--accent); }
.personality-template.selected { border-color: var(--accent); background: var(--accent-bg); }
.personality-template .tmpl-icon { font-size: 1.5rem; margin-bottom: 0.25rem; }
.personality-template .tmpl-name { font-weight: 600; font-size: 0.85rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .content { padding: 1rem; }
    .menu-toggle { display: block; }
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .charts-row, .charts-row-3 { grid-template-columns: 1fr; }
    .header { padding: 0.75rem 1rem; }
    .header h1 { font-size: 1.1rem; }
    .personality-templates { grid-template-columns: 1fr; }
    .steps { flex-wrap: wrap; }
    .step { min-width: 60px; }
    table { font-size: 0.8rem; }
    th, td { padding: 0.5rem; }
    .server-tab { padding: 0.6rem 1rem; font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .cards-grid { grid-template-columns: 1fr; }
    .login-card { margin: 1rem; padding: 1.5rem; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.hidden { display: none; }

/* Legacy chart bars (replaced by Chart.js, kept for fallback) */
.chart-container {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 120px;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}
.chart-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    cursor: pointer;
}
.chart-bar {
    width: 100%;
    max-width: 20px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: opacity 0.2s;
}
.chart-bar-wrapper:hover .chart-bar { opacity: 0.7; }
.chart-label {
    font-size: 0.55rem;
    color: var(--text-muted);
    margin-top: 4px;
    transform: rotate(-45deg);
    white-space: nowrap;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Pulse animation for live indicators */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}
.pulse-live {
    animation: pulse-glow 2s infinite;
}

/* Counter animation */
@keyframes count-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in {
    animation: count-up 0.4s ease-out;
}

/* ============================================================
   SERVER TABS & CARDS
   ============================================================ */
.server-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}
.server-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: all 0.2s;
    white-space: nowrap;
}
.server-tab:hover { color: var(--text-primary); background: rgba(99,102,241,0.04); }
.server-tab-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.tab-dot-online { background: var(--success); }
.tab-dot-offline { background: var(--danger); }

.server-card {
    transition: transform 0.15s, box-shadow 0.15s;
    border-left: 4px solid var(--info);
}
.server-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

code {
    background: var(--bg-input);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--accent);
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* ============================================================
   ROLE BADGE (Phase 12 — Multi-user auth)
   ============================================================ */
.role-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.role-badge-admin { background: var(--accent-bg); color: var(--accent); }
.role-badge-viewer { background: var(--warning-bg); color: var(--warning); }

/* Viewer: hide mutation buttons */
body.role-viewer .admin-only { display: none !important; }

/* ============================================================
   Phase 13: Personality System
   ============================================================ */

.personality-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.personality-section h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-primary);
}

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

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

.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.25rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
}

.radio-label input[type="radio"],
.radio-label input[type="checkbox"] {
    accent-color: var(--accent);
}

.humor-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-input);
    border-radius: 3px;
    outline: none;
    margin-top: 0.5rem;
}

.humor-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--bg-card);
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.4);
}

.humor-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--bg-card);
}

.char-count {
    text-align: right;
    font-size: 0.8em;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.soul-editor {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    width: 100%;
    resize: vertical;
    min-height: 200px;
}

.soul-editor:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.prompt-preview {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

/* Evolution metrics */
.evolution-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.evo-user-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.evo-user-card h5 {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.evo-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.evo-metric {
    display: grid;
    grid-template-columns: 90px 1fr 50px;
    align-items: center;
    gap: 0.5rem;
}

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

.evo-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.evo-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.evo-fill-humor {
    background: var(--warning);
}

.evo-fill-verb {
    background: var(--info);
}

.evo-value {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
    font-family: monospace;
}
