:root{--bg:#f4f7fb;--panel:#fff;--ink:#0c1b36;--muted:#6d7b93;--line:#dce5f1;--nav:#061329;--nav2:#0b1c38;--blue:#168cff;--cyan:#21c8e8;--orange:#ff6a31;--green:#20a66a;--red:#e5484d;--shadow:0 12px 32px rgba(11,30,65,.08);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--bg)}*{box-sizing:border-box}body{margin:0;background:var(--bg)}a{color:inherit}.app{min-height:100vh;display:grid;grid-template-columns:244px 1fr}.sidebar{background:linear-gradient(180deg,var(--nav),#08162c 70%,#071225);color:#d8e5fb;position:fixed;inset:0 auto 0 0;width:244px;padding:22px 14px;overflow:auto}.brand{display:flex;align-items:center;height:56px;padding:5px 8px 18px;border-bottom:1px solid rgba(255,255,255,.09);margin-bottom:18px}.brand img{width:190px;max-height:54px;object-fit:contain;object-position:left center}.nav-label{text-transform:uppercase;letter-spacing:.16em;font-size:10px;color:#6f91bd;margin:20px 10px 8px}.nav a{display:flex;align-items:center;gap:12px;text-decoration:none;padding:11px 12px;border-radius:10px;margin:3px 0;font-weight:650;font-size:14px}.nav a:hover,.nav a.active{background:linear-gradient(90deg,rgba(24,140,255,.19),rgba(33,200,232,.08));color:#fff}.nav .ico{width:19px;text-align:center;color:#74caff}.sidebar-bottom{margin-top:26px;border-top:1px solid rgba(255,255,255,.09);padding-top:12px}.main{grid-column:2;min-width:0}.topbar{height:68px;background:rgba(255,255,255,.93);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 26px;position:sticky;top:0;z-index:10}.top-left,.top-right{display:flex;align-items:center;gap:12px}.menu-btn,.icon-btn{border:1px solid var(--line);background:#fff;border-radius:10px;width:40px;height:40px;cursor:pointer}.protocol{border:1px solid #d6e4f5;background:#f8fbff;border-radius:999px;padding:7px 11px;font-size:12px;font-weight:700;color:#26436c}.user{font-size:14px}.content{padding:26px;max-width:1600px;margin:0 auto}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:20px}.page-head h1{margin:0;font-size:28px;letter-spacing:-.03em}.page-head p{margin:6px 0 0;color:var(--muted)}.grid{display:grid;gap:18px}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-6{grid-template-columns:repeat(6,minmax(0,1fr))}.card{background:var(--panel);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow)}.card-h{padding:18px 22px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:16px;align-items:center}.card-h h2,.card-h h3{margin:0;font-size:18px}.card-b{padding:20px 22px}.metric{padding:18px}.metric .label{font-size:12px;color:var(--muted);font-weight:700}.metric .value{font-size:28px;font-weight:760;letter-spacing:-.04em;margin-top:6px}.metric .unit{font-size:13px;color:var(--muted);font-weight:600}.accent-blue{border-top:3px solid var(--blue)}.accent-orange{border-top:3px solid var(--orange)}.status{display:inline-flex;align-items:center;gap:7px;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:750}.status:before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}.ok{color:#137b52;background:#eaf8f2}.warn{color:#a56213;background:#fff4dc}.bad{color:#b52c35;background:#ffedef}.info{color:#1764b9;background:#eaf4ff}.muted{color:var(--muted)}.btn{border:0;border-radius:10px;padding:10px 15px;font-weight:750;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:14px}.btn-primary{background:linear-gradient(110deg,#146ee8,#1aa7f2);color:#fff}.btn-secondary{background:#edf4fc;color:#174c86;border:1px solid #d8e5f2}.btn-danger{background:#fff0f1;color:#b82b35;border:1px solid #ffd2d5}.btn-success{background:#e9f9f1;color:#167a50;border:1px solid #c9f0de}.btn-sm{padding:7px 10px;font-size:12px}.actions{display:flex;gap:8px;flex-wrap:wrap}.form-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:14px}.field{grid-column:span 4}.field.w6{grid-column:span 6}.field.w12{grid-column:span 12}.field label{display:block;font-size:12px;color:#52647f;font-weight:750;margin:0 0 6px}.field input,.field select,.field textarea{width:100%;border:1px solid #cfdae9;background:#fff;border-radius:10px;padding:11px 12px;color:var(--ink);outline:none}.field input:focus,.field select:focus,.field textarea:focus{border-color:#78b7ff;box-shadow:0 0 0 3px rgba(22,140,255,.09)}.channel-box{border:1px solid #d7e3f1;border-radius:14px;padding:16px;background:#f9fbfe}.channel-title{font-size:13px;font-weight:800;color:#19578e;margin-bottom:12px}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse;font-size:13px}.table th{background:#f5f8fc;color:#53647d;text-align:left;padding:11px 12px;border-bottom:1px solid var(--line);white-space:nowrap}.table td{padding:11px 12px;border-bottom:1px solid #e8eef6;white-space:nowrap}.table tr:last-child td{border-bottom:0}.alert{padding:12px 15px;border-radius:11px;margin-bottom:16px;font-size:14px}.alert-success{background:#eaf8f2;color:#176e4b;border:1px solid #c5eddc}.alert-error{background:#fff0f1;color:#a82b34;border:1px solid #ffd1d5}.section-gap{margin-top:18px}.kv{display:grid;grid-template-columns:210px 1fr;border-bottom:1px solid #edf1f6;padding:9px 0;font-size:14px}.kv:last-child{border-bottom:0}.kv span:first-child{color:var(--muted)}.canvas-card canvas{width:100%;height:280px;display:block}.two-channel{display:grid;grid-template-columns:1fr 1fr;gap:18px}.channel-head{display:flex;justify-content:space-between;align-items:start;gap:10px}.material{font-weight:800;font-size:16px}.tiny{font-size:11px;color:var(--muted)}.logo-light-report{height:50px;object-fit:contain}.login-page{min-height:100vh;display:grid;grid-template-columns:1.1fr .9fr;background:#061329}.login-brand{display:flex;align-items:center;justify-content:center;padding:50px;background:radial-gradient(circle at 30% 35%,rgba(18,132,255,.2),transparent 38%),radial-gradient(circle at 70% 65%,rgba(255,105,49,.12),transparent 30%),#061329}.login-brand img{width:min(610px,90%);height:auto}.login-panel{background:#f7f9fc;display:flex;align-items:center;justify-content:center;padding:40px}.login-box{width:min(430px,100%)}.login-box h1{font-size:30px;margin:0 0 8px}.login-box>p{color:var(--muted);margin:0 0 25px}.login-box input{width:100%;padding:13px;border:1px solid #cfdae9;border-radius:10px;margin:6px 0 14px}.login-box .btn{width:100%;padding:13px}.chart-legend{display:flex;gap:15px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin-top:10px}.legend-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:currentColor;margin-right:5px}.footer-note{font-size:12px;color:var(--muted);margin-top:20px}.mobile-only{display:none}@media(max-width:1100px){.grid-6{grid-template-columns:repeat(3,1fr)}.grid-4{grid-template-columns:repeat(2,1fr)}.field{grid-column:span 6}.two-channel{grid-template-columns:1fr}}@media(max-width:780px){.app{display:block}.sidebar{transform:translateX(-100%);transition:.2s;z-index:40}.sidebar.open{transform:translateX(0)}.main{grid-column:auto}.content{padding:18px}.topbar{padding:0 16px}.grid-6,.grid-4,.grid-2{grid-template-columns:1fr}.field,.field.w6{grid-column:span 12}.page-head{align-items:start;flex-direction:column}.mobile-only{display:inline-flex}.login-page{grid-template-columns:1fr}.login-brand{min-height:210px;padding:25px}.login-panel{padding:28px 20px}.kv{grid-template-columns:1fr;gap:4px}.brand img{width:180px}}@media print{.sidebar,.topbar,.no-print,.btn{display:none!important}.app,.main{display:block}.content{padding:0;max-width:none}.card{box-shadow:none;break-inside:avoid}.page-head{margin-bottom:12px}body{background:white}.report-brand{display:block!important}}
html[data-theme="dark"]{--bg:#071224;--panel:#0c1a31;--ink:#eaf3ff;--muted:#91a4c0;--line:#203451;--shadow:0 12px 32px rgba(0,0,0,.18)}html[data-theme="dark"] .topbar,html[data-theme="dark"] .menu-btn,html[data-theme="dark"] .icon-btn,html[data-theme="dark"] .field input,html[data-theme="dark"] .field select,html[data-theme="dark"] .field textarea{background:#0c1a31;color:var(--ink)}html[data-theme="dark"] .protocol,html[data-theme="dark"] .table th,html[data-theme="dark"] .channel-box{background:#10213d;color:var(--ink)}html[data-theme="dark"] .table td{border-color:#1b304c}

/* FluxEngine 3.2.3 — restored dashboard instrumentation */
.dashboard-filter{margin-top:2px}.filter-grid{display:grid;grid-template-columns:1.3fr 1fr 1fr .8fr .55fr auto;gap:12px;align-items:end}.field-filter label{display:block;font-size:12px;color:#52647f;font-weight:750;margin-bottom:6px}.field-filter input,.field-filter select{width:100%;border:1px solid #cfdae9;background:#fff;border-radius:10px;padding:10px 11px;color:var(--ink);outline:none}.filter-actions{display:flex;gap:8px;align-items:end}.quick-periods{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
.raw-tec-panel{border-top:3px solid #7c5cff}.raw-tec{display:flex;flex-direction:column;gap:5px;padding:3px 0}.raw-tec span{font-size:12px;color:var(--muted);font-weight:750}.raw-tec b{font-size:25px;letter-spacing:-.03em}.raw-tec small{color:var(--muted);font-size:11px}
.runtime-card{border-top:3px solid var(--green)}.runtime-warning{border:1px solid #f3d092;background:#fff7e8;color:#785018;padding:12px 14px;border-radius:10px;margin-bottom:16px;font-size:13px;line-height:1.45}.runtime-controls{display:grid;grid-template-columns:minmax(200px,.8fr) minmax(170px,1fr) minmax(150px,.8fr) auto;gap:18px;align-items:end}.runtime-interval label,.runtime-meta span{display:block;font-size:12px;color:var(--muted);font-weight:750;margin-bottom:6px}.runtime-input-row{display:flex;align-items:center;gap:8px}.runtime-input-row input{width:130px;border:1px solid #cfdae9;background:#fff;border-radius:10px;padding:11px;color:var(--ink)}.runtime-meta b{font-size:14px}.runtime-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.runtime-result{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:14px}
.connectivity-card{border-top:3px solid var(--cyan)}.connectivity-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.connect-box{background:#f8fbff;border:1px solid #dce7f4;border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:5px}.connect-box span{font-size:12px;color:var(--muted);font-weight:750}.connect-box b{font-size:20px}.connect-box small{font-size:11px;color:var(--muted)}.connect-box.wide{grid-column:span 1}.coverage-note{padding-top:0;color:var(--muted);font-size:12px}
html[data-theme="dark"] .field-filter input,html[data-theme="dark"] .field-filter select,html[data-theme="dark"] .runtime-input-row input{background:#0c1a31;color:var(--ink);border-color:#29415f}html[data-theme="dark"] .runtime-warning{background:#2b2416;color:#f0cf8b;border-color:#5b4823}html[data-theme="dark"] .connect-box{background:#10213d;border-color:#203b5d}
@media(max-width:1250px){.filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.filter-actions{align-self:end}.runtime-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.runtime-actions{justify-content:flex-start}.connectivity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:780px){.filter-grid{grid-template-columns:1fr}.runtime-controls{grid-template-columns:1fr}.runtime-actions{justify-content:flex-start}.connectivity-grid{grid-template-columns:1fr}.connect-box.wide{grid-column:span 1}.raw-tec b{font-size:22px}}

/* FluxEngine live dashboard / GNSS map hotfix */
.live-priority-board{overflow:hidden}.environment-card{border-top:3px solid var(--green)}.environment-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:0}.compact-metric{box-shadow:none;border:0;border-right:1px solid var(--line);border-radius:0;padding:4px 18px}.compact-metric:last-child{border-right:0}.compact-metric .value{font-size:26px}.connectivity-grid-live{grid-template-columns:repeat(5,minmax(0,1fr));align-items:stretch}.coordinates-box{grid-column:span 3}.map-actions-box{grid-column:span 2}.signal-row{display:flex;align-items:flex-end;gap:14px}.signal-row>b{line-height:1}.battery-box{border-color:#d9e7dc;background:linear-gradient(180deg,#fbfffc,#f6fbf8)}.battery-live-row{display:flex;align-items:baseline;gap:6px}.battery-live-row b{font-size:26px;line-height:1}.battery-live-row strong{font-size:13px;color:var(--muted)}.signal-bars{height:32px;display:flex;align-items:flex-end;gap:4px;min-width:66px}.signal-bar{display:block;width:9px;border-radius:3px 3px 1px 1px;background:#c8d6e8;opacity:.5;transition:background .18s ease,opacity .18s ease,transform .18s ease}.signal-bar:nth-child(1){height:8px}.signal-bar:nth-child(2){height:13px}.signal-bar:nth-child(3){height:18px}.signal-bar:nth-child(4){height:24px}.signal-bar:nth-child(5){height:30px}.signal-bar.active{background:var(--green);opacity:1}.signal-bar.active:last-of-type{transform:translateY(-1px)}.location-box b{white-space:normal}.map-open-btn{width:max-content;margin-top:5px}.map-open-btn.disabled{pointer-events:none;opacity:.45}.gnss-map-wrap{position:relative;grid-column:1/-1;border:1px solid #dce7f4;border-radius:14px;overflow:hidden;min-height:250px;background:#eef4fa}.gnss-map{display:block;width:100%;height:250px;border:0}.gnss-map[hidden]{display:none}.gnss-map-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:20px;text-align:center;color:var(--muted);font-size:13px}.gnss-map-empty[hidden]{display:none}.dashboard-filter{margin-top:18px}
html[data-theme="dark"] .compact-metric{border-color:#203b5d}html[data-theme="dark"] .battery-box{background:#10263d;border-color:#274a51}html[data-theme="dark"] .signal-bar{background:#29415f}html[data-theme="dark"] .gnss-map-wrap{background:#0c1a31;border-color:#203b5d}
@media(max-width:1250px){.connectivity-grid-live{grid-template-columns:repeat(2,minmax(0,1fr))}.coordinates-box,.map-actions-box{grid-column:span 1}.environment-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:0}.environment-grid .compact-metric:nth-child(3n){border-right:0}.environment-grid .compact-metric:nth-child(-n+3){border-bottom:1px solid var(--line)}}
@media(max-width:780px){.connectivity-grid-live{grid-template-columns:1fr}.coordinates-box,.map-actions-box{grid-column:span 1}.environment-grid{grid-template-columns:1fr}.compact-metric{border-right:0;border-bottom:1px solid var(--line);padding:12px 2px}.compact-metric:last-child{border-bottom:0}.gnss-map,.gnss-map-wrap{min-height:220px;height:220px}}

/* Hotfix5: independent LIVE device selector */
.dashboard-page-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
}
.live-device-selector{
    min-width:320px;
    display:flex;
    align-items:center;
    gap:12px;
    padding:10px 12px;
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:12px;
}
.live-device-selector-copy{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:2px;
    line-height:1.15;
}
.live-device-selector-copy b{
    max-width:170px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.live-device-selector select{
    min-width:180px;
    margin-left:auto;
    border:1px solid #cfdae9;
    background:#fff;
    color:var(--ink);
    border-radius:10px;
    padding:10px 34px 10px 11px;
    outline:none;
}
.live-device-selector select:focus{
    border-color:#78b7ff;
    box-shadow:0 0 0 3px rgba(22,140,255,.09);
}
html[data-theme="dark"] .live-device-selector select{
    background:#0c1a31;
    border-color:#29415f;
    color:var(--ink);
}
.live-empty-card{
    border-style:dashed;
}
@media (max-width:900px){
    .dashboard-page-head{
        align-items:stretch;
        flex-direction:column;
    }
    .live-device-selector{
        width:100%;
        min-width:0;
    }
    .live-device-selector select{
        flex:1;
        min-width:0;
    }
}

/* Hotfix7: experiment history filter + chart units/export */
.filter-grid{
    grid-template-columns:minmax(180px,1.25fr) minmax(210px,1.35fr) minmax(175px,1fr) minmax(175px,1fr) minmax(130px,.72fr) minmax(95px,.52fr) auto;
}
.experiment-filter select{min-width:0}
.canvas-card .card-h>div:first-child{min-width:0}
.chart-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.canvas-card canvas{height:300px}
@media(max-width:1350px){
    .filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
    .filter-actions{justify-content:flex-start}
}
@media(max-width:780px){
    .filter-grid{grid-template-columns:1fr}
    .chart-actions{justify-content:flex-start}
    .canvas-card .card-h{align-items:flex-start;flex-direction:column}
}


/* Hotfix10: UV Index derived from raw UV mV */
.uv-index-metric .value{margin-bottom:6px}
.uv-index-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:2px}
.uv-category{display:inline-flex;align-items:center;min-height:22px;padding:3px 8px;border-radius:999px;font-size:11px;font-weight:800;background:#edf2f8;color:#53657f}
.uv-category.uv-low{background:#e8f7ee;color:#16834d}
.uv-category.uv-moderate{background:#fff6d9;color:#9a6a00}
.uv-category.uv-high{background:#fff0dd;color:#b75a00}
.uv-category.uv-very-high{background:#ffe5e5;color:#b52323}
.uv-category.uv-extreme{background:#f2e7ff;color:#7126a8}
.uv-raw{font-size:11px;color:var(--muted)}

/* Hotfix11: AJAX history, readable scales, environmental charts and paginated table */
.history-filter-state{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.history-loading{font-size:12px;font-weight:750;color:#1764b9;background:#eaf4ff;border-radius:999px;padding:6px 10px}
.history-loading.error{color:#b52c35;background:#ffedef}
.history-chart-grid{align-items:start}
.environment-chart-card{border-top:3px solid var(--green)}
.canvas-card{min-width:0;overflow:hidden}
.canvas-card .card-b{min-width:0}
.canvas-card canvas{width:100%;height:320px;display:block;touch-action:pan-y}

.history-table-card{min-width:0;max-width:100%;overflow:hidden}
.history-table-head{align-items:flex-start}
.history-table-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.history-table-controls{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding-top:14px;padding-bottom:14px;border-bottom:1px solid var(--line)}
.column-groups{display:flex;gap:7px;flex-wrap:wrap}
.column-groups .btn.active,.page-number-buttons .btn.active{background:#176fd4;color:#fff;border-color:#176fd4}
.page-size-control{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:750;color:var(--muted)}
.page-size-control select{border:1px solid #cfdae9;border-radius:9px;background:#fff;color:var(--ink);padding:7px 28px 7px 9px}
.history-table-wrap{display:block;width:100%;max-width:100%;overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain}
.history-table{width:max-content;min-width:100%;table-layout:auto}
.history-table th,.history-table td{white-space:nowrap}
.history-table th[hidden],.history-table td[hidden]{display:none!important}
.history-table .sticky-col{position:sticky;left:0;z-index:2;background:var(--panel);box-shadow:1px 0 0 var(--line)}
.history-table th.sticky-col{z-index:4;background:#f5f8fc}
.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:14px 20px;border-top:1px solid var(--line)}
.pagination-buttons,.page-number-buttons{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.pagination-buttons .btn:disabled{opacity:.45;cursor:not-allowed}
html[data-theme="dark"] .page-size-control select{background:#0c1a31;color:var(--ink);border-color:#29415f}
html[data-theme="dark"] .history-table .sticky-col{background:var(--panel)}
html[data-theme="dark"] .history-table th.sticky-col{background:#10213d}

@media(max-width:780px){
    .history-filter-state{justify-content:flex-start}
    .history-chart-grid{grid-template-columns:1fr}
    .canvas-card canvas{height:350px}
    .canvas-card .card-b{padding:18px 12px 16px}
    .history-table-head{flex-direction:column;align-items:stretch}
    .history-table-actions{justify-content:flex-start}
    .history-table-controls{align-items:flex-start;flex-direction:column}
    .column-groups{width:100%;overflow-x:auto;flex-wrap:nowrap;padding-bottom:3px}
    .column-groups .btn{flex:0 0 auto}
    .history-pagination{align-items:flex-start;flex-direction:column}
    .pagination-buttons{width:100%;justify-content:space-between}
    .page-number-buttons{justify-content:center;flex:1}
    .history-table th,.history-table td{padding:10px 9px;font-size:12px}
}

/* Hotfix12: device-level UV calibration */
.accent-green{border-top:3px solid var(--green)}
.uv-calibration-card{overflow:hidden}
.uv-calibration-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.uv-calibration-metric{border:1px solid var(--line);border-radius:12px;background:#f8fbff;padding:14px 15px;min-width:0}
.uv-calibration-metric span{display:block;font-size:11px;font-weight:750;color:var(--muted);margin-bottom:6px}
.uv-calibration-metric b{display:block;font-size:18px;line-height:1.25;overflow-wrap:anywhere}
.uv-calibration-note{margin-top:16px;border:1px solid #cfe3f8;background:#f1f7fe;color:#34516f;border-radius:12px;padding:12px 14px;font-size:13px;line-height:1.45}
.uv-reference-row{display:flex;gap:8px;align-items:stretch}
.uv-reference-row input{min-width:0;flex:1}
.uv-reference-row .btn{flex:0 0 auto;white-space:nowrap}
.uv-inline-help{display:inline-block;margin-left:10px;vertical-align:middle}
.uv-preview-line{border:1px dashed #bdd6ef;border-radius:11px;background:#fbfdff;padding:12px 14px;color:#53657f}
.uv-preview-line b{color:var(--ink);margin-left:7px}
html[data-theme="dark"] .uv-calibration-metric{background:#10213d}
html[data-theme="dark"] .uv-calibration-note{background:#10213d;border-color:#29415f;color:#b8c9df}
html[data-theme="dark"] .uv-preview-line{background:#0c1a31;border-color:#29415f}
@media(max-width:900px){.uv-calibration-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:780px){
    .uv-calibration-summary{grid-template-columns:1fr 1fr}
    .uv-reference-row{flex-direction:column}
    .uv-reference-row .btn{width:100%}
    .uv-inline-help{display:block;margin:8px 0 0}
}
@media(max-width:460px){.uv-calibration-summary{grid-template-columns:1fr}}

/* ================================================================
   Hotfix13 — restricted LIVE_VIEWER page
   ================================================================ */
.live-viewer-page{max-width:1500px;margin:0 auto}
.live-viewer-head{gap:20px}
.live-viewer-device{min-width:230px;display:flex;flex-direction:column;gap:6px}
.live-viewer-device label{font-size:11px;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.live-viewer-device select{width:100%;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);padding:10px 12px}
.live-viewer-status-card{border-top:3px solid var(--cyan)}
.live-viewer-status-row{display:flex;align-items:center;justify-content:space-between;gap:20px}
.live-viewer-status-row>div:first-child{display:flex;flex-direction:column;gap:4px}
.live-viewer-status-row>div:first-child>b{font-size:20px}
.live-viewer-eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:800}
.live-viewer-status-meta{display:flex;align-items:center;justify-content:flex-end;gap:14px;flex-wrap:wrap}
.live-viewer-status-meta small{color:var(--muted)}
.live-viewer-status-meta small b{color:var(--ink)}
.live-viewer-stale{padding:10px 18px;border-top:1px solid #f0c7c7;background:#fff2f2;color:#8c2d2d;font-size:12px;font-weight:700}
.live-viewer-stale[hidden]{display:none}
.live-viewer-card{overflow:hidden}
.live-viewer-metrics{display:grid;gap:12px}
.live-viewer-metrics-6{grid-template-columns:repeat(6,minmax(0,1fr))}
.live-viewer-metrics-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.live-viewer-metrics-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.live-viewer-metric{min-width:0;border:1px solid var(--line);border-radius:12px;background:#f8fbff;padding:14px 16px}
.live-viewer-metric span{display:block;font-size:11px;color:var(--muted);font-weight:800;margin-bottom:7px}
.live-viewer-metric b{display:flex;align-items:baseline;gap:5px;font-size:24px;line-height:1.15;overflow-wrap:anywhere}
.live-viewer-metric b i{font-style:normal}
.live-viewer-metric b small{font-size:12px;color:var(--muted);font-weight:700}
.live-viewer-metric.primary{border-color:#cce0fb;background:#f7fbff}
.live-viewer-metric.flux{border-color:#d9e8dd;background:#f8fcf9}
.live-viewer-metric.flux.mean{border-color:#b9dcc4;background:#f2faf5}
.live-viewer-subtitle{font-size:12px;font-weight:850;color:#52647f;text-transform:uppercase;letter-spacing:.045em;margin-bottom:10px}
.live-viewer-subtitle-gap{margin-top:20px}
.live-viewer-location-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.live-viewer-location-grid .connect-box b{font-size:17px;overflow-wrap:anywhere}
.live-viewer-map-wrap{margin-top:2px;min-height:300px}
.live-viewer-map-wrap .gnss-map{height:300px}
.live-viewer-map-actions{display:flex;justify-content:flex-end;margin-top:12px}
.live-viewer-map-actions .disabled{pointer-events:none;opacity:.45}
.live-viewer-footer{text-align:center;margin-bottom:8px}
html[data-theme="dark"] .live-viewer-device select{background:#0f2039;border-color:#27415f;color:#edf5ff}
html[data-theme="dark"] .live-viewer-metric{background:#10213d;border-color:#27415f}
html[data-theme="dark"] .live-viewer-metric.primary{background:#10233f;border-color:#29517b}
html[data-theme="dark"] .live-viewer-metric.flux{background:#102a27;border-color:#28574d}
html[data-theme="dark"] .live-viewer-metric.flux.mean{background:#113128;border-color:#33705b}
html[data-theme="dark"] .live-viewer-stale{background:#381b24;color:#ffb8b8;border-color:#63313e}
@media(max-width:1200px){
    .live-viewer-metrics-6{grid-template-columns:repeat(3,minmax(0,1fr))}
    .live-viewer-location-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:780px){
    .live-viewer-status-row{align-items:flex-start;flex-direction:column}
    .live-viewer-status-meta{justify-content:flex-start}
    .live-viewer-device{width:100%;min-width:0}
    .live-viewer-metrics-6,.live-viewer-metrics-3,.live-viewer-metrics-2{grid-template-columns:1fr}
    .live-viewer-location-grid{grid-template-columns:1fr}
    .live-viewer-metric b{font-size:22px}
    .live-viewer-map-wrap,.live-viewer-map-wrap .gnss-map{height:240px;min-height:240px}
    .live-viewer-map-actions{justify-content:stretch}
    .live-viewer-map-actions .btn{width:100%;text-align:center}
}
