/* ==========================================================================
   库存管理系统 —— 全局样式
   风格：现代轻量企业 SaaS（移动端优先）
   配色：白 / 浅灰 / 深青绿
   - 页面背景 #f6f8f8，卡片纯白，品牌色 #167d73
   - 减少边框：靠留白 + 浅背景 + 圆角卡片形成层级
   - 卡片圆角 10–12px，按钮圆角 8px
   - 不用渐变，不用大面积阴影，不用大量描边框
   ========================================================================== */

:root {
  /* ---- 品牌 ---- */
  --primary: #167d73;
  --primary-dark: #0f5f57;
  --primary-light: #e8f4f2;
  --primary-border: #b9ded8;
  --primary-soft: #f2f9f8;

  /* ---- 语义 ---- */
  --success: #15803d;
  --success-light: #ecfdf3;
  --success-text: #14612f;
  --success-border: #c9ebd6;

  --warning: #b45309;
  --warning-light: #fef6e7;
  --warning-text: #8a4007;
  --warning-border: #f6e0b4;

  --danger: #dc2626;
  --danger-light: #fef2f2;
  --danger-text: #a81b1b;
  --danger-border: #f6cccc;

  --info: #0369a1;
  --info-light: #eff8ff;
  --info-text: #02547f;
  --info-border: #c3e0f2;

  /* ---- 中性 ---- */
  --bg: #f6f8f8;
  --card: #ffffff;
  --panel-head: #ffffff;
  --table-head: #f5f8f8;
  --hover: #f7faf9;
  --sunken: #eff3f2;
  --hairline: #e9eeed;
  --line: #f0f4f3;
  --border: #e9eeed;
  --border-strong: #dbe3e2;
  --text: #0f1c1b;
  --text-2: #3a4846;
  --muted: #7b8a88;
  --muted-2: #9aa8a6;

  /* ---- 侧栏（管理端） ---- */
  --side-bg: #102b28;
  --side-text: #b9cdc9;
  --side-line: rgba(255, 255, 255, 0.08);

  /* ---- 形 ---- */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(15, 28, 27, 0.04);
  --shadow: 0 2px 8px rgba(15, 28, 27, 0.06);
  --shadow-lg: 0 10px 32px rgba(15, 28, 27, 0.14);

  --header-h: 54px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC",
    "Hiragino Sans GB", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.35; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* --------------------------------- 图标 --------------------------------- */

.ico { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ico svg { display: block; }
.svg-ico { display: block; flex: none; }

/* --------------------------------- 布局 --------------------------------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 16px;
  background: var(--card);
  color: var(--text);
  border-bottom: 1px solid var(--hairline);
}
.app-header .logo {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 9px;
}
.app-header .title { font-size: 16px; font-weight: 600; flex: 1; min-width: 0; line-height: 1.2; }
.app-header .title > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-header .title small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 1px; }
.app-header .actions { display: flex; gap: 4px; align-items: center; flex: none; }
.app-header a.plain, .app-header button.plain {
  color: var(--text-2); background: transparent; border: 0;
  padding: 7px 9px; border-radius: var(--radius-sm); cursor: pointer; font-size: 12.5px;
  display: inline-flex; align-items: center; gap: 5px;
}
.app-header a.plain:hover, .app-header button.plain:hover {
  background: var(--sunken); color: var(--primary);
}

.wrap { max-width: 860px; margin: 0 auto; padding: 12px 16px 112px; }
.wrap.wide { max-width: 1440px; padding-bottom: 36px; }

/* --------------------------------- 卡片 --------------------------------- */

.card {
  background: var(--card);
  border: 0;
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  overflow: hidden;
}
.card > .card-head {
  display: flex; align-items: center; gap: 9px;
  padding: 14px 16px 10px;
  background: transparent;
  border-bottom: 0;
}
.card > .card-head h3 { font-size: 16px; flex: 1; }
.card > .card-head .hint { font-size: 12px; color: var(--muted); }
.card > .card-body { padding: 0 16px 16px; }
.card > .card-body:first-child { padding-top: 16px; }
.card > .card-body.tight { padding: 0; }

/* 区块标题（不在卡片里，直接挂在页面上） */
.block-head {
  display: flex; align-items: center; gap: 8px;
  padding: 2px 2px 10px;
}
.block-head h3 { font-size: 16px; flex: 1; }
.block-head .hint { font-size: 12px; color: var(--muted); }

.section-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  margin: 18px 2px 9px;
}
.section-title::before {
  content: ''; width: 3px; height: 12px; border-radius: 2px; background: var(--primary);
}
.section-title:first-child { margin-top: 0; }

/* --------------------------------- 按钮 --------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--sunken);
  color: var(--text-2);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.13s, color 0.13s, border-color 0.13s;
  user-select: none;
}
.btn:hover:not(:disabled) { background: #e5ecea; color: var(--text); }
.btn:disabled { background: var(--line); color: var(--muted-2); cursor: not-allowed; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--primary-dark); color: #fff; }
.btn.primary:disabled { background: var(--line); color: var(--muted-2); }
.btn.success { background: var(--success); color: #fff; }
.btn.success:hover:not(:disabled) { background: var(--success-text); color: #fff; }
.btn.danger { background: var(--danger-light); color: var(--danger); }
.btn.danger:hover:not(:disabled) { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.ghost:hover:not(:disabled) { background: var(--primary-light); }
.btn.block { width: 100%; }
.btn.lg { padding: 11px 20px; font-size: 15px; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.xs { padding: 3px 8px; font-size: 12px; border-radius: var(--radius-xs); }
.btn.apply { padding: 7px 16px; font-size: 13.5px; font-weight: 600; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* --------------------------------- 表单 --------------------------------- */

.field { margin-bottom: 12px; }
.field > label {
  display: block; margin-bottom: 6px;
  font-size: 13px; font-weight: 500; color: var(--text-2);
}
.field > label .req { color: var(--danger); margin-left: 2px; }
.field .tip { font-size: 12px; color: var(--muted); margin-top: 5px; }

.input, .select, .textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.13s, box-shadow 0.13s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.textarea { min-height: 78px; resize: vertical; line-height: 1.55; }
.input.sm, .select.sm { padding: 5px 9px; font-size: 13px; }
.input[readonly] { background: var(--sunken); color: var(--text-2); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.switch {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none;
  min-height: 36px; padding: 5px 7px; margin-left: -7px; border-radius: var(--radius-sm);
}
.switch:hover { background: var(--hover); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  display: block;
  width: 44px; height: 26px; border-radius: 999px;
  background: #cbd4cf; border: 1px solid #9eaaa4;
  box-shadow: inset 0 1px 2px rgba(20, 39, 35, 0.12);
  position: relative; transition: background 0.16s, border-color 0.16s, box-shadow 0.16s; flex: none;
}
.switch .track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  border: 1px solid rgba(20, 39, 35, 0.12);
  box-shadow: 0 1px 3px rgba(20, 39, 35, 0.2);
  transition: transform 0.16s;
}
.switch input:checked + .track {
  background: var(--primary); border-color: var(--primary-dark);
  box-shadow: inset 0 1px 2px rgba(11, 92, 85, 0.28);
}
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(17, 120, 111, 0.2); }
.switch .label { font-size: 13.5px; font-weight: 500; color: var(--text-2); }

.checkbox, .radio {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; user-select: none; font-size: 13.5px;
}
.checkbox input, .radio input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; margin: 0; }

/* --------------------------------- 标签 --------------------------------- */

.tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 7px; border-radius: var(--radius-xs);
  font-size: 12px; font-weight: 500; line-height: 1.65;
  background: var(--primary-light); color: var(--primary-dark);
  white-space: nowrap;
}
.tag.teal { background: var(--primary-light); color: var(--primary-dark); }
.tag.gray { background: var(--sunken); color: #5b6b69; }
.tag.green { background: var(--success-light); color: var(--success-text); }
.tag.orange { background: #fff3e2; color: #a35a09; }
.tag.red { background: var(--danger-light); color: var(--danger-text); }
.tag.blue { background: #eaf3fd; color: #1a5f96; }
.tag.plain { background: transparent; color: var(--muted); padding: 0; }

/* --------------------------------- 表格 --------------------------------- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tbl th, table.tbl td {
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tbl th {
  background: var(--table-head); font-weight: 600; color: var(--text-2);
  font-size: 12px; position: sticky; top: 0; z-index: 2;
}
table.tbl tbody tr:hover { background: var(--hover); }
table.tbl td.wrap-cell { white-space: normal; min-width: 180px; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .muted { color: var(--muted); font-size: 12px; }

/* --------------------------------- 统计卡 --------------------------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.stat {
  background: var(--card); border: 0;
  border-radius: var(--radius); padding: 12px 14px;
  position: relative; overflow: hidden;
}
.stat .k { font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.stat .v { font-size: 22px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .u { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.stat.warn .v { color: var(--warning); }
.stat.danger .v { color: var(--danger); }
.stat.ok .v { color: var(--success); }
.stat.primary .v { color: var(--primary); }

/* --------------------------------- 列表 --------------------------------- */

.list { display: flex; flex-direction: column; }
.list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: 0; }
.list-item .main { flex: 1; min-width: 0; }
.list-item .main .t { font-weight: 500; }
.list-item .main .s { font-size: 12px; color: var(--muted); margin-top: 1px; }

.empty {
  padding: 36px 20px; text-align: center; color: var(--muted); font-size: 13.5px;
}
.empty .big {
  display: block; margin: 0 auto 10px;
  width: 32px; height: 32px; color: var(--border-strong);
}
.empty .big svg { width: 100%; height: 100%; display: block; }

/* --------------------------------- 弹窗 --------------------------------- */

.mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 28, 27, 0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; overflow-y: auto;
}
.modal {
  background: #fff; border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; max-height: 88vh;
  display: flex; flex-direction: column;
}
.modal.wide { max-width: 880px; }
.modal.narrow { max-width: 420px; }
.modal .m-head {
  display: flex; align-items: center; gap: 9px;
  padding: 14px 16px 10px; border-bottom: 0; flex: none;
  background: transparent;
}
.modal .m-head h3 { font-size: 16px; flex: 1; }
.modal .m-head .x {
  border: 0; background: transparent;
  width: 28px; height: 28px; display: grid; place-items: center;
  color: var(--muted); cursor: pointer; padding: 0;
  border-radius: var(--radius-xs);
}
.modal .m-head .x:hover { background: var(--sunken); color: var(--text); }
.modal .m-body { padding: 0 16px 16px; overflow-y: auto; flex: 1; }
.modal .m-foot {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: transparent; flex: none;
}
@media (max-width: 560px) {
  .mask { padding: 0; align-items: flex-end; }
  .modal { max-width: 100%; max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: none; }
  .modal .m-foot .btn { flex: 1; }
}

/* --------------------------------- 提示条 --------------------------------- */

#toast-host {
  position: fixed; left: 50%; top: 14px; transform: translateX(-50%);
  z-index: 400; display: flex; flex-direction: column; gap: 7px; align-items: center;
  pointer-events: none; width: max-content; max-width: 92vw;
}
.toast {
  padding: 9px 16px; border-radius: var(--radius-sm);
  background: var(--text); color: #fff; font-size: 13.5px;
  box-shadow: var(--shadow);
  max-width: 92vw; word-break: break-word;
}
.toast.ok { background: var(--success); }
.toast.err { background: var(--danger); }
.toast.warn { background: var(--warning); }

/* 紧凑提示块（使用须知 / 盘点状态 / 校验提示） */
.notice {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--primary-soft); color: var(--text-2);
  border-radius: var(--radius); padding: 11px 13px; margin-bottom: 12px;
  font-size: 12.5px; line-height: 1.55;
}
.notice .ico { color: var(--primary); flex: none; margin-top: 1px; }
.notice .nt-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.notice .nt-text { color: var(--text-2); }
.notice .nt-legend { margin-top: 5px; color: var(--muted); }
.notice.warn { background: var(--warning-light); color: var(--warning-text); }
.notice.warn .ico { color: var(--warning); }
.notice.warn .nt-title { color: var(--warning-text); }
.notice.danger { background: var(--danger-light); color: var(--danger-text); }
.notice.danger .ico { color: var(--danger); }
.notice.ok { background: var(--success-light); color: var(--success-text); }
.notice.ok .ico { color: var(--success); }
.notice.soft { background: var(--card); }

/* 通用提示条（管理端沿用） */
.banner {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 11px 13px; border-radius: var(--radius);
  font-size: 13px; line-height: 1.55; margin-bottom: 12px;
}
.banner.info { background: var(--info-light); color: var(--info-text); }
.banner.warn { background: var(--warning-light); color: var(--warning-text); }
.banner.danger { background: var(--danger-light); color: var(--danger-text); }
.banner.ok { background: var(--success-light); color: var(--success-text); }
.banner .ico { flex: none; margin-top: 1px; }

/* ------------------------------ 分类 / 物品卡 ------------------------------ */

