html,
body {
    height: 100%;
}

body {
    margin: 0;
    padding-top: 70px;
    font-family: "Lato", sans-serif;
    background-color: #fff;
    color: #212529;
    box-sizing: border-box;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #4595FD;
    height: 70px;
    width: 100%;
    padding: 0 16px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}

.header img {
    height: 54px;
    width: auto;
}

.header_content {
    flex: 1;
    text-align: center;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
}

.header-icons {
    display: flex;
    gap: 14px;
}

.header-icons a {
    color: #fff;
    font-size: 22px;
    text-decoration: none;
}

.header-icons a:hover {
    color: #DDD;
}

.menu-icon {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
}

/* ---------- SUBNAV (L2) ---------- */
.subnav {
    display: none;
}

@media (min-width:768px) {
    .subnav {
        display: flex;
        position: sticky;
        top: 70px;
        left: 0;
        background: #f9f9f9;
        border-top: 1px solid #ddd;
        padding: 8px 16px;
        z-index: 999;
        font-weight: 600;
        color: #333;
        justify-content: flex-start;
        /* like live screen */
    }

    .subnav a {
        color: #333;
        text-decoration: none;
        padding: 6px 8px;
    }

    .subnav a:hover {
        color: #4595FD;
        text-decoration: underline;
    }
}

/* ---------- L3 UNIT STRIP (background fixed; links only on hover) ---------- */
.unit-strip {
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    padding: 6px 16px;
    font-weight: 600;
    min-height: 30px;
    /* reserve height so content doesn’t jump */
    display: flex;
    align-items: center;
}

.unit-strip-links {
    display: none;
    /* links hidden by default */
    align-items: center;
}

.unit-strip.show .unit-strip-links {
    display: flex;
    /* show links when .show class is added */
}

.unit-link {
    margin-right: 30px;
    color: #000;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 3px 10px;
    border-radius: 2px;
}

.unit-link:hover {
    background: #e6f1ff;
    /* very light blue on hover */
    text-decoration: none;
}

.unit-link.active {
    background: #e6f1ff;
    /* very light blue when selected */
    text-decoration: none;
}


/* ---------- Drawer / side menu ---------- */
.content {
    max-width: 1000px;
    margin: auto;
    padding: 20px;
    text-align: center;
}

.rfq-container {
    margin-top: 5px;
    padding: 10px;
    width: 98vw;
    max-width: 98vw;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.footer-bottom {
    background: #002140;
    text-align: center;
    padding: 16px 0;
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
}

.drawer {
    position: fixed;
    top: 0;
    left: -260px;
    height: 100%;
    width: 260px;
    background: #fff;
    box-shadow: 2px 0 8px rgba(0, 0, 0, .15);
    z-index: 2000;
    transition: left .3s ease-in-out;
    padding-top: 70px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.drawer.open {
    left: 0;
}

.drawer .menu-top {
    padding-bottom: 20px;
}

.drawer a {
    display: block;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.drawer a:hover {
    background: #f9f9f9;
    color: #4595FD;
}

.drawer .submenu {
    display: none;
    padding-left: 20px;
}

.drawer .submenu a {
    font-size: .9rem;
}

.drawer .expandable.active+.submenu {
    display: block;
}

.drawer .logout-link {
    border-top: 1px solid #eee;
    margin-top: auto;
    text-align: center;
    padding: 16px;
}

/* Mobile unit list inside drawer */
.plant-list-mobile {
    padding-top: 10px;
}

.plant-list-mobile .unit-mobile-item {
    display: block;
    padding: 10px 20px;
    border-top: 1px solid #f0f0f0;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
}

.plant-list-mobile .unit-mobile-item.active {
    background: #e6f1ff;
    color: #000;
}


/* ---------- Layout wrappers ---------- */
.wrapper {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

#mainContent,
#welcomeMessage {
    flex: 1 0 auto;
}

@media (max-width:768px) {
    .header-icons a {
        display: none;
    }

    .menu-icon {
        display: inline-block;
    }
}

/* ---------- Misc ---------- */
.editable-section {
    border-top: 1px solid #ccc;
    margin-top: 10px;
    padding-top: 10px;
}

.dx-popup-content .source-section {
    border-bottom: 1px solid #ccc;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

/* Loading overlay */
#loadingOverlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .8);
    z-index: 3000;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

#loadingOverlay.on {
    display: flex;
}

.spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid #cfe2ff;
    border-top-color: #4595FD;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loadingMsg {
    color: #002140;
    font-weight: 600;
    margin-top: 12px;
}


/* ================================
   RFQ / PR QUOTATION MODULE STYLES
   ================================ */
 
/* RFQ Level 1 title */
.rfq-title {
    margin-top: 20px;
    margin-bottom: 10px;
    text-align: center;   /* centers text */
    font-weight: 600; 
    font-size: 20px;
    color: #003366;
}


/* Allow horizontal scroll if grid is wide */
.grid-wrap {
    width: 100%;
    overflow-x: auto;
}

/* Level-1 grid container width */
#rfqHeaderGrid {
    min-width: 900px;
    max-width: 1400px;
    margin: 20px auto;
}


/* You can also pre-define Level 2/3 containers here if you want */
#rfqLinesGrid,
#quotationForm {
    width: 98%;
    max-width: 1400px;
    margin: 10px auto;
}

/* Example for Level 3 buttons area */
#quotationFormButtons {
    margin-top: 20px;
    text-align: right;
}