:root {
  --bg-page: #f5f7fb;
  --bg-surface: #ffffff;
  --bg-sidebar: #111827;
  --bg-sidebar-hover: #1f2937;
  --text-main: #182230;
  --text-muted: #667085;
  --text-light: #98a2b3;
  --border: #e4e7ec;
  --primary: #465fff;
  --primary-hover: #3641f5;
  --primary-soft: #eef2ff;
  --success-soft: #ecfdf3;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-card: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.03);
  --font-sans: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  position: sticky;
  top: 0;
  flex-direction: column;
  width: 252px;
  height: 100vh;
  padding: 20px 14px 16px;
  background: var(--bg-sidebar);
  color: #d0d5dd;
}

.brand,
.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand {
  padding: 4px 10px 24px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
}

.sidebar-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 11px;
  border-radius: 8px;
  color: #d0d5dd;
  text-decoration: none;
}

.nav-item-active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 600;
}

.nav-item:not(.nav-item-disabled):hover {
  background: var(--bg-sidebar-hover);
}

.nav-item-disabled {
  cursor: not-allowed;
  opacity: 0.47;
}

.nav-icon {
  width: 18px;
  color: #c7d2fe;
  font-size: 17px;
  text-align: center;
}

.nav-section {
  margin: 22px 10px 7px;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sidebar-footer {
  display: flex;
  justify-content: space-between;
  padding: 14px 10px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #98a2b3;
  font-size: 12px;
}

.version {
  color: #667085;
}

.main-content {
  min-width: 0;
  flex: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 36px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
}

.breadcrumb {
  color: var(--text-muted);
  font-size: 13px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-name {
  color: var(--text-main);
  font-weight: 600;
}

.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}

.text-button:hover {
  color: var(--primary);
}

.page-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 36px;
}

.page-header {
  margin-bottom: 28px;
}

.page-eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.page-title {
  margin: 0;
  color: var(--text-main);
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.page-description {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 15px;
}

.welcome-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  max-width: 880px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

.welcome-card h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.welcome-card p {
  max-width: 680px;
  margin: 0;
  color: var(--text-muted);
}

.welcome-icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 25px;
}

/* 首页概览 */
.dashboard-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dashboard-card { display: flex; min-height: 144px; flex-direction: column; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-surface); box-shadow: var(--shadow-card); color: inherit; text-decoration: none; }
.dashboard-card:hover { border-color: #aeb5c1; box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08); }
.dashboard-card-label { color: var(--text-muted); font-size: 13px; font-weight: 600; }
.dashboard-card strong { margin-top: 12px; color: var(--text-main); font-size: 30px; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.dashboard-card small { margin-top: auto; padding-top: 12px; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.dashboard-notice { margin-top: 16px; padding: 13px 16px; border: 1px solid #fecdca; border-radius: var(--radius-md); background: #fff6ed; color: #9c2a17; font-size: 14px; }

/* 系统管理 */
.system-management-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: 16px; }
.system-management-card { display: flex; flex-direction: column; gap: 8px; min-height: 155px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-surface); box-shadow: var(--shadow-card); color: inherit; text-decoration: none; }
.system-management-card:hover { border-color: #aeb5c1; }
.system-management-card strong { font-size: 17px; }.system-management-card span:last-child { color: var(--text-muted); font-size: 13px; line-height: 1.55; }.system-card-icon { color: var(--primary); font-size: 22px; }
.system-group-form { max-width: 1060px; }.system-user-groups-form { max-width: 720px; }
.system-permission-fieldset { margin: 24px 0; padding: 0; border: 0; }.system-permission-fieldset > legend { color: var(--text-main); font-size: 16px; font-weight: 700; }.system-permission-fieldset > p { margin: 8px 0 16px; color: var(--text-muted); font-size: 13px; }
.system-permission-section { margin-top: 16px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); }.system-permission-section h2 { margin: 0 0 12px; font-size: 15px; }
.system-permission-list, .system-group-choice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }.system-permission-list label, .system-group-choice-list label { display: flex; align-items: flex-start; gap: 8px; color: #344054; font-size: 13px; line-height: 1.4; }.system-permission-list input, .system-group-choice-list input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: #182230; }
.system-permission-table th:not(:first-child), .system-permission-table td:not(:first-child) { width: 72px; text-align: center; }.system-permission-table td:first-child { font-weight: 600; }.system-permission-table input { width: 16px; height: 16px; margin: 0; accent-color: #182230; }
.operation-detail summary { color: var(--primary); cursor: pointer; font-size: 13px; }.operation-detail pre { max-width: 360px; margin: 8px 0 0; padding: 10px; overflow: auto; border-radius: 6px; background: #f8fafc; color: #344054; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; }

@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .system-management-grid, .system-permission-list, .system-group-choice-list { grid-template-columns: 1fr; }
}

.alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
}

.alert-success {
  background: var(--success-soft);
  color: #067647;
}

/* 登录页 */

.login-body {
  background: #f8f9fc;
}

.login-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(360px, 1.15fr) minmax(440px, 0.85fr);
}

.login-intro {
  display: flex;
  flex-direction: column;
  padding: 42px clamp(44px, 8vw, 128px);
  background: #111827;
  color: #ffffff;
}

.login-intro-content {
  max-width: 560px;
  margin: auto 0;
  padding-bottom: 8vh;
}

.login-intro .page-eyebrow {
  color: #a5b4fc;
}

.login-intro h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.22;
  letter-spacing: -0.04em;
}

