        /* X1 Design System - CSS Variables */
        :root {
            /* Typography - Using Inter (Google Fonts) */
            --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

            /* Primary Colors */
            --color-primary: #0168E5;
            --color-primary-hover: #0776EE;
            --color-primary-highlight: #0185FF;
            --color-primary-backdrop: rgba(1, 104, 229, 0.16);

            /* Backgrounds */
            --color-bg-app: #09090B;
            --color-bg-card: #111317;
            --color-bg-item: #1A1D21;

            /* System States */
            --color-success: #6BCB77;
            --color-error: #FF6B6B;
            --color-warning: #FFD93D;

            /* Text */
            --color-text-primary: #FFFFFF;
            --color-text-secondary: #E4E4E7;
            --color-text-helper: #9CA3AF;
            --color-text-disabled: #6B7280;

            /* Strokes */
            --color-stroke-outside: #1B1E23;
            --color-stroke-inside: #16181D;
            --color-stroke-input: #262A30;
            --color-stroke-light: #353A42;

            /* Spacing */
            --space-xs: 4px;
            --space-sm: 8px;
            --space-md: 12px;
            --space-lg: 16px;
            --space-xl: 20px;
            --space-2xl: 24px;
            --space-3xl: 32px;
            --space-4xl: 48px;

            /* Border Radius */
            --radius-sm: 4px;
            --radius-md: 6px;
            --radius-lg: 8px;
            --radius-xl: 12px;
            --radius-2xl: 16px;
            --radius-full: 9999px;

            /* Transitions */
            --transition-fast: 150ms ease-in-out;
            --transition-medium: 250ms ease-in-out;
            --transition-slow: 350ms ease-in-out;
        }

        /* Base Styles */

        body {
            font-family: var(--font-family);
            background: var(--color-bg-app);
            color: var(--color-text-primary);
            min-height: 100vh;
            min-width: 1200px;
            overflow-x: auto;
        }

        /* Cards */
        .stat-card {
            background: var(--color-bg-card);
            border: 1px solid var(--color-stroke-outside);
            border-radius: var(--radius-xl);
            padding: var(--space-xl) var(--space-2xl);
            transition: transform var(--transition-fast), box-shadow var(--transition-fast);
        }

        .stat-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }

        /* Animations */
        .pulse-dot {
            animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .blink-dot {
            animation: blink 2s ease-in-out infinite;
        }

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

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Typography */
        .metric-value {
            font-family: var(--font-family);
            font-size: clamp(1.5rem, 4vw, 2.5rem);
            font-weight: 700;
            color: var(--color-text-primary);
        }

        .section-title {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--color-text-primary);
            margin-bottom: var(--space-2xl);
            display: flex;
            align-items: center;
            gap: var(--space-sm);
        }

        /* Loading States */
        .loading-spinner {
            border: 4px solid var(--color-primary-backdrop);
            border-top-color: var(--color-primary);
            border-radius: 50%;
            width: 60px;
            height: 60px;
            animation: spin 1s linear infinite;
        }

        /* Status & Badges */
        .glow {
            box-shadow: 0 0 15px var(--color-primary-backdrop);
        }

        .alert-critical {
            animation: alertPulse 1.5s ease-in-out infinite;
        }

        @keyframes alertPulse {
            0%, 100% { background-color: rgba(255, 107, 107, 0.2); }
            50% { background-color: rgba(255, 107, 107, 0.4); }
        }

        .comparison-badge {
            display: inline-flex;
            align-items: center;
            padding: var(--space-xs) var(--space-md);
            border-radius: var(--radius-md);
            font-size: 0.75rem;
            font-weight: 600;
        }

        .comparison-badge.better {
            background-color: rgba(107, 203, 119, 0.16);
            color: var(--color-success);
        }

        .comparison-badge.worse {
            background-color: rgba(255, 107, 107, 0.16);
            color: var(--color-error);
        }

        /* Charts */
        .chart-container {
            position: relative;
            height: 300px;
            width: 100%;
        }

        /* Tailwind Class Overrides for X1 Design System */
        /* Text colors - map emerald to primary blue */
        .text-emerald-300, .text-emerald-400, .text-emerald-500 {
            color: var(--color-primary) !important;
        }

        /* Text colors - map gray hierarchy to X1 text colors */
        .text-gray-100 {
            color: var(--color-text-primary) !important;
        }

        .text-gray-200, .text-gray-300 {
            color: var(--color-text-secondary) !important;
        }

        .text-gray-400 {
            color: var(--color-text-helper) !important;
        }

        .text-gray-500, .text-gray-600 {
            color: var(--color-text-disabled) !important;
        }

        /* Text colors - system states */
        .text-red-400, .text-red-500 {
            color: var(--color-error) !important;
        }

        .text-yellow-400 {
            color: var(--color-warning) !important;
        }

        .text-green-400, .text-green-500 {
            color: var(--color-success) !important;
        }

        /* Background colors - slate to X1 backgrounds */
        .bg-slate-700 {
            background-color: var(--color-bg-item) !important;
        }

        .bg-slate-800, .bg-slate-900 {
            background-color: var(--color-bg-card) !important;
        }

        /* Background colors - emerald to primary */
        .bg-emerald-500, .bg-emerald-600 {
            background-color: var(--color-primary) !important;
        }

        /* Background colors - system states with opacity */
        .bg-red-900.bg-opacity-30 {
            background-color: rgba(255, 107, 107, 0.16) !important;
        }

        .bg-yellow-900.bg-opacity-20 {
            background-color: rgba(255, 217, 61, 0.16) !important;
        }

        .bg-emerald-900\/20 {
            background-color: rgba(1, 104, 229, 0.16) !important;
        }

        /* Border colors - emerald to primary */
        .border-emerald-500\/30,
        .border-emerald-500\/50 {
            border-color: var(--color-primary-backdrop) !important;
        }

        .border-emerald-500, .border-emerald-600 {
            border-color: var(--color-primary) !important;
        }

        /* Border colors - gray to X1 strokes */
        .border-gray-600 {
            border-color: var(--color-stroke-input) !important;
        }

        .border-gray-700 {
            border-color: var(--color-stroke-outside) !important;
        }

        .border-gray-800 {
            border-color: var(--color-stroke-inside) !important;
        }

        /* Border colors - system states */
        .border-red-500, .border-red-600 {
            border-color: var(--color-error) !important;
        }

        .border-yellow-500, .border-yellow-500\/50 {
            border-color: var(--color-warning) !important;
        }


        /* Purple colors - map to X1 colors */
        .text-purple-300, .text-purple-400, .text-purple-500 {
            color: var(--color-text-secondary) !important;
        }

        .border-purple-500\/30, .border-purple-500\/50 {
            border-color: var(--color-stroke-outside) !important;
        }

        /* Responsive */
        @media (max-width: 640px) {
            .chart-container {
                height: 250px;
            }
            .section-title {
                font-size: 1.25rem;
            }
        }

        /* Network Map Styles */
        #networkView {
            margin-top: -32px;
            padding: 0 !important;
            min-width: 1200px;
            margin-left: calc(-50vw + 50%);
            margin-right: calc(-50vw + 50%);
        }

        /* Map section */
        #networkView > section:first-child {
            width: 100%;
            min-width: 1200px;
            padding: 0;
            margin-bottom: 0;
        }

        #networkMapWrapper {
            position: relative;
            width: 100%;
            min-width: 1200px;
        }

        #networkMap {
            min-width: 1200px !important;
            width: 100%;
            height: calc(100vh - 180px);
            border-radius: 0;
            border: none;
            background: #111934;
        }

        #mapOverlayTitle {
            position: absolute;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--color-text-primary);
            background: rgba(9, 9, 11, 0.7);
            padding: 8px 20px;
            border-radius: var(--radius-lg);
            border: 1px solid var(--color-stroke-outside);
            z-index: 1000;
        }

        #mapOverlayLegend {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 13px;
            color: var(--color-text-helper);
            background: rgba(9, 9, 11, 0.7);
            padding: 8px 24px;
            border-radius: var(--radius-lg);
            border: 1px solid var(--color-stroke-outside);
            z-index: 1000;
        }

        /* Leaflet zoom controls positioning */
        .leaflet-top {
            top: 20px !important;
        }

        #mapOverlayLegend .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* Validator list section below map */
        #networkView > section:nth-child(2) {
            width: 100%;
            padding: 0;
        }

        /* Metrics box below legend */
        #mapMetrics {
            position: absolute;
            top: 60px;
            right: 20px;
            background: rgba(9, 9, 11, 0.7);
            padding: 12px 16px;
            border-radius: var(--radius-lg);
            border: 1px solid var(--color-stroke-outside);
            z-index: 1000;
            font-size: 12px;
        }

        #mapMetrics .metrics-title {
            color: var(--color-text-helper);
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
        }

        #mapMetrics .metric-row {
            display: flex;
            justify-content: space-between;
            gap: 24px;
            margin-bottom: 4px;
        }

        #mapMetrics .metric-label {
            color: var(--color-text-helper);
        }

        #mapMetrics .metric-value {
            color: var(--color-text-primary);
            font-weight: 600;
        }

        /* Search Overlay (bottom right of map) */
        #mapSearchOverlay {
            position: absolute;
            bottom: 20px;
            right: 20px;
            z-index: 1000;
        }

        #mapSearchOverlay input {
            background: rgba(9, 9, 11, 0.7);
            border: 1px solid var(--color-stroke-outside);
            border-radius: var(--radius-lg);
            color: var(--color-text-primary);
            padding: 10px 14px;
            font-size: 13px;
            width: 200px;
            outline: none;
        }

        #mapSearchOverlay input:focus {
            border-color: var(--color-primary);
        }

        #mapSearchOverlay input::placeholder {
            color: var(--color-text-helper);
        }

        /* Current Leader Overlay (right of leader schedule) */
        #currentLeaderOverlay {
            position: absolute;
            bottom: 50px;
            left: 360px;
            width: 320px;
            background: rgba(9, 9, 11, 0.7);
            border: 1px solid var(--color-stroke-outside);
            border-radius: var(--radius-lg);
            z-index: 1000;
            padding: 16px;
        }

        .current-leader-title {
            font-size: 11px;
            font-weight: 600;
            color: var(--color-text-helper);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 12px;
        }

        .current-leader-main {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
        }

        .current-leader-icon {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: var(--color-primary);
            flex-shrink: 0;
            object-fit: cover;
        }

        .current-leader-icon-placeholder {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--color-primary), #0185FF);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            font-weight: 600;
            color: white;
            flex-shrink: 0;
        }

        .current-leader-info {
            flex: 1;
            min-width: 0;
        }

        .current-leader-name {
            font-size: 16px;
            font-weight: 600;
            color: var(--color-text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .current-leader-slot {
            font-size: 12px;
            color: var(--color-text-helper);
            margin-top: 2px;
        }

        /* 4 Slot Bars - CSS Animation Based (can't be interrupted by JS) */
        .slot-bars {
            display: flex;
            gap: 6px;
            margin-bottom: 16px;
        }

        .slot-bar {
            flex: 1;
            height: 8px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            overflow: hidden;
            position: relative;
        }

        /* CSS Keyframe animation for bar fill */
        @keyframes fillBar {
            0% { background: rgba(255, 255, 255, 0.1); }
            100% { background: #0168E5; }
        }

        /* When .animating class is on container, each bar fills with CSS delay */
        .slot-bars.animating .slot-bar:nth-child(1) {
            animation: fillBar 0.01s ease-out forwards;
            animation-delay: 0ms;
        }
        .slot-bars.animating .slot-bar:nth-child(2) {
            animation: fillBar 0.01s ease-out forwards;
            animation-delay: 350ms;
        }
        .slot-bars.animating .slot-bar:nth-child(3) {
            animation: fillBar 0.01s ease-out forwards;
            animation-delay: 700ms;
        }
        .slot-bars.animating .slot-bar:nth-child(4) {
            animation: fillBar 0.01s ease-out forwards;
            animation-delay: 1050ms;
        }

        /* Upcoming Leaders */
        .upcoming-leaders {
            display: flex;
            align-items: center;
            gap: 8px;
            padding-top: 12px;
            border-top: 1px solid var(--color-stroke-outside);
        }

        .upcoming-label {
            font-size: 10px;
            color: var(--color-text-helper);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            white-space: nowrap;
        }

        .upcoming-icons {
            display: flex;
            gap: 4px;
            flex: 1;
            justify-content: flex-end;
        }

        .upcoming-icon {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: var(--color-primary);
            border: 1px solid var(--color-stroke-outside);
            object-fit: cover;
            opacity: 0.7;
            transition: opacity 0.2s, transform 0.2s;
        }

        .upcoming-icon:hover {
            opacity: 1;
            transform: scale(1.1);
        }

        .upcoming-icon-placeholder {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--color-primary), #0185FF);
            border: 1px solid var(--color-stroke-outside);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 600;
            color: white;
            opacity: 0.7;
        }

        /* Block Production Overlay (right of Current Leader) */
        #blockProductionOverlay {
            position: absolute;
            bottom: 50px;
            left: 700px;
            width: 280px;
            background: rgba(9, 9, 11, 0.7);
            border: 1px solid var(--color-stroke-outside);
            border-radius: var(--radius-lg);
            z-index: 1000;
            padding: 14px 16px;
        }

        .block-prod-title {
            font-size: 11px;
            font-weight: 600;
            color: var(--color-text-helper);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 12px;
        }

        .block-prod-chart {
            display: flex;
            align-items: flex-end;
            gap: 2px;
            height: 60px;
            margin-bottom: 12px;
        }

        .epoch-bar {
            flex: 1;
            display: flex;
            flex-direction: column;
            border-radius: 2px;
            overflow: hidden;
            cursor: pointer;
            transition: opacity 0.2s;
        }

        .epoch-bar:hover {
            opacity: 0.8;
        }

        .bar-prod {
            background: #0168E5;
            width: 100%;
        }

        .bar-skip {
            background: #ef4444;
            width: 100%;
        }

        .block-prod-stats {
            font-size: 11px;
            color: var(--color-text-secondary);
        }

        .block-prod-row {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 3px;
        }

        .block-prod-row:last-child {
            margin-bottom: 0;
        }

        .prod-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #0168E5;
        }

        .skip-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #ef4444;
        }

        /* Leader Schedule Overlay (left side, above bottom) */
        #leaderScheduleOverlay {
            position: absolute;
            bottom: 50px;
            left: 20px;
            width: 320px;
            background: rgba(9, 9, 11, 0.7);
            border: 1px solid var(--color-stroke-outside);
            border-radius: var(--radius-lg);
            z-index: 1000;
            overflow: visible;
        }

        .leader-schedule-header {
            font-size: 11px;
            color: var(--color-text-helper);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 10px 14px;
            border-bottom: 1px solid var(--color-stroke-outside);
        }

        #leaderScheduleTable {
            width: 100%;
            border-collapse: collapse;
            font-size: 12px;
            display: block;
        }

        #leaderScheduleTable thead,
        #leaderScheduleTable tbody {
            display: block;
        }

        #leaderScheduleTable tbody {
            max-height: none;
            overflow-y: visible;
        }

        #leaderScheduleTable tbody tr:last-child td {
            padding-bottom: 10px;
        }

        #leaderScheduleTable tr {
            display: table;
            width: 100%;
            table-layout: fixed;
        }

        /* Column widths: Slot (narrow), Leader (wide), Time (narrow) */
        #leaderScheduleTable th:nth-child(1),
        #leaderScheduleTable td:nth-child(1) {
            width: 70px;
        }
        #leaderScheduleTable th:nth-child(2),
        #leaderScheduleTable td:nth-child(2) {
            width: 150px;
        }
        #leaderScheduleTable th:nth-child(3),
        #leaderScheduleTable td:nth-child(3) {
            width: 90px;
            text-align: right;
            white-space: nowrap;
        }

        /* Pink = fake/estimated data */
        #leaderScheduleTable td.fake-data {
            color: #FF69B4;
        }

        #leaderScheduleTable thead th {
            padding: 8px 12px;
            text-align: left;
            font-weight: 500;
            color: var(--color-text-helper);
            border-bottom: 1px solid var(--color-stroke-outside);
        }

        #leaderScheduleTable tbody td {
            padding: 6px 12px;
            color: var(--color-text-secondary);
            border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        }

        #leaderScheduleTable tbody tr:hover {
            background: rgba(255, 255, 255, 0.03);
        }

        #leaderScheduleTable tbody tr.current-slot td {
            color: var(--color-text-primary);
            font-weight: 600;
        }

        #leaderScheduleTable .leader-cell {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        #leaderScheduleTable .leader-icon {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: var(--color-primary);
        }

        #leaderScheduleTable .leader-name {
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .leaflet-container {
            background: #111934 !important;
            border-radius: 0;
        }

        .leaflet-control-attribution {
            display: none !important;
        }

        /* Leaflet popup styling to match dark theme */
        .leaflet-popup-content-wrapper {
            background: rgba(9, 9, 11, 0.9);
            border: 1px solid var(--color-stroke-outside);
            border-radius: var(--radius-lg);
            color: var(--color-text-primary);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
        }

        .leaflet-popup-content {
            margin: 12px 14px;
            font-family: var(--font-family);
        }

        .leaflet-popup-tip {
            background: rgba(9, 9, 11, 0.9);
            border: 1px solid var(--color-stroke-outside);
            box-shadow: none;
        }

        .leaflet-popup-close-button {
            color: var(--color-text-secondary) !important;
            font-size: 18px !important;
            padding: 6px 8px 0 0 !important;
        }

        .leaflet-popup-close-button:hover {
            color: var(--color-text-primary) !important;
        }

        /* Leader popup */
        .leader-popup .leaflet-popup-content-wrapper {
            border: 1px solid var(--color-stroke-outside);
            background: rgba(9, 9, 11, 0.95);
            min-width: fit-content;
        }

        .leader-popup .leaflet-popup-content {
            white-space: nowrap;
            width: auto !important;
            min-width: 200px;
            max-width: none !important;
        }

        .leader-popup .leaflet-popup-tip {
            background: rgba(9, 9, 11, 0.95);
        }

        .validator-marker {
            background: var(--color-primary);
            border: 2px solid var(--color-primary-highlight);
            border-radius: 50%;
            width: 12px;
            height: 12px;
        }

        /* Cluster count label - centers text on marker */
        .cluster-count-label {
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent !important;
            border: none !important;
        }

        /* Leaflet.markercluster custom styling - blue theme */
        .marker-cluster {
            background: rgba(1, 104, 229, 0.6) !important;
            border: 2px solid #0185FF !important;
        }
        .marker-cluster div {
            background: rgba(1, 104, 229, 0.9) !important;
            color: white !important;
            font-weight: 700 !important;
            font-family: var(--font-family) !important;
        }
        .marker-cluster-small {
            background: rgba(1, 104, 229, 0.6) !important;
        }
        .marker-cluster-small div {
            background: rgba(1, 104, 229, 0.9) !important;
        }
        .marker-cluster-medium {
            background: rgba(1, 104, 229, 0.6) !important;
        }
        .marker-cluster-medium div {
            background: rgba(1, 104, 229, 0.9) !important;
        }
        .marker-cluster-large {
            background: rgba(1, 104, 229, 0.6) !important;
        }
        .marker-cluster-large div {
            background: rgba(1, 104, 229, 0.9) !important;
        }

        .leader-marker {
            background: var(--color-warning);
            border: 2px solid #FFE55C;
            animation: pulse-leader 2s ease-in-out infinite;
        }

        @keyframes pulse-leader {
            0%, 100% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.3); opacity: 0.8; }
        }

        #validatorTable {
            width: 100%;
            border-collapse: collapse;
            border-spacing: 0;
        }


        #validatorTable th {
            background: var(--color-bg-item);
            color: var(--color-text-secondary);
            padding: 12px;
            text-align: left;
            font-size: 13px;
            font-weight: 600;
            border-bottom: 1px solid var(--color-stroke-outside);
            cursor: pointer;
            user-select: none;
        }

        #validatorTable th:hover {
            background: var(--color-bg-card);
            color: var(--color-primary);
        }

        /* Category header row */
        #validatorTable .category-header th {
            background: var(--color-bg-app);
            color: var(--color-primary);
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            padding: 10px 14px;
            border-bottom: none; /* Override base th border */
            text-align: center;
            cursor: pointer;
            user-select: none;
            transition: background var(--transition-fast);
        }

        #validatorTable .category-header th:hover {
            background: var(--color-bg-card);
        }

        #validatorTable .category-header th:not(:first-child) {
            border-left: 1px solid var(--color-stroke-light);
        }

        /* Column header row (second row) - blue line on bottom using inset shadow (not border - borders break with sticky + border-collapse) */
        #validatorTable thead tr:not(.category-header) th {
            box-shadow: inset 0 -2px 0 var(--color-primary);
        }

        .cat-arrow {
            font-size: 10px;
            margin-left: 4px;
            display: inline-block;
            transition: transform var(--transition-fast);
        }

        .cat-toggle.expanded .cat-arrow {
            transform: rotate(180deg);
        }

        /* Hidden columns */
        .hidden {
            display: none !important;
        }

        #validatorTable td {
            padding: 10px 12px;
            border-bottom: 1px solid var(--color-stroke-inside);
            font-size: 13px;
        }

        #validatorTable tr:hover {
            background: var(--color-bg-item);
        }

        .val-name {
            font-weight: 600;
            color: var(--color-text-primary);
        }

        .val-pubkey {
            font-family: 'Courier New', monospace;
            font-size: 12px;
            color: var(--color-text-helper);
        }

        .val-stake {
            color: var(--color-primary);
            font-weight: 600;
        }

        .val-performance {
            font-weight: 500;
        }

        .val-performance.good {
            color: var(--color-success);
        }

        .val-performance.warning {
            color: var(--color-warning);
        }

        .val-performance.poor {
            color: var(--color-error);
        }

        /* Enhanced Validator Table Styles */
        .data-missing {
            color: #FF69B4 !important;
            font-style: italic;
        }

        .data-calculated {
            color: #FFD700 !important;
        }

        .val-icon {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            margin-right: 8px;
            vertical-align: middle;
            object-fit: cover;
            background: var(--color-bg-item);
        }

        .val-icon-placeholder {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            margin-right: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: var(--color-primary);
            color: white;
            font-size: 11px;
            font-weight: 700;
            vertical-align: middle;
        }

        .val-identity {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .val-identity-main {
            flex: 1;
            min-width: 0;
        }

        .val-actions {
            display: flex;
            gap: 6px;
            opacity: 0.6;
            transition: opacity var(--transition-fast);
        }

        #validatorTable tr:hover .val-actions {
            opacity: 1;
        }

        .val-action-btn {
            cursor: pointer;
            padding: 4px;
            border-radius: var(--radius-sm);
            transition: all var(--transition-fast);
            font-size: 12px;
        }

        .val-action-btn:hover {
            background: var(--color-bg-item);
            color: var(--color-primary);
        }

        .val-status {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

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

        .val-status-dot.online {
            background: var(--color-success);
            box-shadow: 0 0 6px var(--color-success);
        }

        .val-status-dot.delinquent {
            background: var(--color-error);
            box-shadow: 0 0 6px var(--color-error);
            animation: pulse-status 1.5s infinite;
        }

        @keyframes pulse-status {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }

        .country-flag {
            font-size: 26px;
            line-height: 1;
            display: block;
            text-align: center;
        }

        /* Use flag images instead of emoji for better display */
        .flag-img {
            width: 26px;
            height: 19px;
            border-radius: 2px;
            object-fit: cover;
        }

        /* Table layout */
        #validatorTable {
            width: 100%;
            table-layout: auto;
        }

        #validatorTable th, #validatorTable td {
            white-space: nowrap;
        }

        /* Clickable cells for dropdown */
        .cell-clickable {
            cursor: pointer;
            position: relative;
            padding-right: 28px !important;
        }

        .cell-clickable:hover {
            background: var(--color-bg-card);
        }

        .cell-clickable .expand-arrow {
            display: inline-block;
            width: 0;
            height: 0;
            border-top: 5px solid transparent;
            border-bottom: 5px solid transparent;
            border-right: 6px solid var(--color-text-helper);
            opacity: 0.6;
            transition: transform var(--transition-fast), border-color var(--transition-fast);
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
        }

        .cell-clickable:hover .expand-arrow {
            opacity: 1;
            border-right-color: var(--color-primary);
        }

        .cell-clickable.open .expand-arrow {
            transform: translateY(-50%) rotate(-90deg);
            border-right-color: var(--color-primary);
            opacity: 1;
        }

        /* Flag cell - 80% of cell, centered */
        .flag-cell {
            padding: 4px !important;
            text-align: center;
            vertical-align: middle;
            height: 40px;
        }

        .flag-cell img {
            width: 32px;
            height: 32px;
            object-fit: contain;
            display: block;
            margin: 0 auto;
        }

        /* Table styling for 16 columns */
        #validatorTable th, #validatorTable td {
            padding: 8px 10px;
            font-size: 13px;
        }

        #validatorTable th {
            font-size: 12px;
        }

        /* Validator column - reduce width */
        #validatorTable th:first-child,
        #validatorTable td:first-child {
            min-width: 140px;
            max-width: 180px;
        }

        /* Expand row for category details */
        .expand-row {
            display: none;
            background: var(--color-bg-item) !important;
        }

        .expand-row.visible {
            display: table-row;
        }

        .expand-row td {
            padding: 12px 16px;
            border-bottom: 2px solid var(--color-primary);
            border-left: 3px solid var(--color-primary);
        }

        .expand-content {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
        }

        .expand-item {
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 160px;
        }

        .expand-label {
            font-size: 13px;
            color: var(--color-text-helper);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .expand-value {
            font-size: 13px;
            color: var(--color-text-primary);
            font-weight: 500;
        }

        .expand-value a {
            color: var(--color-primary);
        }

        .expand-value.clickable {
            cursor: pointer;
        }

        .expand-value.clickable:hover {
            color: var(--color-primary);
        }

        .expand-cat-title {
            font-size: 14px;
            font-weight: 700;
            color: var(--color-primary);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 8px;
        }

        /* Toast notification */
        .toast {
            position: fixed;
            bottom: 24px;
            left: 50%;
            transform: translateX(-50%) translateY(100px);
            background: var(--color-bg-item);
            color: var(--color-text-primary);
            padding: 12px 24px;
            border-radius: var(--radius-lg);
            border: 1px solid var(--color-stroke-light);
            font-size: 14px;
            z-index: 9999;
            opacity: 0;
            transition: all var(--transition-medium);
        }

        .toast.visible {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }

        /* Row number column */
        .row-num {
            color: var(--color-text-helper);
            font-size: 12px;
        }

        /* Sort indicator */
        .sort-indicator {
            margin-left: 4px;
            font-size: 10px;
        }

        /* Table wrapper - no overflow to allow sticky to work */
        .table-scroll-container {
            /* overflow breaks sticky - handled by body scroll */
        }

        /* Sticky header rows */
        #validatorTable thead {
            position: sticky;
            top: 0;
            z-index: 100;
            background: var(--color-bg-app);
        }

        #validatorTable thead tr.category-header th {
            background: var(--color-bg-app);
        }

        #validatorTable thead tr:not(.category-header) th {
            background: var(--color-bg-app);
            box-shadow: inset 0 -2px 0 var(--color-primary); /* Blue line on bottom - inset shadow works with sticky */
        }

        /* Category separator lines - vertical borders between categories */
        /* Network starts at column 3 (after Validator cols 1-2) */
        #validatorTable th:nth-child(3),
        #validatorTable td:nth-child(3) {
            border-left: 1px solid var(--color-stroke-light);
        }

        /* Stake starts at column 6 (after Network cols 3-5) */
        #validatorTable th:nth-child(6),
        #validatorTable td:nth-child(6) {
            border-left: 1px solid var(--color-stroke-light);
        }

        /* Performance starts at column 9 (after Stake cols 6-8) */
        #validatorTable th:nth-child(9),
        #validatorTable td:nth-child(9) {
            border-left: 1px solid var(--color-stroke-light);
        }

        /* Rewards starts at column 15 (after Performance cols 9-14) */
        #validatorTable th:nth-child(15),
        #validatorTable td:nth-child(15) {
            border-left: 1px solid var(--color-stroke-light);
        }

        /* Dropdown arrow positioning - at end of category */
        .cat-end-arrow {
            font-size: 8px;
            color: var(--color-text-helper);
            margin-left: 4px;
            opacity: 0.5;
            cursor: pointer;
        }

        .cat-end-arrow:hover {
            opacity: 1;
            color: var(--color-primary);
        }

        /* Responsive dropdown content - shrink with window */
        .expand-content {
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
            width: 100%;
        }

        .expand-content > div {
            flex: 1 1 auto;
            min-width: 0;
        }

        /* Stake breakdown responsive grid - 4 columns */
        .stake-grid-responsive {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 8px;
            width: 100%;
        }

        /* Fix stake breakdown box padding - minimal */
        .stake-breakdown-box {
            background: var(--color-bg-card);
            padding: 8px 10px;
            border-radius: 6px;
        }

        .stake-breakdown-box .account-list {
            margin-top: 4px;
        }

        .stake-breakdown-box .account-item {
            background: var(--color-bg-item);
            padding: 4px 6px;
            border-radius: 4px;
            margin-bottom: 3px;
            font-size: 12px;
            font-family: monospace;
        }

        .stake-breakdown-box .account-item:last-child {
            margin-bottom: 0;
        }

        .stake-breakdown-box .account-item a {
            font-size: 11px;
        }

        .stake-breakdown-box .account-item div {
            font-size: 12px;
        }

        /* Chart container in dropdown */
        .dropdown-chart-container {
            background: var(--color-bg-card);
            padding: 10px;
            border-radius: 8px;
            margin-top: 10px;
        }

        .dropdown-chart-container > div:first-child {
            font-size: 12px;
            color: var(--color-text-helper);
            margin-bottom: 6px;
        }

        .dropdown-chart-container canvas {
            width: 100% !important;
            height: 100% !important;
        }

        /* Mobile Responsive - 768px breakpoint matches navbar/appbar */
        @media (max-width: 768px) {
            /* Remove desktop min-width constraints */
            body {
                min-width: 100%;
                overflow-x: hidden;
            }

            #networkView {
                min-width: 100%;
                margin: 0;
                padding: 0;
                width: 100%;
            }

            #networkView > section:first-child,
            #networkView > section:nth-child(2) {
                min-width: 100%;
                width: 100%;
            }

            /* Map - 40vh to leave room for table */
            #networkMapWrapper,
            #networkMap {
                height: calc(40vh - 40px);
                min-height: 250px;
                min-width: 100% !important;
                width: 100% !important;
            }

            /* Hide complex overlays - too cluttered on mobile */
            #leaderScheduleOverlay,
            #blockProductionOverlay,
            #mapOverlayTitle,
            #mapSearchOverlay {
                display: none;
            }

            /* Current Leader - compact, bottom left */
            #currentLeaderOverlay {
                left: 10px;
                bottom: 10px;
                width: auto;
                max-width: 180px;
                padding: 8px 10px;
            }

            .current-leader-title {
                font-size: 9px;
                margin-bottom: 6px;
            }

            .current-leader-main {
                gap: 8px;
            }

            .current-leader-icon,
            .current-leader-icon-placeholder {
                width: 28px;
                height: 28px;
                font-size: 12px;
            }

            .current-leader-name {
                font-size: 11px;
            }

            .current-leader-slot {
                font-size: 9px;
            }

            .slot-bars {
                margin-bottom: 0;
                gap: 3px;
            }

            .slot-bar {
                height: 5px;
            }

            .upcoming-leaders {
                display: none;
            }

            /* Legend - top right, small */
            #mapOverlayLegend {
                top: 10px;
                right: 10px;
                padding: 5px 8px;
                font-size: 9px;
                gap: 6px;
                width: auto;
                justify-content: flex-start;
            }

            .legend-item {
                gap: 4px;
            }

            .validator-marker {
                width: 6px;
                height: 6px;
            }

            /* Metrics - below legend */
            #mapMetrics {
                top: 40px;
                right: 10px;
                padding: 5px 8px;
                font-size: 9px;
            }

            #mapMetrics .metrics-title {
                font-size: 8px;
                margin-bottom: 3px;
            }

            #mapMetrics .metric-row {
                gap: 8px;
                margin-bottom: 1px;
            }

            /* Table - full width container, horizontal scroll for table */
            .table-scroll-container {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                width: 100%;
            }

            #validatorTable {
                min-width: 700px;
            }

            #validatorTable th,
            #validatorTable td {
                padding: 6px 4px;
                font-size: 10px;
            }

            .category-header th {
                font-size: 8px;
                padding: 5px 4px;
            }

            /* Disable sticky header on mobile - conflicts with scroll container */
            #validatorTable thead {
                position: static;
            }

            /* Prevent iOS zoom on input focus */
            input, select, textarea {
                font-size: 16px;
            }
        }

        /* ============= LAZY LOADING IMAGES ============= */
        /* Placeholder style while image loads */
        img.lazy {
            background: #2a2a2a;
            min-width: 24px;
            min-height: 24px;
        }

        img.lazy.val-icon {
            min-width: 28px;
            min-height: 28px;
            border-radius: 50%;
        }

        img.lazy.flag-img {
            min-width: 26px;
            min-height: 19px;
            border-radius: 2px;
        }
