/* ==========================================================
   SATAID Web
   Analysis Workspace
   Web System v0.5.1
========================================================== */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
}

body {
    font-family:
        Arial,
        Tahoma,
        "Noto Sans Thai",
        sans-serif;

    background: #e9eef4;
    color: #162334;

    overflow: hidden;
}


/* ==========================================================
   HEADER
========================================================== */

.top-header {
    height: 88px;

    background: #123862;
    color: #fff;

    padding: 7px 16px 0;

    box-shadow:
        0 2px 6px rgba(0,0,0,.15);
}

.brand {
    height: 42px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;
}

.brand-left {
    display: flex;
    align-items: baseline;

    gap: 12px;

    min-width: 0;
}

.brand strong {
    font-size:
        clamp(18px,1.5vw,23px);

    white-space: nowrap;
}

.brand span {
    font-size:
        clamp(10px,.9vw,14px);

    opacity: .88;

    white-space: nowrap;
}

.brand-right {
    font-size:
        clamp(9px,.75vw,12px);

    opacity: .80;

    white-space: nowrap;
}


/* ==========================================================
   NAVIGATION
========================================================== */

nav {
    height: 39px;

    display: flex;
    align-items: flex-end;

    gap: 3px;

    overflow: hidden;
}

nav a {
    height: 39px;

    display: flex;
    align-items: center;

    padding:
        0 clamp(8px,1vw,14px);

    color: #fff;

    text-decoration: none;

    border-radius:
        5px 5px 0 0;

    font-size:
        clamp(10px,.85vw,14px);

    white-space: nowrap;
}

nav a:hover {
    background:
        rgba(255,255,255,.12);
}

nav a.active {
    background: #245888;
}


/* ==========================================================
   WORKSPACE
========================================================== */

.workspace {
    width: 100vw;

    height:
        calc(100vh - 88px);

    display: grid;

    grid-template-columns:
        clamp(220px,18vw,280px)
        minmax(0,1fr);

    overflow: hidden;
}


/* ==========================================================
   SIDEBAR
========================================================== */

.sidebar {
    height: 100%;

    background: #f8fafc;

    border-right:
        1px solid #cbd5df;

    padding:
        clamp(9px,1vw,14px);

    overflow-y: auto;
    overflow-x: hidden;

    scrollbar-width: thin;
}

.sidebar-title {
    padding-bottom: 8px;

    border-bottom:
        1px solid #d9e0e7;

    margin-bottom: 9px;
}

.sidebar-title h2 {
    margin: 0;

    color: #173653;

    font-size:
        clamp(14px,1.1vw,18px);
}

.sidebar-title small {
    display: block;

    margin-top: 3px;

    color: #728091;

    font-size:
        clamp(9px,.72vw,11px);
}


/* ==========================================================
   QUICK ANALYSIS
========================================================== */

.quick-analysis {
    margin-bottom: 11px;

    padding: 8px;

    background: #eaf0f5;

    border:
        1px solid #c8d3df;

    border-radius: 6px;
}

.quick-title {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 5px;
}

.quick-title span {
    color: #24415f;

    font-size:
        clamp(10px,.82vw,13px);

    font-weight: bold;
}

.quick-title small {
    color: #7a8997;

    font-size:
        clamp(8px,.62vw,10px);
}

#quickAnalysisSelect {
    width: 100%;
    height: 30px;

    padding: 0 7px;

    border:
        1px solid #9eacba;

    border-radius: 4px;

    background: #fff;

    color: #26384d;

    font-size:
        clamp(9px,.72vw,11px);
}


/* ==========================================================
   SIDEBAR HEADINGS
========================================================== */

.parameter-heading,
.level-heading {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 6px;
}

.parameter-heading span,
.level-heading span {
    color: #34475c;

    font-size:
        clamp(10px,.82vw,13px);

    font-weight: bold;
}

.parameter-heading small,
.level-heading small {
    color: #83909e;

    font-size:
        clamp(8px,.65vw,10px);
}


/* ==========================================================
   PARAMETER GROUP
========================================================== */

.parameter-groups {
    display: flex;
    flex-direction: column;

    gap: 5px;
}

