/* =====================================================================
   快下班 · 一键查库存 —— 设计系统
   颜色全部取自快下班 logo(太阳钟 + 奔跑小人),每种颜色在界面里只干一件事:
     太阳黄 = 收藏 / 重点      天空蓝 = 导航 / 选中 / 本系统
     奔跑橙 = 行动(查询、提交) 海军蓝 = 文字
   底色、卡片、圆角、阴影跟快下班门市 app 同一个质感(暖米白底、白卡、柔和阴影)。
   老板后台的布局在 admin.css,这里放两页共用的。
   ===================================================================== */
:root {
  /* 快下班品牌原色(logo 里的) */
  --kxb-sky: #5bc8ff;
  --kxb-sun: #ffd34d;
  --kxb-run: #ff6b35;
  --kxb-run-deep: #e8541e;
  --kxb-navy: #2b3a55;

  /* 界面角色 */
  --bg: #f8f6f1;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --track: #efece6;
  --line: #ebe6dd;
  --line-strong: #dcd5c9;
  --text: #24324a;
  --text-2: #5c6a80;
  --text-3: #8b97aa;
  --brand-ink: #2b3a55;
  --primary: #0b78bf;          /* 天空蓝加深到看得清 */
  --primary-soft: #e7f4fd;
  --primary-line: #b6def6;
  --on-primary: #ffffff;       /* 天空蓝底上的字 */
  --tab-on: #ffffff;           /* 选中标签的底 */
  --action: #f2622c;           /* 奔跑橙 */
  --action-deep: #d94a15;
  --action-soft: #fff0e8;
  --sun: #f2a900;              /* 太阳黄加深一点,星星在白底上看得见 */
  --sun-soft: #fff5d4;
  --sun-ink: #8a5f00;
  --own: #0b78bf;              /* 本系统 = 快下班自家门市 → 天空蓝 */
  --good: #16865a;
  --info: #0b78bf;
  --warn: #b86400;
  --bad: #d2392d;
  --zero: #cdd3dc;
  --glow-sky: rgba(91, 200, 255, 0.24);
  --glow-sun: rgba(255, 211, 77, 0.2);
  --head-bg: rgba(255, 255, 255, 0.84);
  --shadow-sm: 0 1px 2px rgba(43, 58, 85, 0.06);
  --shadow: 0 1px 3px rgba(43, 58, 85, 0.06), 0 10px 26px rgba(43, 58, 85, 0.07);
  --shadow-lg: 0 24px 60px rgba(30, 40, 60, 0.22);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 22px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --on-primary: #08182a; --tab-on: #2a3850;
    --bg: #121822; --surface: #1a2230; --surface-2: #1f2837; --track: rgba(255,255,255,.06);
    --line: #2a3546; --line-strong: #39465b;
    --text: #e8eef7; --text-2: #a9b5c7; --text-3: #7f8ca2; --brand-ink: #f2f6fb;
    --primary: #4db8f5; --primary-soft: rgba(77,184,245,.14); --primary-line: rgba(77,184,245,.38);
    --action: #ff7442; --action-deep: #f0612b; --action-soft: rgba(255,116,66,.14);
    --sun: #ffd34d; --sun-soft: rgba(255,211,77,.14); --sun-ink: #ffd34d;
    --own: #4db8f5; --good: #4ad08a; --info: #4db8f5; --warn: #f5b94a; --bad: #ff7b6e; --zero: #3a4558;
    --glow-sky: rgba(91,200,255,.12); --glow-sun: rgba(255,211,77,.06); --head-bg: rgba(18,24,34,.82);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.35); --shadow: 0 1px 3px rgba(0,0,0,.4), 0 12px 30px rgba(0,0,0,.32);
  }
}
:root[data-theme="dark"] {
  --on-primary: #08182a; --tab-on: #2a3850;
  --bg: #121822; --surface: #1a2230; --surface-2: #1f2837; --track: rgba(255,255,255,.06);
  --line: #2a3546; --line-strong: #39465b;
  --text: #e8eef7; --text-2: #a9b5c7; --text-3: #7f8ca2; --brand-ink: #f2f6fb;
  --primary: #4db8f5; --primary-soft: rgba(77,184,245,.14); --primary-line: rgba(77,184,245,.38);
  --action: #ff7442; --action-deep: #f0612b; --action-soft: rgba(255,116,66,.14);
  --sun: #ffd34d; --sun-soft: rgba(255,211,77,.14); --sun-ink: #ffd34d;
  --own: #4db8f5; --good: #4ad08a; --info: #4db8f5; --warn: #f5b94a; --bad: #ff7b6e; --zero: #3a4558;
  --glow-sky: rgba(91,200,255,.12); --glow-sun: rgba(255,211,77,.06); --head-bg: rgba(18,24,34,.82);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35); --shadow: 0 1px 3px rgba(0,0,0,.4), 0 12px 30px rgba(0,0,0,.32);
}

