﻿:root {
  --ink: #121824;
  --muted: #667085;
  --line: #d9dee8;
  --soft-line: #edf0f5;
  --surface: #ffffff;
  --canvas: #f5f7fa;
  --nav: #081726;
  --nav-2: #102438;
  --gold: #d59a1a;
  --gold-dark: #b87f0d;
  --green: #1f9d55;
  --green-bg: #e8f7ee;
  --amber: #c98409;
  --amber-bg: #fff3d8;
  --red: #e03131;
  --red-bg: #ffe8e8;
  --shadow: 0 16px 36px rgba(18, 24, 36, 0.08);
}

/* Product UI Design Foundation v1 */
:root {
  --color-bg: #eef2f6;
  --color-bg-strong: #dfe6ee;
  --color-surface: #ffffff;
  --color-surface-muted: #f7f9fc;
  --color-sidebar: #111821;
  --color-sidebar-2: #1b2632;
  --color-text: #111827;
  --color-text-muted: #647184;
  --color-border: #d7dee8;
  --color-border-soft: #e8edf4;
  --color-primary: #2f6fed;
  --color-primary-dark: #1f4fb8;
  --color-accent: #c28b22;
  --color-accent-soft: #fff5d9;
  --color-success: #16835a;
  --color-success-soft: #e7f7ef;
  --color-warning: #b7791f;
  --color-warning-soft: #fff4d6;
  --color-danger: #c24136;
  --color-danger-soft: #fff0ed;
  --radius-card: 8px;
  --shadow-card: 0 18px 46px rgba(17, 24, 39, 0.12);
  --shadow-soft: 0 10px 26px rgba(17, 24, 39, 0.08);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --ink: var(--color-text);
  --muted: var(--color-text-muted);
  --line: var(--color-border);
  --soft-line: var(--color-border-soft);
  --surface: var(--color-surface);
  --canvas: var(--color-bg);
  --nav: var(--color-sidebar);
  --nav-2: var(--color-sidebar-2);
  --gold: var(--color-accent);
  --gold-dark: #8f6417;
  --teal: #138f86;
  --teal-dark: #0d635e;
  --green: var(--color-success);
  --green-bg: var(--color-success-soft);
  --amber: var(--color-warning);
  --amber-bg: var(--color-warning-soft);
  --red: var(--color-danger);
  --red-bg: var(--color-danger-soft);
  --shadow: var(--shadow-card);
  --soft-shadow: var(--shadow-soft);
}

