/* ==========================================================================
   电池护照查询 · 视觉主题
   参考基座：Faivra / Midnight cobalt（demo.modeltheme.com/react/faivra）
   - 冷白画布 + 深海军蓝墨色 + 品牌蓝互动 + 珊瑚红警示 + 青绿完成
   - 玻璃卡（半透明白 + 白边 + 顶部高光 + 极浅投影）
   - Inter 正文 / Sora 标题 / Geist Mono 等宽；12px 卡圆角、16px 面板圆角
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/Inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('fonts/Sora-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/GeistMono-latin.woff2') format('woff2');
}

:root {
  /* 底色与墨色 */
  --canvas: #f5f7fa;
  --ink: #0f1a33;
  --ink-2: #45536e;
  --ink-3: #64708a;
  --ink-4: #8090a8;
  --line: rgba(15, 26, 51, 0.09);
  --line-strong: rgba(15, 26, 51, 0.17);
  --hover-tint: rgba(15, 26, 51, 0.05);

  /* 品牌与状态色 */
  --brand: #2f6bff;
  --brand-ink: #2359d6;
  --brand-strong: #1e52cc;
  --brand-soft: rgba(47, 107, 255, 0.12);
  --brand-line: #c2d5ff;
  --accent: #e2533f;
  --accent-ink: #b23826;
  --accent-strong: #c63f2b;
  --accent-soft: #fdeae6;
  --accent-line: #f4c3b9;
  --teal: #0e9aa7;
  --teal-ink: #0a6e78;
  --teal-soft: rgba(14, 154, 167, 0.12);
  --warn-ink: #8a4b00;
  --warn-soft: #fdf3e3;
  --warn-line: #efd6b0;

  /* 玻璃层与阴影 */
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --glass-edge: rgba(255, 255, 255, 0.72);
  --glass-highlight: rgba(255, 255, 255, 0.9);
  --gloss-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 55%);
  --shadow-card: 0 1px 1px rgba(0, 0, 0, 0.03), 0 14px 34px -20px rgba(15, 26, 51, 0.4);
  --shadow-pop: 0 14px 34px -12px rgba(15, 26, 51, 0.2), 0 2px 6px rgba(15, 26, 51, 0.06);
  --shadow-lift: 0 10px 24px -14px rgba(15, 26, 51, 0.26), 0 2px 4px rgba(15, 26, 51, 0.05);

  /* 字体与字号 */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI',
    'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-display: 'Sora', var(--font-sans);
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;

  /* 圆角 */
  --radius-sm: 6px;
  --radius-lg: 8px;
  --radius-ctl: 10px;
  --radius-card: 12px;
  --radius-bar: 16px;
  --radius-pill: 999px;

  /* 动效 */
  --dur-fast: 0.15s;
  --dur: 0.22s;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--canvas);
  background-image:
    radial-gradient(52vmax 46vmax at 2% -4%, rgba(47, 107, 255, 0.1), transparent 68%),
    radial-gradient(44vmax 40vmax at 102% 2%, rgba(226, 83, 63, 0.07), transparent 70%),
    radial-gradient(48vmax 44vmax at 84% 104%, rgba(14, 154, 167, 0.08), transparent 70%),
    radial-gradient(38vmax 36vmax at 8% 96%, rgba(194, 65, 122, 0.05), transparent 72%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 450;
  line-height: 1.65;
  font-feature-settings: 'cv11', 'ss01';
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
}

/* 前台全版面斜向多文字水印：仅在公开页生效，登录后台上方不叠加 */
body:not(.admin-body):not(.auth-body)::before {
  content: '';
  position: fixed;
  inset: -40%;
  z-index: 40;
  pointer-events: none;
  background: url('watermark.svg') repeat;
  background-size: 460px 180px;
  opacity: 0.045;
  transform: rotate(-28deg);
}

::selection {
  background: var(--brand-soft);
}

