/* Site-wide polish: page banner, tabs, tables, buttons */
.page-banner { background: linear-gradient(135deg, #f6f5f4 0%, #eef6f8 100%); border: 1px solid #ebe7e4; border-radius: 20px; padding: clamp(1.75rem, 5vw, 3.5rem) 1rem; text-align: center; }
.page-banner h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -.02em; color: #1c1411; margin: 0; }

.nav-pills { gap: .5rem; flex-wrap: wrap; }
.nav-pills .nav-item .nav-link { border: 1px solid #ebe7e4; border-radius: 999px; padding: .5rem 1.1rem; margin: 0; font-size: .85rem; font-weight: 600; background: #fff; color: #1c1411; transition: background .15s, color .15s, border-color .15s; }
.nav-pills .nav-item .nav-link:hover { border-color: #60bbd0; }
.nav-pills .nav-item .nav-link.active { background: #351403; border-color: #351403; color: #fff; }

.table-responsive { position: relative; /* contains absolutely-positioned .visually-hidden labels, which would otherwise widen the whole page */ background: #fff; border: 1px solid #ebe7e4; border-radius: 16px; padding: .75rem 1rem; }
.table { --bs-table-striped-bg: #faf9f8; margin-bottom: 0; }
.table.table-bordered { border: 0; }
.table > :not(caption) > * > * { border-left: 0; border-right: 0; padding: .8rem .75rem; vertical-align: middle; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: #6b625e; font-weight: 700; border-bottom: 2px solid #ebe7e4; white-space: nowrap; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #eef6f8; }
.dataTables_wrapper .form-control, .dataTables_wrapper .form-select { border-radius: 10px; }
.dataTables_wrapper .pagination .page-link { border-radius: 8px; margin: 0 2px; color: #351403; }
.dataTables_wrapper .pagination .active .page-link { background: #351403; border-color: #351403; color: #fff; }

.btn-primary, .btn-primary:hover, .btn-primary:focus { background-color: #351403; color: #fff; border: 0; border-radius: 10px; font-weight: 600; }
.btn-primary:hover { background-color: #4d2108; }
.btn-lg { font-size: .95rem; padding: .6rem 1.2rem; }

a:focus-visible, button:focus-visible, .btn:focus-visible { outline: 3px solid rgba(96,187,208,.7); outline-offset: 2px; }

/* ---------- Tender browser (Vue) ---------- */
.tb .nav-link { display: inline-flex; align-items: center; gap: .5rem; }
.tb-count { background: rgba(53,20,3,.1); color: inherit; border-radius: 999px; padding: .05rem .5rem; font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tb .nav-link.active .tb-count { background: rgba(255,255,255,.22); }
.tb-filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.tb-field { flex: 1 1 200px; min-width: 0; }
.tb-field-search { flex: 2 1 280px; }
.tb-field-sm { flex: 0 1 180px; }
.tb-check { margin: 0; white-space: nowrap; }
.tb-clear { padding: 0; font-weight: 600; color: #1f7f95; text-decoration: none; }
.tb-summary { font-size: .85rem; color: #6b625e; min-height: 1.5rem; margin-bottom: .5rem; }
.tb-table .tb-loading { opacity: .5; transition: opacity .15s; }
.tb-title { font-weight: 600; color: #1c1411; text-decoration: none; display: block; }
.tb-title:hover { color: #1f7f95; text-decoration: underline; }
.tb-title-static { font-weight: 600; }
.tb-sub { display: flex; flex-wrap: wrap; gap: .25rem .6rem; margin-top: .25rem; font-size: .78rem; color: #6b625e; }
.tb-chip { background: #eef6f8; color: #1f7f95; border-radius: 6px; padding: .05rem .45rem; font-weight: 600; font-size: .75rem; }
.tb-badge { display: inline-block; margin-top: .2rem; border-radius: 999px; padding: .1rem .55rem; font-size: .72rem; font-weight: 700; }
.tb-badge-ok { background: #e8f5ee; color: #1b6b3a; }
.tb-badge-warn { background: #fff1d6; color: #8a5a00; }
.tb-empty { text-align: center; padding: 3rem 1rem !important; }
.tb-empty .bi { font-size: 2rem; color: #b9b0ab; display: block; margin-bottom: .5rem; }
.tb-footer { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-top: 1rem; }
.tb-footer .pagination { margin: 0; }
.tb-perpage { width: auto; }
.sk { display: block; height: .8rem; border-radius: 6px; background: linear-gradient(90deg, #eee 25%, #f7f5f4 37%, #eee 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; margin: .35rem 0; }
.sk.w-30 { width: 30%; } .sk.w-40 { width: 40%; } .sk.w-50 { width: 50%; } .sk.w-60 { width: 60%; } .sk.w-75 { width: 75%; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* ---------- Shared list extras (awards, contracts, categories) ---------- */
.tb-field-range { display: flex; align-items: center; gap: .4rem; flex: 1 1 260px; }
.tb-dash { color: #6b625e; }
.tb-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.tb-chip-btn { margin: 0; border: 1px solid #d6e9ee; background: #eef6f8; color: #1f7f95; border-radius: 999px; padding: .2rem .7rem; font-size: .8rem; font-weight: 600; cursor: pointer; }
.tb-chip-btn:hover { background: #dff0f4; }

.cat-card { display: flex; flex-direction: column; gap: .35rem; height: 100%; padding: 1.25rem; background: #fff; border: 1px solid #ebe7e4; border-radius: 16px; text-decoration: none; color: #1c1411; transition: transform .2s, box-shadow .2s, border-color .2s; position: relative; }
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(53,20,3,.10); border-color: #60bbd0; color: #1c1411; }
.cat-icon { display: inline-flex; width: 42px; height: 42px; border-radius: 12px; align-items: center; justify-content: center; background: rgba(96,187,208,.16); color: #1f7f95; font-size: 1.2rem; margin-bottom: .4rem; }
.cat-name { font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
.cat-count { color: #6b625e; font-size: .88rem; }
.cat-card .tb-badge { align-self: flex-start; }
.cat-go { margin-top: auto; padding-top: .6rem; font-weight: 600; font-size: .85rem; color: #1f7f95; }

/* ---------- Award detail (page + dialog) ---------- */
.ad-hero { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: space-between; align-items: flex-start; padding: 1.25rem 1.5rem; background: linear-gradient(135deg, #f6f5f4, #eef6f8); border: 1px solid #ebe7e4; border-radius: 16px; margin-bottom: 1rem; }
.ad-hero-main { flex: 1 1 320px; display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.ad-h1 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); font-weight: 700; letter-spacing: -.01em; margin: 0; }
.ad-amount { display: flex; flex-direction: column; text-align: right; }
.ad-amount strong { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ad-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #6b625e; font-weight: 700; }
.ad-sub { font-size: .8rem; color: #6b625e; }
.ad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.ad-card { background: #fff; border: 1px solid #ebe7e4; border-radius: 16px; padding: 1.1rem 1.25rem; }
.ad-card h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #1f7f95; font-weight: 700; margin: 0 0 .6rem; }
.ad-wide { grid-column: 1 / -1; }
.ad-name { font-weight: 700; margin: 0 0 .6rem; }
.ad-dl { margin: 0; display: grid; gap: .45rem; }
.ad-dl > div { display: grid; grid-template-columns: 9rem 1fr; gap: .75rem; font-size: .9rem; }
.ad-dl dt { color: #6b625e; font-weight: 500; }
.ad-dl dd { margin: 0; word-break: break-word; }
.ad-dl-row { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.ad-dl-row > div { grid-template-columns: 1fr; gap: .1rem; }
.ad-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.ad-list li { display: flex; flex-direction: column; font-size: .9rem; }
.ad-list span { color: #6b625e; font-size: .8rem; }
.ad-actions { display: flex; gap: .5rem; margin-top: .5rem; }
.ad-skeleton { padding: 1rem 0; }
.ad-dialog .ad-grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .ad-dialog .ad-grid { grid-template-columns: 1fr; } .ad-dl > div { grid-template-columns: 1fr; gap: 0; } .ad-amount { text-align: left; } }

/* Native <dialog> quick view */
.dd { border: 0; padding: 0; width: min(960px, calc(100vw - 1.5rem)); max-height: calc(100vh - 2rem); border-radius: 20px; box-shadow: 0 24px 60px rgba(28,20,17,.35); background: #fff; color: #1c1411; }
.dd::backdrop { background: rgba(28,20,17,.55); }
.dd-box { display: flex; flex-direction: column; max-height: calc(100vh - 2rem); }
.dd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid #ebe7e4; }
.dd-title { font-size: 1.15rem; font-weight: 700; margin: 0; line-height: 1.35; }
.dd-body { overflow-y: auto; padding: 1.25rem; background: #faf9f8; }
.dd-foot { display: flex; gap: .5rem; justify-content: flex-end; padding: .9rem 1.25rem; border-top: 1px solid #ebe7e4; }
html.dd-open { overflow: hidden; }
@media print { .no-print, .navbar, .dd-head .btn-close { display: none !important; } .ad-card, .ad-hero { break-inside: avoid; } }

/* ---------- Tender detail ---------- */
.td-chips { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.td-state { display: inline-block; border-radius: 999px; padding: .15rem .7rem; font-size: .75rem; font-weight: 700; }
.td-state-open { background: #e8f5ee; color: #1b6b3a; }
.td-state-closing { background: #fff1d6; color: #8a5a00; }
.td-state-closed { background: #ece9e7; color: #5b524e; }
.td-hero { align-items: stretch; }
.td-deadline { display: flex; flex-direction: column; gap: .15rem; min-width: 230px; text-align: right; }
.td-deadline strong { font-size: clamp(1.2rem, 2.6vw, 1.6rem); letter-spacing: -.01em; line-height: 1.15; }
.td-bar { height: 8px; border-radius: 999px; background: #e3dfdc; overflow: hidden; margin: .4rem 0 .1rem; }
.td-bar span { display: block; height: 100%; border-radius: 999px; }
.td-bar-open { background: #2f9e62; } .td-bar-closing { background: #e59a00; } .td-bar-closed { background: #9b918c; }
.td-banner { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1.1rem; margin-bottom: 1rem; background: #f1efed; border: 1px solid #e3dfdc; border-radius: 12px; font-size: .92rem; }
.td-banner .bi { font-size: 1.2rem; color: #5b524e; }
.td-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.td-actions .btn { margin: 0; }
.td-tabs { display: flex; gap: .25rem; border-bottom: 1px solid #ebe7e4; margin-bottom: 1rem; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.td-tabs::-webkit-scrollbar { display: none; }
.td-tabs button { margin: 0; border: 0; border-bottom: 3px solid transparent; background: none; padding: .6rem .9rem; font-weight: 600; font-size: .9rem; color: #6b625e; white-space: nowrap; cursor: pointer; display: inline-flex; gap: .4rem; align-items: center; }
.td-tabs button:hover { color: #1c1411; }
.td-tabs button.active { color: #351403; border-bottom-color: #351403; }
.td-facts { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .9rem 1.5rem; }
.td-facts > div { grid-template-columns: 1fr; gap: .1rem; }
.td-desc { margin: 0; line-height: 1.65; overflow-wrap: anywhere; }
.td-desc > :last-child { margin-bottom: 0; }
.td-desc h2, .td-desc h3, .td-desc h4 { font-size: 1.05rem; font-weight: 700; margin: 1.1rem 0 .4rem; }
.td-desc ul, .td-desc ol { padding-left: 1.3rem; }
.td-desc a { color: #1f7f95; font-weight: 600; }
.td-desc blockquote { border-left: 3px solid #60bbd0; padding-left: 1rem; color: #6b625e; }
.td-frame { width: 100%; height: 70vh; min-height: 420px; border: 1px solid #ebe7e4; border-radius: 12px; background: #fff; }
.td-pdf-icon { display: block; font-size: 2.4rem; color: #b9b0ab; margin-bottom: .5rem; }
@media (max-width: 700px) {
    .td-deadline { text-align: left; min-width: 0; width: 100%; }
    .dd { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
    .dd-box { max-height: 100dvh; height: 100dvh; }
}
@media print { .td-panel { display: block !important; } .td-frame { display: none; } }

.ad-amount strong, .ad-dl dd, .tb-summary strong { overflow-wrap: anywhere; }
.ad-amount strong { font-size: clamp(1.25rem, 2.6vw, 1.8rem); }

/* ---------- Bootstrap 5 pagination in the brand colours (same as .btn-primary) ---------- */
.pagination {
    --bs-pagination-color: #351403;
    --bs-pagination-bg: #fff;
    --bs-pagination-border-color: #ebe7e4;
    --bs-pagination-border-radius: 8px;
    --bs-pagination-hover-color: #fff;
    --bs-pagination-hover-bg: #4d2108;
    --bs-pagination-hover-border-color: #4d2108;
    --bs-pagination-focus-color: #351403;
    --bs-pagination-focus-bg: #eef6f8;
    --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(96,187,208,.4);
    --bs-pagination-active-color: #fff;
    --bs-pagination-active-bg: #351403;
    --bs-pagination-active-border-color: #351403;
    --bs-pagination-disabled-color: #9b918c;
    --bs-pagination-disabled-bg: #faf9f8;
    --bs-pagination-disabled-border-color: #ebe7e4;
    gap: .25rem;
}
.pagination .page-link { border-radius: var(--bs-pagination-border-radius); margin: 0; min-width: 2.1rem; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.pagination .page-item:not(:first-child) .page-link { margin-left: 0; }
.pagination .page-item.disabled .page-link { cursor: default; }
.tb-num { width: 3rem; color: #9b918c; font-variant-numeric: tabular-nums; font-weight: 600; }
thead .tb-num { font-weight: 700; }

/* ---------- Footer (settings-driven) ---------- */
.text-brand { color: #351403; }
.site-footer { margin-top: clamp(2rem, 6vw, 4rem); padding: clamp(2rem, 5vw, 3.5rem) 0 1.25rem; background: #2a1002; color: rgba(255,255,255,.78); font-size: .93rem; }
.site-footer a { color: rgba(255,255,255,.82); text-decoration: none; transition: color .15s; }
.site-footer a:hover { color: #8fd6e6; text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:focus-visible, .sf-top:focus-visible { outline: 3px solid #8fd6e6; outline-offset: 3px; border-radius: 4px; }
.sf-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .sf-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .sf-grid { grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: 2.5rem; } }
.sf-logo { display: inline-block; margin-bottom: .9rem; }
.sf-logo-chip { display: inline-block; background: #fff; border-radius: 10px; padding: .4rem .75rem; }
.sf-logo img { display: block; max-width: 180px; height: 36px; width: auto; }
.sf-wordmark { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.sf-blurb { margin: 0 0 1.1rem; max-width: 26rem; line-height: 1.6; }
.sf-social { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0 0 1.1rem; }
.sf-social a { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.1); font-size: 1.05rem; color: #fff; transition: background .15s, transform .15s; }
.sf-social a:hover { background: #60bbd0; color: #2a1002; text-decoration: none; transform: translateY(-2px); }
.sf-apps { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.sf-apps img { display: block; height: 44px; width: auto; }
.sf-appstore { display: inline-flex; align-items: center; gap: .4rem; height: 44px; padding: 0 1rem; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; font-weight: 600; }
.sf-col h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: #8fd6e6; margin: 0 0 1rem; }
.sf-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.sf-contact li { display: flex; gap: .65rem; align-items: flex-start; line-height: 1.5; }
.sf-contact .bi { flex: none; margin-top: .2rem; color: #8fd6e6; }
.sf-contact { min-width: 0; overflow-wrap: anywhere; }
.sf-map { display: inline-block; margin-left: .35rem; font-weight: 600; }
.sf-partners { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }
.sf-partners > span { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 700; color: rgba(255,255,255,.55); }
.sf-partners ul { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin: 0; padding: 0; }
.sf-bottom { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }
.sf-bottom p { margin: 0; }
.sf-bottom ul { list-style: none; display: flex; gap: 1.25rem; margin: 0 auto 0 0; padding: 0; }
.sf-top { margin: 0; border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff; border-radius: 999px; padding: .35rem .9rem; font-size: .82rem; font-weight: 600; cursor: pointer; transition: background .15s; }
.sf-top:hover { background: rgba(255,255,255,.12); }
@media (prefers-reduced-motion: reduce) { .sf-social a { transition: none; } .sf-social a:hover { transform: none; } }
