/* ==========================================================================
   筷子熊猫 · 全局设计系统
   主色：竹青 #0F766E → 辅助：暖橙 #E8833A
   全部图标使用线性描边（stroke），无填充
   ========================================================================== */

:root {
  /* 品牌色 */
  --brand:        #0F766E;
  --brand-600:    #0D6961;
  --brand-700:    #0B544E;
  --brand-300:    #5EEAD4;
  --brand-50:     #ECFDF9;
  --brand-100:    #D3F7F0;

  /* 辅助色 */
  --accent:       #E8833A;
  --accent-50:    #FEF4EC;
  --accent-600:   #C96A26;

  /* 语义色 */
  --ok:           #12885F;
  --ok-bg:        #E6F7F0;
  --warn:         #C2870B;
  --warn-bg:      #FDF6E3;
  --danger:       #D64545;
  --danger-bg:    #FDEDED;
  --info:         #2563C9;
  --info-bg:      #EAF1FD;
  --muted:        #7C8A88;
  --muted-bg:     #F0F3F2;

  /* 中性色 */
  --ink:          #16211F;
  --ink-2:        #35423F;
  --ink-3:        #667471;
  --ink-4:        #96A29F;
  --line:         #E3EAE8;
  --line-2:       #EDF2F1;
  --bg:           #F5F8F7;
  --surface:      #FFFFFF;
  --surface-2:    #FAFCFB;

  /* 圆角 */
  --r-xs: 4px;  --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-xl: 18px; --r-2xl: 24px;

  /* 阴影 */
  --sh-xs: 0 1px 2px rgba(22,33,31,.05);
  --sh-sm: 0 2px 6px rgba(22,33,31,.06);
  --sh:    0 4px 16px rgba(22,33,31,.07);
  --sh-lg: 0 12px 32px rgba(22,33,31,.10);
  --sh-xl: 0 24px 56px rgba(22,33,31,.14);

  /* 布局 */
  --nav-h:  66px;
  --maxw:   1280px;
  --gap:    20px;

  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; border: 0; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4,h5 { margin: 0; font-weight: 600; line-height: 1.35; }
p { margin: 0 0 .8em; }
p:last-child { margin-bottom: 0; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ---------------- 线性图标 ---------------- */
.kzp-ico {
  display: inline-block;
  vertical-align: -.18em;
  flex: none;
  stroke-width: 1.6;
}
.kzp-ico.sm { width: 14px; height: 14px; }
.kzp-ico.lg { width: 28px; height: 28px; stroke-width: 1.4; }
.kzp-ico.xl { width: 40px; height: 40px; stroke-width: 1.2; }

/* ---------------- 布局容器 ---------------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1560px; }
.page { padding: 26px 0 64px; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.row-wrap { display: flex; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.gap-20 { gap: 20px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.mt-4{margin-top:4px}.mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}
.mt-20{margin-top:20px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}.mt-40{margin-top:40px}
.mb-4{margin-bottom:4px}.mb-8{margin-bottom:8px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}
.mb-20{margin-bottom:20px}.mb-24{margin-bottom:24px}.mb-32{margin-bottom:32px}
.tc { text-align: center; } .tr { text-align: right; }

/* ---------------- 文本 ---------------- */
.t-xs { font-size: 12px; } .t-sm { font-size: 13px; } .t-md { font-size: 15px; }
.t-lg { font-size: 17px; } .t-xl { font-size: 20px; } .t-2xl { font-size: 26px; }
.t-3xl { font-size: 32px; } .t-4xl { font-size: 42px; }
.c-2 { color: var(--ink-2); } .c-3 { color: var(--ink-3); } .c-4 { color: var(--ink-4); }
.c-brand { color: var(--brand); } .c-ok { color: var(--ok); } .c-danger { color: var(--danger); }
.c-warn { color: var(--warn); } .c-accent { color: var(--accent); }
.fw-5 { font-weight: 500; } .fw-6 { font-weight: 600; } .fw-7 { font-weight: 700; }
.nowrap { white-space: nowrap; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-1 { display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.clamp-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.clamp-3 { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.ellipsis-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.price { color: var(--danger); font-weight: 700; font-variant-numeric: tabular-nums; }
.price .unit { font-size: .72em; margin-right: 1px; }
.price-old { color: var(--ink-4); text-decoration: line-through; font-size: .82em; font-weight: 400; margin-left: 6px; }
.mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.label-dim { color: var(--ink-4); }

/* ==========================================================================
   顶部导航
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 200;
  height: var(--nav-h);
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in { height: 100%; display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(140deg, var(--brand) 0%, #14A08F 60%, var(--accent) 160%);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 17px;
  box-shadow: 0 3px 10px rgba(15,118,110,.28);
  letter-spacing: -1px;
}
.logo-txt { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name { font-size: 16.5px; font-weight: 700; letter-spacing: .3px; }
.logo-sub { font-size: 10.5px; color: var(--ink-4); letter-spacing: .6px; }

.nav-menu { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-link {
  padding: 8px 13px; border-radius: var(--r); font-size: 14.5px; color: var(--ink-2);
  display: flex; align-items: center; gap: 6px; font-weight: 500;
  /* 关键：菜单项绝不折行，宁可整体压缩间距也不让最后一个字掉到第二行 */
  white-space: nowrap; flex: none;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.nav-link:hover { background: var(--brand-50); color: var(--brand); }
.nav-link.on { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 10px; flex: none; }

.search-box {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px; min-width: 220px;
  background: var(--muted-bg); border: 1px solid transparent; border-radius: 999px;
  transition: all .18s var(--ease);
}
.search-box:focus-within { background: #fff; border-color: var(--brand-300); box-shadow: 0 0 0 3px var(--brand-50); }
.search-box input { border: 0; background: none; outline: 0; flex: 1; font-size: 13.5px; min-width: 0; }

/* ==========================================================================
   按钮
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 18px; border-radius: var(--r);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  transition: all .16s var(--ease); user-select: none;
}
.btn:hover { border-color: var(--brand-300); color: var(--brand); background: var(--brand-50); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(15,118,110,.22); }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; box-shadow: 0 4px 14px rgba(15,118,110,.28); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(232,131,58,.24); }
.btn-accent:hover { background: var(--accent-600); border-color: var(--accent-600); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #BC3838; border-color: #BC3838; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-3); }
.btn-ghost:hover { background: var(--muted-bg); color: var(--brand); border-color: transparent; }
.btn-soft { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand); }
.btn-soft:hover { background: var(--brand-100); border-color: var(--brand-300); color: var(--brand-700); }
.btn-lg { height: 46px; padding: 0 26px; font-size: 15px; border-radius: var(--r-lg); }
.btn-sm { height: 31px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); gap: 5px; }
.btn-xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: var(--r-xs); gap: 4px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 31px; }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

.btn-group { display: inline-flex; gap: 6px; }

/* ==========================================================================
   卡片 / 面板
   ========================================================================== */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
.card-pad { padding: 20px; }
.card-hd {
  padding: 16px 20px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface-2);
}
.card-hd h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-hd h3 .kzp-ico { color: var(--brand); }
.card-bd { padding: 20px; }
.card-ft { padding: 14px 20px; border-top: 1px solid var(--line-2); background: var(--surface-2); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-hd {
  padding: 18px 22px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.panel-hd h3 { font-size: 16px; display: flex; align-items: center; gap: 9px; }
.panel-hd h3 .kzp-ico { color: var(--brand); }
.panel-bd { padding: 22px; }

.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.section-title h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.section-title h2 .kzp-ico { color: var(--brand); }
.section-title .sub { font-size: 13px; color: var(--ink-4); margin-top: 2px; }

/* ==========================================================================
   标签 / 徽章
   ========================================================================== */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 21px; padding: 0 8px; border-radius: var(--r-xs);
  font-size: 11.5px; font-weight: 500; line-height: 1;
  background: var(--muted-bg); color: var(--ink-3); white-space: nowrap;
}
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-danger { background: var(--danger-bg); color: var(--danger); }
.tag-info { background: var(--info-bg); color: var(--info); }
.tag-brand { background: var(--brand-50); color: var(--brand); }
.tag-accent { background: var(--accent-50); color: var(--accent-600); }
.tag-line { background: transparent; border: 1px solid var(--line); color: var(--ink-3); }
.tag-lg { height: 25px; padding: 0 10px; font-size: 12.5px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 13px; border-radius: 999px;
  font-size: 13px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-2); cursor: pointer; transition: all .15s var(--ease);
  white-space: nowrap;
}
.chip:hover { border-color: var(--brand-300); color: var(--brand); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }

/* ==========================================================================
   表单
   ========================================================================== */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.label {
  display: block; margin-bottom: 7px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.label .req { color: var(--danger); margin-left: 3px; }
.label .opt { color: var(--ink-4); font-weight: 400; font-size: 12px; margin-left: 6px; }

.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: 9px 13px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  font-size: 14px; line-height: 1.5;
}
.input:hover, .select:hover, .textarea:hover { border-color: #C9D6D3; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--muted-bg); color: var(--ink-4); cursor: not-allowed; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.7; }
.textarea-lg { min-height: 180px; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23667471' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
  padding-right: 32px; cursor: pointer;
}
.input-icon { position: relative; }
.input-icon .kzp-ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ink-4); pointer-events: none;
}
.input-icon .input { padding-left: 38px; }
.input-icon .input-action {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: var(--ink-4); display: flex; align-items: center; gap: 4px;
  background: none; font-size: 12.5px;
}
.input-icon .input-action:hover { color: var(--brand); }

.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
.form-row-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 18px; }
@media (max-width: 900px) { .form-row, .form-row-3, .form-row-4 { grid-template-columns: 1fr; } }

.hint { font-size: 12px; color: var(--ink-4); margin-top: 6px; line-height: 1.5; }
.hint-warn { color: var(--warn); }
.hint-danger { color: var(--danger); }
.hint-ok { color: var(--ok); }

/* 复选 / 单选 */
.check { display: inline-flex; align-items: flex-start; gap: 8px; cursor: pointer; user-select: none; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-box {
  width: 17px; height: 17px; flex: none; margin-top: 2px;
  border: 1.5px solid #C3CFCC; border-radius: var(--r-xs);
  background: #fff; transition: all .15s var(--ease);
  display: grid; place-items: center;
}
.check:hover .check-box { border-color: var(--brand); }
.check input:checked + .check-box { background: var(--brand); border-color: var(--brand); }
.check input:checked + .check-box::after {
  content: ''; width: 9px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.check input:focus-visible + .check-box { box-shadow: 0 0 0 3px var(--brand-50); }
.check-txt { font-size: 13px; line-height: 1.55; }
.check-txt a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.check-row { display: flex; flex-wrap: wrap; gap: 14px 22px; }
.check-card {
  display: flex; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r); cursor: pointer;
  transition: all .15s var(--ease); background: var(--surface);
}
.check-card:hover { border-color: var(--brand-300); background: var(--brand-50); }
.check-card input { position: absolute; opacity: 0; }
.check-card .check-box { margin-top: 1px; }
.check-card:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.radio-card {
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r);
  cursor: pointer; transition: all .15s var(--ease); text-align: center;
}
.radio-card:hover { border-color: var(--brand-300); }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 2px var(--brand-50); }
.radio-card input { display: none; }

/* 上传 */
.upload-box {
  border: 1.5px dashed #CFDBD8; border-radius: var(--r-lg);
  padding: 26px; text-align: center; background: var(--surface-2);
  transition: all .18s var(--ease); cursor: pointer;
}
.upload-box:hover { border-color: var(--brand); background: var(--brand-50); }
.upload-box .kzp-ico { color: var(--brand); }
.upload-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.up-item {
  position: relative; width: 92px; height: 92px; border-radius: var(--r);
  overflow: hidden; border: 1px solid var(--line); background: var(--muted-bg);
}
.up-item img { width: 100%; height: 100%; object-fit: cover; }
.up-del {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
  border-radius: 50%; background: rgba(22,33,31,.68); color: #fff;
  display: grid; place-items: center;
}
.up-del:hover { background: var(--danger); }
.up-item.cover::after {
  content: '主图'; position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(15,118,110,.9); color: #fff; font-size: 10px;
  text-align: center; padding: 2px 0; letter-spacing: 1px;
}

/* ==========================================================================
   表格
   ========================================================================== */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); }