/* --------------------------------------------------------------------------
   焦点与跳转链接
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
main:focus {
  outline: none;
}
.skip {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-pop);
  transform: translateY(-160%);
  transition: transform var(--dur-fast) var(--ease-out);
}
.skip:focus {
  transform: translateY(0);
  outline-color: #fff;
}

/* --------------------------------------------------------------------------
   顶栏 / 语言切换 / 页脚
   -------------------------------------------------------------------------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(18px) saturate(1.8);
  backdrop-filter: blur(18px) saturate(1.8);
}
.site-head a {
  text-decoration: none;
}
.site-head .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.site-head .brand::before {
  display: none;
}
.site-head .brand .brand-logo {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 9px;
  object-fit: contain;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 6px 14px -8px rgba(47, 107, 255, 0.9);
}
.site-head nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}
.site-head nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  transition: background-color var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard);
}
.site-head nav a:hover {
  background: var(--hover-tint);
  color: var(--ink);
}

.lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.62);
}
.lang a {
  display: grid;
  place-items: center;
  min-width: 34px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  transition: background-color var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard);
}
.lang a:hover {
  background: var(--hover-tint);
  color: var(--ink);
}
.lang a.on {
  background: var(--brand-ink);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 4px 10px -6px rgba(35, 89, 214, 0.9);
}

.wrap {
  flex: 1 0 auto;
  width: 100%;
  /* 宽屏下不限制最大宽度，主内容随窗口自适应 */
  max-width: none;
  margin: 0 auto;
  padding: 28px 22px 76px;
}

.site-foot {
  border-top: 1px solid var(--line);
  padding: 22px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink-3);
  font-size: 12.5px;
  text-align: center;
}
.site-foot p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   排版
   -------------------------------------------------------------------------- */