.login-intro p:last-child {
  max-width: 480px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.8;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: #ffffff;
}

.login-card {
  width: min(100%, 390px);
}

.login-card-header {
  margin-bottom: 30px;
}

.login-card-header h2 {
  margin: 0 0 8px;
  font-size: 27px;
  letter-spacing: -0.03em;
}

.login-card-header p {
  margin: 0;
  color: var(--text-muted);
}

.form-field {
  margin-bottom: 19px;
}

.form-field label {
  display: block;
  margin-bottom: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 600;
}

.form-field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  outline: none;
  background: #ffffff;
  color: var(--text-main);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.14);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #182230;
  border-radius: 8px;
  background: #182230;
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.16);
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.primary-button:hover {
  border-color: #344054;
  background: #344054;
  color: #ffffff;
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.text-button:focus-visible {
  outline: 3px solid rgba(70, 95, 255, 0.2);
  outline-offset: 2px;
}

.login-submit {
  width: 100%;
  margin-top: 8px;
}

.form-error,
.field-error {
  color: #b42318;
  font-size: 13px;
}

.form-error {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef3f2;
}

.field-error ul,
.form-error ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 900px) {
  .sidebar {
    width: 68px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .brand {
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
  }

  .brand > span:last-child,
  .nav-item > span:last-child,
  .nav-section,
  .sidebar-footer {
    display: none;
  }

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

  .topbar,
  .page-container {
    padding-right: 22px;
    padding-left: 22px;
  }
}

@media (max-width: 720px) {
  .login-layout {
    display: block;
  }

  .login-intro {
    min-height: 300px;
    padding: 28px;
  }

  .login-intro-content {
    margin: auto 0 0;
    padding: 48px 0 0;
  }

  .login-intro h1 {
    font-size: 34px;
  }

  .login-panel {
    min-height: calc(100vh - 300px);
    padding: 36px 28px;
  }
}

/* 基础数据：列表、筛选与表单 */

.page-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.data-panel,
.form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.search-box {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  max-width: 460px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #ffffff;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.12);
}

.search-icon {
  color: var(--text-light);
  font-size: 18px;
  line-height: 1;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text-main);
}

.filter-select,
.form-select,
.form-input {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  outline: none;
  background: #ffffff;
  color: var(--text-main);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.filter-select {
  width: auto;
  min-width: 130px;
  min-height: 40px;
}

.form-input {
  padding-top: 9px;
  padding-bottom: 9px;
}

.location-levels {
  display: grid;
  gap: 10px;
}

textarea.form-input {
  resize: vertical;
}

.filter-select:focus,
.form-select:focus,
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.14);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.secondary-button:hover {
  border-color: #98a2b3;
  background: #f9fafb;
  color: #182230;
}

