/* src/styles.css */
:root {
  font-family:
    Inter,
    "Noto Sans TC",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #1f2933;
  background: #f4f6f8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
.button-link {
  align-items: center;
  background: #ffffff;
  border: 1px solid #c8d1da;
  border-radius: 6px;
  color: #1f2933;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  text-decoration: none;
}
input,
select,
textarea {
  border: 1px solid #c8d1da;
  border-radius: 6px;
  font: inherit;
  min-height: 36px;
  padding: 8px 10px;
  width: 100%;
}
textarea {
  resize: vertical;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.primary {
  background: #146c75;
  border-color: #146c75;
  color: #fff;
}
.page-nav.active {
  background: #eef7f6;
  border-color: #7db8b3;
  color: #146c75;
}
main {
  min-height: 100vh;
}
.loading {
  display: grid;
  place-items: center;
}
.sticky-workflow-header {
  background: #f4f6f8;
  box-shadow: 0 8px 18px rgb(15 23 42 / 0.08);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #d9e0e7;
  display: flex;
  justify-content: space-between;
  padding: 20px 28px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 26px;
}
h2 {
  font-size: 22px;
}
h3 {
  font-size: 18px;
}
p,
small,
label {
  color: #607080;
}
strong,
small {
  display: block;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.action-finder {
  flex: 1 1 280px;
  min-width: min(320px, 40vw);
  position: relative;
}
.action-finder input {
  background: #ffffff;
  min-height: 38px;
}
.action-finder-menu {
  background: #ffffff;
  border: 1px solid #c8d1da;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgb(15 23 42 / 0.18);
  display: grid;
  gap: 6px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(440px, calc(100vw - 56px));
  z-index: 80;
}
.action-command {
  align-items: center;
  border-color: #e0e6ec;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-items: start;
  min-height: 64px;
  text-align: left;
  width: 100%;
}
.action-command.active,
.action-command:hover:not(:disabled) {
  background: #eef7f6;
  border-color: #7db8b3;
}
.action-command:disabled {
  background: #f7fafc;
  color: #3b4a59;
  opacity: 1;
}
.action-command small {
  font-size: 12px;
  line-height: 1.35;
}
.command-state {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 8px;
  white-space: nowrap;
}
.command-state.ready {
  background: #dff3e9;
  color: #1f6f4a;
}
.command-state.blocked {
  background: #ffe2df;
  color: #9f2d20;
}
.action-finder-empty {
  color: #607080;
  font-size: 13px;
  font-weight: 800;
  padding: 12px;
}
.notice {
  background: #fff7d6;
  border-bottom: 1px solid #e3c75f;
  padding: 10px 28px;
}
.compact-notice {
  border: 1px solid #e3c75f;
  border-radius: 6px;
  padding: 10px;
}
.login-page {
  align-items: center;
  background: #f4f6f8;
  display: grid;
  min-height: 100vh;
  padding: 28px;
}
.login-panel {
  background: #ffffff;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  display: grid;
  gap: 18px;
  justify-self: center;
  max-width: 420px;
  padding: 28px;
  width: 100%;
}
.login-form {
  display: grid;
  gap: 12px;
}
.login-form label,
.admin-user-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
}
.user-chip {
  align-items: center;
  border: 1px solid #d9e0e7;
  border-radius: 6px;
  display: inline-flex;
  gap: 8px;
  min-height: 38px;
  padding: 4px 4px 4px 10px;
}
.user-chip span {
  color: #344455;
  font-size: 13px;
  font-weight: 800;
}
.workflow-nav {
  background: #ffffff;
  border-bottom: 1px solid #d9e0e7;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 12px 28px;
}
.workflow-step {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(0, 1fr);
  justify-content: start;
  min-height: 74px;
  padding: 10px;
  text-align: left;
  width: 100%;
}
.workflow-step:hover {
  border-color: #7db8b3;
}
.workflow-step.disabled {
  background: #f7fafc;
}
.workflow-step-number {
  align-items: center;
  background: #146c75;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}
.workflow-step small {
  font-size: 12px;
  line-height: 1.35;
  margin-top: 3px;
}
.layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 28px 28px;
}
.workflow-page,
.sources-page,
.admin-page {
  grid-template-columns: minmax(0, 1fr);
}
.workflow-page .management-sidebar,
.workflow-page .vendor-profile-block,
.workflow-page .document-library-block,
.vendors-page .source-management-section,
.vendors-page .summary,
.vendors-page .kpis,
.vendors-page #workflow-matches,
.vendors-page .workflow-stage,
.vendors-page .workflow-stage-block,
.sources-page .vendor-management-section,
.sources-page .workspace,
.admin-page .management-sidebar,
.admin-page .summary,
.admin-page .kpis,
.admin-page .vendor-profile-block,
.admin-page .workflow-main-grid,
.admin-page .workflow-stage,
.admin-page .workflow-stage-block {
  display: none;
}
.workflow-page .workflow-main-grid,
.vendors-page .workflow-main-grid {
  grid-template-columns: minmax(0, 1fr);
}
.sources-page .management-sidebar {
  min-height: auto;
}
.sources-page .source-management-section {
  max-width: 980px;
}
.admin-console {
  display: grid;
  gap: 18px;
}
.admin-user-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  margin-top: 14px;
}
.admin-user-list,
.audit-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.admin-user-row,
.audit-row {
  align-items: center;
  border: 1px solid #e0e6ec;
  border-radius: 6px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  padding: 12px;
}
.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.audit-row small,
.admin-user-row small {
  overflow-wrap: anywhere;
}
aside,
.block,
.summary {
  background: #ffffff;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
}
aside {
  min-height: calc(100vh - 140px);
  padding: 16px;
}
.panel-title {
  color: #3b4a59;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 12px;
}
.spaced {
  margin-top: 22px;
}
.panel-heading {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 260px);
  margin-bottom: 14px;
}
.compact-heading {
  grid-template-columns: minmax(0, 1fr) auto;
}
.panel-heading .panel-title {
  margin-bottom: 4px;
}
.collapsible-heading {
  align-items: center;
}
.collapse-side {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 1fr) auto;
}
.completeness-meter {
  background: #e8edf2;
  border-radius: 999px;
  height: 10px;
  margin-top: 10px;
  overflow: hidden;
}
.completeness-meter span {
  background: #146c75;
  display: block;
  height: 100%;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.profile-field {
  background: #f7fafc;
  border: 1px solid #e0e6ec;
  border-radius: 6px;
  min-width: 0;
  padding: 10px;
}
.profile-field.wide {
  grid-column: 1 / -1;
}
.profile-field strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.vendor-card {
  background: #eef2f5;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
}
.vendor-card-actions {
  display: grid;
  gap: 8px;
}
.vendor-card-actions button {
  justify-content: center;
}
.danger-button {
  border-color: #d28f8f;
  color: #9f2d2d;
  justify-content: center;
}
.danger-button:hover:not(:disabled) {
  background: #fff3f3;
  border-color: #c86f6f;
}
.danger-button.compact {
  min-height: 34px;
  padding: 6px 9px;
}
.add-vendor-button {
  justify-content: center;
  margin-bottom: 10px;
  width: 100%;
}
.vendor-form {
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
}
.vendor-form label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
}
.input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.registry-card {
  background: #eef7f6;
  border: 1px solid #9bcfca;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 10px;
}
.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.keyword {
  background: #e8f4f3;
  color: #146c75;
}
.tax-id {
  background: #fff;
  border: 1px solid #c8d1da;
  border-radius: 6px;
  font-size: 18px;
  padding: 9px 10px;
}
.folder-path {
  background: #ffffff;
  border: 1px solid #d9e0e7;
  border-radius: 6px;
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding: 8px;
}
.folder-path.compact {
  margin-top: 10px;
}
.folder-path span {
  color: #607080;
  font-size: 12px;
  font-weight: 700;
}
.folder-path code {
  color: #26323d;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.list,
.source-list,
.compact-list,
.projects,
.table,
.match-list,
.record-list {
  display: grid;
  gap: 10px;
}
.row,
.match-row {
  align-items: center;
  border-color: #e0e6ec;
  display: grid;
  justify-items: start;
  text-align: left;
  width: 100%;
}
.match-row {
  border: 1px solid #e0e6ec;
  border-radius: 6px;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 62px;
  padding: 8px;
}
.row.active,
.match-row.active {
  background: #e8f4f3;
  border-color: #7db8b3;
}
.vendor-row {
  align-items: stretch;
  border: 1px solid #e0e6ec;
  border-radius: 6px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 6px;
}
.vendor-row.active {
  background: #e8f4f3;
  border-color: #7db8b3;
}
.vendor-row-select {
  background: transparent;
  border: 0;
  display: grid;
  gap: 2px;
  justify-items: start;
  min-height: 44px;
  min-width: 0;
  padding: 4px;
  text-align: left;
  width: 100%;
}
.vendor-row-select span,
.vendor-row-select small {
  overflow-wrap: anywhere;
}
.region-filter {
  background: #f7fafc;
  border: 1px solid #e0e6ec;
  border-radius: 6px;
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
}
.region-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.region-option {
  align-items: center;
  background: #ffffff;
  border: 1px solid #c8d1da;
  border-radius: 999px;
  color: #344455;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
}
.region-option.active {
  background: #e8f4f3;
  border-color: #7db8b3;
  color: #146c75;
}
.region-option input {
  min-height: auto;
  width: auto;
}
.match-summary-button {
  background: transparent;
  border: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-items: start;
  min-height: 44px;
  padding: 4px;
  text-align: left;
  width: 100%;
}
.source-link {
  white-space: nowrap;
}
.source-url-inline {
  color: #146c75;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-decoration: underline;
}
.source-url-action {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 4px;
  width: 100%;
}
.source-url-action .source-url-inline {
  min-width: 0;
}
.source-url-action .danger-button {
  justify-self: end;
}
.page-indicator {
  align-self: center;
  color: #607080;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.pagination {
  align-items: center;
  border-top: 1px solid #e0e6ec;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 12px;
}
.pagination span {
  color: #3b4a59;
  font-size: 13px;
  font-weight: 800;
}
.source-row {
  border: 1px solid #e0e6ec;
  border-radius: 6px;
  padding: 10px;
}
.danger-button {
  border-color: #e6b6b1;
  color: #a7352b;
}
.danger-button:hover:not(:disabled) {
  background: #fff0ee;
  border-color: #d9867d;
}
.danger-button.compact {
  min-height: 34px;
  padding: 6px 10px;
  white-space: nowrap;
}
.workspace {
  display: grid;
  gap: 20px;
}
.workflow-stage,
.workflow-stage-block,
#workflow-matches {
  scroll-margin-top: 210px;
}
.workflow-stage {
  display: grid;
  gap: 14px;
}
.workflow-stage-heading {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px;
}
.step-eyebrow {
  color: #146c75;
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 4px;
}
.completion-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.summary {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 18px;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.metric {
  background: #ffffff;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  padding: 12px;
}
.metric strong {
  font-size: 20px;
  margin-top: 4px;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 20px;
}
.block {
  padding: 16px;
}
.empty {
  border: 1px dashed #bdc8d2;
  border-radius: 6px;
  color: #607080;
  padding: 18px;
}
.action-empty {
  display: grid;
  gap: 10px;
  justify-items: start;
}
.table-row,
.compact-row,
.document-row,
.project,
.upload-line,
.tender-detail,
.analysis-result,
.record-row {
  align-items: center;
  border: 1px solid #e0e6ec;
  border-radius: 6px;
  display: grid;
  gap: 12px;
  padding: 12px;
}
.table-row,
.compact-row {
  grid-template-columns: minmax(0, 1fr) auto;
}
.document-row {
  grid-template-columns: auto 70px minmax(0, 1fr) auto auto auto;
}
.document-row.selected-for-print {
  background: #eef7f6;
  border-color: #7db8b3;
}
.document-library-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.document-thumbnail {
  border: 0;
  min-height: 0;
  padding: 0;
}
.thumbnail-card {
  align-items: center;
  border: 1px solid #c8d1da;
  border-radius: 6px;
  display: grid;
  height: 58px;
  justify-items: center;
  width: 58px;
}
.thumbnail-card.ready {
  background: #eef7f6;
  border-color: #7db8b3;
}
.thumbnail-card.missing-file {
  background: #f7fafc;
  border-style: dashed;
}
.thumbnail-card span {
  color: #1f2933;
  font-size: 14px;
  font-weight: 900;
}
.thumbnail-card small {
  font-size: 10px;
}
.document-main {
  min-width: 0;
}
.document-state-line {
  color: #607080;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.document-state-line span {
  font-size: 12px;
  font-weight: 800;
}
.document-detail-line {
  color: #526475;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 2px;
}
.document-main code {
  color: #526475;
  display: block;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  font-size: 11px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.print-toggle {
  align-items: center;
  color: #3b4a59;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
  white-space: nowrap;
}
.print-toggle input {
  min-height: auto;
  width: auto;
}
.upload-button {
  min-height: 34px;
  white-space: nowrap;
}
.modal-backdrop {
  align-items: center;
  background: rgb(15 23 42 / 0.46);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 100;
}
.preview-modal {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgb(15 23 42 / 0.28);
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 28px);
  max-width: 1180px;
  padding: 18px;
  position: relative;
  width: min(1180px, calc(100vw - 28px));
}
.tender-card-modal {
  max-width: 1080px;
  width: min(1080px, calc(100vw - 28px));
}
.modal-close-button {
  border-radius: 6px;
  font-size: 18px;
  height: 42px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 16px;
  top: 14px;
  width: 42px;
  z-index: 2;
}
.tender-card-body {
  display: grid;
  gap: 12px;
  max-height: 68vh;
  overflow: auto;
  padding-right: 4px;
}
.tender-detail-group {
  border: 1px solid #e0e6ec;
  border-radius: 6px;
  padding: 12px;
}
.tender-detail-group h4 {
  font-size: 15px;
  margin: 0 0 10px;
}
.tender-detail-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tender-detail-group.long-text .tender-detail-grid {
  grid-template-columns: 1fr;
}
.tender-detail-field {
  background: #f7fafc;
  border: 1px solid #e0e6ec;
  border-radius: 6px;
  padding: 9px 10px;
}
.tender-detail-field span {
  color: #607080;
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}
.tender-detail-field strong {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.preview-header {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
  padding-right: 54px;
}
.preview-header code {
  color: #526475;
  display: block;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  font-size: 12px;
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.preview-body {
  background: #f7fafc;
  border: 1px solid #e0e6ec;
  border-radius: 6px;
  max-height: 76vh;
  min-height: 520px;
  overflow: auto;
  padding: 12px;
}
.preview-body img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}
.preview-body pre {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  font-size: 12px;
  margin: 0;
  white-space: pre-wrap;
}
.pdf-preview {
  display: grid;
  gap: 10px;
}
.pdf-canvas-wrap {
  align-items: start;
  background: #eef2f6;
  border: 1px solid #d7e0e8;
  border-radius: 6px;
  display: grid;
  justify-items: center;
  min-height: 620px;
  overflow: auto;
  padding: 12px;
  position: relative;
}
.pdf-canvas-wrap canvas {
  background: white;
  box-shadow: 0 10px 26px rgb(15 23 42 / 0.18);
}
.pdf-preview-status {
  background: rgb(255 255 255 / 0.92);
  border: 1px solid #d7e0e8;
  border-radius: 6px;
  color: #526475;
  font-weight: 700;
  left: 50%;
  padding: 10px 14px;
  position: absolute;
  top: 20px;
  transform: translateX(-50%);
  z-index: 1;
}
.preview-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.project,
.upload-line,
.tender-detail,
.analysis-result,
.record-row {
  grid-template-columns: minmax(0, 1fr) auto;
}
.analysis-result {
  align-items: start;
  background: #f7fafc;
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 12px;
}
.project-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}
.quotation-controls {
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
  padding: 12px;
}
.quotation-controls label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
}
.quotation-controls label:last-of-type {
  grid-column: span 2;
}
.quotation-preview {
  display: grid;
  gap: 10px;
  grid-column: span 2;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.archive-controls {
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 14px 0;
  padding: 12px;
}
.archive-controls label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
}
.archive-controls label:nth-of-type(6) {
  grid-column: span 3;
}
.archive-preview {
  display: grid;
  gap: 10px;
  grid-column: span 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.archive-analysis-card {
  margin-bottom: 14px;
}
.paperwork {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.generated-files {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.generated-files code {
  background: #eef3f7;
  border: 1px solid #d9e0e7;
  border-radius: 6px;
  display: block;
  overflow-wrap: anywhere;
  padding: 8px;
}
.print-checklist {
  border-top: 1px solid #e0e6ec;
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
}
.check-item {
  align-items: start;
  display: grid;
  grid-template-columns: 22px minmax(150px, 0.35fr) minmax(0, 1fr);
  gap: 8px;
}
.badge {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  white-space: nowrap;
}
.ready,
.valid,
.printable,
.won,
.won_strategy,
.price_close {
  background: #dff3e9;
  color: #1f6f4a;
}
.actionable_after_update,
.expiring_soon,
.needs_update {
  background: #fff0c7;
  color: #7f5400;
}
.needs_review,
.not_suitable,
.missing,
.expired,
.needs_input,
.pending_return,
.not_returned,
.unknown,
.not_paid,
.lost,
.price_high,
.non_price_factor,
.cancelled,
.pending_result {
  background: #ffe2df;
  color: #9f2d20;
}
.returned,
.not_required {
  background: #dff3e9;
  color: #1f6f4a;
}
.record-total {
  align-items: center;
  background: #eef7f6;
  border: 1px solid #9bcfca;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  padding: 12px;
}
@media (max-width: 1000px) {
  .topbar,
  .layout,
  .workflow-nav,
  .summary,
  .panel-heading,
  .collapse-side,
  .grid,
  .completion-grid,
  .workflow-stage-heading,
  .project,
  .upload-line,
  .tender-detail,
  .quotation-controls,
  .archive-controls,
  .admin-user-form,
  .admin-user-row,
  .audit-row {
    grid-template-columns: 1fr;
  }
  .topbar {
    align-items: flex-start;
    display: grid;
    gap: 12px;
  }
  aside {
    min-height: auto;
  }
  .kpis {
    grid-template-columns: 1fr 1fr;
  }
  .profile-grid {
    grid-template-columns: 1fr 1fr;
  }
  .pagination {
    justify-content: space-between;
  }
  .workflow-stage,
  .workflow-stage-block,
  #workflow-matches {
    scroll-margin-top: 420px;
  }
  .quotation-controls label:last-of-type,
  .quotation-preview,
  .archive-controls label:nth-of-type(6),
  .archive-preview {
    grid-column: auto;
  }
  .quotation-preview,
  .archive-preview {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 620px) {
  .action-finder {
    flex-basis: 100%;
    min-width: 100%;
  }
  .action-finder-menu {
    left: 0;
    right: auto;
    width: calc(100vw - 56px);
  }
  .kpis,
  .workflow-step,
  .match-row,
  .document-row,
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .preview-header,
  .preview-actions,
  .tender-detail-grid {
    grid-template-columns: 1fr;
  }
  .preview-actions {
    display: grid;
  }
  .admin-user-actions {
    display: grid;
    justify-content: stretch;
  }
  .match-summary-button {
    grid-template-columns: 1fr;
  }
  .pagination {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }
  .pagination span {
    text-align: center;
  }
}
