html, body {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

a, .btn-link {
    color: #546451;
    font-weight: 600;
    text-decoration: none;
}

a, .btn-link-header {
    color: #000000;
    text-decoration: none
}

.btn-primary {
    color: #fff;
    background-color: #000066;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNy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has occurred."
    }

.blazored-toast {
    z-index: 20000 !important;
    width: 600px !important;
    cursor: pointer;
}

.blazored-toast-container {
    z-index: 20000 !important;
    position: fixed; /* should already be, but ensure it */
}
/*.blazored-toast {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    position: fixed !important;
    z-index: 1050;*/ /* ensure it's above modals */
/*}*/
/* Blazored.Toast */
.blazored-toast-body,
.blazored-toast-message {
    white-space: pre-line;
}

blazored-toast-container .blazored-toast {
    /* This style forces the browser to respect newlines and spaces in the string */
    white-space: pre-wrap;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

ul {
    margin: 0;
    padding-left: 1rem;
}

li {
    margin-bottom: 0.25rem;
}

.busy-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.busy-box {
    background: #fff;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    min-width: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ot-table {
    display: block;
    max-height: 50vh; /* give it a viewport to virtualize against */
    overflow-y: auto; /* important: scrolling happens here */
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: .25rem;
}

    .ot-table .tr {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr; /* match your 4 columns */
        align-items: center;
    }

    .ot-table .thead {
        position: sticky;
        top: 0;
        background: var(--bs-body-bg, #fff);
        font-weight: 600;
        z-index: 1;
        border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    }

    .ot-table .td, .ot-table .th {
        padding: .5rem .75rem;
        border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    }
/* tighter image with fixed aspect ratio */
.prod-img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* nicer hover */
.prod-card {
    transition: transform .12s ease, box-shadow .12s ease;
}

    .prod-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 24px rgba(0,0,0,.08);
    }

/* clamp long text */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.top-2 {
    top: .5rem;
}

.start-2 {
    left: .5rem;
}

.qty-input {
    width: 84px;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.th-row {
    border-bottom: 1px solid #dee2e6;
}

.th-sort:hover {
    text-decoration: underline !important;
}

/* ===== Order Tracking: Select Order ===== */
.order-search {
    background: #fff;
    border: 1px solid #e3e6e8;
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    margin-bottom: 16px;
}

    .order-search .section-title {
        font-size: 1.05rem;
        font-weight: 700;
        margin: 0 0 10px;
    }

    .order-search .row {
        align-items: center;
    }

    .order-search .left-col {
        border-right: 1px solid #d7dbde;
    }

@media (max-width: 992px) {
    .order-search .left-col {
        border-right: 0;
        border-bottom: 1px solid #d7dbde;
        padding-bottom: 12px;
        margin-bottom: 12px;
    }
}

.order-search label {
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.order-search .form-control {
    height: 36px;
}

.order-search .btn {
    height: 36px;
}

/* subtle “muted” placeholder */
.order-search .form-control::placeholder {
    color: #9aa3aa !important;
    opacity: .85;
}

/* spacing utilities just for this block */
.order-search .g-8 {
    row-gap: 8px;
    column-gap: 8px;
}

/* ===== Virtualized grid table ===== */
.ot-table {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border: 1px solid #e3e6e8;
    border-radius: 6px;
    overflow: hidden;
}

    .ot-table .tr {
        display: grid;
        grid-template-columns: 140px 1fr 140px 120px; /* Order, PO, Date, Status */
        align-items: center;
        min-height: 40px;
        padding: 0 12px;
        border-bottom: 1px solid #eef1f3;
    }

    .ot-table .thead {
        position: sticky;
        top: 0;
        background: #f6f8f9;
        z-index: 2;
        font-weight: 700;
    }

    .ot-table .th {
        cursor: pointer;
        user-select: none;
        color: #374151;
    }

    .ot-table .td {
        color: #111827;
    }

    .ot-table .tr:hover:not(.thead) {
        background: #fbfcfd;
    }

.password-container {
    position: relative;
}

.password-input {
    padding-right: 38px; /* space for icon */
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.6;
    display: flex;
    align-items: center;
}

    .toggle-password:hover {
        opacity: 1;
    }

.eye-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    color: #6c757d; /* matches bootstrap form icons */
}
/* ===== Select Order – template look ===== */

.page-title {
    font-weight: 700;
    margin: 0;
}

.order-search {
    background: #fff;
    border: 1px solid #e3e6e8;
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    margin-bottom: 16px;
}

    .order-search .section-title {
        font-size: 1.05rem;
        font-weight: 700;
        margin: 0 0 10px;
    }

/* Grid that matches the reference template */
.search-grid {
    display: grid;
    grid-template-columns: 1fr; /* mobile */
    gap: 12px 16px;
}

.left-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.right-grid {
    display: grid;
    grid-template-columns: 1fr; /* mobile */
    gap: 10px 16px;
}

.search-actions {
    display: flex;
    gap: 8px;
    align-items: end;
}

/* Desktop: two columns with a divider */
@media (min-width: 992px) {
    .search-grid {
        grid-template-columns: 420px 1fr; /* fixed left, fluid right */
        align-items: end;
    }

    .left-stack {
        padding-right: 16px;
        border-right: 1px solid #d7dbde;
    }

    .right-grid {
        grid-template-columns: 1fr 1fr; /* 2-up on right */
    }
}

/* ===== Select Order Panel Background (template match) ===== */
.order-search {
    background: #f7f8f9; /* light gray panel */
    border: 1px solid #d7dbde; /* soft border */
    border-radius: 6px; /* slightly rounded */
    padding: 18px 22px; /* more horizontal breathing room */
    box-shadow: none !important; /* ensure no shadow */
}

    .order-search .section-title {
        font-size: 1.05rem;
        font-weight: 700;
        margin-bottom: 12px;
    }

    /* flatten inputs so they match reference style */
    .order-search .form-control,
    .order-search .form-select {
        background-color: #fff;
        border: 1px solid #cfd4d8;
        height: 36px;
    }

        .order-search .form-control:focus,
        .order-search .form-select:focus {
            border-color: #9ea4a7;
            box-shadow: none;
        }

/* Primary Search button in header green */
.btn-search {
    background: #4b6250;
    color: #fff;
    border: 0;
}

    .btn-search:hover {
        filter: brightness(.95);
    }

/* Neutral Show All button */
.btn-showall {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
}

/* ===== Product Maintenance – keep import card from overlaying content ===== */
.product-import-card {
    position: static !important;
    z-index: auto !important;
}
/* ===== Product Maintenance layout ===== */
.product-maint-left {
    position: relative;
    z-index: 2; /* ensure Edit column is on top */
}

.product-maint-right {
    position: relative;
    z-index: 1;
}
/* ===== Product Maintenance – side-by-side layout ===== */
.product-maint-layout {
    display: grid;
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr); /* left fixed-ish, right flexible */
    gap: 16px;
    align-items: flex-start;
}

@media (max-width: 992px) {
    .product-maint-layout {
        grid-template-columns: 1fr; /* stack on smaller screens */
    }
}

/* keep import card from overlaying content */
.product-import-card {
    position: static !important;
    z-index: auto !important;
}
/* ========================================================= */
/* STICKY FOOTER */
/* ========================================================= */

/* Make body a flex column so footer sticks to bottom */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

/* Main content grows to fill space above footer */
.page {
    flex: 1 0 auto;
}

/* Footer itself */
.site-footer {
    flex-shrink: 0;
    background: #ffffff;
    border-top: 1px solid #d2d6da;
    font-size: 11px;
    color: #444;
    padding: 6px 0 8px;
}

.footer-line {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .footer-line a {
        color: inherit;
        text-decoration: none;
    }

        .footer-line a:hover {
            text-decoration: underline;
        }

.footer-sep {
    margin: 0 6px;
}

/* Allow wrapping on small screens */
@media (max-width: 576px) {
    .footer-line {
        white-space: normal;
        line-height: 1.4;
    }
}

/* Outer wrapper: looks like a normal form-control */
.stacked-input {
    border: 1px solid #ced4da;
    border-radius: .25rem;
    padding: 3px 3px 3px 10px;
    background-color: #fff;
}

    /* When anything inside has focus */
    .stacked-input:focus-within {
        border-color: #198754; /* or your primary color */
        box-shadow: 0 0 0 .2rem rgba(25,135,84,.25);
    }

    /* Label inside the box */
    .stacked-input .stacked-label {
        display: block;
        font-size: 0.75rem;
        margin-bottom: 0;
        color: #6c757d;
    }

    /* The actual input: no border, no extra padding */
    .stacked-input .stacked-input-control {
        border: 0;
        padding: 0;
        margin-top: 2px;
        box-shadow: none;
        outline: none !important;
    }

        /* Keep it borderless even when focused */
        .stacked-input .stacked-input-control:focus {
            border: 0;
            box-shadow: none;
        }

        .stacked-input .stacked-input-control[readonly] {
            color: #495057;
            background: transparent;
        }

    .stacked-input textarea.stacked-input-control {
        resize: none; /* optional: stops user resizing */
    }

    /* ensures textarea fills the remaining space */
    .stacked-input .flex-grow-1 {
        min-height: calc(100% - 1.25rem);
    }
/* Exact height match for Spanning Special Instructions box */
.shipping-notes {
    height: 121px; /* this value matches 2 stacked inputs perfectly */
}

    .shipping-notes textarea {
        resize: none;
        height: calc(100% - 1.3rem); /* subtract label height */
        min-height: unset !important;
    }

.form-control[readonly] {
    background-color: #fff;
    opacity: 1; /* important for Bootstrap */
}