.tbl { width: 100%; font-size: 13.5px; }
.tbl thead th {
  padding: 11px 14px; text-align: left; font-weight: 600; font-size: 12.5px;
  color: var(--ink-3); background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap; letter-spacing: .2px;
}
.tbl tbody td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .td-num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .td-act { text-align: right; white-space: nowrap; }
.tbl .td-act .btn { margin-left: 5px; }
.tbl-compact tbody td { padding: 9px 12px; }

.cell-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.cell-thumb {
  width: 42px; height: 42px; border-radius: var(--r-sm); object-fit: cover;
  border: 1px solid var(--line); flex: none; background: var(--muted-bg);
}
.cell-thumb-lg { width: 58px; height: 58px; }
.cell-txt { min-width: 0; }
.cell-txt .t1 { font-weight: 500; }
.cell-txt .t2 { font-size: 12px; color: var(--ink-4); margin-top: 1px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--brand-50); flex: none; display: grid; place-items: center; color: var(--brand); font-weight: 600; }

/* ==========================================================================
   分页
   ========================================================================== */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 24px 0 8px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 34px; height: 34px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); font-size: 13.5px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  transition: all .15s var(--ease);
}
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager .dots { border: 0; background: none; color: var(--ink-4); }
.pager-info { font-size: 12.5px; color: var(--ink-4); }

