/* 素材工作台（工作 → 素材）专用样式。2026-09-22 素材中台页 → 2026-09-27 员工工作台 V2 增量升级。
 *
 * 通用件（.subnav / .grid / .card.metric / .pill / .empty / .section / .table-wrap / .btn / .kv / .skeleton-*）
 * 全部复用 console.css，这里只补本页用到、console.css 没有覆盖的几件：页签条 + 上传按钮、素材瓦片与网格、
 * 视图切换与分页、素材详情（预览位 / 信息 / 折叠的技术信息）、使用与分发渠道行、入库规则与上传成功卡。
 * 类名一律 ah- 前缀。复用 console.css 的令牌（--space-* / --radius-* / --fs-* / 色板），不重定义档位。
 * 间距：页内区块 20px（--space-5）、卡片之间 12px（--space-3）、卡片内边距 12–16px。
 *
 * CSP: style-src 'self'；脚本端不写内联 style=，动态状态全部靠切换这里定义好的类名。没有外部 url()。
 */

.ah-page { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.ah-page .section { margin: 0; }
.ah-page .ah-page { gap: var(--space-5); }

/* 页签条：左边模块内页签，右边"+ 上传素材" */
.ah-header-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.ah-header-bar .subnav { margin: 0; flex: 1 1 auto; min-width: 0; }
.ah-header-bar > .btn { flex: none; }

.ah-rule {
  background: var(--accent-soft); border: 1px solid #cfe0fb; border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4); font-size: var(--fs-body); line-height: var(--lh-body);
}
.ah-rule strong { display: block; margin-bottom: var(--space-1); }
.ah-list-plain { margin: 0; padding-left: var(--space-5); font-size: var(--fs-body); line-height: var(--lh-body); }
.ah-section-actions { display: flex; justify-content: flex-end; margin-top: var(--space-3); }

/* 素材瓦片与网格（素材库 / 工作台速览） */
.ah-grid { display: grid; gap: var(--space-4, 16px); grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); }
.ah-tile {
  display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3);
  border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface);
  text-decoration: none; color: inherit; min-width: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ah-tile:hover { border-color: var(--line-strong); box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05); }