.parameter-group {
    border:
        1px solid #cbd5df;

    border-radius: 5px;

    overflow: hidden;

    background: #fff;
}

.parameter-group-title {
    width: 100%;

    min-height: 31px;

    padding: 5px 8px;

    border: 0;

    background: #eaf0f5;

    color: #24394f;

    display: flex;

    justify-content: space-between;
    align-items: center;

    cursor: pointer;

    text-align: left;

    font-weight: bold;

    font-size:
        clamp(10px,.8vw,12px);
}

.parameter-group-title:hover {
    background: #dde8f1;
}

.parameter-group-title small {
    color: #728090;

    font-weight: normal;

    font-size:
        clamp(8px,.65vw,10px);
}

.parameter-list {
    padding: 3px;

    display: flex;
    flex-direction: column;

    gap: 1px;
}

.parameter-list.collapsed {
    display: none;
}

.parameter-item {
    width: 100%;

    min-height: 25px;

    padding: 3px 6px;

    border: 0;

    border-radius: 4px;

    background: transparent;

    display: flex;

    align-items: center;

    gap: 6px;

    cursor: pointer;

    text-align: left;

    color: #35475a;

    font-size:
        clamp(9px,.75vw,12px);
}

.parameter-item:hover {
    background: #edf3f8;
}

.parameter-item.selected {
    background: #dff3df;

    color: #17251b;

    box-shadow:
        inset 3px 0 0 #2f8f46;

    border:
        1px solid #78b987;
}

.parameter-dot {
    width: 8px;
    height: 8px;

    border:
        1px solid currentColor;

    border-radius: 50%;

    flex: 0 0 auto;
}

.parameter-item.selected
.parameter-dot {
    background: #2f8f46;
    border-color: #2f8f46;
}

.parameter-name {
    font-weight: bold;
}

.parameter-fullname {
    opacity: .73;

    margin-left: 2px;

    font-size:
        clamp(8px,.62vw,10px);
}


/* ==========================================================
   LEVEL
========================================================== */

.level-section {
    margin-top: 10px;

    padding-top: 8px;

    border-top:
        1px solid #d8e0e7;
}

.levels {
    display: grid;

    grid-template-columns:
        repeat(3,minmax(0,1fr));

    gap: 5px;
}

.levels button {
    min-height: 28px;

    border:
        1px solid #9daab7;

    border-radius: 5px;

    background: #fff;

    color: #26384d;

    cursor: pointer;

    font-size:
        clamp(9px,.7vw,11px);
}

.levels button:hover {
    background: #edf3f8;
}

.levels button.selected {
    background: #164f83;

    border-color: #164f83;

    color: #fff;

    font-weight: bold;
}


/* ==========================================================
   ACTIVE INFO
========================================================== */

.active-info {
    margin-top: 11px;

    padding: 7px;

    background: #e9eef4;

    border-left:
        4px solid #245888;

    display: flex;
    flex-direction: column;

    gap: 3px;
}

.active-info small {
    color: #768392;

    font-size: 8px;
}

.active-info strong {
    color: #173653;

    font-size:
        clamp(10px,.9vw,14px);
}

.active-info span {
    color: #647080;

    font-size:
        clamp(8px,.7vw,11px);
}

.sidebar-note {
    margin-top: 13px;

    padding-top: 8px;

    border-top:
        1px solid #d6dde5;

    color: #778391;

    font-size:
        clamp(8px,.62vw,10px);

    line-height: 1.55;
}


/* ==========================================================
   VIEWER
========================================================== */

.viewer {
    position: relative;

    min-width: 0;
    min-height: 0;

    height: 100%;

    display: grid;

    grid-template-rows:
        auto minmax(0,1fr) 28px;

    background: #151d27;

    overflow: hidden;
}


/* ==========================================================
   VIEWER TOOLBAR
========================================================== */

.viewer-toolbar {
    min-height: 66px;

    padding: 6px 10px;

    background: #fff;

    border-bottom:
        1px solid #cbd4dd;

    display: grid;

    grid-template-columns:
        minmax(180px,1fr)
        auto
        minmax(340px,1fr);

    align-items: center;

    gap:
        clamp(8px,1vw,18px);
}