.cat-block {
  background: var(--card);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  overflow: hidden;
}
.cat-block > .cat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; cursor: pointer; user-select: none;
}
.cat-block > .cat-head .cat-ico {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  background: var(--primary-light); color: var(--primary);
  border-radius: var(--radius);
}
.cat-block > .cat-head .cat-info { flex: 1; min-width: 0; }
.cat-block > .cat-head .cat-info .nm {
  font-size: 16px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-block > .cat-head .cat-info .ds {
  font-size: 12px; color: var(--muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-block > .cat-head .cat-count {
  flex: none; font-size: 12px; color: var(--muted);
}
.cat-block > .cat-head .cat-count b { font-size: 14px; color: var(--text-2); font-weight: 600; }
.cat-block > .cat-head .arrow { color: var(--muted-2); transition: transform 0.18s; display: inline-flex; flex: none; }
.cat-block.open > .cat-head .arrow { transform: rotate(0deg); }
.cat-block:not(.open) > .cat-head .arrow { transform: rotate(-90deg); }

.cat-block > .cat-body {
  display: none;
  background: var(--sunken);
  padding: 10px;
  flex-direction: column;
  gap: 10px;
}
.cat-block.open > .cat-body { display: flex; }

/* 物品独立卡片（物品清单页） */
.item-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px;
}
.item-card .ic-head {
  display: flex; align-items: flex-start; gap: 10px;
}
.item-card .ic-name {
  flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.item-card .ic-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.item-card .ic-desc { font-size: 12px; color: var(--muted); margin-top: 6px; }
.item-card .ic-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 10px;
}
.item-card .ic-note { font-size: 12px; color: var(--muted); min-width: 0; }

/* 库存数量：显著显示 */
.ic-stock, .pc-stock {
  flex: none; display: flex; align-items: baseline; gap: 3px;
  font-size: 12px; color: var(--muted); white-space: nowrap;
}
.ic-stock b, .pc-stock b {
  font-size: 19px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.ic-stock.zero b, .pc-stock.zero b { color: var(--danger); }
.ic-stock.zero, .pc-stock.zero { color: var(--muted-2); }

/* 申请页物品卡片 */
.pick-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px;
}
.pick-card .pc-head { display: flex; align-items: flex-start; gap: 10px; }
.pick-card .pc-name {
  flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pick-card .pc-desc { font-size: 12px; color: var(--muted); margin-top: 6px; }
.pick-card .pc-ctrl { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.pick-card.picked { box-shadow: inset 0 0 0 1.5px var(--primary-border); }
.pick-card.out { opacity: 0.62; }
.pick-card .ic-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }

/* 兼容旧结构 */
.item-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-top: 1px solid var(--line);
}
.item-row:first-child { border-top: 0; }
.item-row .info { flex: 1; min-width: 0; }
.item-row .info .nm { font-size: 14px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.item-row .info .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.item-row .info .sub .stock-ok { color: var(--success); }
.item-row .info .sub .stock-low { color: var(--danger); font-weight: 500; }
.item-row .ctrl { flex: none; }
.item-row.picked { background: var(--primary-soft); }

.stepper {
  display: inline-flex; align-items: center;
  background: var(--sunken); border-radius: var(--radius-sm); overflow: hidden;
}
.stepper button {
  width: 34px; height: 34px; border: 0; background: transparent; color: var(--text-2);
  cursor: pointer; display: grid; place-items: center; padding: 0; font-size: 17px;
}
.stepper button:hover:not(:disabled) { background: var(--primary-light); color: var(--primary); }
.stepper button:disabled { color: var(--muted-2); cursor: not-allowed; }
.stepper input {
  width: 48px; height: 34px; border: 0; text-align: center; outline: none;
  background: #fff; font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600;
}

.serial-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.serial-chip {
  padding: 4px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-xs);
  background: #fff; cursor: pointer; font-size: 12.5px; user-select: none;
  font-variant-numeric: tabular-nums;
}
.serial-chip:hover { border-color: var(--primary); color: var(--primary); }
.serial-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.serial-chip.disabled { opacity: 0.35; cursor: not-allowed; text-decoration: line-through; }

/* ------------------------------ 底部操作条 ------------------------------ */

.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #fff;
  box-shadow: 0 -1px 0 var(--hairline);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.action-bar .inner {
  max-width: 860px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
}
.action-bar .summary { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-2); }
.action-bar .summary b { color: var(--primary); font-size: 15px; }

/* --------------------------------- 标签页 --------------------------------- */

.tabs {
  display: flex; gap: 0;
  margin: 0 -16px 12px; padding: 0 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
  position: sticky; top: var(--header-h); z-index: 40;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: 1; min-width: max-content; position: relative;
  padding: 11px 10px 12px; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 500;
  white-space: nowrap; transition: color 0.14s;
}
.tabs button:hover { color: var(--primary); }
.tabs button.on { color: var(--primary); font-weight: 600; }
.tabs button.on::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: -1px; width: 26px; height: 2.5px; border-radius: 2px; background: var(--primary);
}

.seg {
  display: inline-flex; background: var(--sunken); border: 0;
  border-radius: var(--radius-sm); padding: 3px; gap: 3px;
}
.seg button {
  padding: 6px 12px; border: 0; border-radius: var(--radius-xs);
  background: transparent; color: var(--text-2); cursor: pointer; font-size: 12.5px; white-space: nowrap;
}
.seg button.on { background: #fff; color: var(--primary); font-weight: 600; }

/* ------------------------------ 管理端布局 ------------------------------ */

.admin-shell { display: flex; min-height: 100vh; }
.side {
  width: 208px; flex: none; background: var(--side-bg); color: var(--side-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.side .brand {
  padding: 16px 16px 14px; font-size: 14.5px; font-weight: 600; color: #fff;
  display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--side-line);
}
.side .brand .logo {
  width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--primary);
  display: grid; place-items: center; flex: none; color: #fff;
}
.side nav { padding: 10px 8px; flex: 1; overflow-y: auto; }
.side nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: var(--radius-sm); color: var(--side-text);
  font-size: 13.5px; margin-bottom: 3px; cursor: pointer;
}
.side nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.side nav a.on { background: var(--primary); color: #fff; font-weight: 500; }
.side nav a .ico { flex: none; }
.side nav a .badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 10.5px; padding: 0 6px; border-radius: 999px; font-weight: 600;
}
.side .foot { padding: 12px; border-top: 1px solid var(--side-line); font-size: 12px; }
.side .foot .who { color: #fff; margin-bottom: 7px; }
.side .foot button {
  width: 100%; padding: 7px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent; color: var(--side-text); cursor: pointer; font-size: 12px;
}
.side .foot button:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-top {
  position: sticky; top: 0; z-index: 40; background: #fff;
  border-bottom: 1px solid var(--hairline); padding: 12px 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.admin-top h2 { font-size: 16px; flex: 1; min-width: 120px; }
.admin-top .tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-body { padding: 16px 16px 40px; flex: 1; }

.menu-toggle { display: none; }

@media (max-width: 900px) {
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 120;
    transform: translateX(-100%); transition: transform 0.2s; height: 100%;
  }
  .side.open { transform: none; }
  .menu-toggle { display: inline-flex; }
  .admin-top { padding: 10px 14px; }
  .admin-body { padding: 12px 14px 40px; }
  .side-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 110; }
}

/* --------------------------------- 图表 --------------------------------- */

.bar-list { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; }
.bar-row .nm { width: 120px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .track { flex: 1; height: 16px; background: var(--sunken); border-radius: 999px; overflow: hidden; }
.bar-row .fill { height: 100%; background: var(--primary); min-width: 3px; transition: width 0.3s; }
.bar-row .vl { width: 56px; text-align: right; flex: none; font-variant-numeric: tabular-nums; color: var(--text-2); }
@media (max-width: 560px) { .bar-row .nm { width: 82px; } }

.chart-svg { width: 100%; height: auto; display: block; }

/* --------------------------------- 杂项 --------------------------------- */

.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.wrapf { flex-wrap: wrap; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

.code-badge {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12px; background: var(--sunken); padding: 2px 7px;
  border-radius: var(--radius-xs); color: var(--text-2);
}

.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: var(--bg);
}
.login-box {
  width: 100%; max-width: 360px; background: #fff;
  border-radius: var(--radius-lg); padding: 28px 24px;
}
.login-box .brand-lg { text-align: center; margin-bottom: 22px; }
.login-box .brand-lg .logo {
  width: 48px; height: 48px; margin: 0 auto 12px; border-radius: var(--radius);
  background: var(--primary-light); color: var(--primary);
  display: grid; place-items: center;
}
.login-box .brand-lg h1 { font-size: 18px; }
.login-box .brand-lg p { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

.loading { padding: 32px; text-align: center; color: var(--muted); font-size: 13.5px; }
.spinner {
  width: 22px; height: 22px; margin: 0 auto 10px;
  border: 2px solid var(--border-strong); border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.record-card {
  background: var(--card); border-radius: var(--radius-lg);
  margin-bottom: 12px; overflow: hidden;
}
.record-card .r-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 14px 8px;
}
.record-card .r-head .code { font-weight: 600; font-size: 14.5px; }
.record-card .r-head .sp { flex: 1; }
.record-card .r-body { padding: 0 14px 14px; }
.line-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px;
}
.line-item:last-child { border-bottom: 0; }
.line-item .nm { flex: 1; min-width: 0; }
.line-item .qt { font-variant-numeric: tabular-nums; color: var(--text-2); }
.r-meta {
  display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted);
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
}