h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
h1 {
  margin: 6px 0 10px;
  font-size: clamp(23px, 2.4vw, 30px);
  line-height: 1.25;
  font-weight: 700;
}
h2 {
  margin: 32px 0 12px;
  font-size: 18px;
  line-height: 1.35;
}
h3 {
  margin: 20px 0 8px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
h3:first-of-type {
  margin-top: 2px;
}
p {
  margin: 8px 0;
}
a {
  color: var(--brand-ink);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
ul,
ol {
  margin: 8px 0;
  padding-left: 1.35em;
}
li + li {
  margin-top: 4px;
}
.muted {
  color: var(--ink-2);
}
.empty {
  color: var(--ink-3);
  font-weight: 400;
}
code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(15, 26, 51, 0.05);
  color: var(--ink-2);
  word-break: break-word;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 面包屑（视图里统一使用 nav.muted） */
nav.muted {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin: 0 0 12px;
  color: var(--ink-3);
  font-size: 12.5px;
}
nav.muted a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard);
}
nav.muted a:hover {
  background: var(--brand-soft);
  color: var(--brand-ink);
  text-decoration: none;
}
nav.muted [aria-current='page'] {
  color: var(--ink);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   卡片 / 定义列表
   -------------------------------------------------------------------------- */
.card {
  margin: 14px 0;
  padding: 20px 22px;
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-bar);
  background-color: var(--surface);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.66));
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--shadow-card);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  backdrop-filter: blur(14px) saturate(1.6);
}
.card > :first-child {
  margin-top: 0;
}
.card > :last-child {
  margin-bottom: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 2px 26px;
  margin: 0;
}
dt {
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   按钮
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(15, 26, 51, 0.05);
  transition: background-color var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-standard),
    transform var(--dur-fast) var(--ease-standard);
}
.btn:hover {
  background: #fff;
  border-color: var(--brand-line);
  color: var(--ink);
  text-decoration: none;
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  border-color: transparent;
  background-color: var(--brand-ink);
  background-image: var(--gloss-sheen);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 8px 18px -10px rgba(47, 107, 255, 0.75);
}
.btn.primary:hover {
  background-color: var(--brand-strong);
  color: #fff;
}
.btn.danger {
  border-color: var(--accent-line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-ink);
}
.btn.danger:hover {
  border-color: var(--accent-strong);
  background: var(--accent-soft);
  color: var(--accent-ink);
}
/* 实心红：仅用于后台顶栏「退出登录」 */
.btn.danger-solid {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 1px 2px rgba(15, 26, 51, 0.08);
}
.btn.danger-solid:hover {
  border-color: transparent;
  background: var(--accent-strong);
  color: #fff;
  box-shadow: 0 2px 4px rgba(15, 26, 51, 0.1), 0 10px 20px -8px rgba(226, 83, 63, 0.55);
  transform: translateY(-1px);
}
.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}
.inline-form {
  display: inline;
  margin: 0;
}
/* 区间输入（起始 – 结束）保持同一行；流水号改成 text 后按 inputmode 识别 */
.actions input[type='number'],
.actions input[inputmode='numeric'] {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
}
/* 栅格行内的控件组不额外上移/下移，与同排输入框顶部对齐 */
.row2 .actions,
.row3 .actions {
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   表单
   -------------------------------------------------------------------------- */
.stack {
  display: grid;
  gap: 16px;
  margin: 0;
}
.stack > .actions {
  margin-top: 0;
}
form.stack {
  max-width: 680px;
}
form.stack.wide {
  max-width: 960px;
}
form.login-form {
  max-width: 420px;
}
.login-form .btn {
  width: 100%;
}
label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
}
label .req,
.fieldset legend .req {
  color: var(--accent-ink);
  font-weight: 700;
}
input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-ctl);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  transition: border-color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-standard),
    background-color var(--dur-fast) var(--ease-standard);
}
input::placeholder,
textarea::placeholder {
  color: var(--ink-4);
}
input:hover,
select:hover,
textarea:hover {
  background: #fff;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px var(--brand-soft);
}
textarea {
  min-height: 96px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.55;
}
input[type='file'] {
  padding: 8px 10px;
  font-size: 13px;
  color: var(--ink-2);
}
input[type='file']::file-selector-button {
  margin-right: 10px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
input[type='checkbox'],
input[type='radio'] {
  width: 18px;
  min-height: 0;
  height: 18px;
  padding: 0;
  margin: 0;
  accent-color: var(--brand);
}
label.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  padding: 6px 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}
label.check input {
  flex: none;
  margin-top: 3px;
}
.hint {
  margin-top: 5px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
}
.hint code {
  font-size: 0.92em;
}
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.row3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 16px;
}
.fieldset {
  min-width: 0;
  margin: 0;
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.5);
}
.fieldset legend {
  padding: 2px 8px;
  margin-left: -4px;
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.fieldset > * + * {
  margin-top: 14px;
}
.fieldset > legend + * {
  margin-top: 0;
}

/* 筛选区（列表页） */
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 14px 16px;
  align-items: end;
}
.filters label {
  margin-bottom: 5px;
}
.filters .actions {
  grid-column: 1 / -1;
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   提示条 / 徽标
   -------------------------------------------------------------------------- */
.notice {
  position: relative;
  margin: 16px 0;
  padding: 13px 16px 13px 19px;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-card);
  background: var(--brand-soft);
  color: var(--ink-2);
  font-size: 14px;
}
.notice::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  bottom: 13px;
  width: 3px;
  border-radius: 3px;
  background: var(--brand);
}
.notice > :first-child {
  margin-top: 0;
}
.notice > :last-child {
  margin-bottom: 0;
}
.notice.bad {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.notice.bad::before {
  background: var(--accent-strong);
}
.notice.warn {
  border-color: var(--warn-line);
  background: var(--warn-soft);
  color: var(--warn-ink);
}
.notice.warn::before {
  background: var(--warn-ink);
}
.notice.ok {
  border-color: rgba(14, 154, 167, 0.34);
  background: var(--teal-soft);
  color: var(--teal-ink);
}
.notice.ok::before {
  background: var(--teal);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  background: var(--teal-soft);
  color: var(--teal-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge.draft {
  background: rgba(15, 26, 51, 0.07);
  color: var(--ink-2);
}
.badge.recall {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* 首页型号列表 */
.list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
  counter-reset: item;
}
.list li {
  counter-increment: item;
  position: relative;
  margin: 0;
  padding: 16px 18px 16px 60px;
  border: 1px solid var(--glass-edge);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--shadow-lift);
  transition: border-color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur) var(--ease-standard),
    transform var(--dur) var(--ease-standard);
}
.list li::before {
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--brand-line);
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}
@media (hover: hover) {
  .list li:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--brand) 30%, #fff);
    box-shadow: inset 0 1px 0 #fff, var(--shadow-card);
  }
}
.list li a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}
.list li a:hover {
  color: var(--brand-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.list li .muted {
  margin-top: 3px;
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   表格（表头小标签 + 行分隔线 + 独立滚动容器）
   -------------------------------------------------------------------------- */
.table-scroll {
  margin: 16px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 #fff, var(--shadow-lift);
}
table {
  width: 100%;
  min-width: 560px;
  margin: 0;
  border-collapse: collapse;
  font-size: 13.5px;
}
caption {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: left;
}
th,
td {
  padding: 11px 16px;
  text-align: left;
  vertical-align: top;
}
thead th {
  border-bottom: 1px solid var(--line-strong);
  background: rgba(15, 26, 51, 0.035);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
tbody td {
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover td {
  background: rgba(47, 107, 255, 0.035);
}
td strong {
  color: var(--ink);
}
td .muted {
  font-size: 12.5px;
}
td .stack {
  gap: 10px;
}
td .actions {
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 0;
}
.table-ops .inline-form {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 0 0 auto;
}
.table-scroll .btn {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12.5px;
}
td code {
  white-space: nowrap;
}
/* 表格内的二维码缩略图 */
.qr-thumb {
  display: block;
  width: 40px;
  height: 40px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  image-rendering: pixelated;
  cursor: zoom-in;
}
/* 加载失败时的占位图标，尺寸与缩略图一致，避免行高跳动 */
.qr-thumb-fallback {
  display: none;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-4);
  font-size: 20px;
  line-height: 1;
}
.qr-cell.is-error .qr-thumb-fallback { display: inline-flex; }
/* hover 放大预览（由 layout.php 的脚本定位） */
.qr-preview {
  position: fixed;
  z-index: 80;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-pop);
  pointer-events: none;
}
.qr-preview.is-open { display: block; }
.qr-preview img {
  display: block;
  width: 180px;
  height: 180px;
  image-rendering: pixelated;
}
.qr-preview.is-photo img {
  image-rendering: auto;
  object-fit: contain;
}
.qr-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 分页 */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 22px 0 8px;
}
.pager .btn {
  min-height: 32px;
  padding: 0 11px;
  font-size: 13px;
}
.pager [aria-current='page'] {
  cursor: default;
}
.pager > span:not([aria-current]) {
  color: var(--ink-3);
  font-size: 12.5px;
}

/* 作业进度（逐条生成 / 导出） */
[hidden] {
  display: none !important;
}
.progress-wrap {
  margin-top: 14px;
}
.progress {
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(15, 26, 51, 0.08);
  overflow: hidden;
}
.progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background-image: linear-gradient(90deg, var(--brand), var(--teal));
  transition: width 0.25s ease;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
}
.check input[type='checkbox'] {
  width: auto;
  min-height: 0;
}

/* --------------------------------------------------------------------------
   后台页头
   -------------------------------------------------------------------------- */
.admin-head {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: flex-start;
  justify-content: space-between;
  margin: 4px 0 18px;
}
.admin-head h1 {
  margin: 0;
}
.admin-head > div > p {
  margin: 6px 0 0;
  font-size: 13.5px;
}
.admin-head .actions {
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   后台宽版工作区（型号编辑）
   -------------------------------------------------------------------------- */
.site-head.wide {
  padding-left: 22px;
  padding-right: 22px;
}
.wrap.wide {
  max-width: none;
}

.admin-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 344px;
  gap: 22px;
  align-items: start;
  margin-top: 4px;
}
.admin-editor form.stack {
  max-width: none;
  min-width: 0;
}
.admin-editor .fieldset {
  padding: 16px 20px 20px;
  background: rgba(255, 255, 255, 0.62);
}
.admin-editor .fieldset legend {
  padding: 2px 10px;
  font-size: 13.5px;
  letter-spacing: 0.01em;
}
.admin-editor .fieldset > .row2 + .row2,
.admin-editor .fieldset > .row3 + .row3 {
  margin-top: 16px;
}
/* 批次详情：逐条序列号只读回显与自定义区间折叠 */
.units-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  margin: 0;
}
.units-facts > div { min-width: 0; }
.units-facts dt { margin-top: 0; }
.units-facts dd { margin-top: 2px; font-size: 13.5px; }
@media (max-width: 720px) {
  .units-facts { grid-template-columns: 1fr; }
}
.units-facts dt:first-child {
  margin-top: 0;
}
.units-facts code {
  padding: 1px 6px;
  border-radius: 5px;
  background: #f4f6f9;
  font-size: 12.5px;
}
.hint.warn {
  color: #b45309;
}
.units-custom > summary {
  cursor: pointer;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}