body:not(.public-mode) {
  background:
    radial-gradient(circle at 18% -10%, rgba(47, 111, 237, 0.16), transparent 32%),
    radial-gradient(circle at 92% 0%, rgba(194, 139, 34, 0.12), transparent 28%),
    linear-gradient(180deg, #f4f7fb 0%, var(--color-bg) 52%, #e8edf4 100%);
  color: var(--color-text);
}

.app-shell {
  grid-template-columns: 276px minmax(0, 1fr);
}

.sidebar {
  background:
    linear-gradient(145deg, rgba(47, 111, 237, 0.14), transparent 30%),
    linear-gradient(180deg, var(--color-sidebar) 0%, #16212d 56%, #0f151d 100%);
  box-shadow: 18px 0 54px rgba(15, 23, 42, 0.28);
}

.brand-block {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    linear-gradient(180deg, rgba(47, 111, 237, 0.12), transparent);
  border-color: rgba(255, 255, 255, 0.12);
}

.brand {
  color: #f7c35f;
}

.brand-sub,
.section-label,
.user-block span {
  color: #b9c7d8;
}

.nav-item {
  border-radius: var(--radius-card);
}

.nav-item.active {
  background: linear-gradient(135deg, #f5c861, var(--color-accent));
  box-shadow: 0 16px 34px rgba(194, 139, 34, 0.25);
}

.nav-item:not(.active) {
  background: rgba(255, 255, 255, 0.04);
}

.nav-step {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 850;
}

.workspace {
  background: transparent;
}

.topbar {
  min-height: 96px;
  grid-template-columns: minmax(250px, 1fr) minmax(230px, auto) minmax(420px, auto);
  background:
    linear-gradient(135deg, #141d27 0%, #1d2b38 62%, #23384f 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.16);
}

.building-icon {
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, #f7c35f, #56b7aa);
}

.demo-badge {
  min-height: 38px;
  border: 1px solid rgba(247, 195, 95, 0.34);
  border-radius: var(--radius-card);
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: #ffe1a1;
  background: rgba(247, 195, 95, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.tenant-select,
.search-field {
  border-radius: var(--radius-card);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
}

.search-field > span {
  color: #c7d3e2;
  font-size: 12px;
  font-weight: 750;
}

.content-grid {
  grid-template-columns: minmax(560px, 1fr) minmax(500px, 39vw);
  gap: var(--space-6);
  padding: var(--space-6);
  min-height: calc(100vh - 96px);
}

.panel-header {
  background:
    linear-gradient(135deg, rgba(47, 111, 237, 0.96), rgba(20, 29, 39, 0.98) 52%, rgba(194, 139, 34, 0.9)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-card);
}

.panel-header::after {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 18%, transparent 18% 26%, rgba(255, 255, 255, 0.1) 26% 66%, transparent 66%),
    linear-gradient(180deg, transparent 0 25%, rgba(255, 255, 255, 0.12) 25% 26%, transparent 26% 51%, rgba(255, 255, 255, 0.12) 51% 52%, transparent 52% 77%, rgba(255, 255, 255, 0.12) 77% 78%, transparent 78%);
}

.header-metrics {
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  max-width: 270px;
  gap: 7px;
}

.header-metrics div {
  min-width: 0;
  padding: 9px;
}

.header-metrics strong {
  font-size: 22px;
}

.header-metrics span {
  font-size: 10px;
  line-height: 1.15;
}

.header-metrics div {
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.13);
}

.product-intro {
  border-color: rgba(47, 111, 237, 0.22);
  background:
    linear-gradient(135deg, rgba(47, 111, 237, 0.09), rgba(255, 255, 255, 0.96) 42%),
    var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.product-intro::before {
  background:
    linear-gradient(90deg, var(--color-primary) 0 42%, transparent 42% 50%, #138f86 50% 70%, transparent 70% 78%, var(--color-accent) 78% 100%);
  opacity: 0.18;
}

.toolbar {
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.86);
  border-color: var(--color-border-soft);
  box-shadow: var(--shadow-soft);
}

.toolbar select,
.toolbar button,
.secondary-button,
.source-button,
.icon-button {
  border-radius: var(--radius-card);
  border-color: var(--color-border);
  background: var(--color-surface);
}

.primary-button {
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-color: var(--color-primary-dark);
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(47, 111, 237, 0.24);
}

.primary-button:hover,
.source-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled,
.source-button:disabled {
  transform: none;
}

.upload-panel,
.tender-import-panel {
  border-radius: var(--radius-card);
  border-color: var(--color-border-soft);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.upload-panel {
  border-style: solid;
}

.upload-panel label span,
.tender-import-panel strong {
  color: var(--color-text);
}

.tender-import-panel {
  background:
    linear-gradient(135deg, rgba(19, 143, 134, 0.08), rgba(255, 255, 255, 0.96) 48%),
    var(--color-surface);
}

.opportunity-table {
  background: transparent;
}

.tender-row.tender-card {
  border-color: rgba(17, 24, 39, 0.08);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.tender-row.tender-card:hover,
.tender-row.tender-card.active {
  border-color: rgba(47, 111, 237, 0.42);
  box-shadow: var(--shadow-card);
}

.tender-row.tender-card.active::after {
  content: "";
  position: absolute;
  inset: 10px 10px auto auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
}

.status-go {
  color: #0f6848;
  background: var(--color-success-soft);
}

.status-hold {
  color: #8a5a12;
  background: var(--color-warning-soft);
}

.status-no-go {
  color: #9f342b;
  background: var(--color-danger-soft);
}

.case-card-meta,
.workspace-status-card,
.case-header-cell,
.case-progress,
.case-progress-item,
.scenario-context,
.role-context {
  border-color: var(--color-border-soft);
  background: var(--color-surface-muted);
}

.partner-module {
  background: linear-gradient(135deg, #141d27, #223346);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-card);
}

.bid-room {
  top: var(--space-6);
  max-height: calc(100vh - 48px);
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: var(--radius-card);
  background:
    linear-gradient(180deg, #141d27 0 108px, var(--color-surface) 108px, #f8fafc 100%);
  box-shadow: var(--shadow-card);
}

.selected-summary {
  border-color: rgba(47, 111, 237, 0.18);
  background:
    linear-gradient(135deg, rgba(47, 111, 237, 0.08), rgba(255, 255, 255, 0.96) 50%),
    var(--color-surface);
}

.primary-action-panel {
  border-color: rgba(47, 111, 237, 0.18);
  background:
    linear-gradient(135deg, rgba(47, 111, 237, 0.09), rgba(255, 255, 255, 0.96));
  box-shadow: var(--shadow-soft);
}

.primary-action-panel.has-blockers {
  border-color: rgba(183, 121, 31, 0.34);
  background:
    linear-gradient(135deg, rgba(183, 121, 31, 0.15), rgba(255, 255, 255, 0.96));
}

.primary-action-panel.is-clear {
  border-color: rgba(22, 131, 90, 0.26);
}

.primary-action-panel .primary-button {
  min-width: 190px;
}

.case-state-note {
  border-color: var(--color-border);
  background: var(--color-surface-muted);
}

.tabs {
  background: #e8edf4;
  border: 1px solid var(--color-border-soft);
}

.tab {
  color: var(--color-text-muted);
  font-weight: 700;
}

.tab.active {
  color: var(--color-text);
  background: var(--color-surface);
}

.tab-panel {
  border-color: rgba(17, 24, 39, 0.08);
  background: var(--color-surface);
}

.email-status {
  border-radius: var(--radius-card);
  margin: var(--space-3);
}

.email-status.ready {
  border-color: rgba(22, 131, 90, 0.26);
  background: var(--color-success-soft);
}

.email-status.pending {
  border-color: rgba(183, 121, 31, 0.28);
  background: var(--color-warning-soft);
}

.request-row {
  align-items: flex-start;
}

.request-actions {
  flex: 0 0 auto;
}

.empty-state {
  border-color: var(--color-border);
  background: var(--color-surface-muted);
}

.toast {
  background: #111827;
}

@media (max-width: 1280px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bid-room {
    position: static;
    max-height: none;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: minmax(240px, 1fr) minmax(260px, auto);
  }
}

@media (max-width: 760px) {
  .content-grid {
    padding: var(--space-3);
    gap: var(--space-3);
  }

  .topbar,
  .panel-header,
  .selected-summary,
  .bid-room {
    padding: var(--space-4);
  }

  .top-actions {
    width: 100%;
  }

  .demo-badge,
  .tenant-select,
  .search-field {
    width: 100%;
  }

  .header-metrics,
  .upload-panel,
  .tender-import-panel,
  .primary-action-panel,
  .request-row {
    grid-template-columns: 1fr;
  }
}

/* Tender Source Connector v2 */
.tender-import-panel {
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
}

.source-search-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: var(--radius-card);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(255, 255, 255, 0.98) 44%),
    var(--color-surface);
}

.source-search-header,
.source-search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.source-search-header > div {
  display: grid;
  gap: 3px;
}

.source-search-controls {
  grid-template-columns: minmax(140px, 1.3fr) minmax(120px, 0.8fr) auto;
}

.source-search-controls input {
  min-width: 0;
}

.source-search-results {
  display: grid;
  gap: 8px;
}

.source-empty {
  color: var(--color-text-muted);
  font-size: 0.86rem;
}

.source-result {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 11px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.source-result input {
  margin-top: 3px;
}

.source-result > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.source-result strong {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--color-text);
  font-size: 0.92rem;
  line-height: 1.25;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.source-result small,
.source-result em {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
  font-style: normal;
}

.source-link {
  align-self: center;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(47, 111, 237, 0.1);
  color: var(--color-primary-dark);
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.source-search-header .primary-button:disabled {
  border-color: rgba(100, 116, 139, 0.22);
  background: #e2e8f0;
  color: #64748b;
  box-shadow: none;
}

@media (max-width: 760px) {
  .source-search-header,
  .source-search-controls,
  .source-result {
    grid-template-columns: 1fr;
  }

  .source-result input {
    margin-top: 0;
  }

  .source-link {
    justify-self: start;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.public-mode {
  background: #f6f8fb;
}

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--nav), var(--nav-2));
  color: #f7fbff;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  color: #f4b63b;
  font-size: 30px;
  font-weight: 800;
}

.brand-sub {
  color: #d7e1ec;
  font-size: 13px;
  margin-top: 2px;
}

.nav-stack {
  display: grid;
  gap: 8px;
}

.nav-item,
.workspace-item {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #f7fbff;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  text-align: left;
}

.nav-item.active {
  background: linear-gradient(180deg, #e0aa29, #c88911);
  color: #111827;
  font-weight: 750;
}

.nav-item:not(.active):hover,
.workspace-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-icon {
  width: 22px;
  flex: 0 0 22px;
  text-align: center;
  font-size: 19px;
}

.nav-count {
  margin-left: auto;
  min-width: 28px;
  height: 24px;
  border-radius: 999px;
  background: #d99a17;
  color: #111827;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.workspace-list {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  gap: 8px;
}

.section-label {
  color: #9fb1c5;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 750;
}

.workspace-item.active {
  background: rgba(255, 255, 255, 0.12);
}

.user-block {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #78889b;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
}

.user-block strong,
.user-block span {
  display: block;
}

.user-block strong {
  font-size: 13px;
}

.user-block span {
  color: #b7c4d3;
  font-size: 12px;
}

.workspace {
  min-width: 0;
}

.topbar {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(320px, auto);
  align-items: center;
  gap: 18px;
  padding: 14px 26px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.workspace-title {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.building-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f0f3f7;
  display: grid;
  place-items: center;
  font-size: 22px;
}

.workspace-title h1,
.workspace-title p,
.panel-header h2,
.panel-header p,
.partner-module h2,
.partner-module p,
.bid-room h2,
.bid-room p {
  margin: 0;
}

.workspace-title h1 {
  font-size: 22px;
  line-height: 1.2;
}

.workspace-title p,
.panel-header p,
.partner-module p,
.bid-room-header p {
  color: var(--muted);
  font-size: 14px;
}

.review-status {
  border-left: 1px solid var(--line);
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.review-status span {
  color: var(--muted);
  font-size: 13px;
}

.review-status strong {
  color: var(--amber);
  border: 1px solid rgba(201, 132, 9, 0.35);
  background: #fff9ec;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.tenant-select {
  height: 42px;
  min-width: 190px;
  max-width: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--ink);
  padding: 0 12px;
}

.search-field {
  height: 42px;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fbfcfe;
}

.search-field input {
  border: 0;
  outline: 0;
  min-width: 0;
  background: transparent;
}

.icon-button,
.team-button,
.secondary-button,
.primary-button {
  border-radius: 8px;
  border: 1px solid var(--line);
  min-height: 40px;
}

.icon-button {
  width: 40px;
  background: var(--surface);
}

.team-button,
.secondary-button {
  background: var(--surface);
  color: var(--ink);
  padding: 0 14px;
}

.primary-button {
  background: linear-gradient(180deg, #dfa626, #c78710);
  border-color: #bd7f0f;
  color: #111827;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.secondary-button.full {
  width: 100%;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  align-items: stretch;
  min-height: calc(100vh - 82px);
}

.radar-panel {
  padding: 24px;
  min-width: 0;
}

.panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-header h2,
.partner-module h2,
.bid-room h2 {
  font-size: 26px;
  line-height: 1.2;
}

.header-metrics {
  display: grid;
  grid-template-columns: repeat(3, 92px);
  gap: 8px;
}

.header-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 9px 10px;
}

.header-metrics strong,
.header-metrics span {
  display: block;
}

.header-metrics strong {
  font-size: 20px;
}

.header-metrics span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 750;
}

.toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.toolbar select {
  min-width: 170px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 12px;
}

.upload-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px dashed #c6cfdc;
  border-radius: 8px;
  background: #fbfcfe;
}

.tender-import-panel {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 92px minmax(180px, 0.8fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(13, 138, 125, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(13, 138, 125, 0.12), rgba(255, 253, 247, 0.96) 50%),
    #fffdf7;
  box-shadow: var(--soft-shadow);
}

.tender-import-panel strong,
.tender-import-panel span {
  display: block;
}

.tender-import-panel strong {
  font-size: 14px;
}

.tender-import-panel span,
.import-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.tender-import-panel select,
.tender-import-panel input {
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
  padding: 0 10px;
}

.import-status {
  grid-column: 1 / -1;
  min-height: 16px;
}

.import-status:empty {
  display: none;
}

.upload-panel label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.upload-panel input {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.upload-panel small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.package-status {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.package-status:empty {
  display: none;
}

.package-status-head,
.package-doc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.package-status-head {
  color: var(--muted);
  font-size: 12px;
}

.package-status-head strong {
  color: var(--amber);
}

.package-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.package-stats span {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  padding: 7px 8px;
  font-size: 11px;
  font-weight: 750;
}

.package-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fffaf0;
  padding: 9px 10px;
}

.case-file-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 9px 10px;
}

.case-file-panel span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.case-file-panel strong {
  display: block;
  margin-top: 3px;
  font-size: 14px;
}

.case-file-panel ul {
  margin: 0;
  padding-left: 18px;
  color: #344054;
  font-size: 12px;
  line-height: 1.4;
}

.case-file-panel small {
  color: var(--muted);
  font-size: 12px;
}

.package-review span,
.package-activity span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.package-review strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
}

.package-docs {
  display: grid;
  gap: 6px;
}

.review-actions,
.package-exports {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.package-doc {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px 10px;
}

.package-doc strong,
.package-doc small {
  display: block;
}

.package-doc strong {
  font-size: 13px;
}

.package-doc small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.source-button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 750;
}

.export-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.package-activity {
  display: grid;
  gap: 6px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--surface);
  padding: 9px 10px;
}

.package-activity > strong {
  font-size: 13px;
}

.activity-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.activity-row p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.package-requests {
  display: grid;
  gap: 6px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--surface);
  padding: 9px 10px;
}

.package-requests > strong {
  font-size: 13px;
}

.request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.request-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.source-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.requirement-review-shell {
  display: grid;
  gap: 12px;
}

.requirement-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: linear-gradient(135deg, #f6fbff, #fffaf0);
  padding: 12px;
}

.requirement-review-header span,
.field-block span,
.source-readonly-panel span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.requirement-review-header strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
}

.requirement-review-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.82fr) minmax(0, 1.18fr);
  gap: 12px;
  align-items: start;
}

.requirement-review-list {
  display: grid;
  gap: 8px;
  max-height: 540px;
  overflow: auto;
  padding-right: 2px;
}

.requirement-review-item {
  display: grid;
  gap: 7px;
  width: 100%;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px;
  text-align: left;
}

.requirement-review-item.active {
  border-color: rgba(47, 111, 237, 0.45);
  background: #f4f8ff;
  box-shadow: inset 3px 0 0 var(--color-primary);
}

.requirement-review-item strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

.requirement-review-item small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.requirement-review-form {
  display: grid;
  gap: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
}

.requirement-detail-head,
.requirement-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field-block {
  display: grid;
  gap: 5px;
}

.field-block input,
.field-block select,
.field-block textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 10px;
  font: inherit;
  font-size: 13px;
}

.field-block textarea {
  resize: vertical;
  line-height: 1.45;
}

.requirement-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.source-readonly-panel {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(19, 143, 134, 0.22);
  border-radius: 8px;
  background: #f3fbfa;
  padding: 10px;
}

.source-readonly-panel strong,
.source-readonly-panel small {
  display: block;
}

.source-readonly-panel small {
  color: var(--muted);
  font-size: 12px;
}

.source-readonly-panel p {
  margin: 4px 0 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
  max-height: 132px;
  overflow: auto;
}

.source-button.danger {
  border-color: #f1b7b2;
  background: #fff0ed;
  color: #9f2e26;
}

.role-hint {
  border: 1px solid #f3cf8b;
  border-radius: 8px;
  background: #fffaf0;
  color: #7a4a00;
  padding: 8px 10px;
  font-size: 12px;
}

.email-status {
  margin: 10px 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}

.email-status.ready {
  border-color: #bfe7cc;
  background: var(--green-bg);
  color: #176a3a;
}

.email-status.pending {
  border-color: #f3cf8b;
  background: #fffaf0;
  color: #7a4a00;
}

.request-row span,
.request-row small {
  min-width: 0;
}

.request-row strong,
.request-row small {
  display: block;
}

.request-row small {
  color: var(--muted);
  font-size: 11px;
}

.opportunity-table,
.partner-module,
.bid-room,
.selected-summary,
.tab-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.opportunity-table {
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table-head,
.tender-row {
  display: grid;
  grid-template-columns: 92px 82px minmax(220px, 1fr) 66px 92px 74px;
  gap: 10px;
  align-items: center;
}

.table-head {
  min-height: 48px;
  padding: 0 14px;
  color: #344054;
  font-size: 12px;
  font-weight: 750;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.tender-rows {
  display: grid;
}

.tender-row {
  min-height: 126px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--soft-line);
  background: var(--surface);
  padding: 16px 14px;
  text-align: left;
  position: relative;
}

.tender-row:last-child {
  border-bottom: 0;
}

.tender-row::before {
  content: "";
  position: absolute;
  left: 0;
  inset-block: 0;
  width: 4px;
  background: var(--status-color, var(--gold));
}

.tender-row:hover,
.tender-row.active {
  background: #fbfcff;
}

.status-pill {
  display: inline-flex;
  justify-content: center;
  min-width: 62px;
  border-radius: 999px;
  padding: 7px 8px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid currentColor;
}

.status-go {
  color: var(--green);
  background: var(--green-bg);
}

.status-hold {
  color: var(--amber);
  background: var(--amber-bg);
}

.status-no-go {
  color: var(--red);
  background: var(--red-bg);
}

.fit-ring,
.evidence-ring {
  --ring: var(--green);
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, var(--surface) 58%, transparent 59%),
    conic-gradient(var(--ring) calc(var(--value) * 1%), #e7ebf1 0);
  color: var(--ink);
}

.fit-ring strong {
  font-size: 21px;
}

.fit-ring span,
.evidence-cell span,
.deadline-cell span,
.value-cell span {
  color: var(--muted);
  font-size: 12px;
}

.tender-title strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
  margin-bottom: 8px;
}

.tender-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.scenario-note {
  display: block;
  margin-top: 10px;
  color: #344054;
  font-size: 13px;
  line-height: 1.35;
}

.scenario-note strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 13px;
}

.tag {
  border-radius: 999px;
  background: #eef1f5;
  padding: 4px 9px;
  color: #475467;
}

.deadline-cell strong,
.value-cell strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.evidence-cell {
  display: grid;
  align-items: center;
  gap: 2px;
}

.evidence-ring {
  --ring: var(--amber);
  width: 48px;
  height: 48px;
  font-weight: 850;
}

.partner-module {
  margin-top: 20px;
  padding: 18px 20px;
}

.partner-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.partner-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.partner-card strong,
.partner-card span {
  display: block;
}

.partner-card strong {
  font-size: 22px;
}

.partner-card span {
  color: var(--muted);
  font-size: 12px;
}

.system-card {
  background: rgba(255, 255, 255, 0.72);
}

.system-card strong {
  font-size: 18px;
}

.system-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.35;
}

