/* TSManalyzer - Dumpytom War Room Stylesheet */

/* ===== THEME ===== */

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

:root {
    --gold:         #d4a017;
    --gold-light:   #f0c040;
    --gold-dim:     #a07810;
    --gold-glow:    rgba(212, 160, 23, 0.15);
    --red:          #c0392b;
    --red-dim:      #8b0000;
    --green:        #27ae60;
    --green-dim:    #1e8449;
    --blue:         #5dade2;
    --purple:       #a569bd;
    --orange:       #e67e22;
    --bg-darkest:   #0a0e14;
    --bg-dark:      #111820;
    --bg-mid:       #161d27;
    --bg-card:      #1a2233;
    --bg-card-alt:  #1e2940;
    --bg-hover:     #243044;
    --border:       #2a3548;
    --border-light: #3a4a60;
    --text:         #c8cdd5;
    --text-bright:  #e8ecf0;
    --text-dim:     #7a8594;
    --text-muted:   #556070;
    --sidebar-w:    220px;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dim) var(--bg-darkest);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg-darkest);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-darkest); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── Sidebar Nav (overlay style) ── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg-dark);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 0;
    z-index: 100;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: none;
}
.sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.5);
}

.sidebar-brand {
    padding: 8px 16px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.sidebar-brand .brand-title {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.3;
}

.sidebar-brand .brand-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav .nav-h2 {
    margin: 0;
}

.sidebar-nav .nav-h2 > a {
    display: block;
    padding: 8px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-dim);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar-nav .nav-h2 > a:hover {
    color: var(--text-bright);
    background: var(--bg-card);
}

.sidebar-nav .nav-h2 > a.active {
    color: var(--gold-light);
    border-left-color: var(--gold);
    background: var(--gold-glow);
}

.sidebar-nav .nav-h3-list {
    list-style: none;
    padding: 0;
    margin: 0 0 4px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.sidebar-nav .nav-h2.expanded .nav-h3-list {
    max-height: 600px;
}

.sidebar-nav .nav-h3 a {
    display: block;
    padding: 4px 16px 4px 28px;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar-nav .nav-h3 a:hover {
    color: var(--text);
    background: rgba(255,255,255,0.02);
}

.sidebar-nav .nav-h3 a.active {
    color: var(--gold);
    border-left-color: var(--gold-dim);
}

/* ── Sidebar toggle (always visible) ── */
.sidebar-toggle {
    display: flex;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--gold-dim);
    font-size: 1rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background: var(--gold-dim);
    color: var(--bg-darkest);
    border-color: var(--gold);
}

/* ── Back to Top ── */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--gold-dim);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--gold-dim);
    color: var(--bg-darkest);
    border-color: var(--gold);
}

/* ── Layout (full-width, centered) ── */
.page-body {
    margin-left: 0;
}

.title-page {
    text-align: center;
    padding: 40px 24px 32px;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(212, 160, 23, 0.06) 0%, transparent 60%),
        var(--bg-darkest);
    margin-bottom: 32px;
}

.title-page h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0 0 4px;
    text-shadow: 0 0 40px rgba(212, 160, 23, 0.25);
}

.title-page .subtitle {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--gold-dim);
    font-weight: 400;
    letter-spacing: 2px;
    margin: 0 0 16px;
}

.title-divider {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 16px auto;
}

.title-meta {
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.8;
}

.title-meta strong { color: var(--text-bright); font-weight: 500; }

.title-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.title-stats .stat { text-align: center; }

.title-stats .stat-value {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold-light);
    display: block;
}

.title-stats .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Wrapper ── */
.wrapper {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ── Content ── */
.content {
    padding-bottom: 60px;
}

/* ── Headings ── */
h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 40px 0 16px;
    padding: 10px 0;
    border-bottom: 2px solid var(--border);
    position: relative;
    scroll-margin-top: 20px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--gold);
}

h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--red);
    margin: 24px 0 10px;
    letter-spacing: 0.5px;
    position: relative;
    scroll-margin-top: 20px;
}

h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--blue);
    margin: 20px 0 8px;
    scroll-margin-top: 20px;
}

/* ── Paragraphs ── */
p { margin: 8px 0; color: var(--text); font-size: 0.92rem; }
strong { color: var(--text-bright); font-weight: 600; }
em { color: var(--text-dim); font-style: italic; }