.units-custom > summary::marker {
  color: var(--ink-3);
}
/* 批次编辑：真正的左右两列。
   左列（竖向）：发码设置 → 逐条序列号 → 状态与备注 → 生产信息，卡片间距 16px；
   右列（竖向）：批次概要 → 二维码导出，整列 sticky；
   保存栏跨两列置底。 */
.admin-editor.admin-editor--batch {
  row-gap: 16px;
  align-items: start;
}
.admin-editor--batch > #batch-form {
  grid-column: 1;
  grid-row: 1;
}
.admin-editor--batch > .units-status {
  grid-column: 1;
  grid-row: 2;
}
.admin-editor--batch > .editor-aside {
  grid-column: 2;
  grid-row: 1 / span 2;
}
.admin-editor--batch > .editor-actions {
  grid-column: 1 / -1;
  grid-row: 3;
}

.units-status {
  display: grid;
  gap: 16px;
  align-content: start;
}
.units-status > .card,
.units-status > .fieldset {
  margin: 0;
}

/* 批次编辑：右侧概要/导出整列吸附并限制在一屏内，超高时列内滚动，
   导出卡不会被截在视口外，也不会被概要卡压住 */
.admin-editor > #batch-form + .editor-aside {
  top: 96px;
  max-height: calc(100vh - 96px - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media (max-width: 1023px) {
  /* 窄屏回到单列：恢复 DOM 顺序自动排布 */
  .admin-editor--batch > #batch-form,
  .admin-editor--batch > .units-status,
  .admin-editor--batch > .editor-aside,
  .admin-editor--batch > .editor-actions {
    grid-column: auto;
    grid-row: auto;
  }
  .admin-editor > #batch-form + .editor-aside {
    max-height: none;
    overflow-y: visible;
  }
}
.editor-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-lift);
}