/* ==========================================================================
   导游端申请流程
   目标：扫码 → 登录 → 选物品 → 提交，10 秒左右完成，不需要学习系统
   - 首页只放分类卡片，不铺物品、不铺说明
   - 点分类进物品页，点「申请领用」进独立表单页（不是弹窗）
   - 规则在需要的时候才提示，不提前堆一大堆使用须知
   ========================================================================== */

/* ------------------------------ 页面骨架 ------------------------------ */

#viewBody {
  padding: 12px 16px 40px;
  max-width: 680px;
  margin: 0 auto;
}
.view { display: block; }
.view[hidden] { display: none; }

/* ------------------------------ 顶栏 ------------------------------ */

.hd-brand { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.hd-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.hd-text > span {
  font-size: 14.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hd-text > small { font-size: 11.5px; color: var(--muted); }

.icon-btn {
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-2);
  cursor: pointer;
  transition: background-color 0.13s, color 0.13s;
}
.icon-btn:hover { background: var(--sunken); color: var(--primary); }
.icon-btn:active { background: var(--primary-light); }

/* 二级页返回条 */
.sub-head {
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 12px;
}
.sub-head b { font-size: 16px; }
.sub-note { font-size: 12px; color: var(--muted); margin: -6px 0 12px 2px; }

/* ------------------------------ 登录页 ------------------------------ */

.login-box .login-brand { text-align: center; margin-bottom: 24px; }
.login-box .login-brand .logo {
  width: 52px; height: 52px; margin: 0 auto 12px;
  display: grid; place-items: center;
  background: var(--primary-light); color: var(--primary);
  border-radius: 15px;
}
.login-box .login-brand h1 { font-size: 19px; }
.login-box .login-brand p { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.login-form { text-align: left; }
.login-err {
  font-size: 12.5px; color: var(--danger-text);
  background: var(--danger-light);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  margin: 0 0 12px;
}
.field-label {
  display: block;
  font-size: 12.5px; font-weight: 500; color: var(--text-2);
  margin-bottom: 6px;
}
.field-label .req { color: var(--danger); margin-left: 3px; font-weight: 400; font-size: 11.5px; }
.field-tip { font-size: 12px; color: var(--muted); margin: -4px 0 12px; }
.field:last-child { margin-bottom: 0; }

/* 登录页底部的小字说明：别抢视线，但导游真需要时能看见 */
.login-help {
  font-size: 12px; color: var(--muted);
  line-height: 1.6;
  margin: 14px 0 0;
  text-align: center;
}
.login-help b { color: var(--text-2); font-weight: 600; }

/* 重置密码后给管理员看的「发给导游」卡片 */
.cred-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
  background: var(--sunken);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  user-select: all;
}

/* ------------------------------ 搜索 ------------------------------ */

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 0 12px;
  height: 42px;
  margin-bottom: 12px;
}
.search-box .sb-ico { color: var(--muted); display: flex; }
.search-input {
  flex: 1; min-width: 0;
  border: 0; outline: none; background: transparent;
  font-size: 14.5px; color: var(--text);
  height: 100%;
}
.search-input::placeholder { color: var(--muted-2); }
.search-input::-webkit-search-cancel-button { display: none; }
.sb-clear {
  flex: none; width: 24px; height: 24px;
  display: grid; place-items: center;
  border: 0; border-radius: 999px;
  background: var(--sunken); color: var(--muted);
  cursor: pointer; padding: 0;
}

/* ------------------------------ 很轻的提示条 ------------------------------ */

.hint-line {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted);
  padding: 0 2px 10px;
}
.hint-line .ico { color: var(--muted-2); }

/* ------------------------------ 分类卡片 ------------------------------ */

