/* FORGE Dashboard CSS
   Dark theme inspired by marginlab.ai
   ALWAYS DARK THEME - No light mode
   ============================================= */

/* Import JetBrains Mono */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

/* Force dark color scheme at document level */
html {
    color-scheme: dark only;
}

/* Variables - Dark Theme (ALWAYS) */
:root {
    --bg: #0a0a0f;
    --bg2: #0f0f15;
    --card: #12121a;
    --card2: #16161f;
    --card-hover: #1a1a24;
    --text: #e4e4e7;
    --text-bright: #fafafa;
    --muted: #71717a;
    --muted2: #52525b;
    --border: rgba(255,255,255,.08);
    --border-bright: rgba(255,255,255,.12);
    --shadow: 0 10px 40px rgba(0,0,0,.5);
    --shadow-sm: 0 4px 20px rgba(0,0,0,.4);
    --radius: 12px;
    --radius-sm: 8px;

    /* Accent - Sky Blue */
    --accent: #0ea5e9;
    --accent-dim: rgba(14,165,233,.15);
    --accent-glow: 0 0 20px rgba(14,165,233,.3), 0 0 40px rgba(14,165,233,.1);

    /* Status colors */
    --ok: #22c55e;
    --ok-bg: rgba(34,197,94,.12);
    --ok-border: rgba(34,197,94,.25);
    --warning: #f59e0b;
    --warning-bg: rgba(245,158,11,.12);
    --warning-border: rgba(245,158,11,.25);
    --danger: #ef4444;
    --danger-bg: rgba(239,68,68,.12);
    --danger-border: rgba(239,68,68,.25);
    --info: #0ea5e9;
    --info-bg: rgba(14,165,233,.12);
    --info-border: rgba(14,165,233,.25);

    /* Fonts */
    --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Monaco, monospace;
}

/* Reset */
* { box-sizing: border-box }
html, body { height: 100% }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px }
::-webkit-scrollbar-track { background: var(--bg2) }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 4px }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.18) }

/* Selection */
::selection { background: var(--accent); color: #000 }

/* Page Layout */
.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px 48px;
}

/* Header */
.header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.header .title { display: flex; flex-direction: column; gap: 4px }
.header .title h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0;
    color: var(--text-bright);
}
.header .title .sub { font-size: 14px; color: var(--muted); margin: 0 }
.header .meta {
    font-size: 13px;
    color: var(--muted2);
    text-align: right;
    font-family: var(--font-mono);
}

/* Page Header (legacy) */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0;
    color: var(--text-bright);
}

/* Typography */
h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 8px;
    letter-spacing: -.02em;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-bright);
    margin: 0 0 12px;
    letter-spacing: -.01em;
}

h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 10px;
}

h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 12px;
}

h4 span {
    font-weight: 500;
    color: var(--muted);
}

.subtitle {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.timestamp {
    color: var(--muted2);
    font-size: 12px;
    font-family: var(--font-mono);
}

/* Sections */
.section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.section h2 {
    font-size: 18px;
    margin: 0 0 12px;
    font-weight: 600;
}

/* Grid System */
.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.card:hover {
    border-color: var(--border-bright);
}
.card .inner { padding: 18px }
.card.compact .inner { padding: 14px }

/* Legacy card class */
.forge-card {
    background: var(--card) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 16px;
    transition: border-color .2s;
    color: var(--text);
}
.forge-card:hover {
    border-color: var(--border-bright);
}

.forge-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-bright);
}

.forge-card h4 span {
    font-weight: 500;
    color: var(--muted);
}

/* Force dark theme on all card-like elements */
.card, .forge-card, .stat-box, .table-container, [class*="card"] {
    background: var(--card) !important;
    color: var(--text) !important;
}

/* Highlight boxes - ensure legible text */
.highlight, .alert, [style*="background"] {
    color: var(--text) !important;
}

/* Green/success highlights */
.highlight-green, .highlight-success, [style*="background: rgb(34"], [style*="background: #22"], [style*="background-color: rgb(34"], [style*="background:#22"] {
    background: var(--ok-bg) !important;
    color: var(--ok) !important;
    border: 1px solid var(--ok-border);
}

/* Yellow/warning highlights */
.highlight-yellow, .highlight-warning, [style*="background: rgb(245"], [style*="background: #f5"], [style*="background-color: rgb(245"] {
    background: var(--warning-bg) !important;
    color: var(--warning) !important;
    border: 1px solid var(--warning-border);
}

/* Red/danger highlights */
.highlight-red, .highlight-danger, [style*="background: rgb(239"], [style*="background: #ef"], [style*="background-color: rgb(239"] {
    background: var(--danger-bg) !important;
    color: var(--danger) !important;
    border: 1px solid var(--danger-border);
}

