/* Kian Speed Test 5.2 — layout rebuilt against the approved desktop mockup. */
@font-face{font-family:LANIRANSans;src:url('/fonts/IRANSans.woff') format('woff');font-style:normal;font-weight:100 900;font-display:swap}
:root{font-family:LANIRANSans,'IRANSans','IRANSansX',Tahoma,sans-serif;color:#1b2c4c;background:#f3f7ff;font-synthesis:none}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-height:100vh;background:#f3f7ff}button,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.48}button:focus-visible,select:focus-visible{outline:3px solid #89beff;outline-offset:2px}
.header{height:84px;background:linear-gradient(110deg,#202e44,#223853 66%,#17263d);color:#fff;box-shadow:0 5px 16px #11254310}.header-inner{height:100%;width:min(100%,1740px);padding:0 32px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:28px;direction:ltr}.brand{display:flex;align-items:center;direction:ltr;gap:14px;white-space:nowrap}.brand-gauge{width:65px;height:65px;flex-shrink:0}.brand-gauge svg{width:100%;height:100%}.brand-text>div{font:750 31px/1.1 'Segoe UI',Arial,sans-serif;letter-spacing:-.5px}.brand-text>div span{color:#a8ddff}.brand-text small{vertical-align:middle;color:#eff7ff;font-size:13px;font-weight:500;letter-spacing:0;background:#465873;border-radius:10px;border:1px solid #64738a;padding:5px 9px;margin-left:8px}.brand-text p{font-size:12px;font-weight:700;margin:5px 0 0;letter-spacing:0;text-align:left}.navigation{display:flex;align-items:center;direction:rtl;gap:7px}.nav{border:0;background:transparent;color:#fff;border-radius:11px;padding:11px 18px;white-space:nowrap;font-size:13px;font-weight:700}.nav.active{background:linear-gradient(110deg,#286fcd,#1455b9);box-shadow:0 5px 16px #0a1d4233;padding-inline:25px}.nav:not(.active):hover{background:#ffffff14}.nav-icon{font:21px/1 'Segoe UI Symbol',sans-serif;vertical-align:-2px;margin-left:7px}
.layout{width:min(100%,1740px);height:calc(100dvh - 126px);min-height:0;margin:auto;padding:13px 19px;display:grid;grid-template-columns:minmax(0,1fr) minmax(325px,23.8%);gap:16px;direction:ltr}.left-content,.sidebar{direction:rtl;display:grid;grid-template-rows:minmax(0,1.57fr) minmax(0,1fr);gap:16px;min-height:0;min-width:0}.panel{background:#fff;border:1px solid #dce7f6;border-radius:16px;box-shadow:0 4px 17px #adc0dd12;min-height:0;min-width:0}.main-card{padding:16px}.speed-grid{height:100%;display:grid;direction:ltr;grid-template-columns:minmax(0,1fr) minmax(340px,1.76fr) minmax(0,1fr);gap:17px;min-height:0}.metrics-column{min-height:0;min-width:0;display:grid;grid-template-rows:minmax(0,1.33fr) minmax(0,.81fr);gap:16px;direction:rtl}.metric-card{min-height:0;min-width:0;padding:16px 17px;border-radius:15px;border:1px solid #e0e8f6;background:linear-gradient(140deg,#fff,#fcfdff);display:flex;flex-direction:column;justify-content:space-between;overflow:hidden}.metric-label{display:flex;gap:11px;align-items:center}.metric-label h3{font-size:17px;margin:0 0 3px;font-weight:800;color:#172741}.metric-label p{font-size:12px;color:#667b9a;margin:0;white-space:nowrap}.circle{width:56px;height:56px;flex:0 0 auto;display:grid;place-items:center;border-radius:50%;font:36px/1 'Segoe UI Symbol',Arial,sans-serif}.circle.blue{background:#e2f3ff;color:#1478e7}.circle.green{background:#ddf9ec;color:#11ad68}.circle.purple{background:#efebff;color:#5944df}.metric-value{display:flex;align-items:baseline;direction:ltr;gap:6px;white-space:nowrap;color:#172741;font-family:'Segoe UI',Arial,sans-serif}.metric-value strong{font-size:clamp(28px,2.9vw,49px);font-weight:750;letter-spacing:-1.6px;font-variant-numeric:tabular-nums;line-height:1.15}.metric-value span{font-size:21px}.metric-value.small strong{font-size:clamp(31px,3vw,51px)}.mini-graph{width:100%;height:70px;display:block;border-radius:10px;background:#f6faff}
.speed-center{min-height:0;min-width:0;display:grid;grid-template-rows:minmax(0,1fr) auto;justify-items:center;direction:rtl}.gauge-wrap{width:min(100%,445px);height:100%;max-height:335px;position:relative;align-self:start;min-height:0;overflow:visible}.gauge{width:100%;height:100%;display:block;overflow:visible}.gauge-base,.gauge-fill{fill:none;stroke-width:28;stroke-linecap:round}.gauge-base{stroke:#eaf1fb}.gauge-fill{stroke:url(#gaugeGradient);stroke-dasharray:0 1000;transition:stroke-dasharray .2s ease}.gauge-tick{font:15px 'Segoe UI',Arial,sans-serif;fill:#203858;font-variant-numeric:tabular-nums;paint-order:stroke;stroke:#fff;stroke-width:2px;stroke-linejoin:round}.gauge-reading{position:absolute;top:33%;left:50%;transform:translateX(-50%);width:70%;display:flex;flex-direction:column;align-items:center;gap:1px;text-align:center;pointer-events:none}.reading-symbol{width:51px;height:51px;flex:0 0 auto;border-radius:50%;background:#def8fa;color:#068ead;display:grid;place-items:center;font:34px 'Segoe UI Symbol',sans-serif;margin-bottom:4px}.big-speed{font:750 clamp(50px,5vw,88px)/1 'Segoe UI',Arial,sans-serif;letter-spacing:-2px;color:#142743;font-variant-numeric:tabular-nums;min-height:1em}.big-unit{font:30px/1.15 'Segoe UI',Arial,sans-serif;color:#647b9e}.gauge-reading p{font-size:12px;color:#697f9e;white-space:nowrap;margin:4px 0 0}.gauge-actions{position:relative;z-index:3;display:flex;flex-direction:column;align-items:center;gap:7px;width:min(100%,370px);padding:0 0 2px;align-self:end}.primary-btn{width:100%;border:0;border-radius:34px;background:linear-gradient(115deg,#1469ef,#258ff2);box-shadow:0 7px 14px #257fe729;color:white;min-height:48px;font-size:16px;font-weight:800}.primary-btn:hover:not(:disabled){filter:brightness(1.06)}.button-icon{margin-left:9px;font:18px 'Segoe UI Symbol',sans-serif}.stop-btn{border:1px solid #cfdef1;background:#f7faff;color:#324663;min-height:31px;min-width:145px;border-radius:19px;font-size:12px;font-weight:700}.progress{font-size:10px;color:#7186a4;margin:0;min-height:15px;text-align:center;line-height:1.35;max-width:100%}
.chart-panel{display:flex;flex-direction:column;padding:15px 18px 10px;gap:5px;overflow:hidden}.section-title{display:flex;justify-content:space-between;align-items:center;gap:8px;flex:0 0 auto}.section-title h2,.side-panel h2{font-size:17px;font-weight:800;color:#182b49;margin:0}.section-icon{font:22px 'Segoe UI Symbol',sans-serif;color:#1677e9;vertical-align:-2px;margin-left:8px}.chart-frame{flex:1;min-height:0;position:relative}.chart-frame canvas{height:100%;width:100%;display:block}.legend{flex:0 0 auto;display:flex;justify-content:center;gap:24px;font-size:11px}.legend span{display:flex;align-items:center;gap:7px}.legend i{height:12px;width:12px;border-radius:50%;display:inline-block}.legend-blue{background:#197af0}.legend-green{background:#0eba56}
.side-panel{padding:17px 17px 14px;overflow:hidden}.side-panel h2{margin:0 0 15px}.form-line{display:grid;grid-template-columns:minmax(0,1fr) 43%;gap:8px;align-items:center;margin-bottom:10px}.form-line label{font-size:12px;color:#586e8d;white-space:nowrap}.form-line select{width:100%;min-width:0;height:36px;padding:5px 9px;font-size:12px;border:1px solid #d2dff2;border-radius:9px;background:white;color:#25415f}.form-line select:focus{border-color:#418bf2}.side-divider{height:1px;background:#e0e8f4;margin:15px 0}.input-label{font-size:12px;margin:0 0 7px;color:#677d9a}.server-url{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid #d8e3f4;border-radius:10px;background:#f3f7ff;padding:5px 6px 5px 10px;color:#254364;font:13px 'Segoe UI',sans-serif}.server-url span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.server-url button,.footer-server button{flex:0 0 auto;border:1px solid #d6e3f4;background:#fff;color:#345578;border-radius:8px;font:19px 'Segoe UI Symbol',sans-serif;line-height:1;padding:6px 9px}.server-note{font-size:11px;color:#7185a1;line-height:1.7;margin:7px 0 0}.copy-status{font-size:10px;color:#169b5d;min-height:14px;margin:2px 0 0}
.history-panel{display:flex;flex-direction:column}.history-heading{margin-bottom:12px}.history-heading h2{margin:0}.chevron{font-size:27px;border:0;background:transparent;color:#197cf1}.history-table-wrap{flex:1;min-height:0;border:1px solid #dce6f5;border-radius:10px;overflow:auto}.history-table{width:100%;border-collapse:collapse;text-align:center;white-space:nowrap;font-size:11px}.history-table th{position:sticky;top:0;background:#f5f9ff;color:#617593;font-weight:700;padding:8px 3px;border-left:1px solid #e0e9f5}.history-table td{padding:8px 3px;border-top:1px solid #e0e9f5;border-left:1px solid #e0e9f5;font-family:LANIRANSans,Tahoma,sans-serif}.history-table td:first-child{direction:ltr}.history-table tbody tr:first-child{background:#e8f2ff;color:#175fc5}.empty-history{padding:24px 3px!important;color:#8295ad!important}.delete-history{flex:0 0 auto;border:1px solid #d5e2f2;border-radius:9px;background:#f4f8ff;min-height:37px;color:#2f5076;font-size:12px;margin-top:10px}.delete-history:hover{background:#e7f1ff}
.footer{height:42px;border-top:1px solid #dce6f5;background:#f7faff;color:#5b7190}.footer-inner{width:min(100%,1740px);height:100%;margin:auto;padding:0 21px;display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:11px;direction:ltr}.footer-server{display:flex;align-items:center;gap:8px;direction:ltr;white-space:nowrap}.dot{height:12px;width:12px;flex:0 0 auto;background:#f6a72b;border-radius:50%}.dot.ok{background:#19bd68}.dot.bad{background:#eb6571}.footer-separator{height:18px;width:1px;background:#cedbec;margin:0 6px}.footer-server button{font-size:16px;padding:2px 5px}.footer-center{white-space:nowrap}.footer-version{text-align:right;white-space:nowrap}dialog{border:1px solid #d7e4f5;border-radius:15px;box-shadow:0 20px 85px #0e244a45;padding:22px;max-width:min(550px,90vw);line-height:2;color:#304560}dialog::backdrop{background:#142d5570}.dialog-heading{display:flex;align-items:center;justify-content:space-between}.dialog-heading h2{margin:0}.dialog-heading button{border:0;background:none;font-size:28px}
@media(min-width:1150px) and (min-height:735px){html,body{height:100%;overflow:hidden}}
@media(max-height:940px) and (min-width:1150px){.layout{grid-template-columns:minmax(0,1fr) minmax(315px,23.8%)}.speed-grid{grid-template-columns:minmax(0,1fr) minmax(315px,1.72fr) minmax(0,1fr);gap:12px}.metric-card{padding:11px 13px}.metric-label h3{font-size:15px}.metric-label p{font-size:11px}.circle{width:47px;height:47px;font-size:28px}.metric-value strong,.metric-value.small strong{font-size:35px}.metric-value span{font-size:17px}.mini-graph{height:50px}.gauge-wrap{width:min(100%,380px)}.gauge-reading{top:31%}.reading-symbol{height:40px;width:40px;font-size:26px;margin-bottom:1px}.big-speed{font-size:clamp(46px,4.5vw,67px)}.big-unit{font-size:23px}.gauge-reading p{font-size:11px}.primary-btn{min-height:41px;font-size:14px}.stop-btn{min-height:28px}.gauge-actions{gap:5px}.form-line{margin-bottom:7px}.form-line select{height:32px}.side-panel{padding:12px 14px}.side-panel h2{margin-bottom:10px}.side-divider{margin:11px 0}.history-table th,.history-table td{padding:6px 3px}}
@media(max-width:1149px){html,body{height:auto;overflow:auto}.layout{height:auto;display:flex;flex-direction:column;padding:12px;gap:12px}.left-content,.sidebar{display:flex;flex-direction:column;gap:12px}.main-card{min-height:440px}.speed-grid{grid-template-columns:minmax(0,1fr) minmax(310px,1.7fr) minmax(0,1fr)}.gauge-wrap{max-height:330px}.chart-panel{height:300px}.chart-frame{min-height:200px}.sidebar{display:grid;grid-template-columns:1fr 1fr}.side-panel{min-height:325px}.footer-inner{flex-wrap:wrap;justify-content:center}.footer-version{display:none}}
@media(max-width:750px){.header{height:auto}.header-inner{padding:12px;flex-wrap:wrap;justify-content:center;gap:10px}.brand-gauge{width:48px;height:48px}.brand-text>div{font-size:23px}.navigation{width:100%;justify-content:center;gap:1px}.nav,.nav.active{font-size:10px;padding:9px 7px}.nav-icon{font-size:15px;margin-left:3px}.speed-grid{display:flex;flex-direction:column}.speed-center{order:-1;min-height:385px}.gauge-wrap{height:280px;width:min(100%,355px)}.gauge-actions{margin-top:0}.metrics-column{grid-template-columns:1fr 1fr;grid-template-rows:none;display:grid}.metric-card{min-height:155px}.metric-card:first-child{min-height:190px}.mini-graph{height:45px}.metric-value strong,.metric-value.small strong{font-size:30px}.metric-value span{font-size:14px}.sidebar{display:flex;flex-direction:column}.side-panel{min-height:0}.footer{height:auto}.footer-inner{padding:12px}.footer-center{display:none}}

.address-selector{display:block;width:100%;margin-top:6px;min-height:30px;border:1px solid #d9e5f6;border-radius:8px;padding:3px 8px;background:#f9fbff;color:#536e94;font-size:11px}.address-selector[hidden]{display:none}.history-actions{display:flex;gap:8px;flex:0 0 auto;margin-top:10px}.history-actions button{margin:0;min-height:34px;flex:1}.export-history{border:1px solid #d5e2f2;border-radius:9px;background:#fff;color:#2d6eba;font-size:12px}.export-history:hover{background:#edf5ff}

.btest-entry{margin:5px 0 0;font-size:11px}.btest-entry a{color:#176dd0;text-decoration:none;font-weight:750}.btest-entry a:hover{text-decoration:underline}

/* v5.4 compact test-mode and network information without changing the approved dashboard geometry */
.form-line[hidden], .legend[hidden], .loss-summary[hidden]{display:none!important}
.network-info{margin-top:6px;border:1px solid #dce6f5;border-radius:9px;background:#f8fbff;padding:6px 9px;display:grid;gap:4px}
.network-info>div{display:flex;align-items:baseline;justify-content:space-between;gap:8px;font-size:10px;min-width:0}
.network-info span{color:#7184a0;flex-shrink:0}.network-info b{font-size:10px;font-weight:700;color:#2b4d73;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.loss-summary{border:1px solid #cfe1f6;background:#edf5ff;border-radius:10px;padding:4px 9px;font-size:10px;color:#285d9e;white-space:nowrap}
#stabilityLegend{gap:18px}
@media(max-height:900px) and (min-width:1150px){.side-panel{padding:9px 12px}.side-panel h2{margin-bottom:7px;font-size:14px}.form-line{margin-bottom:5px}.form-line select{height:29px}.side-divider{margin:8px 0}.server-note{margin:3px 0 0}.network-info{padding:4px 7px;gap:2px}.network-info>div,.network-info b{font-size:9px}.history-heading{margin-bottom:7px}}

.network-details{margin-top:6px;border:1px solid #dce6f5;border-radius:9px;background:#f8fbff;padding:5px 8px}.network-details summary{cursor:pointer;font-weight:750;font-size:10px;color:#2863a8}.network-details .network-info{border:0;padding:6px 0 0;margin-top:0}.side-panel{overflow:auto;scrollbar-width:thin}