.cat-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background-color 0.13s;
}
.cat-card:hover { background: var(--hover); }
.cat-card:active { background: var(--primary-soft); }
.cat-card .cc-ico {
  flex: none; width: 42px; height: 42px;
  display: grid; place-items: center;
  background: var(--primary-light); color: var(--primary);
  border-radius: 12px;
}
.cat-card .cc-info { flex: 1; min-width: 0; }
.cat-card .cc-nm { font-size: 15.5px; font-weight: 600; }
.cat-card .cc-ds {
  font-size: 12px; color: var(--muted); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-card .cc-count { flex: none; font-size: 12px; color: var(--muted-2); }
.cat-card .cc-arrow { flex: none; color: var(--muted-2); display: flex; }

/* ------------------------------ 物品卡片 ------------------------------ */

#catList, #itemList, #mineList { display: block; }
#itemList .item-card, #catList .item-card { margin-bottom: 10px; }
.item-card.out { background: var(--card); }
.item-card.out .ic-name { color: var(--text-2); }

/* ------------------------------ 可折叠说明 ------------------------------ */

.fold {
  background: var(--card);
  border-radius: var(--radius-lg);
  margin-top: 14px;
  overflow: hidden;
}
.fold-head {
  width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: 13px 14px;
  border: 0; background: transparent;
  color: var(--text-2); cursor: pointer;
  font-size: 13.5px; text-align: left;
}
.fold-head .ico { color: var(--muted); }
.fold-title { flex: 1; }
.fold-arrow { color: var(--muted-2); display: flex; transition: transform 0.18s; }
.fold.open .fold-arrow { transform: rotate(180deg); }
.fold-body { display: none; padding: 0 14px 14px; }
.fold.open .fold-body { display: block; }
.fold-body p { font-size: 13px; color: var(--text-2); line-height: 1.7; }

/* ------------------------------ 申请表单 ------------------------------ */

.form-item-title { font-size: 17px; font-weight: 600; }
.form-item-sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.form-item-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.form-item-note { font-size: 12px; color: var(--warning-text); margin-top: 9px; }

.card-head .ct { flex: 1; font-size: 14.5px; font-weight: 600; }
.card-head .cs { font-size: 12px; color: var(--muted); }

.qty-row { display: flex; align-items: center; gap: 12px; }
.qty-btn {
  flex: none; width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 0; border-radius: var(--radius-sm);
  background: var(--sunken); color: var(--text-2);
  cursor: pointer;
  transition: background-color 0.13s, color 0.13s;
}
.qty-btn:hover:not(:disabled) { background: var(--primary-light); color: var(--primary); }
.qty-btn:disabled { color: var(--muted-2); cursor: not-allowed; }
.qty-input {
  width: 66px; text-align: center;
  border: 0; outline: none; background: transparent;
  font-size: 19px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-unit { font-size: 13px; color: var(--muted); }
.qty-hint { font-size: 12px; color: var(--muted); margin-top: 9px; }

.form-footer {
  position: sticky;
  bottom: 0;
  margin: 16px -16px 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--card);
  box-shadow: 0 -1px 0 var(--hairline);
}

/* ------------------------------ 我的申请 ------------------------------ */

.chips {
  display: flex; gap: 7px;
  overflow-x: auto;
  padding: 0 0 12px;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 6px 13px;
  border: 0; border-radius: 999px;
  background: var(--card); color: var(--text-2);
  font-size: 13px; cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.13s, color 0.13s;
}
.chip:hover { color: var(--primary); }
.chip.on { background: var(--primary); color: #fff; font-weight: 500; }

.req-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
}
.req-card .rc-head {
  display: flex; align-items: flex-start; gap: 10px;
}
.req-card .rc-title { flex: 1; min-width: 0; font-size: 14.5px; }
.req-card .rc-title b { font-variant-numeric: tabular-nums; }
.req-card .rc-more { font-size: 12px; color: var(--muted); }
.req-card .rc-lines {
  margin-top: 9px; padding-top: 9px;
  border-top: 1px solid var(--line);
}
.req-card .rc-line {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; font-size: 13px; color: var(--text-2);
  padding: 2px 0;
}
.req-card .rc-line b { font-variant-numeric: tabular-nums; }
.req-card .rc-meta {
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  font-size: 12px; color: var(--muted);
  margin-top: 10px;
}
.req-card .rc-reason {
  font-size: 12.5px; color: var(--danger-text);
  background: var(--danger-light);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  margin-top: 10px;
}
.req-card .rc-reason.soft {
  color: var(--warning-text);
  background: var(--warning-light);
}
.req-card .rc-remark { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* 空状态 */
.empty {
  padding: 34px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}
.empty.small { padding: 12px; font-size: 12.5px; }

/* 打印时导游端这些都不用出现 */
@media print {
  .chips, .form-footer, .search-box, .fold { display: none !important; }
}

/* ------------------------------ 导游扫码入口 ------------------------------ */

.qr-card { max-width: 480px; margin: 0 auto; text-align: center; }
.qr-card .card-body { padding: 26px 20px 22px; }
.qr-brand { display: flex; align-items: center; justify-content: center; gap: 9px; }
.qr-brand .logo {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--primary-light); color: var(--primary); border-radius: 10px;
}
.qr-brand h3 { font-size: 18px; }
.qr-tip { font-size: 13px; color: var(--muted); margin-top: 7px; }
.qr-frame {
  display: inline-block;
  padding: 12px;
  margin: 18px auto 12px;
  background: #fff;
  border-radius: var(--radius);
}
.qr-frame svg { display: block; width: 224px; height: 224px; max-width: 100%; }
.qr-url {
  font-size: 13px; color: var(--text-2);
  background: var(--sunken);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  word-break: break-all;
}
.qr-actions { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }

.steps { margin: 0; padding-left: 20px; font-size: 13.5px; color: var(--text-2); line-height: 1.9; }
.steps li { margin-bottom: 2px; }

@media (max-width: 480px) {
  .qr-frame svg { width: 190px; height: 190px; }
}

/* --------------------------------- 打印 --------------------------------- */

@media print {
  .no-print, .app-header, .action-bar, .side, .admin-top .tools, .tabs { display: none !important; }
  body { background: #fff; }
  .wrap, .admin-body { padding: 0; max-width: none; }
  .card { border: 1px solid #999; break-inside: avoid; }
  table.tbl th, table.tbl td { border: 1px solid #666; padding: 4px 6px; font-size: 11pt; }
  table.tbl th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .mask { display: none !important; }
}

/* ==========================================================================
   2026 UI refresh — calm operations desk
   功能层保持原有 DOM/JS；这里统一重建视觉层、响应式层级与交互状态。
   ========================================================================== */

:root {
  --primary: #11786f;
  --primary-dark: #0b5c55;
  --primary-light: #e3f2ef;
  --primary-border: #add8d1;
  --primary-soft: #f0f8f6;
  --bg: #f2f4f1;
  --card: #fbfcfa;
  --panel-head: #fbfcfa;
  --table-head: #f1f4f1;
  --hover: #f0f5f2;
  --sunken: #e9eeeb;
  --hairline: #e1e7e3;
  --line: #e8ece9;
  --border: #dfe6e1;
  --border-strong: #ccd7d1;
  --text: #17221f;
  --text-2: #44524d;
  --muted: #75827d;
  --muted-2: #9aa49f;
  --side-bg: #142723;
  --side-text: #b8cbc5;
  --side-line: rgba(255, 255, 255, 0.09);
  --radius-xs: 7px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(20, 39, 35, 0.05);
  --shadow: 0 10px 30px rgba(20, 39, 35, 0.07);
  --shadow-lg: 0 24px 70px rgba(20, 39, 35, 0.18);
  --header-h: 64px;
}

html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

body {
  background: var(--bg);
  font-family: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: 0.005em;
}

button, a, input, select, textarea { outline: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  box-shadow: 0 0 0 3px rgba(17, 120, 111, 0.18);
}

.btn, .icon-btn, .cat-card, .item-card, .req-card, .side nav a, .chip {
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease,
    border-color 160ms ease, box-shadow 160ms ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled), .icon-btn:active, .cat-card:active { transform: translateY(1px) scale(0.99); }
.btn.primary { box-shadow: 0 7px 18px rgba(17, 120, 111, 0.18); }
.btn.primary:hover:not(:disabled) { box-shadow: 0 9px 24px rgba(17, 120, 111, 0.24); }

.card, .record-card, .req-card, .cat-card, .item-card, .stat {
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.card { border: 1px solid rgba(223, 230, 225, 0.72); }
.card > .card-head { padding: 18px 20px 11px; }
.card > .card-head h3 { font-size: 15px; letter-spacing: -0.01em; }
.card > .card-body { padding: 2px 20px 20px; }
.card > .card-body:first-child { padding-top: 20px; }

.input, .select, .textarea {
  min-height: 42px;
  border: 1px solid var(--border-strong);
  background: #fff;
  border-radius: 10px;
}
.input:hover, .select:hover, .textarea:hover { border-color: #b9c8c1; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(17, 120, 111, 0.12);
}

table.tbl { font-size: 13px; }
table.tbl th, table.tbl td { padding: 11px 13px; }
table.tbl th {
  color: #53625c;
  letter-spacing: 0.025em;
  background: var(--table-head);
}
table.tbl tbody tr { transition: background-color 140ms ease; }

/* ---- 登录：明确的品牌区与更沉稳的空间比例 ---- */
.login-wrap {
  min-height: 100dvh;
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 18%, rgba(17, 120, 111, 0.11), transparent 32%),
    var(--bg);
}
.login-wrap::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 5px;
  background: var(--primary);
  z-index: -1;
}
.login-box {
  max-width: 400px;
  padding: 34px 32px 30px;
  border: 1px solid rgba(223, 230, 225, 0.82);
  border-radius: 22px;
  box-shadow: 0 28px 75px rgba(20, 39, 35, 0.11);
}
.login-box .brand-lg h1, .login-box .login-brand h1 {
  font-size: 22px;
  letter-spacing: -0.035em;
}
.login-box .brand-lg .logo, .login-box .login-brand .logo {
  background: var(--side-bg);
  color: #d6f0e9;
  box-shadow: 0 9px 22px rgba(20, 39, 35, 0.17);
}
.login-box .brand-lg p, .login-box .login-brand p { margin-top: 7px; }

/* ---- 管理端：macOS 式浅色侧栏、玻璃顶栏与高密度内容区 ---- */
.admin-page {
  --primary: #007aff;
  --primary-dark: #0066d6;
  --primary-light: #e9f3ff;
  --primary-border: #b9d8ff;
  --primary-soft: #f2f7ff;
  --bg: #f5f5f7;
  --card: #ffffff;
  --panel-head: #ffffff;
  --table-head: #f7f7f9;
  --hover: #f5f5f7;
  --sunken: #ececf0;
  --hairline: rgba(60, 60, 67, 0.13);
  --line: rgba(60, 60, 67, 0.1);
  --border: rgba(60, 60, 67, 0.12);
  --border-strong: rgba(60, 60, 67, 0.2);
  --text: #1d1d1f;
  --text-2: #3a3a3c;
  --muted: #6e6e73;
  --muted-2: #98989d;
  --side-bg: rgba(246, 246, 248, 0.94);
  --side-text: #4b4b50;
  --side-line: rgba(60, 60, 67, 0.11);
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(37, 42, 53, 0.035), 0 8px 24px rgba(37, 42, 53, 0.03);
  --shadow: 0 12px 30px rgba(37, 42, 53, 0.07);
  --shadow-lg: 0 24px 70px rgba(37, 42, 53, 0.18);
  color: var(--text);
  background:
    radial-gradient(circle at 58% 0, rgba(0, 122, 255, 0.045), transparent 390px),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}
.admin-page .admin-shell { min-height: 100dvh; }
.admin-page .side {
  width: 252px;
  color: var(--side-text);
  background: var(--side-bg);
  border-right: 1px solid rgba(60, 60, 67, 0.12);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}
.admin-page .side .brand {
  min-height: 72px;
  padding: 18px 20px;
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.admin-page .side .brand .logo {
  width: 36px;
  height: 36px;
  color: #fff;
  background: var(--primary);
  border-radius: 11px;
  box-shadow: 0 7px 18px rgba(0, 122, 255, 0.2);
}
.admin-page .side nav { padding: 14px 12px; }
.admin-page .side nav a {
  min-height: 42px;
  padding: 9px 12px;
  margin-bottom: 4px;
  border-radius: 10px;
  color: var(--side-text);
  font-size: 13.5px;
  font-weight: 500;
}
.admin-page .side nav a:hover {
  transform: none;
  color: var(--text);
  background: rgba(118, 118, 128, 0.09);
}
.admin-page .side nav a.on {
  color: #fff;
  background: var(--primary);
  font-weight: 600;
  box-shadow: 0 5px 14px rgba(0, 122, 255, 0.2);
}
.admin-page .side nav a .badge { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.82); }
.admin-page .side .foot { padding: 14px 16px 16px; }
.admin-page .side .foot .who { color: var(--text); font-weight: 600; margin-bottom: 10px; }
.admin-page .side .foot button {
  color: var(--text-2);
  border-color: rgba(60, 60, 67, 0.14);
  background: rgba(255, 255, 255, 0.68);
}
.admin-page .side .foot button:hover { color: var(--text); background: #fff; }
.admin-page .side .foot a { color: var(--primary) !important; }

.admin-page .admin-top {
  min-height: 74px;
  padding: 14px clamp(22px, 2.7vw, 40px);
  background: rgba(250, 250, 252, 0.82);
  border-bottom-color: rgba(60, 60, 67, 0.1);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}
.admin-page .admin-top h2 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.045em;
}
.live-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.11);
}
.live-state.syncing .live-dot { background: var(--warning); animation: livePulse 900ms ease-in-out infinite; }
.live-state.offline { color: var(--danger); }
.live-state.offline .live-dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1); }
.side nav a .badge.live-bump { animation: badgeBump 620ms cubic-bezier(.2,.8,.2,1); }
@keyframes livePulse { 50% { opacity: .42; transform: scale(.78); } }
@keyframes badgeBump { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.38); } }
.admin-page .admin-body,
.admin-page #viewBody {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 30px clamp(22px, 2.7vw, 40px) 56px;
}