/* ==========================================================================
   空状态 / 提示条
   ========================================================================== */
.empty { padding: 64px 20px; text-align: center; }
.empty .kzp-ico { color: #CBD8D5; stroke-width: 1.1; margin-bottom: 14px; }
.empty h3 { font-size: 16px; color: var(--ink-2); margin-bottom: 6px; }
.empty p { font-size: 13.5px; color: var(--ink-4); margin-bottom: 18px; }

.alert {
  display: flex; gap: 11px; padding: 13px 16px;
  border-radius: var(--r); font-size: 13.5px; line-height: 1.6;
  border: 1px solid transparent; margin-bottom: 18px;
}
.alert .kzp-ico { flex: none; margin-top: 1px; }
.alert-info { background: var(--info-bg); color: #1A4A9C; border-color: #C9DCF8; }
.alert-ok { background: var(--ok-bg); color: #0C6B4A; border-color: #B9E5D2; }
.alert-warn { background: var(--warn-bg); color: #8F6606; border-color: #F0DFA8; }
.alert-danger { background: var(--danger-bg); color: #A82F2F; border-color: #F3C8C8; }
.alert-brand { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
.alert a { text-decoration: underline; font-weight: 500; }
.alert b { font-weight: 600; }

.flash-fixed {
  position: fixed; top: 78px; left: 50%; transform: translateX(-50%);
  z-index: 900; min-width: 300px; max-width: 620px;
  box-shadow: var(--sh-lg); border-radius: var(--r); animation: slideDown .3s var(--ease);
}
@keyframes slideDown { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ==========================================================================
   商品卡片
   ========================================================================== */
.grid-goods { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 20px; }
.grid-svc { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 1180px) { .grid-5 { grid-template-columns: repeat(4, 1fr); } .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .grid-5, .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-goods, .grid-svc, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } }

.gcard {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  transition: all .2s var(--ease); display: flex; flex-direction: column;
}
.gcard:hover { border-color: var(--brand-300); box-shadow: var(--sh); transform: translateY(-2px); }
.gcard-img { position: relative; aspect-ratio: 1/1; background: var(--muted-bg); overflow: hidden; }
.gcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.gcard:hover .gcard-img img { transform: scale(1.04); }
.gcard-badge {
  position: absolute; top: 10px; left: 10px; display: flex; gap: 5px; flex-wrap: wrap;
}
.gcard-fav {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px;
  border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink-3);
  display: grid; place-items: center; box-shadow: var(--sh-xs);
  transition: all .15s var(--ease);
}
.gcard-fav:hover, .gcard-fav.on { color: var(--danger); }
.gcard-fav.on svg { fill: currentColor; }
.gcard-bd { padding: 13px 14px 14px; flex: 1; display: flex; flex-direction: column; }
.gcard-title { font-size: 14.5px; font-weight: 500; line-height: 1.45; margin-bottom: 6px; min-height: 42px; }
.gcard-meta { font-size: 12px; color: var(--ink-4); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.gcard-ft { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; }
.gcard-shop { font-size: 12px; color: var(--ink-4); display: flex; align-items: center; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.gcard-empty { aspect-ratio: 1/1; display: grid; place-items: center; color: #CBD8D5; }

/* 服务卡片 */
.scard {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  transition: all .2s var(--ease); display: flex; flex-direction: column;
}
.scard:hover { border-color: var(--brand-300); box-shadow: var(--sh); transform: translateY(-2px); }
.scard-top { height: 152px; position: relative; background: linear-gradient(135deg, var(--brand-50), #F0FAF7); }
.scard-top img { width: 100%; height: 100%; object-fit: cover; }
.scard-ico {
  position: absolute; left: 16px; bottom: -22px;
  width: 46px; height: 46px; border-radius: var(--r);
  background: var(--brand); color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(15,118,110,.3); border: 3px solid #fff;
}
.scard-bd { padding: 30px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.scard-type { font-size: 11.5px; color: var(--brand); background: var(--brand-50); padding: 2px 8px; border-radius: var(--r-xs); font-weight: 500; display: inline-block; }
.scard-title { font-size: 16px; font-weight: 600; margin: 9px 0 6px; }
.scard-desc { font-size: 13px; color: var(--ink-3); line-height: 1.6; min-height: 42px; }

/* ==========================================================================
   统计块
   ========================================================================== */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px 20px;
  display: flex; align-items: flex-start; gap: 14px;
  transition: all .18s var(--ease);
}
.stat:hover { border-color: var(--brand-300); box-shadow: var(--sh-sm); }
.stat-ico {
  width: 44px; height: 44px; border-radius: var(--r); flex: none;
  display: grid; place-items: center; background: var(--brand-50); color: var(--brand);
}
.stat-ico.a { background: var(--accent-50); color: var(--accent); }
.stat-ico.o { background: var(--ok-bg); color: var(--ok); }
.stat-ico.w { background: var(--warn-bg); color: var(--warn); }
.stat-ico.d { background: var(--danger-bg); color: var(--danger); }
.stat-ico.i { background: var(--info-bg); color: var(--info); }
.stat-v { font-size: 25px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-k { font-size: 12.5px; color: var(--ink-4); margin-top: 2px; }
.stat-d { font-size: 12px; margin-top: 5px; display: flex; align-items: center; gap: 3px; }

/* 迷你条形图 */
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 20px; }
.bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bar-col {
  width: 100%; max-width: 34px; border-radius: var(--r-xs) var(--r-xs) 0 0;
  background: linear-gradient(180deg, var(--brand-300), var(--brand));
  transition: all .2s var(--ease); position: relative; min-height: 3px;
}
.bar-col:hover { background: linear-gradient(180deg, #7DD3C7, var(--brand-600)); }
.bar-lb { font-size: 10.5px; color: var(--ink-4); white-space: nowrap; }
.bar-val { font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   文档页（协议/规则）
   ========================================================================== */
.doc-wrap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 40px 48px;
  max-width: 900px; margin: 0 auto; line-height: 1.9;
}
.doc-wrap h2 {
  font-size: 19px; margin: 32px 0 14px; padding-left: 12px;
  border-left: 3px solid var(--brand); color: var(--ink);
}
.doc-wrap > h2:first-child { margin-top: 0; }
.doc-wrap h3 { font-size: 15.5px; margin: 22px 0 10px; color: var(--ink-2); }
.doc-wrap p { font-size: 14px; color: var(--ink-2); margin-bottom: 12px; }
.doc-wrap ul, .doc-wrap ol { margin: 0 0 14px; padding-left: 4px; }
.doc-wrap ul li { list-style: none; position: relative; padding-left: 18px; margin-bottom: 7px; font-size: 14px; color: var(--ink-2); }
.doc-wrap ul li::before {
  content: ''; position: absolute; left: 4px; top: 11px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--brand-300);
}
.doc-wrap ol { counter-reset: n; }
.doc-wrap ol li {
  counter-increment: n; position: relative; padding-left: 26px;
  margin-bottom: 8px; font-size: 14px; color: var(--ink-2); list-style: none;
}
.doc-wrap ol li::before {
  content: counter(n); position: absolute; left: 0; top: 4px;
  width: 18px; height: 18px; border-radius: 50%; background: var(--brand-50);
  color: var(--brand); font-size: 11px; font-weight: 600;
  display: grid; place-items: center;
}
.doc-wrap strong { color: var(--ink); font-weight: 600; }
.doc-wrap em { font-style: normal; color: var(--danger); font-weight: 600; }
.doc-table { margin: 14px 0 20px; font-size: 13.5px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.doc-table th { background: var(--surface-2); padding: 10px 14px; text-align: left; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--line); font-size: 13px; }
.doc-table td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); vertical-align: top; }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-update { margin-top: 32px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--ink-4); text-align: center; }
.doc-nav { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 24px; }

/* ==========================================================================
   步骤条
   ========================================================================== */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 26px; }
.step { display: flex; align-items: center; gap: 10px; flex: 1; }
.step:last-child { flex: none; }
.step-num {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: var(--muted-bg); color: var(--ink-4); border: 1.5px solid var(--line);
}
.step.on .step-num { background: var(--brand); color: #fff; border-color: var(--brand); }
.step.done .step-num { background: var(--ok-bg); color: var(--ok); border-color: #A8DCC6; }
.step-txt { font-size: 13.5px; color: var(--ink-4); }
.step.on .step-txt { color: var(--brand); font-weight: 600; }
.step.done .step-txt { color: var(--ink-2); }
.step-line { flex: 1; height: 1.5px; background: var(--line); margin: 0 12px; }
.step.done .step-line { background: #A8DCC6; }
@media (max-width: 700px) { .step-txt { display: none; } }

/* ==========================================================================
   面包屑
   ========================================================================== */
.crumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-4); margin-bottom: 18px; flex-wrap: wrap; }
.crumb a:hover { color: var(--brand); }
.crumb .sep { color: #C8D4D2; }
.crumb .cur { color: var(--ink-2); }

/* ==========================================================================
   描述列表
   ========================================================================== */
.dl { display: grid; grid-template-columns: auto 1fr; gap: 0; font-size: 13.5px; }
.dl dt { padding: 10px 16px 10px 0; color: var(--ink-4); font-weight: 400; white-space: nowrap; border-bottom: 1px solid var(--line-2); }
.dl dd { padding: 10px 0; margin: 0; color: var(--ink-2); border-bottom: 1px solid var(--line-2); word-break: break-word; }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: 0; }
.dl-2 { grid-template-columns: 108px 1fr; }
.dl-3 { grid-template-columns: 130px 1fr; }

/* ==========================================================================
   进度条
   ========================================================================== */
.bar { height: 7px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.bar-in { height: 100%; background: linear-gradient(90deg, var(--brand-300), var(--brand)); border-radius: 999px; transition: width .5s var(--ease); }
.bar-lg { height: 10px; }
.bar-thin { height: 4px; }

/* ==========================================================================
   工具类
   ========================================================================== */
.hr { height: 1px; background: var(--line-2); margin: 20px 0; }
.hr-dash { height: 0; border-top: 1px dashed var(--line); margin: 18px 0; }
.divider-v { width: 1px; align-self: stretch; background: var(--line); }
.dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .45; display: inline-block; }
.shadow { box-shadow: var(--sh); }
.shadow-lg { box-shadow: var(--sh-lg); }
.rounded { border-radius: var(--r); }
.rounded-lg { border-radius: var(--r-lg); }
.bg-soft { background: var(--surface-2); }
.bg-brand { background: var(--brand-50); }
.clickable { cursor: pointer; }
.trans { transition: all .18s var(--ease); }
.hide { display: none !important; }
.scroll-x { overflow-x: auto; }
.maxw-sm { max-width: 420px; } .maxw-md { max-width: 620px; } .maxw-lg { max-width: 860px; }

.fixed-cta {
  position: sticky; bottom: 0; z-index: 50;
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding: 14px 0;
  box-shadow: 0 -4px 20px rgba(22,33,31,.06);
}

.no-scroll-x { overflow-x: hidden; }

@media (max-width: 768px) {
  .wrap { padding: 0 16px; }
  .doc-wrap { padding: 24px 20px; }
  .nav-menu { display: none; }
  .search-box { min-width: 140px; }
  .page { padding: 16px 0 48px; }
}

/* ---------- 导航栏自适应：逐级收紧，绝不折行 ---------- */
@media (max-width: 1320px) {
  .nav-in { gap: 14px; }
  .search-box { min-width: 190px; }
}
@media (max-width: 1180px) {
  .nav-in { gap: 10px; }
  .nav-link { padding: 8px 10px; font-size: 14px; gap: 5px; }
  .search-box { min-width: 165px; }
  .logo-txt { display: none; }
}
@media (max-width: 1024px) {
  .nav-link { padding: 8px 8px; font-size: 13.5px; }
  .nav-link svg { width: 15px; height: 15px; }
  .search-box { min-width: 150px; }
}
@media (max-width: 900px) {
  .nav-menu { display: none; }
}