/* Blue/info highlights */
.highlight-blue, .highlight-info {
    background: var(--info-bg) !important;
    color: var(--info) !important;
    border: 1px solid var(--info-border);
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

/* KPI Cards */
.kpiCol { grid-column: span 3 }
@media (max-width: 980px) { .kpiCol { grid-column: span 6 } }
@media (max-width: 560px) { .kpiCol { grid-column: span 12 } }

.kpi {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 90px;
}
.kpi .label {
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    font-family: var(--font-mono);
}
.kpi .value {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.1;
    color: var(--text-bright);
    font-family: var(--font-mono);
}
.kpi .value.sm { font-size: 26px }
.kpi .value.accent { color: var(--accent) }
.kpi .hint { font-size: 13px; color: var(--muted) }

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.stat-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    position: relative;
    transition: border-color .2s;
}
.stat-box:hover { border-color: var(--border-bright) }

.stat-box.status-online { border-left: 3px solid var(--ok); }
.stat-box.status-warning { border-left: 3px solid var(--warning); }
.stat-box.status-danger { border-left: 3px solid var(--danger); }

.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 6px;
    font-family: var(--font-mono);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1.1;
    letter-spacing: -.01em;
    font-family: var(--font-mono);
}

.stat-value.accent { color: var(--accent); }

.stat-subtitle {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

/* Cost Card */
.costCard { grid-column: 1 / span 5 }
@media (max-width: 980px) { .costCard { grid-column: 1 / -1 } }

.costList { display: flex; flex-direction: column; gap: 10px; margin-top: 10px }
.costItem {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
}
.costItem .name { color: var(--muted) }
.costItem .amt { font-variant-numeric: tabular-nums; font-family: var(--font-mono); color: var(--text) }
.costDivider { height: 1px; background: var(--border); margin: 8px 0 }
.costTotal {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-bright);
}
.costTotal .amt { font-variant-numeric: tabular-nums; font-family: var(--font-mono) }

/* Pills & Status */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card);
    font-size: 13px;
    font-weight: 500;
    width: fit-content;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--muted2);
}
.dot.ok { background: var(--ok); box-shadow: 0 0 8px rgba(34,197,94,.4) }
.dot.warning { background: var(--warning); box-shadow: 0 0 8px rgba(245,158,11,.4) }
.dot.danger { background: var(--danger); box-shadow: 0 0 8px rgba(239,68,68,.4) }
.dot.accent { background: var(--accent); box-shadow: 0 0 8px rgba(14,165,233,.4) }

.okText { color: var(--ok) }
.warningText { color: var(--warning) }
.dangerText { color: var(--danger) }

.statusPill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--ok-border);
    background: var(--ok-bg);
    color: var(--ok);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
}
.statusPill .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--ok);
    box-shadow: 0 0 8px rgba(34,197,94,.5);
}
.statusPill.warning {
    border-color: var(--warning-border);
    background: var(--warning-bg);
    color: var(--warning);
}
.statusPill.warning .dot { background: var(--warning); box-shadow: 0 0 8px rgba(245,158,11,.5) }
.statusPill.danger {
    border-color: var(--danger-border);
    background: var(--danger-bg);
    color: var(--danger);
}
.statusPill.danger .dot { background: var(--danger); box-shadow: 0 0 8px rgba(239,68,68,.5) }

/* Tables */
.tableCard { grid-column: 1 / -1 }
.tableWrap { overflow: auto }

.table-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 16px 0;
}

.table-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.table-header h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: var(--text-bright);
}

.table-header h4 span {
    font-weight: 500;
    color: var(--muted);
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table, .forge-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 700px;
}

thead th, .forge-table th, table th {
    position: sticky;
    top: 0;
    background: var(--card2) !important;
    border-bottom: 1px solid var(--border);
    color: var(--muted) !important;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    z-index: 1;
    font-family: var(--font-mono);
}

tbody td, .forge-table td, table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text) !important;
    font-size: 14px;
    background: inherit;
}

tbody tr, table tbody tr { background: var(--card) !important }
tbody tr:nth-child(2n), table tbody tr:nth-child(2n) { background: var(--card2) !important }
.forge-table tr { background: var(--card) !important }
.forge-table tr:nth-child(2n) { background: var(--card2) !important }

tbody tr:hover, table tbody tr:hover { background: var(--card-hover) !important }
.forge-table tr:hover { background: var(--card-hover) !important }
.forge-table tr:last-child td { border-bottom: none }
.forge-table td strong, table td strong { font-weight: 600; color: var(--text-bright) !important }

td.muted { color: var(--muted) }
td.num { font-variant-numeric: tabular-nums; font-family: var(--font-mono) }
td.right { text-align: right }

