﻿:root {
    --uh-red: #C8102E;
    --uh-dark-red: #7f0000;
    --uh-black: #000000;
    --uh-gray: #f4f4f4;
    --uh-light-gray: #fafafa;
    --uh-text-dark: #222;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background-color: var(--uh-light-gray);
    color: var(--uh-text-dark);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

footer.footer {
    flex-shrink: 0;
    width: 100%;
    background: #f8f9fa;
    border-top: 1px solid #ddd;
    padding: 15px 0;
    text-align: center;
}

.uh-btn {
    background-color: var(--uh-red) !important;
    border: 1px solid var(--uh-red) !important;
    color: white !important;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

    .uh-btn:hover {
        background-color: var(--uh-dark-red) !important;
        border-color: var(--uh-dark-red) !important;
        color: white !important;
    }

.section-title {
    font-weight: 700;
    font-size: 1.15rem;
    padding-bottom: 5px;
    margin-top: 25px;
    margin-bottom: 15px;
    border-bottom: 3px solid var(--uh-dark-red);
}

.form-border {
    border: 1px solid #ccc;
    padding: 25px;
    border-radius: 8px;
    background: white;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.05);
}

.checkbox-grid label {
    margin-left: 6px;
    margin-right: 20px;
}

input.form-control,
select.form-control,
textarea.form-control {
    border: 1px solid #bbb;
    border-radius: 6px;
}

    input.form-control:focus,
    select.form-control:focus,
    textarea.form-control:focus {
        border-color: var(--uh-red);
        box-shadow: 0 0 0 0.1rem rgba(200, 16, 46, 0.25);
    }

.small-text-mec {
    font-size: 0.8rem;
    color: darkslategray;
}

.small-text-contact {
    font-size: 0.6rem;
    color: darkslategray;
}

.hidden {
    display: none !important;
}
.table-responsive {
    overflow-x: auto;
    overflow-y: visible;
    max-height: none;
}

.table {
    width: 100%;
    min-width: 100%;
    table-layout: auto; /* auto lets wrapping columns shrink; fixed is too rigid with 15 cols */
}

    .table th,
    .table td {
        vertical-align: middle !important;
        font-size: 0.9rem;
        padding: 0.45rem;
        /* NOTE: no white-space rule here anymore - it's per-column below */
    }

        /* Short columns that must never wrap (dates, numbers, buttons, inputs) */
        .table td.nowrap,
        .table th.nowrap,
        .table .table-input,
        .table .form-control-sm,
        .table .uh-btn,
        .table .pickup-ack-btn,
        .table .receive-btn,
        .table .checkout-btn {
            white-space: nowrap;
        }

        /* Long-text columns are ALLOWED to wrap to two lines - this is what buys back the
   width. Applied via the .wrap-cell class on the cells that hold long text. */
        .table td.wrap-cell {
            white-space: normal;
            min-width: 120px;
            max-width: 220px;
        }


    /* --- Sticky header ------------------------------------------------------------
   The column labels stay visible while scrolling down a long list.
------------------------------------------------------------------------------ */
    .table thead th {
        position: sticky;
        top: 0;
        z-index: 3;
        background-color: #212529; /* matches table-dark so it doesn't look transparent */
        color: #fff;
    }


    /* --- Sticky first column ------------------------------------------------------
   If any horizontal scroll remains, the Drop Date column stays pinned so a row
   never loses its anchor. The header cell of column 1 needs a higher z-index so
   it stays above both the sticky row and the sticky header.
------------------------------------------------------------------------------ */
    .table td:first-child,
    .table th:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        background-color: #fff; /* opaque so scrolled cells don't show through */
    }

    .table thead th:first-child {
        z-index: 4; /* above everything at the corner */
        background-color: #212529;
    }

/* Keep the striped look on the pinned column */
.table-striped > tbody > tr:nth-of-type(odd) > td:first-child {
    background-color: #f2f2f2;
}

.table-striped > tbody > tr:nth-of-type(even) > td:first-child {
    background-color: #fff;
}

/* Flagged/reviewed rows: keep their tint on the pinned first cell too, so the
   pinned column doesn't visually break the row colour. */
.table tr.row-flagged > td:first-child {
    background-color: #fff4db !important;
}

.table tr.row-reviewed > td:first-child {
    background-color: #f0f0f0 !important;
}