.integration-runs-card {
  grid-column: span 2;
}

.guardrail {
  margin-top: 16px;
  border-top: 1px solid var(--soft-line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.bid-room {
  border-radius: 0;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  padding: 22px;
  min-width: 0;
  overflow: auto;
}

.bid-room-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.selected-summary {
  padding: 16px;
  margin-bottom: 16px;
}

.selected-summary h3 {
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.scenario-context,
.bid-next-action {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.scenario-context {
  background: #f8fafc;
}

.scenario-context span,
.bid-next-action span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.scenario-context strong,
.bid-next-action strong {
  display: block;
  line-height: 1.3;
}

.scenario-context small {
  display: block;
  margin-top: 5px;
  color: #344054;
  font-size: 13px;
  line-height: 1.35;
}

.bid-next-action.is-clear {
  border-color: #bfe7cc;
  background: var(--green-bg);
}

.bid-next-action.has-blockers {
  border-color: #f3cf8b;
  background: #fffaf0;
}

.bid-next-action ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #7a4a00;
  font-size: 13px;
}

.bid-next-action small {
  display: block;
  margin-top: 6px;
  color: #176a3a;
}

.bid-next-action .role-hint {
  color: #7a4a00;
}

.case-header {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.case-header-cell {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  min-width: 0;
  padding: 9px 10px;
  background: #fff;
}

.case-header-cell span,
.case-progress-head span,
.case-progress-status {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.case-header-cell strong {
  display: block;
  margin-top: 3px;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.case-header-cell:first-child {
  grid-column: 1 / -1;
}

.case-progress {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.case-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.case-progress-head strong {
  font-size: 12px;
  color: var(--muted);
}

.case-progress-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.case-progress-item {
  position: relative;
  min-width: 0;
  border: 1px solid var(--soft-line);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
}

.case-progress-item strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.2;
}

.case-progress-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.case-progress-item.is-done {
  border-left-color: var(--green);
}

.case-progress-item.is-open {
  border-left-color: var(--gold);
}

.case-progress-item.is-blocked {
  border-left-color: var(--red);
  background: #fffafa;
}

.case-progress-item.is-neutral {
  border-left-color: #98a2b3;
  background: #fafbfc;
}

.case-progress-item.is-current {
  border-color: var(--gold);
  border-left-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(213, 154, 26, 0.18);
}

.case-progress-item.is-current .case-progress-status {
  color: var(--gold-dark);
}

.source-strip {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--soft-line);
  color: var(--muted);
  font-size: 12px;
}

.source-strip strong {
  color: var(--amber);
}

.summary-cell {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 10px;
}

.summary-cell span,
.detail-list span {
  color: var(--muted);
  font-size: 12px;
}

.summary-cell strong,
.detail-list strong {
  display: block;
  margin-top: 3px;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  overflow-x: auto;
}

.tab {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  padding: 12px 10px;
  color: #475467;
  font-size: 13px;
  white-space: nowrap;
}

.tab.active {
  color: var(--ink);
  border-bottom-color: var(--gold);
  font-weight: 800;
}

.tab-panel {
  min-height: 246px;
  overflow: hidden;
}

.matrix-row,
.evidence-row,
.question-row,
.detail-row {
  display: grid;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--soft-line);
}

.matrix-row {
  grid-template-columns: minmax(120px, 1.2fr) 44px 72px 92px minmax(104px, 0.9fr) 72px;
}

.evidence-row {
  grid-template-columns: minmax(150px, 1fr) 112px 82px;
}

.question-row {
  grid-template-columns: 28px minmax(0, 1fr);
}

.detail-row {
  grid-template-columns: 130px minmax(0, 1fr);
}

.matrix-row.header,
.evidence-row.header {
  background: #fbfcfe;
  color: #344054;
  font-size: 12px;
  font-weight: 750;
}

.matrix-row:not(.header),
.evidence-row:not(.header),
.question-row,
.detail-row {
  font-size: 13px;
}

.matrix-row:last-child,
.evidence-row:last-child,
.question-row:last-child,
.detail-row:last-child {
  border-bottom: 0;
}

.matrix-row > *,
.evidence-row > *,
.question-row > *,
.detail-row > * {
  min-width: 0;
  overflow-wrap: break-word;
}

.matrix-row strong,
.evidence-row strong {
  display: block;
}

.matrix-row small,
.evidence-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  margin-top: 3px;
}

.evidence-row.missing {
  background: #fffaf0;
}

.small-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 750;
  background: #eef1f5;
}

.bid-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.bid-actions .primary-button {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 44px));
  border-radius: 8px;
  padding: 12px 14px;
  background: #111827;
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 23, 38, 0.42);
}

.modal-backdrop[hidden] {
  display: none;
}

.source-modal {
  width: min(620px, 100%);
  max-height: min(680px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.source-modal-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.source-meta {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.source-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.source-meta strong {
  overflow-wrap: break-word;
}

.source-excerpt {
  margin-top: 6px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
  color: #344054;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.public-evidence-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.public-evidence-panel {
  width: min(720px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 28px;
}

.public-brand {
  color: var(--gold);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.public-evidence-panel h1 {
  margin: 8px 0 12px;
  font-size: 30px;
  line-height: 1.1;
}

.public-evidence-content,
.public-request-list,
.public-upload-form {
  display: grid;
  gap: 12px;
}

.public-request-item {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 10px 12px;
}

.public-request-item strong,
.public-request-item span {
  display: block;
}

.public-request-item span,
.public-upload-form small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.public-upload-form input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .brand-sub,
  .nav-item span:not(.nav-icon):not(.nav-count),
  .workspace-list,
  .user-block div {
    display: none;
  }

  .brand {
    font-size: 18px;
  }

  .sidebar {
    padding: 18px 10px;
  }

  .nav-item {
    justify-content: center;
    padding: 10px;
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .requirement-review-grid {
    grid-template-columns: 1fr;
  }

  .bid-room {
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
  }

  .table-head {
    display: none;
  }

  .tender-row {
    grid-template-columns: 92px 92px minmax(0, 1fr);
    min-height: auto;
  }

  .deadline-cell,
  .value-cell,
  .evidence-cell {
    grid-column: span 1;
  }
}

@media (max-width: 680px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    position: static;
    z-index: 20;
  }

  .brand-block,
  .user-block {
    display: none;
  }

  .nav-stack {
    display: flex;
    overflow-x: auto;
  }

  .nav-item {
    min-width: 54px;
  }

  .radar-panel,
  .bid-room,
  .topbar {
    padding: 16px;
  }

  .panel-header,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .header-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .partner-cards,
  .summary-grid,
  .case-header,
  .case-progress-grid,
  .requirement-form-grid {
    grid-template-columns: 1fr;
  }

  .toolbar select,
  .toolbar button,
  .search-field {
    width: 100%;
  }

  .tender-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .matrix-row,
  .evidence-row,
  .detail-row {
    grid-template-columns: 1fr;
  }

  .package-status-head {
    align-items: stretch;
    flex-direction: column;
  }

  .package-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-file-panel {
    grid-template-columns: 1fr;
  }
}

/* Final product UI pass */
.nav-step {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: #f7fbff;
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 24px;
}

.nav-item.active .nav-step {
  background: #111827;
  color: #f4b63b;
}

.role-select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f7fbff;
  padding: 0 10px;
}

.role-select option {
  color: #111827;
}

.role-switcher-top {
  min-width: 168px;
}

.content-grid {
  grid-template-columns: minmax(430px, 1fr) minmax(520px, 42vw);
}

.product-intro {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px 16px;
}

.product-intro strong {
  font-size: 15px;
  line-height: 1.35;
}

.product-intro span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.opportunity-table {
  box-shadow: none;
  border: 0;
  background: transparent;
}

.tender-rows {
  gap: 10px;
}

.tender-row.tender-card {
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  overflow: hidden;
}

.tender-row.tender-card::before {
  width: 3px;
}

.tender-row.tender-card.active {
  border-color: #d59a1a;
  box-shadow: 0 0 0 2px rgba(213, 154, 26, 0.12);
}

.tender-row.tender-card .tender-title {
  min-width: 0;
}

.case-card-meta {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fbfcfe;
  min-width: 0;
}

.case-card-meta small,
.primary-action-panel span,
.role-context span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.case-card-meta strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.case-title-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.role-context {
  margin-top: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfe;
}

.role-context strong {
  display: block;
  margin-bottom: 4px;
}

.role-context span {
  text-transform: none;
  font-weight: 500;
  line-height: 1.35;
}

.primary-action-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.primary-action-panel.is-clear {
  border-color: #bfe7cc;
  background: var(--green-bg);
}

.primary-action-panel.has-blockers {
  border-color: #f3cf8b;
  background: #fffaf0;
}

.primary-action-panel strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.25;
}

.primary-action-panel small {
  display: block;
  margin-top: 5px;
  color: #344054;
  font-size: 13px;
  line-height: 1.35;
}

.primary-action-panel .primary-button {
  min-width: 180px;
  min-height: 44px;
}

.case-state-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  min-height: 40px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 750;
}

.workspace-status-card {
  display: grid;
  gap: 3px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 10px 12px;
}

.workspace-status-card span,
.workspace-status-card small {
  color: var(--muted);
  font-size: 12px;
}

.workspace-status-card strong {
  font-size: 14px;
}

.empty-state {
  display: grid;
  gap: 5px;
  border: 1px dashed #c6cfdc;
  border-radius: 8px;
  background: #fbfcfe;
  padding: 18px;
}

.empty-state strong {
  font-size: 15px;
}

.empty-state span {
  color: var(--muted);
  font-size: 13px;
}

.matrix-row {
  grid-template-columns: minmax(170px, 1.25fr) 54px 82px minmax(120px, 0.9fr) minmax(120px, 0.9fr);
}

.matrix-row .source-button {
  margin-top: 6px;
}

.package-exports {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
}

.export-quality-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 14px;
  padding: 14px 16px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #f8fafc;
}

.export-quality-panel.is-current {
  border-color: rgba(27, 132, 84, 0.26);
  background: #eefaf4;
}

.export-quality-panel.is-stale {
  border-color: rgba(190, 120, 22, 0.28);
  background: #fff8eb;
}

.export-quality-panel span,
.export-quality-panel small {
  color: var(--muted);
  font-size: 12px;
}

.export-quality-panel strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
}

.export-quality-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.export-quality-metrics span {
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: #fff;
  padding: 6px 9px;
  font-weight: 750;
}