/* Status indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online { background: var(--ok); box-shadow: 0 0 8px rgba(34,197,94,.5) }
.status-dot.success { background: var(--ok); box-shadow: 0 0 8px rgba(34,197,94,.5) }
.status-dot.warning { background: var(--warning); box-shadow: 0 0 8px rgba(245,158,11,.5) }
.status-dot.danger { background: var(--danger); box-shadow: 0 0 8px rgba(239,68,68,.5) }
.status-dot.offline { background: var(--muted2) }

.status-text.online { color: var(--ok) }
.status-text.success { color: var(--ok) }
.status-text.warning { color: var(--warning) }
.status-text.danger { color: var(--danger) }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.badge-success {
    background: var(--ok-bg);
    color: var(--ok);
    border: 1px solid var(--ok-border);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid var(--info-border);
}

.badge-neutral {
    background: var(--card2);
    color: var(--muted);
    border: 1px solid var(--border);
}

.badge .status-dot {
    width: 6px;
    height: 6px;
}

/* Cost/Price Table */
.cost-table {
    width: 100%;
}

.cost-table tr td {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.cost-table tr:last-child td {
    border-bottom: none;
    font-weight: 600;
    color: var(--text-bright);
}

.cost-table td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    font-family: var(--font-mono);
}

/* Tabs */
.forge-tabs {
    display: flex;
    gap: 2px;
    margin: 20px 0 0 0;
    border-bottom: 1px solid var(--border);
}

.forge-tab {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    color: var(--muted);
    transition: all 0.15s;
    margin-bottom: -1px;
}

.forge-tab:hover {
    color: var(--text);
}

.forge-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.forge-tab-content {
    display: none;
    padding: 18px 0;
}

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

/* Pagination */
.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.pagination a,
.pagination span {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--muted);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
}

.pagination a:hover {
    background: var(--card2);
    color: var(--text);
    border-color: var(--border-bright);
}

.pagination .active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    font-weight: 600;
}

.pagination .disabled {
    color: var(--muted2);
    pointer-events: none;
}

/* Search */
.search-bar {
    margin: 16px 0;
}

.search-bar input {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    width: 100%;
    max-width: 300px;
    background: var(--card);
    color: var(--text);
    transition: all 0.15s;
}

.search-bar input::placeholder {
    color: var(--muted2);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--accent);
    color: #000;
}

.btn-primary:hover {
    background: #38bdf8;
    box-shadow: var(--accent-glow);
}

.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--card2);
    border-color: var(--border-bright);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
}

.btn-ghost:hover {
    color: var(--text);
    background: var(--card);
}

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin: 16px 0;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid var(--info-border);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.alert-success {
    background: var(--ok-bg);
    color: var(--ok);
    border: 1px solid var(--ok-border);
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

/* Utility classes */
.text-muted { color: var(--muted) }
.text-light { color: var(--muted2) }
.text-success { color: var(--ok) }
.text-danger { color: var(--danger) }
.text-warning { color: var(--warning) }
.text-accent { color: var(--accent) }
.text-bright { color: var(--text-bright) }

.font-bold { font-weight: 700 }
.font-medium { font-weight: 600 }
.font-mono { font-family: var(--font-mono) }

.mb-0 { margin-bottom: 0 }
.mb-1 { margin-bottom: 8px }
.mb-2 { margin-bottom: 16px }
.mb-3 { margin-bottom: 24px }
.mb-4 { margin-bottom: 32px }

.mt-0 { margin-top: 0 }
.mt-1 { margin-top: 8px }
.mt-2 { margin-top: 16px }
.mt-3 { margin-top: 24px }
.mt-4 { margin-top: 32px }

.text-right { text-align: right }
.text-center { text-align: center }

/* Yes/No styling */
.bool-yes { color: var(--ok); font-weight: 600 }
.bool-no { color: var(--muted2) }

/* Accent glow effect */
.glow { box-shadow: var(--accent-glow) }
.glow-text { text-shadow: 0 0 20px rgba(14,165,233,.5) }

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 24px }
    h2 { font-size: 16px }

    .page { padding: 20px 16px 40px }

    .page-header, .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header .meta { text-align: left }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-box { padding: 14px }
    .stat-value { font-size: 20px }

    .forge-table, table {
        font-size: 12px;
        min-width: 550px;
    }

    .forge-table th,
    .forge-table td,
    thead th,
    tbody td {
        padding: 10px 12px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .grid { gap: 10px }
}

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

/* ===========================================
   GLOBAL DARK THEME OVERRIDES
   Force dark theme on any remaining light elements
   =========================================== */

