﻿/* Metal Works — QC Status board (QCB-001). Styling matches the production board. */
:root {
    --navy: #37474F;
    --blue: #1976D2;
    --grey: #607D8B;
    --hdr: #CFD8DC;
    --light: #ECEFF1;
    --line: #E0E0E0;
    --red-bg: #FFCDD2;
    --yellow-bg: #FFECB3;
    --green-tx: #2E7D32;
    --red-tx: #C62828;
    --sel: #E3F2FD;
    --pcol: 7vw; /* width of each of the 6 percentage columns */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #212121;
    background: #fff;
}

body {
    display: flex;
    flex-direction: column;
}

/* ---------- top bar ---------- */
.topbar {
    flex: 0 0 auto;
    height: 8vh;
    min-height: 54px;
    background: var(--navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.2vw;
}

.brand {
    font-size: 3.0vh;
    font-weight: 600;
    letter-spacing: .5px;
}

.right {
    display: flex;
    align-items: baseline;
    gap: 1.4vw;
}

.totals {
    font-size: 2.0vh;
    font-weight: 600;
    color: #ECEFF1;
}

.stamp {
    font-size: 1.8vh;
    color: #B0BEC5;
}

/* ---------- PM tabs ---------- */
.pmbar {
    flex: 0 0 auto;
    height: 7vh;
    min-height: 44px;
    background: var(--light);
    display: flex;
    align-items: center;
    gap: .6vw;
    padding: 0 1.4vw;
    overflow-x: auto;
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
}

.pmtab {
    font: inherit;
    font-size: 2.1vh;
    font-weight: 600;
    color: var(--navy);
    background: #fff;
    border: 1px solid var(--hdr);
    border-radius: 6px;
    padding: .8vh 1.2vw;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .6vw;
}

    .pmtab:hover {
        background: #EEF3F5;
    }

    .pmtab.active {
        background: var(--navy);
        color: #fff;
        border-color: var(--navy);
    }

.badge {
    background: var(--hdr);
    color: var(--navy);
    border-radius: 10px;
    padding: .1vh .6vw;
    font-size: 1.7vh;
    font-weight: 700;
}

.pmtab.active .badge {
    background: var(--blue);
    color: #fff;
}

/* ---------- two-pane layout ---------- */
.layout {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
}

/* job list (left) */
.jobs-pane {
    width: 26vw;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
    background: #FAFBFC;
}

.jobs-head {
    padding: 1.2vh 1vw;
    background: var(--hdr);
    border-bottom: 1px solid var(--line);
}

.pmname {
    font-size: 2.6vh;
    font-weight: 800;
    color: var(--navy);
}

.pmsummary {
    font-size: 1.7vh;
    color: var(--grey);
    font-weight: 600;
    margin: .2vh 0 .8vh;
}

.job-filter {
    width: 100%;
    font: inherit;
    font-size: 1.9vh;
    padding: .6vh .6vw;
    border: 1px solid #B0BEC5;
    border-radius: 6px;
    background: #fff;
}

.job-list {
    flex: 1 1 auto;
    overflow-y: auto;
}

.jobitem {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: .8vw;
    padding: 1.1vh 1vw;
    border-bottom: 1px solid var(--line);
    border-left: 5px solid transparent;
    cursor: pointer;
}

    .jobitem:hover {
        background: #EEF3F5;
    }

    .jobitem.selected {
        background: var(--sel);
        border-left-color: var(--blue);
    }

.jnum {
    grid-column: 1;
    grid-row: 1;
    font-size: 2.3vh;
    font-weight: 800;
    color: var(--navy);
}

.jdesc {
    grid-column: 1;
    grid-row: 2;
    font-size: 1.8vh;
    color: #546E7A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jcount {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 1.8vh;
    font-weight: 700;
    color: var(--navy);
    background: var(--hdr);
    border-radius: 10px;
    padding: .3vh .7vw;
}

/* job detail (right) */
.detail-pane {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1vw;
    padding: 1.2vh 1.4vw;
    border-bottom: 1px solid var(--line);
}

.dtext {
    flex: 1 1 auto;
    min-width: 0;
}

.jtitle {
    font-size: 2.8vh;
    font-weight: 800;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jsub {
    font-size: 1.8vh;
    color: var(--grey);
    margin-top: .3vh;
}

.tools {
    flex: 0 0 auto;
    display: flex;
    gap: .6vw;
}

.toolbtn {
    font: inherit;
    font-size: 1.7vh;
    font-weight: 600;
    color: var(--navy);
    background: var(--hdr);
    border: none;
    border-radius: 6px;
    padding: .6vh .9vw;
    cursor: pointer;
}

    .toolbtn:hover {
        background: #B0BEC5;
    }

.grid-body {
    flex: 1 1 auto;
    overflow-y: auto;
}

.grid-head, .grow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(6, var(--pcol));
    align-items: center;
    column-gap: .4vw;
    padding-left: 1.4vw;
    padding-right: 1.4vw;
}

.grid-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--hdr);
    color: var(--navy);
    font-weight: 700;
    font-size: 1.9vh;
    padding-top: 1vh;
    padding-bottom: 1vh;
    text-align: center;
}

    .grid-head .g-label {
        text-align: left;
    }