.admin-page .stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.admin-page .stat {
  min-height: 108px;
  padding: 19px 20px 17px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.admin-page .stat::after {
  display: none;
}
.admin-page .stat .k { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.admin-page .stat .v {
  margin-top: 10px;
  font-size: clamp(24px, 2vw, 31px);
  font-weight: 700;
  letter-spacing: -0.04em;
}
.admin-page .admin-body[data-view="dashboard"] {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 16px;
  align-items: start;
}
.admin-page .admin-body[data-view="dashboard"] > .stat-grid,
.admin-page .admin-body[data-view="dashboard"] > .banner { grid-column: 1 / -1; }
.admin-page .admin-body[data-view="dashboard"] > .card { margin: 0; }

.admin-page .card,
.admin-page .record-card,
.admin-page .cat-block,
.admin-page .table-wrap {
  border-color: rgba(60, 60, 67, 0.1);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.admin-page .card > .card-head { padding: 18px 20px 12px; }
.admin-page .card > .card-body { padding-inline: 20px; padding-bottom: 20px; }
.admin-page .btn { border-radius: 10px; }
.admin-page .btn.primary { box-shadow: 0 7px 18px rgba(0, 122, 255, 0.2); }
.admin-page .btn.primary:hover:not(:disabled) { box-shadow: 0 9px 22px rgba(0, 122, 255, 0.26); }
.admin-page .input,
.admin-page .select,
.admin-page .textarea {
  border-color: rgba(60, 60, 67, 0.18);
  border-radius: 10px;
}
.admin-page .input:focus,
.admin-page .select:focus,
.admin-page .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}
.admin-page table.tbl th { color: #636366; background: var(--table-head); }
.admin-page table.tbl tbody tr:hover { background: rgba(0, 122, 255, 0.035); }
.admin-page .bar-row .fill { background: var(--primary); }

.admin-page .empty {
  color: var(--muted);
  padding: 40px 20px;
  background: linear-gradient(180deg, rgba(245, 245, 247, 0), rgba(245, 245, 247, 0.72));
}
.admin-page .modal { border-radius: 20px; box-shadow: var(--shadow-lg); }
.admin-page .mask {
  background: rgba(28, 28, 30, 0.34);
  backdrop-filter: saturate(150%) blur(8px);
  -webkit-backdrop-filter: saturate(150%) blur(8px);
}
.admin-page button:focus-visible,
.admin-page a:focus-visible,
.admin-page input:focus-visible,
.admin-page select:focus-visible,
.admin-page textarea:focus-visible { box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.16); }

.admin-page .login-wrap {
  background:
    radial-gradient(circle at 50% 16%, rgba(0, 122, 255, 0.11), transparent 34%),
    var(--bg);
}
.admin-page .login-wrap::before { height: 4px; background: var(--primary); }
.admin-page .login-box {
  border-color: rgba(60, 60, 67, 0.12);
  box-shadow: 0 28px 70px rgba(37, 42, 53, 0.12);
}
.admin-page .login-box .brand-lg .logo {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 10px 24px rgba(0, 122, 255, 0.24);
}

/* ---- 导游端：Apple 风格的克制层级、系统蓝与分组列表 ---- */
.guide-page {
  --primary: #007aff;
  --primary-dark: #0066d6;
  --primary-light: #e9f3ff;
  --primary-border: #b9d8ff;
  --primary-soft: #f2f7ff;
  --bg: #f5f5f7;
  --card: #ffffff;
  --hover: #f7f7fa;
  --sunken: #ececf0;
  --hairline: rgba(60, 60, 67, 0.16);
  --line: rgba(60, 60, 67, 0.11);
  --border: rgba(60, 60, 67, 0.12);
  --border-strong: rgba(60, 60, 67, 0.22);
  --text: #1d1d1f;
  --text-2: #3a3a3c;
  --muted: #6e6e73;
  --muted-2: #98989d;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(37, 42, 53, 0.04), 0 8px 24px rgba(37, 42, 53, 0.035);
  --shadow: 0 12px 30px rgba(37, 42, 53, 0.08);
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0, rgba(0, 122, 255, 0.055), transparent 340px),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}
.guide-page #viewBody {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 20px calc(64px + env(safe-area-inset-bottom));
}
.guide-page .app-header {
  height: 72px;
  padding: 0 max(20px, calc((100vw - 1040px) / 2));
  background: rgba(250, 250, 252, 0.82);
  border-bottom: 1px solid rgba(60, 60, 67, 0.1);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}