/* PRODUCT */

.product-info {
    min-width: 0;
}

.product-type {
    margin-bottom: 1px;

    color: #1760a1;

    font-size:
        clamp(7px,.62vw,9px);

    font-weight: bold;

    letter-spacing: .7px;
}

.product-info h1 {
    margin: 0;

    color: #162b43;

    font-size:
        clamp(15px,1.3vw,20px);

    white-space: nowrap;
}

.time-display {
    margin-top: 3px;

    display: flex;

    flex-wrap: wrap;

    gap:
        clamp(6px,.8vw,14px);

    color: #667585;

    font-size:
        clamp(8px,.72vw,11px);
}


/* ==========================================================
   ANIMATION TOOLBAR
========================================================== */

.animation-toolbar {
    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 3px;
}

.animation-label {
    color: #83909c;

    font-size: 8px;

    text-transform: uppercase;

    letter-spacing: .5px;
}

.frame-controls {
    display: inline-flex;

    align-items: center;

    border:
        1px solid #aebac5;

    border-radius: 6px;

    overflow: hidden;

    background: #f7f9fb;

    box-shadow:
        0 1px 2px rgba(0,0,0,.04);
}

.frame-controls button {
    height: 32px;

    padding:
        0 clamp(8px,.8vw,13px);

    border: 0;

    border-right:
        1px solid #c5ced7;

    background: transparent;

    color: #2b4055;

    cursor: pointer;

    font-size:
        clamp(9px,.72vw,11px);

    white-space: nowrap;
}

.frame-controls button:last-child {
    border-right: 0;
}

.frame-controls button:hover {
    background: #e8f0f6;
}

.frame-controls .play-button {
    min-width: 67px;

    background: #e7f1f8;

    color: #15598e;

    font-weight: bold;
}

.frame-controls .play-button:hover {
    background: #dcecf7;
}


/* ==========================================================
   RIGHT TOOLS
========================================================== */

.viewer-tools {
    min-width: 0;

    display: flex;

    align-items: center;
    justify-content: flex-end;

    gap: 8px;
}

.latest-status {
    height: 27px;

    padding: 0 9px;

    display: inline-flex;

    align-items: center;

    border:
        1px solid #c6ced5;

    border-radius: 14px;

    background: #f0f2f4;

    color: #707a83;

    font-size:
        clamp(8px,.63vw,10px);

    font-weight: bold;

    white-space: nowrap;
}

.latest-status.active {
    background: #e4f5ea;

    border-color: #a9d5b7;

    color: #176536;
}

.tool-buttons {
    display: inline-flex;

    align-items: center;

    gap: 4px;
}

.tool-buttons button {
    height: 32px;

    padding:
        0 clamp(7px,.65vw,11px);

    border:
        1px solid #9ba9b6;

    border-radius: 5px;

    background: #fff;

    color: #263b52;

    cursor: pointer;

    font-size:
        clamp(9px,.7vw,11px);

    white-space: nowrap;
}

.tool-buttons button:hover {
    background: #edf3f8;
}

.info-button {
    border-color:
        #6f9fc3 !important;

    color:
        #185b91 !important;
}

.presentation-button {
    background:
        #164f83 !important;

    border-color:
        #164f83 !important;

    color:
        #fff !important;
}

.presentation-button:hover {
    background:
        #1b609a !important;
}


/* ==========================================================
   IMAGE
========================================================== */

.image-stage {
    position: relative;

    min-width: 0;
    min-height: 0;

    width: 100%;
    height: 100%;

    display: flex;

    justify-content: center;
    align-items: center;

    overflow: hidden;

    background:
        radial-gradient(
            circle at center,
            #263442 0%,
            #111820 75%
        );
}

#weatherImage {
    display: none;

    width: auto;
    height: auto;

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;

    user-select: none;
}

.loading-message,
.no-data-message {
    position: absolute;

    left: 50%;
    top: 50%;

    transform:
        translate(-50%,-50%);

    color: #fff;

    font-size:
        clamp(13px,1vw,18px);

    text-align: center;
}