/* ── 基础 ── */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  /* 左上一抹天空、右上一点太阳光 —— 跟 logo 的天空和太阳呼应 */
  background-image:
    radial-gradient(900px 420px at -12% -10%, var(--glow-sky), transparent 62%),
    radial-gradient(620px 360px at 112% -8%, var(--glow-sun), transparent 58%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
button, input, textarea, select { font: inherit; }
a { color: var(--primary); }
:focus-visible { outline: 2.5px solid var(--primary); outline-offset: 2px; }
.ico { display: inline-block; width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hint { color: var(--text-3); font-size: 13px; }
.err { color: var(--bad); }
.break { word-break: break-all; }

/* ── 品牌(快下班 logo + 产品名,跟快下班横版字标一个排法:品牌大、产品小)── */
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.brand img { display: block; flex: none; filter: drop-shadow(0 2px 6px rgba(43, 58, 85, 0.18)); }
@media (max-width: 480px) { .brand img { width: 42px; height: 42px; } .topbar-inner { height: 62px; } }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-text b { font-size: 18px; font-weight: 800; letter-spacing: 1px; color: var(--brand-ink); }
.brand-text small { margin-top: 2px; font-size: 12px; font-weight: 600; letter-spacing: 1.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 照快下班横版字标(门市 / 工厂共用的 wordmark-horizontal:「门市库存系统 · KXB.HK」):网址大写、字距放宽、颜色浅一档 */
.brand-domain { letter-spacing: 2px; color: var(--text-3); }

/* ── 顶栏(浅色磨砂,和快下班门市 app 一样轻)── */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--head-bg); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.topbar-inner { max-width: 880px; margin: 0 auto; height: 66px; padding: 0 16px; display: flex; align-items: center; gap: 8px; }
.topbar-inner .brand { flex: 1; }
.ghost-btn { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.ghost-btn:hover { color: var(--primary); border-color: var(--primary-line); background: var(--primary-soft); }
.ghost-btn:active { transform: scale(.96); }

/* ── 功能标签(分段选择器:选中那格白底 + 天空蓝)── */
.tabs { max-width: 848px; margin: 0 auto; display: flex; gap: 4px; padding: 4px; margin-bottom: 10px; border-radius: 14px; background: var(--track); width: calc(100% - 32px); }
.tabbtn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border: 0; border-radius: 11px; background: transparent; color: var(--text-2); font-size: 15px; font-weight: 700; cursor: pointer; position: relative; transition: background .15s, color .15s, box-shadow .15s; }
.tabbtn .tabbtn-ico { display: inline-flex; }
.tabbtn .tabbtn-ico .ico { width: 18px; height: 18px; }
.tabbtn:hover:not(.on) { color: var(--text); }
.tabbtn.on { background: var(--tab-on); color: var(--primary); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.tabbtn:not(.on):active { transform: scale(.97); }
.tabbtn .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--kxb-sun); color: #5c4300; font-size: 11.5px; font-weight: 800; font-style: normal; line-height: 20px; text-align: center; }
.tabbtn.on .badge { background: var(--primary); color: var(--on-primary); }

main { max-width: 880px; margin: 0 auto; }
.tab { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.tab-body { padding: 4px 16px 28px; }

/* ── 搜索条(查询按钮 = 奔跑橙,全页唯一的大号主操作)── */
.search { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px; }
.search-ico { position: absolute; left: 31px; top: 50%; transform: translateY(-50%); display: inline-flex; color: var(--text-3); pointer-events: none; }
.search-ico .ico { width: 20px; height: 20px; }
.search input { flex: 1; min-width: 0; height: 54px; padding: 0 14px 0 46px; border: 1.5px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--text); font-size: 19px; font-weight: 600; letter-spacing: .5px; outline: none; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.search input::placeholder { color: var(--text-3); font-size: 16px; font-weight: 400; letter-spacing: 0; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search button { flex: none; height: 54px; padding: 0 26px; border: 0; border-radius: 15px; background: linear-gradient(135deg, #ff7a45, var(--action-deep)); color: #fff; font-size: 17px; font-weight: 800; letter-spacing: 2px; cursor: pointer; white-space: nowrap; box-shadow: 0 6px 16px rgba(242, 98, 44, 0.32); transition: transform .06s, box-shadow .15s, filter .15s; }
.search button:hover { filter: brightness(1.04); box-shadow: 0 8px 20px rgba(242, 98, 44, 0.38); }
.search button:active { transform: scale(.97); }
.search button:disabled { opacity: .6; box-shadow: none; cursor: default; }

.status { min-height: 22px; margin: 2px 2px 10px; font-weight: 700; font-size: 15px; color: var(--text); }
.loading { color: var(--text-2); font-size: 14px; margin: 0 2px 12px; display: flex; align-items: center; gap: 8px; }
.loading::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--primary); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 首屏(没查之前):讲清楚这页能干嘛,不放装饰图 —— logo 只在头部出现一次 ── */
.intro { text-align: center; padding: 26px 0 14px; }
.intro h2 { margin: 0 0 8px; font-size: 21px; font-weight: 800; color: var(--text); }
.intro-sub { margin: 0 auto; max-width: 340px; color: var(--text-2); font-size: 14.5px; }
.intro-facts { list-style: none; margin: 18px auto 2px; padding: 0; max-width: 420px; display: grid; gap: 8px; text-align: left; }
.intro-facts li { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); font-size: 14.5px; color: var(--text); }
.intro-facts .ico { width: 20px; height: 20px; color: var(--primary); }
.intro-facts .fact-star { flex: none; width: 20px; text-align: center; font-size: 18px; line-height: 1; color: var(--sun); }
@media (min-width: 720px) {
  .intro-facts { max-width: none; grid-template-columns: repeat(3, 1fr); }
  .intro-facts li { flex-direction: column; justify-content: center; text-align: center; gap: 6px; padding: 14px 12px; }
}
.link-btn { background: none; border: 0; color: var(--primary); font-size: 15px; font-weight: 700; cursor: pointer; padding: 14px 0 2px; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── 结果卡片 ── */
.results { display: flex; flex-direction: column; gap: 12px; }
.card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 0; box-shadow: var(--shadow-sm); animation: pop .22s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: transparent; }
.card.own::before { background: var(--own); }
.card.fav { border-color: color-mix(in srgb, var(--sun) 45%, var(--line)); }
.card.fav::before { background: var(--sun); }
.card-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.fav-btn { flex: none; background: none; border: 0; font-size: 24px; line-height: 1; cursor: pointer; color: var(--zero); padding: 2px; margin: -2px -2px 0; transition: transform .12s, color .12s; }
.fav-btn:hover { color: var(--sun); }
.fav-btn.on { color: var(--sun); }
.fav-btn:active { transform: scale(1.25); }
.card-title { flex: 1; min-width: 0; }
.card-name { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.card-name strong { font-size: 17px; font-weight: 800; color: var(--text); }
.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.tag.own { background: var(--primary-soft); color: var(--own); }
.tag.fav { background: var(--sun-soft); color: var(--sun-ink); }
.card-sku { color: var(--text-3); font-size: 13px; margin-top: 2px; word-break: break-all; }
.card-total { flex: none; text-align: right; line-height: 1.15; }
.card-total b { font-size: 24px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.card-total span { display: inline; margin-left: 2px; font-size: 12px; color: var(--text-3); }
.card-time { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.card-time.stale { color: var(--warn); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -14px; padding: 0 14px 10px; }
table.stock { border-collapse: collapse; width: 100%; font-size: 14.5px; }
table.stock th, table.stock td { padding: 7px 6px; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.stock th { color: var(--text-3); font-weight: 600; font-size: 12px; background: var(--surface-2); border-bottom-color: var(--line); }
table.stock th:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
table.stock th:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
table.stock th:first-child, table.stock td:first-child { text-align: left; }
table.stock tbody tr:last-child td { border-bottom: 0; }
table.stock td.color { font-weight: 700; color: var(--text); }
table.stock .num { font-variant-numeric: tabular-nums; }
table.stock td.num { font-weight: 600; color: var(--text); }
table.stock .zero { color: var(--zero); font-weight: 400; }
table.stock td.total { font-weight: 800; color: var(--text); }
/* 电脑宽屏:尺码数字定宽靠右,颜色/里料/位置吃掉剩下的宽度 —— 像对账单,不把三五个数字摊到满屏 */
@media (min-width: 720px) {
  table.stock th.num, table.stock td.num { width: 64px; }
}

/* 正在查 / 网站较慢 的浅色小卡片 */
.card.pending { background: var(--surface-2); box-shadow: none; padding-bottom: 4px; }
.card.pending .card-sku { color: var(--text-3); }
.card.pending .card-name strong { color: var(--text-2); }
.mini-spin { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--primary); border-right-color: transparent; animation: spin .7s linear infinite; margin-top: 2px; }
.mini-spin.calm { border-color: var(--warn); border-right-color: transparent; animation-duration: 1.4s; }
.card.slow { border-style: dashed; }

/* 有这个货号、现在没库存:跟「这次没查到」一样是小字列表,但用实线框、说清是「没库存」不是没查到 */
.nostock { margin-top: 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 12px 14px; font-size: 13.5px; color: var(--text-2); }
.nostock-title { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.nostock ul { margin: 0; padding-left: 18px; }
.nostock li { margin: 3px 0; }
.nostock .tag { margin-left: 6px; }
.nostock a { margin-left: 6px; color: var(--primary); white-space: nowrap; font-weight: 600; }
.status-link { margin-left: 2px; color: var(--primary); font-weight: 700; white-space: nowrap; }
.failed { margin-top: 14px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 12px 14px; font-size: 13.5px; color: var(--text-2); }
.failed-title { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.failed ul { margin: 0; padding-left: 18px; }
.failed li { margin: 3px 0; }
.failed a { margin-left: 6px; color: var(--primary); white-space: nowrap; font-weight: 600; }

/* ── 收藏商家快选(选一家只查这一家)── */
.fav-bar { padding: 4px 16px 0; }
/* 标题 + 「找商家」框一行(手机上框换到下一行占满) */
.fav-bar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.fav-bar-title { font-size: 13px; color: var(--text-2); font-weight: 700; }
.fav-find { flex: 0 1 240px; min-width: 0; height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 14px; outline: none; }
.fav-find::placeholder { color: var(--text-3); }
.fav-find:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.fav-find-hint { margin: 6px 0 0; font-size: 12.5px; }
@media (max-width: 480px) { .fav-find { flex: 1 1 100%; } }
.fav-bar-title small { font-weight: 400; color: var(--text-3); }
/* 每个胶囊一样大、排成整齐的格子:电脑一排 6 个、平板 4 个、手机 3 个;名字太长用省略号收住(悬停看全名) */
.fav-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fav-chip { flex: 0 0 calc((100% - 5 * 8px) / 6); min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 38px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; overflow: hidden; transition: background .15s, border-color .15s, color .15s; }
.fav-chip .chip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) { .fav-chip { flex-basis: calc((100% - 3 * 8px) / 4); } }
@media (max-width: 480px) { .fav-chip { flex-basis: calc((100% - 2 * 8px) / 3); padding: 0 8px; font-size: 13.5px; } }
.fav-chip:hover { border-color: var(--primary-line); }
.fav-chip .chip-star { color: var(--sun); font-size: 13px; }
.fav-chip.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.fav-chip.on .chip-star { color: var(--kxb-sun); }

/* ── 最近查过 ── */
.history-bar { display: flex; align-items: center; gap: 8px; margin: 2px 0 12px; flex-wrap: wrap; }
.history-label { font-size: 12.5px; color: var(--text-3); font-weight: 700; flex: none; }
.history-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.history-chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 13px; font-size: 14px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; transition: background .15s, border-color .15s, color .15s; }
.history-chip:hover { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary); }
.history-clear { border: 0; background: none; color: var(--text-3); font-size: 12.5px; cursor: pointer; flex: none; }
.history-clear:hover { color: var(--bad); }

/* ── 页头 ── */
.page-head { margin: 4px 0 14px; }
.page-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 800; color: var(--text); }
.page-sub { margin: 0; color: var(--text-2); font-size: 13.5px; }

/* ── 找商家 + 商家网格 ── */
.filter { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 0 12px; margin-bottom: 12px; transition: border-color .15s, box-shadow .15s; }
.filter:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.filter span { display: inline-flex; color: var(--text-3); }
.filter input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); height: 44px; font-size: 16px; outline: none; }
.merchant-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.merchant-list li { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; box-shadow: var(--shadow-sm); min-width: 0; transition: border-color .15s, transform .15s; }
.merchant-list li.fav { border-color: color-mix(in srgb, var(--sun) 50%, var(--line)); background: color-mix(in srgb, var(--sun-soft) 45%, var(--surface)); }
.mlist-fav { flex: none; background: none; border: 0; font-size: 20px; line-height: 1; color: var(--zero); cursor: pointer; padding: 1px; transition: color .12s, transform .12s; }
.mlist-fav:hover, .mlist-fav.on { color: var(--sun); }
.mlist-fav:active { transform: scale(1.2); }
.mlist-main { flex: 1; min-width: 0; }
.mlist-name { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 5px; min-width: 0; flex-wrap: wrap; color: var(--text); }
.mlist-name > span:first-child { overflow: visible; text-overflow: clip; white-space: normal; word-break: break-word; }
.mlist-name .tag { flex: none; font-size: 10px; padding: 1px 6px; }
.mlist-type { color: var(--text-3); font-size: 11.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-empty { grid-column: 1 / -1; text-align: center; color: var(--text-3); font-size: 14px; padding: 30px 0; }
.dashed-btn { width: 100%; margin-top: 12px; border: 1.5px dashed var(--primary-line); background: none; color: var(--primary); border-radius: var(--radius-sm); padding: 13px; font-size: 15px; font-weight: 700; cursor: pointer; transition: background .15s; }
.dashed-btn:hover, .dashed-btn:active { background: var(--primary-soft); }

/* ── 表单 / 按钮(两页共用)── */
.add-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 700; color: var(--text); }
.field label small { font-weight: 500; color: var(--text-3); }
.field-tip { color: var(--text-3); font-size: 12.5px; }
.field textarea, .field input, .fb-body textarea, .fb-body input:not([type]), .fb-body input[type="text"] { width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); padding: 12px; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.field textarea:focus, .field input:focus, .fb-body textarea:focus, .fb-body input:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px var(--primary-soft); }
.field textarea::placeholder, .field input::placeholder, .fb-body textarea::placeholder, .fb-body input::placeholder { color: var(--text-3); }
.qr-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.qr-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border: 1.5px solid var(--primary-line); color: var(--primary); background: var(--primary-soft); border-radius: var(--radius-sm); cursor: pointer; font-size: 14.5px; font-weight: 700; }
.qr-btn:hover { border-color: var(--primary); }
.primary-btn { border: 0; border-radius: 13px; background: linear-gradient(135deg, #ff7a45, var(--action-deep)); color: #fff; padding: 14px 20px; font-size: 16px; font-weight: 800; letter-spacing: 1px; cursor: pointer; width: 100%; box-shadow: 0 6px 16px rgba(242, 98, 44, 0.28); transition: transform .06s, filter .15s, box-shadow .15s; }
.primary-btn:hover { filter: brightness(1.04); }
.primary-btn:active { transform: scale(.99); }
.primary-btn.small { width: auto; padding: 9px 18px; font-size: 14px; letter-spacing: 0; box-shadow: 0 4px 10px rgba(242, 98, 44, 0.24); }
.primary-btn:disabled { opacity: .6; box-shadow: none; cursor: default; }
.add-msg { min-height: 20px; margin-top: 12px; font-weight: 700; font-size: 14.5px; }
.add-msg:empty { margin-top: 0; min-height: 0; }
.add-msg.good { color: var(--good); } .add-msg.info { color: var(--info); } .add-msg.warn { color: var(--warn); } .add-msg.bad { color: var(--bad); }
#addSample { margin-top: 10px; }
.add-foot { margin: 14px 2px 0; }

/* ── 意见反馈弹窗(电脑上居中;手机上从底部滑出的抽屉)── */
.fb-dialog { border: 0; padding: 0; margin: auto; background: transparent; color: var(--text); width: calc(100% - 24px); max-width: 460px; max-height: 92vh; max-height: 92dvh; overflow: visible; }
.fb-dialog::backdrop { background: rgba(18, 26, 40, 0.48); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.fb-dialog[open] .fb-sheet { animation: sheetIn .24s cubic-bezier(.2, .8, .2, 1); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.fb-sheet { display: flex; flex-direction: column; max-height: inherit; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.fb-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 10px; }
.fb-head-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--action-soft); color: var(--action); }
.fb-head-ico .ico { width: 22px; height: 22px; }
.fb-head-text { flex: 1; min-width: 0; }
.fb-head h2 { margin: 0; font-size: 19px; font-weight: 800; color: var(--text); }
.fb-head p { margin: 3px 0 0; font-size: 13.5px; color: var(--text-2); }
.icon-btn { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--track); color: var(--text-2); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--line); color: var(--text); }
.icon-btn .ico { width: 18px; height: 18px; }
.fb-body { padding: 6px 20px 6px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.fb-label { display: block; font-size: 14px; font-weight: 700; color: var(--text); margin: 0 0 7px; }
.fb-label small { font-weight: 500; color: var(--text-3); margin-left: 4px; }
.fb-types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.fb-type { position: relative; display: block; cursor: pointer; }
.fb-type input { position: absolute; opacity: 0; pointer-events: none; }
.fb-type > span { display: flex; align-items: center; gap: 10px; height: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .15s, background .15s, box-shadow .15s; }
.fb-type .ico { width: 22px; height: 22px; color: var(--text-3); }
.fb-type b { display: block; font-size: 15px; font-weight: 800; color: var(--text); }
.fb-type small { display: block; font-size: 12px; color: var(--text-3); margin-top: 1px; }
.fb-type:hover > span { border-color: var(--primary-line); }
.fb-type input:checked + span { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent); }
.fb-type input:checked + span b, .fb-type input:checked + span .ico { color: var(--primary); }
.fb-type input:focus-visible + span { outline: 2.5px solid var(--primary); outline-offset: 2px; }
.fb-body textarea { min-height: 104px; resize: vertical; margin-bottom: 16px; display: block; }
.fb-body #fbContact { margin-bottom: 4px; }
.fb-images { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.fb-thumbs { display: contents; }
.fb-thumb { position: relative; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.fb-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fb-thumb-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: rgba(18, 26, 40, 0.66); color: #fff; font-size: 15px; line-height: 22px; text-align: center; cursor: pointer; }
.fb-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 76px; height: 76px; border: 1.5px dashed var(--line-strong); border-radius: 12px; background: var(--surface-2); color: var(--text-3); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.fb-add .ico { width: 24px; height: 24px; }
.fb-add small { font-size: 11.5px; font-weight: 600; }
.fb-add:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.fb-foot { padding: 12px 20px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.fb-foot .add-msg { margin: 0 0 10px; }
@media (max-width: 560px) {
  .fb-dialog { margin: auto 0 0; width: 100%; max-width: 100%; }
  .fb-sheet { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .fb-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  @keyframes sheetIn { from { transform: translateY(40px); } to { transform: none; } }
}

/* ── 新手引导浮层(不遮功能区:卡片会避开高亮的那块)── */
.coach { position: fixed; inset: 0; z-index: 60; }
.coach-mask { position: absolute; inset: 0; background: rgba(18, 26, 40, 0.6); }
.coach-ring { position: absolute; border: 3px solid #fff; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(18, 26, 40, 0.6), 0 0 0 7px rgba(91, 200, 255, 0.45); transition: all .3s ease; pointer-events: none; }
.coach-card { position: absolute; left: 16px; right: 16px; max-width: 520px; margin: 0 auto; background: var(--surface); color: var(--text); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-lg); border-top: 4px solid var(--kxb-sun); }
.coach-card p { margin: 0 0 14px; font-size: 15.5px; line-height: 1.65; }
.coach-foot { display: flex; align-items: center; justify-content: space-between; }
.coach-step { font-size: 13px; color: var(--text-3); font-weight: 700; }
.coach-btns { display: flex; align-items: center; gap: 8px; }

/* 手机窄屏:顶栏的两个小按钮只留图标,给品牌让位 */
@media (max-width: 380px) {
  .ghost-btn .btn-text { display: none; }
  .ghost-btn { width: 34px; padding: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