.guide-page .app-header .logo {
  width: 38px;
  height: 38px;
  color: #fff;
  background: var(--primary);
  border-radius: 11px;
  box-shadow: 0 7px 18px rgba(0, 122, 255, 0.22);
}
.guide-page .hd-brand { gap: 11px; }
.guide-page .hd-text > span {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.guide-page .hd-text > small { margin-top: 2px; color: var(--muted); }
.guide-page .icon-btn { border-radius: 50%; }
.guide-page .icon-btn:hover { background: rgba(118, 118, 128, 0.12); color: var(--text); }
.guide-page .login-wrap {
  background:
    radial-gradient(circle at 50% 15%, rgba(0, 122, 255, 0.11), transparent 34%),
    var(--bg);
}
.guide-page .login-wrap::before { height: 4px; background: var(--primary); }
.guide-page .login-box {
  border-color: rgba(60, 60, 67, 0.12);
  box-shadow: 0 28px 70px rgba(37, 42, 53, 0.12);
}
.guide-page .login-box .login-brand .logo {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 10px 24px rgba(0, 122, 255, 0.24);
}
.guide-page .login-box .login-brand h1 { color: var(--text); letter-spacing: -0.035em; }

.guide-page .tabs {
  position: sticky;
  top: 82px;
  z-index: 45;
  width: calc(100% - 40px);
  max-width: 480px;
  min-height: 44px;
  margin: 10px auto 0;
  padding: 4px;
  gap: 4px;
  overflow: visible;
  border: 0;
  border-radius: 13px;
  background: rgba(118, 118, 128, 0.12);
  box-shadow: inset 0 0 0 1px rgba(60, 60, 67, 0.05);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}
.guide-page .tabs button {
  flex: 1;
  padding: 8px 18px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
}
.guide-page .tabs button.on {
  color: var(--text);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.04);
}
.guide-page .tabs button.on::after { display: none; }

