/* ═══════════════════════════════════════════════════════════
   Software Brain Core — Admin Dashboard Styles
   Premium dark theme with glassmorphism and micro-animations
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────────── */
:root {
    /* Colors */
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2332;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-glass: rgba(17, 24, 39, 0.5);

    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --text-heading: #f9fafb;

    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;

    --glow-blue: 0 0 20px rgba(59, 130, 246, 0.3);
    --glow-purple: 0 0 20px rgba(139, 92, 246, 0.3);
    --glow-green: 0 0 20px rgba(16, 185, 129, 0.3);
    --glow-orange: 0 0 20px rgba(245, 158, 11, 0.3);

    --border-color: rgba(255, 255, 255, 0.06);
    --border-active: rgba(59, 130, 246, 0.4);

    /* Layout */
    --sidebar-width: 240px;
    --topbar-height: 60px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    height: 100vh;
    overflow: hidden;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.4));
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.4)); }
    50% { filter: drop-shadow(0 0 16px rgba(139, 92, 246, 0.6)); }
}

.logo-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-heading);
    display: block;
}

.logo-version {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent-blue);
    border-radius: 2px;
}

.nav-icon { font-size: 16px; }

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-red);
}

.status-dot.online {
    background: var(--accent-green);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    animation: blink-green 2s infinite;
}

@keyframes blink-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ── Main Content ───────────────────────────────────────── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* ── Top Bar ────────────────────────────────────────────── */
.top-bar {
    height: var(--topbar-height);
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.project-selector {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    padding: 8px 12px;
    font-size: 13px;
    font-family: var(--font-sans);
    cursor: pointer;
    min-width: 220px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.project-selector:focus { border-color: var(--accent-blue); }

.search-box input {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    padding: 8px 14px;
    font-size: 13px;
    font-family: var(--font-sans);
    width: 240px;
    outline: none;
    transition: all var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ws-indicator { display: flex; align-items: center; }
.ws-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-red);
    transition: background var(--transition-normal);
}
.ws-dot.connected {
    background: var(--accent-green);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* ── Pages ──────────────────────────────────────────────── */
.page {
    display: none;
    padding: 28px;
    flex: 1;
    animation: fadeIn 0.3s ease;
}

.page.active { display: block; }

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

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

/* ── Stats Grid ─────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    backdrop-filter: blur(12px);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: var(--radius) var(--radius) 0 0;
}

.stat-card.glow-blue::before { background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan)); }
.stat-card.glow-purple::before { background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink)); }
.stat-card.glow-green::before { background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan)); }
.stat-card.glow-orange::before { background: linear-gradient(90deg, var(--accent-orange), var(--accent-red)); }

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-active);
}

.stat-card.glow-blue:hover { box-shadow: var(--glow-blue); }
.stat-card.glow-purple:hover { box-shadow: var(--glow-purple); }
.stat-card.glow-green:hover { box-shadow: var(--glow-green); }
.stat-card.glow-orange:hover { box-shadow: var(--glow-orange); }

.stat-icon { font-size: 22px; margin-bottom: 12px; }
.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 6px;
}
.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Cards ──────────────────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-heading);
}

.card-body {
    padding: 16px 20px;
    max-height: 320px;
    overflow-y: auto;
}

.empty-state {
    color: var(--text-muted);
    text-align: center;
    padding: 32px;
    font-size: 13px;
}

/* ── Graph Explorer ─────────────────────────────────────── */
.graph-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.control-select, .control-input {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    padding: 6px 10px;
    font-size: 12px;
    font-family: var(--font-sans);
    outline: none;
}

.control-input { width: 60px; }
.control-select:focus, .control-input:focus { border-color: var(--accent-blue); }

.graph-container {
    position: relative;
    height: calc(100vh - var(--topbar-height) - 120px);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    overflow: hidden;
}

.cytoscape-canvas {
    width: 100%;
    height: 100%;
    cursor: grab;
}

.cytoscape-canvas:active { cursor: grabbing; }

/* ── Node Detail Panel ──────────────────────────────────── */
.node-detail-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.node-detail-panel.open { transform: translateX(0); }

.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: 14px;
    font-weight: 600;
    color: var(--text-heading);
}

.panel-body {
    padding: 16px 20px;
    flex: 1;
    overflow-y: auto;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-active);
}

.btn-sm { padding: 6px 10px; font-size: 11px; }

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border: none;
    color: white;
    font-weight: 600;
}

.btn-primary:hover {
    opacity: 0.9;
    box-shadow: var(--glow-blue);
}

/* ── Impact Analysis ────────────────────────────────────── */
.impact-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.impact-controls .control-select { min-width: 300px; }

.impact-results { /* container for dynamic content */ }

.impact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: all var(--transition-fast);
}

.impact-item:hover {
    border-color: var(--border-active);
    transform: translateX(4px);
}

.impact-item .severity-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.severity-BLOCK { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }
.severity-WARNING { background: rgba(245, 158, 11, 0.15); color: var(--accent-orange); }
.severity-INFO { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }

/* ── Anomalies ──────────────────────────────────────────── */
.anomaly-item {
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.anomaly-item .anomaly-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.anomaly-item .anomaly-type {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent-cyan);
}

.anomaly-item .anomaly-message {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.anomaly-item .anomaly-suggestion {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Version History ────────────────────────────────────── */
.version-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: all var(--transition-fast);
}

.version-item:hover {
    border-color: var(--border-active);
}

.version-badge {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-mono);
    min-width: 48px;
    text-align: center;
}

.version-info { flex: 1; }
.version-label { font-weight: 600; font-size: 14px; color: var(--text-heading); }
.version-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── Audit Trail ────────────────────────────────────────── */
.audit-item {
    display: grid;
    grid-template-columns: 140px 80px 100px 1fr;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    font-size: 13px;
    align-items: center;
}

.audit-timestamp {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.audit-action {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
}

.action-CREATE { color: var(--accent-green); }
.action-UPDATE { color: var(--accent-blue); }
.action-DELETE { color: var(--accent-red); }
.action-SYNC { color: var(--accent-purple); }
.action-RESTORE { color: var(--accent-orange); }

.audit-target {
    color: var(--text-secondary);
    font-size: 12px;
}

/* ── Live Events Stream ─────────────────────────────────── */
.live-badge {
    color: var(--accent-red);
    font-size: 12px;
    font-weight: 700;
    animation: blink-red 1.5s infinite;
}

@keyframes blink-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.event-stream { max-height: 70vh; overflow-y: auto; }

.event-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-16px); }
    to { opacity: 1; transform: translateX(0); }
}

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

.event-info { flex: 1; }
.event-type {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent-cyan);
    margin-bottom: 2px;
}
.event-message { font-size: 13px; color: var(--text-primary); }
.event-time {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Type Breakdown Bars ────────────────────────────────── */
.breakdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.breakdown-label {
    font-size: 12px;
    color: var(--text-secondary);
    width: 120px;
    flex-shrink: 0;
}

.breakdown-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.breakdown-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.breakdown-count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    width: 30px;
    text-align: right;
}

/* ── Detail Properties ──────────────────────────────────── */
.detail-prop {
    margin-bottom: 12px;
}

.detail-prop-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.detail-prop-value {
    font-size: 13px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    padding: 6px 10px;
    border-radius: var(--radius-xs);
    word-break: break-all;
}

/* ── Health Score Ring (Dashboard) ───────────────────────── */
.health-ring {
    width: 100px;
    height: 100px;
    margin: 0 auto 12px;
    position: relative;
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .main-content { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr; }
}

/* ── Roadmap Board ───────────────────────────────────────── */
.roadmap-board {
    display: flex;
    gap: 16px;
    height: calc(100vh - var(--topbar-height) - 140px);
    overflow-x: auto;
    padding-bottom: 16px;
    box-sizing: border-box;
}

.roadmap-column {
    flex: 1;
    min-width: 280px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.column-header {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.status-todo { color: var(--text-secondary); background: rgba(156, 163, 175, 0.1); }
.status-inprogress { color: var(--accent-blue); background: rgba(59, 130, 246, 0.1); }
.status-completed { color: var(--accent-green); background: rgba(16, 185, 129, 0.1); }
.status-conflict { color: var(--accent-red); background: rgba(239, 68, 68, 0.1); }

.column-cards {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100px;
}

.roadmap-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.roadmap-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--text-heading);
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-tag {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-api { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }
.tag-comp { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }

/* ── Impact Planner Styles ───────────────────────────────── */
.impact-plan-results {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plan-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
}

.plan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.plan-item:last-child {
    border-bottom: none;
}

.plan-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plan-node-name {
    font-weight: 600;
    color: var(--text-heading);
}

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

.action-badge {
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-implement { background: rgba(59, 130, 246, 0.2); color: var(--accent-blue); }
.badge-update { background: rgba(245, 158, 11, 0.2); color: var(--accent-orange); }
.badge-delete { background: rgba(239, 68, 68, 0.2); color: var(--accent-red); }
.badge-test { background: rgba(16, 185, 129, 0.2); color: var(--accent-green); }

/* ── Health Trend Chart ──────────────────────────────────── */
.trend-chart-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 150px;
    padding-top: 20px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.trend-bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.trend-bar {
    width: 24px;
    background: linear-gradient(to top, var(--accent-blue), var(--accent-cyan));
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: var(--transition-fast);
    min-height: 2px;
}

.trend-bar:hover {
    background: linear-gradient(to top, var(--accent-purple), var(--accent-pink));
    transform: scaleX(1.1);
}

.trend-bar::after {
    content: attr(data-score);
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--text-heading);
    font-weight: 600;
    opacity: 0;
    transition: var(--transition-fast);
    pointer-events: none;
}

.trend-bar:hover::after {
    opacity: 1;
}

.trend-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 6px;
    text-transform: uppercase;
}

/* ── Light Theme Override ───────────────────────────────── */
body.light-theme {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e2e8f0;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.75);

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-heading: #0f172a;

    --border-color: rgba(0, 0, 0, 0.08);
    --border-active: rgba(59, 130, 246, 0.8);
}


