/* Procurement request Add / Edit pages.
   Neutral surfaces, dark text, colour only as small accents (icons, badges, focus). */
.pr-page {
    --pr-maroon: #831F3B;
    --pr-maroon-soft: rgba(131, 31, 59, .08);
    --pr-gold: #B48324;
    --pr-gold-soft: #fbf6ec;
    --pr-border: #e7e3de;
    --pr-tray: #f8f6f3;
    --pr-text: #1f2328;
    --pr-muted: #41464d; /* dark grey: readable for senior users */
    --pr-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 3px 10px rgba(16, 24, 40, .05);
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--pr-text);
    padding-bottom: 8px;
}

/* ---------- cards ---------- */
.pr-card {
    background: #fff;
    border: 1px solid var(--pr-border);
    border-radius: 12px;
    box-shadow: var(--pr-shadow);
}

.pr-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--pr-border);
}

.pr-card__body {
    padding: 18px 20px 20px;
}

.pr-icon-badge {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--pr-maroon-soft);
    color: var(--pr-maroon);
}

    .pr-icon-badge.gold {
        background: var(--pr-gold-soft);
        color: var(--pr-gold);
    }

.pr-card__title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.pr-card__subtitle {
    font-size: 13.5px;
    color: var(--pr-muted);
    line-height: 1.4;
}

/* ---------- page header ---------- */
.pr-hero {
    padding: 18px 20px 20px;
}

.pr-hero__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.pr-overline {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--pr-maroon);
}

.pr-hero__title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    margin-top: 2px;
}

.pr-ref {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--pr-border);
    background: var(--pr-tray);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

    .pr-ref .mud-icon-root {
        color: var(--pr-gold);
    }

.pr-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.pr-meta__tile {
    background: var(--pr-tray);
    border: 1px solid #efebe6;
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, .04);
    min-width: 0;
}

.pr-meta__label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--pr-muted);
}

.pr-meta__value {
    font-size: 14px;
    font-weight: 600;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .pr-meta__value.empty {
        color: #6b7078;
        font-weight: 500;
    }

/* ---------- form groups ---------- */
.pr-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--pr-muted);
    margin-bottom: 6px;
}

.pr-group {
    border: 1px solid var(--pr-border);
    border-radius: 10px;
    padding: 14px 16px 16px;
    background: #fff;
    height: 100%;
}

.pr-group__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
}

    .pr-group__head .mud-icon-root {
        color: var(--pr-maroon);
        font-size: 19px;
    }

.pr-group__hint {
    font-size: 13px;
    font-weight: 400;
    color: var(--pr-muted);
    margin-left: auto;
}

.pr-steps {
    display: grid;
    gap: 16px;
}

/* eligibility list */
.pr-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pr-checklist__row {
    display: flex;
    align-items: center;
    min-height: 42px;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--pr-tray);
    font-size: 14px;
}

.pr-checklist__key {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--pr-border);
    font-size: 13px;
    font-weight: 600;
    color: var(--pr-maroon);
}

.pr-checklist__row .mud-radio .mud-typography {
    font-size: 14px;
}

.pr-checklist__row .mud-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 8px;
}

/* chips / vendor list */
.pr-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.pr-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    background: var(--pr-tray);
    border: 1px solid #ece7e1;
    font-size: 13.5px;
    font-weight: 500;
}

.pr-chip__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--pr-maroon-soft);
    color: var(--pr-maroon);
    font-size: 13px;
    font-weight: 700;
}

.pr-note {
    font-size: 13.5px;
    color: var(--pr-muted);
    margin-bottom: 8px;
}

.pr-callout {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 6px 14px 6px 10px;
    border-radius: 10px;
    background: var(--pr-gold-soft);
    border: 1px solid #efe2c6;
}

    .pr-callout > .mud-icon-root {
        color: var(--pr-gold);
    }

    .pr-callout .mud-checkbox {
        margin: 0;
    }

/* ---------- tabs ---------- */
.pr-tabs.mud-tabs {
    background: #fff;
    border: 1px solid var(--pr-border);
    border-radius: 12px;
    box-shadow: var(--pr-shadow);
    overflow: hidden;
}

.pr-tabs .mud-tabs-tabbar {
    background: var(--pr-tray);
    border-bottom: 1px solid var(--pr-border);
}

.pr-tabs .mud-tab {
    text-transform: none;
    font-weight: 600;
    font-size: 13.5px;
    letter-spacing: 0;
    min-height: 50px;
    color: var(--pr-muted);
}

    .pr-tabs .mud-tab.mud-tab-active {
        color: var(--pr-maroon);
        background: #fff;
    }