.text-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover,
.table-action:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table th {
  background: #fcfcfd;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.data-table thead th:first-child {
  border-top-left-radius: calc(var(--radius-lg) - 1px);
}

.data-table thead th:last-child {
  border-top-right-radius: calc(var(--radius-lg) - 1px);
}

.data-table td {
  color: #344054;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #fafbff;
}

.table-action-column {
  width: 82px;
  text-align: right;
}

.table-action {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

button.table-action {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-active {
  background: #ecfdf3;
  color: #067647;
}

.status-inactive {
  background: #f2f4f7;
  color: #475467;
}

.empty-state {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 44px 24px;
  text-align: center;
}

.empty-state-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 23px;
}

.empty-state h2 {
  margin: 0;
  font-size: 17px;
}

.empty-state p {
  max-width: 420px;
  margin: 8px 0 20px;
  color: var(--text-muted);
}

.form-card {
  max-width: 920px;
  padding: 28px;
}

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

.form-field-full {
  grid-column: 1 / -1;
}

.form-field label:not(.checkbox-label) {
  display: block;
  margin-bottom: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 600;
}

.required-mark {
  margin-left: 2px;
  color: #d92d20;
}

.field-help {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  color: #344054;
  font-weight: 600;
  cursor: pointer;
}

.checkbox-input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

@media (max-width: 720px) {
  .page-heading-row,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .page-heading-row .primary-button {
    width: 100%;
  }

  .search-box,
  .filter-select {
    width: 100%;
    max-width: none;
  }

  .form-card {
    padding: 20px;
  }

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

  .form-field-full {
    grid-column: auto;
  }
}

/* 基础数据首页 */

.resource-section + .resource-section {
  margin-top: 36px;
}

.resource-section-heading {
  margin-bottom: 16px;
}

.resource-section-heading h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 17px;
}

.resource-section-heading p {
  margin: 5px 0 0;
  color: var(--text-muted);
}

.resource-section-heading code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #eef2ff;
  color: #3e4bc7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

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

.resource-card {
  display: flex;
  min-height: 142px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
  color: inherit;
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.resource-card:hover {
  transform: translateY(-2px);
  border-color: #b8c1ff;
  box-shadow: 0 8px 18px rgba(34, 48, 108, 0.09);
}

.resource-card-content h3 {
  margin: 0;
  color: var(--text-main);
  font-size: 15px;
}

.resource-card-content p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.65;
}

.resource-card-arrow {
  color: var(--primary);
  font-size: 19px;
  line-height: 1;
}

@media (max-width: 1100px) {
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* 部品管理 */

.part-filter-bar {
  flex-wrap: wrap;
}

.part-image-column {
  width: 68px;
}

.part-thumbnail,
.part-image-placeholder {
  display: flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f8fafc;
  color: var(--text-light);
  object-fit: cover;
}

.part-name-link {
  color: var(--text-main);
  font-weight: 650;
  text-decoration: none;
}

.part-name-link:hover {
  color: var(--primary);
}

.table-secondary-text {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.status-neutral {
  background: #eff4ff;
  color: #3538cd;
}

.code-chip {
  display: inline-flex;
  padding: 2px 6px;
  border-radius: 5px;
  background: #f2f4f7;
  color: #344054;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 650;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pagination-controls a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.pagination-controls a:hover {
  text-decoration: underline;
}

.part-form-card {
  max-width: 980px;
}

.form-section + .form-section {
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.form-section-heading {
  margin-bottom: 20px;
}

.form-section-heading h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 16px;
}

.form-section-heading p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.file-input {
  width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px dashed #98a2b3;
  border-radius: 8px;
  background: #fcfcfd;
  color: var(--text-muted);
}

.file-input::file-selector-button {
  margin-right: 10px;
  padding: 5px 9px;
  border: 0;
  border-radius: 5px;
  background: var(--primary-soft);
  color: #3538cd;
  cursor: pointer;
  font-weight: 600;
}

.part-image-preview {
  display: block;
  width: 110px;
  height: 110px;
  border: 1px solid var(--border);
  border-radius: 10px;
  object-fit: cover;
}

.form-preview-label {
  display: block;
  margin-bottom: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 600;
}

.part-detail-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.part-detail-image {
  display: block;
  width: 62px;
  height: 62px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  object-fit: cover;
}

.part-detail-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 27px;
}

.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  color: var(--text-muted);
}