/* ==========================================================
   COMPACT TIME BAR
========================================================== */

.time-bar {
    height: 28px;

    padding: 2px 10px;

    background: #eef2f5;

    border-top:
        1px solid #c7d0d8;

    display: flex;

    align-items: center;

    gap: 8px;
}

.time-bar-label {
    color: #687785;

    font-size: 9px;
}

#timeSlider {
    flex: 1;

    min-width: 80px;

    height: 16px;

    margin: 0;

    cursor: pointer;
}

.frame-counter {
    min-width: 48px;

    color: #536170;

    text-align: right;

    font-size: 9px;
}


/* ==========================================================
   DRAWER
========================================================== */

.parameter-drawer {
    position: absolute;

    top: 0;
    right: 0;

    width:
        clamp(310px,28vw,420px);

    height: 100%;

    z-index: 60;

    background: #fff;

    border-left:
        1px solid #b8c5d1;

    box-shadow:
        -6px 0 24px rgba(0,0,0,.22);

    transform:
        translateX(105%);

    transition:
        transform .22s ease;

    display: flex;
    flex-direction: column;
}

.parameter-drawer.open {
    transform:
        translateX(0);
}

.drawer-header {
    min-height: 72px;

    padding: 13px 15px;

    background: #f4f7fa;

    border-bottom:
        1px solid #d3dde6;

    display: flex;

    align-items: center;
    justify-content: space-between;
}

.drawer-header small {
    display: block;

    margin-bottom: 4px;

    color: #64809a;

    font-size: 9px;

    font-weight: bold;

    letter-spacing: .7px;
}

.drawer-header h2 {
    margin: 0;

    color: #183a5c;

    font-size: 19px;
}

#closeDrawer {
    width: 36px;
    height: 36px;

    border: 0;

    border-radius: 50%;

    background: transparent;

    color: #44586c;

    font-size: 26px;

    cursor: pointer;
}

#closeDrawer:hover {
    background: #e3eaf0;
}

.drawer-content {
    padding: 16px;

    overflow-y: auto;
}

.drawer-section {
    padding-bottom: 15px;

    margin-bottom: 15px;

    border-bottom:
        1px solid #e0e6ec;
}

.drawer-section h3 {
    margin: 0 0 7px;

    color: #284a6b;

    font-size: 13px;
}

.drawer-section p {
    margin: 0;

    color: #475767;

    font-size: 12px;

    line-height: 1.7;
}

.drawer-fullname {
    color: #167033;

    font-weight: bold;

    font-size: 15px;
}

.drawer-levels {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;
}

.drawer-level {
    padding: 6px 9px;

    border:
        1px solid #aebbc7;

    border-radius: 4px;

    background: #f5f8fa;

    color: #344a60;

    font-size: 11px;
}

.drawer-level.current {
    background: #1760a1;

    border-color: #1760a1;

    color: #fff;
}

.drawer-note {
    padding: 11px;

    margin-bottom: 0;

    background: #edf5fb;

    border:
        1px solid #c8ddec;

    border-radius: 5px;
}

.drawer-note strong {
    display: block;

    margin-bottom: 5px;

    color: #285a83;

    font-size: 12px;
}

.drawer-backdrop {
    display: none;

    position: absolute;

    inset: 0;

    z-index: 50;

    background:
        rgba(4,12,20,.18);
}

.drawer-backdrop.open {
    display: block;
}


/* ==========================================================
   PRESENTATION
========================================================== */

.presentation-header,
.presentation-controls {
    display: none;
}

body.presentation-mode {
    overflow: hidden;

    background: #080d13;
}

body.presentation-mode .top-header,
body.presentation-mode .sidebar {
    display: none;
}

body.presentation-mode .workspace {
    display: block;

    width: 100vw;
    height: 100vh;
}

body.presentation-mode .viewer {
    display: block;

    width: 100vw;
    height: 100vh;
}

body.presentation-mode .viewer-toolbar,
body.presentation-mode .time-bar,
body.presentation-mode .parameter-drawer,
body.presentation-mode .drawer-backdrop {
    display: none;
}

