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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    min-height: 100vh;
}

.header {
    background: #161625;
    border-bottom: 1px solid #2a2a4a;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
    color: #00d4ff;
}

.header .version {
    font-size: 13px;
    color: #666;
}

.nav {
    display: flex;
    gap: 4px;
    background: #161625;
    padding: 0 24px 12px;
    border-bottom: 1px solid #2a2a4a;
}

.nav button {
    background: transparent;
    border: none;
    color: #888;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav button:hover { background: #1e1e35; color: #ccc; }
.nav button.active { background: #1a1a35; color: #00d4ff; }

.container { padding: 20px 24px; max-width: 1400px; margin: 0 auto; }

.tab { display: none; }
.tab.active { display: block; }

/* Dashboard cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.card {
    background: #161625;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 20px;
}

.card .label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 8px;
}

.card .value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.card .value.accent { color: #00d4ff; }
.card .value.green { color: #00e676; }
.card .value.orange { color: #ffa726; }
.card .value.red { color: #ef5350; }

.card .sub {
    font-size: 12px;
    color: #555;
    margin-top: 4px;
}

/* Chart */
.chart-container {
    background: #161625;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.chart-header h3 { font-size: 16px; color: #ccc; }

.chart-header select {
    background: #1e1e35;
    border: 1px solid #2a2a4a;
    color: #ccc;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.chart-wrap { position: relative; height: 300px; }

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: #161625;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    overflow: hidden;
}

thead th {
    background: #1a1a30;
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    border-bottom: 1px solid #2a2a4a;
    cursor: pointer;
    user-select: none;
}

thead th:hover { color: #aaa; }

tbody td {
    padding: 10px 16px;
    font-size: 14px;
    border-bottom: 1px solid #1e1e35;
}

tbody tr:hover { background: #1a1a2e; }
tbody tr:last-child td { border-bottom: none; }

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.online { background: #00e676; box-shadow: 0 0 6px #00e676; }
.status-dot.offline { background: #555; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge.connect { background: #00e67620; color: #00e676; }
.badge.disconnect { background: #ef535020; color: #ef5350; }

.hashrate { font-family: 'JetBrains Mono', 'Fira Code', monospace; color: #00d4ff; }
.muted { color: #555; }
.empty-state { text-align: center; padding: 60px 20px; color: #444; }
.empty-state p { font-size: 16px; margin-bottom: 8px; }

/* Worker detail modal */
.worker-detail {
    background: #161625;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
}

.worker-detail h3 { color: #00d4ff; margin-bottom: 16px; }

.worker-detail .close-btn {
    float: right;
    background: #2a2a4a;
    border: none;
    color: #ccc;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .cards { grid-template-columns: 1fr 1fr; }
    .container { padding: 12px; }
    table { font-size: 13px; }
    thead th, tbody td { padding: 8px 10px; }
}