.grow {
    border-bottom: 1px solid var(--line);
    padding-top: .7vh;
    padding-bottom: .7vh;
}

    .grow .label {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .grow .pct {
        text-align: center;
        font-weight: 800;
        padding: .4vh 0;
        border-radius: 6px;
    }

.row-job {
    background: #F7F9FA;
}

    .row-job .label {
        font-size: 2.4vh;
        font-weight: 800;
        color: var(--navy);
    }

    .row-job .pct {
        font-size: 2.4vh;
    }

.row-rel {
    background: #fff;
    cursor: pointer;
}

    .row-rel:hover {
        background: #F5F5F5;
    }

    .row-rel .label {
        font-size: 2.2vh;
        font-weight: 600;
        color: #263238;
    }

    .row-rel .pct {
        font-size: 2.2vh;
    }

.relcount {
    font-size: 1.7vh;
    font-weight: 600;
    color: var(--grey);
    margin-left: .6vw;
}

.row-asm {
    background: #FCFCFD;
}

    .row-asm .label {
        padding-left: 3vw;
        font-size: 2.0vh;
        color: #37474F;
    }

    .row-asm .pct {
        font-size: 2.0vh;
    }

.amark {
    font-weight: 600;
}

.adesc {
    margin-left: .8vw;
    font-size: 1.8vh;
    color: #78909C;
}

.caret {
    display: inline-block;
    width: 2.2vw;
    font-size: 2.2vh;
    color: var(--grey);
}

.empty {
    padding: 4vh 2vw;
    text-align: center;
    color: var(--grey);
    font-size: 2.2vh;
}

/* percentage colors (same as production) */
.pct.p-na {
    color: #90A4AE;
}

.pct.p-zero {
    color: var(--red-tx);
}

.pct.p-low {
    background: var(--red-bg);
}

.pct.p-mid {
    background: var(--yellow-bg);
}

.pct.p-done {
    color: var(--green-tx);
}

/* ---------- footer ---------- */
.footbar {
    flex: 0 0 auto;
    height: 7vh;
    min-height: 44px;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2vw;
    padding: 0 2.2vw;
    position: relative;
}

.navbtn {
    background: #CFD8DC;
    color: var(--navy);
    border: none;
    cursor: pointer;
    font-size: 3vh;
    line-height: 1;
    padding: .4vh 1.4vw;
    border-radius: 6px;
}

    .navbtn:hover {
        background: #B0BEC5;
    }

.dots {
    display: flex;
    gap: 1vw;
}

.dot {
    width: 1.3vh;
    height: 1.3vh;
    border-radius: 50%;
    background: #B0BEC5;
}

    .dot.active {
        background: var(--blue);
    }

.counter {
    position: absolute;
    right: 2.2vw;
    font-size: 2vh;
    color: var(--grey);
    font-weight: 600;
}

.message {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4vh;
    color: var(--grey);
    text-align: center;
    padding: 4vw;
}