body.presentation-mode .presentation-header {
    position: absolute;

    display: flex;

    top: 0;
    left: 0;
    right: 0;

    min-height: 70px;

    padding: 10px 16px;

    align-items: center;
    justify-content: space-between;

    z-index: 20;

    color: #fff;

    background:
        linear-gradient(
            to bottom,
            rgba(3,9,15,.90),
            rgba(3,9,15,.55),
            rgba(3,9,15,0)
        );
}

.presentation-product {
    display: flex;
    flex-direction: column;

    gap: 3px;
}

.presentation-product small {
    color: #91a9bf;

    font-size:
        clamp(8px,.7vw,10px);
}

.presentation-product strong {
    font-size:
        clamp(17px,1.6vw,22px);
}

.presentation-product span {
    color: #d4dde6;

    font-size:
        clamp(9px,.85vw,13px);
}

.presentation-actions {
    display: flex;

    align-items: center;

    gap: 7px;
}

.presentation-actions button {
    height: 34px;

    padding: 0 11px;

    border:
        1px solid rgba(255,255,255,.45);

    border-radius: 5px;

    background:
        rgba(20,30,40,.70);

    color: #fff;

    cursor: pointer;
}

.presentation-latest {
    color: #8c99a5;

    font-size: 10px;

    font-weight: bold;
}

.presentation-latest.active {
    color: #66e397;
}

.exit-presentation {
    border-color:
        #d88989 !important;
}

body.presentation-mode .image-stage {
    width: 100vw;
    height: 100vh;

    background: #080d13;
}

body.presentation-mode #weatherImage {
    max-width: 100vw;
    max-height: 100vh;
}

body.presentation-mode .presentation-controls {
    position: absolute;

    display: flex;

    left: 50%;

    bottom:
        clamp(10px,2vh,20px);

    transform:
        translateX(-50%);

    width:
        min(
            900px,
            calc(100vw - 30px)
        );

    min-height: 52px;

    padding: 7px 10px;

    align-items: center;

    gap: 7px;

    z-index: 20;

    background:
        rgba(7,14,22,.84);

    border:
        1px solid rgba(255,255,255,.18);

    border-radius: 9px;
}

.presentation-controls button {
    height: 36px;

    min-width: 42px;

    padding: 0 10px;

    border:
        1px solid rgba(255,255,255,.28);

    border-radius: 5px;

    background: #172636;

    color: #fff;

    cursor: pointer;
}

.presentation-play {
    background:
        #1c5685 !important;
}

#presentationSlider {
    flex: 1;

    min-width: 100px;
}

#presentationCounter {
    min-width: 50px;

    color: #dbe4ed;

    font-size: 11px;

    text-align: right;
}


/* ==========================================================
   FULL SCREEN
========================================================== */

.viewer:fullscreen {
    width: 100vw;
    height: 100vh;

    background: #080d13;
}


/* ==========================================================
   RESPONSIVE DESKTOP
========================================================== */

@media (max-width: 1500px) {

    .workspace {
        grid-template-columns:
            clamp(205px,17vw,245px)
            minmax(0,1fr);
    }

    .viewer-toolbar {
        grid-template-columns:
            minmax(160px,.9fr)
            auto
            minmax(320px,1.1fr);
    }

}


@media (max-width: 1250px) {

    .workspace {
        grid-template-columns:
            205px minmax(0,1fr);
    }

    .parameter-fullname {
        display: none;
    }

    .viewer-toolbar {
        grid-template-columns:
            minmax(140px,.8fr)
            auto
            minmax(285px,1fr);

        gap: 6px;
    }

    .tool-buttons button,
    .frame-controls button {
        padding-left: 6px;
        padding-right: 6px;
    }

    .info-button {
        max-width: 92px;

        overflow: hidden;

        text-overflow: ellipsis;
    }

}


@media (max-width: 1050px) {

    .brand-right {
        display: none;
    }

    .viewer-toolbar {
        grid-template-columns:
            minmax(150px,1fr)
            auto;

        grid-template-areas:
            "product tools"
            "animation animation";

        row-gap: 5px;
    }

    .product-info {
        grid-area: product;
    }

    .animation-toolbar {
        grid-area: animation;
    }

    .viewer-tools {
        grid-area: tools;
    }

}


