/* CNC 工作区独立样式：不依赖 3D 打印工作区的样式表，可单独演进。 */

:root {
  color-scheme: light;
  --font-ui: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  --ink: #152b4a;
  --muted: #7185a1;
  --line: #d8e3f2;
  --soft-line: #e9f0f9;
  --paper: #ffffff;
  --canvas: #f1f5fc;
  --navy: #14233c;
  --navy-soft: #1d3f60;
  --blue: #1677ff;
  --blue-dark: #0e68e5;
  --teal: #117f79;
  --amber: #b7791f;
  --amber-soft: #fff6df;
  --danger: #c4323b;
  --danger-soft: #fff7f7;
  --shadow: 0 14px 40px rgba(16, 24, 40, 0.08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.hidden { display: none !important; }

body {
  margin: 0;
  /* 外壳样式 shell.css 已统一把 html/body 的 min-width 设为 0（两个工作区一起收缩），
     这里不再单独限制页面宽度。 */
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-ui);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

button, input, select, textarea { font: inherit; font-variant-numeric: tabular-nums; }
button { cursor: pointer; }

.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

/* 登录 */
.auth-screen { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 32px; background: linear-gradient(145deg, #edf3fc 0%, #f7f9fc 52%, #eaf1fb 100%); }
.auth-card { width: min(460px, 100%); padding: 38px 40px 36px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 24px 70px rgba(20, 35, 60, .13); }
.auth-brand { display: flex; flex-direction: column; padding-bottom: 26px; border-bottom: 1px solid var(--soft-line); }
.auth-brand strong { color: var(--navy); font-size: 26px; }
.auth-brand span { margin-top: 6px; color: var(--muted); font-size: 14px; }
.auth-card h1 { margin: 26px 0 8px; color: var(--navy); font-size: 26px; }
.auth-card > p { margin: 0 0 24px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.auth-form { display: grid; gap: 18px; }
.auth-form label span { display: block; margin-bottom: 8px; color: #294568; font-size: 14px; font-weight: 700; }
.auth-form input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #cbd8e9; border-radius: 10px; outline: 0; background: #fbfdff; font-size: 15px; }
.auth-form input:focus { border-color: #4c91ed; box-shadow: 0 0 0 4px rgba(22, 119, 255, .1); }
.auth-form button { height: 49px; border: 0; border-radius: 10px; color: #fff; background: var(--blue); font-size: 16px; font-weight: 700; }
.auth-form button:hover { background: var(--blue-dark); }
.auth-form button:disabled { cursor: wait; opacity: .65; }
.auth-message { min-height: 22px; color: var(--danger); font-size: 13px; text-align: center; }

/* 外壳（侧边栏、品牌区、工作区切换、模块导航）与 3D 打印工作区共用 shell.css。 */

/* 内容区内边距必须与 3D 打印工作区逐断点一致：状态栏是内容区的第一行，
   这里的左右内边距直接决定它的宽度（曾经 34px 对 24px，宽度差 20–40px）。
   取值沿用 3D 打印 styles.css 末尾的响应式基准：24 / 18 / 14 / 14 / 10。 */
.main-content { display: block; height: 100vh; padding: 24px; overflow: auto; background: var(--canvas); }
.content-container { max-width: 1420px; margin: 0 auto; }

/* RFQ 状态栏：横向铺满内容区（与 3D 打印一致）。主区域重绘只替换 #cncMain，
   状态栏不会被冲掉。 */
.main-content > .auth-session-bar { margin: 0 0 18px; }

@media (max-width: 1360px) {
  .main-content { padding: 18px; }
}

@media (max-width: 1100px) {
  .main-content { padding: 14px; }
}

@media (max-width: 900px) {
  .main-content { padding: 14px; }
}

@media (max-width: 640px) {
  .main-content { padding: 10px; }
}

/* 按钮 */
.button { padding: 10px 16px; border: 1px solid transparent; border-radius: 11px; font-size: 13px; font-weight: 700; transition: .18s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16, 24, 40, .1); }
.button.primary { color: #fff; background: var(--blue); }
.button.primary:hover { background: var(--blue-dark); }
.button.ghost { border-color: var(--line); color: #475467; background: #fff; }
.button.danger { border-color: #fac7ca; color: var(--danger); background: var(--danger-soft); }
.button.small { padding: 7px 12px; font-size: 12px; }
.button:disabled { cursor: not-allowed; opacity: .6; transform: none; box-shadow: none; }

/* 卡片与统计 */
.card { margin-bottom: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 22px; border-bottom: 1px solid var(--soft-line); }
.card-header h2 { margin: 0; color: var(--navy); font-size: 18px; }
.card-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.card-header-actions { display: flex; align-items: center; gap: 8px; }
.card-body { padding: 18px 22px 22px; }
.card-body.tight { padding: 12px 14px 16px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.stat-card span { display: block; color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; margin-top: 8px; color: var(--navy); font-size: 26px; }
.stat-card small { color: #98a2b3; font-size: 11px; }

/* 供应商名单 */
.roster { display: grid; gap: 12px; margin-bottom: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.roster-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.roster-toolbar input[type="search"] { flex: 1 1 260px; min-width: 220px; padding: 10px 12px; border: 1px solid #cdd9e9; border-radius: 10px; background: #fbfdff; }
.roster-count { color: var(--muted); font-size: 12px; }
.roster-items { display: flex; flex-wrap: wrap; gap: 8px; }
.roster-item { display: grid; gap: 3px; min-width: 168px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fbfdff; text-align: left; }
.roster-item strong { font-size: 13px; font-weight: 700; }
.roster-item small { color: var(--muted); font-size: 11px; }
.roster-item:hover { border-color: #b9d2f5; }
.roster-item.active { border-color: var(--blue); color: #fff; background: var(--blue); box-shadow: 0 8px 18px rgba(22, 119, 255, .22); }
.roster-item.active small { color: rgba(255, 255, 255, .82); }
.roster-empty { color: var(--muted); font-size: 12px; }

/* 详情网格 */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.detail-item { padding: 12px 14px; border: 1px solid var(--soft-line); border-radius: 12px; background: #fbfdff; }
.detail-item.wide { grid-column: 1 / -1; }
.detail-item span { display: block; color: var(--muted); font-size: 11px; }
.detail-item strong { display: block; margin-top: 6px; color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.6; white-space: pre-wrap; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 9px; border-radius: 999px; color: #2164b0; background: #eef5ff; font-size: 11px; font-weight: 700; }
.tag.muted { color: #5b6b81; background: #f2f5f9; }
.tag.core { color: #8a5a10; background: var(--amber-soft); }

/* 表格 */
.table-wrap { overflow: auto; }
table.data-table { width: 100%; border-collapse: collapse; min-width: 900px; }
table.data-table th, table.data-table td { padding: 12px 12px; border-bottom: 1px solid var(--soft-line); color: #294568; text-align: left; font-size: 13px; vertical-align: top; }
table.data-table th { color: var(--muted); background: #f8fbff; font-size: 12px; font-weight: 700; white-space: nowrap; }
table.data-table tbody tr:hover { background: #f7fbff; }
table.data-table td.actions { white-space: nowrap; }
table.data-table td .row-actions { display: flex; gap: 6px; }
.cell-strong { color: var(--navy); font-weight: 700; }
.cell-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }

/* 标签页 */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab { padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; color: #475467; background: #fff; font-size: 13px; font-weight: 700; }
.tab em { margin-left: 8px; color: var(--muted); font-size: 11px; font-style: normal; }
.tab.is-active { border-color: var(--blue); color: #fff; background: var(--blue); }
.tab.is-active em { color: rgba(255, 255, 255, .82); }

/* 表单 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 20px 26px 24px; }
.form-grid.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field.pair-start { grid-column-start: 1; }
.field span { color: #475467; font-size: 12px; font-weight: 700; }
.field b { color: var(--danger); }
.field input, .field select, .field textarea { width: 100%; padding: 10px 11px; border: 1px solid #cdd9e9; border-radius: 10px; outline: 0; color: var(--ink); background: #fbfdff; font-size: 13px; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #70a6eb; box-shadow: 0 0 0 3px rgba(22, 119, 255, .1); }
.field small { color: var(--muted); font-size: 11px; line-height: 1.6; }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 8px 0 2px; }
.check-grid label { display: inline-flex; align-items: center; gap: 6px; color: #294568; font-size: 12px; }
.checkbox-field { flex-direction: row; align-items: center; gap: 8px; }

/* 弹窗与抽屉 */
dialog { padding: 0; border: 0; border-radius: 16px; box-shadow: 0 28px 80px rgba(16, 24, 40, .25); }
dialog::backdrop { background: rgba(10, 29, 42, .5); backdrop-filter: blur(2px); }
.modal { width: min(680px, calc(100vw - 40px)); max-height: calc(100vh - 48px); }
.modal form { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.drawer { width: min(1080px, calc(100vw - 40px)); max-height: calc(100vh - 48px); }
.drawer form { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.modal-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 26px 18px; border-bottom: 1px solid var(--soft-line); background: #fff; }
.modal-header h2 { margin: 0; color: var(--navy); font-size: 19px; }
.modal-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.close-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; color: #475467; background: #fff; font-size: 18px; line-height: 1; }
.modal-actions { position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: flex-end; gap: 10px; padding: 16px 26px; border-top: 1px solid var(--soft-line); background: #fff; }
.modal-body { padding: 20px 26px 24px; overflow: auto; }

.empty-state { padding: 64px 24px; border: 1px dashed #ccd2d9; border-radius: 14px; color: var(--muted); background: rgba(255, 255, 255, .6); text-align: center; }
.empty-state h2 { margin: 0 0 8px; color: var(--navy); font-size: 18px; }
.empty-state p { margin: 0 auto 18px; max-width: 460px; font-size: 13px; line-height: 1.7; }

/* 提示条 */
.toast { position: fixed; left: 50%; bottom: 34px; z-index: 1200; padding: 12px 20px; border-radius: 12px; color: #fff; background: rgba(20, 35, 60, .92); font-size: 13px; opacity: 0; transform: translate(-50%, 12px); transition: .22s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

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

/* ------------------------------------------------------------------ 模块页头、页内标签与工具条 */

.module-hero { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.module-hero-intro { padding: 28px 30px; }
.module-hero-eyebrow { margin: 0 0 10px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.module-hero-intro h1 { margin: 0; color: var(--navy); font-size: 32px; line-height: 1.15; letter-spacing: -.01em; }
.module-hero-intro > p { max-width: 780px; margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.module-current-section { display: inline-flex; width: auto; margin: 15px 0 0 !important; padding: 7px 11px; border-radius: 9px; color: #1b68c8 !important; background: #eaf3ff; font-size: 12px !important; font-weight: 700; line-height: 1.2; }
.module-hero-status { display: flex; flex-direction: column; justify-content: center; padding: 24px; border-left: 1px solid var(--soft-line); background: #f8fbff; }
.module-hero-status span { color: #7890b0; font-size: 12px; }
.module-hero-status strong { margin-top: 8px; color: #173e70; font-size: 20px; }
.module-hero-status p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

.module-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.module-tab { padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; color: #294568; background: #fff; font-size: 13px; font-weight: 700; transition: .18s ease; }
.module-tab:hover { border-color: #8db8f2; background: #f5f9ff; }
.module-tab.is-active { color: #fff; border-color: var(--blue); background: var(--blue); }

.module-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.module-toolbar input[type="search"] { flex: 0 1 340px; min-width: 220px; padding: 10px 12px; border: 1px solid #cdd9e9; border-radius: 10px; background: #fbfdff; }
.module-toolbar-spacer { flex: 1 1 auto; }

@media (max-width: 1180px) {
  .module-hero { grid-template-columns: 1fr; }
  .module-hero-status { border-left: 0; border-top: 1px solid var(--soft-line); }
}

/* ==================================================================
   内容区组件与 3D 打印工作区对齐
   材料库：工具条 + 左侧材料列表 + 右侧材料详情（材料名称与牌号只在这里维护）
   供应商库：页头 + 供应商名单 + 基础信息 + 加工能力
   取值沿用 3D 打印 styles.css 的同名规则，两个工作区视觉一致。
   ================================================================== */

.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid #e1e9f4; }
.page-header h1 { margin: 0; color: var(--ink); font-size: 38px; font-weight: 700; letter-spacing: -.02em; }
.page-header .eyebrow { margin: 0 0 8px; color: #4d78aa; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.page-header .subtitle { margin: 9px 0 0; color: var(--muted); font-size: 14px; }
.header-actions { display: flex; gap: 10px; }
.header-actions .button { white-space: nowrap; }
.text-button { border: 0; padding: 6px 8px; color: #2164b0; background: transparent; font-size: 12px; font-weight: 700; }
.text-button.danger { color: var(--danger); }

/* 材料库：工具条 + 左侧材料列表 + 右侧材料详情 */
.cnc-material-page { display: grid; gap: 18px; }
.cnc-toolbar { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 74px; padding: 14px 18px; border: 1px solid #d5e0f2; border-radius: 16px; background: #fff; }
.cnc-toolbar select, .cnc-toolbar input[type="search"] { width: 100%; min-width: 0; padding: 13px 14px; border: 1px solid #cdd9e9; border-radius: 10px; color: #294568; background: #f8faff; font-size: 14px; }
.cnc-toolbar .button { padding: 13px 17px; white-space: nowrap; }
.cnc-split-page { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 24px; align-items: start; }
.cnc-list-shell { min-width: 0; padding: 20px 16px; border: 1px solid #d5e0f2; border-radius: 18px; background: #fff; }
.cnc-list-items { display: grid; grid-template-columns: 1fr; gap: 10px; max-height: calc(100vh - 300px); overflow: auto; padding-right: 4px; }
.cnc-detail-panel { min-width: 0; }
.cnc-empty-list { padding: 36px 15px; color: var(--muted); font-size: 13px; line-height: 1.7; text-align: center; }

.cnc-list-items .material-group { grid-column: 1 / -1; margin: 0 0 18px; }
.cnc-list-items .material-group-heading { width: 100%; display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 0 12px; border: 0; border-radius: 10px; color: #245a94; background: #edf4fc; text-align: left; }
.cnc-list-items .material-group-heading:hover { color: #174a83; background: #e5f0fc; }
.cnc-list-items .group-heading-label { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.cnc-list-items .group-chevron { display: inline-block; width: 12px; color: #5d82ad; font-size: 16px; line-height: 1; transform: rotate(0deg); transition: transform .18s ease; }
.cnc-list-items .material-group.collapsed .group-chevron { transform: rotate(-90deg); }
.cnc-list-items .material-group.collapsed .material-group-items { display: none; }
.cnc-list-items .process-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 800; letter-spacing: .08em; }
.cnc-list-items .group-count { flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; color: #56789f; background: #fff; font-size: 11px; font-weight: 700; }
.cnc-list-items .material-group-items { padding: 5px 4px 0 14px; }
.cnc-list-items .context-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 42%); align-items: center; gap: 14px; width: 100%; min-height: 54px; margin: 0; padding: 10px 12px; border: 0; border-bottom: 1px solid #edf1f6; border-radius: 0; color: #294467; background: #fff; text-align: left; }
.cnc-list-items .context-item:hover { background: #f5f9ff; }
.cnc-list-items .context-item.active { border-radius: 9px; background: #eef0f3; box-shadow: inset 3px 0 0 #7b8798; }
.cnc-list-items .material-list-name { overflow: hidden; color: #243c60; font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.cnc-list-items .material-list-grade { overflow: hidden; color: #8497b0; font-size: 12px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.cnc-list-items .material-list-grade.empty { display: none; }
.cnc-list-items .context-item.active .material-list-name { color: #243c60; }
.cnc-list-items .context-item.active .material-list-grade { color: #667085; font-weight: 600; }

/* 材料详情：页头 + 信息卡片 */
.material-information-page { max-width: none; }
.material-information-page > .page-header { margin-bottom: 20px; }
.material-information-card { margin: 0 0 18px; padding: 24px 28px 28px; border: 1px solid #d9e3f2; border-radius: 20px; background: #fff; box-shadow: 0 5px 18px rgba(30,67,112,.045); }
.material-information-card > header { margin-bottom: 18px; }
.material-information-card h2 { margin: 0; color: #0e2747; font-size: 24px; letter-spacing: -.02em; }
.material-information-card header p { margin: 6px 0 0; color: #6480a7; font-size: 13px; }
.material-read-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
.material-read-field { min-width: 0; padding: 4px 0 12px; border-bottom: 1px solid #edf2f8; }
.material-read-field span, .material-long-value > span { display: block; margin-bottom: 7px; color: #6280a8; font-size: 13px; }
.material-read-field strong { display: block; color: #123d72; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.material-long-value { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: #f7faff; }
.material-long-value p { min-height: 26px; margin: 0; color: #24486f; line-height: 1.7; white-space: pre-wrap; }

/* 供应商库：页头 + 名单 + 基础信息 + 加工能力 */
.supplier-workspace-page { max-width: none; width: 100%; padding-bottom: 28px; }
.supplier-roster-section, .supplier-workspace-card { margin-top: 16px; padding: 20px 22px; border: 1px solid #d8e3f2; border-radius: 17px; background: #fff; box-shadow: 0 5px 18px rgba(16,24,40,.04); }
.supplier-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.supplier-section-title h2 { margin: 0; color: #173e70; font-size: 18px; }
.supplier-section-title span { color: #8598b4; font-size: 12px; }
.supplier-section-label { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.supplier-roster-search { flex: 0 1 340px; min-width: 180px; }
.supplier-roster-search input { width: 100%; padding: 10px 13px; border: 1px solid #d1dced; border-radius: 10px; outline: 0; color: #253b5b; background: #f8faff; font-size: 13px; }
.supplier-roster-search input:focus { border-color: #7aabef; box-shadow: 0 0 0 3px rgba(22,119,255,.1); }
.supplier-roster { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.supplier-roster-item { flex: 0 0 auto; min-width: 150px; padding: 12px 15px; border: 1px solid #d6e2f1; border-radius: 13px; color: #244d7d; background: #f8fbff; text-align: left; }
.supplier-roster-item:hover { border-color: #8fb9ef; background: #edf5ff; }
.supplier-roster-item.active { border-color: #1677ff; color: #fff; background: #1677ff; box-shadow: 0 8px 16px rgba(22,119,255,.2); }
.supplier-roster-item strong, .supplier-roster-item small { display: block; }
.supplier-roster-item strong { font-size: 14px; }
.supplier-roster-item small { margin-top: 5px; color: #7890ad; font-size: 11px; }
.supplier-roster-item.active small { color: #e5f0ff; }
.supplier-roster-empty { color: #8ba0ba; font-size: 13px; }
.supplier-workspace-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.supplier-workspace-card-header h2 { margin: 3px 0 5px; color: #123d72; font-size: 23px; }
.supplier-workspace-card-header p { margin: 0; color: #7890ad; font-size: 12px; }
.supplier-workspace-card-actions, .supplier-capability-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.supplier-basic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 18px; }
.supplier-basic-item { min-width: 0; padding: 11px 0; border-bottom: 1px solid #edf2f8; }
.supplier-basic-item.wide { grid-column: 1 / -1; }
.supplier-basic-item.pair-wide { grid-column: span 3; }
.supplier-basic-item span { display: block; margin-bottom: 6px; color: #7890ad; font-size: 12px; }
.supplier-basic-item strong { display: block; color: #1d4778; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.supplier-capability-summary > span { padding: 6px 10px; border-radius: 8px; color: #2164b0; background: #eef6ff; font-size: 12px; font-weight: 800; }
.supplier-process-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; border-bottom: 1px solid #e6eef8; }
.supplier-process-tab { flex: 0 0 auto; padding: 9px 13px; border: 1px solid #d7e3f2; border-radius: 10px; color: #31567f; background: #f9fbff; font-weight: 800; }
.supplier-process-tab:hover { border-color: #9cc1ef; background: #f0f6ff; }
.supplier-process-tab.is-active { border-color: #1677ff; color: #fff; background: #1677ff; }
.supplier-process-tab em { margin-left: 6px; font-style: normal; opacity: .75; }
.supplier-capability-table-wrap { margin-top: 16px; overflow-x: auto; }
.supplier-capability-table { width: 100%; min-width: 1180px; border-collapse: collapse; }
.supplier-capability-table th { padding: 11px 10px; border-bottom: 1px solid #dfe9f5; color: #7890ad; background: #f8fbff; font-size: 12px; font-weight: 800; text-align: left; white-space: nowrap; }
.supplier-capability-table td { padding: 13px 10px; border-bottom: 1px solid #edf2f8; color: #31567f; font-size: 13px; vertical-align: top; }
.supplier-capability-table strong, .supplier-capability-table small { display: block; }
.supplier-capability-table strong { color: #173e70; }
.supplier-capability-table small { margin-top: 4px; color: #91a4bd; }
.supplier-postprocess-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.supplier-postprocess-tags span { padding: 3px 7px; border-radius: 6px; color: #2164b0; background: #eef6ff; font-size: 11px; white-space: nowrap; }
.supplier-postprocess-tags em { color: #91a4bd; font-style: normal; }
.supplier-capability-actions { white-space: nowrap; }
.supplier-capability-actions .text-button { margin-right: 8px; }
.supplier-process-empty { padding: 28px 0; color: #8ba0ba; text-align: center; }
.supplier-capability-empty { padding: 30px 20px; border: 1px dashed #d8e3f2; border-radius: 13px; }
.empty-state h3 { margin: 0 0 8px; color: var(--navy); font-size: 18px; }
.core-label, .normal-label { padding: 5px 9px; border-radius: 16px; font-size: 10px; font-weight: 800; }
.core-label { color: #925c0b; background: #fff1c7; }
.normal-label { color: #475467; background: #eef1f4; }

@media (max-width: 1360px) {
  .cnc-split-page { grid-template-columns: minmax(300px, 32%) minmax(0, 1fr); gap: 16px; }
  .cnc-list-shell { padding: 18px 14px; }
  .cnc-list-items { max-height: calc(100vh - 290px); }
  .page-header h1 { font-size: clamp(28px, 3vw, 38px); overflow-wrap: anywhere; }
  .cnc-toolbar { grid-template-columns: 130px minmax(180px, 1fr) auto; padding: 12px 14px; }
  .cnc-toolbar .button { padding: 12px 13px; }
}

@media (max-width: 1100px) {
  .cnc-split-page { grid-template-columns: minmax(270px, 35%) minmax(0, 1fr); gap: 14px; }
  .cnc-toolbar { display: flex; flex-wrap: wrap; min-height: 0; }
  .cnc-toolbar select { flex: 0 1 150px; }
  .cnc-toolbar input[type="search"] { flex: 1 1 220px; }
  .cnc-list-items { max-height: calc(100vh - 320px); }
  .cnc-list-items .context-item { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .cnc-list-items .material-list-grade { text-align: left; }
  .page-header { gap: 16px; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 900px) {
  .cnc-split-page { grid-template-columns: minmax(0, 1fr); }
  .cnc-list-shell { max-height: 380px; }
  .cnc-list-items { max-height: 285px; }
  .page-header { margin-bottom: 18px; }
  .material-information-card { padding: 20px; }
  .material-information-card h2 { font-size: 21px; }
  .material-read-grid { grid-template-columns: 1fr; }
  .supplier-basic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supplier-basic-item.pair-wide { grid-column: span 1; }
  .supplier-workspace-card-header { flex-direction: column; }
  .supplier-section-title { align-items: stretch; flex-direction: column; }
  .supplier-roster-search { flex: 1 1 auto; min-width: 0; }
}

@media (max-width: 640px) {
  .cnc-toolbar { padding: 10px; gap: 8px; border-radius: 12px; }
  .cnc-toolbar select, .cnc-toolbar input[type="search"] { flex: 1 1 100%; }
  .cnc-toolbar .button { flex: 1 1 100%; }
  .cnc-list-shell { max-height: 350px; padding: 14px 10px; border-radius: 14px; }
  .cnc-list-items { max-height: 260px; }
  .cnc-list-items .material-group-items { padding-left: 5px; }
  .page-header { display: block; padding-bottom: 15px; }
  .page-header h1 { font-size: 27px; line-height: 1.25; }
  .supplier-basic-grid { grid-template-columns: minmax(0, 1fr); }
  .supplier-workspace-page { padding-bottom: 16px; }
  .supplier-roster-section, .supplier-workspace-card { padding: 15px; }
}