.detail-meta-row > span:not(.status-badge) + span:not(.status-badge)::before {
  margin-right: 9px;
  color: #d0d5dd;
  content: "•";
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 20px;
  align-items: start;
}

.detail-card,
.detail-side-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

.detail-card {
  padding: 26px;
}

.detail-side-card {
  padding: 20px;
}

.detail-card-heading h2,
.detail-side-card h2 {
  margin: 0;
  font-size: 16px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 20px 0 0;
}

.detail-list > div {
  min-height: 74px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.detail-list > div:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.detail-list dt {
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.detail-list dd {
  margin: 0;
  color: #344054;
}

.detail-list-full {
  grid-column: 1 / -1;
  border-right: 0 !important;
}

.multiline-text {
  white-space: pre-wrap;
}

.pending-feature-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.pending-feature-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.pending-feature-item strong {
  color: #344054;
  font-size: 13px;
}

.pending-feature-item span {
  color: var(--text-muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .pagination-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .part-detail-heading {
    align-items: flex-start;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .detail-list > div:nth-child(odd) {
    border-right: 0;
  }
}

/* 部品报价 */

.quotes-section {
  margin-top: 28px;
}

.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.section-heading-row h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 17px;
}

.section-heading-row p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.quotes-card {
  overflow: hidden;
}

.quote-table th,
.quote-table td {
  white-space: nowrap;
}

.quote-table td:nth-child(2) {
  min-width: 210px;
  white-space: normal;
}

.amount-cell {
  color: #101828 !important;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}

.latest-quote-price {
  margin-top: 18px;
  color: #101828;
  font-size: 28px;
  font-weight: 720;
  letter-spacing: -0.03em;
}

.latest-quote-label {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.latest-quote-info {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.latest-quote-info div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.latest-quote-info dt {
  color: var(--text-muted);
  font-size: 12px;
}

.latest-quote-info dd {
  margin: 0;
  color: #344054;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.side-empty-state {
  margin: 18px 0;
  padding: 16px;
  border: 1px dashed #d0d5dd;
  border-radius: 8px;
  color: var(--text-muted);
  text-align: center;
}

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

.compact-empty-state {
  min-height: 260px;
}

.quote-form-card {
  max-width: 980px;
}

.status-warning {
  background: #fffaeb;
  color: #b54708;
}

@media (max-width: 720px) {
  .section-heading-row {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading-row .primary-button {
    width: 100%;
  }
}

/* 项目采购 */

.project-filter-bar {
  flex-wrap: wrap;
}

.page-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-table th,
.project-table td,
.purchase-line-table th,
.purchase-line-table td {
  white-space: nowrap;
}

.project-table td:first-child,
.purchase-line-table td:first-child {
  white-space: normal;
}

.amount-negative {
  color: #b42318;
}

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

.summary-card,
.project-remark-card,
.line-reference-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

.summary-card {
  display: flex;
  min-height: 130px;
  flex-direction: column;
  padding: 18px;
}

.summary-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.summary-value {
  margin-top: 11px;
  color: #101828;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.summary-hint {
  margin-top: auto;
  padding-top: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.project-remark-card {
  margin-bottom: 28px;
  padding: 18px 20px;
}

.project-remark-card strong {
  color: #344054;
  font-size: 13px;
}

.project-remark-card p {
  margin: 8px 0 0;
  color: var(--text-muted);
}

.project-form-card {
  max-width: 860px;
}

.part-search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.project-part-search-box {
  max-width: 620px;
}

.project-part-search-box input {
  height: auto;
  padding: 0;
}

.add-part-table th,
.add-part-table td {
  white-space: nowrap;
}

.add-part-table td:first-child,
.add-part-table td:nth-child(2) {
  white-space: normal;
}

.small-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 13px;
}

.line-reference-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 20px;
}

.line-reference-card > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  padding: 16px 18px;
  border-right: 1px solid var(--border);
}

.line-reference-card > div:last-child {
  border-right: 0;
}

.line-reference-card strong {
  overflow: hidden;
  color: #344054;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .project-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .line-reference-card > div:nth-child(2) {
    border-right: 0;
  }

  .line-reference-card > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 720px) {
  .page-action-group {
    width: 100%;
  }

  .page-action-group > * {
    flex: 1;
  }

  .project-summary-grid,
  .line-reference-card {
    grid-template-columns: 1fr;
  }

  .line-reference-card > div {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .line-reference-card > div:last-child {
    border-bottom: 0;
  }

  .part-search-form {
    align-items: stretch;
    flex-direction: column;
  }

  .project-part-search-box {
    width: 100%;
    max-width: none;
  }
}

/* 项目采购：详情页精简布局 */

.project-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.project-title-row .page-title {
  margin-right: 2px;
}

.project-type-label {
  color: var(--text-muted);
  font-size: 14px;
}

.purchase-list-section {
  margin-top: 28px;
}

/* 项目采购：添加部品目录 */

.part-catalog-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

.catalog-filter-form {
  padding: 22px;
  border-bottom: 1px solid var(--border);
  background: #fcfcfd;
}

.catalog-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.catalog-search-box {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 9px;
  min-width: 260px;
  height: 44px;
  padding: 0 13px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.catalog-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.14);
}

.catalog-search-box input,
.catalog-search-box input.form-input {
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}

.catalog-search-box input:focus,
.catalog-search-box input.form-input:focus {
  border: 0;
  box-shadow: none;
}

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

.catalog-filter-field label {
  display: block;
  margin-bottom: 7px;
  color: #475467;
  font-size: 12px;
  font-weight: 650;
}

.catalog-filter-field .form-select {
  min-width: 0;
}

.catalog-filter-hint {
  margin: 13px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.catalog-result-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
}

.catalog-result-header h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 16px;
}

.catalog-result-header p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.catalog-result-count {
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
}

.add-part-table th,
.add-part-table td {
  white-space: normal;
}

.add-part-table td:first-child {
  min-width: 180px;
}

.add-part-table td:nth-child(2) {
  min-width: 160px;
}

.add-part-table td:nth-child(3) {
  min-width: 180px;
}

.add-part-table td:nth-child(4) {
  min-width: 130px;
}

.add-part-table td:nth-child(5) {
  min-width: 160px;
}

@media (max-width: 1100px) {
  .catalog-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .catalog-search-row {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .catalog-search-box {
    flex-basis: 100%;
  }
}

@media (max-width: 600px) {
  .catalog-filter-grid {
    grid-template-columns: 1fr;
  }

  .catalog-search-row > .primary-button,
  .catalog-search-row > .secondary-button {
    flex: 1;
  }
}

/* 项目详情：金额数字面板 */

.project-metrics-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.project-metric {
  position: relative;
  min-width: 0;
  min-height: 126px;
  padding: 21px 24px;
  border-right: 1px solid var(--border);
}

.project-metric:last-child {
  border-right: 0;
}

.project-metric-label {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}

.project-metric-value {
  display: block;
  margin-top: 13px;
  overflow: hidden;
  color: #101828;
  font-size: clamp(20px, 2vw, 29px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-metric small {
  display: block;
  min-height: 17px;
  margin-top: 7px;
  color: var(--text-light);
  font-size: 12px;
}

.metric-warning {
  color: #b54708 !important;
}

.metric-over-budget {
  color: #b42318 !important;
}

.catalog-image-column {
  width: 68px;
}

.catalog-part-image {
  display: block;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f8fafc;
  object-fit: cover;
}

.catalog-part-image-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 18px;
}

@media (max-width: 1050px) {
  .project-metrics-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-metric:nth-child(2) {
    border-right: 0;
  }

  .project-metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 620px) {
  .project-metrics-panel {
    grid-template-columns: 1fr;
  }

  .project-metric,
  .project-metric:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .project-metric:last-child {
    border-bottom: 0;
  }
}

/* 部品列表：统一自动筛选区域 */

.part-list-filter-form {
  border-bottom: 1px solid var(--border);
  background: #fcfcfd;
}

.part-list-filter-form + .table-wrapper {
  border-top: 0;
}

/* 项目列表：统一自动筛选区域 */

.project-list-filter-form {
  border-bottom: 1px solid var(--border);
  background: #fcfcfd;
}

.project-filter-grid {
  grid-template-columns: repeat(2, minmax(0, 240px));
}

.project-list-filter-form + .table-wrapper {
  border-top: 0;
}

@media (max-width: 600px) {
  .project-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* 库存管理 */

.inventory-filter-form,
.document-filter-form {
  border-bottom: 1px solid var(--border);
  background: #fcfcfd;
}

.stock-balance-table th,
.stock-balance-table td,
.document-table th,
.document-table td,
.stock-document-detail-table th,
.stock-document-detail-table td {
  white-space: nowrap;
}

.stock-balance-table td:nth-child(2),
.stock-balance-table td:nth-child(3),
.document-table td:nth-child(4),
.document-table td:nth-child(5) {
  white-space: normal;
}

.inventory-header-card {
  max-width: 980px;
}

.inventory-lines-card {
  margin-top: 20px;
  overflow: hidden;
  padding: 0;
}

.inventory-lines-card .section-heading-row {
  margin: 0;
  padding: 22px 24px 16px;
}

.stock-line-form-table {
  min-width: 800px;
}

.stock-line-form-table td {
  vertical-align: top;
}

.stock-line-form-table .form-select,
.stock-line-form-table .form-input {
  min-width: 150px;
}

.stock-line-form-table td:first-child .form-select {
  min-width: 330px;
}

.quantity-column {
  width: 130px;
}

.delete-line-column {
  width: 80px;
  text-align: right;
}

.line-remove-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #b42318;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.line-remove-button:hover {
  text-decoration: underline;
}

.line-delete-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #b42318;
  cursor: pointer;
  font-size: 13px;
}

.inventory-form-actions {
  max-width: 980px;
}

.document-info-panel {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.document-info-panel > div {
  display: flex;
  min-width: 180px;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  padding: 18px 21px;
  border-right: 1px solid var(--border);
}

.document-info-panel > div:last-child {
  border-right: 0;
}

.document-info-panel span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}

.document-info-panel strong {
  overflow: hidden;
  color: #344054;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 800px) {
  .document-info-panel > div {
    min-width: 50%;
    border-bottom: 1px solid var(--border);
  }

  .document-info-panel > div:nth-child(even) {
    border-right: 0;
  }
}

@media (max-width: 560px) {
  .document-info-panel > div {
    min-width: 100%;
    border-right: 0;
  }
}

/* 项目采购入库 */

.purchase-receipt-table th,
.purchase-receipt-table td {
  white-space: nowrap;
}

.purchase-receipt-table td:nth-child(2) {
  min-width: 240px;
  white-space: normal;
}

.receipt-select-column {
  width: 96px;
  text-align: center;
}

.receipt-quantity-column {
  width: 190px;
}

.receipt-quantity-column .form-input {
  min-width: 120px;
}

.receipt-select-column .checkbox-input {
  width: 17px;
  height: 17px;
}

/* 库存首页操作入口 */

.page-action-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 4px;
  white-space: nowrap;
}

/* 库存冲销 */

.secondary-button.danger-button {
  color: #b42318;
  border-color: #f0b4ae;
  background: #fff;
}

.secondary-button.danger-button:hover {
  color: #912018;
  border-color: #d92d20;
  background: #fff5f4;
}

.reversal-notice {
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 1px solid #fedf89;
  border-radius: 10px;
  background: #fffaeb;
  color: #7a2e0e;
  line-height: 1.7;
}

.reversal-notice p {
  margin: 6px 0 0;
}

/* 库存操作菜单 */

.stock-actions {
  align-items: center;
}

.stock-action-menu {
  position: relative;
}

.stock-action-menu > summary {
  list-style: none;
  user-select: none;
}

.stock-action-menu > summary::-webkit-details-marker {
  display: none;
}

.stock-action-menu > summary:focus-visible {
  outline: 3px solid rgba(70, 95, 255, 0.2);
  outline-offset: 3px;
}

.stock-action-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: 250px;
  max-width: calc(100vw - 40px);
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.12);
}

.stock-action-dropdown a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 7px;
  color: var(--text-main);
  text-decoration: none;
}