.guide-intro { padding: 8px 2px 26px; }
.guide-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
}
.guide-intro h1 {
  font-size: clamp(29px, 4vw, 38px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.045em;
}
.guide-intro p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.guide-page .search-box {
  height: 52px;
  margin-bottom: 28px;
  padding: 0 16px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
.guide-page .search-box:focus-within {
  border-color: rgba(0, 122, 255, 0.42);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1), var(--shadow-sm);
}
.guide-page .search-input { font-size: 16px; }
.guide-page .search-box .sb-ico { color: #8e8e93; }

.guide-page .guide-list-head {
  justify-content: space-between;
  padding: 0 4px 12px;
}
.guide-page .guide-list-head h2 {
  font-size: 20px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.guide-page .guide-list-head span { color: var(--muted); font-size: 12px; }
.guide-page .category-list {
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}
.guide-page .cat-card {
  position: relative;
  min-height: 86px;
  padding: 16px 18px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.guide-page .cat-card + .cat-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 18px;
  left: 78px;
  height: 1px;
  background: rgba(60, 60, 67, 0.1);
}
.guide-page .cat-card:hover {
  transform: none;
  background: rgba(118, 118, 128, 0.07);
  box-shadow: none;
}
.guide-page .cat-card:active { transform: scale(0.995); background: rgba(118, 118, 128, 0.12); }
.guide-page .cat-card .cc-ico {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: var(--primary);
  background: var(--primary-light);
}
.guide-page .cat-card .cc-nm {
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.guide-page .cat-card .cc-ds { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.guide-page .cat-card .cc-count { color: #8e8e93; font-variant-numeric: tabular-nums; }
.guide-page .cat-card .cc-arrow { color: #aeaeb2; }

.guide-page .item-card,
.guide-page .req-card,
.guide-page .fold,
.guide-page .card {
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.guide-page .fold { margin-top: 18px; }
.guide-page .fold-head { min-height: 52px; padding: 14px 16px; }
.guide-page .item-card, .guide-page .req-card { padding: 16px; }
.guide-page .btn.primary { box-shadow: 0 8px 22px rgba(0, 122, 255, 0.22); }
.guide-page .btn.primary:hover:not(:disabled) { box-shadow: 0 10px 26px rgba(0, 122, 255, 0.28); }
.guide-page .btn.apply { border-radius: 999px; }
.guide-page .input, .guide-page .select, .guide-page .textarea {
  border-color: rgba(60, 60, 67, 0.18);
  border-radius: 12px;
}
.guide-page .input:focus, .guide-page .select:focus, .guide-page .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}
.guide-page .form-footer {
  margin: 22px -20px -64px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: rgba(250, 250, 252, 0.82);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}
.guide-page .chip { border: 1px solid transparent; background: rgba(255, 255, 255, 0.92); }
.guide-page .chip.on { box-shadow: 0 6px 16px rgba(0, 122, 255, 0.18); }
.guide-page button:focus-visible,
.guide-page a:focus-visible,
.guide-page input:focus-visible,
.guide-page select:focus-visible,
.guide-page textarea:focus-visible { box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.16); }

/* ---- 二维码：打印与屏幕都保持一个明确焦点 ---- */
.admin-page .qr-card {
  max-width: 540px;
  box-shadow: 0 18px 46px rgba(20, 39, 35, 0.09);
}
.admin-page .qr-frame {
  padding: 16px;
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 6px #f5f7f5;
}
.admin-page .qr-url { border: 1px solid var(--border); }

@media (max-width: 1180px) {
  .admin-page .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .admin-page .side { width: 256px; }
  .admin-page .admin-top { min-height: 62px; padding: 11px 16px; }
  .admin-page .admin-top h2 { font-size: 18px; }
  .admin-page .admin-body,
  .admin-page #viewBody { padding: 18px 14px 44px; }
  .admin-page .admin-body[data-view="dashboard"] { grid-template-columns: 1fr; }
  .admin-page .admin-body[data-view="dashboard"] > * { grid-column: 1; }
}

@media (max-width: 640px) {
  .login-wrap { padding: 16px; align-items: center; }
  .login-box { padding: 28px 24px 24px; border-radius: 18px; }
  .admin-page .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .admin-page .stat { min-height: 92px; padding: 15px 14px; }
  .admin-page .stat .v { font-size: 23px; }
  .admin-page .admin-top .tools { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .live-state .live-text { display: none; }
  .guide-page .app-header { height: 64px; padding-inline: 16px; }
  .guide-page .tabs { top: 74px; width: calc(100% - 32px); }
  .guide-page #viewBody { padding: 24px 16px calc(60px + env(safe-area-inset-bottom)); }
  .guide-page .guide-intro { padding-top: 4px; padding-bottom: 22px; }
  .guide-page .guide-intro h1 { font-size: 30px; }
  .guide-page .form-footer { margin: 20px -16px -60px; padding-inline: 16px; }
  .guide-page .cat-card { min-height: 82px; padding: 15px 14px; }
  .guide-page .cat-card + .cat-card::before { right: 14px; left: 72px; }
}

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

@media print {
  body { background: #fff; }
  .admin-page .admin-body,
  .admin-page #viewBody { padding: 0; }
  .card, .admin-page .qr-card {
    border: 1px solid #999;
    box-shadow: none;
  }
  .admin-page .qr-frame { box-shadow: none; }
}

/* ========================================================================== 
   万达旅游品牌主题
   Logo 蓝承担主要交互，Logo 绿只用于成功状态与少量品牌提示。
   ========================================================================== */

.wanda-logo {
  display: block;
  flex: none;
  background-color: #fff;
  background-image: url("/assets/wanda-travel-logo.jpg");
  background-repeat: no-repeat;
  background-position: center 43%;
  background-size: 100% auto;
}

.wanda-logo-login {
  width: min(248px, 82%);
  height: 78px;
  margin: -5px auto 12px;
}

.wanda-logo-side {
  width: 176px;
  height: 56px;
  border: 1px solid rgba(79, 102, 109, 0.09);
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(0, 116, 153, 0.07);
}

.wanda-logo-header {
  width: 142px;
  height: 46px;
  border-radius: 11px;
}

.admin-page,
.guide-page {
  --primary: #00a7d8;
  --primary-dark: #007fa9;
  --primary-light: #e4f7fc;
  --primary-border: #a8dfed;
  --primary-soft: #f0fbfd;
  --success: #69ad27;
  --success-light: #f1f8e9;
  --success-text: #4f841c;
  --success-border: #cee5b5;
  --bg: #f3f7f8;
  --card: #ffffff;
  --hover: #f1f7f8;
  --sunken: #e9f0f2;
  --hairline: rgba(62, 85, 92, 0.13);
  --line: rgba(62, 85, 92, 0.1);
  --border: rgba(62, 85, 92, 0.12);
  --border-strong: rgba(62, 85, 92, 0.2);
  --text: #263338;
  --text-2: #46555a;
  --muted: #718087;
  --muted-2: #9aa7ab;
  --shadow-sm: 0 1px 2px rgba(24, 77, 94, 0.035), 0 10px 28px rgba(24, 77, 94, 0.035);
  --shadow: 0 14px 36px rgba(24, 77, 94, 0.08);
  --shadow-lg: 0 28px 72px rgba(24, 77, 94, 0.17);
}

.admin-page {
  --side-bg: rgba(249, 251, 251, 0.95);
  --side-text: #55666b;
  background:
    radial-gradient(circle at 88% 0, rgba(0, 167, 216, 0.065), transparent 360px),
    radial-gradient(circle at 72% 100%, rgba(105, 173, 39, 0.035), transparent 420px),
    var(--bg);
}

.guide-page {
  background:
    radial-gradient(circle at 52% 0, rgba(0, 167, 216, 0.075), transparent 360px),
    radial-gradient(circle at 92% 42%, rgba(105, 173, 39, 0.035), transparent 330px),
    var(--bg);
}

.admin-page .login-wrap,
.guide-page .login-wrap {
  background:
    radial-gradient(circle at 50% 14%, rgba(0, 167, 216, 0.12), transparent 34%),
    radial-gradient(circle at 78% 78%, rgba(105, 173, 39, 0.055), transparent 28%),
    var(--bg);
}

.admin-page .login-wrap::before,
.guide-page .login-wrap::before {
  height: 4px;
  background: #00a7d8;
}

.admin-page .login-box,
.guide-page .login-box {
  border-color: rgba(62, 85, 92, 0.1);
  box-shadow: 0 30px 80px rgba(24, 77, 94, 0.12);
}

.admin-page .login-box .brand-lg h1,
.guide-page .login-box .login-brand h1 {
  color: var(--text);
  font-weight: 700;
}

.admin-page .btn.primary,
.guide-page .btn.primary {
  background: var(--primary);
  box-shadow: 0 9px 24px rgba(0, 145, 190, 0.21);
}

.admin-page .btn.primary:hover:not(:disabled),
.guide-page .btn.primary:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 11px 28px rgba(0, 127, 169, 0.26);
}

.admin-page button:focus-visible,
.admin-page a:focus-visible,
.admin-page input:focus-visible,
.admin-page select:focus-visible,
.admin-page textarea:focus-visible,
.guide-page button:focus-visible,
.guide-page a:focus-visible,
.guide-page input:focus-visible,
.guide-page select:focus-visible,
.guide-page textarea:focus-visible {
  box-shadow: 0 0 0 4px rgba(0, 167, 216, 0.16);
}

/* 管理端：品牌侧栏与更清晰的工作区层级 */
.admin-page .side .brand {
  min-height: 118px;
  padding: 17px 18px 14px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border-bottom: 1px solid var(--hairline);
}

.admin-page .side .brand .side-product {
  padding-left: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.admin-page .side nav { padding-top: 12px; }
.admin-page .side nav a { position: relative; }
.admin-page .side nav a:hover {
  color: var(--primary-dark);
  background: rgba(0, 167, 216, 0.075);
}
.admin-page .side nav a.on {
  color: #007da7;
  background: rgba(0, 167, 216, 0.12);
  box-shadow: inset 3px 0 0 var(--primary);
}
.admin-page .side nav a.on .ico { color: var(--primary-dark); }
.admin-page .side nav a .badge { box-shadow: 0 0 0 2px #fff; }

.admin-page .admin-top {
  background: rgba(250, 252, 252, 0.86);
  border-bottom-color: rgba(62, 85, 92, 0.1);
}
.admin-page .admin-top h2 { color: #23343a; }
.admin-page .live-dot {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(105, 173, 39, 0.12);
}
.admin-page .stat,
.admin-page .card,
.admin-page .record-card,
.admin-page .cat-block,
.admin-page .table-wrap {
  border-color: rgba(62, 85, 92, 0.09);
}
.admin-page table.tbl tbody tr:hover { background: rgba(0, 167, 216, 0.035); }
.admin-page .input:focus,
.admin-page .select:focus,
.admin-page .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 167, 216, 0.1);
}

/* 导游端：保留 Apple 式清晰层级，加入万达旅游品牌识别 */
.guide-page .app-header {
  height: 76px;
  background: rgba(250, 252, 252, 0.88);
  border-bottom-color: rgba(62, 85, 92, 0.1);
}
.guide-page .hd-brand { gap: 10px; }
.guide-page .hd-text > span { display: none; }
.guide-page .hd-text > small {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.guide-page .tabs { top: 86px; }
.guide-page .tabs button.on { color: var(--primary-dark); }
.guide-page .guide-kicker { color: var(--primary-dark); }
.guide-page .guide-kicker::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 3px;
  margin-right: 8px;
  border-radius: 3px;
  vertical-align: 3px;
  background: var(--success);
}
.guide-page .search-box:focus-within {
  border-color: rgba(0, 167, 216, 0.44);
  box-shadow: 0 0 0 4px rgba(0, 167, 216, 0.1), var(--shadow-sm);
}
.guide-page .cat-card .cc-ico {
  color: var(--primary-dark);
  background: var(--primary-light);
}
.guide-page .chip.on { box-shadow: 0 6px 16px rgba(0, 167, 216, 0.17); }

@media (max-width: 640px) {
  .wanda-logo-login { width: min(226px, 86%); height: 72px; }
  .wanda-logo-header { width: 124px; height: 40px; }
  .guide-page .app-header { height: 68px; }
  .guide-page .tabs { top: 78px; }
  .admin-page .side .brand { min-height: 110px; }
}

@media print {
  .admin-page,
  .guide-page,
  .admin-page .card,
  .admin-page .qr-card { background: #fff; box-shadow: none; }
}