/* --- Shared control sizing (unchanged behaviour, kept here so nothing is lost) - */
.table-input,
.collector-email {
    height: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    border: 1px solid #bbb;
    border-radius: 6px;
    padding: 4px 8px !important;
    box-sizing: border-box;
}

.table .uh-btn,
.checkout-btn,
.pickup-ack-btn,
.receive-btn {
    height: 34px !important;
    min-height: 34px !important;
    padding: 4px 14px !important;
    margin: 0 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}


/* --- The twin top scrollbar is no longer needed ------------------------------
   With the table fitting the container, the separate top scrollbar mostly has
   nothing to scroll. Leave the markup - it simply collapses to nothing - or hide
   it. Hiding is cleaner: */
.scroll-top {
    display: none;
}

/* Employee Log columns */
.sheets-col {
    width: 90px;
}

.employee-col {
    width: 130px;
}

.checkout-col {
    width: 150px;
    text-align: center;
}

/* Pickup columns */
.collector-email {
    width: 190px;
}

.pickup-ack-col {
    width: 150px;
    text-align: center;
}

/* Inputs fill their cell so they can never overflow the column again */
.table td .table-input,
.table td .collector-email {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
}

/* Messages */
.ack-message {
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid transparent;
    white-space: normal;
}

    .ack-message.success {
        background-color: #eaf7ee;
        color: #1e7e34;
        border-color: #b7e4c7;
    }

    .ack-message.warning {
        background-color: #fff4db;
        color: #9a6700;
        border-color: #f2d28b;
    }

    .ack-message.error {
        background-color: #fdecec;
        color: #b02a37;
        border-color: #f5c2c7;
    }
    .ack-message:empty {
        display: none;
    }


/* --- Flagged row: needs review before the papers are received --- */
.row-flagged {
    background-color: #fff4db !important; /* soft amber, matches your .warning tone */
}

    .row-flagged:hover {
        background-color: #ffedc2 !important;
    }

.table-striped > tbody > tr.row-flagged:nth-of-type(odd) > * {
    background-color: #fff4db !important;
}

/* --- Review badge --- */
.review-badge {
    display: inline-block;
    background-color: #9a6700;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    cursor: help;
}

.cleared-badge {
    display: inline-block;
    background-color: #1e7e34;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

/* --- Submitter cell: name/title stacked --- */
.submitter-cell {
    line-height: 1.25;
}

    .submitter-cell .submitter-title {
        font-size: 0.78rem;
        color: darkslategray;
    }

    .submitter-cell .submitter-email {
        font-size: 0.72rem;
        color: #888;
    }

/* --- Receive control --- */
.receive-btn {
    height: 34px !important;
    min-height: 34px !important;
    padding: 4px 14px !important;
    margin: 0 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap;
    background-color: #1e7e34 !important;
    border: 1px solid #1e7e34 !important;
    color: #fff !important;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

    .receive-btn:hover {
        background-color: #17652a !important;
        border-color: #17652a !important;
    }

/* Static "received" marker once done */
.received-mark {
    color: #1e7e34;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* --- Disabled-until-received checkout controls --- */
.checkout-locked {
    opacity: 0.45;
    pointer-events: none; /* belt and braces alongside the disabled attribute */
}

/* --- Special instructions expandable row --- */
.instructions-toggle {
    cursor: pointer;
    color: var(--uh-red);
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
    user-select: none;
}

    .instructions-toggle:hover {
        text-decoration: underline;
    }

.instructions-row td {
    background-color: #fafafa;
    border-top: none !important;
    white-space: normal !important;
    font-size: 0.85rem;
    color: var(--uh-text-dark);
    padding: 10px 16px !important;
}

.instructions-row .instructions-label {
    font-weight: 700;
    color: var(--uh-dark-red);
    margin-right: 8px;
}
.row-reviewed {
    background-color: #f0f0f0 !important; /* grey, "handled" */
}

.table-striped > tbody > tr.row-reviewed:nth-of-type(odd) > * {
    background-color: #f0f0f0 !important;
}

.reviewed-badge {
    display: inline-block;
    background-color: #1e7e34;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.course-cell {
    min-width: 180px;
    max-width: 260px;
    line-height: 1.3;
}

    .course-cell .course-number {
        font-weight: 700;
        font-size: 0.9rem;
    }

    .course-cell .course-sub {
        font-size: 0.78rem;
        color: darkslategray;
    }