/* ==========================================================================
   采购 / 生产 / 库存一体系统 —— 本地样式（不依赖任何公共 CDN）
   结构：左侧导航 + 内容区；移动端导航变为抽屉。
   ========================================================================== */

:root {
  --c-bg: #f2f5f9;
  --c-surface: #ffffff;
  --c-surface-soft: #f8fafc;
  --c-border: #e2e8f0;
  --c-border-strong: #cbd5e1;
  --c-text: #0f172a;
  --c-text-muted: #64748b;
  --c-primary: #2563eb;
  --c-primary-dark: #1d4ed8;
  --c-primary-soft: #eff6ff;
  --c-success: #15803d;
  --c-success-soft: #ecfdf3;
  --c-warning: #b45309;
  --c-warning-soft: #fff7ed;
  --c-danger: #b91c1c;
  --c-danger-soft: #fef2f2;
  --c-sidebar: #0f1b2d;
  --c-sidebar-soft: #182741;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px -16px rgba(15, 23, 42, .25);
  --sidebar-w: 248px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.08rem; }
h3 { font-size: .98rem; }

.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;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--c-primary); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ============================================================ 左侧导航 */
.app-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 60;
  display: flex; flex-direction: column;
  background: radial-gradient(120% 80% at 0% 0%, #1b2b45 0%, var(--c-sidebar) 55%);
  color: #cbd5e1;
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.sidebar__brand {
  display: flex; align-items: center; gap: .7rem;
  padding: 1.1rem 1rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff; font-weight: 700; font-size: 1rem;
  box-shadow: 0 6px 16px -6px rgba(59, 130, 246, .8);
}
.brand__logo {
  flex: 0 0 auto;
  width: 40px; height: 40px; object-fit: cover;
  border-radius: 11px;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .7);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__name { color: #fff; font-weight: 650; font-size: .98rem; letter-spacing: .01em; }
.brand__sub { color: #8fa3bf; font-size: .74rem; }
.sidebar__close {
  display: none; margin-left: auto; background: none; border: 0; color: #94a3b8;
  font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 .2rem;
}
.sidebar__nav { flex: 1 1 auto; overflow-y: auto; padding: .8rem .6rem 1.6rem; }
.nav-group { margin-top: .9rem; }
.nav-group__label {
  padding: .1rem .65rem .35rem;
  font-size: .72rem; letter-spacing: .08em; color: #6f86a6; font-weight: 600;
}
.nav-link {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .65rem; margin-bottom: 2px;
  border-radius: 10px; color: #c7d3e3; font-size: .92rem; text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav-link.is-active {
  background: linear-gradient(90deg, rgba(59, 130, 246, .28), rgba(59, 130, 246, .12));
  color: #fff;
  box-shadow: inset 2px 0 0 #60a5fa;
}
.nav-link__icon { display: inline-flex; color: #93b0d6; }
.nav-link.is-active .nav-link__icon, .nav-link:hover .nav-link__icon { color: #bfdbfe; }

.sidebar__user {
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding: .9rem .8rem 1rem;
}
.sidebar__user-info { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.sidebar__user-meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.sidebar__user-meta strong { color: #f1f5f9; font-size: .9rem; font-weight: 600; }
.sidebar__user-meta small { color: #8fa3bf; font-size: .74rem; overflow: hidden; text-overflow: ellipsis; }
.sidebar__user .btn--ghost {
  background: rgba(255, 255, 255, .06);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, .18);
}
.sidebar__user .btn--ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }

.avatar {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1); color: #fff;
  font-size: .85rem; font-weight: 600;
}
.avatar--sm { width: 26px; height: 26px; font-size: .78rem; }

/* ============================================================ 内容区 */
.app-body { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.app-body--auth { margin-left: 0; }

.app-topbar {
  display: none; align-items: center; gap: .7rem;
  position: sticky; top: 0; z-index: 40;
  padding: .55rem .9rem; background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
}
.topbar__brand { font-weight: 650; color: var(--c-text); }
.topbar__spacer { flex: 1 1 auto; }
.topbar__user { display: flex; align-items: center; gap: .4rem; color: var(--c-text-muted); font-size: .86rem; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 38px; height: 38px; padding: 8px;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 10px;
  cursor: pointer;
}
.nav-toggle__bar { display: block; height: 2px; background: var(--c-text); border-radius: 2px; }

.sidebar-scrim {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(1px);
}

.app-main {
  flex: 1 1 auto; width: 100%;
  max-width: 1320px;
  padding: 1.6rem 2rem 3rem;
}
.app-main--auth { display: flex; align-items: center; justify-content: center; padding: 0; }

.app-footer {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .9rem 2rem; border-top: 1px solid var(--c-border);
  color: var(--c-text-muted); font-size: .78rem; background: var(--c-surface);
}
.app-footer__meta { color: #94a3b8; }

/* ============================================================ 页头 */
.page-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem;
  margin-bottom: .35rem;
}
.page-head h1 { margin: 0; display: flex; align-items: center; gap: .6rem; }
.page-head__actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.page-subtitle { color: var(--c-text-muted); font-size: .9rem; margin: 0 0 1.1rem; max-width: 70ch; }

/* 说明方块：页面上解释业务口径/规则 */
.page-intro {
  display: flex; gap: .85rem;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  border: 1px solid #dbe7f7; border-left: 3px solid var(--c-primary);
  border-radius: var(--radius); padding: .85rem 1rem; margin-bottom: 1.1rem;
}
.page-intro__icon {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--c-primary-soft); color: var(--c-primary-dark);
}
.page-intro__body { min-width: 0; }
.page-intro__title { font-weight: 650; font-size: .95rem; margin-bottom: .15rem; }
.page-intro__text { color: var(--c-text-muted); font-size: .87rem; margin: 0; }
.page-intro__text strong { color: var(--c-text); font-weight: 600; }
.page-intro ul { margin: .25rem 0 0; padding-left: 1.1rem; color: var(--c-text-muted); font-size: .87rem; }

/* ============================================================ 统计卡片 */
.stat-row { display: grid; gap: .9rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1.1rem; }
.stat {
  position: relative; overflow: hidden;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow-sm);
}
.stat::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--c-primary); opacity: .85;
}
.stat--success::after { background: var(--c-success); }
.stat--warning::after { background: #f59e0b; }
.stat--danger::after { background: var(--c-danger); }
.stat__label { color: var(--c-text-muted); font-size: .8rem; display: flex; align-items: center; gap: .35rem; }
.stat__value { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: .15rem; }
.stat__hint { color: #94a3b8; font-size: .76rem; }
.stat a { color: inherit; }

/* ============================================================ 卡片 */
.card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 1.1rem 1.15rem; margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card--flush { padding: 0; overflow: hidden; }
.card--flush > h2, .card--flush > .card__head { padding: 1rem 1.15rem 0; }

.card__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem .9rem;
  padding-bottom: .7rem; border-bottom: 1px solid var(--c-border); margin-bottom: .9rem;
}
.card__head h2 { margin: 0; }
.card__head .muted { font-size: .82rem; }
.card__head__actions { margin-left: auto; display: flex; gap: .45rem; flex-wrap: wrap; }

/* ============================================================ 快捷入口 */
.home-cards { display: grid; gap: .9rem; }
.home-card {
  position: relative; display: flex; gap: .85rem; align-items: flex-start;
  padding: 1rem; border-radius: var(--radius);
  background: var(--c-surface); border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm); color: inherit; text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.home-card:hover, .home-card:focus-visible {
  border-color: #bfdbfe; transform: translateY(-2px);
  box-shadow: 0 10px 24px -18px rgba(37, 99, 235, .55); text-decoration: none;
}
.home-card__icon {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--c-primary-soft); color: var(--c-primary-dark);
}
.home-card__body { min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
.home-card__title { display: block; font-weight: 650; margin-bottom: .1rem; }
.home-card__desc { display: block; color: var(--c-text-muted); font-size: .85rem; line-height: 1.45; }
.home-card__arrow { position: absolute; right: 1rem; top: 1rem; color: #cbd5e1; }

/* ============================================================ 表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: inherit; }
table.data {
  width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--c-surface);
}
table.data th, table.data td {
  padding: .68rem .8rem; text-align: left; border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
}
table.data thead th {
  background: var(--c-surface-soft); font-weight: 600; color: var(--c-text-muted);
  font-size: .78rem; letter-spacing: .02em; white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
table.data tbody tr:hover { background: #f8fbff; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tfoot td { font-weight: 600; background: var(--c-surface-soft); }
.table-toolbar {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
  padding: .7rem 1.15rem; border-bottom: 1px solid var(--c-border);
  color: var(--c-text-muted); font-size: .84rem;
}

/* 手机端把单据行转为卡片（不压缩宽表格） */
@media (max-width: 767px) {
  table.data--stack thead { display: none; }
  table.data--stack, table.data--stack tbody, table.data--stack tr, table.data--stack td {
    display: block; width: 100%;
  }
  table.data--stack tr {
    border: 1px solid var(--c-border); border-radius: 12px;
    margin: .55rem .7rem; padding: .3rem .15rem; background: var(--c-surface);
  }
  table.data--stack td {
    border: 0; padding: .3rem .7rem; display: flex; gap: .75rem; justify-content: space-between;
  }
  table.data--stack td::before {
    content: attr(data-label);
    color: var(--c-text-muted); font-size: .8rem; flex: 0 0 auto;
  }
  table.data--stack td.num { text-align: right; }
}

/* ============================================================ 表单 */
.form-grid { display: grid; gap: .9rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field > label { font-weight: 550; font-size: .88rem; color: #334155; }
.field .help { color: var(--c-text-muted); font-size: .8rem; }
.field .errors, .form-errors { color: var(--c-danger); font-size: .84rem; }
.form-errors { background: var(--c-danger-soft); border: 1px solid #fecaca;
  border-radius: var(--radius-sm); padding: .65rem .85rem; margin-bottom: .9rem; }
.form-errors ul { margin: 0; padding-left: 1.1rem; }

.input, select.input, textarea.input {
  width: 100%; padding: .58rem .7rem; font: inherit; color: inherit;
  background: #fff; border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm); min-height: 40px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:hover { border-color: #94a3b8; }
.input:focus, select.input:focus, textarea.input:focus {
  outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}
.input[aria-invalid="true"] { border-color: var(--c-danger); }
textarea.input { min-height: 88px; resize: vertical; }
input.input--qty { text-align: right; font-variant-numeric: tabular-nums; }

/* 表单最后一个字段通常是提交按钮：独占一行、按内容宽度，不要被拉满 */
.form-grid > .field:last-child { grid-column: 1 / -1; align-items: flex-start; }
.form-grid > .field:last-child > .btn { min-width: 132px; }

.form-section { border: 0; padding: 0; margin: 0 0 1.1rem; }
.form-section > legend {
  font-size: .8rem; font-weight: 600; letter-spacing: .04em;
  color: var(--c-text-muted); padding: 0 0 .5rem;
}

.checkbox-group { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; }

/* ============================================================ 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .55rem 1rem; min-height: 40px; font: inherit; font-weight: 550;
  color: #fff; background: var(--c-primary); border: 1px solid transparent;
  border-radius: var(--radius-sm); cursor: pointer; text-decoration: none;
  transition: background .15s ease, box-shadow .15s ease, transform .1s ease;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .18);
}
.btn:hover { background: var(--c-primary-dark); text-decoration: none; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn--ghost { background: #fff; color: #334155; border-color: var(--c-border-strong); box-shadow: none; }
.btn--ghost:hover { background: var(--c-surface-soft); color: var(--c-text); border-color: #94a3b8; }
.btn--danger { background: var(--c-danger); box-shadow: none; }
.btn--danger:hover { background: #991b1b; }
.btn--sm { padding: .38rem .7rem; min-height: 33px; font-size: .85rem; }
.btn--block { width: 100%; }

.inline-form { display: inline; margin: 0; }

/* ============================================================ 提示 */
.messages { list-style: none; margin: 0 0 1rem; padding: 0; }
.message {
  display: flex; align-items: flex-start; gap: .5rem;
  padding: .7rem .9rem; border-radius: var(--radius-sm); margin-bottom: .5rem;
  border: 1px solid transparent; font-size: .88rem;
  box-shadow: var(--shadow-sm);
}
.message--success { background: var(--c-success-soft); border-color: #bbf7d0; color: var(--c-success); }
.message--info { background: var(--c-primary-soft); border-color: #bfdbfe; color: var(--c-primary-dark); }
.message--warning { background: var(--c-warning-soft); border-color: #fed7aa; color: var(--c-warning); }
.message--error { background: var(--c-danger-soft); border-color: #fecaca; color: var(--c-danger); }

/* ============================================================ 徽章 */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .1rem .5rem; border-radius: 999px;
  font-size: .76rem; font-weight: 550; white-space: nowrap;
  background: #eef2f7; color: #475569;
}
.badge--draft { background: #eef2f7; color: #475569; }
.badge--submitted { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.badge--partial { background: var(--c-warning-soft); color: var(--c-warning); }
.badge--done { background: var(--c-success-soft); color: var(--c-success); }
.badge--closed, .badge--cancelled { background: #f1f5f9; color: #64748b; }
.badge--danger { background: var(--c-danger-soft); color: var(--c-danger); }

/* ============================================================ 图片与产品 */
.thumb {
  display: block; width: 40px; height: 40px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--c-border); background: #fff;
}
.thumb--empty {
  display: flex; align-items: center; justify-content: center;
  color: #cbd5e1; font-size: .8rem;
}
.thumb--lg { width: 64px; height: 64px; }

.product-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-card {
  display: block; color: inherit; text-decoration: none;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.product-card:hover, .product-card:focus-visible {
  border-color: #bfdbfe; text-decoration: none; transform: translateY(-2px);
  box-shadow: 0 14px 30px -22px rgba(37, 99, 235, .6);
}
.product-card__media {
  aspect-ratio: 16 / 10; max-height: 230px;
  background: linear-gradient(145deg, #f8fafc, #eef2f7);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.product-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card__placeholder { color: #a8b3c4; font-size: .85rem; }
.product-card__body { padding: .8rem .9rem .95rem; }
.product-card__title { font-weight: 650; margin-bottom: .15rem; }
.product-card__meta { color: var(--c-text-muted); font-size: .82rem; }

/* ============================================================ 明细分组 */
.line-group { border-top: 1px solid var(--c-border); }
.line-group:first-of-type { border-top: 0; }
.line-group__head {
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline;
  padding: .6rem 1.15rem; background: var(--c-surface-soft); font-weight: 650; font-size: .9rem;
}

/* ---------------------------------------------------------- 明细区辅助布局 */
.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem;
  margin-bottom: .6rem;
}
.section-head h2 { margin: 0; }
.section-head .muted { font-size: .84rem; }

.default-dates {
  display: grid; gap: .8rem; grid-template-columns: repeat(1, minmax(0, 1fr));
  background: var(--c-surface-soft); border: 1px dashed var(--c-border-strong);
  border-radius: 12px; padding: .85rem .9rem; margin-bottom: 1rem;
}

/* 采购明细行（手机端卡片式） */
.line-list { display: grid; gap: .8rem; }
.line-card {
  border: 1px solid var(--c-border); border-radius: 12px;
  background: var(--c-surface-soft); padding: .85rem .9rem;
}
.line-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.line-card__no { font-size: .82rem; font-weight: 650; color: var(--c-text-muted); }
.line-card__remove {
  background: transparent; border: 0; color: var(--c-danger);
  font: inherit; font-size: .82rem; cursor: pointer; padding: .2rem .35rem;
}
.line-card__remove:disabled { color: #cbd5e1; cursor: not-allowed; }
.line-card__grid { display: grid; gap: .65rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .65rem; }
.line-card__unit { display: flex; align-items: center; min-height: 40px; color: var(--c-text-muted); font-size: .9rem; }

/* ============================================================ 空状态 */
.empty-state {
  padding: 2.4rem 1.2rem; text-align: center; color: var(--c-text-muted);
  background: var(--c-surface-soft); border: 1px dashed var(--c-border-strong);
  border-radius: 12px; margin: 1rem; font-size: .9rem;
}
.card > .empty-state { margin: .2rem 0 0; }
.card--flush > .empty-state { margin: 1rem; }
.empty-state__icon {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: #eef2f7; color: #94a3b8; margin-bottom: .5rem;
}

/* ============================================================ 登录页 */
body.auth-page { background: radial-gradient(120% 90% at 15% 0%, #e8effc 0%, #f4f7fb 45%, #f7f9fc 100%); }
.auth-shell { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 1.2rem; width: 100%; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--c-surface);
  border: 1px solid var(--c-border); border-radius: 18px;
  box-shadow: 0 24px 60px -30px rgba(15, 23, 42, .28); padding: 1.8rem 1.6rem;
}
.auth-brand { text-align: center; margin-bottom: 1.3rem; }
.auth-logo { display: block; width: 100%; max-width: 240px; margin: 0 auto .55rem; border-radius: 14px; }
.auth-brand__sub { color: var(--c-text-muted); font-size: .84rem; letter-spacing: .02em; }
.auth-card h1 { font-size: 1.2rem; margin-bottom: .25rem; }
.auth-card .auth-sub { color: var(--c-text-muted); font-size: .86rem; margin-bottom: 1.2rem; }
.auth-foot { margin-top: 1.1rem; font-size: .78rem; color: var(--c-text-muted); text-align: center; line-height: 1.6; }

/* ============================================================ 布局工具类 */
.grid-2 { display: grid; gap: 1rem; }
.muted { color: var(--c-text-muted); }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }

.pagination { display: flex; gap: .5rem; align-items: center; justify-content: center; margin-top: 1.1rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: .35rem .75rem; border-radius: 9px; border: 1px solid transparent; font-size: .86rem;
}
.pagination a { border-color: var(--c-border); background: #fff; color: var(--c-text); }
.pagination a:hover { border-color: #bfdbfe; text-decoration: none; }
.pagination .current { background: var(--c-primary-soft); color: var(--c-primary-dark); font-weight: 600; }

/* ============================================================ 宽屏增强 */
@media (min-width: 768px) {
  .app-main { padding: 1.9rem 2.2rem 3.4rem; }
  .home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid .field--full { grid-column: 1 / -1; }
  .grid-2 { grid-template-columns: 2fr 1fr; align-items: start; }
  .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .line-card__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .line-card__grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .default-dates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  .home-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* 移动端：侧栏变抽屉 */
@media (max-width: 1023px) {
  .app-sidebar {
    transform: translateX(-104%);
    transition: transform .22s ease;
    box-shadow: 0 0 40px rgba(15, 23, 42, .35);
  }
  .app-sidebar.is-open { transform: translateX(0); }
  .app-body { margin-left: 0; }
  .app-topbar { display: flex; }
  .sidebar__close { display: block; }
  .app-main { padding: 1rem .9rem 2.4rem; }
  .app-footer { padding: .8rem 1rem; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head h1 { font-size: 1.2rem; }
  .page-head__actions { width: 100%; margin-left: 0; }
  .card { padding: .9rem; }
  .page-intro { padding: .8rem .85rem; }
}

@media print {
  .app-sidebar, .app-topbar, .app-footer, .page-head__actions, .btn { display: none !important; }
  .app-body { margin-left: 0; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; }
}









