* { box-sizing: border-box; }
body { margin: 0; background: #f3f6fa; color: #17253b; font: 14px/1.5 system-ui, sans-serif; }
.dashboard { max-width: 1680px; margin: auto; padding: 24px; }
header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.back-btn { color: #355372; text-decoration: none; font-size: 24px; }
.heading { flex: 1; min-width: 220px; }
h1 { font-size: 25px; margin: 0; }
h2 { margin: 0; font-size: 16px; }
p { margin: 4px 0; }
.heading p, #updated, article p, .muted { color: #607086; font-size: 12px; }
button, input, select { font: inherit; padding: 8px 10px; border: 1px solid #cdd6e2; border-radius: 6px; background: white; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
.refresh-toggle { font-size: 12px; white-space: nowrap; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 12px; margin: 16px 0; }
article { padding: 18px; background: white; border: 1px solid #dfe6ef; border-radius: 10px; }
article h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #607086; }
article strong { display: block; font-size: clamp(20px, 2vw, 29px); margin: 8px 0; font-variant-numeric: tabular-nums; }
#throughput-card { position: relative; }
#throughput-trend summary { cursor: pointer; color: #355372; font-size: 12px; }
.throughput-popup { position: absolute; top: 100%; left: -1px; width: min(640px, calc(100vw - 48px)); z-index: 4; padding: 16px; background: white; border: 1px solid #cdd6e2; border-radius: 10px; box-shadow: 0 8px 24px #17253b26; }
.throughput-popup h3 { margin: 0 0 6px; font-size: 15px; }
.throughput-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0; font-size: 12px; }
.throughput-series-0 { color: #17253b; stroke: #17253b; }
.throughput-series-1 { color: #167d92; stroke: #167d92; }
.throughput-series-2 { color: #b45309; stroke: #b45309; }
.throughput-legend span::before { content: ""; display: inline-block; width: 14px; border-top: 3px solid currentColor; margin-right: 5px; vertical-align: middle; }
#throughput-chart { display: block; width: 100%; overflow: visible; }
#throughput-chart text { font-size: 11px; fill: #607086; }
#throughput-chart .chart-grid { stroke: #e7edf5; }
#throughput-chart .chart-line { fill: none; stroke-width: 2.5; }
#throughput-chart .chart-cursor { stroke: #607086; stroke-dasharray: 4 3; }
.throughput-popup label { display: block; font-size: 12px; color: #607086; }
#throughput-time { width: 100%; padding: 0; accent-color: #167d92; }
#throughput-reading { min-height: 36px; font-variant-numeric: tabular-nums; }
progress { display: block; width: 100%; height: 9px; border: none; border-radius: 5px; background: #e7edf5; accent-color: #167d92; }
progress::-webkit-progress-bar { background: #e7edf5; border-radius: 5px; }
progress::-webkit-progress-value { background: #167d92; border-radius: 5px; }
progress::-moz-progress-bar { background: #167d92; border-radius: 5px; }
#endpoints { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.endpoint { flex: 1; padding: 12px 16px; background: #eaf0f8; border-radius: 8px; min-width: 270px; }
.badge { display: inline-block; border-radius: 12px; padding: 2px 9px; background: #e7edf5; font-size: 12px; white-space: nowrap; }
.running, .finalizing { background: #d9eef8; color: #0d546e; }
.done { background: #d9f1e3; color: #19613c; }
.failed, .data_error, .invalid_inputs { background: #fde5e4; color: #9a2929; }
.cooldown, .interrupted { background: #fff0d7; color: #83540e; }
#fetch-error, .notice { padding: 10px 14px; border-radius: 6px; background: #fff0d7; margin: 8px 0; white-space: pre-wrap; }
#fetch-error, .notice.error { background: #fde5e4; color: #842626; }
.method { color: #607086; font-size: 12px; margin: 16px 0; }
.method summary { cursor: pointer; font-weight: 600; }
.method p { max-width: 1050px; margin: 8px 0; }
.country-section { background: white; border: 1px solid #dfe6ef; border-radius: 10px; overflow: hidden; }
.table-toolbar { padding: 14px 16px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.table-toolbar h2 { flex: 1; min-width: 180px; }
#row-count { font-size: 12px; color: #607086; }
.table-scroll { overflow: auto; max-height: 68vh; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
th { position: sticky; top: 0; background: #edf2f8; font-size: 11px; text-transform: uppercase; z-index: 1; }
th, td { padding: 11px 13px; border-bottom: 1px solid #edf1f6; white-space: nowrap; }
td { font-size: 12px; }
td:first-child { min-width: 165px; white-space: normal; }
td:nth-child(3) { min-width: 115px; }
td progress { margin-top: 4px; height: 6px; }
td small { display: block; color: #607086; font-size: 10px; }
tr:hover { background: #f7faff; }
.row-error { color: #9a2929; max-width: 250px; white-space: normal; }
@media (max-width: 1100px) { .metrics { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 650px) { .dashboard { padding: 12px; } .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } article { padding: 12px; } header { gap: 10px; } .refresh-toggle { display: none; } }
@media (max-width: 650px) { .throughput-popup { left: auto; right: -1px; } }
