/**
 * Liquiplex RWA Scanner - Frontend CSS
 * Styles for Money Project visualization with RWA analysis
 * Complete world markets comparison with block visualization
 */

/* Main Container */
.liquiplex-rwa-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
}

/* Money Project Style */
.money-project-style {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #dee2e6;
}

/* Header Section */
.lrw-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.lrw-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.lrw-header p {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 15px;
}

.lrw-scale-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    color: #495057;
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-flex;
}

.scale-square {
    width: 12px;
    height: 12px;
    background: #6c757d;
    border-radius: 2px;
}

/* Loading State */
.lrw-loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #6c757d;
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Main Content Layout */
.lrw-main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Top Section: RWA Chart and Summary */
.lrw-top-section {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.lrw-rwa-chart-container {
    flex: 1;
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    text-align: center;
}

.lrw-rwa-chart-container h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.lrw-rwa-chart-container canvas {
    max-height: 300px;
    margin: 0 auto;
}

.rwa-totals {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.total-item {
    text-align: center;
}

.total-label {
    display: block;
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 5px;
}

.total-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

/* Market Summary */
.lrw-market-summary {
    flex: 1;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.lrw-market-summary h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.market-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
}

.stat-label {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

.refresh-btn {
    background: linear-gradient(45deg, #4fc3f7, #29b6f6);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 195, 247, 0.4);
}

.refresh-btn.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lrw-live-data-btn {
    display: block;
    margin-top: 10px;
    background: linear-gradient(45deg, #0277bd, #01579b);
    color: #ffffff;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.lrw-live-data-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 119, 189, 0.4);
    color: #ffffff;
    text-decoration: none;
}

/* Bottom Section: Sidebar above blocks, stacked vertically */
.lrw-bottom-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.lrw-blocks-container {
    width: 100%;
    padding: 20px;
    background: var(--lrw-card-bg, #ffffff);
    border-radius: 8px;
    border: 1px solid var(--lrw-border, #dee2e6);
    box-sizing: border-box;
}

.lrw-sidebar {
    width: 100%;
    background: var(--lrw-card-bg, #ffffff);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--lrw-border, #dee2e6);
    box-sizing: border-box;
}

/* Block Visualization — horizontal flex wrap */
.money-blocks {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.market-section {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 4px;
}

.market-block {
    position: relative;
    display: inline-block;
    border-radius: 4px;
    padding: 2px;
    margin: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.market-block:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

/* Ultra-optimized block visualization for maximum performance */
.market-block.ultra-optimized {
    position: relative;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 3px;
    overflow: visible;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.market-block.ultra-optimized:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 10;
}

/* External block label (below the block) */
.market-block-label {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: 3px;
    max-width: 480px;
}

.market-block-name {
    font-size: 11px;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.market-block-val {
    font-size: 11px;
    font-weight: 700;
    color: #495057;
    white-space: nowrap;
}

.block-tooltip.simple {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.market-block.ultra-optimized:hover .block-tooltip.simple {
    opacity: 1;
}

/* .market-value hidden — value now shown in external label */
.market-value {
    display: none;
}

.block-count {
    position: absolute;
    bottom: 20px;
    left: 4px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
}

/* .market-label (old internal) — replaced by .market-block-label */
.market-label {
    display: none;
}

/* Tooltips */
.block-tooltip {
    position: absolute;
    top: -120px;
    left: 10px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
    min-width: 200px;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.block-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 20px;
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

.block-tooltip h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
}

.block-tooltip p {
    margin: 4px 0;
}

/* Sidebar summary text — medium weight, not overpowering */
.rwa-summary {
    background: var(--lrw-subtle-bg, #f8f9fa);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid var(--lrw-border, #e9ecef);
}

.rwa-summary h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--lrw-text-muted, #6c757d);
}

.rwa-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--lrw-border, #e9ecef);
}

.rwa-stat:last-child {
    border-bottom: none;
}

.rwa-label {
    font-size: 13px;
    color: var(--lrw-text-faint, #868e96);
    font-weight: 400;
}

.rwa-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--lrw-text-muted, #6c757d);
}

/* Sidebar Categories */
.sidebar-category {
    margin-bottom: 20px;
}

.sidebar-category h4 {
    margin: 0 0 10px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--lrw-text-muted, #6c757d);
    padding-bottom: 5px;
    border-bottom: 2px solid var(--lrw-border, #e9ecef);
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.sidebar-item:hover,
.sidebar-item.highlighted {
    background: var(--lrw-hover-bg, #f0f4f8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.item-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.item-details {
    flex: 1;
}

.item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--lrw-text-muted, #6c757d);
    line-height: 1.2;
}

.item-value {
    font-size: 12px;
    color: var(--lrw-text-faint, #868e96);
    margin-top: 2px;
}

.tokenized-badge {
    background: linear-gradient(45deg, #4fc3f7, #29b6f6);
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 5px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .lrw-top-section {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .liquiplex-rwa-container {
        padding: 20px;
        margin: 10px;
    }
    
    .lrw-header h2 {
        font-size: 24px;
    }
    
    .lrw-top-section {
        gap: 20px;
    }
    
    .lrw-blocks-container {
        padding: 15px;
    }
    
    .total-value {
        font-size: 20px;
    }
    
    .stat-value {
        font-size: 14px;
    }
}

/* ================================================================
   DARK THEME — single .lrw-dark scoped block
   Applied by frontend.js when it detects dark mode from DOM signals.
   prefers-color-scheme is intentionally NOT used — the site toggle
   is the authority so OS preference cannot override it.
   ================================================================ */

.liquiplex-rwa-container.lrw-dark {
    --lrw-card-bg:    #1e1e2e;
    --lrw-subtle-bg:  #2a2a3c;
    --lrw-border:     #3a3a52;
    --lrw-text:       #e0e0f0;
    --lrw-text-muted: #b0b0c8;
    --lrw-text-faint: #8080a0;
    --lrw-hover-bg:   #2e2e42;
    background: #1e1e2e !important;
    border-color: #3a3a52 !important;
    color: #e0e0f0 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* Header */
.liquiplex-rwa-container.lrw-dark .lrw-header {
    border-bottom-color: #3a3a52 !important;
}
.liquiplex-rwa-container.lrw-dark .lrw-header h2 { color: #e0e0f0 !important; }
.liquiplex-rwa-container.lrw-dark .lrw-header p  { color: #b0b0c8 !important; }
.liquiplex-rwa-container.lrw-dark .lrw-scale-note {
    background: #2a2a3c !important;
    color: #b0b0c8 !important;
}

/* Top section cards */
.liquiplex-rwa-container.lrw-dark .lrw-rwa-chart-container,
.liquiplex-rwa-container.lrw-dark .lrw-market-summary {
    background: #1a1a2e !important;
    border-color: #3a3a52 !important;
}
.liquiplex-rwa-container.lrw-dark .lrw-rwa-chart-container h3,
.liquiplex-rwa-container.lrw-dark .lrw-market-summary h3 { color: #e0e0f0 !important; }
.liquiplex-rwa-container.lrw-dark .rwa-totals { border-color: #3a3a52 !important; }
.liquiplex-rwa-container.lrw-dark .total-label { color: #b0b0c8 !important; }
.liquiplex-rwa-container.lrw-dark .total-value { color: #e0e0f0 !important; }

/* Market summary stats */
.liquiplex-rwa-container.lrw-dark .stat-item   { border-color: #3a3a52 !important; }
.liquiplex-rwa-container.lrw-dark .stat-label  { color: #b0b0c8 !important; }
.liquiplex-rwa-container.lrw-dark .stat-value  { color: #e0e0f0 !important; }

/* Money project / blocks area */
.liquiplex-rwa-container.lrw-dark .money-project-style {
    background: #16213e !important;
    border-color: #3a3a52 !important;
}
.liquiplex-rwa-container.lrw-dark .lrw-blocks-container {
    background: #16213e !important;
    border-color: #3a3a52 !important;
}
.liquiplex-rwa-container.lrw-dark .market-block-name { color: #b0b0c8 !important; }
.liquiplex-rwa-container.lrw-dark .market-block-val  { color: #8080a0 !important; }

/* Sidebar */
.liquiplex-rwa-container.lrw-dark .lrw-sidebar {
    background: #0f3460 !important;
    border-color: #3a3a52 !important;
}
.liquiplex-rwa-container.lrw-dark .rwa-summary {
    background: #16213e !important;
    border-color: #3a3a52 !important;
}
.liquiplex-rwa-container.lrw-dark .rwa-summary h3 { color: #e0e0f0 !important; }
.liquiplex-rwa-container.lrw-dark .rwa-label       { color: #b0b0c8 !important; }
.liquiplex-rwa-container.lrw-dark .rwa-value        { color: #b0b0c8 !important; }
.liquiplex-rwa-container.lrw-dark .rwa-stat         { border-color: #3a3a52 !important; }
.liquiplex-rwa-container.lrw-dark .sidebar-category h4 {
    color: #e0e0f0 !important;
    border-color: #3a3a52 !important;
}
.liquiplex-rwa-container.lrw-dark .sidebar-item     { color: #b0b0c8 !important; }
.liquiplex-rwa-container.lrw-dark .sidebar-item:hover,
.liquiplex-rwa-container.lrw-dark .sidebar-item.highlighted {
    background: #2e2e42 !important;
}
.liquiplex-rwa-container.lrw-dark .item-name        { color: #e0e0f0 !important; }
.liquiplex-rwa-container.lrw-dark .item-value       { color: #8080a0 !important; }

/* Loading */
.liquiplex-rwa-container.lrw-dark .lrw-loading      { color: #b0b0c8 !important; }

/* Stat boxes (tokenization overview) */
.liquiplex-rwa-container.lrw-dark .lrw-stat-box {
    background: #16213e !important;
}
.liquiplex-rwa-container.lrw-dark .lrw-stat-box__pct  { color: #e0e0f0 !important; }
.liquiplex-rwa-container.lrw-dark .lrw-stat-box__val  { color: #b0b0c8 !important; }

/* RWA assets panel */
.liquiplex-rwa-container.lrw-dark .lrw-rwa-assets-panel { border-color: #3a3a52 !important; }
.liquiplex-rwa-container.lrw-dark .lrw-rwa-header-stats {
    background: #16213e !important;
}
.liquiplex-rwa-container.lrw-dark .lrw-rwa-hstat__label { color: #b0b0c8 !important; }
.liquiplex-rwa-container.lrw-dark .lrw-rwa-hstat__val   { color: #e0e0f0 !important; }
.liquiplex-rwa-container.lrw-dark .lrw-rwa-table-wrap   { border-color: #3a3a52 !important; }
.liquiplex-rwa-container.lrw-dark .lrw-rwa-table thead th {
    background: #0f3460 !important;
    color: #b0b0c8 !important;
}
.liquiplex-rwa-container.lrw-dark .lrw-rwa-table tbody tr  { border-color: #2d2d44 !important; }
.liquiplex-rwa-container.lrw-dark .lrw-rwa-table tbody tr:hover { background: #16213e !important; }
.liquiplex-rwa-container.lrw-dark .lrw-rwa-table td        { color: #e0e0f0 !important; }
.liquiplex-rwa-container.lrw-dark .lrw-rank               { color: #6c757d !important; }
.liquiplex-rwa-container.lrw-dark .lrw-coin-name          { color: #e0e0f0 !important; }
.liquiplex-rwa-container.lrw-dark .lrw-coin-symbol        { color: #8080a0 !important; }
.liquiplex-rwa-container.lrw-dark .lrw-coin-logo--empty   { background: #3a3a52 !important; }
.liquiplex-rwa-container.lrw-dark .lrw-rwa-loading        { color: #b0b0c8 !important; }

/* Light theme defaults (CSS custom properties) */
.liquiplex-rwa-container {
    --lrw-card-bg:    #ffffff;
    --lrw-subtle-bg:  #f8f9fa;
    --lrw-border:     #e9ecef;
    --lrw-text:       #212529;
    --lrw-text-muted: #6c757d;
    --lrw-text-faint: #868e96;
    --lrw-hover-bg:   #f0f4f8;
}

/* Apply theme vars to heading and text elements */
.lrw-header h2,
.lrw-rwa-chart-container h3,
.lrw-market-summary h3 {
    color: var(--lrw-text, #2c3e50);
}

.lrw-header p,
.stat-label,
.stat-value,
.total-label,
.total-value {
    color: var(--lrw-text-muted, #6c757d);
}

.lrw-rwa-chart-container,
.lrw-market-summary {
    background: var(--lrw-card-bg, #ffffff);
    border-color: var(--lrw-border, #e9ecef);
}

.money-project-style {
    background: var(--lrw-subtle-bg, #f8f9fa);
    border-color: var(--lrw-border, #dee2e6);
}

.lrw-loading {
    color: var(--lrw-text-muted, #6c757d);
}

.market-block-name {
    color: var(--lrw-text-muted, #6c757d);
}

.market-block-val {
    color: var(--lrw-text-faint, #868e96);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.scale-in {
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ================================================================
   MARKET STATS BOXES (replaces old inline-styled fallback)
   ================================================================ */

.lrw-market-stats-wrap {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 24px 0 8px;
}

.lrw-stat-box {
    flex: 1 1 150px;
    max-width: 220px;
    text-align: center;
    background: #f0f4f8;
    border-radius: 12px;
    padding: 20px 16px;
    border: 2px solid transparent;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.lrw-stat-box--traditional { border-color: #1565c0; }
.lrw-stat-box--tokenized   { border-color: #4fc3f7; cursor: pointer; }
.lrw-stat-box--crypto      { border-color: #0277bd; }

.lrw-stat-box--tokenized:hover,
.lrw-stat-box--tokenized:focus {
    box-shadow: 0 4px 16px rgba(79, 195, 247, 0.4);
    transform: translateY(-2px);
    outline: 2px solid #4fc3f7;
    outline-offset: 2px;
}

.lrw-stat-box__label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    margin-bottom: 8px;
}

.lrw-stat-box--traditional .lrw-stat-box__label { color: #1565c0; }
.lrw-stat-box--tokenized   .lrw-stat-box__label { color: #0288d1; }
.lrw-stat-box--crypto      .lrw-stat-box__label { color: #0277bd; }

.lrw-stat-box__pct {
    font-size: 32px;
    font-weight: 800;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 6px;
}

.lrw-stat-box__val {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 6px;
}

.lrw-stat-box__hint {
    font-size: 11px;
    color: #0288d1;
    margin-top: 8px;
    font-weight: 600;
}

/* ================================================================
   RWA ASSETS EXPANDABLE PANEL
   ================================================================ */

.lrw-rwa-assets-panel {
    margin-top: 24px;
    border-top: 2px solid #e9ecef;
    padding-top: 16px;
    animation: fadeIn 0.3s ease;
}

.lrw-rwa-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    color: #6c757d;
    font-size: 15px;
}

.lrw-rwa-error {
    text-align: center;
    color: #dc3545;
    padding: 20px;
    font-size: 14px;
}

/* Header stats bar (Market Cap / 24h Vol / 24h Change) */
.lrw-rwa-header-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 16px;
}

.lrw-rwa-hstat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.lrw-rwa-hstat__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin-bottom: 4px;
}

.lrw-rwa-hstat__val {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

/* Table */
.lrw-rwa-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.lrw-rwa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.lrw-rwa-table thead th {
    background: #f1f3f5;
    color: #6c757d;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.lrw-rwa-table tbody tr {
    border-bottom: 1px solid #f1f3f5;
    transition: background 0.15s ease;
}

.lrw-rwa-table tbody tr:hover { background: #f8f9fa; }
.lrw-rwa-table tbody tr:last-child { border-bottom: none; }

.lrw-rwa-table td {
    padding: 10px 12px;
    color: #2c3e50;
    vertical-align: middle;
}

.lrw-rank {
    color: #adb5bd;
    font-size: 12px;
    font-weight: 600;
    width: 36px;
}

.lrw-coin-cell {
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-width: 160px;
}

.lrw-coin-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: contain;
}

.lrw-coin-logo--empty {
    display: inline-block;
    background: #dee2e6;
}

.lrw-coin-info {
    display: flex;
    flex-direction: column;
}

.lrw-coin-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
}

.lrw-coin-symbol {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
}

.lrw-up   { color: #28a745; font-weight: 600; }
.lrw-down { color: #dc3545; font-weight: 600; }

/* (legacy dark-mode blocks removed — all dark styles are in .lrw-dark above) */

.dark-mode .lrw-rwa-hstat__val,
body.dark .lrw-rwa-hstat__val,
[data-theme="dark"] .lrw-rwa-hstat__val,
[color-scheme="dark"] .lrw-rwa-hstat__val,
.has-dark-background .lrw-rwa-hstat__val      { color: #e0e0e0; }

/* Responsive table on mobile */
@media (max-width: 640px) {
    .lrw-market-stats-wrap { gap: 10px; }
    .lrw-stat-box { min-width: 100px; padding: 14px 10px; }
    .lrw-stat-box__pct { font-size: 24px; }
    .lrw-rwa-table td, .lrw-rwa-table thead th { padding: 8px 8px; font-size: 12px; }
    .lrw-coin-cell { min-width: 120px; }
}
}