/* Override any white/light backgrounds */
div[style*="background: white"],
div[style*="background: #fff"],
div[style*="background: #ffffff"],
div[style*="background-color: white"],
div[style*="background-color: #fff"],
div[style*="background-color: #ffffff"],
div[style*="background: rgb(255"],
div[style*="background-color: rgb(255"],
section[style*="background"],
article[style*="background"] {
    background: var(--card) !important;
    color: var(--text) !important;
}

/* Fix any light text on dark backgrounds */
.main-content, .main-content * {
    color: inherit;
}

.main-content h1, .main-content h2, .main-content h3, .main-content h4, .main-content h5 {
    color: var(--text-bright) !important;
}

.main-content p, .main-content span, .main-content div, .main-content li {
    color: var(--text);
}

/* Dashboard header styling */
.dashboard-header {
    background: var(--card) !important;
    color: var(--text) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.dashboard-header h1 {
    color: var(--text-bright) !important;
}

.dashboard-header .subtitle, .dashboard-header p {
    color: var(--muted) !important;
}

/* Strategy table overrides */
.strategy-table {
    background: var(--card) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.strategy-table table {
    background: transparent !important;
}

/* Dashboard stats */
.dashboard-stats {
    display: flex;
    gap: 16px;
    margin: 20px 0;
}

.dashboard-stats .stat-box {
    background: var(--card) !important;
    color: var(--text) !important;
}

/* Inline colored backgrounds - make text legible */
span[style*="background"],
mark,
.highlight {
    padding: 2px 6px;
    border-radius: 4px;
}

/* Green inline highlights */
span[style*="background: #4"], span[style*="background: #5"], span[style*="background: #6"],
span[style*="background: rgb(68"], span[style*="background: rgb(74"], span[style*="background: rgb(34"],
mark.green, .bg-green {
    background: rgba(34,197,94,.2) !important;
    color: #4ade80 !important;
}

/* Yellow inline highlights */
span[style*="background: #f"], span[style*="background: rgb(245"], span[style*="background: rgb(250"],
mark.yellow, .bg-yellow {
    background: rgba(245,158,11,.2) !important;
    color: #fbbf24 !important;
}

/* Red inline highlights */
span[style*="background: #e"], span[style*="background: rgb(239"], span[style*="background: rgb(220"],
mark.red, .bg-red {
    background: rgba(239,68,68,.2) !important;
    color: #f87171 !important;
}

/* Blue inline highlights */
span[style*="background: #0"], span[style*="background: rgb(14"], span[style*="background: rgb(59"],
mark.blue, .bg-blue {
    background: rgba(14,165,233,.2) !important;
    color: #38bdf8 !important;
}

/* Button overrides */
.btn-run, button.btn-run {
    background: var(--accent) !important;
    color: #000 !important;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
}

.btn-run:hover {
    background: #38bdf8 !important;
    box-shadow: var(--accent-glow);
}

/* Links */
a {
    color: var(--accent);
}

a:hover {
    color: #38bdf8;
}

/* Code blocks */
code, pre {
    background: var(--bg2) !important;
    color: var(--text) !important;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
}

pre {
    padding: 16px;
    overflow-x: auto;
    border: 1px solid var(--border);
}

/* Blockquotes */
blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 16px;
    margin-left: 0;
    color: var(--muted);
}

/* HR */
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

/* Lists */
ul, ol {
    color: var(--text);
}

li {
    margin-bottom: 4px;
}

/* Images */
img {
    max-width: 100%;
    border-radius: var(--radius-sm);
}

/* Strong/Bold text */
strong, b {
    color: var(--text-bright);
    font-weight: 600;
}

/* ===========================================
   FORCE DARK THEME - Override all preferences
   =========================================== */

/* Override any light mode preferences */
@media (prefers-color-scheme: light) {
    :root {
        --bg: #0a0a0f;
        --bg2: #0f0f15;
        --card: #12121a;
        --card2: #16161f;
        --card-hover: #1a1a24;
        --text: #e4e4e7;
        --text-bright: #fafafa;
        --muted: #71717a;
        --muted2: #52525b;
        --border: rgba(255,255,255,.08);
        --border-bright: rgba(255,255,255,.12);
    }

    html, body {
        background: #0a0a0f !important;
        color: #e4e4e7 !important;
    }
}

/* Force dark on body regardless of system preference */
body {
    background: var(--bg) !important;
    color: var(--text) !important;
}

/* Ensure inputs and form elements stay dark */
input, textarea, select, button {
    background: var(--card) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

input::placeholder, textarea::placeholder {
    color: var(--muted2) !important;
}

/* Force dark scrollbars */
* {
    scrollbar-color: var(--border-bright) var(--bg2);
}