/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 850px) {

    body {
        overflow: auto;
    }

    .workspace {
        display: block;

        height: auto;
    }

    .sidebar {
        height: auto;
    }

    .viewer {
        min-height:
            calc(100vh - 88px);
    }

    .viewer-toolbar {
        display: flex;

        flex-direction: column;

        align-items: stretch;
    }

    .viewer-tools {
        justify-content: center;

        flex-wrap: wrap;
    }

    .tool-buttons {
        flex-wrap: wrap;

        justify-content: center;
    }

    .animation-toolbar {
        width: 100%;
    }

    .image-stage {
        min-height: 420px;
    }

    .parameter-drawer {
        width:
            min(90vw,380px);
    }

}


/* ==========================================================
   SHORT DESKTOP
========================================================== */

@media
(max-height: 800px)
and (min-width: 851px) {

    .top-header {
        height: 82px;
    }

    .brand {
        height: 39px;
    }

    nav,
    nav a {
        height: 36px;
    }

    .workspace {
        height:
            calc(100vh - 82px);
    }

    .viewer-toolbar {
        min-height: 60px;
    }

    .quick-analysis {
        padding: 6px;

        margin-bottom: 8px;
    }

    .parameter-group-title {
        min-height: 28px;
    }

    .parameter-item {
        min-height: 23px;
    }

    .time-bar {
        height: 26px;
    }

}


/* ==========================================================
   ANALYSIS INSTITUTIONAL HEADER POLISH
   Keep workspace dimensions unchanged
========================================================== */

.top-header .brand-left {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
}

.top-header .brand strong {
    font-size: clamp(20px, 1.55vw, 24px);
    line-height: 1.05;
    font-weight: 800;
}

.top-header .brand span {
    font-size: clamp(11px, .85vw, 13px);
    line-height: 1.1;
    opacity: .92;
}

.top-header .brand-right {
    font-size: clamp(10px, .8vw, 12px);
    font-weight: 600;
    opacity: .88;
}

.top-header nav a {
    font-size: clamp(13px, 1vw, 16px);
    font-weight: 600;
    padding-left: clamp(9px, 1.05vw, 15px);
    padding-right: clamp(9px, 1.05vw, 15px);
}


/* Short desktop: retain compact header while keeping text readable */

@media (max-height: 800px) and (min-width: 851px) {

    .top-header .brand strong {
        font-size: clamp(19px, 1.45vw, 22px);
    }

    .top-header .brand span {
        font-size: clamp(10px, .8vw, 12px);
    }

    .top-header nav a {
        font-size: clamp(12px, .95vw, 15px);
    }
}


/* ==========================================================
   ANALYSIS COMPACT HEADER v2
========================================================== */

.top-header {
    height: 64px;
    padding: 0 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 9px;

    flex: 0 0 auto;
    min-width: 0;
}

.header-logo {
    width: 46px;
    height: 46px;

    object-fit: contain;
    flex: 0 0 auto;
}

.header-agency {
    display: flex;
    flex-direction: column;
    justify-content: center;

    gap: 0;
    white-space: nowrap;
}

.header-agency strong {
    font-size: 21px;
    line-height: 1.05;
    font-weight: 800;
}

.header-agency span {
    font-size: 12px;
    line-height: 1.05;
    font-weight: 600;
    opacity: .94;
}


/* Navigation */

.top-header .main-nav {
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 5px;

    margin-left: auto;
    overflow: visible;
}

.top-header .main-nav a {
    height: 42px;

    display: flex;
    align-items: center;

    padding: 0 13px;

    font-size: 20px;
    line-height: 1;
    font-weight: 700;

    border-radius: 5px;
}

.top-header .main-nav a.active {
    background: #245888;
}


/* Workspace gains vertical space */

.workspace {
    height: calc(100vh - 64px);
}


/* Short desktop */