/* ── Links ── */
a { color: var(--gold); text-decoration: none; border-bottom: 1px solid transparent; transition: all 0.2s; }
a:hover { color: var(--gold-light); border-bottom-color: var(--gold-light); }

/* ── Lists ── */
ul, ol { margin: 8px 0 8px 20px; padding: 0; }
li { margin: 4px 0; padding-left: 2px; font-size: 0.92rem; }
li::marker { color: var(--gold-dim); }

/* ── Checklist ── */
.checklist-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 8px 0;
    padding: 6px 12px;
    background: var(--bg-card);
    border-radius: 6px;
    border-left: 3px solid var(--border);
}
.checklist-item.unchecked { border-left-color: var(--gold-dim); }
.checklist-item.checked   { border-left-color: var(--green); }
.check-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-light);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}
.checked .check-icon { border-color: var(--green); color: var(--green); }

/* ── Tables ── */
.table-wrap {
    overflow-x: auto;
    margin: 12px 0 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    min-width: 500px;
}
thead th {
    background: linear-gradient(180deg, #1e2a3a, #162030);
    color: var(--gold-light);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.8px;
    padding: 8px 10px;
    text-align: left;
    border-bottom: 2px solid var(--gold-dim);
    white-space: nowrap;
}
td {
    padding: 7px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
tr:nth-child(even) { background: var(--bg-card); }
tr:nth-child(odd) { background: var(--bg-mid); }
tr:hover { background: var(--bg-hover); }
td:first-child { color: var(--text-bright); font-weight: 500; }

/* ── Code ── */
code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.85em;
    color: var(--gold-light);
    background: rgba(212, 160, 23, 0.08);
    border: 1px solid rgba(212, 160, 23, 0.15);
    padding: 2px 7px;
    border-radius: 4px;
}
pre {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold-dim);
    border-radius: 6px;
    padding: 12px 16px;
    margin: 10px 0;
    overflow-x: auto;
    font-size: 0.82rem;
    line-height: 1.5;
}
pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-bright);
    font-size: 0.85rem;
}

/* ── Blockquotes ── */
blockquote {
    border-left: 3px solid var(--gold);
    padding: 12px 20px;
    margin: 16px 0;
    background: var(--gold-glow);
    border-radius: 0 6px 6px 0;
    color: var(--text-bright);
    font-style: italic;
}
blockquote p { margin: 4px 0; }

/* ── Horizontal Rules ── */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
    margin: 32px 0;
}

/* ── Callout boxes ── */
.callout {
    border-radius: 8px;
    padding: 16px 20px;
    margin: 16px 0;
    border-left: 4px solid;
}
.callout-warning { background: rgba(230, 126, 34, 0.08); border-left-color: var(--orange); }
.callout-tip { background: rgba(39, 174, 96, 0.08); border-left-color: var(--green); }
.callout-important { background: rgba(192, 57, 43, 0.08); border-left-color: var(--red); }

/* ── Footer ── */
.footer {
    text-align: center;
    padding: 40px 24px;
    border-top: 1px solid var(--border);
    margin-top: 60px;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.footer .gold { color: var(--gold-dim); }

/* ── Sidebar overlay backdrop ── */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
}
.sidebar-backdrop.visible { display: block; }

/* ── Responsive ── */
@media (max-width: 700px) {
    .title-page h1 { font-size: 1.5rem; letter-spacing: 2px; }
    .title-page .subtitle { font-size: 0.85rem; }
    .title-stats { gap: 12px; }
    .title-stats .stat-value { font-size: 1.1rem; }
    h2 { font-size: 1.15rem; }
    .wrapper { padding: 0 16px; }
}

