:root {
  color-scheme: light;
  --blue: #1f5be7;
  --blue-strong: #1551df;
  --blue-soft: #eaf2ff;
  --ink: #18243a;
  --muted: #6f7c91;
  --line: #dce3ed;
  --panel: #ffffff;
  --page: #f3f6fa;
  --green: #0d9c72;
  --orange: #ff7114;
  --purple: #7c3fe6;
  --cyan: #1d9bf0;
  --red: #e5484d;
  --shadow: 0 2px 8px rgba(19, 33, 68, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  background: var(--page);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: var(--blue-strong);
  color: #fff;
  box-shadow: 0 2px 7px rgba(15, 53, 150, 0.28);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark,
.nav-icon,
.section-icon,
.tool-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 5px;
  font-size: 14px;
  line-height: 1;
}

.brand-mark {
  background: rgba(255, 255, 255, 0.22);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.top-icon {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 700;
}

.layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
  padding-top: 56px;
}

.sidebar {
  position: fixed;
  top: 56px;
  bottom: 0;
  width: 230px;
  padding: 22px;
  background: #fff;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.sidebar-title {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 800;
}

.nav-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-button {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #586479;
  text-align: left;
  font-weight: 700;
}

.nav-button:hover {
  background: #f2f6fd;
  color: var(--blue);
}

.nav-button.active {
  background: #dceafe;
  color: var(--blue);
  box-shadow: inset 4px 0 0 var(--blue);
}

.nav-icon {
  color: inherit;
  font-size: 18px;
}

.side-card {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.side-card h3 {
  margin: 0 0 14px;
  font-size: 13px;
}

.side-card p {
  margin: 9px 0;
  color: #68758b;
  font-size: 12px;
}

.quick-link {
  width: 100%;
  height: 42px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #526075;
  font-weight: 700;
}

.main {
  grid-column: 2;
  min-height: calc(100vh - 56px);
  padding: 36px 38px 56px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.page-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-size: 28px;
  font-weight: 900;
}

.page-title .section-icon {
  width: 30px;
  height: 30px;
  color: var(--blue);
  font-size: 26px;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.field-label {
  display: grid;
  gap: 4px;
  color: #68758b;
  font-size: 12px;
}

.input,
.select,
.textarea {
  min-height: 38px;
  border: 1px solid #cfd8e4;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.input,
.select {
  padding: 0 12px;
}

.textarea {
  min-height: 86px;
  padding: 10px 12px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 91, 231, 0.12);
}

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #cfd8e4;
  border-radius: 6px;
  background: #fff;
  color: #2d3a50;
  font-weight: 800;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.btn.success {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.btn.danger {
  border-color: #ffd6d8;
  background: #fff1f1;
  color: var(--red);
}

.btn.icon {
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.btn.mini {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel.pad {
  padding: 18px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 900;
}

.section-heading .section-icon {
  color: var(--blue);
  font-size: 22px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.metric-card {
  min-height: 124px;
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  border-radius: 8px;
  color: #fff;
  box-shadow: var(--shadow);
}

.metric-card.blue {
  background: linear-gradient(135deg, #3479f6, #1d55df);
}

.metric-card.green {
  background: linear-gradient(135deg, #13b886, #087f60);
}

.metric-card.purple {
  background: linear-gradient(135deg, #9254f5, #6926d9);
}

.metric-card.orange {
  background: linear-gradient(135deg, #ff842c, #f25500);
}

.metric-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
}

.metric-value {
  font-size: 28px;
  font-weight: 900;
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 12px;
  font-weight: 800;
}

.metric-symbol {
  position: absolute;
  right: 18px;
  top: 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 24px;
}

.goal-box {
  padding: 22px;
  background: #eaf3ff;
}

.goal-row {
  display: grid;
  grid-template-columns: 140px 1fr 120px;
  gap: 18px;
  align-items: center;
  margin: 14px 0;
  color: #546179;
  font-weight: 700;
}

.progress-track {
  height: 14px;
  overflow: hidden;
  border-radius: 3px;
  background: #cbd7e8;
}

.progress-bar {
  height: 100%;
  display: grid;
  place-items: center;
  background: #2698ee;
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
}

.goal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  justify-self: end;
  padding: 4px 9px;
  border: 1px solid var(--orange);
  border-radius: 999px;
  color: var(--orange);
  background: #fff5ef;
  font-size: 12px;
  font-weight: 900;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 26px;
}

.section-gap {
  margin-top: 18px;
}

.governance-banner {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid #b8cffc;
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: #eef5ff;
  color: #21344f;
}

.governance-banner strong {
  font-size: 16px;
}

.governance-banner span {
  line-height: 1.7;
}

.purchase-flow {
  margin-top: 18px;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.flow-card {
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
}

.flow-card:hover {
  border-color: var(--blue);
  background: #f8fbff;
}

.flow-card span {
  color: #526075;
  font-weight: 900;
}

.flow-card strong {
  font-size: 30px;
}

.flow-card em {
  color: #77849a;
  font-size: 12px;
  font-style: normal;
  line-height: 1.6;
  white-space: normal;
}

.supplier-score-list {
  display: grid;
  gap: 12px;
}

.score-row {
  display: grid;
  grid-template-columns: 1fr 150px 42px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.score-row strong,
.score-row span {
  display: block;
}

.score-row span {
  margin-top: 4px;
  color: #748196;
  font-size: 12px;
}

.score-bars {
  color: #5e6d82;
  font-size: 12px;
}

.score-row b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #eaf2ff;
  color: var(--blue);
}

.chart-card {
  min-height: 330px;
  padding: 18px 26px;
}

.funnel {
  display: grid;
  gap: 16px;
  margin-top: 34px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 14px;
}

.funnel-label {
  color: #526075;
  font-size: 13px;
}

.funnel-track {
  height: 20px;
  background: #f1f4f8;
}

.funnel-fill {
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.bar-chart {
  height: 226px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 34px;
  padding: 24px 16px 0;
  border-bottom: 1px solid #e5eaf1;
  background: repeating-linear-gradient(
    to top,
    transparent 0,
    transparent 45px,
    #eef2f7 46px
  );
}

.bar-item {
  display: grid;
  align-content: end;
  justify-items: center;
  height: 100%;
  gap: 8px;
  color: #637086;
  font-size: 12px;
}

.bar {
  width: 74%;
  min-height: 8px;
  border-radius: 4px 4px 0 0;
  background: var(--blue);
}

.bar.orange {
  background: var(--orange);
}

.bar.gray {
  background: #aab5c5;
}

.activity-list {
  display: grid;
  gap: 0;
}

.activity-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  border-bottom: 1px solid #d4dbe7;
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-title {
  font-weight: 900;
}

.activity-sub {
  margin-top: 6px;
  color: #7a879b;
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.pill.green {
  background: #e6f7f1;
  color: var(--green);
}

.pill.orange {
  background: #fff1e8;
  color: var(--orange);
}

.pill.purple {
  background: #f0eaff;
  color: var(--purple);
}

.pill.red {
  background: #fff0f0;
  color: var(--red);
}

.todo-list {
  display: grid;
  gap: 18px;
  padding-top: 8px;
}

.todo-item {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 12px;
  color: #536078;
}

.todo-mark {
  color: var(--red);
  font-weight: 900;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search {
  width: 300px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.mini-stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mini-stat span {
  color: #758299;
  font-size: 12px;
}

.mini-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

/* Supplier quotation price book */
.quote-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.quote-metrics button {
  display: grid;
  gap: 12px;
  min-height: 112px;
  padding: 20px;
  text-align: left;
  color: #334155;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.quote-metrics strong {
  color: #102341;
  font-size: 30px;
}

.quote-metrics em {
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
}

.quote-metrics .warn strong { color: #c56b00; }
.quote-metrics .risk strong { color: #d92d20; }

.quote-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(4, minmax(140px, .65fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.quote-toolbar .search-input {
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.field-label.compact { gap: 4px; font-size: 12px; }
.field-label.compact .select { min-height: 42px; }

.quote-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 300px;
  padding: 60px 20px;
  text-align: center;
  color: #718096;
}

.quote-empty > span {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  color: var(--primary);
  font-size: 30px;
  background: #e8f0ff;
  border-radius: 50%;
}

.quote-empty h3 { margin: 0; color: #183153; }
.quote-empty p { margin: 0; }
.quote-empty div { display: flex; gap: 10px; margin-top: 8px; }
.quote-tag { display: inline-flex; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.quote-tag.green { color: #087443; background: #dcfce7; }
.quote-tag.orange { color: #a45100; background: #fff0d5; }
.quote-tag.gray { color: #667085; background: #eef2f6; }
.quote-anchor { color: #0f5bd3; font-weight: 800; }
.quote-warning, .quote-expired { color: #d92d20; font-weight: 700; }
.quote-expiring { color: #c56b00; font-weight: 700; }
.quote-over-limit { background: #fff8f7; }

.quote-form-grid { padding-bottom: 12px; }
.quote-form-alert { color: #d92d20; }
.quote-calculation {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 20px 16px;
  padding: 14px;
  background: #eff6ff;
  border: 1px solid #c9ddff;
  border-radius: 9px;
}
.quote-calculation div { display: grid; gap: 6px; }
.quote-calculation span { color: #60708a; font-size: 12px; }
.quote-calculation strong { color: #0b55c7; font-size: 19px; }
.quote-tier-editor { margin: 0 20px 18px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; }
.quote-tier-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.quote-tier-head h3, .quote-tier-head p { margin: 0; }
.quote-tier-head p { color: #718096; font-size: 12px; }
.quote-tier-rows { display: grid; gap: 9px; margin-top: 12px; }
.quote-tier-row { display: grid; grid-template-columns: 70px repeat(4, minmax(110px, 1fr)) auto; gap: 8px; align-items: end; }
.quote-tier-row label { display: grid; gap: 4px; color: #60708a; font-size: 12px; }
.quote-history { padding: 18px; }
.quote-history > p { margin-top: 0; color: #60708a; }
.comparison-pricebook { display: grid; grid-template-columns: 220px auto 1fr; gap: 12px; align-items: end; padding: 16px 20px 0; }
.comparison-pricebook p { margin: 0 0 9px; color: #60708a; font-size: 12px; }
.comparison-basis-value { margin: -4px 0 10px; color: #60708a; font-size: 12px; }
.comparison-basis-value strong { color: #0b55c7; }

@media (max-width: 900px) {
  .quote-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .quote-metrics button { min-height: 86px; padding: 14px; }
  .quote-toolbar { grid-template-columns: 1fr 1fr; }
  .quote-toolbar .search-input { grid-column: 1 / -1; }
  .quote-calculation { grid-template-columns: 1fr 1fr; margin: 0 14px 14px; }
  .quote-tier-editor { margin: 0 14px 14px; }
  .quote-tier-row { grid-template-columns: 1fr 1fr; padding: 10px; background: #f8fafc; border-radius: 7px; }
  .quote-tier-row > strong { grid-column: 1 / -1; }
  .comparison-pricebook { grid-template-columns: 1fr; padding: 14px 14px 0; }
  .quote-list-panel .table-wrap { overflow: visible; border: 0; }
  .quote-list-panel table, .quote-list-panel tbody, .quote-list-panel tr, .quote-list-panel td { display: block; width: 100%; min-width: 0; white-space: normal; }
  .quote-list-panel thead { display: none; }
  .quote-list-panel tbody { display: grid; gap: 12px; }
  .quote-list-panel .quote-data-row { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
  .quote-list-panel .quote-data-row td { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-bottom: 1px dashed #e1e7f0; }
  .quote-list-panel .quote-data-row td::before { color: #718096; font-size: 12px; font-weight: 700; }
  .quote-list-panel .quote-data-row td:nth-child(1)::before { content: "选择"; }
  .quote-list-panel .quote-data-row td:nth-child(2)::before { content: "报价单号"; }
  .quote-list-panel .quote-data-row td:nth-child(3)::before { content: "供应商"; }
  .quote-list-panel .quote-data-row td:nth-child(4)::before { content: "物料信息"; }
  .quote-list-panel .quote-data-row td:nth-child(5)::before { content: "不含税价"; }
  .quote-list-panel .quote-data-row td:nth-child(6)::before { content: "票种/税率"; }
  .quote-list-panel .quote-data-row td:nth-child(7)::before { content: "含税单价"; }
  .quote-list-panel .quote-data-row td:nth-child(8)::before { content: "到货/实际"; }
  .quote-list-panel .quote-data-row td:nth-child(9)::before { content: "有效期"; }
  .quote-list-panel .quote-data-row td:nth-child(10)::before { content: "起订量"; }
  .quote-list-panel .quote-data-row td:nth-child(11)::before { content: "状态"; }
  .quote-list-panel .quote-data-row td:nth-child(12)::before { content: "操作"; }
}

.nav-button.nav-child {
  height: 40px;
  margin-top: -5px;
  padding-left: 42px;
  font-size: 13px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid #e7ecf3;
  text-align: left;
}

th {
  background: #f7f9fc;
  color: #536078;
  font-size: 13px;
  font-weight: 900;
}

tbody tr:hover {
  background: #f8fbff;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-wrap .row-actions {
  width: 290px;
  flex-wrap: wrap;
}

.table-wrap th:last-child,
.table-wrap td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -1px 0 0 #e7ecf3;
}

.table-wrap th:last-child {
  z-index: 3;
  background: #f7f9fc;
}

.empty {
  padding: 38px;
  color: #718097;
  text-align: center;
}

.workflow-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 210px;
  align-content: center;
}

.workflow-empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: #edf3ff;
  color: var(--primary);
  font-size: 23px;
  font-weight: 900;
}

.workflow-empty strong {
  color: #1f2d43;
  font-size: 17px;
}

.workflow-empty p {
  max-width: 520px;
  margin: 0;
  line-height: 1.7;
}

.workflow-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.supplier-empty p {
  margin: 0 0 14px;
}

.supplier-empty span {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
}

.supplier-proxy-note {
  margin: 0;
}

.supplier-more {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.supplier-more summary {
  padding: 13px 14px;
  color: #52627a;
  font-weight: 800;
  cursor: pointer;
}

.supplier-more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0 14px 14px;
}

.supplier-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.supplier-metric {
  display: grid;
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid #3b82f6;
  border-radius: 9px;
  background: #fff;
  color: #1e2d45;
  text-align: left;
  box-shadow: var(--shadow);
}

.supplier-metric:hover { transform: translateY(-1px); border-color: #9eb9f5; }
.supplier-metric.green { border-left-color: #18a46f; }
.supplier-metric.orange { border-left-color: #e98618; }
.supplier-metric.red { border-left-color: #d43e3e; }
.supplier-metric span { color: #6b7890; font-weight: 800; }
.supplier-metric strong { margin-top: 10px; font-size: 28px; }
.supplier-metric strong em { font-size: 13px; font-style: normal; font-weight: 800; }
.supplier-metric small { align-self: end; margin-top: 7px; color: #8a96aa; }
.supplier-metric.orange strong { color: #d87500; }
.supplier-metric.red strong { color: #c93131; }

.supplier-toolbar { display: grid; gap: 12px; margin-bottom: 14px; }
.supplier-filter-row,
.supplier-search-actions,
.supplier-advanced,
.supplier-batch-bar,
.supplier-pagination { display: flex; align-items: end; gap: 10px; }
.supplier-filter-row { flex-wrap: wrap; }
.supplier-filter { display: grid; gap: 5px; color: #637087; font-size: 12px; font-weight: 800; }
.supplier-filter select,
.supplier-pagination select {
  height: 38px;
  padding: 0 30px 0 10px;
  border: 1px solid #cfd8e4;
  border-radius: 6px;
  background: #fff;
  color: #26364e;
}
.supplier-search-actions { align-items: center; }
.supplier-search-actions .search { flex: 1; min-width: 260px; }
.supplier-advanced { padding: 11px 13px; border: 1px dashed #c7d6ef; border-radius: 7px; background: #f7faff; }
.supplier-advanced label { display: flex; flex: 1; align-items: center; gap: 10px; color: #637087; font-weight: 800; }
.supplier-advanced .input { flex: 1; }
.supplier-batch-bar { align-items: center; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #adc7fa; border-radius: 7px; background: #eef5ff; }
.supplier-batch-bar strong { margin-right: auto; color: #1f5be7; }

.supplier-name-link { padding: 0; border: 0; background: transparent; color: #1759d6; font-weight: 900; text-align: left; }
.supplier-name-link:hover { text-decoration: underline; }
.supplier-status,
.supplier-level { display: inline-flex; justify-content: center; min-width: 54px; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.supplier-status.green { color: #08794f; background: #dff7ec; }
.supplier-status.blue,
.supplier-level.blue { color: #1f5bc7; background: #e7f0ff; }
.supplier-status.gray,
.supplier-level.gray { color: #687487; background: #edf0f4; }
.supplier-status.red { color: #bd2929; background: #ffe4e4; }
.supplier-level.gold { color: #875900; background: #fff0b8; }
.supplier-expiry { display: inline-grid; gap: 2px; color: #2e3d55; font-weight: 800; }
.supplier-expiry small { color: #7c899d; font-weight: 700; }
.supplier-expiry.warning,
.supplier-expiry.warning small { color: #d87500; }
.supplier-expiry.expired,
.supplier-expiry.expired small { color: #cc3030; }
.supplier-risk-row { background: #fffafa; }
.supplier-risk-row:hover { background: #fff4f4; }

.supplier-pagination { justify-content: space-between; margin-top: 14px; color: #65728a; }
.supplier-pagination label { display: flex; align-items: center; gap: 6px; }
.supplier-page-buttons { display: flex; align-items: center; gap: 5px; }
.supplier-empty { min-height: 250px; display: grid; place-items: center; align-content: center; gap: 12px; }
.supplier-empty-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: #eef4ff; color: #2d67df; font-size: 27px; }
.supplier-empty-actions { display: flex; gap: 10px; }

.supplier-import-form { padding: 18px 22px 0; }
.supplier-import-guide { padding: 14px 16px; border-radius: 8px; background: #eef5ff; color: #384962; line-height: 1.75; }
.supplier-import-guide ol { margin: 8px 0 0; padding-left: 22px; }
.supplier-import-form > .btn { margin: 14px 0; }
.supplier-import-drop { display: grid; min-height: 130px; place-items: center; padding: 22px; border: 2px dashed #abc2ed; border-radius: 9px; background: #fafcff; color: #1f5be7; font-weight: 900; cursor: pointer; }
.supplier-import-drop input { width: 100%; max-width: 330px; }
.supplier-import-drop span { color: #718099; font-size: 12px; }
.supplier-batch-summary { margin: 0; padding: 13px 18px; background: #eef5ff; color: #244b8e; }

.modal:has(.supplier-detail) { width: min(1100px, calc(100vw - 40px)); }
.supplier-detail { display: grid; gap: 14px; padding: 0 22px 20px; }
.supplier-detail-head { display: flex; align-items: center; justify-content: space-between; padding: 15px; border-radius: 8px; background: #eef5ff; }
.supplier-detail-head h3 { margin: 0 0 5px; font-size: 22px; }
.supplier-detail-head p { margin: 0; color: #65728a; }
.supplier-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.supplier-detail-grid > div { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; }
.supplier-detail-grid .wide { grid-column: 1 / -1; }
.supplier-detail-grid span { color: #718097; font-size: 12px; }
.supplier-detail-grid i { display: inline-flex; margin-right: 5px; padding: 3px 8px; border-radius: 999px; background: #edf3ff; color: #285dbd; font-size: 12px; font-style: normal; }
.supplier-detail details { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.supplier-detail summary { padding: 12px 14px; background: #f7f9fc; font-weight: 900; cursor: pointer; }
.supplier-detail details .table-wrap { border: 0; border-radius: 0; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tool-card {
  display: grid;
  gap: 12px;
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tool-card h3 {
  margin: 0;
  font-size: 17px;
}

.tool-card p {
  min-height: 42px;
  margin: 0;
  color: #68758b;
  line-height: 1.7;
}

.health-p0 strong,
.severity-p0 > td:first-child strong {
  color: #c9362b;
}

.health-p1 strong,
.severity-p1 > td:first-child strong {
  color: #b85f00;
}

.health-p2 strong,
.severity-p2 > td:first-child strong {
  color: #1767c7;
}

.health-row.severity-p0 {
  background: #fff3f2;
}

.health-row .muted {
  display: inline-block;
  max-width: 190px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.knowledge-hero,
.training-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 34px;
  padding: 28px 30px;
  border-color: #bcd0fb;
  background:
    radial-gradient(circle at 86% 18%, rgba(31, 91, 231, 0.13), transparent 34%),
    linear-gradient(135deg, #ffffff, #f2f7ff);
}

.knowledge-hero h2,
.training-summary h2,
.training-welcome h2,
.method-card h2,
.practice-card h2 {
  margin: 0 0 12px;
  font-size: 25px;
}

.knowledge-hero p,
.training-summary p,
.training-welcome p {
  max-width: 780px;
  margin: 0;
  color: #5f6d82;
  line-height: 1.85;
}

.knowledge-hero-actions {
  min-width: 160px;
  display: grid;
  justify-items: stretch;
  gap: 14px;
}

.knowledge-number {
  display: grid;
  justify-items: center;
  padding: 14px;
  border: 1px solid #c8d8f8;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
}

.knowledge-number strong {
  color: var(--blue);
  font-size: 36px;
  line-height: 1;
}

.knowledge-number span {
  margin-top: 6px;
  color: #68758b;
  font-size: 12px;
}

.level-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.level-summary {
  min-height: 112px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
}

.level-summary.green {
  border-left-color: var(--green);
}

.level-summary.purple {
  border-left-color: var(--purple);
}

.level-summary span {
  color: #657289;
  font-size: 12px;
  font-weight: 800;
}

.level-summary strong {
  font-size: 20px;
}

.level-summary em {
  color: #77849a;
  font-size: 12px;
  font-style: normal;
}

.knowledge-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.knowledge-toolbar .section-heading {
  margin-bottom: 5px;
}

.knowledge-toolbar p {
  margin: 0;
  color: #738097;
}

.knowledge-tabs {
  display: flex;
  gap: 8px;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.channel-card {
  display: grid;
  align-content: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.channel-card:hover {
  border-color: #a9c2f6;
  box-shadow: 0 8px 22px rgba(35, 65, 125, 0.1);
}

.channel-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.channel-index {
  color: #b4bfd0;
  font-size: 25px;
  font-weight: 900;
}

.channel-card h3 {
  margin: 14px 0 7px;
  font-size: 18px;
}

.channel-goal {
  margin: 0 0 14px;
  color: var(--blue);
  font-weight: 800;
}

.channel-facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.channel-facts div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
}

.channel-facts dt {
  color: #728097;
  font-size: 12px;
  font-weight: 800;
}

.channel-facts dd {
  margin: 0;
  color: #4d5b71;
  line-height: 1.65;
}

.channel-details {
  margin-top: 16px;
  border-top: 1px solid #e3e9f1;
  border-bottom: 1px solid #e3e9f1;
}

.channel-details summary {
  padding: 13px 0;
  color: var(--blue);
  cursor: pointer;
  font-weight: 900;
}

.channel-detail-body {
  padding: 2px 4px 16px;
  color: #536078;
  line-height: 1.75;
}

.channel-detail-body h4 {
  margin: 12px 0 5px;
  color: var(--ink);
}

.channel-detail-body p,
.channel-detail-body ol,
.channel-detail-body ul {
  margin: 0;
  padding-left: 20px;
}

.channel-detail-body p {
  padding-left: 0;
}

.channel-action {
  margin-top: 16px;
  justify-self: start;
}

.method-card,
.practice-card {
  border-top: 4px solid var(--blue);
}

.practice-card {
  border-top-color: var(--green);
}

.step-list {
  display: grid;
  gap: 12px;
  margin: 16px 0 20px;
  padding-left: 22px;
  color: #536078;
  line-height: 1.7;
}

.training-welcome {
  max-width: 980px;
  margin: 40px auto 0;
  padding: 38px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(31, 91, 231, 0.12), transparent 42%),
    #fff;
}

.training-welcome p {
  margin: 0 auto;
}

.training-roadmap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 30px 0;
  text-align: left;
}

.training-roadmap div {
  min-height: 98px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.training-roadmap strong,
.training-roadmap span {
  display: block;
}

.training-roadmap strong {
  margin-bottom: 8px;
  color: var(--blue);
}

.training-roadmap span {
  color: #5f6d82;
  line-height: 1.6;
}

.training-start {
  min-width: 180px;
  min-height: 46px;
}

.training-progress-ring {
  --progress: 0deg;
  width: 126px;
  height: 126px;
  display: grid;
  place-content: center;
  justify-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, #fff 76%, transparent 78% 100%),
    conic-gradient(var(--blue) var(--progress), #dfe7f3 0);
}

.training-progress-ring strong {
  font-size: 26px;
}

.training-progress-ring span {
  color: #748196;
  font-size: 12px;
}

.training-day-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.training-day-card {
  display: grid;
  align-content: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 5px solid var(--orange);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.training-day-card.completed {
  border-top-color: var(--green);
}

.training-day-head,
.training-goal,
.training-note,
.training-steps,
.training-warning,
.training-acceptance,
.training-actions {
  margin-left: 20px;
  margin-right: 20px;
}

.training-day-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.training-day-head div > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.training-day-head h2 {
  margin: 4px 0 0;
  font-size: 19px;
}

.training-goal {
  min-height: 68px;
  color: #58667b;
  line-height: 1.7;
}

.training-note,
.training-warning,
.training-acceptance {
  padding: 11px 12px;
  border-radius: 7px;
  color: #57657a;
  font-size: 12px;
  line-height: 1.65;
}

.training-note {
  background: #eef5ff;
}

.training-warning {
  background: #fff5ed;
}

.training-acceptance {
  background: #edf8f4;
}

.training-steps {
  display: grid;
  gap: 0;
  padding: 6px 0;
  list-style: none;
}

.training-steps li {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f6;
  color: #58667b;
}

.training-steps li:last-child {
  border-bottom: 0;
}

.training-steps li > span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid #bdc8d8;
  border-radius: 50%;
  color: #8996a9;
  font-size: 11px;
  font-weight: 900;
}

.training-steps li.done {
  color: var(--green);
}

.training-steps li.done > span {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.training-steps p {
  margin: 0;
  line-height: 1.55;
}

.training-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 20px;
}

.supervisor-check .check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #69768b;
}

.check-item.done {
  border-color: #a9decf;
  background: #edf8f4;
  color: var(--green);
}

.check-item span {
  font-weight: 900;
}

.completeness {
  width: 72px;
  height: 7px;
  display: inline-block;
  overflow: hidden;
  margin-right: 7px;
  border-radius: 999px;
  background: #e4eaf2;
  vertical-align: middle;
}

.completeness > span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--blue);
}

.completeness-value {
  font-size: 12px;
}

.completeness-value.green {
  color: var(--green);
}

.completeness-value.orange {
  color: var(--orange);
}

.completeness-value.red {
  color: var(--red);
}

tr.row-overdue td {
  background: #fff3f3;
}

tr.row-overdue td:first-child {
  box-shadow: inset 4px 0 0 var(--red);
}

tr.row-overdue:hover td {
  background: #ffe9e9;
}

tr.row-pending td {
  background: #fff9e9;
}

tr.row-pending td:first-child {
  box-shadow: inset 4px 0 0 #d89b17;
}

.inline-inspection {
  padding: 6px 0 14px;
  background: #fbfcff;
}

.inline-inspection .row-actions {
  justify-content: flex-end;
  padding: 0 22px;
}

.comparison-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 22px 0;
}

.offer-column {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.offer-column h3 {
  margin: 0;
  padding: 14px 16px 0;
  font-size: 15px;
}

.offer-column .form-grid {
  grid-template-columns: 1fr;
  padding: 14px;
}

.comparison-decision {
  padding-top: 16px;
}

.modal:has(.comparison-editor) {
  width: min(1180px, 100%);
}

.modal-error {
  margin: 16px 22px 0;
}

button.metric-card,
button.flow-card,
button.todo-item {
  width: 100%;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.metric-card:focus-visible,
button.flow-card:focus-visible,
button.todo-item:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 30px;
  background: rgba(20, 32, 52, 0.36);
}

.modal {
  width: min(820px, 100%);
  max-height: calc(100vh - 70px);
  overflow: auto;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(13, 25, 48, 0.28);
}

.modal-head,
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-foot {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 22px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 8px;
  background: #17345f;
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 800;
}

.session-screen {
  min-width: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #eef2f6;
}

.session-panel {
  width: min(360px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid #cfd8e5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(19, 33, 68, 0.12);
}

.session-panel h1,
.session-panel p {
  margin: 0;
}

.session-kicker {
  color: var(--blue);
  font-weight: 800;
}

.session-panel label {
  display: grid;
  gap: 7px;
  color: #47556d;
  font-weight: 700;
}

.session-panel input {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #b9c5d5;
  border-radius: 6px;
}

.session-panel button,
.session-logout,
.session-password {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

.session-help {
  color: #65748b;
  line-height: 1.65;
}

.session-panel .session-secondary {
  border: 1px solid #b9c5d5;
  background: #fff;
  color: #34445d;
}

.session-error {
  min-height: 20px;
  color: var(--red);
}

.session-loading {
  display: block;
  color: #4b5d76;
  text-align: center;
}

.session-user {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
}

.session-user span {
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 5px;
  font-size: 12px;
}

.session-logout,
.session-password {
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: transparent;
}

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #bfd4fb;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #eef5ff;
  line-height: 1.65;
}

.security-note strong {
  flex: 0 0 auto;
  color: #174db5;
}

.permission-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px 16px;
  color: #65748b;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 22px 22px;
}

.permission-grid fieldset {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.permission-grid legend {
  padding: 0 6px;
  color: #30405b;
  font-weight: 900;
}

.permission-grid label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #56657b;
}

.temporary-password {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.temporary-password p {
  margin: 0;
  line-height: 1.7;
}

.temporary-password code {
  padding: 18px;
  border: 2px dashed #7da5f3;
  border-radius: 8px;
  background: #eef5ff;
  color: #103e98;
  font-size: clamp(20px, 4vw, 30px);
  font-weight: 900;
  letter-spacing: 1px;
  text-align: center;
  user-select: all;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.attachment-panel,
.pending-attachments {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cdd8e7;
  border-radius: 6px;
  background: #f8fafc;
  text-align: left;
  white-space: normal;
}

.pending-attachments {
  margin: 0 22px 18px;
}

.pending-attachments p {
  margin: 0;
  color: #65748b;
  font-size: 13px;
}

.attachment-panel-head,
.attachment-summary,
.attachment-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.attachment-panel-head {
  justify-content: space-between;
}

.attachment-panel-head span,
.attachment-summary > span:not(.pill) {
  color: #6b7890;
  font-size: 12px;
}

.attachment-toolbar {
  flex-wrap: wrap;
}

.attachment-toolbar .field-label {
  min-width: 180px;
  gap: 5px;
}

.attachment-toolbar .select {
  min-height: 36px;
}

.attachment-zone {
  min-height: 62px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px dashed #8ea4c0;
  border-radius: 6px;
  color: #52657e;
  background: #fff;
  outline: none;
}

.attachment-zone:focus,
.attachment-zone.is-dragging,
.pending-attachments.is-dragging {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
}

.attachment-list {
  display: grid;
  gap: 8px;
}

.attachment-item {
  padding: 10px;
  border: 1px solid #dbe3ed;
  border-radius: 6px;
  background: #fff;
}

.tool-card:hover,
.tool-card:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(30, 89, 225, 0.1);
  outline: none;
}

.tool-card > span {
  color: var(--primary);
  font-weight: 800;
}

.attachment-summary {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto auto auto;
}

.attachment-summary strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.attachment-summary .row-actions {
  justify-content: flex-end;
}

.attachment-preview {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e1e7ef;
}

.attachment-preview img,
.attachment-preview iframe {
  display: block;
  width: 100%;
  height: min(52vh, 520px);
  border: 0;
  object-fit: contain;
  background: #eef2f6;
}

.attachment-empty,
.ocr-status,
.attachment-error {
  padding: 9px 11px;
  border-left: 3px solid #8ea4c0;
  color: #52657e;
  background: #fff;
}

.attachment-error {
  border-left-color: var(--red);
  color: #a61b2b;
  background: #fff5f5;
}

.ocr-status.success {
  border-left-color: #169c68;
  color: #116f4e;
}

.ocr-suggestions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border-top: 1px solid #e1e7ef;
  background: #f6f9fd;
}

.ocr-suggestions label {
  display: grid;
  grid-template-columns: auto 100px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.ocr-suggestions label b {
  overflow-wrap: anywhere;
}

.ocr-suggestions p {
  margin: 0;
  color: #5f6f85;
}

@media (max-width: 1400px) {
  body {
    min-width: 1080px;
  }

  .metric-grid,
  .stats-row,
  .supplier-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .training-day-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    min-width: 0;
    font-size: 13px;
  }

  .topbar {
    height: 56px;
    padding: 0 10px;
  }

  .brand {
    max-width: 185px;
    gap: 6px;
    font-size: 13px;
    line-height: 1.3;
  }

  .top-actions {
    gap: 6px;
  }

  .session-user {
    font-size: 0;
  }

  .session-user span {
    font-size: 11px;
  }

  .session-logout {
    min-height: 34px;
    padding: 0 9px;
    font-size: 12px;
  }

  .session-password {
    min-height: 34px;
    padding: 0 8px;
    font-size: 12px;
  }

  .layout {
    display: block;
    padding-top: 56px;
  }

  .sidebar {
    position: sticky;
    top: 56px;
    z-index: 20;
    width: 100%;
    height: auto;
    padding: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-title,
  .side-card {
    display: none;
  }

  .nav-list {
    display: flex;
    width: max-content;
    gap: 6px;
  }

  .nav-button {
    width: auto;
    height: 40px;
    flex: 0 0 auto;
    gap: 6px;
    padding: 0 11px;
    white-space: nowrap;
  }

  .nav-button.active {
    box-shadow: inset 0 -3px 0 var(--blue);
  }

  .nav-icon {
    width: 18px;
    height: 18px;
    font-size: 14px;
  }

  .main {
    min-height: auto;
    padding: 18px 12px 40px;
  }

  .page-head {
    align-items: flex-start;
    margin-bottom: 16px;
  }

  .page-title {
    gap: 8px;
    font-size: 22px;
  }

  .page-title .section-icon {
    width: 24px;
    height: 24px;
    font-size: 20px;
  }

  .head-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .metric-grid,
  .stats-row,
  .supplier-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .supplier-metric { min-height: 102px; padding: 12px; }
  .supplier-metric strong { font-size: 23px; }

  .metric-card,
  .mini-stat {
    min-height: 110px;
    padding: 13px;
  }

  .flow-grid,
  .two-col,
  .tool-grid,
  .comparison-editor,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .supplier-more-grid {
    grid-template-columns: 1fr;
  }

  .permission-grid {
    grid-template-columns: 1fr;
    padding: 0 14px 16px;
  }

  .permission-toolbar,
  .security-note {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .toolbar-left,
  .toolbar-right,
  .search {
    width: 100%;
  }

  .toolbar-right {
    justify-content: flex-end;
  }

  .workflow-empty-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .supplier-filter-row,
  .supplier-search-actions,
  .supplier-advanced,
  .supplier-batch-bar,
  .supplier-pagination { align-items: stretch; flex-direction: column; }
  .supplier-filter { width: 100%; }
  .supplier-filter select,
  .supplier-search-actions > *,
  .supplier-advanced > *,
  .supplier-batch-bar > * { width: 100%; }
  .supplier-search-actions .search { min-width: 0; }
  .supplier-advanced label { align-items: stretch; flex-direction: column; }
  .supplier-batch-bar strong { margin: 0; }
  .supplier-pagination { align-items: center; }
  .supplier-page-buttons { flex-wrap: wrap; justify-content: center; }
  .supplier-detail { padding: 0 14px 14px; }
  .supplier-detail-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .supplier-detail-grid { grid-template-columns: 1fr; }
  .supplier-detail-grid .wide { grid-column: auto; }
  .supplier-detail details .table-wrap { overflow: visible; }
  .supplier-detail details table,
  .supplier-detail details tbody,
  .supplier-detail details tr,
  .supplier-detail details td { display: block; width: 100%; }
  .supplier-detail details thead { display: none; }
  .supplier-detail details tr { margin: 10px; width: calc(100% - 20px); border: 1px solid var(--line); border-radius: 8px; background: #fff; }
  .supplier-detail details td { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; border: 0; border-bottom: 1px solid #eef1f6; white-space: normal; }
  .supplier-detail details td:last-child { border-bottom: 0; }
  .supplier-detail details td::before { content: attr(data-label); color: #718097; font-size: 12px; font-weight: 700; }

  .panel.pad {
    padding: 14px;
  }

  .modal-mask {
    align-items: end;
    padding: 8px;
  }

  .modal,
  .modal:has(.comparison-editor) {
    width: 100%;
    max-height: calc(100vh - 16px);
    border-radius: 8px;
  }

  .comparison-editor {
    padding: 12px 14px 0;
  }

  .form-grid {
    padding: 16px 14px;
  }

  .pending-attachments {
    margin: 0 14px 14px;
  }

  .attachment-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .attachment-summary > span:not(.pill) {
    grid-column: 1 / -1;
  }

  .attachment-summary .row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

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

  .table-wrap td .attachment-panel {
    position: sticky;
    left: 16px;
    width: calc(100vw - 72px);
    min-width: 0;
    max-width: calc(100vw - 72px);
  }

  .table-wrap th:last-child,
  .table-wrap td:last-child {
    position: static;
    box-shadow: none;
  }

  .employees-panel .table-wrap {
    overflow: visible;
  }

  .employees-panel table,
  .employees-panel tbody,
  .employees-panel tr,
  .employees-panel td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .employees-panel thead {
    display: none;
  }

  .employees-panel tbody {
    display: grid;
    gap: 12px;
  }

  .employees-panel tr {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .employees-panel td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed #e1e7f0;
    white-space: normal;
  }

  .employees-panel td:last-child {
    border-bottom: 0;
  }

  .employees-panel td::before {
    color: #718096;
    font-size: 12px;
    font-weight: 700;
  }

  .employees-panel td:nth-child(1)::before { content: "姓名 / 用户名"; }
  .employees-panel td:nth-child(2)::before { content: "员工编号"; }
  .employees-panel td:nth-child(3)::before { content: "岗位"; }
  .employees-panel td:nth-child(4)::before { content: "状态"; }
  .employees-panel td:nth-child(5)::before { content: "密码状态"; }
  .employees-panel td:nth-child(6)::before { content: "最近登录"; }
  .employees-panel td:nth-child(7)::before { content: "操作"; }

  .employees-panel .row-actions {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }

  .supplier-list-panel .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .supplier-list-panel table,
  .supplier-list-panel tbody,
  .supplier-list-panel tr,
  .supplier-list-panel td {
    display: block;
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .supplier-list-panel thead {
    display: none;
  }

  .supplier-list-panel tbody {
    display: grid;
    gap: 12px;
  }

  .supplier-list-panel .supplier-data-row {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .supplier-list-panel .supplier-data-row td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed #e1e7f0;
  }

  .supplier-list-panel .supplier-data-row td:last-child {
    border-bottom: 0;
  }

  .supplier-list-panel .supplier-data-row td::before {
    color: #718096;
    font-size: 12px;
    font-weight: 700;
  }

  .supplier-list-panel .supplier-data-row td:nth-child(1)::before { content: "选择"; }
  .supplier-list-panel .supplier-data-row td:nth-child(2)::before { content: "供应商编码"; }
  .supplier-list-panel .supplier-data-row td:nth-child(3)::before { content: "供应商名称"; }
  .supplier-list-panel .supplier-data-row td:nth-child(4)::before { content: "主营品类"; }
  .supplier-list-panel .supplier-data-row td:nth-child(5)::before { content: "供应商等级"; }
  .supplier-list-panel .supplier-data-row td:nth-child(6)::before { content: "合作状态"; }
  .supplier-list-panel .supplier-data-row td:nth-child(7)::before { content: "联系人"; }
  .supplier-list-panel .supplier-data-row td:nth-child(8)::before { content: "联系电话"; }
  .supplier-list-panel .supplier-data-row td:nth-child(9)::before { content: "资质有效期"; }
  .supplier-list-panel .supplier-data-row td:nth-child(10)::before { content: "操作"; }

  .supplier-list-panel .supplier-data-row .row-actions {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }

  .supplier-list-panel .supplier-attachment-row {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .supplier-list-panel .supplier-attachment-row td {
    padding: 0;
    border: 0;
  }

  .attachment-panel > *,
  .attachment-toolbar > * {
    min-width: 0;
    max-width: 100%;
  }

  .attachment-toolbar .field-label,
  .attachment-toolbar .btn {
    width: 100%;
  }

  .modal-head,
  .modal-foot {
    padding: 14px;
  }
}
/* V2 procurement task UI is scoped; existing screens and navigation retain their styles. */
.srm-task-dialog { width:min(1000px,96vw); max-height:94dvh; padding:0; border:1px solid #ccd8ed; border-radius:16px; color:#1f304d; box-shadow:0 24px 80px #16243a44; }
.srm-task-dialog::backdrop { background:#12244388; }
.srm-task-dialog>header { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:20px 24px; border-bottom:1px solid #dde5f2; position:sticky; top:0; background:white; z-index:1; }
.srm-task-dialog h2 { font-size:23px; margin:0; }
.srm-task-content { padding:24px; }
.srm-task-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:18px; }
.srm-task-full { grid-column:1/-1; }
.srm-task-grid[hidden],.srm-task-dialog [hidden] { display:none!important; }
.srm-task-dialog .field-label { display:flex; flex-direction:column; gap:8px; margin:0 0 14px; min-width:0; }
.srm-task-dialog input:not([type=checkbox]),.srm-task-dialog textarea,.srm-task-dialog select { width:100%; min-height:44px; box-sizing:border-box; }
.srm-task-dialog textarea { resize:vertical; }
.srm-task-dialog footer,.srm-task-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.srm-task-dialog footer { justify-content:flex-end; padding-top:20px; }
.srm-task-dialog button,.srm-task-dialog label.btn { min-height:44px; }
.srm-task-dialog :focus-visible { outline:3px solid #2563eb; outline-offset:3px; }
.srm-task-card,.srm-task-picker { padding:20px; border:1px solid #dbe4f3; border-radius:12px; margin:16px 0; background:#fafcff; min-width:0; }
.srm-task-card h3 { margin:0 0 12px; font-size:18px; }
.srm-task-card dl { display:grid; grid-template-columns:auto 1fr; gap:8px 18px; }.srm-task-card dd { margin:0; }
.srm-task-pre,.srm-task-card pre { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.65; }
.srm-task-dialog p { line-height:1.65; }
.srm-task-hint { color:#2354a2; }.srm-task-warning { background:#fff4ce; padding:12px; color:#704d00; border-radius:8px; }.srm-task-error { background:#fff0f0; padding:12px; color:#a21515; }
.srm-task-files { display:flex; flex-wrap:wrap; gap:12px; margin-top:12px; }.srm-task-file { display:flex; flex-direction:column; gap:8px; width:156px; overflow-wrap:anywhere; padding:8px; border:1px solid #e1e8f2; border-radius:8px; font-size:13px; }.srm-task-file img { object-fit:contain; width:100%; height:100px; background:#eff3f9; }
.srm-task-history { border-top:1px solid #dbe4f3; padding-top:16px; margin-top:16px; }
.srm-task-check { display:flex; align-items:flex-start; gap:10px; margin:16px 0; }.srm-task-check input { width:20px; height:20px; flex:none; }
.srm-task-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:12px; }
.srm-task-entry { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-bottom:20px; }.srm-task-entry h2 { font-size:19px; margin:0 0 6px; }.srm-task-entry p { margin:0; }
@media(max-width:600px) { .srm-task-dialog { width:96vw; max-height:96dvh; }.srm-task-content { padding:16px; }.srm-task-dialog>header { padding:14px 16px; }.srm-task-grid { grid-template-columns:1fr; }.srm-task-card,.srm-task-picker { padding:14px; }.srm-task-dialog footer { justify-content:stretch; }.srm-task-dialog footer .btn { flex:1; }.srm-task-file { width:calc(50% - 8px); box-sizing:border-box; } }