@media (max-height: 800px) and (min-width: 851px) {

    .top-header {
        height: 60px;
    }

    .header-logo {
        width: 42px;
        height: 42px;
    }

    .header-agency strong {
        font-size: 20px;
    }

    .header-agency span {
        font-size: 11px;
    }

    .top-header .main-nav {
        height: 60px;
    }

    .top-header .main-nav a {
        height: 38px;
        font-size: 19px;
        padding-left: 11px;
        padding-right: 11px;
    }

    .workspace {
        height: calc(100vh - 60px);
    }
}



/* ==========================================================
   SATAID WEB 3 MAIN TASKS FINAL v1
========================================================== */

.main-task-menu {
    display: grid;
    gap: 4px;

    margin: 0 0 7px 0;
}

.main-task-item {
    min-height: 38px;

    display: grid;
    grid-template-columns: 25px minmax(0,1fr);

    align-items: center;
    gap: 6px;

    padding: 5px 7px;

    border: 1px solid #c7d4dc;
    border-radius: 5px;

    background: #ffffff;

    color: #17384a;
    text-decoration: none;

    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
}

.main-task-item:hover {
    border-color: #8db6c9;
    background: #eaf4f9;
}

.main-task-item.active {
    border-color: #176e98;
    background: #176e98;

    color: #ffffff;

    font-weight: 900;
}

.task-number {
    color: #6f8793;

    font-size: 9px;
    font-weight: 900;

    text-align: center;
}

.main-task-item.active .task-number {
    color: #d9f2ff;
}

.task-label {
    min-width: 0;
}

.sidebar-context-separator {
    height: 1px;

    margin: 0 0 8px 0;

    background: #cad7de;
}


/* Compact for shorter desktop screens */

@media (max-height: 800px) and (min-width: 851px) {

    .main-task-menu {
        gap: 3px;
        margin-bottom: 6px;
    }

    .main-task-item {
        min-height: 34px;

        padding-top: 4px;
        padding-bottom: 4px;

        font-size: 10.5px;
    }

    .sidebar-context-separator {
        margin-bottom: 6px;
    }

}



/* ==========================================================
   ANALYSIS SIDEBAR TYPOGRAPHY POLISH v1
   Readability improvement without increasing sidebar width
========================================================== */

/* 3 Main Tasks */

.main-task-item {
    font-size: 12.5px;
    line-height: 1.25;
}

.task-number {
    font-size: 10.5px;
}

.main-task-item.active {
    font-weight: 800;
}


/* Context title */

.sidebar-title h2 {
    font-size: 15px;
    line-height: 1.2;
}

.sidebar-title small {
    font-size: 10.5px;
    line-height: 1.25;
}


/* Quick Analysis */

.quick-title span {
    font-size: 12px;
    font-weight: 800;
}

.quick-title small {
    font-size: 9.5px;
}

.quick-analysis select {
    font-size: 11.5px;
}


/* Parameter / Level headings */

.parameter-heading span,
.level-heading span {
    font-size: 11.5px;
    font-weight: 800;
}

.parameter-heading small,
.level-heading small {
    font-size: 9.5px;
}


/* Parameter groups */

.parameter-group-title {
    font-size: 11.5px;
    font-weight: 800;
}

.parameter-group-title small {
    font-size: 9px;
}


/* Parameter buttons / labels */

.parameter-button,
.parameter-item,
.parameter-option {
    font-size: 11.5px;
    line-height: 1.25;
}


/* Pressure-level buttons */

.levels button,
.level-button {
    font-size: 11px;
    line-height: 1.2;
}


/* Active layer information */

.active-info small {
    font-size: 9.5px;
}

.active-info strong {
    font-size: 12px;
}

.active-info span {
    font-size: 10.5px;
}


/* Keep compact layout on short desktop,
   but do not shrink text back to tiny sizes */

@media (max-height: 800px) and (min-width: 851px) {

    .main-task-item {
        font-size: 12px;
    }

    .task-number {
        font-size: 10px;
    }

    .sidebar-title h2 {
        font-size: 14.5px;
    }

}



/* ==========================================================
   MAIN TASK MENU POLISH v1
   Primary navigation: pale green + dark text
========================================================== */

