/* Shared static UI layer. Loaded after legacy page styles; hooks stay intact. */
:root {
  color-scheme: light;
  --bg: #f5f7f9; --panel: #fff; --panel2: #f1f4f7;
  --text: #172b36; --muted: #526572; --muted2: #596d7b;
  --line: #e1e7ec; --line2: #c8d3dc; --line-strong: #c8d3dc;
  --accent: #315ed2; --accent2: #087f73; --good: #08745a; --warn: #8b5b07; --danger: #b12743;
  --bl-bg: var(--bg); --bl-panel: var(--panel); --bl-border: var(--line);
  --bl-text: var(--text); --bl-muted: var(--muted); --bl-muted2: var(--muted2);
  --bl-blue: var(--accent); --bl-green: var(--good); --bl-amber: var(--warn);
  --sb: var(--bg); --sbd: var(--line); --st: var(--text); --sm: var(--muted); --sa: var(--accent);
  --ui-radius: 16px; --ui-shadow: 0 4px 20px rgb(30 51 68 / 4%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
html {scroll-padding-top: 24px; background: var(--bg);}
body {margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;}
button, input, select, textarea {font: inherit;}
button, a, input, select, textarea, summary {-webkit-tap-highlight-color: transparent;}
button:not(:disabled), summary {cursor: pointer;}
button:disabled {cursor: not-allowed;}
:focus-visible {outline: 3px solid #315ed2 !important; outline-offset: 3px;}
.tui-sidebar :focus-visible {outline-color: #b4f4d9 !important;}
input:not([type=checkbox]):not([type=radio]), select, textarea {
  min-width: 0; max-width: 100%; min-height: 44px; border: 1px solid var(--line2);
  border-radius: 9px; background: #fff; color: var(--text); box-shadow: none;
}
input::placeholder, textarea::placeholder {color: #647784; opacity: 1;}
input[type=checkbox], input[type=radio] {accent-color: #087f73; flex-shrink: 0;}
input:focus, select:focus, textarea:focus {border-color: var(--accent);}
button, a.source-button, .secondary-button {min-height: 44px;}
.ui-skip {position: fixed; inset-block-start: 8px; inset-inline-start: 8px; transform: translateY(-150%); z-index: 200000; padding: 12px 18px; border-radius: 8px; background: #fff; color: #172b36;}
.ui-skip:focus {transform: none;}
.ui-sr {position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;}
.app-shell, .cw-shell, .sv-shell, .bl-shell {display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100dvh;}
.tui-sidebar {
  position: sticky; inset: auto; top: 0; width: 232px; height: 100dvh; display: flex; flex-direction: column;
  padding: 28px 16px 18px; background: #112e32; color: #e7f1ef; border: 0; backdrop-filter: none; z-index: 50; overflow-y: auto; overscroll-behavior: contain;
}
.tui-sidebar :is(.brand,.cw-brand,.sv-brand,.bl-brand) {padding: 0 8px 32px; gap: 11px; align-items: center;}
.tui-sidebar :is(.brand-mark,.sv-brand>b,.bl-brand>b) {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; background: #baf3cc;
  color: #113f36; box-shadow: none; font-size: 14px; letter-spacing: -.06em; font-weight: 800;
}
.tui-sidebar :is(.brand-name,strong) {color: #f0f7f5; font-size: 15px; letter-spacing: -.025em;}
.tui-sidebar :is(.brand-sub,.cw-brand small,.sv-brand small,.bl-brand small) {font-size: 10px; color: #aec4c2; line-height: 1.4; margin-top: 3px;}
.tui-sidebar nav {display: grid; grid-template-columns: 1fr; gap: 5px;}
.tui-sidebar nav button {
  display: flex; align-items: center; gap: 11px; width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1px solid transparent; border-radius: 9px; background: transparent; color: #bed0ce;
  font-size: 13px; line-height: 1.4; text-align: start; font-weight: 550;
}
.tui-sidebar nav button.active {background: #25484a; border-color: #416360; color: #edfff4; box-shadow: inset 3px 0 #baf3cc;}
.tui-sidebar nav button:hover:not(:disabled) {background: #224447; color: #fff;}
.tui-sidebar nav button:disabled {opacity: 1; color: #91aaa7;}
.tui-sidebar .nav-icon {font-size: 18px; width: 20px;}
.tui-sidebar .soon {margin-inline-start: auto; color: #aec4c2; font-size: 10px;}
.tui-sidebar :is(.sidebar-footer,.cw-side-note,.sv-core,.bl-core) {margin-top: auto; padding: 28px 10px 12px; color: #aec4c2; font-size: 11px;}
.tui-sidebar :is(.dev-note,.cw-side-note small,.sv-core small) {display: none;}
.tui-sidebar :is(.system-pill,.bl-core strong) {color: #bcd1ce; font-size: 11px;}
.tui-sidebar :is(.dot,.cw-dot,.bl-core-dot) {background: #baf3cc; box-shadow: none; width: 6px; height: 6px;}
.tui-main {min-width: 0; width: 100%; max-width: 1800px; margin-inline: auto; margin-block: 0; color: var(--text);}
.tui-main :is(h1,h2,h3,h4) {color: var(--text); letter-spacing: -.035em;}
.tui-main h1 {font-size: 26px; font-weight: 750; line-height: 1.2;}
.tui-main p {color: var(--muted);}
.tui-main :is(.topbar,.cw-topbar,.sv-main>header,.supplier-topbar,.bl-top) {
  position: relative; top: auto; min-height: 102px; padding: 24px 32px; margin: 0; display: flex;
  align-items: center; justify-content: space-between; gap: 20px; background: #fff;
  border-bottom: 1px solid var(--line); backdrop-filter: none; z-index: 10;
}
.tui-main :is(.topbar h1,.cw-topbar h1,.supplier-topbar h1,.bl-top h1) {margin: 0 0 6px;}
.tui-main :is(.topbar p,.cw-topbar p,.sv-main>header p,.supplier-topbar p,.bl-top p) {font-size: 12px; line-height: 1.55; max-width: 540px; margin: 0; color: var(--muted);}
.tui-main :is(.topbar-actions,.cw-top-actions,.sv-top,.bl-top-actions) {display: flex; flex-wrap: wrap; gap: 10px; align-items: end; min-width: 0;}
.tui-main :is(.topbar-actions select,.cw-top-actions select,.sv-top select,.bl-top-actions select) {max-width: 180px; font-size: 12px; padding: 10px 28px 10px 10px;}
.tui-main .topbar-actions label>span {font-size: 10px; letter-spacing: .07em; color: var(--muted);}
.tui-main :is(.refresh-button,.company-manage-button,.save-search-button,.secondary-button,.cw-button.secondary,.bl-secondary,.sv-top button) {
  border: 1px solid var(--line2); background: #fff; color: var(--text); border-radius: 9px;
  padding: 10px 14px; box-shadow: none; font-weight: 600; font-size: 12px;
}
.tui-main :is(.primary-button,.supplier-primary,.cw-button.primary,.bl-primary,.bl-plan-action.primary) {
  background: #206854; color: #fff; border: 1px solid #206854; border-radius: 9px; padding: 10px 17px;
  font-weight: 650; box-shadow: 0 2px 2px rgb(15 63 49 / 8%); font-size: 13px;
}
.tui-main :is(.primary-button,.supplier-primary,.cw-button.primary,.bl-primary):hover:not(:disabled) {background: #174f40;}
.hero-strip,.awards-hero {
  margin: 28px 32px 20px; padding: 26px 28px; border-radius: var(--ui-radius); border: 1px solid #cfe2da;
  background: linear-gradient(105deg,#eef7f1,#f6faf8); box-shadow: none; gap: 28px;
}
.hero-strip h2,.awards-hero h2 {max-width: 600px; font-size: 28px; line-height: 1.2; margin: 9px 0 10px; font-weight: 730;}
.hero-strip p,.awards-hero p {font-size: 13px; line-height: 1.65; max-width: 620px;}
.eyebrow,.bl-eyebrow,.bl-kicker,.cw-kicker,.drawer-kicker {color: #296e5b; font-size: 10px; font-weight: 750; letter-spacing: .12em;}
.hero-badge,.award-hero-badge {background: #fff; border: 1px solid #d7e6df; border-radius: 12px; min-width: 168px; padding: 18px; box-shadow: none;}
.hero-badge strong,.award-hero-badge strong {font-size: 24px; color: #245d4e;}
.hero-badge :is(span,small),.award-hero-badge :is(span,small) {color: var(--muted); font-size: 11px;}
.stats-grid {margin: 0 32px 24px; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px;}
.stat-card,.supplier-stats article,.pro-kpis article {background: #fff; border: 1px solid var(--line); padding: 19px 20px; border-radius: 12px; box-shadow: var(--ui-shadow); min-width: 0;}
.stat-card span,.supplier-stats span,.pro-kpis span {color: var(--muted); font-size: 12px;}
.stat-card strong,.supplier-stats strong {color: #1c393d; font-size: 29px; letter-spacing: -.045em; font-weight: 720; margin: 7px 0 1px;}
.stat-card small {color: var(--muted); font-size: 11px;}
.workspace,.awards-workspace,.supplier-workspace {margin: 0 32px 36px; border: 1px solid var(--line); background: #fff; border-radius: var(--ui-radius); box-shadow: var(--ui-shadow); overflow: hidden;}
.tabs {padding: 8px 20px 0; gap: 20px; border-bottom: 1px solid var(--line); background: #fff;}
.tab {border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 13px 2px; min-height: 48px; color: var(--muted); font-size: 13px;}
.tab.active {background: transparent; color: #1d614e; border-color: #25775c; font-weight: 700;}
.toolbar,.awards-toolbar {padding: 18px 20px; background: #fcfdfd; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(240px,2fr) minmax(130px,1fr) minmax(130px,1fr); gap: 12px;}
.toolbar>* {min-width: 0;}
.toolbar .search-box {grid-column: auto;}
.toolbar-actions {display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; min-width: 0;}
.toolbar-actions button {flex: 1 1 auto; white-space: nowrap;}
.search-box {background: #fff; border: 1px solid var(--line2); padding-inline: 12px 0; gap: 8px;}
.search-box input {min-width: 0; border: 0 !important; outline-offset: 0; padding-inline-start: 0;}
.score-filter {background: #fff; color: var(--muted); border-color: var(--line2); font-size: 12px; min-height: 44px;}
.score-filter input {border: 0 !important; background: transparent; min-height: 40px !important;}
.sort-filter {display:flex;align-items:center;gap:8px;min-height:44px;padding:0 10px;border:1px solid var(--line2);border-radius:10px;background:#fff;color:var(--muted);font-size:12px;}
.sort-filter span {white-space:nowrap;}
.sort-filter select {min-width:0;flex:1;border:0;background:transparent;padding:4px 2px;color:var(--text);font-size:12px;}
.content-grid {grid-template-columns: minmax(0,1fr) 226px;}
.results-panel,.awards-results-panel {padding: 22px 20px;}
.results-header {gap: 12px; margin-bottom: 18px; flex-wrap: wrap;}
.results-header h3 {font-size: 17px; letter-spacing: -.02em;}
.results-header p {font-size: 12px; color: var(--muted);}
.legend {font-size: 11px; gap: 12px; color: var(--muted);}
.results-list {gap: 14px;}
.opportunity-card.premium-opportunity-card {grid-template-columns: 32px minmax(0,1fr) 180px; gap: 16px; padding: 22px 18px; border: 1px solid var(--line); background: #fff; border-radius: 12px; transition: border-color .15s,box-shadow .15s;}
.opportunity-card:hover {border-color: #a3c4b7; box-shadow: 0 4px 16px rgb(29 70 53 / 6%);}
.opportunity-card .rank-box {width: 32px; height: 44px; border: 0; border-radius: 6px; background: #f3f6f7;}
.rank-box span {color: #627681; font-size: 8px; letter-spacing: .05em;}
.rank-box strong {color: #536d74; font-size: 13px;}
.card-topline {gap: 6px; margin-bottom: 12px;}
.badge {background: #f4f6f8; color: #4f626e; border: 1px solid #e2e8ec; font-size: 10px; padding: 3px 8px; font-weight: 600;}
.badge.direct,.badge.eoi {background: #eaf5ef; color: #22634e; border-color: #d6e8dd;}
.badge.qual,.badge.early {background: #f4f0fc; color: #614a94; border-color: #e6def3;}
.badge.country-pill {background: #fff; color: var(--muted);}
.opportunity-title {font-size: 16px; line-height: 1.45; letter-spacing: -.015em; font-weight: 680;}
.opportunity-title button {text-align: start; color: #1b3440; min-height: 44px;}
.opportunity-title button:hover {color: #21644f;}
.opportunity-card .opportunity-preview {color: var(--muted); font-size: 12px; line-height: 1.65; margin: 10px 0; -webkit-line-clamp: 2;}
.meta-row.premium-meta-row {font-size: 11px; line-height: 1.65; gap: 6px 14px; color: var(--muted);}
.meta-row strong {color: #3b5360;}
.watchlist-button {min-height: 32px; background: #fff; color: #526572; border: 1px solid var(--line); font-size: 11px; box-shadow: none; margin-inline-start: auto;}
.watchlist-button.is-saved {background: #edf7f0; border-color: #c7e0ce; color: #276443;}
.opportunity-card .commercial-card-panel {border-inline-start: 1px solid var(--line); border-left: 0; padding-inline-start: 16px; background: transparent; gap: 14px;}
.commercial-card-panel :is(.contract-value,.premium-match-block,.premium-deadline-metric) {background: transparent; border: 0; box-shadow: none; padding: 0;}
.contract-value-label,.premium-match-head>span,.mini-metric>span {font-size: 9px; letter-spacing: .09em; color: var(--muted);}
.commercial-card-panel .contract-value strong {font-size: 25px; letter-spacing: -.04em; color: #254a41; text-shadow: none; line-height: 1.2;}
/* Make disclosed contract value the primary scan target in each opportunity card. */
.commercial-card-panel.has-value .contract-value {padding: 12px 13px; border: 1px solid #dceae1; border-radius: 10px; background: linear-gradient(145deg,#f1f8f3,#fff 76%);}
.commercial-card-panel.has-value .contract-value-label {display: block; color: #536c61; font-weight: 700; text-transform: uppercase;}
.commercial-card-panel.has-value .contract-value strong {display: block; font-size: clamp(22px,2.1vw,30px); letter-spacing: -.045em; color: #174b37; line-height: 1.08; overflow-wrap: anywhere;}
.commercial-card-panel.has-value .contract-value small {display: block; margin-top: 6px; color: #63766c; font-size: 10px; font-variant-numeric: tabular-nums;}
.commercial-card-panel.award-value.has-value .contract-value {border-color: #eadfbf; background: linear-gradient(145deg,#fff8e7,#fff 76%);}
.commercial-card-panel.award-value.has-value .contract-value strong {color: #74510c;}

.commercial-card-panel.no-value .contract-value strong {font-size: 13px; line-height: 1.4; color: var(--muted);}
.contract-value small {color: var(--muted); font-size: 10px; margin-top: 4px;}
.premium-match-head {margin-bottom: 7px;}
.premium-match-head strong {color: #315ed2; font-size: 13px;}
.premium-match-track {background: #eaf0f6; height: 4px;}
.premium-match-track i {background: #6683db; box-shadow: none;}
.premium-deadline-metric strong {color: #344f5a; font-size: 12px; margin-top: 3px;}
.premium-commercial-action {color: #27644e; background: #eef7f1; border: 0; font-size: 10px;}
.insights-panel {padding: 22px 16px; background: #fcfdfd; border-inline-start: 1px solid var(--line); border-left: 0;}
.insight-card {background: #fff; border: 1px solid var(--line); padding: 14px; box-shadow: none;}
.insight-heading span {font-size: 9px; color: var(--muted);}
.insight-heading strong {font-size: 13px; color: var(--text);}
.facet-row {font-size: 11px; line-height: 1.6; color: var(--muted);}
.facet-row strong {color: #38545b; font-weight: 600;}
.pagination,.supplier-pagination {gap: 12px; padding-top: 12px; flex-wrap: wrap;}
.pagination button,.supplier-pagination button {background: #fff; color: var(--text); border: 1px solid var(--line2); border-radius: 8px; font-size: 12px; min-width: 90px;}
.pagination button:disabled,.supplier-pagination button:disabled {opacity: 1; color: #74828b; background: #f6f8f9; border-color: var(--line);}
.pagination span {color: var(--muted); font-size: 12px;}
.empty,.sv-empty,.bl-empty {background: #fafcfc; border: 1px dashed #c7d5da; padding: 40px 22px; color: var(--muted); font-size: 14px; line-height: 1.65; border-radius: 12px;}
.status-box,.cw-status,.sv-status,.supplier-status,.bl-status {color: #344f64; background: #eff5fb; border: 1px solid #c9d9e7; padding: 14px 16px; font-size: 13px; border-radius: 9px;}
.status-box,.cw-status.error,.sv-status.error,.supplier-status.error,.bl-status.error {color: #8c2941; background: #fdf0f3; border-color: #efd2da;}
.cw-status.ok,.sv-status.ok {color: #24634d; background: #edf7f0; border-color: #c8e3d1;}
.ui-feed-tools {display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-block: 0 16px; color: var(--muted); font-size: 11px;}
.ui-feed-tools>span {margin-inline-end: auto;}
.ui-density {display: flex; background: #f1f4f6; border-radius: 8px; padding: 3px; border: 1px solid var(--line);}
.ui-density button {font-size: 11px; border: 0; background: transparent; color: var(--muted); border-radius: 6px; padding: 6px 10px; min-height: 32px;}
.ui-density button[aria-pressed=true] {color: #244c40; background: #fff; box-shadow: 0 1px 3px #d3dce0;}
[data-density=compact] .opportunity-card.premium-opportunity-card {padding-block: 14px; gap: 12px;}
[data-density=compact] .opportunity-preview {display: none;}
.detail-drawer,.supplier-drawer {background: #fff; color: var(--text); width: min(740px,100vw); height: 100dvh; border-color: var(--line); box-shadow: -15px 0 80px rgb(24 47 61 / 14%);}
.detail-drawer:not(.open),.supplier-drawer:not(.open) {visibility: hidden; pointer-events: none;}
.detail-drawer.open,.supplier-drawer.open {visibility: visible; right: 0;}
.drawer-backdrop,.supplier-backdrop {background: rgb(17 39 47 / 42%); backdrop-filter: blur(3px);}
.drawer-head,.supplier-drawer-head {padding: 24px; background: #fff; border-bottom: 1px solid var(--line); gap: 18px;}
.drawer-head h3,.supplier-drawer-head h2 {font-size: 22px; line-height: 1.35; letter-spacing: -.03em; color: var(--text);}
.drawer-head>div,.supplier-drawer-head>div {min-width: 0; flex: 1; overflow-wrap: anywhere;}
.drawer-close {flex: 0 0 44px; min-width: 44px; height: 44px; border: 1px solid var(--line); background: #f5f8f9; color: var(--text); font-size: 24px; border-radius: 9px;}
.drawer-body,.supplier-drawer-body {padding: 20px 24px 36px; overflow-y: auto; overscroll-behavior: contain;}
.detail-drawer :is(.detail-section,.value-spotlight,.translation-toolbar,.value-spotlight-main,.value-spotlight-metric,.ai-note,.ai-analysis-section,.ai-analysis-card,.description-text,.collapsible-body),
.supplier-drawer :is(.kv,.history-item,.chart-wrap,.drawer-section) {background: #fff; border-color: var(--line); color: var(--text); box-shadow: none;}
.detail-drawer :is(.value-spotlight-main,.value-spotlight-metric,.detail-field) {background: #f6f9f8; border-color: #e0e9e4;}
.detail-drawer :is(strong,h4,summary),.supplier-drawer :is(strong,h3) {color: #23483d;}
.detail-drawer .detail-section.collapsible>summary {color: #23483d; font-size: 13px;}
.detail-drawer .secondary-button {color: var(--text); background: #f6f8fa;}
.detail-drawer :is(.ai-rec-reason,.ai-summary-text,.ai-budget,.ai-deadline,.ai-list,.ai-block h5,.ai-footer-meta,.ai-checklist,.checklist-text) {color: #425b68; font-size: 12px; line-height: 1.7;}
.detail-drawer :is(.ai-block,.ai-summary-box) {background: #f9fbfc; border-color: #dde6e9;}
.detail-drawer :is(.requirement-row,.risk-row) {background: #f0f5f7; border-color: #dce6e9;}
.detail-drawer .requirement-row strong,.detail-drawer .risk-row strong {font-size: 12px;}
.detail-drawer .ai-rec-badge.review,.detail-drawer .status-chip.unknown {color: #825807; background: #fff5db; border-color: #e7d6ab;}
.detail-drawer .ai-rec-badge.participate,.detail-drawer .status-chip.meets,.detail-drawer .status-chip.likely {color: #24634a; background: #e8f4eb; border-color: #c7e1ce;}
.detail-drawer .ai-rec-badge.skip,.detail-drawer .status-chip.gap {color: #9d2e46; background: #fceef1; border-color: #eac9d2;}
.detail-drawer .evidence-ref {color: #385ba6; background: #ebf1fd; border-color: #c5d4ef; padding: 5px 8px; font-size: 11px;}
.detail-drawer .evidence-ref-link {min-height: 28px;}
.detail-drawer :is(span,small),.supplier-drawer :is(.history-meta,.history-value) {color: var(--muted);}
.detail-drawer .value-spotlight-metric {opacity: 1;}
.detail-drawer .value-spotlight-metric :is(span,small),.detail-drawer .translation-language {color: #526572; opacity: 1; font-size: 11px;}
.detail-drawer .value-spotlight-main strong {font-size: 30px; color: #245d49;}
.detail-drawer .detail-field {padding: 10px 12px; border: 1px solid #e1e8e4; border-radius: 8px;}
.detail-drawer .detail-field span {font-size: 10px;}
.detail-drawer .detail-field strong {font-size: 13px; line-height: 1.5;}
.detail-drawer .human-signal,.detail-drawer .change-history-state {font-size: 12px; line-height: 1.6;}
.detail-drawer .ai-analysis-title-wrap small,.detail-drawer .translation-status {font-size: 11px;}
.detail-drawer :is(.description-text,.collapsible-body,.ai-note) {font-size: 13px; line-height: 1.75;}
.detail-drawer :is(.human-signal,.cpv-chip,.citation-preview-trigger,.ai-citation-chip,.citation-chip) {color: #315d4d; background: #f0f7f2; border-color: #d7e6dc;}
.detail-drawer :is(.ai-button,.translation-button,.source-button) {background: #315ed2; border-color: #315ed2; color: #fff; border-radius: 8px; min-height: 44px;}
.detail-drawer .drawer-actions {flex-wrap: wrap; border-color: var(--line); background: #fff;}
.detail-drawer .source-button,.detail-drawer .secondary-button {display: inline-flex; align-items: center; justify-content: center;}
.citation-preview-popover {background: #fff; color: var(--text); border: 1px solid var(--line2); box-shadow: 0 8px 32px #294e5329;}
.citation-preview-head strong {color: #315ed2;}
.detail-drawer .citation-preview-head>span,.detail-drawer .citation-preview-label {color: #526572; opacity: 1;}
.citation-preview-excerpt,.citation-translation-block {background: #eff4fb; color: #234357;}
.citation-translation-button {color: #315ed2; background: #eef3ff; border-color: #c5d4f0; min-height: 44px;}
.ui-menu-button,.menu-button {display: none; background: #fff; color: var(--text); border: 1px solid var(--line2); border-radius: 9px; width: 44px; min-width: 44px; height: 44px; font-size: 20px;}
.ui-nav-close {display: none;}
.ui-nav-shade {position: fixed; inset: 0; z-index: 45; border: 0; border-radius: 0; background: rgb(17 39 47 / 42%); backdrop-filter: blur(2px);}
body.ui-modal-open {overflow: hidden;}
.tui-sidebar .th-auth-user {
  position: static; z-index: auto; width: 100%; max-width: 100%; padding: 16px 2px 0; margin-top: 8px; flex-wrap: wrap;
  border: 0; border-top: 1px solid #365453; border-radius: 0; box-shadow: none; background: transparent; color: #e5f3ee; backdrop-filter: none;
}
.tui-sidebar .th-auth-user>span {display: block; width: 100%; font-size: 12px;}
.tui-sidebar .th-auth-user button {background: #214346; border: 1px solid #4b6b68; color: #deede8; font-size: 11px; min-height: 44px; border-radius: 7px;}
.tui-sidebar .th-auth-user .th-notify-btn {min-width: 44px;}
.th-notification-panel {background: #fff; color: var(--text); border: 1px solid var(--line2); box-shadow: 0 16px 60px #183b4933; backdrop-filter: none; inset-block-start: 24px; inset-block-end: auto; inset-inline-end: 24px; width: min(400px,calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto;}
.th-notification-panel :is(h3,strong) {color: #23483d;}
.th-notification-panel :is(.th-notification-count,.th-notification-empty,.th-notification-subtitle) {color: #526572;}
.th-notification-panel :is(.th-notification-item,.th-notification-summary) {background: #f5f9f7; border-color: #d8e5dc;}
.th-notification-panel :is(.th-notification-item-title,.th-notification-message) {color: #344f5c;}
.th-notification-panel .ui-notification-close {width: 44px; min-height: 44px; margin: 0; padding: 0; background: #f0f5f3; border: 1px solid #d5e2da; color: #24483c; font-size: 23px; flex-shrink: 0;}
/* The panel is light here, so everything inside it needs ink that reads on white:
   without this the notification list and the settings sheet are invisible text. */
.th-notification-panel .th-notification-title {color: #15293f;}
.th-notification-panel .th-notification-source {color: #1d5c8f;}
.th-notification-panel :is(.th-notification-meta,.th-notification-priority) {color: #5d6e82;}
.th-notification-panel .th-notification-item.is-unread {background: #eaf2fd; border-color: #b9d2f2;}
.th-notification-panel .th-notification-item.is-unread::before {background: #1d6fd0; box-shadow: none;}
.th-notification-panel .th-notification-item:hover {background: #eef4fb; border-color: #c3d6ea;}
.th-notification-panel .th-notification-read-all {background: #e7f0fb; color: #17538f;}
.th-notification-panel .th-notification-read-all:hover {background: #d9e8f8;}
.th-notification-panel :is(select,input:not([type=checkbox])) {background: #fff; border-color: #cbd8e6; color: #15293f;}
.th-notification-panel .th-notification-settings-button {background: #f0f4f9; border-color: #cbd8e6; color: #2c4866;}
.th-notification-panel .th-notification-empty {border-color: #d6e1ec; color: #5d6e82;}
/* settings sheet */
.th-notification-settings .th-settings-section {background: #f6f9fc; border-color: #dbe5f0;}
.th-notification-panel .th-settings-section-title {color: #5d6e82;}
.th-notification-panel .th-settings-switch-copy strong {color: #15293f;}
.th-notification-panel .th-settings-switch-copy small {color: #5d6e82;}
.th-notification-panel .th-settings-field > span {color: #35506d;}
.th-notification-panel .th-telegram-card {background: linear-gradient(135deg, #eaf6fd, #f6fbfe); border-color: #c5e3f5;}
.th-notification-panel .th-telegram-logo {background: transparent; box-shadow: none; padding: 0;}
.th-telegram-logo svg {display: block; width: 28px; height: 28px;}
.th-notification-panel .th-telegram-brand strong {color: #15293f;}
.th-notification-panel :is(.th-telegram-brand small,.th-telegram-account) {color: #5d6e82;}
.th-notification-panel .th-telegram-status.is-off {background: #eef2f6; border-color: #d3dce6; color: #5d6e82;}
.th-notification-panel .th-telegram-status.is-on {background: #e6f7ef; border-color: #b2e3cc; color: #136c47;}
.th-notification-panel .th-telegram-manual-link {border-color: #bfe0f3; color: #17628d;}
.th-notification-panel .th-settings-status {background: #eef4fc; border-color: #c9dcf3; color: #244a73;}
.th-notification-panel .th-settings-status.is-success {background: #e8f7f0; border-color: #b4e4ce; color: #13674a;}
.th-notification-panel .th-settings-status.is-error {background: #fdeeee; border-color: #f3c6c6; color: #8f2727;}
.th-notification-panel .th-settings-status.is-info {background: #eaf6fd; border-color: #c2e2f5; color: #185b80;}
.th-notification-panel .th-telegram-secondary {background: #e9f5fd; border-color: #bfe0f3; color: #17628d;}
.th-notification-panel .th-telegram-secondary:hover {background: #daedfa;}
.th-notification-panel .th-telegram-danger {background: #fdeef0; border-color: #f0c8cd; color: #93303a;}
.th-notification-panel .th-telegram-danger:hover {background: #fbe0e4;}
[dir=rtl] .tui-sidebar nav button.active {box-shadow: inset -3px 0 #baf3cc;}
[dir=rtl] .detail-drawer {right: auto; left: -760px; border-left: 0; border-right: 1px solid var(--line);}
[dir=rtl] .detail-drawer.open {right: auto; left: 0;}
[dir=rtl] .supplier-drawer {right: auto; left: 0; transform: translateX(-100%);}
[dir=rtl] .supplier-drawer.open {transform: translateX(0);}
@media (min-width: 1700px) {.toolbar {grid-template-columns: minmax(220px,2fr) repeat(3,minmax(120px,1fr)) minmax(135px,1fr) auto;}}
@media (max-width: 1279px) {
  .tui-main .topbar {flex-wrap: wrap;}
  .tui-main .topbar-actions {width: 100%; justify-content: flex-start;}
  .content-grid {grid-template-columns: 1fr;}
  .insights-panel {border-inline-start: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px;}
  .insight-card {margin: 0;}
}
@media (max-width: 1023px) {
  .app-shell,.cw-shell,.sv-shell,.bl-shell {grid-template-columns: minmax(0,1fr);}
  .tui-sidebar {position: fixed; inset-block: 0; inset-inline-start: 0; height: 100dvh; width: 272px; transform: translateX(-105%); visibility: hidden; transition: transform .2s,visibility .2s; overflow-y: auto;}
  [dir=rtl] .tui-sidebar {transform: translateX(105%);}
  .tui-sidebar.open {transform: none; visibility: visible;}
  .menu-button,.ui-menu-button {display: inline-grid; place-items: center;}
  .ui-nav-close {display: block; margin-inline-start: auto; margin-block-end: 20px; background: transparent; color: #e5f3ee; border: 1px solid #4b6b68; border-radius: 8px; width: 44px; min-height: 44px; font-size: 23px;}
  .tui-main :is(.cw-topbar,.sv-main>header,.supplier-topbar,.bl-top) {flex-wrap: wrap; justify-content: flex-start;}
}
@media (max-width: 700px) {
  .tui-main :is(.topbar,.cw-topbar,.sv-main>header,.supplier-topbar,.bl-top) {padding: 20px; gap: 16px; align-items: flex-start;}
  .tui-main h1 {font-size: 23px;}
  .tui-main .topbar-left {width: 100%; gap: 12px; align-items: center;}
  .tui-main :is(.topbar-actions,.cw-top-actions,.sv-top,.bl-top-actions) {width: 100%; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; align-items: end;}
  .tui-main .topbar-actions label {width: auto; min-width: 0;}
  .tui-main :is(.topbar-actions select,.cw-top-actions select,.sv-top select,.bl-top-actions select) {width: 100%; max-width: 100%;}
  .tui-main .topbar p {display: block; font-size: 11px;}
  .hero-strip,.awards-hero {margin: 20px 16px 16px; padding: 22px; flex-direction: column; align-items: stretch; gap: 16px;}
  .hero-strip h2,.awards-hero h2 {font-size: 24px;}
  .hero-badge,.award-hero-badge {width: 100%; padding: 12px 16px; min-width: 0;}
  .hero-badge strong {font-size: 21px;}
  .stats-grid {margin: 0 16px 18px; gap: 10px; grid-template-columns: repeat(2,minmax(0,1fr));}
  .stat-card {padding: 15px;}
  .stat-card strong {font-size: 26px;}
  .stat-card small {font-size: 10px;}
  .workspace,.awards-workspace,.supplier-workspace {margin: 0 16px 24px; border-radius: 13px;}
  .tabs {gap: 20px; padding-inline: 16px;}
  .toolbar,.awards-toolbar {grid-template-columns: minmax(0,1fr) minmax(0,1fr); padding: 16px; gap: 10px;}
  .toolbar .search-box,.toolbar-actions {grid-column: 1/-1;}
  /* On phones the legacy nowrap flex row exceeds the available 324px and
     justify-content:flex-end pushes Apply entirely outside the viewport.
     Keep every financial/search action in a reachable, two-column touch grid. */
  .tui-main .toolbar .toolbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 10px;
    min-width: 0;
  }
  .tui-main .toolbar .toolbar-actions > button {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .toolbar #countryFilter {width: 100%;}
  .score-filter {padding: 0 8px; font-size: 10px; gap: 3px;}
  .score-filter input {width: 38px; font-size: 13px;}
  .sort-filter {padding:0 8px;gap:4px;font-size:10px;}
  .sort-filter select {font-size:11px;}
  .results-panel,.awards-results-panel {padding: 18px 14px;}
  .results-header {align-items: flex-start; flex-direction: column;}
  .legend {gap: 8px; font-size: 10px;}
  .opportunity-card.premium-opportunity-card {grid-template-columns: minmax(0,1fr); gap: 14px; padding: 17px 15px;}
  .opportunity-card .rank-box {display: none;}
  .opportunity-title {font-size: 16px;}
  .card-topline .watchlist-button {min-width: 44px; min-height: 44px;}
  .opportunity-card .commercial-card-panel {grid-column: auto; border-inline-start: 0; border-top: 1px solid var(--line); padding: 14px 0 0; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px;}
  .commercial-card-panel .contract-value strong {font-size: 23px;}
  .commercial-card-metrics {grid-column: 1/-1; display: flex; justify-content: space-between; align-items: center; gap: 12px;}
  .commercial-card-metrics .premium-commercial-action {margin: 0;}
  .insights-panel {grid-template-columns: 1fr; padding: 16px;}
  .ui-feed-tools {align-items: flex-start; gap: 8px;}
  .ui-density button {min-height: 44px;}
  .drawer-head,.supplier-drawer-head {padding: 20px 16px;}
  .drawer-head h3,.supplier-drawer-head h2 {font-size: 20px;}
  .drawer-body,.supplier-drawer-body {padding: 16px 16px 28px;}
  .detail-drawer .value-spotlight {grid-template-columns: 1fr;}
  .detail-drawer .detail-grid {grid-template-columns: 1fr;}
  .detail-drawer .translation-toolbar {flex-wrap: wrap;}
  .detail-drawer .ai-analysis-head {flex-wrap: wrap;}
  .detail-drawer .ai-grid-two {grid-template-columns: 1fr;}
  .detail-drawer .drawer-actions>* {width: 100%; min-height: 44px; margin: 0;}
  .detail-drawer .description-text {overflow-wrap: anywhere;}
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after {scroll-behavior: auto !important; animation: none !important; transition: none !important;}
}
.rules-suggestions-more {
  min-height: 44px;
  margin: 12px 0;
  padding: 10px 16px;
}