.pr-tabs .mud-tab-slider {
    background: var(--pr-maroon);
    height: 3px;
}

.pr-tab-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---------- template items ---------- */
.pr-item {
    border: 1px solid var(--pr-border);
    border-radius: 10px;
    background: #fff;
}

.pr-item__head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #f0ece7;
    background: #fcfbfa;
    border-radius: 10px 10px 0 0;
}

.pr-item__icon {
    flex: none;
    color: var(--pr-maroon);
    margin-top: 1px;
}

.pr-item__title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.pr-item__desc {
    font-size: 13.5px;
    color: var(--pr-muted);
    margin-top: 2px;
    white-space: pre-line;
}

.pr-item__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: none;
    position: relative;
}

.pr-item__body {
    padding: 14px 16px 16px;
}

.pr-helper {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--pr-tray);
    font-size: 13.5px;
    color: var(--pr-muted);
    white-space: pre-line;
}

    .pr-helper .mud-icon-root {
        color: var(--pr-gold);
        flex: none;
    }

.pr-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    margin-left: 6px;
    border-radius: 999px;
    background: var(--pr-maroon-soft);
    color: var(--pr-maroon);
    font-size: 13px;
    font-weight: 700;
    vertical-align: 1px;
}

/* ---------- tables ---------- */
.pr-table.mud-table {
    border: 1px solid var(--pr-border);
    border-radius: 8px;
    box-shadow: none;
    overflow: hidden;
}

.pr-table .mud-table-head .mud-table-cell,
.pr-simple-table.mud-simple-table table thead tr th {
    background: var(--pr-tray);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--pr-muted);
    white-space: nowrap;
}

.pr-table .mud-table-body .mud-table-row:hover {
    background: #fcfaf8;
}

.pr-table .mud-table-cell {
    font-size: 13.5px;
}

.pr-table td.pr-col-sn,
.pr-table th.pr-col-sn {
    width: 64px;
    text-align: center;
}

.pr-table td.pr-col-actions,
.pr-table th.pr-col-actions {
    width: 96px;
    text-align: right;
    white-space: nowrap;
}

.pr-sn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--pr-tray);
    border: 1px solid #ece7e1;
    font-size: 13px;
    font-weight: 600;
}

.pr-empty {
    padding: 22px 12px;
    text-align: center;
    color: var(--pr-muted);
    font-size: 13px;
}

    .pr-empty .mud-icon-root {
        display: block;
        margin: 0 auto 4px;
        color: #c3bdb6;
    }

.pr-simple-table.mud-simple-table {
    border: 1px solid var(--pr-border);
    border-radius: 8px;
    box-shadow: none;
    overflow: hidden;
}

    .pr-simple-table.mud-simple-table table td {
        font-size: 13.5px;
    }

.pr-price-layout {
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr;
    gap: 16px;
    align-items: start;
}

    .pr-price-layout.single {
        grid-template-columns: 1fr;
    }

@media (max-width: 960px) {
    .pr-price-layout {
        grid-template-columns: 1fr;
    }
}

.pr-sample {
    max-height: 600px;
    overflow-y: auto;
    min-width: 300px;
    max-width: 520px;
}

/* ---------- sticky action bar ---------- */
.pr-actionbar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(4px);
    border: 1px solid var(--pr-border);
    border-radius: 12px;
    box-shadow: 0 -2px 12px rgba(16, 24, 40, .06);
}

.pr-actionbar__hint {
    font-size: 13.5px;
    color: var(--pr-muted);
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pr-actionbar .mud-button-root {
    min-width: 150px;
    text-transform: none;
    font-weight: 600;
}

.pr-page .pr-btn {
    text-transform: none;
    font-weight: 600;
}

.pr-validation {
    color: var(--mud-palette-error);
    font-size: 13px;
}

    .pr-validation ul {
        margin: 0;
        padding-left: 18px;
    }

    .pr-validation:not(:has(li)) {
        display: none;
    }

.pr-page .rz-html-editor {
    border-radius: 8px;
    border-color: var(--pr-border);
    box-shadow: none;
}

.pr-page .rz-html-editor-toolbar {
    background: var(--pr-tray);
    border-bottom: 1px solid var(--pr-border);
}

/* clickable example under a field: click copies it into the field */
.pr-suggest {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 6px;
    font-size: 13.5px;
    color: var(--pr-muted);
}

.pr-suggest__label {
    padding-top: 4px;
    flex: none;
}

.pr-suggest__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 6px;
    border: 1px dashed #d9cfc4;
    border-radius: 8px;
    background: var(--pr-tray);
    color: var(--pr-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s, background-color .15s, color .15s;
}

    .pr-suggest__chip .mud-icon-root {
        color: var(--pr-gold);
        flex: none;
    }

    .pr-suggest__chip:hover,
    .pr-suggest__chip:focus-visible {
        border-color: var(--pr-maroon);
        border-style: solid;
        background: var(--pr-maroon-soft);
        color: var(--pr-maroon);
        outline: none;
    }

/* ---------- read-only (View page) ---------- */
.pr-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 24px;
}

    .pr-fields.cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