/* ── Print ── */
@media print {
    .sidebar, .sidebar-toggle, .back-to-top, .sidebar-backdrop { display: none !important; }
    body { background: white; color: #1a1a1a; }
    .title-page { background: white; }
    .title-page h1 { color: #8b6914; text-shadow: none; }
    h2 { color: #8b6914; }
    h3 { color: #8b0000; }
    table, th, td { border: 1px solid #ccc; }
    tr:nth-child(even) { background: #f5f5f5; }
    tr:nth-child(odd) { background: white; }
    th { background: #2e4057; color: white; }
    code { background: #f0e6d3; color: #8b4513; border-color: #ddd; }
    pre { background: #f8f8f8; border-color: #ddd; }
    h2 { page-break-before: auto; }
    tr { page-break-inside: avoid; }
}


/* ===== DASHBOARD ===== */

/* ===== GLOBAL RESET & TYPOGRAPHY ===== */
* { box-sizing: border-box; }
body {
    padding: 0; margin: 0;
    background: var(--bg-darkest);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px 40px;
}
h1, h2, h3 {
    font-family: 'Cinzel', 'Inter', serif;
    color: var(--gold);
    margin: 0;
    font-weight: 600;
}
h2 { font-size: 1.1em; letter-spacing: 0.5px; }

/* ===== COIN ICONS ===== */
.coin {
    width: 13px; height: 13px;
    vertical-align: middle;
    margin: 0 1px 0 1px;
    image-rendering: pixelated;
}
.coin-value {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 0.92em;
    white-space: nowrap;
}
.coin-none { color: var(--text-muted); }

/* ===== HEADER ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}
.header-title {
    font-family: 'Cinzel', serif;
    font-size: 1.6em;
    color: var(--gold-light);
    font-weight: 700;
    letter-spacing: 1px;
}
.header-sub {
    color: var(--text-muted);
    font-size: 0.85em;
    margin-top: 2px;
}
.header-gold {
    text-align: right;
}
.header-gold .coin-value {
    font-size: 1.8em;
    color: var(--gold-light);
}
.header-gold-label {
    color: var(--text-muted);
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== TAB NAVIGATION ===== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
    background: var(--bg-dark);
    position: sticky;
    top: 0;
    z-index: 100;
}
.tab {
    padding: 12px 24px;
    cursor: pointer;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.85em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    user-select: none;
}
.tab:hover { color: var(--text-bright); background: var(--bg-mid); }
.tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
    background: var(--bg-mid);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== KPI CARDS ===== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.kpi-card {
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.kpi-label {
    color: var(--text-muted);
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.kpi-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-bright);
}
.kpi-value .coin { width: 16px; height: 16px; }
.kpi-value.positive { color: var(--green); }
.kpi-value.negative { color: var(--red); }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.card-search {
    padding: 6px 12px;
    background: var(--bg-darkest);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-bright);
    font-family: 'Inter', sans-serif;
    font-size: 0.82em;
    outline: none;
    width: 200px;
    transition: border-color 0.2s;
}
.card-search:focus { border-color: var(--gold); }
.card-search::placeholder { color: var(--text-muted); }

/* ===== CHARTS ===== */
.chart-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88em;
}
th, td {
    text-align: left;
    padding: 9px 10px;
    border-bottom: 1px solid var(--border);
}
th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
tr:hover { background: rgba(255,255,255,0.03); }
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: var(--bg-hover) !important; }

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

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* Wowhead icon link */
.wh-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    vertical-align: middle;
}
.wh-icon {
    width: 14px; height: 14px;
    opacity: 0.5;
    transition: opacity 0.2s;
    vertical-align: middle;
}
.wh-icon:hover { opacity: 1; }
.wh-btn {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    margin-left: 8px;
    font-size: 0.7em;
    font-family: 'Inter', sans-serif;
    color: var(--text-dim);
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
    vertical-align: middle;
    cursor: pointer;
}
.wh-btn:hover { color: var(--text-bright); border-color: var(--gold-dim); background: var(--bg-hover); }
.item-link {
    cursor: pointer;
    text-decoration: none;
}
.item-link:hover { text-decoration: underline; }

/* Player name link */
.player-name {
    cursor: pointer;
    color: var(--text);
    transition: color 0.2s;
}
.player-name:hover { color: var(--gold-light); text-decoration: underline; }

/* ===== HELP TAB ===== */
.help-section { margin-bottom: 2em; }
.help-section h3 {
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 1.1em;
    margin: 1.5em 0 0.5em;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
}
.help-section h4 {
    color: var(--gold-dim);
    font-size: 0.95em;
    margin: 1em 0 0.4em;
}
.help-section p, .help-section li {
    color: var(--text-dim);
    font-size: 0.88em;
    line-height: 1.7;
}
.help-section ul { padding-left: 1.2em; margin: 0.3em 0; }
.help-section li { margin-bottom: 0.3em; }
.help-formula {
    display: inline-block;
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    color: var(--gold-light);
}
.help-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
    margin: 0.5em 0 1em;
}
.help-table th {
    text-align: left;
    color: var(--gold-dim);
    border-bottom: 1px solid var(--border);
    padding: 6px 10px;
    font-weight: 600;
}
.help-table td {
    padding: 5px 10px;
    color: var(--text-dim);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.help-table tr:hover td { background: var(--bg-hover); }
.help-callout {
    background: rgba(255, 200, 50, 0.06);
    border-left: 3px solid var(--gold-dim);
    padding: 0.6em 1em;
    margin: 0.8em 0;
    font-size: 0.85em;
    color: var(--text-dim);
    border-radius: 0 4px 4px 0;
}
.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5em;
}

/* ===== MARKET BROWSER ===== */
.market-search {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    align-items: center;
    flex-wrap: wrap;
}
.market-search input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    background: var(--bg-darkest);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-bright);
    font-size: 0.95em;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}
.market-search input[type="text"]:focus { border-color: var(--gold); }
.market-search input[type="text"]::placeholder { color: var(--text-muted); }
.market-search select {
    padding: 10px 12px;
    background: var(--bg-darkest);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-bright);
    font-size: 0.85em;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}
.market-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.filter-group label {
    font-size: 0.7em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.filter-group select {
    padding: 7px 10px;
    background: var(--bg-darkest);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-bright);
    font-size: 0.82em;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}
.filter-group select:focus { border-color: var(--gold); outline: none; }
/* % MV Range Slider */
.filter-range {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 170px;
}
.filter-range label {
    font-size: 0.7em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.range-display {
    font-size: 0.82em;
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    min-height: 1.2em;
}
.range-slider-wrap {
    position: relative;
    height: 28px;
}
.range-slider-track {
    position: absolute;
    top: 12px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
}
.range-slider-fill {
    position: absolute;
    top: 12px;
    height: 4px;
    background: var(--gold);
    border-radius: 2px;
    pointer-events: none;
}
.range-slider-wrap input[type="range"] {
    position: absolute;
    top: 4px;
    left: 0;
    width: 100%;
    height: 20px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    margin: 0;
}
.range-slider-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--bg-darkest);
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.range-slider-wrap input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--bg-darkest);
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.filter-reset-btn {
    padding: 7px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.82em;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-end;
}
.filter-reset-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}
.filter-active {
    border-color: var(--gold) !important;
    color: var(--gold) !important;
}
.market-info {
    color: var(--text-muted);
    font-size: 0.82em;
    margin-bottom: 10px;
}
#marketTable th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
#marketTable th:hover { color: var(--gold); }
#marketTable th.sorted-asc::after { content: ' \\25B2'; color: var(--gold); }
#marketTable th.sorted-desc::after { content: ' \\25BC'; color: var(--gold); }
.pct-bar {
    display: inline-block;
    height: 4px;
    border-radius: 2px;
    vertical-align: middle;
    margin-left: 6px;
}
.undervalued { color: var(--green); font-weight: 600; }
.overvalued { color: var(--red); }
.market-count {
    background: var(--bg-darkest);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.82em;
    color: var(--text-muted);
}