.stock-action-dropdown a:hover,
.stock-action-dropdown a:focus-visible {
  background: #f2f4f7;
}

.stock-action-dropdown strong {
  font-size: 13px;
  font-weight: 600;
}

.stock-action-dropdown span {
  color: var(--text-muted);
  font-size: 12px;
}

.stock-operation-note {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-left: 3px solid #64748b;
  border-radius: 10px;
  background: #f8fafc;
}

.stock-operation-note strong {
  color: var(--text-main);
  font-size: 14px;
}

.stock-operation-note span {
  color: var(--text-muted);
  line-height: 1.7;
}

@media (max-width: 720px) {
  .stock-actions .stock-action-menu > summary {
    width: 100%;
  }

  .stock-actions .stock-action-dropdown {
    right: auto;
    left: 0;
  }
}

/* 库存单据：仓库候选联动 */

.warehouse-options-status {
  margin: 0;
  padding: 0 24px 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.warehouse-options-status:empty {
  display: none;
}

.warehouse-options-status.field-error {
  color: #b42318;
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.stock-line-form-table select:disabled {
  background: #f2f4f7;
  cursor: wait;
}

/* 盘点调整 */

.stocktake-header {
  max-width: none;
  margin-bottom: 20px;
}

.stocktake-header > label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.stocktake-header > select {
  max-width: 420px;
}

.stocktake-header .form-field {
  margin-bottom: 0;
}

.stocktake-part {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.stocktake-part img {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  object-fit: contain;
  background: white;
}

.stocktake-count-cell {
  width: 180px;
  min-width: 150px;
}

.stocktake-difference {
  min-width: 130px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stocktake-footer {
  position: sticky;
  bottom: 0;
  align-items: center;
  padding: 16px 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 -3px 12px rgba(16, 24, 40, 0.04);
  z-index: 5;
}

.stocktake-footer > span {
  margin-right: auto;
  color: var(--text-muted);
  font-size: 13px;
}

.stocktake-no-match {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
}

.stocktake-result {
  margin-bottom: 20px;
}

#stocktake-rows tr[hidden],
#stocktake-no-match[hidden] {
  display: none;
}

/* 业务操作反馈 */

.alert-warning {
  border: 1px solid #fedf89;
  background: #fffaeb;
  color: #7a2e0e;
}

.alert-error {
  border: 1px solid #fecdca;
  background: #fef3f2;
  color: #b42318;
}

.alert-info {
  border: 1px solid #d0d5dd;
  background: #f8fafc;
  color: #344054;
}

/* 主控板台账 */

.board-part-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
}

.board-part-cell > img,
.board-part-cell > .part-image-placeholder {
  flex-shrink: 0;
}

.board-interface-line {
  display: flex;
  min-height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 3px;
}

.board-mac {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  white-space: nowrap;
}

.board-table th {
  white-space: nowrap;
}

/* 主控板登记与编辑 */

.board-form-card {
  max-width: 980px;
}

.board-interface-form + .board-interface-form {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.board-interface-form h3 {
  margin: 0 0 18px;
  color: var(--text-main);
  font-size: 14px;
}

.board-form-card input:disabled,
.board-form-card select:disabled {
  color: #475467;
  background: #f2f4f7;
  cursor: not-allowed;
  opacity: 1;
}

/* 主板关联已有库存 */

.board-association-form {
  margin-top: 20px;
  max-width: 680px;
}

/* 库存明细选择具体主板 */

.board-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  padding: 22px;
}

.board-selection-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}

.board-selection-card:hover {
  border-color: #98a2b3;
  background: #f8fafc;
}

.board-selection-card:has(input:checked) {
  border-color: #475467;
  background: #f2f4f7;
}

.board-selection-card input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #182230;
}

.board-selection-card[hidden],
#board-selection-no-match[hidden] {
  display: none;
}

.board-selection-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 20px;
  color: var(--text-muted);
}

#board-selection-count {
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
}

.stock-selected-boards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