.export-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.export-row.is-stale {
  border-color: rgba(190, 120, 22, 0.32);
  background: #fffdf7;
}

.export-row span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.export-row strong,
.export-row small {
  overflow-wrap: anywhere;
}

.export-row small {
  color: var(--muted);
  font-size: 12px;
}

.review-actions {
  padding: 12px;
  border-bottom: 1px solid var(--soft-line);
}

.activity-row {
  padding: 12px;
  border-bottom: 1px solid var(--soft-line);
}

.activity-row:last-child {
  border-bottom: 0;
}

.bid-actions[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .nav-item .nav-step {
    display: grid !important;
  }

  .nav-item span:not(.nav-step):not(.nav-count) {
    display: none;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .bid-room {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .sidebar {
    padding: 12px 14px;
    gap: 12px;
  }

  .brand-block {
    display: block;
  }

  .brand {
    font-size: 22px;
    line-height: 1;
  }

  .brand-sub {
    display: block;
    font-size: 11px;
  }

  .nav-stack {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-item {
    width: auto;
    min-width: max-content;
    flex: 0 0 auto;
    justify-content: flex-start;
    gap: 8px;
    padding: 9px 10px;
  }

  .nav-item .nav-step {
    display: grid !important;
  }

  .nav-item span:not(.nav-step):not(.nav-count) {
    display: inline !important;
    white-space: nowrap;
    font-size: 12px;
  }

  .nav-count {
    display: none !important;
  }

  .primary-action-panel {
    grid-template-columns: 1fr;
  }

  .primary-action-panel .primary-button,
  .case-state-note {
    width: 100%;
  }
}

/* Visual SaaS Workbench v2 */
:root {
  --ink: #121916;
  --muted: #6d746f;
  --line: #d9dfd6;
  --soft-line: #edf0eb;
  --surface: #fffdf7;
  --surface-2: #f7f4ec;
  --canvas: #e8eee8;
  --nav: #101813;
  --nav-2: #1d2a22;
  --gold: #e1a72d;
  --gold-dark: #9c6410;
  --teal: #0d8a7d;
  --teal-dark: #0c5f58;
  --green: #21865b;
  --green-bg: #e7f5ec;
  --amber: #c57b12;
  --amber-bg: #fff2cf;
  --red: #cf5345;
  --red-bg: #fff0eb;
  --shadow: 0 24px 54px rgba(26, 35, 28, 0.14);
  --soft-shadow: 0 14px 34px rgba(28, 38, 31, 0.1);
}

body:not(.public-mode) {
  background:
    linear-gradient(90deg, rgba(16, 24, 19, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(16, 24, 19, 0.04) 1px, transparent 1px),
    linear-gradient(135deg, #edf2ed 0%, #e5ece7 44%, #f3efe6 100%);
  background-size: 28px 28px, 28px 28px, auto;
}

.app-shell {
  grid-template-columns: 272px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(225, 167, 45, 0.12), transparent 32%),
    linear-gradient(180deg, #0d1511 0%, #16241c 56%, #0e1914 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 18px 0 44px rgba(15, 22, 17, 0.24);
  padding: 26px 18px;
}

.brand-block {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 12px);
  padding: 16px;
}

.brand {
  color: #ffd36b;
  font-size: 28px;
  letter-spacing: 0;
}

.brand-sub {
  color: #b8c7bd;
}

.nav-stack {
  gap: 10px;
}

.nav-item,
.workspace-item {
  border: 1px solid transparent;
  min-height: 48px;
}

.nav-item.active {
  background: linear-gradient(135deg, #f0bb40, #d98a15);
  color: #111813;
  box-shadow: 0 12px 26px rgba(225, 167, 45, 0.24);
}

.nav-item:not(.active) {
  color: #dce6de;
  background: rgba(255, 255, 255, 0.035);
}

.nav-item:not(.active):hover,
.workspace-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.nav-step {
  background: rgba(255, 255, 255, 0.1);
  color: #f7fbff;
}

.nav-item.active .nav-step {
  background: #121916;
  color: #ffd36b;
}

.workspace-list {
  margin-top: auto;
}

.workspace-item.active {
  border-color: rgba(255, 211, 107, 0.24);
  background: rgba(255, 211, 107, 0.1);
}

.user-block {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.avatar {
  background: linear-gradient(135deg, #f1bd43, #0d8a7d);
  color: #0d1511;
}

.workspace {
  background:
    linear-gradient(180deg, rgba(16, 24, 19, 0.1) 0, transparent 230px),
    transparent;
}

.topbar {
  min-height: 104px;
  grid-template-columns: minmax(260px, 1fr) auto minmax(420px, auto);
  background:
    linear-gradient(135deg, #142019 0%, #16291f 58%, #47330f 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fffdf7;
  padding: 18px 30px;
}

.building-icon {
  background: linear-gradient(135deg, #f1bd43, #0d8a7d);
  color: #111813;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.workspace-title h1 {
  color: #fffdf7;
  font-size: 25px;
}

.workspace-title p {
  color: #c5d2c8;
}

.review-status {
  border-left-color: rgba(255, 255, 255, 0.13);
}

.review-status span {
  color: #aebeb3;
}

.review-status strong {
  color: #ffd36b;
  border-color: rgba(255, 211, 107, 0.35);
  background: rgba(255, 211, 107, 0.08);
}

.tenant-select,
.search-field {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fffdf7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tenant-select option {
  color: #111813;
}

.search-field input {
  color: #fffdf7;
}

.search-field input::placeholder {
  color: #bfcbc2;
}

.content-grid {
  grid-template-columns: minmax(520px, 1fr) minmax(470px, 40vw);
  gap: 24px;
  padding: 24px;
  min-height: calc(100vh - 104px);
}

.radar-panel,
.bid-room {
  min-width: 0;
  padding: 0;
}

.panel-header {
  position: relative;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(13, 138, 125, 0.96), rgba(18, 25, 22, 0.96) 48%, rgba(192, 111, 20, 0.92)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 14px);
  color: #fffdf7;
  padding: 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-header::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: 20px;
  top: 16px;
  width: 190px;
  height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.13) 20%, transparent 20% 26%, rgba(255, 255, 255, 0.08) 26% 62%, transparent 62%),
    linear-gradient(180deg, transparent 0 22%, rgba(255, 255, 255, 0.1) 22% 23%, transparent 23% 48%, rgba(255, 255, 255, 0.1) 48% 49%, transparent 49% 74%, rgba(255, 255, 255, 0.1) 74% 75%, transparent 75%);
  opacity: 0.75;
  pointer-events: none;
}

.panel-header > * {
  position: relative;
  z-index: 1;
}

.panel-header h2 {
  color: #fffdf7;
  font-size: 29px;
}

.panel-header p {
  color: #dbe7df;
}

.header-metrics {
  z-index: 1;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  align-self: end;
}

.header-metrics div {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.11);
  color: #fffdf7;
  box-shadow: none;
}

.header-metrics strong {
  color: #fffdf7;
  font-size: 24px;
}

.header-metrics span {
  color: #d7e3db;
}

.product-intro {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid rgba(13, 138, 125, 0.22);
  background:
    linear-gradient(135deg, #fffdf7 0%, #f7f4ec 60%, #e9f3ef 100%);
  box-shadow: var(--soft-shadow);
  margin-bottom: 14px;
  overflow: hidden;
}

.product-intro::before {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 146px;
  height: 38px;
  background:
    linear-gradient(90deg, var(--teal) 0 44%, transparent 44% 50%, var(--gold) 50% 70%, transparent 70% 76%, var(--red) 76% 100%);
  border-radius: 8px;
  opacity: 0.22;
}

.product-intro strong {
  max-width: 760px;
  color: #17201e;
  font-size: 18px;
}

.product-intro span {
  max-width: 760px;
  color: #56645c;
}

.toolbar,
.upload-panel,
.opportunity-table,
.partner-module,
.selected-summary,
.tab-panel,
.bid-room {
  box-shadow: var(--soft-shadow);
}

.toolbar {
  justify-content: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.82);
  padding: 10px;
}

.toolbar select,
.toolbar button,
.secondary-button,
.source-button,
.icon-button {
  border-color: #d5dcd2;
  background: #fffdf7;
}

.primary-button {
  min-height: 44px;
  border-color: #be7a0d;
  background: linear-gradient(135deg, #f0bb40, #d98a15);
  color: #111813;
  box-shadow: 0 12px 24px rgba(217, 138, 21, 0.24);
}

.upload-panel {
  border: 1px solid rgba(13, 138, 125, 0.18);
  background:
    linear-gradient(135deg, rgba(13, 138, 125, 0.08), rgba(255, 253, 247, 0.96) 42%),
    #fffdf7;
}

.workspace-status-card {
  background: linear-gradient(135deg, #f8fbf4, #fffdf7);
}

.tender-rows {
  gap: 12px;
}

.tender-row.tender-card {
  position: relative;
  border: 1px solid rgba(21, 32, 26, 0.1);
  background:
    linear-gradient(135deg, #fffdf7 0%, #fbf7ee 100%);
  box-shadow: var(--soft-shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.tender-row.tender-card:hover,
.tender-row.tender-card.active {
  transform: translateY(-1px);
  border-color: rgba(225, 167, 45, 0.75);
  box-shadow: 0 18px 44px rgba(26, 35, 28, 0.18);
}

.tender-row.tender-card::before {
  width: 5px;
  background: var(--status-color, var(--gold));
}

.tender-row.tender-card:has(.status-go) {
  --status-color: var(--green);
}

.tender-row.tender-card:has(.status-hold) {
  --status-color: var(--gold);
}

.tender-row.tender-card:has(.status-no-go) {
  --status-color: var(--red);
}

.status-pill {
  min-width: 86px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.status-go {
  color: #0d5c3e;
  background: linear-gradient(135deg, #dff5e8, #eef9ef);
}

.status-hold {
  color: #8c580b;
  background: linear-gradient(135deg, #fff1c7, #fff9e8);
}

.status-no-go {
  color: #a63f34;
  background: linear-gradient(135deg, #ffe4dd, #fff4ef);
}

.case-card-meta {
  border-color: rgba(18, 25, 22, 0.08);
  background: rgba(255, 255, 255, 0.64);
}

.scenario-note {
  border-left: 3px solid rgba(13, 138, 125, 0.5);
  padding-left: 10px;
}

.partner-module {
  background:
    linear-gradient(135deg, #18251d, #223427);
  color: #fffdf7;
  border-color: rgba(255, 255, 255, 0.12);
}

.partner-module h2 {
  color: #fffdf7;
}

.partner-module p,
.guardrail {
  color: #c5d2c8;
}

.partner-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.partner-card span {
  color: #c5d2c8;
}

.bid-room {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  border: 1px solid rgba(18, 25, 22, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #15241b 0 112px, #fffdf7 112px, #f7f4ec 100%);
  padding: 20px;
}

.bid-room-header {
  border-bottom: 0;
  padding: 2px 0 18px;
  margin-bottom: 16px;
}

.bid-room h2 {
  color: #fffdf7;
}

.bid-room-header p {
  color: #cddbd0;
}

.selected-summary {
  border-color: rgba(13, 138, 125, 0.24);
  background:
    linear-gradient(135deg, #f7fffa 0%, #fffdf7 56%, #f7f1e5 100%);
  box-shadow: 0 14px 36px rgba(24, 34, 28, 0.08);
}

.selected-summary h3,
.selected-summary strong {
  color: #111813;
}

.case-title-row h3 {
  margin-top: 0;
}

.scenario-context,
.role-context {
  border-color: rgba(18, 25, 22, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.primary-action-panel {
  border-width: 1px;
  border-color: rgba(13, 138, 125, 0.18);
  box-shadow: 0 12px 30px rgba(24, 34, 28, 0.08);
}

.primary-action-panel.is-clear {
  background:
    linear-gradient(135deg, rgba(33, 134, 91, 0.14), rgba(255, 253, 247, 0.92));
}

.primary-action-panel.has-blockers {
  background:
    linear-gradient(135deg, rgba(225, 167, 45, 0.16), rgba(255, 253, 247, 0.96));
}

.case-state-note {
  background: rgba(255, 255, 255, 0.74);
}

.tabs {
  border-bottom: 0;
  background: #ece8dd;
  border-radius: 8px;
  padding: 4px;
  gap: 2px;
}

.tab {
  border-radius: 7px;
  border-bottom: 0;
  padding: 10px 12px;
}

.tab.active {
  background: #fffdf7;
  color: #17201e;
  border-bottom: 0;
  box-shadow: 0 7px 18px rgba(28, 38, 31, 0.1);
}

.tab-panel {
  border-color: rgba(18, 25, 22, 0.1);
  background: #fffdf7;
}

.case-header,
.case-progress-grid {
  gap: 10px;
}

.case-header-cell,
.case-progress,
.case-progress-item,
.evidence-row,
.matrix-row,
.activity-row,
.request-row {
  background: rgba(255, 255, 255, 0.7);
}

.case-progress {
  background:
    linear-gradient(135deg, rgba(13, 138, 125, 0.07), rgba(255, 253, 247, 0.96));
}

.case-progress-item {
  border-color: rgba(18, 25, 22, 0.08);
}

.case-progress-item.is-done {
  background: linear-gradient(135deg, rgba(33, 134, 91, 0.12), #fffdf7);
}

.case-progress-item.is-open,
.case-progress-item.is-current {
  background: linear-gradient(135deg, rgba(225, 167, 45, 0.16), #fffdf7);
}

.case-progress-item.is-blocked {
  background: linear-gradient(135deg, rgba(207, 83, 69, 0.12), #fffdf7);
}

.empty-state {
  background:
    linear-gradient(135deg, #fffdf7, #f4f8f4);
}

.toast {
  background: #111813;
  border: 1px solid rgba(255, 211, 107, 0.22);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
    padding: 12px 14px;
    box-shadow: none;
  }

  .brand-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
  }

  .brand {
    font-size: 22px;
  }

  .brand-sub {
    display: block;
  }

  .nav-stack {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }

  .nav-item {
    width: 100%;
    min-width: 0;
    justify-content: center;
    padding: 10px 8px;
  }

  .nav-item span:not(.nav-step):not(.nav-count) {
    display: inline-block !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workspace-list,
  .user-block {
    display: none;
  }

  .topbar {
    grid-template-columns: minmax(240px, 1fr) minmax(250px, auto);
    min-height: 0;
    padding: 14px 16px;
    gap: 12px;
  }

  .workspace-title {
    min-width: 0;
  }

  .workspace-title h1,
  .workspace-title p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .tenant-select,
  .search-field {
    min-width: min(260px, 100%);
  }

  .content-grid {
    grid-template-columns: 1fr;
    padding: 14px;
    gap: 14px;
  }

  .panel-header {
    padding: 18px;
    margin-bottom: 12px;
  }

  .panel-header h2 {
    font-size: 25px;
  }

  .product-intro {
    padding: 12px 14px;
    margin-bottom: 12px;
  }

  .bid-room {
    position: static;
    max-height: none;
  }
}

@media (max-width: 680px) {
  .content-grid {
    padding: 12px;
    gap: 14px;
  }

  .sidebar {
    padding: 10px;
  }

  .brand-block {
    align-items: flex-start;
  }

  .brand-sub {
    font-size: 11px;
  }

  .nav-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-item {
    justify-content: flex-start;
  }

  .topbar {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .review-status {
    width: 100%;
  }

  .tenant-select,
  .search-field {
    min-width: 100%;
  }

  .panel-header {
    display: grid;
    padding: 16px;
  }

  .panel-header::after {
    width: 120px;
    height: 70px;
    opacity: 0.45;
  }

  .header-metrics {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .upload-panel,
  .tender-import-panel,
  .primary-action-panel {
    grid-template-columns: 1fr;
  }

  .product-intro strong {
    font-size: 16px;
  }

  .tender-row.tender-card {
    grid-template-columns: 1fr;
  }

  .case-card-meta {
    width: 100%;
  }

  .case-progress-grid,
  .case-header,
  .partner-cards {
    grid-template-columns: 1fr;
  }

  .tabs {
    overflow-x: auto;
  }
}

/* Product UI Design Foundation v1 - final override */
:root {
  --color-bg: #eef2f6;
  --color-bg-strong: #dfe6ee;
  --color-surface: #ffffff;
  --color-surface-muted: #f7f9fc;
  --color-sidebar: #111821;
  --color-sidebar-2: #1b2632;
  --color-text: #111827;
  --color-text-muted: #647184;
  --color-border: #d7dee8;
  --color-border-soft: #e8edf4;
  --color-primary: #2f6fed;
  --color-primary-dark: #1f4fb8;
  --color-accent: #c28b22;
  --color-success: #16835a;
  --color-success-soft: #e7f7ef;
  --color-warning: #b7791f;
  --color-warning-soft: #fff4d6;
  --color-danger: #c24136;
  --color-danger-soft: #fff0ed;
  --radius-card: 8px;
  --shadow-card: 0 18px 46px rgba(17, 24, 39, 0.12);
  --shadow-soft: 0 10px 26px rgba(17, 24, 39, 0.08);
  --ink: var(--color-text);
  --muted: var(--color-text-muted);
  --line: var(--color-border);
  --soft-line: var(--color-border-soft);
  --surface: var(--color-surface);
  --canvas: var(--color-bg);
  --nav: var(--color-sidebar);
  --nav-2: var(--color-sidebar-2);
  --gold: var(--color-accent);
  --gold-dark: #8f6417;
  --green: var(--color-success);
  --green-bg: var(--color-success-soft);
  --amber: var(--color-warning);
  --amber-bg: var(--color-warning-soft);
  --red: var(--color-danger);
  --red-bg: var(--color-danger-soft);
  --shadow: var(--shadow-card);
  --soft-shadow: var(--shadow-soft);
}

body:not(.public-mode) {
  background:
    radial-gradient(circle at 18% -10%, rgba(47, 111, 237, 0.16), transparent 32%),
    radial-gradient(circle at 92% 0%, rgba(194, 139, 34, 0.12), transparent 28%),
    linear-gradient(180deg, #f4f7fb 0%, var(--color-bg) 52%, #e8edf4 100%);
  color: var(--color-text);
}

.app-shell {
  grid-template-columns: 276px minmax(0, 1fr);
}

.sidebar {
  background:
    linear-gradient(145deg, rgba(47, 111, 237, 0.14), transparent 30%),
    linear-gradient(180deg, var(--color-sidebar) 0%, #16212d 56%, #0f151d 100%);
  box-shadow: 18px 0 54px rgba(15, 23, 42, 0.28);
}

.brand-block {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    linear-gradient(180deg, rgba(47, 111, 237, 0.12), transparent);
  border-color: rgba(255, 255, 255, 0.12);
}

.brand {
  color: #f7c35f;
}

.brand-sub,
.section-label,
.user-block span {
  color: #b9c7d8;
}

.nav-item {
  border-radius: var(--radius-card);
}

.nav-item.active {
  background: linear-gradient(135deg, #f5c861, var(--color-accent));
  box-shadow: 0 16px 34px rgba(194, 139, 34, 0.25);
}

.nav-item:not(.active) {
  background: rgba(255, 255, 255, 0.04);
}

.nav-step {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 850;
}

.topbar {
  min-height: 96px;
  grid-template-columns: minmax(250px, 0.9fr) minmax(210px, auto) minmax(0, 1.25fr);
  background: linear-gradient(135deg, #141d27 0%, #1d2b38 62%, #23384f 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.16);
}

.review-status {
  min-width: 0;
}

.review-status strong {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-actions {
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.building-icon {
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, #f7c35f, #56b7aa);
}

.demo-badge {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid rgba(247, 195, 95, 0.34);
  border-radius: var(--radius-card);
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: #ffe1a1;
  background: rgba(247, 195, 95, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.tenant-select,
.search-field {
  border-radius: var(--radius-card);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
}

.tenant-select {
  flex: 1 1 170px;
  min-width: 160px;
  max-width: 230px;
}

.role-switcher-top {
  flex: 0 1 170px;
  min-width: 150px;
}

.search-field {
  flex: 1 1 190px;
  min-width: 180px;
}

.search-field > span {
  color: #c7d3e2;
  font-size: 12px;
  font-weight: 750;
}

.content-grid {
  grid-template-columns: minmax(0, 1fr) minmax(400px, 36vw);
  gap: 18px;
  padding: 18px;
  min-height: calc(100vh - 96px);
}

.panel-header {
  background:
    linear-gradient(135deg, rgba(47, 111, 237, 0.96), rgba(20, 29, 39, 0.98) 52%, rgba(194, 139, 34, 0.9)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-card);
}

.header-metrics div {
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.13);
}

.product-intro {
  border-color: rgba(47, 111, 237, 0.22);
  background:
    linear-gradient(135deg, rgba(47, 111, 237, 0.09), rgba(255, 255, 255, 0.96) 42%),
    var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.product-intro::before {
  background:
    linear-gradient(90deg, var(--color-primary) 0 42%, transparent 42% 50%, #138f86 50% 70%, transparent 70% 78%, var(--color-accent) 78% 100%);
  opacity: 0.18;
}

.toolbar {
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.86);
  border-color: var(--color-border-soft);
  box-shadow: var(--shadow-soft);
}

.toolbar select,
.toolbar button,
.secondary-button,
.source-button,
.icon-button {
  border-radius: var(--radius-card);
  border-color: var(--color-border);
  background: var(--color-surface);
}

.primary-button {
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-color: var(--color-primary-dark);
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(47, 111, 237, 0.24);
}

.primary-button:disabled,
.secondary-button:disabled,
.source-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.upload-panel,
.tender-import-panel {
  border-radius: var(--radius-card);
  border-color: var(--color-border-soft);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.upload-panel {
  border-style: solid;
}

.tender-import-panel {
  background:
    linear-gradient(135deg, rgba(19, 143, 134, 0.08), rgba(255, 255, 255, 0.96) 48%),
    var(--color-surface);
  grid-template-columns: minmax(0, 1fr) 90px;
}

.tender-import-panel input[type="file"] {
  grid-column: 1 / -1;
}

.tender-import-panel .primary-button {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 170px;
}

input[type="file"]::file-selector-button {
  min-height: 32px;
  margin-right: 8px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: var(--color-surface-muted);
  color: var(--color-text);
  font-weight: 750;
}

.opportunity-table {
  background: transparent;
}

.tender-row.tender-card {
  border-color: rgba(17, 24, 39, 0.08);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.tender-row.tender-card:hover,
.tender-row.tender-card.active {
  border-color: rgba(47, 111, 237, 0.42);
  box-shadow: var(--shadow-card);
}

.tender-row.tender-card.active::after {
  content: "";
  position: absolute;
  inset: 10px 10px auto auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
}

.status-go {
  color: #0f6848;
  background: var(--color-success-soft);
}

.status-hold {
  color: #8a5a12;
  background: var(--color-warning-soft);
}

.status-no-go {
  color: #9f342b;
  background: var(--color-danger-soft);
}

.case-card-meta,
.workspace-status-card,
.case-header-cell,
.case-progress,
.case-progress-item,
.scenario-context,
.role-context {
  border-color: var(--color-border-soft);
  background: var(--color-surface-muted);
}

.partner-module {
  background: linear-gradient(135deg, #141d27, #223346);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-card);
}

.bid-room {
  top: 24px;
  max-height: calc(100vh - 48px);
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: var(--radius-card);
  background:
    linear-gradient(180deg, #141d27 0 108px, var(--color-surface) 108px, #f8fafc 100%);
  box-shadow: var(--shadow-card);
}

.selected-summary {
  border-color: rgba(47, 111, 237, 0.18);
  background:
    linear-gradient(135deg, rgba(47, 111, 237, 0.08), rgba(255, 255, 255, 0.96) 50%),
    var(--color-surface);
}

.primary-action-panel {
  border-color: rgba(47, 111, 237, 0.18);
  background:
    linear-gradient(135deg, rgba(47, 111, 237, 0.09), rgba(255, 255, 255, 0.96));
  box-shadow: var(--shadow-soft);
}

.primary-action-panel.has-blockers {
  border-color: rgba(183, 121, 31, 0.34);
  background:
    linear-gradient(135deg, rgba(183, 121, 31, 0.15), rgba(255, 255, 255, 0.96));
}

.primary-action-panel.is-clear {
  border-color: rgba(22, 131, 90, 0.26);
}

.primary-action-panel .primary-button {
  min-width: 190px;
}

.case-state-note {
  border-color: var(--color-border);
  background: var(--color-surface-muted);
}

.tabs {
  background: #e8edf4;
  border: 1px solid var(--color-border-soft);
}

.tab {
  color: var(--color-text-muted);
  font-weight: 700;
  flex: 1 1 auto;
  min-width: max-content;
  padding: 10px 9px;
  font-size: 12px;
}

.tab.active {
  color: var(--color-text);
  background: var(--color-surface);
}

.tab-panel {
  border-color: rgba(17, 24, 39, 0.08);
  background: var(--color-surface);
}

.email-status {
  border-radius: var(--radius-card);
  margin: 12px;
}

.extraction-mode {
  margin: 12px;
  border: 1px solid rgba(47, 111, 237, 0.18);
  border-radius: var(--radius-card);
  background: rgba(47, 111, 237, 0.07);
  color: var(--color-primary-dark);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
}

.email-status.ready {
  border-color: rgba(22, 131, 90, 0.26);
  background: var(--color-success-soft);
}

.email-status.pending {
  border-color: rgba(183, 121, 31, 0.28);
  background: var(--color-warning-soft);
}

.request-row {
  align-items: flex-start;
}

.request-actions {
  flex: 0 0 auto;
}

.empty-state {
  border-color: var(--color-border);
  background: var(--color-surface-muted);
}

.toast {
  background: #111827;
}

@media (max-width: 1280px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bid-room {
    position: static;
    max-height: none;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: minmax(240px, 1fr) minmax(260px, auto);
  }
}

@media (max-width: 760px) {
  body:not(.public-mode),
  .app-shell,
  .workspace {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .content-grid {
    padding: 12px;
    gap: 12px;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .panel-header,
  .selected-summary,
  .bid-room {
    padding: 16px;
  }

  .brand-sub {
    display: none;
  }

  .review-status {
    border-left: 0;
    padding-left: 0;
  }

  .review-status strong {
    max-width: none;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .demo-badge,
  .tenant-select,
  .search-field {
    max-width: none;
    min-width: 0;
    width: 100%;
  }

  .role-switcher-top {
    max-width: none;
    min-width: 0;
    width: 100%;
  }

  .header-metrics,
  .upload-panel,
  .tender-import-panel,
  .primary-action-panel,
  .request-row {
    grid-template-columns: 1fr;
  }
}
body.auth-required .app-shell {
  opacity: 0;
  filter: none;
  pointer-events: none;
  user-select: none;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(16, 24, 40, 0.86), rgba(4, 83, 115, 0.78)),
    radial-gradient(circle at 20% 20%, rgba(42, 157, 143, 0.34), transparent 34%);
}

.login-screen[hidden] {
  display: none;
}

.login-panel {
  width: min(440px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border-radius: 8px;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 24px 80px rgba(5, 17, 33, 0.28);
}

.login-brand {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 6px;
  background: #0d9488;
  color: #ffffff;
  font-weight: 800;
}

.login-panel h1 {
  margin: 0;
  font-size: 28px;
}

.login-panel p {
  margin: 0;
  color: #526071;
}

.login-panel label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.login-panel input {
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
}

.login-message {
  min-height: 20px;
  color: #b42318;
  font-weight: 700;
}

.auth-action {
  white-space: nowrap;
}

/* Staging UI/UX acceptance sprint v1 */
:root {
  --color-bg: #eef3f8;
  --color-bg-strong: #dfe8f1;
  --color-surface: #ffffff;
  --color-surface-muted: #f6f8fb;
  --color-sidebar: #0c1724;
  --color-sidebar-2: #142236;
  --color-text: #101828;
  --color-text-muted: #667085;
  --color-border: #d6dde8;
  --color-border-soft: #e7ecf3;
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-teal: #0f766e;
  --color-accent: #d6921e;
  --color-success: #16835a;
  --color-success-soft: #e7f7ef;
  --color-warning: #b7791f;
  --color-warning-soft: #fff5dd;
  --color-danger: #c24136;
  --color-danger-soft: #fff0ed;
  --radius-card: 8px;
  --shadow-card: 0 20px 48px rgba(15, 23, 42, 0.13);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
  --ink: var(--color-text);
  --muted: var(--color-text-muted);
  --line: var(--color-border);
  --soft-line: var(--color-border-soft);
  --surface: var(--color-surface);
  --canvas: var(--color-bg);
  --nav: var(--color-sidebar);
  --nav-2: var(--color-sidebar-2);
  --gold: var(--color-accent);
  --gold-dark: #9b6715;
  --teal: var(--color-teal);
  --teal-dark: #0b5f59;
  --green: var(--color-success);
  --green-bg: var(--color-success-soft);
  --amber: var(--color-warning);
  --amber-bg: var(--color-warning-soft);
  --red: var(--color-danger);
  --red-bg: var(--color-danger-soft);
  --shadow: var(--shadow-card);
  --soft-shadow: var(--shadow-soft);
}

body:not(.public-mode) {
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15, 118, 110, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, #eef4fb 0%, #f7f9fc 56%, #eaf1f4 100%);
  background-size: 30px 30px, 30px 30px, auto;
}

.sidebar {
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.2), transparent 30%),
    linear-gradient(180deg, #0a1320 0%, #132033 58%, #0b1421 100%);
}

.brand {
  color: #f8c35d;
}

.topbar {
  grid-template-columns: minmax(260px, 0.9fr) minmax(220px, auto) minmax(190px, auto) minmax(340px, 1.1fr);
  min-height: 104px;
  background: linear-gradient(135deg, #0f1b2b 0%, #172842 56%, #123f46 100%);
}

.workspace-title h1,
.bid-room h2,
.panel-header h2 {
  letter-spacing: 0;
}

.staging-notice {
  min-height: 40px;
  display: grid;
  gap: 2px;
  align-content: center;
  border: 1px solid rgba(248, 195, 93, 0.35);
  border-radius: 8px;
  background: rgba(248, 195, 93, 0.11);
  color: #ffe4aa;
  padding: 7px 11px;
}

.staging-notice strong {
  color: #fff6dd;
  font-size: 12px;
  line-height: 1.1;
}

.staging-notice span {
  color: #f7d79e;
  font-size: 11px;
  line-height: 1.2;
}

.review-status strong {
  max-width: 300px;
}

.top-actions {
  gap: 8px;
}

.top-actions .auth-action {
  min-width: 116px;
}

.search-field {
  flex: 1 1 210px;
}

.panel-header {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.94), rgba(15, 27, 43, 0.97) 48%, rgba(15, 118, 110, 0.9)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 16px);
}

.panel-header::after {
  border-color: rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0 22%, transparent 22% 29%, rgba(255, 255, 255, 0.1) 29% 68%, transparent 68%),
    linear-gradient(180deg, transparent 0 22%, rgba(255, 255, 255, 0.12) 22% 23%, transparent 23% 49%, rgba(255, 255, 255, 0.12) 49% 50%, transparent 50% 76%, rgba(255, 255, 255, 0.12) 76% 77%, transparent 77%);
}

.product-intro {
  border-color: rgba(37, 99, 235, 0.18);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.075), rgba(255, 255, 255, 0.98) 48%, rgba(15, 118, 110, 0.08)),
    #ffffff;
}

.product-intro::before {
  background:
    linear-gradient(90deg, var(--color-primary) 0 42%, transparent 42% 50%, var(--color-teal) 50% 72%, transparent 72% 79%, var(--color-accent) 79% 100%);
}

.toolbar,
.upload-panel,
.tender-import-panel,
.tender-row.tender-card,
.selected-summary,
.tab-panel {
  background: #ffffff;
}

.source-search-panel {
  border-color: rgba(37, 99, 235, 0.15);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), #ffffff 52%);
}

.source-search-header {
  grid-template-columns: minmax(0, 1fr) auto;
}

.source-search-header strong,
.tender-import-panel strong,
.upload-panel label span {
  color: var(--color-text);
}

.source-search-header .import-status {
  display: block;
  margin-top: 3px;
  color: var(--color-text-muted);
}

.tender-import-panel {
  grid-template-columns: minmax(0, 1fr) 120px;
}

.tender-row.tender-card {
  grid-template-columns: auto minmax(0, 1fr) repeat(3, minmax(112px, 0.24fr));
  align-items: stretch;
  border-color: rgba(15, 23, 42, 0.08);
}

.tender-row.tender-card:hover,
.tender-row.tender-card.active {
  border-color: rgba(37, 99, 235, 0.38);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.13);
}

.tender-row.tender-card.active::after {
  background: var(--color-primary);
}

.tender-title strong {
  color: var(--color-text);
  font-size: 15px;
}

.scenario-note {
  border-left-color: rgba(37, 99, 235, 0.42);
  color: #475467;
}

.case-card-meta {
  background: #f8fafc;
}

.bid-room {
  background:
    linear-gradient(180deg, #0f1b2b 0 112px, #ffffff 112px, #f6f8fb 100%);
}

.selected-summary {
  border-color: rgba(37, 99, 235, 0.15);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(255, 255, 255, 0.98) 48%, rgba(15, 118, 110, 0.06)),
    #ffffff;
}

.primary-action-panel {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.07), #ffffff);
}

.primary-action-panel.is-clear {
  border-color: rgba(22, 131, 90, 0.24);
  background: linear-gradient(135deg, rgba(22, 131, 90, 0.1), #ffffff);
}

.primary-action-panel.has-blockers {
  border-color: rgba(183, 121, 31, 0.3);
  background: linear-gradient(135deg, rgba(183, 121, 31, 0.14), #ffffff);
}

.primary-button {
  border-color: var(--color-primary-dark);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.partner-module {
  background: linear-gradient(135deg, #0f1b2b, #16333a);
}

.partner-cards {
  align-items: stretch;
}

.system-warning {
  display: grid;
  gap: 5px;
  grid-column: 1 / -1;
  border: 1px solid rgba(248, 195, 93, 0.32);
  border-radius: 8px;
  background: rgba(248, 195, 93, 0.12);
  color: #ffe6ac;
  padding: 12px;
}

.system-warning strong {
  color: #fff8e8;
  font-size: 13px;
}

.system-warning span {
  color: #f7d99f;
  font-size: 12px;
  line-height: 1.35;
}

.system-card-warning {
  border-color: rgba(248, 195, 93, 0.3);
  background: rgba(248, 195, 93, 0.14);
}

.production-gates-card {
  grid-column: 1 / -1;
  align-content: start;
  gap: 10px;
}

.production-gate-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.production-gate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.production-gate-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.production-gate-row strong {
  color: #fff8e8;
  font-size: 13px;
}

.production-gate-row small {
  color: #c8d6e5;
  font-size: 12px;
  line-height: 1.35;
}

.production-gate-row > span {
  min-width: 106px;
  border-radius: 999px;
  padding: 6px 9px;
  text-align: center;
  font-size: 11px;
  font-weight: 850;
}

.production-gate-row.gate-go > span {
  background: rgba(22, 131, 90, 0.22);
  color: #bbf7d0;
}

.production-gate-row.gate-partial > span {
  background: rgba(248, 195, 93, 0.2);
  color: #ffe3a3;
}

.production-gate-row.gate-blocked > span {
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
}

.empty-state {
  background: linear-gradient(135deg, #ffffff, #f6f8fb);
}

@media (max-width: 1280px) {
  .topbar {
    grid-template-columns: minmax(240px, 1fr) minmax(210px, auto);
  }

  .staging-notice,
  .top-actions {
    grid-column: 1 / -1;
  }

  .staging-notice {
    max-width: 420px;
  }

  .tender-row.tender-card {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .staging-notice {
    max-width: none;
  }

  .tender-row.tender-card {
    grid-template-columns: 1fr;
  }
}

/* Header metric fit fix */
.panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.header-metrics {
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  width: min(100%, 420px);
  max-width: 420px;
  gap: 7px;
  margin-top: 14px;
}

.header-metrics div {
  min-width: 0;
  padding: 9px;
}

.header-metrics strong {
  font-size: 22px;
}

.header-metrics span {
  font-size: 10px;
  line-height: 1.15;
}

/* Final IA cleanup override */
.brand-sub {
  line-height: 1.35;
  text-transform: none;
}

.nav-item {
  appearance: none;
  cursor: pointer;
  text-align: left;
}

.nav-item[hidden],
.opportunity-table[hidden],
.bid-room[hidden],
.toolbar[hidden],
.product-intro[hidden],
.home-overview[hidden],
.advanced-import[hidden] {
  display: none !important;
}

.workspace-title {
  gap: 0;
}

body:not(.case-view) .content-grid {
  grid-template-columns: minmax(0, 1180px);
  justify-content: center;
}

body.case-view .content-grid {
  grid-template-columns: minmax(520px, 1fr) minmax(430px, 36vw);
}

.product-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.product-intro::before,
.product-intro::after {
  display: none !important;
}

.start-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.home-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.home-card,
.view-panel {
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  padding: 18px;
}

.home-card span,
.view-panel span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-card strong,
.view-panel h3 {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.home-card p,
.view-panel p {
  margin: 10px 0 14px;
  color: #53605a;
  line-height: 1.45;
}

.profile-card { border-left: 4px solid var(--teal); }
.radar-card { border-left: 4px solid var(--gold); }
.search-card { border-left: 4px solid var(--color-primary); }
.task-card { border-left: 4px solid var(--color-primary); }

.view-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.profile-grid div {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.profile-grid strong,
.profile-grid span {
  display: block;
}

.profile-grid strong {
  color: var(--ink);
  font-size: 24px;
}

.profile-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: none;
}

.advanced-import {
  margin: 0 0 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.advanced-import summary {
  cursor: pointer;
  padding: 14px 16px;
  color: var(--ink);
  font-weight: 850;
}

.advanced-import .upload-panel,
.advanced-import .tender-import-panel {
  margin: 0 14px 14px;
  box-shadow: none;
}

.tender-row.tender-card {
  grid-template-columns: minmax(112px, auto) minmax(260px, 1fr) repeat(3, minmax(108px, 0.48fr));
  align-items: stretch;
  min-height: 104px;
  gap: 12px;
}

.status-pill {
  align-self: start;
  min-width: 0;
  max-width: 132px;
  white-space: normal;
  text-align: center;
  line-height: 1.15;
}

.case-card-meta {
  display: grid;
  align-content: center;
  min-width: 0;
}

.case-card-meta strong {
  overflow-wrap: anywhere;
}

.role-context {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.role-context span {
  color: var(--muted);
}

@media (max-width: 1180px) {
  body.case-view .content-grid,
  body:not(.case-view) .content-grid {
    grid-template-columns: 1fr;
  }

  .nav-stack {
    display: flex !important;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-item {
    flex: 0 0 auto;
    min-width: 124px;
    width: auto !important;
  }

  .product-intro {
    grid-template-columns: 1fr;
  }

  .start-actions {
    justify-content: flex-start;
  }

  .home-overview {
    grid-template-columns: 1fr;
  }

  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .start-actions,
  .start-actions button {
    width: 100%;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .tender-row.tender-card {
    grid-template-columns: 1fr;
  }

  .status-pill {
    max-width: none;
    justify-self: start;
  }
}

/* UI polish v5 */
.brand-block {
  padding: 16px 14px;
}

.brand-sub {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 750;
}

.nav-step {
  display: none !important;
}

.nav-stack {
  gap: 7px;
}

.nav-item {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  color: #dce6f2;
  box-shadow: none !important;
}

.nav-item span:not(.nav-count) {
  display: inline;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item.active {
  background: rgba(247, 195, 95, 0.13) !important;
  border-color: rgba(247, 195, 95, 0.34);
  color: #fff8e8;
}

.nav-item:not(.active) {
  background: rgba(255, 255, 255, 0.045) !important;
}

.nav-count {
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.12);
  color: #f8d58a;
  font-size: 12px;
  font-weight: 850;
}

.topbar {
  min-height: 72px;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
}

.workspace-title h1 {
  font-size: 24px;
  line-height: 1.05;
}

.workspace-title p {
  margin-top: 3px;
  font-size: 13px;
}

.review-status {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.review-status span {
  color: #9fb0c4;
  font-size: 10px;
}

.review-status strong {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff8e8;
  font-size: 12px;
  white-space: nowrap;
}

.staging-notice {
  width: auto;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border-color: rgba(247, 195, 95, 0.34);
  background: rgba(247, 195, 95, 0.11);
  box-shadow: none;
}

.staging-notice strong {
  color: #ffe6a9;
  font-size: 11px;
}

.staging-notice span {
  display: none;
}

.top-actions {
  gap: 8px;
}

.top-actions .auth-action {
  flex: 0 0 auto !important;
  justify-self: start;
  min-height: 32px;
  width: auto !important;
  max-width: 128px;
  padding: 0 12px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: #fff8e8;
  box-shadow: none;
  font-size: 12px;
}

.search-field[hidden],
.toolbar[hidden] {
  display: none !important;
}

.content-grid {
  min-height: calc(100vh - 72px);
}

.start-view .panel-header {
  min-height: 150px;
  padding: 26px;
}

.start-view .panel-header::after {
  opacity: 0.18;
}

.start-view .header-metrics {
  display: none !important;
}

.start-view .panel-header h2 {
  max-width: 720px;
  font-size: clamp(30px, 4vw, 48px);
}

.start-view .panel-header p {
  margin-top: 8px;
  font-size: 16px;
}

.product-intro {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  padding: 18px;
}

.product-intro strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}

.product-intro span {
  display: block;
  margin-top: 5px;
  color: #53605a;
  line-height: 1.45;
}

.home-card strong {
  font-size: 20px;
}

.home-card p {
  min-height: 62px;
}

.opportunity-table::before {
  content: "Aktuelle Auftragschancen";
  display: block;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.tender-row.tender-card {
  grid-template-columns: minmax(118px, auto) minmax(280px, 1fr) minmax(150px, 0.6fr) minmax(92px, 0.35fr) auto;
  min-height: 92px;
}

body.case-view .tender-row.tender-card {
  grid-template-columns: minmax(118px, auto) minmax(260px, 1fr) repeat(3, minmax(96px, 0.45fr)) auto;
}

.open-case-cta {
  align-self: center;
  justify-self: end;
  min-height: 34px;
  border: 1px solid rgba(47, 111, 237, 0.22);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--color-primary-dark);
  background: rgba(47, 111, 237, 0.07);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .staging-notice,
  .top-actions {
    grid-column: auto;
  }

  .review-status {
    justify-self: end;
  }

  .top-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .nav-item {
    min-width: max-content;
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr;
    padding: 12px 16px;
  }

  .review-status,
  .top-actions {
    justify-self: stretch;
  }

  .review-status strong {
    white-space: normal;
  }

  .top-actions .auth-action {
    width: auto !important;
  }

  .start-view .panel-header {
    min-height: 128px;
    padding: 22px 18px;
  }

  .start-view .panel-header h2 {
    font-size: 32px;
  }

  .tender-row.tender-card,
  body.case-view .tender-row.tender-card {
    grid-template-columns: 1fr;
  }

  .open-case-cta {
    justify-self: start;
  }
}

/* Initial render gate v10 */
body.app-loading {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% -10%, rgba(47, 111, 237, 0.16), transparent 32%),
    radial-gradient(circle at 92% 0%, rgba(194, 139, 34, 0.12), transparent 28%),
    linear-gradient(180deg, #f4f7fb 0%, #eef2f6 52%, #e8edf4 100%);
}

body.app-loading .app-shell,
body.app-loading .toast,
body.app-loading .modal-backdrop {
  opacity: 0;
  pointer-events: none;
}

.app-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(8, 23, 38, 0.96), rgba(17, 31, 47, 0.94)),
    radial-gradient(circle at 28% 18%, rgba(47, 111, 237, 0.22), transparent 28%),
    radial-gradient(circle at 74% 78%, rgba(19, 143, 134, 0.2), transparent 30%);
}

body:not(.app-loading) .app-loading-screen,
body.public-mode .app-loading-screen {
  display: none;
}

.loading-card {
  width: min(440px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  box-shadow: 0 28px 90px rgba(5, 17, 33, 0.34);
}

.loading-brand {
  width: fit-content;
  border-radius: 6px;
  padding: 6px 10px;
  background: #111827;
  color: #f8c65d;
  font-size: 18px;
  font-weight: 950;
}

.loading-card h1 {
  margin: 4px 0 0;
  color: #121824;
  font-size: clamp(24px, 6vw, 32px);
  line-height: 1.12;
}

.loading-card p {
  margin: 0;
  color: #5b6677;
  font-size: 14px;
  line-height: 1.45;
}

.loading-bar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e6ebf2;
}

.loading-bar span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f6fed, #138f86);
  animation: loadingBar 1.1s ease-in-out infinite alternate;
}

@keyframes loadingBar {
  from {
    transform: translateX(-18%);
  }

  to {
    transform: translateX(154%);
  }
}

/* Area differentiation v11 */
body.evidence-view .header-metrics,
body.bidpacks-view .header-metrics {
  display: none !important;
}

body.evidence-view .panel-header {
  background:
    linear-gradient(135deg, rgba(13, 99, 94, 0.98), rgba(17, 24, 39, 0.98) 58%, rgba(47, 111, 237, 0.82)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
}

body.bidpacks-view .panel-header {
  background:
    linear-gradient(135deg, rgba(34, 49, 82, 0.98), rgba(18, 24, 36, 0.98) 58%, rgba(194, 139, 34, 0.88)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
}

.evidence-library-shell,
.bidpack-pipeline-shell {
  display: grid;
  gap: 16px;
}

.evidence-hero,
.pipeline-hero {
  min-width: 0;
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 24px;
  color: #f8fbff;
  box-shadow: var(--shadow-soft);
}

.evidence-hero {
  background: linear-gradient(135deg, #0d635e, #142236 64%, #25456f);
}

.pipeline-hero {
  background: linear-gradient(135deg, #19243a, #102438 58%, #7b5419);
}

.evidence-hero span,
.pipeline-hero span,
.board-intro span {
  color: #c9d7e8;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.evidence-hero h3,
.pipeline-hero h3 {
  margin: 8px 0 8px;
  color: #ffffff;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.1;
}

.evidence-hero p,
.pipeline-hero p {
  max-width: 680px;
  margin: 0;
  color: #d9e4f2;
  line-height: 1.45;
}

.evidence-hero > strong,
.pipeline-hero > strong {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff8e8;
  font-size: 13px;
  white-space: nowrap;
}

.evidence-status-grid,
.pipeline-stage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.evidence-status-grid div,
.pipeline-stage-card {
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.evidence-status-grid span,
.pipeline-stage-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.evidence-status-grid strong,
.pipeline-stage-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.evidence-status-grid small,
.pipeline-stage-card small {
  display: block;
  margin-top: 8px;
  color: #5b6677;
  line-height: 1.35;
}

.pipeline-stage-card.stage-review {
  border-left: 4px solid var(--gold);
}

.pipeline-stage-card.stage-approved {
  border-left: 4px solid var(--green);
}

.pipeline-stage-card.stage-stale {
  border-left: 4px solid var(--red);
}

.pipeline-stage-card.stage-draft {
  border-left: 4px solid var(--color-primary);
}

.library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.evidence-group-grid,
.bidpack-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.evidence-type-column,
.bidpack-card {
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.evidence-type-column h4,
.bidpack-card h4 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.evidence-mini-card {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  padding: 12px;
  background: #f8fafc;
}

.evidence-mini-card strong {
  min-width: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.evidence-mini-card small {
  color: #5b6677;
  line-height: 1.35;
}

.evidence-mini-card .small-pill {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
}

.evidence-mini-card.is-missing {
  background: #fff8ec;
}

.bidpack-card {
  gap: 14px;
}

.bidpack-card p {
  margin: 8px 0 0;
  color: #5b6677;
}

.bidpack-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.bidpack-card dl div {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.bidpack-card dt,
.bidpack-card dd {
  margin: 0;
}

.bidpack-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.bidpack-card dd {
  margin-top: 4px;
  color: var(--ink);
  font-weight: 850;
}

.opportunity-board {
  display: grid;
  gap: 14px;
}

.board-intro {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.5fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.board-intro strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
}

.board-intro p {
  margin: 0;
  color: #5b6677;
  line-height: 1.4;
}

.opportunity-group {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.opportunity-group summary {
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(130px, auto);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  list-style: none;
}

.opportunity-group summary::-webkit-details-marker {
  display: none;
}

.opportunity-group summary span {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.opportunity-group summary strong {
  min-width: 32px;
  border-radius: 999px;
  padding: 5px 10px;
  text-align: center;
  color: #ffffff;
  background: var(--color-primary);
}

.opportunity-group summary small {
  color: var(--muted);
  text-align: right;
}

.opportunity-card-list {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.opportunity-card {
  appearance: none;
  cursor: pointer;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(112px, auto) minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  width: 100%;
  padding: 14px;
  background: #f8fafc;
  color: inherit;
  text-align: left;
}

.opportunity-card.active {
  border-color: rgba(47, 111, 237, 0.42);
  background: #f4f8ff;
}

.opportunity-card > strong {
  min-width: 0;
  color: var(--ink);
  font-size: 17px;
  overflow-wrap: anywhere;
}

.opportunity-card > small {
  grid-column: 2;
  color: #5b6677;
}

.opportunity-card-footer,
.opportunity-next {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #5b6677;
  font-size: 12px;
}

.opportunity-next {
  grid-column: 2 / 4;
  align-items: center;
}

.opportunity-next span {
  color: var(--muted);
  font-weight: 850;
  text-transform: uppercase;
}

.opportunity-next strong {
  color: var(--ink);
}

.opportunity-card .open-case-cta {
  grid-row: 1 / span 2;
  grid-column: 3;
}

@media (max-width: 980px) {
  .evidence-hero,
  .pipeline-hero,
  .board-intro {
    grid-template-columns: 1fr;
  }

  .evidence-hero > strong,
  .pipeline-hero > strong {
    width: fit-content;
    white-space: normal;
  }

  .evidence-status-grid,
  .pipeline-stage-grid,
  .evidence-group-grid,
  .bidpack-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .opportunity-group summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .opportunity-group summary small {
    grid-column: 1 / -1;
    text-align: left;
  }

  .opportunity-card {
    grid-template-columns: 1fr;
  }

  .opportunity-card > small,
  .opportunity-next,
  .opportunity-card .open-case-cta {
    grid-column: 1;
  }

  .opportunity-card .open-case-cta {
    grid-row: auto;
    justify-self: start;
  }

  .evidence-mini-card {
    grid-template-columns: 1fr;
  }

  .evidence-mini-card .small-pill {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}

/* Product UI repair v12 */
body:not(.case-view) .content-grid {
  grid-template-columns: minmax(0, min(1360px, calc(100vw - 32px)));
}

body:not(.case-view) .radar-panel {
  width: 100%;
}

.product-intro {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px 18px;
}

.product-intro strong {
  font-size: 18px;
}

.product-intro span {
  max-width: 560px;
}

.start-view .home-overview {
  margin-top: 0;
}

.start-view .home-card {
  padding: 16px;
}

.start-view .home-card p {
  display: none;
}

.start-view .product-intro > div:first-child {
  display: none;
}

.start-view .product-intro {
  grid-template-columns: 1fr;
}

.start-view .start-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.7fr) minmax(150px, 0.5fr);
  justify-content: stretch;
}

.start-view .start-actions button {
  width: 100%;
  justify-content: center;
}

.evidence-workspace {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.evidence-status-panel,
.evidence-main-panel,
.evidence-missing-panel,
.pipeline-column {
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.evidence-status-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.evidence-status-panel div {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.evidence-status-panel span,
.surface-title span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.evidence-status-panel strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.evidence-status-panel small {
  display: block;
  margin-top: 5px;
  color: #5b6677;
}

.evidence-main-panel,
.evidence-missing-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.surface-title strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.evidence-type-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.evidence-type-strip span {
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.evidence-document-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.evidence-mini-card {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.evidence-mini-card .small-pill {
  grid-column: 1;
  grid-row: auto;
  justify-self: start;
}

.evidence-mini-card strong,
.evidence-mini-card small,
.bidpack-card h4,
.bidpack-card p,
.opportunity-card strong,
.opportunity-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  align-items: start;
}

.pipeline-column {
  overflow: hidden;
}

.pipeline-column header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding: 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--soft-line);
}

.pipeline-column header span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.pipeline-column header strong {
  min-width: 30px;
  border-radius: 999px;
  padding: 5px 9px;
  text-align: center;
  color: #ffffff;
  background: var(--color-primary);
}

.pipeline-column header small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.pipeline-column.stage-approved header strong {
  background: var(--green);
}

.pipeline-column.stage-review header strong,
.pipeline-column.stage-stale header strong {
  background: var(--gold);
}

.pipeline-card-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.pipeline-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px 12px;
  text-align: center;
  color: var(--muted);
  background: #fbfcfe;
  font-size: 13px;
  font-weight: 800;
}

.pipeline-column .bidpack-card {
  box-shadow: none;
  padding: 14px;
}

.pipeline-column .bidpack-card dl {
  grid-template-columns: 1fr;
}

.pipeline-column .bidpack-card .source-button {
  width: 100%;
  justify-content: center;
}

.opportunity-card-list {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.opportunity-card {
  grid-template-columns: 1fr;
  align-content: start;
  gap: 9px;
}

.opportunity-card > small,
.opportunity-next,
.opportunity-card .open-case-cta {
  grid-column: 1;
}

.opportunity-card .open-case-cta {
  grid-row: auto;
  justify-self: start;
}

.opportunity-card-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.opportunity-next {
  border-top: 1px solid var(--soft-line);
  padding-top: 9px;
}

.opportunity-board .status-pill {
  max-width: none;
  justify-self: start;
}

@media (max-width: 1180px) {
  .evidence-workspace {
    grid-template-columns: 1fr;
  }

  .pipeline-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body:not(.case-view) .content-grid {
    grid-template-columns: 1fr;
  }

  .product-intro {
    grid-template-columns: 1fr;
  }

  .start-view .start-actions {
    grid-template-columns: 1fr;
  }

  .pipeline-board,
  .evidence-document-list {
    grid-template-columns: 1fr;
  }

  .opportunity-card-footer {
    grid-template-columns: 1fr;
  }
}

/* Start search focus v18 */
.profile-nav-item {
  margin-top: 8px;
}

.start-view .panel-header {
  background:
    linear-gradient(135deg, rgba(13, 99, 94, 0.98), rgba(17, 24, 39, 0.98) 56%, rgba(47, 111, 237, 0.86)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
}

.start-view .home-overview {
  grid-template-columns: 1.05fr 1.12fr 0.88fr;
  gap: 16px;
}

.start-view .home-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 176px;
}

.start-view .home-card p {
  display: block;
  margin: 0;
  min-height: 42px;
  font-size: 13px;
}

.start-view .home-card button {
  align-self: end;
  width: 100%;
  justify-content: center;
}

.start-view .search-card {
  border-color: rgba(47, 111, 237, 0.2);
  background:
    linear-gradient(135deg, rgba(47, 111, 237, 0.1), rgba(19, 143, 134, 0.08)),
    #ffffff;
}

.start-view .search-card strong {
  color: #12315f;
}

.start-view .profile-card {
  justify-self: stretch;
}

.app-loading-screen {
  background:
    linear-gradient(135deg, rgba(13, 28, 43, 0.98), rgba(21, 36, 51, 0.96));
}

.loading-card {
  width: min(420px, 100%);
  gap: 12px;
  padding: 24px;
}

.loading-card h1 {
  font-size: clamp(22px, 4vw, 28px);
}

@media (max-width: 1180px) {
  .profile-nav-item {
    margin-top: 0;
  }

  .start-view .home-overview {
    grid-template-columns: 1fr;
  }

  .start-view .home-card {
    min-height: 0;
  }
}
