:root {
    --bg: #000;
    --panel: #020202;
    --border: #27313d;
    --accent: #139ee9;
    --text: #fff;
    --muted: #b9c0c8;
    --orange: #ff6f13;
    --cyan: #38a9bf;
}

/* =========================================================
   GLOBAL
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    background: #000;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    overflow: hidden;
}

.hidden {
    display: none !important;
}


/* =========================================================
   LOGIN
   ========================================================= */

.login-shell {
    height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(
            circle at 50% 35%,
            #111 0,
            #030303 45%,
            #000 75%
        );
}

.login-card {
    width: min(460px, 88vw);
    padding: 42px 46px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #050505;
    box-shadow: 0 25px 80px #000;
    text-align: center;
}

.login-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.login-card h1 {
    margin: 0;
    color: var(--orange);
    font-size: 42px;
    letter-spacing: 2px;
}

.login-card h2 {
    margin: 2px 0 32px;
    color: var(--cyan);
    font-size: 25px;
}

.login-card label {
    display: block;
    text-align: left;
    margin: 14px 0 7px;
    font-weight: 700;
}

.login-card input {
    width: 100%;
    height: 48px;
    border: 1px solid #4d5966;
    border-radius: 8px;
    background: #0a0a0a;
    color: #fff;
    font-size: 21px;
    padding: 0 14px;
    outline: none;
}

.login-card input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px #139ee933;
}

.login-card button {
    width: 100%;
    height: 50px;
    margin-top: 24px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 19px;
    font-weight: 800;
    cursor: pointer;
}

.login-error {
    height: 24px;
    margin-top: 12px;
    color: #ff5858;
    font-weight: 700;
}


/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard {
    width: 100vw;
    height: 100vh;

    padding: 8px 16px 12px;

    display: grid;
    grid-template-rows: 86px 190px 1fr;

    gap: 10px;

    background: #000;
}


/* =========================================================
   TOP BAR
   ========================================================= */

.topbar {
    display: grid;

    /*
       Logo | Date | Last Updated | Next Update | Space | Logout
    */
    grid-template-columns:
        330px
        125px
        225px
        145px
        1fr
        72px;

    gap: 10px;
    align-items: stretch;
}


/* =========================================================
   WAREHOUSE LOGO
   ATL / LVL / OKC
   ========================================================= */

.logo-wrap {
    width: 330px;
    height: 86px;

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

    overflow: visible;

    flex-shrink: 0;
}

.logo-wrap img,
.warehouse-logo {
    display: block;

    width: 320px;
    height: 82px;

    max-width: none;
    max-height: none;

    object-fit: contain;
    object-position: left center;
}


/* =========================================================
   DATE / UPDATE CARDS
   ========================================================= */

.meta-card {
    border: 1px solid var(--border);
    border-radius: 20px;

    padding: 12px 16px;

    display: flex;
    flex-direction: column;

    justify-content: center;

    gap: 8px;
}

.meta-card span {
    font-size: 15px;
    font-weight: 800;
    text-align: center;
}

.meta-card strong {
    border-bottom: 2px solid var(--accent);

    padding: 4px 8px;

    font-size: 18px;

    white-space: nowrap;
}


/* =========================================================
   LOGOUT
   ========================================================= */

.logout {
    align-self: start;

    margin-top: 8px;

    border: 1px solid #4b5661;

    background: #080808;

    color: #d5dbe1;

    border-radius: 8px;

    padding: 9px 11px;

    cursor: pointer;
}


/* =========================================================
   PANELS
   ========================================================= */

.panel,
.section-title {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--panel);
}


/* =========================================================
   KPI ROW
   ========================================================= */

.kpi-grid {
    display: grid;

    grid-template-columns:
        290px
        290px
        255px
        1fr;

    gap: 12px;
}

.kpi h3,
.active-willcalls .table-title {
    height: 56px;

    margin: 0;

    border-bottom: 2px solid var(--accent);

    display: flex;

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

    font-size: 24px;
}

.kpi-value {
    height: 120px;

    display: grid;

    place-items: center;

    font-size: 58px;
    font-weight: 900;
}


/* =========================================================
   ACTIVE WILL CALLS
   ========================================================= */

