:root { color-scheme: light; font-family: system-ui, sans-serif; color: #27272a; background: #f5f7f5; }
        body { margin: 0; } header { background: #242424; color: white; padding: 1rem 2rem; display: flex; align-items: center; gap: 1.5rem; border-bottom: 3px solid #20b34b; flex-wrap: wrap; }
        header a { color: white; } header form { margin-left: auto; }
        .authenticated-header { display: block; }
        .platform-title { display: block; text-align: center; margin-bottom: 1rem; }
        .header-menu { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
        .header-logo { display: block; width: 150px; max-width: 100%; height: auto; margin: 0 auto 1rem; background: white; border-radius: .25rem; padding: .5rem; box-sizing: border-box; }
        .header-menu form { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
        @media (max-width: 600px) { .header-menu { gap: 1rem; } .header-menu form { margin-left: 0; width: 100%; } }
        main { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }
        section, .panel { background: white; border: 1px solid #dce5df; border-radius: .5rem; padding: 1.5rem; margin-bottom: 1rem; }
        h1 { margin-top: 0; } a { color: #15803d; } label { display: block; margin-bottom: .4rem; }
        input, textarea, select { padding: .65rem; border: 1px solid #9ca3af; border-radius: .25rem; max-width: 100%; box-sizing: border-box; }
        textarea { display: block; width: 100%; min-height: 5rem; }
        button { padding: .65rem 1rem; background: #edf5ef; color: #166534; border: 1px solid #cdddce; border-radius: .25rem; cursor: pointer; }
        .filters { display: flex; gap: 1rem; flex-wrap: wrap; align-items: end; margin-bottom: 1rem; }
        .field { margin-bottom: 1rem; } .login { max-width: 420px; margin: 3rem auto; } .login input { width: 100%; }
        input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #86d9a0; outline-offset: 2px; }
        input[type=checkbox], input[type=radio] { accent-color: #15803d; }
        .login-logo { display: block; width: 100%; max-width: 320px; height: auto; margin: 0 auto 1.5rem; }
        .error { color: #a31e24; } .muted { color: #525b55; } .table-wrap { overflow-x: auto; }
        table { border-collapse: collapse; width: 100%; } th, td { padding: .8rem; text-align: left; border-bottom: 1px solid #dce5df; vertical-align: top; }
        th { background: #eef6f0; } td { overflow-wrap: anywhere; } .text { white-space: pre-wrap; }
        dl { display: grid; grid-template-columns: minmax(130px, 180px) 1fr; gap: .6rem; } dt { font-weight: 600; } dd { margin: 0; }
        nav[role="navigation"] { margin-top: 1rem; }
        .shared-link-copy { font: inherit; transition: background-color .15s, box-shadow .15s; }
        .shared-link-copy:hover, .shared-link-copy:focus-visible { background: #dceee1; box-shadow: 0 3px 8px #14532d26; }
        .shared-link-copy:disabled { opacity: .65; cursor: wait; }
        [data-copy-url] + small { display: block; margin-top: .3rem; }
        .action-button { display: inline-block; padding: .65rem 1rem; background: #edf5ef; color: #166534; border: 1px solid #cdddce; border-radius: .25rem; text-decoration: none; }

:root { font-family: "Segoe UI", system-ui, sans-serif; color: #24332c; background: #f3f6f4; }
body { line-height: 1.5; }
body > header { background: #202d26; padding: 1rem 2rem; border-bottom-color: #24b85a; }
.platform-title { font-size: clamp(.95rem, 1.6vw, 1.2rem); font-weight: 600; letter-spacing: .01em; margin-bottom: .65rem; }
.header-logo { width: 130px; padding: .4rem; border-radius: 8px; margin-bottom: .8rem; }
.header-menu { border-top: 1px solid #ffffff20; padding-top: .7rem; gap: 1rem; }
.header-nav-link { padding: .45rem .9rem; background: #ffffff12; border-radius: 7px; text-decoration: none; font-weight: 600; }
.header-nav-link:hover { background: #ffffff22; }
.header-menu span { font-size: .88rem; color: #e0e9e3; }
.header-menu button { background: #edf5ef; color: #166534; border: 1px solid #cdddce; padding: .45rem .85rem; }
main { margin: 1.7rem auto; }
section, .panel { border-color: #dfe7e2; border-radius: 12px; box-shadow: 0 3px 14px #193d2605; }
h1, h2, h3 { line-height: 1.25; color: inherit; }
h1 { font-size: clamp(1.5rem, 2.5vw, 2rem); letter-spacing: -.025em; margin-bottom: .75rem; }
h2 { font-size: 1.2rem; }
button, input, textarea, select { font: inherit; }
button, .action-button { border-radius: 7px; font-size: .88rem; font-weight: 600; transition: background-color .15s; }
button:hover, .action-button:hover { background: #dceee1; }
button:disabled { cursor: default; opacity: .65; }
input, textarea, select { border-color: #bccbc1; background: white; border-radius: 7px; }
label { font-size: .85rem; font-weight: 600; color: #40554a; }
.page-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }
.page-heading h1, .page-heading h2 { margin: 0; }
.page-heading p { margin: .4rem 0 0; color: #64746a; font-size: .9rem; }
.page-eyebrow { display: block; color: #15803d; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; margin-bottom: .45rem; }
.page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.action-secondary { background: #edf5ef; color: #166534; border: 1px solid #cdddce; }
.action-secondary:hover { background: #dceee1; }
.filters { background: #f6f9f7; border: 1px solid #e2eae5; border-radius: 9px; padding: 1rem; gap: .85rem; }
.filters input { min-width: 200px; }
.filters > a { font-size: .85rem; padding: .65rem .3rem; }
.table-wrap { border: 1px solid #e2e9e4; border-radius: 9px; }
table { font-size: .88rem; }
th { color: #486052; font-size: .78rem; font-weight: 650; background: #eef5f0; }
th, td { padding: .9rem .85rem; border-bottom-color: #e6ece8; }
tbody tr:nth-child(even) { background: #fafcfb; }
tbody tr:hover { background: #f0f7f2; }
tbody tr:last-child td { border-bottom: 0; }
.status-badge { display: inline-block; border-radius: 20px; padding: .25rem .65rem; background: #edf2ef; color: #40554a; border: 1px solid #dce5df; font-size: .76rem; font-weight: 600; }
.badge-action { text-decoration: none; line-height: inherit; cursor: pointer; }
.badge-action:hover, .badge-action:focus-visible { background: #dce8e0; color: #243f2e; box-shadow: none; }
[data-copy-url] + .copy-feedback { position: fixed; z-index: 1000; box-sizing: border-box; margin: 0; padding: .65rem .85rem; border-radius: 8px; background: #243b2e; color: white; box-shadow: 0 4px 16px #163a2926; font-size: .78rem; line-height: 1.5; text-align: left; pointer-events: none; opacity: 0; }
.copy-feedback[data-visible="true"] { opacity: 1; }
.status-message { background: #eaf6ee; border: 1px solid #bddfc8; border-radius: 8px; padding: .85rem 1rem; color: #166534; }
.empty-state { padding: 2rem; text-align: center; color: #64746a; }
.requisition-summary > dl { background: #f6f9f7; padding: 1rem; border-radius: 9px; margin-top: 1.4rem; }
.login { max-width: 400px; margin: 2.5rem auto; padding: 2rem; box-shadow: 0 12px 35px #143d2910; }
.login-logo { max-width: 220px; margin-bottom: 1.7rem; }
.login-heading { text-align: center; margin-bottom: 1.5rem; }
.login-heading p { color: #64746a; font-size: .88rem; margin: .5rem 0; }
.login button { width: 100%; margin-top: .5rem; }
main.quotations-page, main.requisitions-page { max-width: none; width: 100%; box-sizing: border-box; padding: 0 2rem; }
.quotation-card { padding: 1.5rem; }
.quotation-card-heading { border-bottom: 1px solid #e4ebe6; padding-bottom: 1rem; }
.quotation-card-heading h2 { margin: 0; }
.quotation-card-heading p { color: #64746a; font-size: .85rem; margin: .4rem 0 0; }
.quotation-info { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem 1.5rem; margin: 1.25rem 0; }
.quotation-info > div { min-width: 0; }
.quotation-info dt { color: #64746a; font-size: .76rem; font-weight: 500; margin-bottom: .3rem; }
.quotation-info dd { font-size: .9rem; overflow-wrap: anywhere; }
.quotation-downloads { display: flex; flex-wrap: wrap; gap: .65rem; margin: 1rem 0; }
.quotation-downloads p { margin: 0; }
.quotation-table { min-width: 1150px; }
.quotation-table th:nth-child(2), .quotation-table th:nth-child(3) { min-width: 180px; }
.quotation-table td:nth-child(4), .quotation-table td:nth-child(5), .quotation-table td:nth-child(6) { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.quotation-table th:nth-child(4), .quotation-table th:nth-child(5), .quotation-table th:nth-child(6) { text-align: right; }
.quotation-table td:nth-child(6) { font-weight: 600; color: #166534; }
.quotation-table .text { margin: .35rem 0 0; }
@media (max-width: 1000px) { .quotation-info { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
    body > header { padding: 1rem; }
    .header-menu form { justify-content: space-between; }
    section, .panel { padding: 1rem; }
    main.quotations-page, main.requisitions-page { padding: 0 1rem; }
    .quotation-info { grid-template-columns: 1fr; }
    .filters > div, .filters input { width: 100%; min-width: 0; }
    .login { padding: 1.5rem; }
    dl { grid-template-columns: minmax(100px, 130px) minmax(0, 1fr); }
}
@media print {
    main.quotations-page, main.requisitions-page { padding: 0; }
    section, .panel { box-shadow: none; }
    .quotation-downloads { display: none; }
}

.supplier-company-toggle { cursor: pointer; list-style: none; margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.supplier-company-toggle::-webkit-details-marker { display: none; }
.supplier-company-name { font-size: 1.2rem; font-weight: 600; }
.supplier-company-arrow { color: #166534; transition: transform .15s ease; }
.supplier-company[open] > .supplier-company-toggle { margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid #e4ebe6; }
.supplier-company[open] > .supplier-company-toggle .supplier-company-arrow { transform: rotate(180deg); }
.supplier-company-toggle:focus-visible { outline: 2px solid #166534; outline-offset: 6px; border-radius: 4px; }

.access-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; }
.access-form-grid input:not([type=checkbox]), .access-form-grid select { width: 100%; }
.access-form-grid small { display: block; margin-top: .4rem; }
.access-status { display: flex; align-items: center; }
.access-status label { display: flex; align-items: center; gap: .6rem; }
.access-permissions { border: 1px solid #dfe7e2; border-radius: 9px; padding: 1rem; margin: 1rem 0 1.5rem; }
.access-permissions legend { font-weight: 600; padding: 0 .5rem; }
.access-permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.access-permission-option { display: flex; gap: .7rem; align-items: center; padding: .8rem; border: 1px solid #e2e9e4; border-radius: 7px; background: #f6f9f7; cursor: pointer; }
.access-permission-summary { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
@media (max-width: 600px) { .access-form-grid, .access-permission-grid { grid-template-columns: 1fr; } }

.user-team-tabs { display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: 1.25rem; }
.user-team-tab { display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border: 1px solid #dce5df; border-radius: 9px; background: #f6f9f7; color: #40554a; font-weight: 600; text-decoration: none; }
.user-team-tab:hover { background: #edf5ef; }
.user-team-tab.is-active { background: #e6f3ea; border-color: #9fceb0; color: #166534; box-shadow: inset 0 -3px 0 #24b85a; }

.supplier-login-dialog { width: min(640px, calc(100vw - 3rem)); max-height: calc(100vh - 3rem); overflow-y: auto; border: 1px solid #dfe7e2; border-radius: 14px; padding: 1.5rem; color: #24332c; box-shadow: 0 18px 60px #102b2840; }
.supplier-login-dialog::backdrop { background: #102b2870; backdrop-filter: blur(3px); }
.supplier-login-details { grid-template-columns: 150px minmax(0, 1fr); margin: 1rem 0 1.5rem; }
.supplier-login-details dd { overflow-wrap: anywhere; }
.supplier-login-checkbox { display: flex; gap: .65rem; align-items: center; margin: 1rem 0; }
.supplier-login-secret { border: 1px solid #bddfc8; border-radius: 9px; background: #eaf6ee; padding: 1rem; margin: 1rem 0; }
.supplier-login-secret > input { width: 100%; font-family: monospace; }
.supplier-login-dialog [hidden] { display: none !important; }
@media (max-width: 600px) { .supplier-login-details { grid-template-columns: 1fr; gap: .3rem; } .supplier-login-details dd { margin-bottom: .6rem; } }

.portal-access-active { background: #e7f6ec; color: #166534; border-color: #b9dfc5; }
.portal-access-disabled { background: #fff0f0; color: #a31e24; border-color: #efc5c7; }
.portal-access-pending { background: #f1f3f2; color: #64746a; border-color: #dce5df; }

/* Supplier invitation preparation. */
main.supplier-invitations-page { max-width: 1480px; }
.invitation-company { border: 1px solid #dce5df; border-radius: .5rem; margin: .8rem 0; padding: 1rem; }
.invitation-company > summary { cursor: pointer; font-weight: 600; }
.invitation-company > summary .status-badge { margin-left: .75rem; }
.invitation-contact-label { display: flex; align-items: flex-start; gap: .75rem; padding: .85rem 0; border-top: 1px solid #edf1ed; }
.invitation-contact-label input { margin-top: .3rem; flex-shrink: 0; }
.invitation-contact-label small { display: block; margin-top: .3rem; }
.invitation-subject { width: 100%; }
.invitation-preview-body { padding: 1.25rem; background: #f6faf7; border: 1px solid #dce5df; border-radius: .5rem; overflow-wrap: anywhere; }

.supplier-picker { position: relative; margin: 1rem 0; max-width: 700px; }
.supplier-picker > summary { cursor: pointer; border: 1px solid #b7cabb; border-radius: .4rem; background: #f6faf7; padding: .9rem 1rem; }
.supplier-picker-menu { position: absolute; z-index: 20; top: calc(100% + .3rem); left: 0; right: 0; padding: 1rem; border: 1px solid #b7cabb; border-radius: .4rem; background: #fff; box-shadow: 0 8px 24px #14532d26; }
.supplier-picker-menu input[type=search] { width: 100%; margin-bottom: .6rem; }
.supplier-picker-options { max-height: 280px; overflow-y: auto; }
.supplier-picker-option { display: flex; align-items: center; gap: .75rem; padding: .7rem .4rem; cursor: pointer; margin: 0; }
.supplier-picker-option:hover { background: #eef6f0; }
.supplier-picker-option[hidden], .invitation-company[hidden] { display: none; }
.invitation-company h3 { margin: 0 0 .75rem; }

.invitation-controls-row { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(160px, 1fr) minmax(230px, 1fr); gap: 1.25rem; align-items: start; }
.invitation-controls-row .supplier-picker { max-width: none; margin: 0; }
.invitation-controls-row .field { margin: 0; }
.invitation-controls-row select, .invitation-controls-row input[type=date] { width: 100%; min-height: 48px; }
.supplier-invitations-page .invitation-company { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1rem; padding: .6rem 0; margin: 0; border: 0; border-bottom: 1px solid #e3ebe5; border-radius: 0; }
.supplier-invitations-page .invitation-company[hidden] { display: none; }
.supplier-invitations-page .invitation-company h3 { margin: 0; font-size: .95rem; }
.supplier-invitations-page .invitation-contact-label { display: inline-flex; align-items: center; gap: .45rem; margin: 0; padding: .3rem .5rem; border: 0; background: #f7faf8; border-radius: .3rem; font-size: .85rem; }
.supplier-invitations-page .invitation-contact-label input { margin: 0; }
.invitation-contact-email { overflow-wrap: anywhere; }
.supplier-invitations-page .invitation-contact-label .status-badge { padding: .15rem .4rem; font-size: .72rem; white-space: nowrap; }
.supplier-invitations-page [data-total-selected], .supplier-invitations-page [data-no-companies] { font-size: .85rem; margin: .5rem 0 0; }
@media (max-width: 850px) { .invitation-controls-row { grid-template-columns: 1fr; gap: .75rem; } }

.invitation-editor-toolbar { display: flex; flex-wrap: wrap; gap: .3rem; padding: .5rem; background: #f3f6f4; border: 1px solid #cbd8cf; border-radius: .4rem .4rem 0 0; }
.invitation-editor-toolbar[hidden], .invitation-editor[hidden] { display: none; }
.invitation-editor-toolbar button { padding: .35rem .65rem; min-width: 32px; background: white; font-size: .85rem; }
.invitation-editor { min-height: 320px; max-height: 580px; overflow-y: auto; padding: 1.25rem; border: 1px solid #cbd8cf; border-top: 0; border-radius: 0 0 .4rem .4rem; background: white; outline-color: #86d9a0; }
.invitation-message-content { line-height: 1.6; font-size: .92rem; }
.invitation-message-content h3 { margin: 1.2rem 0 .5rem; font-size: 1rem; }
.invitation-message-content p { margin: .5rem 0 .9rem; }
.invitation-message-content table { margin: .6rem 0 1rem; font-size: .85rem; }
.invitation-message-content td, .invitation-message-content th { padding: .5rem .65rem; }
.invitation-editor [data-invitation-token] { background: #f0f6f2; border-radius: .15rem; }

.invitation-preview-link { border: 0; background: transparent; color: #15803d; text-decoration: underline; padding: .5rem .75rem .5rem 0; font: inherit; }
.invitation-inline-preview { margin: 1rem 0; }
.invitation-inline-preview[hidden] { display: none; }
.supplier-invitations-page input[type=hidden] { display: none !important; }

.invitation-preview-dialog { width: min(900px, calc(100vw - 3rem)); }
.invitation-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.invitation-preview-heading h2 { margin: 0; }

.procurement-stage-options { border: 0; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.procurement-stage-options legend { font-weight: 600; margin-bottom: .5rem; }
.procurement-stage-option { display: flex; align-items: center; gap: .6rem; border: 1px solid #cdddce; border-radius: .4rem; padding: .6rem .8rem; margin: 0; cursor: pointer; }
.procurement-stage-option:has(input:checked) { background: #e7f6ec; border-color: #15803d; }
.procurement-stage-option input { appearance: none; width: 17px; height: 17px; padding: 0; margin: 0; border: 1px solid #7d9384; border-radius: 3px; flex-shrink: 0; }
.procurement-stage-option input:checked { background: #15803d; box-shadow: inset 0 0 0 3px white; }
.procurement-stage-option small { display: block; color: #65716a; font-size: .75rem; margin-top: .2rem; }

.procurement-stage-description { display: block; margin-top: 0.3rem; }

.portal-quotation-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.portal-quotation-fields input, .portal-quotation-fields select { width: 100%; }
.portal-quotation-item { border: 1px solid #dce5df; border-radius: .4rem; padding: 1rem; margin: 1rem 0; }
.portal-quotation-item-choice { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.portal-quotation-item fieldset { border: 0; margin-top: 1rem; padding: 0; }
.portal-quotation-item fieldset:disabled { opacity: .55; }

.portal-quotation-item { padding: .75rem; margin: .75rem 0; }
.portal-quotation-item fieldset { min-width: 0; overflow-x: auto; margin-top: .65rem; }
.portal-quotation-item .portal-quotation-fields {
    grid-template-columns: 120px 140px minmax(200px, 1.5fr) 140px 140px minmax(160px, 1fr);
    min-width: 1000px;
    gap: .6rem;
    margin-bottom: .35rem;
    align-items: start;
}
.portal-quotation-item .portal-quotation-fields label { font-size: .8rem; white-space: nowrap; margin-bottom: .3rem; }
.portal-quotation-item .portal-quotation-fields input,
.portal-quotation-item .portal-quotation-fields textarea {
    width: 100%;
    box-sizing: border-box;
    height: 2.2rem;
    min-height: 2.2rem;
    padding: .4rem .5rem;
    font: inherit;
    font-size: .85rem;
}
.portal-quotation-item .portal-quotation-fields textarea { resize: vertical; }

.procurement-stage-tabs { display: flex; flex-wrap: nowrap; gap: .4rem; overflow-x: auto; border-bottom: 2px solid #dce5df; padding: .25rem .15rem 0; margin-bottom: 1.2rem; }
.procurement-stage-tab { flex: 0 0 auto; padding: .8rem 1.1rem; border: 1px solid #dce5df; border-bottom: 0; border-radius: .5rem .5rem 0 0; background: #f5f8f6; color: #40554a; font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.procurement-stage-tab:hover { background: #edf5ef; color: #166534; }
.procurement-stage-tab.is-active { background: #e7f6ec; color: #166534; border-color: #a9cfb4; box-shadow: inset 0 -3px #15803d; }
.procurement-stage-tab:focus-visible { outline: 2px solid #15803d; outline-offset: -3px; }
.procurement-history-tab { margin-left: auto; }
@media print { .procurement-stage-tabs { display: none; } }

.requisition-closure { margin: 0; }
.requisition-closure label { display: inline-flex; margin: 0; }
.requisition-closure input[type="checkbox"], .requisition-closed-checkbox { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: #166534; vertical-align: middle; }

.recipient-selection { margin-top: 1rem; border: 1px solid #dce7df; border-radius: 10px; overflow: hidden; background: #fff; }
.recipient-selection-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem 1rem; background: #f0f7f2; }
.recipient-selection-bar strong { display: block; font-size: .9rem; }
.recipient-selection-bar [data-total-selected] { display: block; color: #5a7162; margin-top: .2rem; font-size: .78rem; }
.recipient-selection-actions, .recipient-selection-tools { display: flex; align-items: center; gap: .5rem; }
.recipient-selection-actions button, .recipient-selection-tools button { padding: .4rem .65rem; white-space: nowrap; font-size: .78rem; }
.recipient-selection-tools { padding: .6rem 1rem; border-bottom: 1px solid #e5ede7; flex-wrap: wrap; }
.recipient-selection-tools input[type=search] { flex: 1; min-width: 160px; padding: .5rem .65rem; font-size: .82rem; }
.recipient-selection-scroll { max-height: 290px; overflow: auto; }
.contact-selection-table { width: 100%; border-collapse: collapse; margin: 0; min-width: 650px; }
.contact-selection-table thead th { position: sticky; top: 0; z-index: 1; padding: .55rem .8rem; background: #f6f9f7; }
.contact-selection-table td { padding: .5rem .8rem; font-size: .8rem; vertical-align: middle; }
.contact-selection-table td strong { display: block; font-size: .8rem; font-weight: 600; }
.contact-selection-table td small { display: block; color: #687c70; font-size: .75rem; overflow-wrap: anywhere; }
.contact-selection-table .status-badge { font-size: .7rem; padding: .15rem .4rem; white-space: nowrap; }
.contact-selection-table input[type=checkbox] { width: 15px; height: 15px; margin: 0; accent-color: #166534; }
.contact-selection-table .invitation-company { display: table-row-group; padding: 0; margin: 0; border: 0; }
.contact-selection-table .invitation-company[hidden], .contact-selection-table tr[hidden], .contact-selection-table[hidden] { display: none; }
.contact-selection-table tbody tr:hover { background: #f7fbf8; }
.recipient-selection-hint { margin: 0; padding: .55rem 1rem; border-top: 1px solid #e5ede7; font-size: .74rem; color: #687c70; background: #fbfcfb; }
.recipient-empty { margin: 0; padding: 1.5rem 1rem; text-align: center; color: #728278; font-size: .85rem; }
@media (max-width: 650px) { .recipient-selection-bar { align-items: flex-start; flex-direction: column; } .recipient-selection-tools { padding: .6rem; } }

.contact-selection-table tbody tr:has(input:checked) { background: #eff8f1; }

.supplier-invitations-page > ul.error { list-style: none; margin: 0 0 1rem; padding: .85rem 1rem; border: 1px solid #efb7ba; border-left: 4px solid #b4232c; border-radius: 8px; background: #fff2f2; color: #a31e24; font-size: .9rem; }

.status-badge.status-closed { background: #fff0f0; color: #a12d35; border-color: #e4aab0; font-weight: 650; }

.email-status-row + .email-status-row { margin-top: .3rem; }
.email-status { display: inline-flex; align-items: center; gap: .35rem; }
.email-status svg { flex-shrink: 0; }
.email-status-sent { color: #166534; background: #edf8ef; border-color: #c4e5cc; }
.email-status-failed { color: #a31e24; background: #fff1f1; border-color: #efc5c7; }
.email-status-pending { color: #68766e; background: #f3f5f4; border-color: #dde3df; }

.deadline-extension { position: relative; }
.deadline-extension summary { cursor: pointer; }
.deadline-extension form { position: absolute; z-index: 25; right: 0; top: calc(100% + .4rem); width: 260px; padding: 1rem; background: white; border: 1px solid #cbd8cf; border-radius: 8px; box-shadow: 0 8px 24px #14532d26; }
.deadline-extension input { width: 100%; }
.deadline-extension small { display: block; margin: .5rem 0; font-size: .75rem; }


/* Shared supplier portal presentation. */
:root {
    --portal-ink: #21382d;
    --portal-muted: #65776d;
    --portal-green: #176340;
    --portal-border: #dfe7e2;
    --portal-surface: #ffffff;
    --portal-radius: 12px;
}
@media screen {
    body { background: #f4f6f5; color: var(--portal-ink); -webkit-font-smoothing: antialiased; }
    body > header { background: #152d23; border-bottom: 1px solid #2d5540; padding: .65rem 2rem 0; box-shadow: 0 3px 14px #142d230d; }
    .platform-title { font-size: .98rem; letter-spacing: .025em; font-weight: 500; color: #edf4ef; margin: 0 0 .4rem; }
    .header-logo { width: 96px; margin: 0 auto .5rem; padding: .3rem .5rem; border-radius: 5px; }
    .header-menu { gap: .25rem; padding: .35rem 0; border-top: 1px solid #ffffff17; }
    .header-nav-link { background: transparent; border-radius: 6px; padding: .55rem .85rem; font-size: .84rem; font-weight: 500; color: #d1ded5; border: 1px solid transparent; }
    .header-nav-link:hover { background: #ffffff0c; color: white; }
    .header-nav-link[aria-current=page] { color: white; background: #ffffff12; border-color: #ffffff18; box-shadow: inset 0 -2px #83c59f; }
    .header-menu form { gap: .8rem; }
    .header-menu form span { font-size: .8rem; color: #d1ded5; }
    .header-menu button { font-size: .78rem; background: transparent; color: #eff6f1; border-color: #ffffff32; padding: .4rem .7rem; }
    .header-menu button:hover { background: #ffffff12; }
    main { margin: 1.5rem auto 2.5rem; }
    main.requisitions-page, main.quotations-page { padding: 0 1.75rem; }
    section, .panel { border: 1px solid var(--portal-border); border-radius: var(--portal-radius); box-shadow: 0 2px 8px #142d2303; padding: 1.35rem 1.5rem; }
    h1 { font-size: clamp(1.45rem, 2vw, 1.8rem); font-weight: 650; letter-spacing: -.035em; }
    h2 { font-size: 1.05rem; font-weight: 650; letter-spacing: -.015em; }
    h3 { font-weight: 600; }
    .page-heading { margin-bottom: 1.1rem; gap: .75rem; }
    .page-heading p { font-size: .83rem; color: var(--portal-muted); }
    .page-eyebrow { color: var(--portal-muted); font-size: .65rem; letter-spacing: .13em; margin-bottom: .35rem; }
    .filters { border: 0; border-radius: 8px; background: #f5f7f6; padding: .85rem 1rem; }
    .filters input { min-width: 260px; }
    label { font-size: .79rem; color: #52665b; }
    input:not([type=checkbox]):not([type=radio]), textarea, select { border-color: #d0dbd4; border-radius: 7px; background: #fff; color: var(--portal-ink); transition: border-color .15s, box-shadow .15s; }
    input::placeholder, textarea::placeholder { color: #78887e; opacity: 1; }
    input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #a0c7ae; outline-offset: 1px; }
    button, .action-button { font-size: .82rem; padding: .55rem .85rem; line-height: 1.4; }
    .action-button, .page-actions > button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; box-sizing: border-box; min-height: 36px; }
    button > svg, .action-button > svg { flex-shrink: 0; }
    button:not(:disabled):active, .action-button:active { box-shadow: inset 0 1px 2px #173b2812; }
    button:disabled { cursor: not-allowed; opacity: .5; }
    .button-primary, button.button-primary { background: var(--portal-green); border: 1px solid var(--portal-green); color: #fff; box-shadow: 0 2px 4px #17634015; }
    .button-primary:hover:not(:disabled) { background: #104d30; border-color: #104d30; color: #fff; }
    .table-wrap { border-color: var(--portal-border); border-radius: 8px; }
    table { font-size: .82rem; }
    th { font-size: .72rem; font-weight: 600; background: #f5f8f6; color: #53685b; letter-spacing: .015em; white-space: nowrap; }
    th, td { padding: .75rem .85rem; border-bottom-color: #e9eeeb; }
    td { vertical-align: middle; }
    tbody tr:nth-child(even) { background: #fcfdfc; }
    tbody tr:hover { background: #f4f8f5; }
    td .page-actions { gap: .4rem; }
    td .page-actions > .badge-action { min-height: 30px; }
    td small.muted { display: block; font-size: .7rem; margin-top: .2rem; }
    .status-badge { padding: .25rem .6rem; font-size: .72rem; font-weight: 550; background: #f1f4f2; color: #506358; border-color: #e0e7e2; line-height: 1.4; }
    .badge-action { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; box-sizing: border-box; min-height: 30px; border-radius: 6px; color: #185b39; border-color: #cdddce; background: #f5faf6; white-space: nowrap; font-weight: 600; }
    .badge-action:hover { background: #e7f2eb; border-color: #a9c9b4; }
    .supplier-directory-name { color: #176340; font-size: .84rem; font-weight: 650; line-height: 1.5; }
    .portal-access-active { color: #176340; background: #edf7f0; border-color: #cce4d4; }
    .portal-access-pending { color: #6a736c; background: #f4f5f4; }
    .portal-access-disabled { color: #a0363c; background: #fcf1f1; border-color: #edd1d3; }
    .status-message { padding: .85rem 1rem; border: 1px solid #cce1d2; border-radius: 8px; background: #edf7f0; color: #245d3b; font-size: .85rem; }
    main > ul.error { padding: .85rem 1rem .85rem 2rem; border: 1px solid #edc9cc; border-radius: 8px; background: #fff5f5; font-size: .85rem; }
    .supplier-login-dialog { border-radius: 14px; padding: 1.5rem; border-color: #dce5df; box-shadow: 0 24px 80px #102b2833; }
    .supplier-login-dialog::backdrop { background: #142c2359; backdrop-filter: blur(4px); }
    .supplier-login-dialog .page-heading { align-items: center; padding-bottom: 1rem; border-bottom: 1px solid #e7ede9; }
    .supplier-login-details dt { color: var(--portal-muted); font-size: .8rem; font-weight: 500; }
    .supplier-login-details dd { font-size: .87rem; }
    .procurement-stage-tabs { gap: .2rem; border-bottom: 1px solid #dce5df; padding: 0; }
    .procurement-stage-tab { border: 0; border-radius: 0; background: transparent; font-size: .83rem; padding: .8rem 1rem; color: #63756a; box-shadow: none; }
    .procurement-stage-tab.is-active { background: #edf6f0; color: #176340; box-shadow: inset 0 -2px #176340; border-color: transparent; border-radius: 6px 6px 0 0; font-weight: 650; }
    .procurement-stage-tab:hover { background: #eef4f0; }
    .user-team-tab { padding: .6rem .9rem; font-size: .83rem; border-radius: 7px; }
    .supplier-picker > summary { border-color: #d0dbd4; background: #fff; border-radius: 7px; padding: .75rem .85rem; font-size: .83rem; }
    .supplier-picker-menu { border-color: #dce5df; border-radius: 9px; box-shadow: 0 12px 32px #142d231a; }
    .procurement-stage-options { gap: .5rem; }
    .procurement-stage-option { flex: 1 1 180px; border-color: #dce5df; background: #fcfdfc; padding: .75rem .8rem; border-radius: 8px; font-size: .82rem; }
    .procurement-stage-option:has(input:checked) { background: #eff7f2; border-color: #8bb69a; box-shadow: inset 0 0 0 1px #8bb69a; }
    .procurement-stage-option input { border-radius: 50%; }
    .procurement-stage-option small { font-size: .7rem; font-weight: 400; }
    .recipient-selection { border-color: #dce5df; border-radius: 9px; }
    .recipient-selection-bar { background: #f5f8f6; padding: .75rem .9rem; }
    .recipient-selection-bar strong { font-size: .83rem; }
    .recipient-selection-tools { background: #fff; padding: .55rem .9rem; }
    .contact-selection-table tbody tr:has(input:checked) { background: #edf7f0; }
    .invitation-editor-toolbar { background: #f6f8f7; border-color: #dce5df; padding: .4rem; }
    .invitation-editor-toolbar button { border-color: #e1e8e3; border-radius: 4px; font-size: .78rem; }
    .invitation-editor { border-color: #dce5df; padding: 1.25rem 1.5rem; }
    .invitation-preview-link { font-size: .83rem; font-weight: 600; text-decoration: none; }
    .invitation-preview-link:hover { background: transparent; text-decoration: underline; }
    .quotation-card-heading { border-bottom-color: #e8eeea; }
    .quotation-info dt { font-size: .72rem; }
    .quotation-info dd { font-size: .86rem; font-weight: 500; }
    .portal-quotation-item { border-color: #dfe7e2; border-radius: 9px; background: #fff; }
    .portal-quotation-item-choice { color: #254c35; background: #f4f8f5; border-bottom: 1px solid #e5ece7; padding: .6rem .75rem; border-radius: 6px; }
    .portal-quotation-item .portal-quotation-fields { gap: .6rem; }
    nav[role=navigation] { font-size: .8rem; padding: .5rem 0; }
    @media (max-width: 700px) {
        body > header { padding: .65rem 1rem 0; }
        .platform-title { font-size: .83rem; max-width: 38rem; margin: 0 auto .5rem; }
        .header-menu { gap: .2rem; }
        .header-nav-link { padding: .5rem .6rem; font-size: .78rem; }
        .header-menu form { border-top: 1px solid #ffffff12; padding-top: .6rem; margin-top: .3rem; width: 100%; }
        main.requisitions-page, main.quotations-page { padding: 0 .85rem; }
        section, .panel { padding: 1rem; }
        .filters input { min-width: 0; }
        .procurement-stage-option { flex-basis: 140px; }
        .recipient-selection-actions { flex-wrap: wrap; }
        .deadline-extension form { width: min(260px, calc(100vw - 4rem)); }
    }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.role-help { cursor: help; text-decoration: underline dotted #a1b5a8; text-underline-offset: 4px; }
.role-help:focus-visible { outline: 2px solid #8bb69a; outline-offset: 3px; }

.supplier-instructions { margin: 1rem 0 1.25rem; padding: .85rem 1rem; border: 1px solid #dce7df; border-left: 3px solid #8bb69a; border-radius: 7px; background: #f5f9f6; }
.supplier-instructions h2 { margin: 0 0 .45rem; font-size: .88rem; }
.supplier-instructions p { margin: 0; font-size: .85rem; overflow-wrap: anywhere; }

/* Distinct actions in the supplier's assigned requisitions list. */
.badge-action.supplier-submit-action,
.badge-action.supplier-history-action { display: inline-flex; align-items: center; min-height: 32px; box-sizing: border-box; padding: .4rem .75rem; font-weight: 650; border-radius: 6px; }
.badge-action.supplier-submit-action { color: #fff; background: #176340; border: 1px solid #176340; }
.badge-action.supplier-submit-action:hover,
.badge-action.supplier-submit-action:focus-visible { color: #fff; background: #104d30; border-color: #104d30; }
.badge-action.supplier-history-action { color: #24558a; background: #f2f6fc; border: 1px solid #9bb6d7; }
.badge-action.supplier-history-action:hover,
.badge-action.supplier-history-action:focus-visible { color: #183e69; background: #e6eef9; border-color: #537fae; }
.badge-action.supplier-submit-action:focus-visible,
.badge-action.supplier-history-action:focus-visible { outline: 2px solid #667f95; outline-offset: 3px; }

.procurement-closed-notice { border: 1px solid #e4aab0; border-left: 3px solid #a12d35; border-radius: 8px; background: #fff5f5; color: #8d2930; padding: .85rem 1rem; }
.procurement-closed-notice p { margin: 0; }
.requisition-closed-checkbox:checked { accent-color: #a12d35; opacity: 1; }

/* Restrained RFQ stage colours; labels remain readable without colour. */
.status-badge.rfq-stage-initial { color: #275b8d; background: #eff5fc; border-color: #cbdced; }
.status-badge.rfq-stage-revision { color: #855414; background: #fff7e8; border-color: #ead8b4; }
.status-badge.rfq-stage-negotiation { color: #70438c; background: #f6f0fa; border-color: #dfd0ea; }
.status-badge.rfq-stage-final { color: #176340; background: #edf7f0; border-color: #c8e1d0; }
.status-badge.rfq-stage-pending { color: #65726a; background: #f3f5f4; border-color: #dde4df; }

/* Shared RFQ stage identity on badges, tabs and invitation choices. */
.rfq-stage-initial { --stage-ink: #275b8d; --stage-tint: #eff5fc; --stage-border: #cbdced; }
.rfq-stage-revision { --stage-ink: #855414; --stage-tint: #fff7e8; --stage-border: #ead8b4; }
.rfq-stage-negotiation { --stage-ink: #70438c; --stage-tint: #f6f0fa; --stage-border: #dfd0ea; }
.rfq-stage-final { --stage-ink: #176340; --stage-tint: #edf7f0; --stage-border: #c8e1d0; }
.rfq-stage-pending { --stage-ink: #65726a; --stage-tint: #f3f5f4; --stage-border: #dde4df; }
@media screen {
    .procurement-stage-tab[class*=rfq-stage-] { color: var(--stage-ink); }
    .procurement-stage-tab[class*=rfq-stage-]:hover { background: var(--stage-tint); }
    .procurement-stage-tab.is-active[class*=rfq-stage-] { color: var(--stage-ink); background: var(--stage-tint); box-shadow: inset 0 -2px var(--stage-ink); }
    .procurement-stage-option[class*=rfq-stage-] strong { color: var(--stage-ink); }
    .procurement-stage-option[class*=rfq-stage-]:has(input:checked) { background: var(--stage-tint); border-color: var(--stage-border); box-shadow: inset 0 0 0 1px var(--stage-border); }
    .procurement-stage-option[class*=rfq-stage-] input:checked { background: var(--stage-ink); border-color: var(--stage-ink); }
}

.stores-comments { margin: .75rem 0 1.2rem; padding: .85rem 1rem; background: #f3f6fb; border: 1px solid #dce4ef; border-left: 3px solid #8da5c1; border-radius: 7px; }
.stores-comments h2 { margin: 0 0 .4rem; font-size: .86rem; color: #3f5772; }
.stores-comments p { margin: 0; color: #435467; font-size: .85rem; overflow-wrap: anywhere; }

.requisition-deadline-dialog { width: min(500px, calc(100vw - 2rem)); }
.requisition-deadline-dialog input[type=date] { width: 100%; }
.requisition-deadline-dialog dl { grid-template-columns: 125px minmax(0, 1fr); font-size: .85rem; }
.requisition-deadline-dialog .muted { font-size: .8rem; line-height: 1.6; white-space: normal; }

.supplier-invitations-page input[type=date]:read-only { background: #f3f5f4; color: #65726a; cursor: default; }

/* Compact list actions and clearer supplier submission details. */
.requisition-deadline-action { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.requisition-deadline-caption { color: #65776d; font-size: .7rem; white-space: nowrap; }
.row-more-actions { display: inline-flex; }
.row-more-actions-toggle { display: inline-flex; align-items: center; gap: .65rem; }
.row-more-actions-toggle > span { font-size: 1rem; line-height: 1; }
.row-more-actions-toggle[aria-expanded=true] { background: #e8f2ec; border-color: #9fbea9; }
.row-more-actions-menu { position: fixed; z-index: 1000; display: grid; gap: .2rem; width: min(210px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; box-sizing: border-box; margin: 0; padding: .4rem; border: 1px solid #dce5df; border-radius: 9px; background: #fff; box-shadow: 0 10px 32px #173b2826; }
.row-more-actions-menu[hidden] { display: none; }
.row-more-actions-menu a { display: flex; align-items: center; gap: .6rem; padding: .65rem .6rem; border-radius: 5px; white-space: nowrap; font-size: .78rem; font-weight: 500; color: #355942; text-decoration: none; }
.row-more-actions-menu a:hover, .row-more-actions-menu a:focus-visible { background: #eef5f0; color: #176340; outline: 2px solid #b5d1bf; outline-offset: -2px; }
.row-more-actions-menu svg { flex-shrink: 0; }
@media print { .row-more-actions-menu { display: none !important; } }
.status-badge.status-deadline-passed { color: #855414; background: #fff7e8; border-color: #ead8b4; }
.supplier-contact-group + .supplier-contact-group > tr:first-child > td { border-top: 3px solid #dce6df; }
.quotation-submission-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; padding: 1rem; border: 1px solid #e2e9e4; border-radius: 8px; background: #f8faf9; }
.quotation-submission-meta dt { color: #65776d; font-size: .73rem; font-weight: 500; margin-bottom: .3rem; }
.quotation-submission-meta dd { font-size: .85rem; overflow-wrap: anywhere; }
.quotation-upload { padding: 1.1rem; margin: 1rem 0; border: 1px dashed #9ebca8; border-radius: 9px; background: #f7faf8; }
.quotation-upload label { color: #254c35; font-size: .87rem; }
.quotation-upload .muted { font-size: .78rem; margin: .4rem 0 .8rem; }
.quotation-upload input[type=file] { display: block; max-width: 100%; padding: .4rem; border-color: #d7e3db; background: white; }
.quotation-upload input[type=file]::file-selector-button { padding: .5rem .7rem; margin-right: .6rem; border: 1px solid #bdd4c5; border-radius: 5px; background: #edf5ef; color: #176340; cursor: pointer; font: inherit; }
.quotation-file-name { margin: .7rem 0 0; font-size: .8rem; color: #52695c; overflow-wrap: anywhere; }
@media screen {
    .requisition-list-table th:first-child, .requisition-list-table td:first-child { position: sticky; left: 0; z-index: 2; min-width: 110px; background: #fff; box-shadow: 1px 0 0 #dfe7e2; white-space: nowrap; }
    .requisition-list-table th:first-child { z-index: 3; background: #f5f8f6; }
    .requisition-list-table tbody tr:nth-child(even) td:first-child { background: #fcfdfc; }
    .requisition-list-table tbody tr:hover td:first-child { background: #f4f8f5; }
}
@media (max-width: 650px) { .quotation-submission-meta { grid-template-columns: 1fr; gap: .7rem; } }

.account-password-panel { max-width: 560px; margin: 0 auto; }
.account-password-panel input { width: 100%; }
.account-password-panel small { display: block; margin-top: .4rem; font-size: .78rem; }
.header-account { position: relative; }
.header-menu button.header-account-name { border: 1px solid transparent; background: transparent; color: #d1ded5; padding: .4rem .2rem; font-size: .8rem; font-weight: 500; }
.header-menu button.header-account-name:hover { color: white; background: transparent; }
.header-account-popover { position: absolute; top: 100%; right: 0; z-index: 1001; min-width: 170px; padding: .35rem; border: 1px solid #dce5df; border-radius: 8px; background: white; box-shadow: 0 10px 28px #173b2826; visibility: hidden; pointer-events: none; }
.header-account:hover .header-account-popover, .header-account:focus-within .header-account-popover { visibility: visible; pointer-events: auto; }
.header-account-link { display: block; color: #24583b; font-size: .8rem; text-decoration: none; padding: .6rem .7rem; border-radius: 5px; white-space: nowrap; }
.header-account-link:hover, .header-account-link:focus-visible { color: #176340; background: #edf5ef; }
@media print { .header-account-popover { display: none !important; } }