.main-task-menu {
    display: grid;
    gap: 5px;

    margin: 0 0 9px 0;
}


/* Main menu */

.main-task-item {
    min-height: 42px;

    display: flex;
    align-items: center;

    padding: 6px 10px;

    border: 1px solid #a9d5b3;
    border-radius: 6px;

    background: #e5f6e8;

    color: #102b1a;

    text-decoration: none;

    font-size: 13.5px;
    line-height: 1.25;
    font-weight: 800;
}


/* Hover */

.main-task-item:hover {
    background: #d5efd9;
    border-color: #86c395;

    color: #071c0e;
}


/* Active main task */

.main-task-item.active {
    background: #bfe8c6;
    border-color: #72b984;

    color: #071c0e;

    font-weight: 900;

    box-shadow:
        inset 4px 0 0 #27844b;
}


/* Full width label */

.task-label {
    display: block;
    width: 100%;

    color: inherit;
}


/* Remove number-column layout from older version */

.task-number {
    display: none;
}


/* Context separator */

.sidebar-context-separator {
    height: 1px;

    margin: 0 0 9px 0;

    background: #bdcdd2;
}


/* Keep readable on short desktop */

@media (max-height: 800px) and (min-width: 851px) {

    .main-task-menu {
        gap: 4px;
        margin-bottom: 7px;
    }

    .main-task-item {
        min-height: 38px;

        padding: 5px 9px;

        font-size: 13px;
    }

}


/* ============================================================
   SST COLOR SCALE
============================================================ */


/* ============================================================
   SST FINAL HEADER
   Thai title + color scale + time
   ============================================================ */

.sst-legend {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    pointer-events: none;
}

.sst-legend[hidden] {
    display: none;
}

.product-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.product-title-row h1 {
    flex: 0 0 auto;
}

/* SST mode only */
.viewer-toolbar.sst-mode {
    grid-template-columns:
        minmax(560px, 1.45fr)
        auto
        minmax(300px, 1fr);

    gap: 10px;
}

.viewer-toolbar.sst-mode .product-info h1 {
    font-size: clamp(15px, 1.05vw, 18px);
    font-weight: 700;
    white-space: nowrap;
}

.viewer-toolbar.sst-mode .sst-legend img {
    display: block;
    width: clamp(210px, 14vw, 260px);
    height: auto;
    max-height: 40px;
    object-fit: contain;
    flex: 0 0 auto;
}

/* Caption is no longer needed because Thai title is used as main title */
.viewer-toolbar.sst-mode .sst-legend-caption {
    display: none;
}

/* Keep UTC / TH visible under the title row */
.viewer-toolbar.sst-mode .time-display {
    margin-top: 2px;
    font-size: clamp(8px, .7vw, 10px);
    line-height: 1.1;
}

/* Protect animation controls from being compressed */
.viewer-toolbar.sst-mode .animation-toolbar,
.viewer-toolbar.sst-mode .viewer-tools {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

@media (max-width: 1300px) {

    .viewer-toolbar.sst-mode {
        grid-template-columns:
            minmax(470px, 1.3fr)
            auto
            minmax(260px, 1fr);
    }

    .viewer-toolbar.sst-mode .sst-legend img {
        width: 190px;
    }
}

@media (max-width: 1000px) {

    .viewer-toolbar.sst-mode {
        grid-template-columns:
            minmax(360px, 1.2fr)
            auto
            minmax(220px, 1fr);
    }

    .viewer-toolbar.sst-mode .product-info h1 {
        font-size: 14px;
    }

    .viewer-toolbar.sst-mode .sst-legend img {
        width: 150px;
    }
}

/* ============================================================
   SST FINAL - TIME VISIBILITY
   Give SST title + scale + UTC/TH enough vertical room
   ============================================================ */

.viewer-toolbar.sst-mode {
    min-height: 76px;
}

.viewer-toolbar.sst-mode .time-display {
    margin-top: 3px;
    line-height: 1.25;
    overflow: visible;
}


/* SST FINAL - timestamp readability */
.viewer-toolbar.sst-mode .time-display {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
}