.editor-aside {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 14px;
  align-self: start;
}
.editor-aside .card {
  margin: 0;
}
/* 型号产品图片（后台编辑页与列表） */
.editor-image-preview {
  margin: 0 0 4px;
}
.editor-image-preview img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0 auto 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: linear-gradient(160deg, #ffffff 0%, #eef2ff 100%);
}
.editor-image-preview figcaption {
  text-align: center;
  word-break: break-all;
}
.editor-image .stack {
  gap: 8px;
}
/* 替换 / 删除按钮同一行 */
.editor-image-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.editor-image-actions .btn.primary {
  flex: 1 1 auto;
}
.editor-image-actions .btn.danger {
  flex: 0 0 auto;
}
.model-id {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.model-thumb {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #f7f9ff;
  cursor: zoom-in;
}
.model-thumb:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.model-thumb-fallback {
  display: none;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #f7f9ff;
  color: var(--ink-4);
  font-size: 15px;
  line-height: 1;
}
.model-id.is-error .model-thumb-fallback { display: inline-flex; }
.settings-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.settings-card-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 17px;
}
/* 带图标的卡片标题（导入页上传卡片） */
.panel-title-icon {
  display: flex;
  align-items: center;
  gap: 10px;
}
.settings-editor .settings-main > .card { margin: 0; }
.settings-editor > .card { margin: 0; }
.settings-editor .settings-password {
  height: auto;
  align-content: start;
}
/* 系统设置：站点信息与制造商信息合并卡（卡内分两组，一次保存） */
.settings-profile { gap: 14px; }
.settings-group {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.settings-profile > .settings-group:first-of-type {
  padding-top: 0;
  border-top: 0;
}
.settings-group-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--ink-2);
}
.field-error {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--accent-ink);
}
.input-invalid {
  border-color: var(--accent-strong);
  background: var(--accent-soft);
}
/* Excel 导入：说明与上传左右两列 */
.import-editor { align-items: stretch; }
.import-editor > .card { margin: 0; }
@media (max-width: 1023px) {
  .editor-aside.settings-aside { order: 0; }
}
.editor-qr .qr-frame {
  display: grid;
  place-items: center;
  width: min(100%, 236px);
  margin: 2px auto 14px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
}
.editor-qr .qr-frame img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.qr-placeholder {
  display: none;
  place-items: center;
  min-height: 196px;
  padding: 10px;
  color: var(--ink-4);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
}
.editor-qr .qr-frame img[hidden] + .qr-placeholder {
  display: grid;
}
.editor-qr .qr-url {
  display: block;
}
.editor-qr .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.editor-qr [aria-disabled='true'] {
  opacity: 0.5;
  pointer-events: none;
}
.aside-notes {
  margin: 0;
  padding-left: 1.15em;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.6;
}
.aside-notes li + li {
  margin-top: 8px;
}