.ah-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ah-thumb {
  width: 100%; height: 84px; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center;
  color: var(--text-3); font-size: var(--fs-label);
}
.ah-card-name { font-size: var(--fs-body); font-weight: var(--fw-semibold, 600); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ah-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--fs-helper); color: var(--text-3); }
.ah-card-badge {
  display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 4px;
  background: var(--surface-2, #f1f5f9); border: 1px solid var(--line, #e2e8f0);
  font-size: 11px; font-weight: 600; color: var(--text-2);
}

/* 素材库：大厂极简一体化筛选控台、快捷分类胶囊条、工具条、视图切换、分页 */
.ah-filter-panel {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px; margin-bottom: var(--space-4);
  background: var(--surface-2, #f8fafc); border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius-card, 12px);
}
.ah-quick-pills {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line, #e2e8f0);
}
.ah-quick-pills-label {
  font-size: 12px; font-weight: 600; color: var(--text-3, #64748b);
  margin-right: 4px; white-space: nowrap;
}
.ah-quick-pill {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 11px;
  border-radius: 999px; border: 1px solid var(--line-strong, #cbd5e1);
  background: var(--surface, #ffffff); color: var(--text-2, #334155);
  font: inherit; font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all .14s ease;
}
.ah-quick-pill:hover {
  border-color: var(--accent, #2563eb); color: var(--accent, #2563eb); background: var(--accent-soft, #eff6ff);
}
.ah-quick-pill-active, .ah-quick-pill[aria-pressed="true"] {
  background: var(--accent, #2563eb); border-color: var(--accent, #2563eb); color: #ffffff;
  font-weight: 600; box-shadow: 0 1px 3px rgba(37, 99, 235, 0.22);
}
.ah-quick-pill-active:hover, .ah-quick-pill[aria-pressed="true"]:hover {
  background: #1d4ed8; border-color: #1d4ed8; color: #ffffff;
}
.ah-toolbar-row .basis[hidden] { display: none; }
.ah-toolbar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin: 0; }
/* AH-04：素材库按状态 / 类型筛选；满 1000 条窗口的提示 */
.ah-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ah-filter-classification {
  margin: 0; padding: 8px 12px;
  background: var(--surface, #ffffff); border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius-sm, 8px);
}
.ah-filter-field { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; font-size: var(--fs-nav); color: var(--text-2); }
.ah-filter-field > span { font-size: var(--fs-nav); font-weight: var(--fw-medium); color: var(--text-2); white-space: nowrap; flex-shrink: 0; }
.ah-filter, .ah-classification-select, .ah-if-picker select {
  min-height: 36px; height: 36px; padding: 6px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: var(--fs-nav); line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.ah-filter::placeholder { color: var(--text-3); }
.ah-filter:hover, .ah-classification-select:hover, .ah-if-picker select:hover { border-color: #9ca8b8; }
.ah-filter:focus, .ah-filter:focus-visible, .ah-classification-select:focus, .ah-classification-select:focus-visible, .ah-if-picker select:focus, .ah-if-picker select:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.ah-window-note { margin: 0 0 var(--space-3); }
.ah-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.ah-seg[hidden] { display: none; }
.ah-seg-btn {
  display: inline-flex; align-items: center; min-height: var(--control-h-sm); padding: 0 var(--space-4);
  background: var(--surface); color: var(--text-2); font: inherit; font-size: var(--fs-body); border: 0; cursor: pointer;
}
.ah-seg-btn + .ah-seg-btn { border-left: 1px solid var(--line-strong); }
.ah-seg-btn:hover { background: var(--surface-2); color: var(--text); }
.ah-seg-btn[aria-pressed="true"] { background: var(--accent); color: #fff; }
.ah-library-body { min-width: 0; }
.ah-pager { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-4); }
.ah-pager:empty { display: none; }

/* 素材详情：左预览位、右信息；技术信息折叠 */
.ah-detail { display: grid; grid-template-columns: minmax(260px, 2fr) 3fr; gap: var(--space-5); align-items: start; }
.ah-detail-preview {
  min-height: 280px; border: 1px dashed var(--line-strong); border-radius: var(--radius-card); background: var(--surface-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-4);
}
.ah-detail-preview-type { font-size: var(--fs-card); font-weight: var(--fw-semibold); color: var(--text-2); }
.ah-detail-preview-note { font-size: var(--fs-helper); color: var(--text-3); }
.ah-detail-info {
  border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); padding: var(--space-4) var(--space-5); min-width: 0;
}
.ah-detail-info .section-title { margin: 0 0 var(--space-3); }
.ah-tech { border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); padding: var(--space-3) var(--space-4); }
.ah-tech summary { cursor: pointer; font-size: var(--fs-body); font-weight: var(--fw-medium); color: var(--text-2); }
.ah-tech[open] summary { margin-bottom: var(--space-3); }
.ah-tech-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto auto; gap: var(--space-3); align-items: center; padding: var(--space-2) 0; }
.ah-tech-row + .ah-tech-row { border-top: 1px solid var(--line); }
.ah-tech-key { font-size: var(--fs-helper); color: var(--text-3); }
.ah-tech-row .tech-val { overflow-wrap: anywhere; }
.ah-copy-status { font-size: var(--fs-helper); color: var(--text-3); min-width: 4em; }

/* 使用与分发：渠道行 */
.ah-channels { display: grid; gap: var(--space-2); margin-bottom: var(--space-3); }
.ah-channel {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--space-3); align-items: center;
  padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface);
}
.ah-channel-name { font-size: var(--fs-body); font-weight: var(--fw-semibold); }
.ah-channel-detail { font-size: var(--fs-helper); color: var(--text-3); margin-top: 2px; }

/* 上传：可选项说明、成功卡（原型 wizard-success-card） */
.ah-upload-optional { margin-top: var(--space-3); }
.ah-success { border: 1px solid #c9e6d7; background: var(--ok-soft); border-radius: var(--radius-card); padding: var(--space-4); margin-top: var(--space-3); }
.ah-success-title { font-size: var(--fs-card); font-weight: var(--fw-semibold); line-height: var(--lh-card); color: var(--ok); margin-bottom: var(--space-2); }
.ah-success .empty-actions { justify-content: flex-start; }

/* 窄屏：单列 */
@media (max-width: 960px) {
  .ah-detail { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .ah-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ah-channel { grid-template-columns: 1fr; }
  .ah-tech-row { grid-template-columns: 1fr; gap: var(--space-1); }
}
.ah-conditions{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}
.ah-condition{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid var(--border,#dce2e8);border-radius:999px}
.ah-partial-note{margin:4px 0}
.ah-loading{display:grid;gap:8px}
/* 素材库卡片预览：只对 5MB 以内的已就绪图片（console.mjs ASSET_LIBRARY_PREVIEW_MAX_BYTES） */
.ah-thumb-photo { height: 152px; padding: 0; }
.ah-thumb-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ah-keyword { min-width: 160px; }

/* 素材库卡片：一体化卡片外框 + 点击预览按钮 + 分类条 + 跨模块一键联动条 */
.ah-tile-wrap {
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  padding: 10px; background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0); border-radius: var(--radius-card, 12px);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.ah-tile-wrap:hover {
  border-color: var(--line-strong, #cbd5e1);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}
.ah-tile-wrap > .ah-tile {
  border: 0; padding: 2px 2px 0; background: transparent; box-shadow: none;
}
.ah-tile-wrap > .ah-tile:hover { box-shadow: none; }
.ah-thumb-btn { position: relative; cursor: zoom-in; font: inherit; padding: 0; width: 100%; }
.ah-thumb-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ah-thumb-img { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--surface-2, #f3f5f7); }
.ah-thumb-hint { position: absolute; right: var(--space-2); bottom: var(--space-1); font-size: var(--fs-helper); color: var(--text-3); }
.ah-thumb-img + .ah-thumb-hint { background: var(--surface); padding: 0 var(--space-1); border-radius: var(--radius-sm); }

/* C-2 图片事实 / 三态决定（image-facts.mjs，上传详情页与产品图片任务页共用）。类名 ah-if- 前缀。 */
.ah-if-block { display: flex; flex-direction: column; gap: var(--space-3); }
.ah-if-kv dd { word-break: break-all; }
.ah-if-fit { display: flex; flex-direction: column; gap: var(--space-2); }
.ah-if-picker { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.ah-if-picker select { min-width: 240px; }
.ah-if-fit-result { border: 1px solid var(--border, #d9dee7); border-radius: var(--radius-sm); padding: var(--space-3); }
.ah-if-fit-status { font-weight: 600; margin: 0 0 var(--space-1); }
.ah-if-card { margin-top: var(--space-3); }
.ah-if-decisions { margin-top: var(--space-3); }
.ah-if-history p { margin: 0 0 var(--space-1); }
.ah-if-superseded { text-decoration: line-through; opacity: 0.65; }
.ah-if-tags { border: 1px solid var(--border, #d9dee7); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ah-if-tags legend { font-size: var(--fs-small, 12px); padding: 0 var(--space-1); }
.ah-if-tag { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-body); }
.ah-upload-hint { margin: 0 0 var(--space-1); }
.ah-upload-hint.ah-upload-hint-alert { color: var(--danger, #b42318); }

/* B-3 产品关联与高级查询：搜索框、更多条件、详情固定页签、关联表与表单、缺口提示、旧数据检查 */
.ah-search {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin: 0;
  padding: 8px 12px; background: var(--surface, #ffffff); border: 1px solid var(--line, #e2e8f0); border-radius: var(--radius-sm, 8px);
}
.ah-search .ah-filter-field { flex: 1 1 320px; flex-direction: row; align-items: center; }
.ah-search input[type="search"] { flex: 1 1 auto; min-width: 0; }
.ah-search .btn { min-height: 36px; height: 36px; padding: 0 var(--space-4); }
.ah-advanced { border: 1px solid var(--line, #e2e8f0); border-radius: var(--radius-sm, 8px); padding: 6px 12px; margin: 0; background: var(--surface, #ffffff); }
.ah-advanced summary { cursor: pointer; font-size: var(--fs-nav); font-weight: var(--fw-medium); color: var(--text-2); padding: var(--space-1) 0; user-select: none; }
.ah-advanced summary:hover { color: var(--text); }
.ah-advanced .ah-filter-row { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.ah-filter-pending .ah-filter-field { opacity: 0.6; }
.ah-detail-tabbed { display: flex; flex-direction: column; gap: var(--space-4); }
.ah-detail-tabs { flex-wrap: wrap; }
.ah-detail-panels { display: flex; flex-direction: column; gap: var(--space-5); }
.ah-detail-panel[hidden] { display: none; }
.ah-binding-host { min-width: 0; }
.ah-binding-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ah-binding-create { margin-top: var(--space-4); }
.ah-binding-form .ah-filter-row { align-items: end; }
.ah-binding-notice { margin-top: var(--space-2); min-height: 1.5em; }
.ah-gaps { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0; }
.ah-gap { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--fs-body); }
.ah-migration-result { margin-top: var(--space-3); }
/* 素材分类三维度（来源 / 渠道 / 用途）：上传面板下拉、列表里的分类文字与「改分类」 */
.ah-classification-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-3); margin-top: var(--space-3); }
.ah-classification-select { min-height: var(--control-h-sm); max-width: 100%; }
.ah-classify {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px;
  padding: 6px 8px; border-radius: 6px; background: var(--surface-2, #f8fafc); border: 1px solid var(--line, #e2e8f0);
  font-size: var(--fs-helper); color: var(--text-2); min-width: 0;
}
.ah-classify-compact { background: transparent; border: 0; padding: 0; justify-content: flex-start; }
.ah-classify-text { overflow-wrap: anywhere; font-weight: 500; }
.ah-classify-none { font-style: normal; color: var(--text-3); }
.ah-classify .ah-classification-fields { flex: 1 1 100%; }
.ah-classify .form-actions { display: flex; gap: var(--space-2); flex: 1 1 100%; }
/* 卡片底部跨模块一键联动操作条 */
.ah-card-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  padding-top: 6px; border-top: 1px dashed var(--line, #e2e8f0); margin-top: auto;
}
.ah-card-link {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border-radius: 999px; border: 1px solid var(--line, #e2e8f0);
  background: var(--surface, #ffffff); color: var(--text-2, #475569);
  font-size: 11px; font-weight: 500; text-decoration: none;
  transition: all .14s ease;
}
.ah-card-link:hover {
  border-color: var(--accent, #2563eb); color: var(--accent, #2563eb); background: var(--accent-soft, #eff6ff);
}
/* 单选 / 全选 / 反选 / 批量分类与联动控台 */
.ah-batch-host { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--space-3); }
.ah-batch-host:empty { display: none; }
.ah-batch-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 10px 14px; border-radius: var(--radius-card, 12px);
  background: var(--surface, #ffffff); border: 1px solid var(--line, #e2e8f0);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.ah-batch-bar-active {
  background: #f0f7ff; border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}
.ah-batch-left, .ah-batch-right {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.ah-batch-master {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text, #0f172a); cursor: pointer;
  padding-right: 4px; user-select: none;
}
.ah-batch-btn {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px;
  border-radius: 6px; border: 1px solid var(--line-strong, #cbd5e1);
  background: var(--surface, #ffffff); color: var(--text-2, #334155);
  font: inherit; font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all .14s ease;
}
.ah-batch-btn:hover:not(:disabled) {
  border-color: var(--accent, #2563eb); color: var(--accent, #2563eb); background: var(--accent-soft, #eff6ff);
}
.ah-batch-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ah-batch-count {
  font-size: 12px; color: var(--text-3, #64748b); padding-left: 4px;
}
.ah-batch-count-active {
  font-weight: 600; color: var(--accent, #2563eb);
  background: #dbeafe; padding: 2px 10px; border-radius: 999px;
}
.ah-batch-link {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px;
  border-radius: 6px; border: 1px solid var(--line, #e2e8f0);
  background: var(--surface, #ffffff); color: var(--text-2, #334155);
  font-size: 12px; font-weight: 500; text-decoration: none;
  transition: all .14s ease;
}
.ah-batch-link:hover {
  border-color: var(--accent, #2563eb); color: var(--accent, #2563eb); background: var(--accent-soft, #eff6ff);
}
.ah-batch-drawer {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-card, 12px);
  background: var(--surface, #ffffff); border: 1px solid #93c5fd;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}
.ah-batch-drawer-head { font-size: 13px; font-weight: 600; color: var(--text, #0f172a); }
.ah-batch-feedback {
  margin: 0; padding: 8px 12px; border-radius: 8px;
  background: var(--ok-soft, #ecfdf3); border: 1px solid #abefc6; color: var(--ok, #067647);
  font-weight: 500;
}
.ah-card-top {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding-bottom: 2px;
}
.ah-select-label {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line, #e2e8f0);
  background: var(--surface-2, #f8fafc); color: var(--text-2, #475569);
  font-size: 12px; font-weight: 500; cursor: pointer; user-select: none;
  transition: all .14s ease;
}
.ah-select-label:hover { border-color: var(--accent, #2563eb); color: var(--accent, #2563eb); }
.ah-select-label-on {
  background: #dbeafe; border-color: #60a5fa; color: #1d4ed8; font-weight: 600;
}
.ah-select-checkbox {
  width: 14px; height: 14px; margin: 0; accent-color: var(--accent, #2563eb); cursor: pointer;
}
.ah-store-chip {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
  font-size: 11px; font-weight: 500; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ah-store-chip-muted {
  background: var(--surface-2, #f8fafc); border-color: var(--line, #e2e8f0); color: var(--text-3, #64748b);
}
.ah-tile-selected {
  border-color: var(--accent, #2563eb); background: #f8fbff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16);
}
.ah-row-selected { background: #f0f7ff; }
/* 图片处理按钮行（素材详情与处理中心） */
.ah-image-actions { display: grid; gap: var(--space-2); }
.ah-image-actions-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ah-processing-panel { display: grid; gap: var(--space-3); margin-bottom: var(--space-4); }

/* 客户网站与 Shopify 产品一键上架工作台 (SOP) — 大厂极简风格 */
.ah-cw-root { display: grid; gap: 18px; }
.ah-sop-mount { display: grid; gap: 16px; }
.ah-sop-shell {
  display: grid; gap: 16px; padding: 20px; border-radius: 14px;
  background: var(--surface, #ffffff); border: 1px solid var(--line, #e2e8f0);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.ah-sop-topbar {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line, #e2e8f0);
}
.ah-sop-title-wrap { display: grid; gap: 4px; max-width: 780px; }
.ah-sop-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent, #2563eb);
}
.ah-sop-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--text, #0f172a); }
.ah-sop-subtitle { margin: 0; font-size: 13px; color: var(--text-2, #475569); line-height: 1.5; }
.ah-sop-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ah-sop-nav-link { font-size: 12.5px; font-weight: 500; }
.ah-sop-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px;
}
.ah-sop-step {
  display: grid; gap: 3px; padding: 11px 14px; border-radius: 10px;
  background: var(--surface-2, #f8fafc); border: 1px solid var(--line, #e2e8f0);
  font-size: 12.5px; color: var(--text-2, #475569);
}
.ah-sop-step-active {
  background: #eff6ff; border-color: #93c5fd; color: #1e3a8a;
}
.ah-sop-card {
  display: grid; gap: 14px; padding: 16px 18px; border-radius: 12px;
  background: var(--surface, #ffffff); border: 1px solid var(--line, #e2e8f0);
}
.ah-sop-card-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
}
.ah-sop-card-title { margin: 0; font-size: 15px; font-weight: 600; color: var(--text, #0f172a); }
.ah-sop-gov-pill {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; font-size: 11.5px; font-weight: 600;
}
.ah-sop-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px;
}
.ah-sop-subcard {
  display: grid; gap: 8px; padding: 13px 15px; border-radius: 10px;
  background: var(--surface-2, #f8fafc); border: 1px dashed var(--line-strong, #cbd5e1);
}
.ah-sop-file-input { font-size: 12.5px; color: var(--text-2, #475569); }
.ah-sop-fields-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px;
}
.ah-sop-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ah-sop-pack-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}
.ah-sop-pack-section { display: grid; gap: 10px; padding-top: 4px; }
.ah-sop-role-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: 10px;
}
.ah-sop-role-card {
  display: grid; gap: 4px; padding: 10px 12px; border-radius: 8px;
  background: var(--surface-2, #f8fafc); border: 1px solid var(--line, #e2e8f0);
}
.ah-sop-role-badge { font-size: 12px; color: #1d4ed8; }
.ah-sop-filename {
  margin: 0; font-size: 12.5px; font-weight: 600; color: var(--text, #0f172a);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ah-sop-receipt {
  display: grid; gap: 8px; padding: 14px 16px; border-radius: 10px;
  background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46;
}
