/* GSM Contractor Stock redesign patch — 2026-09-04 */
:root {
    --gsm-green: #17643a;
    --gsm-green-dark: #10492b;
    --gsm-gold: #c8a34a;
    --gsm-ink: #111827;
    --gsm-control: #20262e;
    --gsm-control-border: #3a4552;
    --gsm-soft: #f4f6f8;
}

html.gsm-stock-page,
html.gsm-stock-page body {
    min-height: 100%;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden;
}

html.gsm-stock-page body,
html.gsm-stock-page .content-wrapper,
html.gsm-stock-page .main-content,
html.gsm-stock-page .page-content,
html.gsm-stock-page main,
html.gsm-stock-page .container,
html.gsm-stock-page .container-fluid {
    max-height: none !important;
    overflow-y: visible !important;
}

/* Keep table wrappers horizontally scrollable while restoring page vertical scroll. */
html.gsm-stock-page .table-responsive,
html.gsm-stock-page .gsm-table-scroll {
    overflow-x: auto !important;
    overflow-y: visible !important;
    max-height: none !important;
}

/* Filters/selectors only: dark controls. The contractor list/table remains light. */
html.gsm-stock-page select,
html.gsm-stock-page .form-select,
html.gsm-stock-page input[type="month"],
html.gsm-stock-page input[type="date"],
html.gsm-stock-page input[type="datetime-local"],
html.gsm-stock-page input[type="search"],
html.gsm-stock-page .gsm-filter-control {
    background: var(--gsm-control) !important;
    color: #fff !important;
    border-color: var(--gsm-control-border) !important;
    color-scheme: dark;
}

html.gsm-stock-page select option,
html.gsm-stock-page .form-select option {
    background: var(--gsm-control) !important;
    color: #fff !important;
}

/* User requested: no gold table text. */
html.gsm-stock-page table,
html.gsm-stock-page table th,
html.gsm-stock-page table td,
html.gsm-stock-page table a,
html.gsm-stock-page table .text-warning,
html.gsm-stock-page table .text-gold,
html.gsm-stock-page table [style*="color"] {
    color: var(--gsm-ink) !important;
}

html.gsm-stock-page table th,
html.gsm-stock-page table td .fw-bold,
html.gsm-stock-page table td strong,
html.gsm-stock-page table .text-warning,
html.gsm-stock-page table .text-gold {
    font-weight: 700 !important;
}

.gsm-stock-tabs {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
    padding-bottom: .75rem;
    border-bottom: 1px solid rgba(17, 24, 39, .12);
}

.gsm-stock-tab {
    appearance: none;
    border: 1px solid #d5d9df;
    background: #fff;
    color: var(--gsm-ink);
    border-radius: 9px;
    padding: .62rem 1rem;
    font-weight: 700;
    cursor: pointer;
}

.gsm-stock-tab:hover {
    border-color: var(--gsm-gold);
}

.gsm-stock-tab.is-active {
    background: var(--gsm-green);
    border-color: var(--gsm-green);
    color: #fff;
}

.gsm-stock-panel[hidden] {
    display: none !important;
}

.gsm-fifo-help {
    margin: .55rem 0 1rem;
    padding: .8rem 1rem;
    border-left: 4px solid var(--gsm-gold);
    background: #f7f8f9;
    color: #26313b;
    border-radius: 7px;
    line-height: 1.45;
}

.gsm-fifo-help strong {
    color: var(--gsm-ink);
}

/* Separate back button requested by user: green + white + gold edging. */
.gsm-back-row {
    display: flex;
    justify-content: flex-start;
    margin: 0 0 1rem;
}

.gsm-back-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .58rem .95rem;
    border: 2px solid var(--gsm-gold) !important;
    border-radius: 9px;
    background: var(--gsm-green) !important;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: none;
    cursor: pointer;
}

.gsm-back-btn:hover,
.gsm-back-btn:focus {
    background: var(--gsm-green-dark) !important;
    color: #fff !important;
    border-color: var(--gsm-gold) !important;
}

.gsm-stock-summary-cell {
    font-weight: 800 !important;
    color: var(--gsm-ink) !important;
    white-space: nowrap;
}

.gsm-stock-generated-note {
    margin: .6rem 0;
    color: #5b6571;
    font-size: .9rem;
}