@media (max-width: 1100px) {
    .pr-fields.cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .pr-fields,
    .pr-fields.cols-4 {
        grid-template-columns: 1fr;
    }
}

.pr-field {
    min-width: 0;
}

.pr-field--wide {
    grid-column: 1 / -1;
}

.pr-field__label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--pr-muted);
    margin-bottom: 3px;
}

.pr-field__value {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.pr-field__hint {
    font-size: 13px;
    color: var(--pr-muted);
    margin-top: 2px;
}

.pr-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

    .pr-status.ok {
        background: #e8f4ec;
        color: #2e7d4f;
    }

    .pr-status.warn {
        background: var(--pr-gold-soft);
        color: #8a6418;
    }

    .pr-status.neutral {
        background: var(--pr-tray);
        color: var(--pr-muted);
    }

.pr-callout__text {
    font-size: 14px;
    padding: 6px 0;
}

.pr-callout .pr-status {
    margin-left: auto;
}

.pr-chips.mt-0 {
    margin-top: 0;
}

.pr-richtext {
    font-size: 14px;
    line-height: 1.55;
    padding: 12px 14px;
    border: 1px solid var(--pr-border);
    border-radius: 8px;
    background: #fff;
}

.pr-price-group + .pr-price-group {
    margin-top: 16px;
}

.pr-simple-table.mud-simple-table table th.pr-col-cost,
.pr-simple-table.mud-simple-table table td.pr-col-cost {
    width: 140px;
    text-align: right;
}

.pr-tenderer {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 6px;
    border: 1px dashed #d9cfc4;
    background: var(--pr-tray);
    color: var(--pr-muted);
    font-size: 13px;
    font-style: italic;
}

/* outside-vendor tables: keep the vendor name readable and the UEN on one line */
.pr-table .pr-col-vendor {
    min-width: 180px;
}

.pr-table .pr-col-uen {
    white-space: nowrap;
}

/* Search page: reference numbers have no spaces ("RFP/2026//AccessControl,AutoGate,..._007"), so let them wrap
   anywhere instead of widening the column and squeezing the title. */
.mud-table-cell.pr-ref-cell {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* table view only (the table stacks into cards below 600px) */
@media (min-width: 600px) {
    .mud-table-cell.pr-ref-cell { max-width: 220px; }
    .mud-table-cell.pr-title-cell { min-width: 240px; }
}

/* Tender Status dialog: one block per tenderer, details like the tender PDF's vendor page */
.pr-tender-status {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.pr-tender-status__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 10px;
}

.pr-tender-status__name { font-weight: 600; margin-bottom: 4px; }

.pr-tender-status__table th {
    width: 32%;
    text-align: left;
    vertical-align: top !important; /* MudSimpleTable centres cells */
    font-weight: 600;
    background: rgba(0, 0, 0, .03);
}

.pr-tender-status__table td { vertical-align: top !important; overflow-wrap: anywhere; }

.pr-tender-status__file { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; }

.pr-tender-status__filename { color: var(--mud-palette-text-secondary); font-size: .8125rem; }

/* Tender Status dialog: summary table at the top, details below */
.pr-tender-summary { margin-bottom: 20px; }
.pr-tender-summary th { font-weight: 600; text-align: left; background: rgba(0, 0, 0, .03); }
.pr-tender-summary td { vertical-align: middle; }
.pr-tender-status { scroll-margin-top: 12px; }
.pr-tender-status__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* "Download Template(s)" buttons: right of a card header / under the template tile */
.pr-card__head-action { margin-left: auto; flex-shrink: 0; }
.pr-meta__action.mud-button-root { margin: 4px 0 0 -6px; padding: 0 6px; text-transform: none; }

/* Search page HQ summary (requests by status / sites) and the "Requests by Site" dialog */
.pr-request-summary__card { padding: 12px 16px; margin-bottom: 8px; }
.pr-request-summary__title { font-weight: 600; margin-bottom: 8px; }
.pr-site-summary__scroll { overflow-x: auto; }
.pr-request-summary { min-width: 0; }
.pr-request-summary th { font-weight: 600; background: rgba(0, 0, 0, .03); white-space: nowrap; }
.pr-request-summary th.pr-request-summary__num,
.pr-request-summary td.pr-request-summary__num { text-align: center; width: 1%; padding-left: 16px !important; padding-right: 16px !important; }
.pr-request-summary th.pr-request-summary__label,
.pr-request-summary td.pr-request-summary__label { text-align: left; white-space: nowrap; }
.pr-request-summary td.pr-request-summary__label { font-weight: 500; }
.pr-request-summary__total { font-weight: 600; }
.pr-request-summary td.zero { color: var(--mud-palette-text-disabled); }
.pr-request-summary__link { font-weight: 600; cursor: pointer; text-decoration: underline; }
.pr-site-summary tfoot td { font-weight: 600; background: rgba(0, 0, 0, .03); }
.pr-site-summary td.pr-request-summary__label { white-space: normal; min-width: 180px; }

/* Search page: contract period under the procurement type; "Invited Vendors" column */
.pr-period { margin-top: 2px; font-size: .8125rem; color: var(--mud-palette-text-secondary); }
.pr-vendor-cell { min-width: 200px; max-width: 320px; }
.pr-vendor-list { margin: 0; padding-left: 18px; font-size: .8125rem; line-height: 1.45; }
.pr-vendor-list li { overflow-wrap: anywhere; }
.pr-vendor-cell__none { font-size: .8125rem; color: var(--mud-palette-text-disabled); }

/* Summary tables: every status with its count in one cell */
.pr-status-counts { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.pr-status-count { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border-radius: 999px; font-size: .8125rem; white-space: nowrap; background: rgba(var(--mud-palette-primary-rgb), .08); }
.pr-status-count b { font-weight: 700; }
.pr-status-count.zero { background: rgba(0, 0, 0, .04); color: var(--mud-palette-text-disabled); }
.pr-request-summary td.pr-request-summary__label { width: 1%; }
.pr-site-summary td.pr-request-summary__label { width: auto; }
@media (max-width: 600px) {
    .pr-request-summary th.pr-request-summary__label,
    .pr-request-summary td.pr-request-summary__label { white-space: normal; min-width: 90px; }
    .pr-request-summary__card { padding: 10px 8px; }
    .pr-status-count { white-space: normal; }
}

/* Edit page: heading above the document tabs ("Invitation document") */
.pr-site-cell { font-weight: 500; min-width: 120px; }

/* Edit page: part headings "I. General info" / "II. Invitation document" (same size as the page title, indented) */
.pr-part-head { padding: 10px 0 2px 14px; }
.pr-part-head__title { font-size: 22px; font-weight: 600; line-height: 1.25; }
.pr-part-head__desc { margin-top: 4px; font-size: 13px; color: var(--pr-muted); line-height: 1.4; }

/* "Vendors not in FMDash": vendor name spans two rows; second row = invite reason */
.pr-table td.pr-vendor-span { vertical-align: middle; border-bottom: 1px solid var(--pr-border); }
.pr-table tr:has(+ .pr-reason-row) td:not(.pr-vendor-span) { border-bottom: none; }
.pr-table .pr-reason-row td.pr-reason-cell { padding-top: 0; padding-bottom: 10px; font-size: 13.5px; color: var(--pr-text); white-space: normal; }
.pr-reason__label { font-weight: 600; color: var(--pr-muted); margin-right: 4px; }

/* Search page: contract period under the status */
.pr-status-period { margin-top: 4px; font-size: 13.5px; line-height: 1.35; color: #3f444b; white-space: nowrap; }
.pr-status-period__label { display: block; font-weight: 600; color: #41464d; }

/* Schedule of Rates (SORs) */
.pr-table-note { margin: 0 0 8px; font-size: 14px; line-height: 1.45; color: #3f444b; }
.pr-dialog-note { margin: 0 0 12px; font-size: 14px; line-height: 1.45; color: #3f444b; }
.pr-by-tenderer { font-size: 13.5px; font-style: italic; color: #41464d; }
