:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #202b3c; background: #f5f6f8; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; }
main { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 32px 20px; }
.card { width: 100%; max-width: 400px; padding: 38px 36px 28px; background: #fff; border: 1px solid #e2e6eb; border-radius: 14px; box-shadow: 0 8px 30px rgb(25 35 50 / 4%); }
.mark { display: block; width: 42px; height: 42px; margin-bottom: 24px; }
h1 { margin: 0; font-size: 26px; letter-spacing: -.7px; font-weight: 650; }
.subtitle { margin: 8px 0 30px; color: #697382; font-size: 14px; }
label { display: block; margin: 20px 0 8px; font-size: 13px; font-weight: 600; }
input { width: 100%; height: 46px; padding: 0 12px; border: 1px solid #cdd3db; border-radius: 7px; background: #fff; color: #202b3c; font: inherit; font-size: 16px; }
input:focus-visible { outline: 3px solid #dce5f0; border-color: #536a86; }
button { width: 100%; min-height: 46px; margin-top: 26px; border: 0; border-radius: 7px; background: #25354a; color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
button:hover { background: #34485f; }
button:focus-visible { outline: 3px solid #91a6c0; outline-offset: 3px; }
button:disabled { opacity: .65; cursor: wait; }
.message { min-height: 36px; margin: 12px 0 0; color: #a33333; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.notice { margin: 12px 0 0; padding-top: 22px; border-top: 1px solid #eceef1; text-align: center; color: #697382; font-size: 12px; }
.noscript { font-size: 13px; color: #a33333; }
.error-code { margin: 0 0 12px; color: #697382; font-size: 13px; font-weight: 600; letter-spacing: 2px; }
.error-description { margin: 14px 0 26px; color: #697382; font-size: 14px; line-height: 1.7; }
.return-link { display: flex; align-items: center; justify-content: center; min-height: 46px; margin-bottom: 28px; border-radius: 7px; background: #25354a; color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; }
.return-link:hover { background: #34485f; }
.return-link:focus-visible { outline: 3px solid #91a6c0; outline-offset: 3px; }
@media (max-width: 420px) { .card { padding: 30px 24px 24px; } }

.speedtest-page { background: #f5f6f8; }
.dashboard { display: block; place-items: normal; width: min(100%, 1000px); min-height: 100svh; margin: auto; padding: 32px 24px; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.brand { display: flex; gap: 12px; align-items: center; font-size: 15px; font-weight: 600; }
.brand-divider { margin: 0 10px; color: #c1c8d1; font-weight: 400; }
.logout { margin: 0; width: auto; min-height: 38px; padding: 0 14px; color: #536174; background: transparent; border: 1px solid #dce1e7; }
.logout:hover { background: #e9edf2; }
.test-panel { width: 100%; padding: 36px; background: white; border: 1px solid #e2e6eb; border-radius: 16px; box-shadow: 0 8px 30px rgb(25 35 50 / 3%); }
.panel-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.eyebrow { margin: 0 0 12px; color: #697382; font-size: 12px; letter-spacing: 2px; }
.panel-heading h1 { font-size: 28px; letter-spacing: -.6px; }
.panel-subtitle, .muted { color: #697382; font-size: 12px; line-height: 1.7; }
.panel-subtitle { margin: 12px 0 0; font-size: 14px; }
.server-badge { flex-shrink: 0; font-size: 12px; color: #536174; background: #f2f5f8; padding: 7px 10px; border-radius: 5px; }
.test-controls { margin: 30px 0; }
.control-actions { display: flex; align-items: center; gap: 20px; }
#start { width: 148px; margin: 0; }
#start.running { background: #fff; border: 1px solid #a33333; color: #a33333; }
.test-choice { display: flex; align-items: center; gap: 10px; margin: 0; color: #697382; font-size: 12px; font-weight: 400; }
select { min-height: 40px; padding: 0 28px 0 10px; border: 1px solid #dce1e7; border-radius: 6px; color: #34485f; background: #fff; font: inherit; font-size: 13px; }
select:focus-visible { outline: 3px solid #dce5f0; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.metric { min-width: 0; padding: 20px 16px; background: #f8fafc; border: 1px solid #e8edf2; border-radius: 10px; transition: border-color .2s; }
.metric.active { border-color: #769bd2; background: #f3f7fe; }
.metric h2, .chart-heading h2 { margin: 0; font-size: 13px; font-weight: 500; }
.metric h2 span { font-size: 10px; color: #8490a0; margin-left: 5px; }
.metric-value { margin: 20px 0 10px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.metric-value strong { font-size: 30px; line-height: 1.1; font-weight: 600; letter-spacing: -1px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric-value > span { font-size: 11px; color: #697382; }
.metric-detail { margin: 0; min-height: 18px; color: #697382; font-size: 11px; line-height: 1.6; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
.download-dot { background: #487bd2; }.upload-dot { background: #218f84; }
.chart-panel { margin-top: 28px; padding-top: 24px; border-top: 1px solid #eceef1; }
.chart-heading, .chart-legend { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.chart-legend { font-size: 11px; color: #697382; }
.chart-wrap { position: relative; height: 210px; margin-top: 18px; }
#chart { display: block; width: 100%; height: 100%; }
#chart-empty { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; color: #8490a0; font-size: 12px; pointer-events: none; }
#chart-empty[hidden] { display: none; }
.chart-caption { text-align: right; color: #8490a0; font-size: 11px; }
.test-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; font-size: 12px; }
#status { color: #34485f; }#traffic { color: #697382; }
progress { display: block; width: 100%; height: 5px; accent-color: #487bd2; border: 0; border-radius: 4px; overflow: hidden; background: #edf1f6; }
progress::-webkit-progress-bar { background: #edf1f6; }progress::-webkit-progress-value { background: #487bd2; }
#summary:empty { display: none; }
.dashboard-note { margin: 20px auto 0; max-width: 750px; color: #8490a0; text-align: center; font-size: 11px; line-height: 1.8; }
@media (max-width: 700px) { .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }.test-panel { padding: 24px; }.server-badge { display: none; }.panel-heading h1 { font-size: 24px; } }
@media (max-width: 420px) { .dashboard { padding: 20px 12px; }.dashboard-header { margin-bottom: 20px; }.brand { gap: 8px; font-size: 13px; }.brand-divider { margin: 0 4px; }.test-panel { padding: 22px 16px; }.control-actions { gap: 12px; align-items: stretch; }#start { width: 120px; }.test-choice { gap: 4px; flex-direction: column; align-items: flex-start; }select { min-height: 28px; }.metric { padding: 18px 12px; }.test-footer { flex-direction: column; gap: 0; }.test-footer p { margin: 4px 0 8px; }.chart-legend { gap: 8px; } }

.dashboard-nav { display: flex; gap: 6px; margin: -10px 0 20px; padding: 4px; border: 1px solid #e2e6eb; border-radius: 9px; background: #eceff3; width: fit-content; }
.dashboard-nav a { padding: 9px 18px; border-radius: 6px; color: #697382; font-size: 13px; text-decoration: none; }
.dashboard-nav a[aria-current="page"] { color: #25354a; background: #fff; box-shadow: 0 1px 4px rgb(25 35 50 / 8%); font-weight: 600; }
.dashboard-nav a:focus-visible { outline: 3px solid #91a6c0; outline-offset: 2px; }
.system-controls, .system-actions, .section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.system-controls { margin: 24px 0; }.system-actions { flex-shrink: 0; gap: 8px; }
.secondary-button { margin: 0; width: auto; min-height: 36px; padding: 0 12px; border: 1px solid #dce1e7; color: #536174; background: #fff; font-size: 12px; }
.secondary-button:hover { background: #f2f5f8; }
.system-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid #eceef1; }
.system-section h2 { font-size: 15px; margin: 0; font-weight: 600; }
.system-info { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 32px; margin: 10px 0 0; }
.system-info > div { padding: 16px 0; border-bottom: 1px solid #f0f2f5; }
.system-info dt { color: #697382; font-size: 12px; margin-bottom: 7px; }
.system-info dd { margin: 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.system-metrics meter { display: block; width: 100%; height: 6px; margin: 12px 0; border: 0; background: #e2e9f1; border-radius: 4px; }
.system-metrics meter[hidden] { display: none; }
.system-metrics meter::-webkit-meter-bar { background: #e2e9f1; border: 0; border-radius: 4px; }
.system-metrics meter::-webkit-meter-optimum-value { background: #487bd2; }
.table-scroll { overflow: auto; max-height: 340px; margin-top: 14px; border: 1px solid #e8edf2; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
th { position: sticky; top: 0; background: #f8fafc; color: #697382; font-weight: 500; z-index: 1; }
th, td { padding: 12px 14px; border-bottom: 1px solid #edf1f6; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.filter-label { max-width: 340px; font-size: 12px; color: #697382; font-weight: 400; margin: 16px 0; }
.filter-label input { margin-top: 8px; height: 38px; font-size: 13px; }
#system-warnings { min-height: 0; }#login-again { display: block; color: #a33333; margin-bottom: 20px; font-size: 13px; }#login-again[hidden] { display: none; }
@media (max-width: 600px) { .system-controls { align-items: flex-start; flex-direction: column; }.system-info { grid-template-columns: 1fr; }.system-metrics .metric-value strong { font-size: 27px; }.dashboard-nav { margin-top: 0; }th, td { padding: 10px; } }