/* ===== MODAL (shared by item insights + player insights) ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.75);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 32px;
    width: 1100px;
    max-width: 95vw;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.modal-header h3 { font-family: 'Cinzel', serif; }
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5em;
    cursor: pointer;
    padding: 4px 8px;
}
.modal-close:hover { color: var(--text-bright); }

.modal-prices {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.modal-price-card {
    background: var(--bg-darkest);
    padding: 10px 8px;
    border-radius: 6px;
    text-align: center;
}
.modal-price-label {
    font-size: 0.65em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.modal-price-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95em;
    color: var(--text-bright);
    margin-top: 3px;
}
.modal-price-value .coin { width: 11px; height: 11px; }
.history-chart-container { height: 220px; }

/* Item analytics section */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}
.analytics-card {
    background: var(--bg-darkest);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
}
.analytics-card-title {
    font-size: 0.7em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.analytics-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    font-size: 0.82em;
}
.analytics-label { color: var(--text-muted); }
.analytics-value {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-bright);
}
.analytics-value .coin { width: 11px; height: 11px; }
.analytics-value.positive { color: var(--green); }
.analytics-value.negative { color: var(--red); }
.analytics-value.gold { color: var(--gold); }
.analytics-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 4px 0;
}
.trade-summary {
    margin-top: 12px;
}
.trade-summary-title {
    font-family: 'Cinzel', serif;
    font-size: 0.85em;
    color: var(--text-bright);
    margin-bottom: 8px;
}
.trade-table {
    width: 100%;
    font-size: 0.82em;
}
.trade-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border);
}
.trade-table td {
    padding: 5px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.trade-table .coin { width: 11px; height: 11px; }

/* Player insight modal */
.player-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.player-stat {
    background: var(--bg-darkest);
    padding: 12px;
    border-radius: 6px;
}
.player-stat-label {
    font-size: 0.7em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.player-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1em;
    color: var(--text-bright);
    margin-top: 3px;
}
.player-items-table {
    font-size: 0.85em;
    margin-top: 12px;
}

/* ===== SCROLLBAR ===== */
.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-track { background: transparent; }
.modal-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ===== NO-DATA ===== */
.no-data {
    text-align: center;
    color: var(--text-muted);
    padding: 24px;
    font-style: italic;
}

/* ===== DATA TOOLTIPS ===== */
[data-tip] { cursor: help; }
#dtip {
    position: fixed; display: none;
    background: #1a2332; color: #c9d1d9; border: 1px solid #3d4f65;
    border-radius: 6px; padding: 10px 14px; font-size: 13px;
    font-family: 'Inter', sans-serif; font-weight: 400; text-transform: none;
    letter-spacing: 0; line-height: 1.45;
    white-space: normal; max-width: 300px;
    z-index: 100000; pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* ===== TSM ACTION BUTTONS ===== */
.tsm-action-btn {
    display: flex; flex-direction: column; align-items: flex-start;
    background: var(--bg-card-alt); border: 1px solid var(--border); border-radius: 8px;
    padding: 16px 20px; cursor: pointer; transition: all 0.2s ease;
    text-align: left; color: var(--text); width: 100%;
}
.tsm-action-btn:hover {
    border-color: #d4a017; background: rgba(212, 160, 23, 0.06);
    transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.tsm-action-btn:active { transform: translateY(0); }
.tsm-action-title {
    font-family: 'Cinzel', serif; font-size: 0.95em; font-weight: 600;
    color: #d4a017; margin-bottom: 4px;
}
.tsm-action-desc {
    font-size: 0.78em; color: var(--text-muted); line-height: 1.4;
}
.tsm-action-last {
    font-size: 0.7em; color: var(--text-muted); opacity: 0.6;
    margin-top: 6px; font-style: italic;
}
.tsm-action-last:empty { display: none; }
.tsm-console {
    background: #0d1117; border: 1px solid var(--border); border-radius: 6px;
    padding: 12px 16px; font-family: 'JetBrains Mono', monospace; font-size: 0.78em;
    color: #8b949e; min-height: 48px; max-height: 200px; overflow-y: auto;
    white-space: pre-wrap; line-height: 1.5;
}
.tsm-refresh-btn {
    background: var(--bg-card-alt); border: 1px solid var(--border); border-radius: 6px;
    padding: 6px 14px; cursor: pointer; color: var(--text-muted); font-size: 0.82em;
    font-family: 'Inter', sans-serif; transition: all 0.15s ease;
}
.tsm-refresh-btn:hover { border-color: #d4a017; color: #d4a017; }

/* ===== DEV TODO & CHANGELOG ===== */
.dev-todo-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    background: var(--bg-card-alt); border-radius: 6px; margin-bottom: 6px;
    border: 1px solid var(--border); transition: opacity 0.2s;
}
.dev-todo-item.done { opacity: 0.5; }
.dev-todo-item.done .dev-todo-text { text-decoration: line-through; color: var(--text-muted); }
.dev-todo-check {
    width: 18px; height: 18px; cursor: pointer; accent-color: #3fb950; flex-shrink: 0;
}
.dev-todo-text {
    flex: 1; color: var(--text-primary); font-size: 0.9em; line-height: 1.4;
    border: none; background: transparent; outline: none; font-family: inherit;
}
.dev-todo-text:focus { border-bottom: 1px solid var(--gold); }
.dev-todo-status {
    font-size: 0.7em; padding: 2px 8px; border-radius: 10px; font-weight: 600;
    white-space: nowrap; cursor: pointer; border: none;
}
.dev-todo-status.pending { background: #30363d; color: #8b949e; }
.dev-todo-status.in-progress { background: #1a3a2a; color: #3fb950; }
.dev-todo-status.done { background: #1a2332; color: #58a6ff; }
.dev-todo-del {
    background: none; border: none; color: #f85149; cursor: pointer; font-size: 1.1em;
    opacity: 0.4; transition: opacity 0.15s; padding: 0 4px;
}
.dev-todo-del:hover { opacity: 1; }
.dev-changelog-entry {
    display: flex; gap: 12px; padding: 8px 12px;
    border-left: 3px solid var(--gold); margin-bottom: 6px;
    background: var(--bg-card-alt); border-radius: 0 6px 6px 0;
}
.dev-changelog-ts {
    font-size: 0.75em; color: var(--text-muted); white-space: nowrap;
    font-family: 'JetBrains Mono', monospace; min-width: 130px;
}
.dev-changelog-msg { font-size: 0.88em; color: var(--text-primary); flex: 1; }
.dev-changelog-del {
    background: none; border: none; color: #f85149; cursor: pointer; font-size: 0.9em;
    opacity: 0.3; transition: opacity 0.15s; padding: 0 4px; flex-shrink: 0;
}
.dev-changelog-del:hover { opacity: 1; }

/* ===== TSM CONFIG VIEWER ===== */
.tsm-search-input {
    background: var(--bg-card-alt); border: 1px solid var(--border); border-radius: 6px;
    padding: 6px 12px; color: var(--text); font-size: 0.85em; font-family: 'Inter', sans-serif;
    outline: none; min-width: 200px;
}
.tsm-search-input:focus { border-color: #d4a017; }
.tsm-sources-table { width: 100%; border-collapse: collapse; font-size: 0.85em; }
.tsm-sources-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tsm-sources-table td:first-child {
    font-weight: 600; color: #d4a017; font-family: 'JetBrains Mono', monospace;
    white-space: nowrap; width: 140px;
}
.tsm-sources-table td:last-child {
    font-family: 'JetBrains Mono', monospace; font-size: 0.92em; color: #c9d1d9;
}
.tsm-formula { color: #79c0ff; }
.tsm-op-type {
    margin-bottom: 8px;
}
.tsm-op-type-header {
    display: flex; align-items: center; gap: 8px; padding: 10px 14px;
    background: var(--bg-card-alt); border: 1px solid var(--border); border-radius: 6px;
    cursor: pointer; user-select: none; transition: all 0.15s ease;
}
.tsm-op-type-header:hover { border-color: #3d4f65; }
.tsm-op-type-header .arrow { transition: transform 0.2s ease; font-size: 0.7em; color: var(--text-muted); }
.tsm-op-type-header.open .arrow { transform: rotate(90deg); }
.tsm-op-type-header .type-name { font-weight: 600; color: var(--text); }
.tsm-op-type-header .type-count { color: var(--text-muted); font-size: 0.85em; }
.tsm-op-list { display: none; padding: 8px 0 0 16px; }
.tsm-op-type.open .tsm-op-list { display: block; }
.tsm-op-card {
    background: var(--bg-card-alt); border: 1px solid var(--border); border-radius: 6px;
    padding: 12px 16px; margin-bottom: 8px;
}
.tsm-op-card-name {
    font-weight: 600; color: #d4a017; font-size: 0.92em; margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
}
.tsm-op-settings {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 16px;
    font-size: 0.82em;
}
.tsm-op-setting { display: flex; gap: 6px; padding: 2px 0; }
.tsm-op-setting-key { color: var(--text-muted); min-width: 160px; }
.tsm-op-setting-val { color: #c9d1d9; font-family: 'JetBrains Mono', monospace; }
.tsm-op-setting-val.is-formula { color: #79c0ff; }
.tsm-group-card {
    background: var(--bg-card-alt); border: 1px solid var(--border); border-radius: 6px;
    margin-bottom: 8px; overflow: hidden;
}
.tsm-group-header {
    display: flex; align-items: center; gap: 8px; padding: 10px 14px;
    cursor: pointer; user-select: none; transition: all 0.15s ease;
}
.tsm-group-header:hover { background: rgba(255,255,255,0.02); }
.tsm-group-header .arrow { transition: transform 0.2s ease; font-size: 0.7em; color: var(--text-muted); }
.tsm-group-header.open .arrow { transform: rotate(90deg); }
.tsm-group-name { font-weight: 600; color: var(--text); flex: 1; }
.tsm-group-item-count { color: var(--text-muted); font-size: 0.82em; margin-right: 8px; }
.tsm-group-op-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tsm-op-tag {
    font-size: 0.7em; padding: 2px 8px; border-radius: 10px; font-weight: 600;
    white-space: nowrap;
}
.tsm-op-tag-shopping { background: rgba(46,160,67,0.15); color: #3fb950; border: 1px solid rgba(46,160,67,0.3); }
.tsm-op-tag-auctioning { background: rgba(212,160,23,0.15); color: #d4a017; border: 1px solid rgba(212,160,23,0.3); }
.tsm-op-tag-sniper { background: rgba(163,53,238,0.15); color: #bc8cff; border: 1px solid rgba(163,53,238,0.3); }
.tsm-op-tag-crafting { background: rgba(0,112,221,0.15); color: #58a6ff; border: 1px solid rgba(0,112,221,0.3); }
.tsm-op-tag-vendoring { background: rgba(139,148,158,0.15); color: #8b949e; border: 1px solid rgba(139,148,158,0.3); }
.tsm-op-tag-mailing { background: rgba(139,148,158,0.15); color: #8b949e; border: 1px solid rgba(139,148,158,0.3); }
.tsm-op-tag-warehousing { background: rgba(139,148,158,0.15); color: #8b949e; border: 1px solid rgba(139,148,158,0.3); }
.tsm-group-body { display: none; padding: 0 14px 14px; border-top: 1px solid var(--border); }
.tsm-group-card.open .tsm-group-body { display: block; }
.tsm-group-ops-detail {
    font-size: 0.82em; margin-top: 10px;
}
.tsm-group-ops-detail table { width: 100%; border-collapse: collapse; }
.tsm-group-ops-detail td { padding: 4px 8px; }
.tsm-group-ops-detail td:first-child { color: var(--text-muted); width: 100px; }
.tsm-group-ops-detail td:last-child { color: #d4a017; font-family: 'JetBrains Mono', monospace; }
.tsm-items-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px;
    margin-top: 10px; font-size: 0.82em;
}
.tsm-item-entry {
    display: flex; align-items: center; gap: 4px; padding: 3px 6px;
    border-radius: 4px; background: rgba(0,0,0,0.15);
}
.tsm-item-entry img { width: 18px; height: 18px; border-radius: 2px; flex-shrink: 0; }
.tsm-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q0 { color: #9d9d9d; } .q1 { color: #ffffff; } .q2 { color: #1eff00; }
.q3 { color: #0070dd; } .q4 { color: #a335ee; } .q5 { color: #ff8000; }

/* ===== KEYBOARD NAVIGATION ===== */
#marketBody tr.kb-highlight { background: var(--bg-hover); outline: 1px solid var(--gold); }

/* ===== GLOBAL SEARCH ===== */
.global-search-wrap {
    position: relative;
    flex: 1;
    max-width: 320px;
}
.global-search-wrap input {
    width: 100%;
    padding: 7px 14px 7px 32px;
    background: var(--bg-darkest);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-bright);
    font-size: 0.85em;
    font-family: 'Inter', sans-serif;
    outline: none;
}
.global-search-wrap input:focus { border-color: var(--gold); }
.global-search-wrap::before {
    content: '\\1F50D';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85em;
    color: var(--text-muted);
    pointer-events: none;
}
.gs-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0 0 6px 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 200;
    display: none;
}
.gs-results.active { display: block; }
.gs-result {
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.85em;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.gs-result:hover { background: var(--bg-hover); }
.gs-result-type {
    font-size: 0.7em;
    padding: 1px 6px;
    border-radius: 8px;
    background: var(--bg-darkest);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== BREADCRUMB BAR ===== */
.breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    font-size: 0.78em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.breadcrumb-bar .bc-tag {
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2px 10px;
    color: var(--text-dim);
}
.breadcrumb-bar .bc-tag.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

/* ===== CONTEXTUAL HELP ===== */
.help-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    line-height: 14px;
    text-align: center;
    border-radius: 50%;
    background: var(--bg-darkest);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.7em;
    cursor: help;
    vertical-align: middle;
    margin-left: 4px;
}
.help-icon:hover { color: var(--gold); border-color: var(--gold); }

/* ===== EXPORT BUTTON ===== */
.export-btn {
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px 10px;
    font-size: 0.78em;
    font-family: 'Inter', sans-serif;
}
.export-btn:hover { color: var(--gold); border-color: var(--gold); }

/* ===== COLOR-BLIND SAFE INDICATORS ===== */
.positive::before { content: '\\25B2 '; font-size: 0.7em; }
.negative::before { content: '\\25BC '; font-size: 0.7em; }
.kpi-value.positive::before, .kpi-value.negative::before { content: ''; }
.coin-value .positive::before, .coin-value .negative::before { content: ''; }

/* ===== VIRTUAL SCROLL SENTINEL ===== */
.vs-sentinel { height: 1px; margin: 0; padding: 0; }

/* ===== ALERT RULES ===== */
.alert-rule { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 0.82em; }
.alert-rule input, .alert-rule select {
    background: var(--bg-darkest); border: 1px solid var(--border); border-radius: 4px;
    color: var(--text); padding: 3px 6px; font-size: 0.9em; font-family: 'Inter', sans-serif;
}
.alert-triggered { background: rgba(212,160,23,0.15); border-left: 3px solid var(--gold); padding: 6px 10px; border-radius: 4px; margin-bottom: 4px; font-size: 0.82em; }

/* ===== SORTABLE TABLE HEADERS ===== */
th.sortable { cursor: pointer; user-select: none; position: relative; white-space: nowrap; }
th.sortable:hover { color: var(--gold); }
th.sortable::after { content: ' \\2195'; font-size: 0.7em; opacity: 0.4; }
th.sortable.sort-asc::after { content: ' \\25B2'; opacity: 0.9; color: var(--gold); font-size: 0.7em; }
th.sortable.sort-desc::after { content: ' \\25BC'; opacity: 0.9; color: var(--gold); font-size: 0.7em; }
/* ===== TABLE ROW HOVER & ZEBRA ===== */
table tbody tr:nth-child(even) { background: rgba(255,255,255,0.015); }
table tbody tr:hover { background: rgba(212,160,23,0.08); }
/* ===== ROW COUNT BADGE ===== */
.row-count { font-size: 0.75em; color: var(--text-muted); font-weight: 400; margin-left: 8px; }
/* ===== CLICKABLE ROW ===== */
tr.clickable-row { cursor: pointer; transition: background 0.15s; }
tr.clickable-row:hover { background: rgba(212,160,23,0.12) !important; }
/* ===== SCROLL TO TOP BUTTON ===== */
#scrollTopBtn:hover { transform: scale(1.1); opacity: 0.9; }
/* ===== SEARCH CLEAR BUTTON ===== */
.search-clear:hover { color: var(--text-bright) !important; }
/* ===== TABLE IMPROVEMENTS ===== */
table thead th { padding: 10px 12px; text-align: left; font-size: 0.82em; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-dim); border-bottom: 2px solid var(--border); }
table tbody td { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
/* ===== CARD TRANSITION ===== */
.card { transition: box-shadow 0.2s; }
.card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
/* ===== LAST UPDATED INDICATOR ===== */
.last-updated { font-size: 0.72em; color: var(--text-muted); font-style: italic; text-align: right; padding: 4px 0; }

/* ===== COMPARE MODE ===== */
.compare-check {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    accent-color: var(--gold);
    cursor: pointer;
}
.compare-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border-top: 2px solid var(--gold);
    padding: 10px 20px;
    z-index: 150;
    font-size: 0.85em;
    justify-content: center;
    align-items: center;
    gap: 12px;
}
.compare-bar.active { display: flex; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .chart-row { grid-template-columns: 1fr; }
    .tabs { overflow-x: auto; flex-wrap: nowrap; }
    .tab { padding: 10px 16px; font-size: 0.78em; white-space: nowrap; }
    .modal-content { padding: 16px; width: 95vw; }
    .modal-prices { grid-template-columns: repeat(3, 1fr); }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .header { flex-direction: column; gap: 8px; }
    .header-gold { text-align: left; }
    .global-search-wrap { max-width: 100%; }
    .market-filters { flex-direction: column; }
    .analytics-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
    .container { padding: 0 8px 20px; }
    .tab { padding: 8px 10px; font-size: 0.72em; }
    .kpi-grid { grid-template-columns: 1fr; }
    .modal-prices { grid-template-columns: repeat(2, 1fr); }
}

/* System Health Panel */
.health-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-card-alt);
    border-radius: 6px;
}
.health-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #555;
}
.health-dot.ok { background: #2ecc71; box-shadow: 0 0 6px rgba(46,204,113,0.4); }
.health-dot.warning { background: #f39c12; box-shadow: 0 0 6px rgba(243,156,18,0.4); }
.health-dot.error { background: #e74c3c; box-shadow: 0 0 6px rgba(231,76,60,0.4); }
.health-dot.off { background: #555; }