/* --------------------------------------------------------------------------
   后台宽版工作区（企业案件两步向导）
   -------------------------------------------------------------------------- */

/* 步骤指示 */
.case-wizard .steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.case-wizard .step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.55);
}
.case-wizard .step[aria-current='step'] {
  border-color: var(--brand-line);
  background: rgba(47, 107, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(47, 107, 255, 0.16);
}
.case-wizard .step[aria-current='step'] .step-mark {
  border-color: transparent;
  background: var(--brand-ink);
  color: #fff;
  box-shadow: 0 4px 10px -6px rgba(35, 89, 214, 0.9);
}

/* 分组面板 */
.case-wizard .panel {
  min-width: 0;
  padding: 16px 20px 20px;
  background: rgba(255, 255, 255, 0.66);
  scroll-margin-top: 84px;
}

/* 字段网格：按可用宽度自动分栏，窄屏自动回落单列 */
.case-wizard .fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 14px 16px;
  align-items: start;
}
.case-wizard .field {
  min-width: 0;
}
.case-wizard .field > label {
  margin-bottom: 5px;
}
.case-wizard .field > label.check {
  margin-bottom: 0;
}
.case-wizard .field .hint {
  margin: 5px 0 0;
}

.case-wizard .wizard-actions .actions {
  margin-top: 0;
}

@media (min-width: 900px) {
}
@media (min-width: 1000px) {
  /* 制造商面板最长：占左列并跨两行，规格与材料依次落在右列，
     避免右列底部出现半屏空隙（面板顺序见 case_form.php） */
  .case-wizard .case-panels > .panel:nth-child(2) {
    grid-column: 1;
    grid-row: span 2;
  }
  .case-wizard .case-panels > .panel:nth-child(3),
  .case-wizard .case-panels > .panel:nth-child(4) {
    grid-column: 2;
  }
}
@media (max-width: 720px) {
  .case-wizard .steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .case-wizard .panel {
    padding: 14px 14px 16px;
  }
  .case-wizard .wizard-actions .actions {
    width: 100%;
  }
  .case-wizard .wizard-actions .actions .btn {
    flex: 1 1 auto;
  }
}

/* --------------------------------------------------------------------------
   公开页：Hero / 护照布局 / 二维码
   -------------------------------------------------------------------------- */
