        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #000;
            color: #eee;
            padding: 20px;
        }
        .container {
            max-width: 1400px;
            margin: 0 auto;
        }
        h1 {
            color: #1890ff;
            margin-bottom: 10px;
            text-align: center;
        }
        .subtitle {
            text-align: center;
            color: #69b1ff;
            margin-bottom: 10px;
        }
        .nav-links {
            text-align: center;
            margin-bottom: 20px;
        }
        .nav-links a {
            color: #1890ff;
            text-decoration: none;
            padding: 4px 12px;
            border: 1px solid #1890ff;
            border-radius: 5px;
            font-size: 14px;
            transition: background 0.2s, color 0.2s;
        }
        .nav-links a:hover {
            background: #1890ff;
            color: #fff;
        }
        /* Pending staking requests demand operator attention (#: they
           expire 4 weeks after submission) — the requests link goes red
           whenever any exist. */
        .nav-links a.attention {
            color: #ff6b6b;
            border: 2px solid #ff6b6b;
            font-weight: 600;
            animation: attention-pulse 2s ease-in-out infinite;
        }
        .nav-links a.attention:hover {
            background: #ff6b6b;
            color: #fff;
        }
        @keyframes attention-pulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.55); }
            50% { box-shadow: 0 0 8px 2px rgba(255, 107, 107, 0.55); }
        }
        .controls {
            background: #1f1f1f;
            padding: 15px;
            border-radius: 10px;
            border: 1px solid #303030;
            margin-bottom: 20px;
            display: flex;
            gap: 10px;
            align-items: center;
        }
        .controls button {
            background: #1890ff;
            color: #fff;
            border: none;
            padding: 8px 16px;
            border-radius: 5px;
            font-weight: bold;
            cursor: pointer;
        }
        .controls button:hover {
            background: #69b1ff;
        }
        .timeline {
            background: #1f1f1f;
            padding: 20px;
            border-radius: 10px;
            border: 1px solid #303030;
            margin-bottom: 20px;
        }
        .timeline-header {
            color: #69b1ff;
            font-weight: bold;
            margin-bottom: 15px;
            font-size: 18px;
        }
        .period-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .year-section {
            background: #262626;
            border-radius: 8px;
            overflow: hidden;
        }
        .year-header {
            background: #1f1f1f;
            padding: 12px 15px;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #303030;
            transition: background 0.2s;
        }
        .year-header:hover {
            background: #303030;
        }
        .year-header.expanded {
            border-bottom-color: #1890ff;
        }
        .year-title {
            color: #1890ff;
            font-size: 18px;
            font-weight: bold;
        }
        .year-count {
            color: #69b1ff;
            font-size: 14px;
        }
        .year-toggle {
            color: #69b1ff;
            font-size: 20px;
            transition: transform 0.3s;
        }
        .year-header.expanded .year-toggle {
            transform: rotate(180deg);
        }
        .year-content {
            display: none;
            padding: 10px;
        }
        .year-content.expanded {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
            gap: 2px;
        }
        .period-card {
            background: #262626;
            padding: 3px 6px;
            border-radius: 3px;
            border: 1px solid #303030;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 4px;
            position: relative;
        }
        .period-card:hover {
            border-color: #1890ff;
            z-index: 20;
        }
        .period-actions {
            display: none;
            position: absolute;
            top: 100%;
            left: -1px;
            right: -1px;
            background: #0a1628;
            border: 1px solid #1890ff;
            border-top: none;
            border-radius: 0 0 5px 5px;
            padding: 4px 6px;
            gap: 4px;
            justify-content: center;
            flex-wrap: wrap;
            z-index: 30;
        }
        .period-card:hover .period-actions,
        .period-card.actions-open .period-actions {
            display: flex;
        }
        .period-card.has-report {
            border-color: #1890ff;
        }
        .period-card.current {
            border-color: #69b1ff;
            background: #1f1f1f;
        }
        .period-card.pre-genesis {
            opacity: 0.6;
        }
        .period-index {
            color: #69b1ff;
            font-weight: bold;
            font-size: 12px;
        }
        .period-dates {
            color: #aaa;
            font-size: 11px;
        }
        .period-status {
            display: contents;
        }
        .status-icon {
            font-size: 18px;
            font-weight: bold;
            color: #fff;
            line-height: 1;
        }
        .status-text {
            display: none;
        }
        /* Status-specific colors per specification */
        .status-genesis .status-text {
            color: #ffa500; /* Orange */
        }
        .status-completed .status-text {
            color: #28a745; /* Green */
        }
        .status-no-report .status-text {
            color: #dc3545; /* Red */
        }
        .status-current .status-text {
            color: #007bff; /* Blue */
            font-weight: bold;
        }
        .status-in-progress .status-text {
            color: #ffc107; /* Yellow/Gold */
        }
        .tx-button {
            background: #1890ff;
            color: #fff;
            border: none;
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 11px;
            font-weight: bold;
        }
        .tx-button:hover {
            background: #69b1ff;
        }
        .report-detail {
            background: #1f1f1f;
            padding: 20px;
            border-radius: 10px;
            border: 1px solid #303030;
            display: none;
        }
        .report-detail.visible {
            display: block;
        }
        .report-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        .report-title {
            color: #1890ff;
            font-size: 20px;
            font-weight: bold;
        }
        .close-btn {
            background: #ff6b6b;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 5px;
            cursor: pointer;
        }
        .report-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }
        .stat-box {
            background: #262626;
            padding: 12px;
            border-radius: 5px;
        }
        .stat-label {
            color: #69b1ff;
            font-size: 12px;
            margin-bottom: 5px;
        }
        .stat-value {
            color: #1890ff;
            font-size: 18px;
            font-weight: bold;
        }
        .accounts-table {
            background: #262626;
            padding: 15px;
            border-radius: 5px;
            overflow-x: auto;
            max-height: 500px;
            overflow-y: auto;
        }
        table {
            width: 100%;
            border-collapse: collapse;
        }
        th {
            background: #1f1f1f;
            color: #69b1ff;
            padding: 10px;
            text-align: left;
            position: sticky;
            top: 0;
            z-index: 1;
        }
        td {
            padding: 8px 10px;
            border-bottom: 1px solid #1f1f1f;
            font-size: 13px;
        }
        tr:hover {
            background: #1f1f1f;
        }
        .loading {
            text-align: center;
            padding: 40px;
            color: #69b1ff;
        }
        .error {
            background: #3d1616;
            border: 1px solid #ff4444;
            color: #ff9999;
            padding: 15px;
            border-radius: 5px;
            margin: 20px 0;
        }
        .version-label {
            color: #888;
            font-size: 10px;
            font-weight: normal;
            padding: 1px 4px;
            border-radius: 2px;
            background: rgba(255,255,255,0.05);
        }
        .err-btn {
            background: #e67e22;
            color: #fff;
            padding: 1px 5px;
            border-radius: 2px;
            font-size: 9px;
            font-weight: bold;
            cursor: pointer;
            border: none;
            line-height: 1.4;
        }
        .err-btn:hover {
            background: #f39c12;
        }
        .action-btn {
            padding: 1px 5px;
            border-radius: 2px;
            font-size: 9px;
            font-weight: bold;
            cursor: pointer;
            border: none;
            line-height: 1.4;
            color: #fff;
        }
        .hist-btn { background: #28a745; }
        .hist-btn:hover { background: #34d058; }
        .gen-btn { background: #6f42c1; }
        .gen-btn:hover { background: #8b5cf6; }
        .cmp-btn { background: #69b1ff; color: #fff; }
        .cmp-btn:hover { background: #b8ebff; }
        .bug-report-section {
            margin: 15px 0;
            padding: 15px;
            background: #262626;
            border-radius: 5px;
            border-left: 3px solid #e67e22;
        }
        .bug-report-title {
            color: #e67e22;
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 5px;
        }
        .bug-report-version {
            color: #69b1ff;
            font-size: 13px;
            margin-bottom: 15px;
        }
        .bug-item {
            margin: 12px 0;
            padding: 12px;
            background: #1f1f1f;
            border-radius: 5px;
        }
        .bug-item-title {
            color: #1890ff;
            font-weight: bold;
            margin-bottom: 6px;
        }
        .bug-item-desc {
            color: #ccc;
            font-size: 13px;
            margin-bottom: 8px;
            line-height: 1.5;
        }
        .bug-formula {
            font-family: 'IBM Plex Mono', Monaco, Menlo, Consolas, monospace;
            font-size: 12px;
            padding: 6px 10px;
            background: #0a1628;
            border-radius: 3px;
            margin: 4px 0;
        }
        .bug-formula-label {
            color: #888;
            font-size: 11px;
        }
        .bug-formula-buggy {
            color: #e74c3c;
        }
        .bug-formula-correct {
            color: #2ecc71;
        }
        .bug-rootcause {
            color: #f39c12;
            font-size: 12px;
            margin-top: 8px;
            font-style: italic;
        }
        .bug-severity-high { border-left: 3px solid #e74c3c; }
        .bug-severity-medium { border-left: 3px solid #f39c12; }
        .bug-severity-low { border-left: 3px solid #3498db; }
        .bug-severity-info { border-left: 3px solid #888; }

        /* Real-time Status Banner */
        .status-banner {
            background: linear-gradient(135deg, #1f1f1f 0%, #262626 100%);
            border: 1px solid #303030;
            border-radius: 10px;
            margin-bottom: 20px;
            overflow: hidden;
        }
        .status-banner-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 20px;
            cursor: pointer;
            transition: background 0.2s;
        }
        .status-banner-header:hover {
            background: rgba(78, 204, 163, 0.1);
        }
        .status-banner-left {
            display: flex;
            align-items: center;
            gap: 15px;
        }
        .status-banner-period {
            font-weight: bold;
            color: #1890ff;
            font-size: 16px;
        }
        .status-banner-state {
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
        }
        .status-banner-countdown {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #69b1ff;
            font-size: 14px;
        }
        .status-banner-toggle {
            color: #69b1ff;
            font-size: 18px;
            transition: transform 0.3s;
        }
        .status-banner.expanded .status-banner-toggle {
            transform: rotate(180deg);
        }
        .status-banner-details {
            display: none;
            padding: 0 20px 15px 20px;
            border-top: 1px solid #303030;
        }
        .status-banner.expanded .status-banner-details {
            display: block;
        }
        .status-detail-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 0;
            font-size: 14px;
        }
        .status-detail-icon {
            width: 20px;
            text-align: center;
        }
        .status-detail-label {
            color: #69b1ff;
            width: 120px;
        }
        .status-detail-value {
            color: #eee;
            flex-grow: 1;
        }
        /* Signature progress bar */
        .signature-progress {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 5px;
        }
        .signature-bar {
            flex-grow: 1;
            height: 8px;
            background: #0a1628;
            border-radius: 4px;
            overflow: hidden;
            max-width: 200px;
        }
        .signature-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, #1890ff, #69b1ff);
            border-radius: 4px;
            transition: width 0.3s ease;
        }
        .signature-count {
            color: #1890ff;
            font-weight: bold;
            font-size: 14px;
        }
        .authority-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 8px;
        }
        .authority-chip {
            padding: 3px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-family: 'IBM Plex Mono', Monaco, Menlo, Consolas, monospace;
        }
        .authority-chip.signed {
            background: rgba(78, 204, 163, 0.2);
            color: #1890ff;
            border: 1px solid #1890ff;
        }
        .authority-chip.pending {
            background: rgba(255, 193, 7, 0.2);
            color: #ffc107;
            border: 1px solid #ffc107;
        }
        .authority-chip.rejected {
            background: rgba(220, 53, 69, 0.2);
            color: #dc3545;
            border: 1px solid #dc3545;
        }
        .authority-chip.struck {
            background: rgba(128, 128, 128, 0.2);
            color: #888;
            border: 1px solid #888;
            text-decoration: line-through;
        }
        .signature-explorer-btn {
            display: inline-block;
            padding: 4px 10px;
            margin-top: 8px;
            background: #262626;
            color: #69b1ff;
            border: 1px solid #1890ff;
            border-radius: 4px;
            font-size: 11px;
            text-decoration: none;
            cursor: pointer;
        }
        .signature-explorer-btn:hover {
            background: #1890ff;
            color: #fff;
        }
        .rejection-warning {
            background: rgba(220, 53, 69, 0.15);
            border: 1px solid #dc3545;
            border-radius: 4px;
            padding: 8px 10px;
            margin-top: 8px;
            font-size: 12px;
            color: #ff9999;
        }
        /* State-specific colors (semantic classes from period_state.go) */
        .state-active { background: #007bff; color: #fff; }
        .state-syncing { background: #ffc107; color: #fff; }
        .state-error { background: #dc3545; color: #fff; }
        .state-ready { background: #1890ff; color: #fff; }
        .state-review { background: #fd7e14; color: #fff; }
        .state-pending { background: #ffc107; color: #fff; }
        .state-complete { background: #28a745; color: #fff; }
        /* Legacy state classes (for backwards compatibility) */
        .state-active-period { background: #007bff; color: #fff; }
        .state-sync-pending { background: #ffc107; color: #fff; }
        .state-sync-in-progress { background: #ffc107; color: #fff; }
        .state-sync-failed { background: #dc3545; color: #fff; }
        .state-pending-report { background: #fd7e14; color: #fff; }
        .state-transaction-submitted { background: #fd7e14; color: #fff; }
        .state-transaction-executed { background: #28a745; color: #fff; }
        /* SSE connection status */
        .sse-status {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 11px;
            color: #888;
        }
        .sse-indicator {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #dc3545;
        }
        .sse-indicator.connected {
            background: #28a745;
        }
        .sse-indicator.connecting {
            background: #ffc107;
            animation: pulse 1s infinite;
        }
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        /* Mobile responsive styles */
        @media (max-width: 768px) {
            body { padding: 10px; }
            h1 { font-size: 22px; }
            .subtitle { font-size: 14px; }

            /* Status banner - stack vertically */
            .status-banner-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
                padding: 12px 15px;
            }
            .status-banner-left {
                flex-wrap: wrap;
                gap: 8px;
            }
            .status-banner-period { font-size: 14px; }
            .status-banner-state { font-size: 12px; padding: 3px 10px; }
            .status-banner-countdown { font-size: 12px; }
            .status-banner-details { padding: 0 15px 12px 15px; }
            .status-detail-row {
                flex-wrap: wrap;
                gap: 5px;
            }
            .status-detail-label { width: 100px; font-size: 12px; }
            .status-detail-value { font-size: 13px; }

            /* Signature chips - wrap better */
            .signature-chips {
                gap: 4px;
            }
            .sig-chip {
                font-size: 11px;
                padding: 2px 6px;
            }

            /* Controls - wrap buttons */
            .controls {
                flex-wrap: wrap;
                padding: 10px;
                gap: 8px;
            }
            .controls button {
                padding: 6px 12px;
                font-size: 13px;
            }

            /* Period cards - larger touch targets */
            .year-content.expanded {
                grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
                gap: 4px;
            }
            .period-card {
                padding: 6px 8px;
                font-size: 13px;
            }
            .period-index { font-size: 13px; }
            .period-dates { font-size: 10px; }
            .status-icon { font-size: 16px; }

            /* Report detail - full width stats */
            .report-stats {
                grid-template-columns: 1fr 1fr;
                gap: 10px;
            }
            .stat-box { padding: 10px; }
            .stat-label { font-size: 11px; }
            .stat-value { font-size: 16px; }

            .report-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
            .report-title { font-size: 18px; }

            /* Tables - ensure horizontal scroll */
            .accounts-table {
                padding: 10px;
                max-height: 400px;
            }
            th { padding: 8px 6px; font-size: 12px; }
            td { padding: 6px; font-size: 12px; }

            /* Timeline */
            .timeline { padding: 15px; }
            .timeline-header { font-size: 16px; }
            .year-header { padding: 10px 12px; }
            .year-title { font-size: 16px; }
        }

        @media (max-width: 480px) {
            body { padding: 8px; }
            h1 { font-size: 18px; }

            /* Single column period cards on phones */
            .year-content.expanded {
                grid-template-columns: 1fr 1fr;
                gap: 3px;
            }
            .period-card {
                padding: 8px 6px;
            }

            /* Stack stats vertically */
            .report-stats {
                grid-template-columns: 1fr;
            }

            /* Compact status banner */
            .status-banner-header { padding: 10px 12px; }
            .status-banner-period { font-size: 13px; }
            .status-detail-label { width: 80px; }

            /* Action buttons - stack */
            .period-actions {
                flex-direction: column;
            }
        }
                        .accounts-scroll-container {
                            overflow-x: auto;
                            overflow-y: auto;
                            max-width: 100%;
                            max-height: 450px;
                            border: 1px solid #333;
                            border-radius: 8px;
                        }
                        .accounts-scroll-container::-webkit-scrollbar {
                            width: 12px;
                        }
                        .accounts-scroll-container::-webkit-scrollbar {
                            height: 12px;
                        }
                        .accounts-scroll-container::-webkit-scrollbar-track {
                            background: #000;
                            border-radius: 6px;
                        }
                        .accounts-scroll-container::-webkit-scrollbar-thumb {
                            background: #4a4a6e;
                            border-radius: 6px;
                        }
                        .accounts-scroll-container::-webkit-scrollbar-thumb:hover {
                            background: #5a5a8e;
                        }
                        .accounts-data-table {
                            border-collapse: separate;
                            border-spacing: 0;
                            min-width: 1600px;
                        }
                        .accounts-data-table th {
                            position: sticky;
                            top: 0;
                            background: #252545;
                            z-index: 2;
                            padding: 8px 6px;
                            border-bottom: 2px solid #4a4a6e;
                        }
                        .accounts-data-table th:first-child,
                        .accounts-data-table td:first-child {
                            position: sticky;
                            left: 0;
                            z-index: 3;
                            background: inherit;
                            border-right: 2px solid #4a4a6e;
                        }
                        .accounts-data-table th:first-child {
                            z-index: 4;
                            background: #252545;
                        }
                        .accounts-data-table tr:nth-child(odd) {
                            background: #16162e;
                        }
                        .accounts-data-table tr:nth-child(even) {
                            background: #1e1e3e;
                        }
                        .accounts-data-table tr:hover {
                            background: #2a2a5e;
                        }
                        .accounts-data-table td {
                            padding: 6px;
                            border-bottom: 1px solid #262626;
                        }

        /* Metric boxes — production staking sync page (pkg/mcpserver/webserver_reports.go). */
        .metric-box { display: inline-block; background: #262626; padding: 20px; margin: 10px 20px 10px 0; border-radius: 5px; border-left: 4px solid #1890ff; vertical-align: top; min-width: 180px; }
        .metric-box.caution { border-left-color: #ffae42; }
        .metric-box.warning { border-left-color: #ff6b6b; }
        .metric-label { color: #69b1ff; font-size: 12px; text-transform: uppercase; }
        .metric-value { color: #1890ff; font-size: 24px; font-weight: bold; }
        .metric-box.caution .metric-value { color: #ffae42; }
        .metric-box.warning .metric-value { color: #ff6b6b; }
        .metric-subtext { color: #999; font-size: 12px; margin-top: 5px; }