.active-willcalls {
    padding: 0 14px;
}

.table-title {
    display: grid !important;

    grid-template-columns:
        1fr
        1fr;

    justify-items: center !important;

    font-size: 20px !important;
    font-weight: 800;
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.content-grid {
    display: grid;

    grid-template-columns:
        40%
        60%;

    gap: 12px;

    min-height: 0;
}

.left-column {
    display: grid;

    grid-template-rows:
        58px
        155px
        58px
        1fr;

    gap: 10px;

    min-height: 0;
}


/* =========================================================
   SECTION TITLES
   ========================================================= */

.section-title {
    border-radius: 6px;

    display: grid;

    place-items: center;

    font-size: 31px;
    font-weight: 900;
}


/* =========================================================
   AGING BUCKETS
   ========================================================= */

.aging-row {
    display: grid;

    grid-template-columns:
        1fr
        1fr
        1fr;

    gap: 28px;
}

.aging {
    border: 1px solid #fff;

    border-radius: 24px;

    text-align: center;

    padding: 10px 16px;

    color: #000;

    overflow: hidden;
}

.aging h3 {
    margin: 3px 0 0;

    padding-bottom: 12px;

    border-bottom: 2px solid var(--accent);

    font-size: 23px;
}

.aging div {
    font-size: 57px;
    font-weight: 900;

    margin-top: 12px;
}

.aging.green {
    background: #08cf49;
}

.aging.yellow {
    background: #ffda3a;
}

.aging.red {
    background: #f50000;
}


/* =========================================================
   OVERDUE / SHIPMENTS PANELS
   ========================================================= */

.overdue-panel,
.shipments-panel {
    padding: 0 14px;

    min-height: 0;

    overflow: hidden;
}

.shipments-panel {
    border-radius: 6px;
}

.shipments-panel > h3 {
    margin: 0;

    height: 52px;

    display: grid;

    place-items: center;

    font-size: 23px;
}


/* =========================================================
   SHIPMENT TABLE HEADER
   ========================================================= */

.table-head {
    display: grid;

    grid-template-columns:
        60%
        40%;

    padding: 4px 8px 9px;

    border-bottom: 2px solid var(--accent);

    font-size: 18px;
    font-weight: 800;
}


/* =========================================================
   AUTO SCROLL
   ========================================================= */

.auto-scroll {
    height: calc(100% - 62px);

    overflow: hidden;

    position: relative;
}

.overdue-panel .auto-scroll,
.active-willcalls .auto-scroll {
    height: calc(100% - 57px);
}

.scroll-inner {
    will-change: transform;
}


/* =========================================================
   TABLES
   ========================================================= */

table {
    border-collapse: collapse;

    width: 100%;

    font-size: 18px;
}

td {
    padding: 7px 8px;

    border-bottom: 1px solid #303030;
}


/* =========================================================
   TIMED TABLE
   ========================================================= */

.timed-table-row td:first-child {
    width: 50%;
}

.timed-table-row td:last-child {
    text-align: center;

    font-weight: 700;
}


/* =========================================================
   SHIPMENT TABLE
   ========================================================= */

.ship-table td {
    background: #f7f7f7;

    color: #111;

    border: 1px solid #d1d1d1;

    padding: 5px 8px;

    font-weight: 700;
}

.ship-table td:first-child {
    width: 60%;
}

.ship-table td:last-child {
    width: 40%;
}


/* =========================================================
   EMPTY TABLE ROW
   ========================================================= */

.empty-row td {
    height: 42px;

    text-align: center;

    color: #8b949e;

    background: transparent !important;

    border: 0 !important;

    font-weight: 600;
}


/* =========================================================
   SMALLER DISPLAYS
   ========================================================= */

@media (max-width: 1400px) {

    .dashboard {
        transform-origin: top left;
    }

    .section-title {
        font-size: 25px;
    }

    .kpi h3 {
        font-size: 20px;
    }

    .topbar {
        grid-template-columns:
            300px
            125px
            225px
            145px
            1fr
            72px;
    }

    .logo-wrap {
        width: 300px;
    }

    .logo-wrap img,
    .warehouse-logo {
        width: 290px;
        height: 82px;
    }
}