/*
 * Tender workspace.
 *
 * Urgency is carried by the deadline column, not by colouring whole rows.
 * A wall of red stops meaning anything, so only the dates change tone.
 */

.tw-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.tw-counts { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.tw-count { font-size: 0.88rem; color: var(--corevex-muted, #6b7a90); }
.tw-count strong { font-size: 1.15rem; color: var(--corevex-text, #16233a); margin-right: 4px; }
.tw-count-urgent strong { color: #b4441f; }

.tw-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }

.tw-chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--corevex-muted, #6b7a90);
  background: var(--corevex-surface, rgba(255,255,255,0.7));
  border: 1px solid var(--corevex-border, rgba(16,35,63,0.12));
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.tw-chip:hover { border-color: var(--corevex-accent); color: var(--corevex-text, #16233a); }
.tw-chip.is-on {
  color: #fff;
  background: var(--corevex-accent);
  border-color: var(--corevex-accent);
}

.tw-search { max-width: 320px; flex: 1 1 220px; }

.tw-table { width: 100%; }
.tw-table td { vertical-align: top; padding-top: 12px; padding-bottom: 12px; }

.tw-title {
  display: block;
  font-weight: 600;
  line-height: 1.35;
  color: var(--corevex-text, #16233a);
}

.tw-sub, .tw-note, .tw-muted {
  display: block;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--corevex-muted, #6b7a90);
}
.tw-note { margin-top: 3px; font-style: italic; }

.tw-deadline { display: flex; flex-direction: column; gap: 1px; font-size: 0.8rem; }
.tw-deadline-label { font-weight: 600; }
.tw-deadline-date { color: var(--corevex-muted, #6b7a90); }
.tw-deadline-days { font-weight: 700; }

.tw-ok   .tw-deadline-days { color: #1c7a4a; }
.tw-soon .tw-deadline-label,
.tw-soon .tw-deadline-days { color: #b4441f; }
.tw-gone .tw-deadline-label,
.tw-gone .tw-deadline-date,
.tw-gone .tw-deadline-days { color: #93a0b1; }

.tw-score { font-weight: 700; font-variant-numeric: tabular-nums; }

.tw-docs { font-size: 0.78rem; color: var(--corevex-muted, #6b7a90); }
.tw-docs-on { color: #1c7a4a; font-weight: 600; }

.tw-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  background: var(--corevex-surface-muted, #eef2f8);
  color: var(--corevex-muted, #6b7a90);
}
.tw-status-new { background: var(--corevex-accent-soft); color: var(--corevex-accent-ink); }
.tw-status-preparing,
.tw-status-reviewing { background: rgba(180, 68, 31, 0.14); color: #8a3417; }
.tw-status-submitted { background: rgba(28, 122, 74, 0.14); color: #16603a; }
.tw-status-kept-for-intelligence { background: rgba(16, 35, 63, 0.08); color: #4a5a70; }

.tw-empty { padding: 32px 0; text-align: center; color: var(--corevex-muted, #6b7a90); }

@media (max-width: 820px) {
  .tw-filters { margin-left: 0; }
  .tw-table thead { display: none; }
  .tw-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--corevex-border, rgba(16,35,63,0.10)); }
  .tw-table td { display: block; padding: 3px 0; }
}