.hero .stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 16px 20px;
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.hero .stats dt {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.hero .stats dd {
  margin: 3px 0 0;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero .badge {
  background: rgba(255, 255, 255, 0.94);
  color: var(--teal-ink);
  box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(0, 0, 0, 0.18);
}
.hero .badge.recall {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.passport {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 6px 28px;
  align-items: start;
}
.aside {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 14px;
  align-self: start;
}
.aside .card {
  margin: 0;
}
.aside-title {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.qr-url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  word-break: break-all;
}
.aside-dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}
.aside-dl > div:last-child {
  border-bottom: 0;
}
.aside-dl dt {
  margin: 0;
  font-size: 11.5px;
}
.aside-dl dd {
  margin: 0;
  font-size: 13px;
  text-align: right;
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .passport {
    grid-template-columns: minmax(0, 1fr);
  }
  .aside {
    position: static;
  }
  .admin-editor {
    grid-template-columns: minmax(0, 1fr);
  }
  .editor-aside {
    position: static;
    order: -1;
  }
  .editor-aside .qr-frame {
    width: min(100%, 220px);
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15px;
  }
  .site-head {
    padding: 10px 14px;
  }
  .site-head nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .site-head nav::-webkit-scrollbar {
    display: none;
  }
  .site-head .lang {
    margin-left: auto;
  }
  .wrap {
    padding: 18px 14px 52px;
  }
  .row2,
  .row3 {
    grid-template-columns: 1fr;
  }
  .hero .stats {
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  }
  .card {
    padding: 16px 16px;
  }
  .fieldset {
    padding: 14px 14px 16px;
  }
  .table-scroll {
    border-radius: var(--radius-card);
  }
  td code {
    white-space: normal;
  }
  th,
  td {
    padding: 9px 12px;
  }
  .btn {
    min-height: 42px;
    padding: 0 14px;
  }
  .table-scroll .btn {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }
  .admin-head .actions {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .site-head {
    position: static;
  }
}

@media (max-width: 420px) {
  .wrap {
    padding: 16px 12px 48px;
  }
  .filters {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-head,
  .lang,
  .site-foot,
  .actions,
  .skip {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .card,
  .table-scroll,
  .hero {
    box-shadow: none;
    background: #fff;
    color: var(--ink);
  }
  .hero h1,
  .hero-sub,
  .hero-sub strong,
  .hero-eyebrow,
  .hero .stats dd {
    color: var(--ink);
  }
}

/* ---------------------------------------------------------------- 文档分槽 */
.doc-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 16px;
}
.doc-slot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.6);
}
.doc-slot h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
}
.doc-slot-file {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  word-break: break-all;
}
/* 文档卡操作行：替换与删除并排，删除在右 */
.doc-slot-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.doc-slot-actions .inline-form {
  display: inline-flex;
  margin: 0;
}
/* 文档卡元信息行：PDF 大小在左，公开开关在右；窄屏自动换行不溢出 */
.doc-slot-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0;
}
.doc-slot-meta p { margin: 0; }
.doc-slot-public { margin: 0; white-space: nowrap; }
/* 文件选择框：单文件上传的「选择文件」样式，选中后在框内显示文件名与大小 */
.file-pick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 10px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-ctl);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-3);
  font-size: 13.5px;
  font-weight: 400;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-standard),
    background-color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-standard);
}
.file-pick:hover {
  border-color: var(--brand-line);
  background: #fff;
}
.file-pick:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.file-pick-icon {
  flex: none;
  font-size: 18px;
  color: var(--ink-3);
}
.file-pick-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-pick-size {
  flex: none;
  margin-left: auto;
  color: var(--ink-4);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.file-pick.is-selected {
  border-color: var(--brand-line);
  background: rgba(47, 107, 255, 0.05);
}
.file-pick.is-selected .file-pick-icon { color: var(--brand-ink); }
.file-pick.is-selected .file-pick-name { color: var(--ink); font-weight: 600; }
/* 原生控件留在 DOM 内（可聚焦、保留必填校验），视觉上裁掉 */
.file-pick-input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.doc-sep {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.doc-subtitle {
  margin: 0 0 12px;
  font-size: 15px;
}
/* 安规证书：整行自适应，缩略图 + 表单 + 删除 */
.doc-assets {
  min-width: 0;
}
/* 证书表单不再受通用 form.stack 的 680px 上限约束，按内容区整行宽度排布 */
.doc-assets form.stack {
  max-width: none;
}
.cert-list {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
  display: grid;
  gap: 14px;
}
.cert-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.6);
}
.cert-thumb img {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.cert-thumb-fallback {
  display: none;
  width: 96px;
  height: 96px;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-4);
  font-size: 28px;
  line-height: 1;
}
.cert-thumb.is-error .cert-thumb-fallback { display: flex; }
.cert-main {
  min-width: 0;
}
.cert-del {
  align-self: start;
}
.cert-row {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 0.9fr 0.7fr 1.2fr auto;
  gap: 10px 12px;
  align-items: end;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.cert-row > div {
  min-width: 0;
}
.cert-row .cert-row-remove {
  justify-self: start;
}
.cert-row:last-child {
  border-bottom: 0;
}
@media (max-width: 1100px) {
  .cert-row {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 720px) {
  .cert-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .cert-thumb img {
    width: 100%;
    max-width: 180px;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .cert-thumb-fallback {
    width: 100%;
    max-width: 180px;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .cert-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

/* ------------------------------------------------------------ 公开页文档区 */
.pp-docs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
  gap: 20px;
}
.pp-docgroup-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}
.pp-doclist {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pp-doclink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}
.pp-doclink:hover,
.pp-doclink:focus-visible {
  border-color: var(--brand, #1f6feb);
  box-shadow: 0 2px 10px rgba(15, 35, 70, 0.08);
}
.pp-docname {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 500;
}
.pp-docmeta {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--muted, #6b7280);
}
.pp-certgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pp-cert {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  font-size: 13px;
  cursor: zoom-in;
}
.pp-cert img {
  width: 100%;
  height: 90px;
  object-fit: contain;
  background: #f7f8fa;
  border-radius: 6px;
}
.pp-cert:focus-visible {
  outline: 2px solid var(--brand, #1f6feb);
  outline-offset: 2px;
}

.pp-doclink:focus-visible {
  outline: 2px solid var(--brand, #1f6feb);
  outline-offset: 2px;
}
