* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, sans-serif; background: #0d1117; color: #e6edf3; margin: 0; padding: 16px; }
.topbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.logo { font-weight: 700; font-size: 18px; color: #3fb950; }
.tok { flex: 1; max-width: 400px; }
input, select, button { background: #0d1117; color: #e6edf3; border: 1px solid #30363d; border-radius: 6px; padding: 8px; font-size: 14px; font-family: inherit; }
input:focus { outline: none; border-color: #3fb950; }
button { background: #21262d; cursor: pointer; transition: .1s; }
button:hover { background: #30363d; }
button.big { background: #238636; border-color: #238636; width: 100%; padding: 14px; font-weight: 700; font-size: 16px; color: #fff; }
button.big:hover { background: #2ea043; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { background: #161b22; border: 1px solid #30363d; border-radius: 10px; padding: 16px; }
.card h2 { margin: 0 0 12px; font-size: 14px; color: #8b949e; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.span2 { grid-column: span 2; }
.row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; flex: 1; }
.field label { font-size: 11px; color: #8b949e; margin-bottom: 4px; text-transform: uppercase; }
.field input { width: 100%; }
.wide { flex: 2; }
label { font-size: 13px; color: #8b949e; display: flex; align-items: center; gap: 6px; }

/* Режимы */
.modes { display: flex; gap: 10px; margin-bottom: 12px; background: #0d1117; padding: 10px; border-radius: 8px; border: 1px solid #30363d; }
.mode-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; background: #21262d; padding: 10px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 14px; border: 1px solid transparent; transition: .2s; }
.mode-btn input { display: none; }
.mode-btn:has(input:checked) { background: #238636; border-color: #3fb950; color: #fff; }
.mode-btn.hard:has(input:checked) { background: #da3633; border-color: #f85149; color: #fff; }

.badge { background: #238636; color: #fff; border-radius: 10px; padding: 2px 8px; font-size: 12px; margin-left: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 6px; border-bottom: 1px solid #21262d; text-align: left; }
th { color: #8b949e; font-weight: 500; font-size: 11px; text-transform: uppercase; }
tr:hover { background: #1c2128; }
.chart-container { position: relative; height: 200px; margin-bottom: 12px; }
.agg-row { display: flex; gap: 12px; flex-wrap: wrap; }
.kpi { flex: 1; background: #0d1117; border: 1px solid #30363d; border-radius: 8px; padding: 12px; text-align: center; }
.kpi span { display: block; font-size: 24px; font-weight: 700; color: #3fb950; margin-bottom: 4px; }
.kpi small { color: #8b949e; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 800px) { .grid { grid-template-columns: 1fr; } .span2 { grid-column: auto; } .modes { flex-direction: column; } }
