﻿/* 弘典内部工作台 · 深色 · 墨 · 金 */
:root {
  color-scheme: light;

  /* 层次（2026-11-17 改为浅色，参照行政工作台 8791） */
  --bg: #f2f3f5;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --surface-3: #eef1f4;
  --input: #ffffff;

  --line: #e3e5e9;
  --line-2: #eceef1;

  --text: #24282f;
  --text-2: #4a515c;
  --text-3: #565e6a;
  --text-mute: #6e7681;

  --gold: #9a7128;
  --gold-bg: #fbf2e2;
  --gold-text: #7a5a1e;
  --gold-line: #e6d3ae;
  --accent: #4a5a6a;
  --accent-2: #5f7286;

  --ok: #2f7d5d;
  --ok-bg: #e7f3ed;
  --danger: #b3524a;
  --danger-bg: #fbeceb;
  --danger-line: #efc9c5;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(30, 36, 44, .05), 0 6px 18px -12px rgba(30, 36, 44, .18);

  --sans: -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

/* hidden 属性必须优先于自定义 display，否则弹窗会一直显示 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.6;
}

/* 深色滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333b44; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #414a54; }

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 19px; }
h2 { font-size: 16px; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .92em; background: var(--surface-2); color: var(--text-2); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--text-mute); font-size: 13px; }
.hint { color: var(--text-mute); font-size: 12px; padding: 8px 2px 0; }
.hint code { background: var(--surface-2); }
.hint b { color: var(--text-3); }
.err { color: var(--danger); font-size: 13px; margin-top: 10px; }

::placeholder { color: var(--text-mute); opacity: 1; }

/* ---------- 按钮 ---------- */
.btn {
  font: inherit;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 9px;
  cursor: pointer;
  transition: .15s ease;
  white-space: nowrap;
}
.btn:hover { border-color: #3d4653; background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.full { width: 100%; padding: 11px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.danger { color: var(--danger); border-color: var(--danger-line); }

/* ---------- 登录 ---------- */
.login {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1100px 560px at 18% -10%, #1d232a 0%, transparent 62%),
    radial-gradient(900px 480px at 100% 105%, #241f14 0%, transparent 58%),
    var(--bg);
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  background: var(--gold); color: #1b1508;
  border-radius: 11px;
  font-size: 22px; font-weight: 700;
  letter-spacing: 0;
}
.brand p { color: var(--text-mute); font-size: 12.5px; margin-top: 2px; letter-spacing: .04em; }
.brand.small .brand-mark { width: 30px; height: 30px; font-size: 15px; border-radius: 8px; }
.brand.small strong { font-size: 14.5px; letter-spacing: .01em; }

#login-form { margin-top: 26px; display: grid; gap: 14px; }
#login-form label { display: grid; gap: 6px; font-size: 13px; color: var(--text-3); }
#login-form input {
  font: inherit; padding: 10px 12px; color: var(--text);
  border: 1px solid var(--line); border-radius: 9px; background: var(--input);
}
#login-form input:focus { outline: 2px solid var(--gold-bg); border-color: var(--gold); }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 56px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font: inherit; font-size: 12px; color: var(--text-mute);
  background: transparent; border: 0; padding: 4px 8px;
  cursor: pointer; border-radius: 6px;
}
.pw-toggle:hover { color: var(--gold); background: var(--gold-bg); }
.login-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--text-mute); }

/* ---------- 顶栏 ---------- */
#app { min-height: 100%; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 10px 20px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.tabs { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  font: inherit; font-size: 14px;
  border: 0; background: transparent; color: var(--text-3);
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
  flex: 0 0 auto; white-space: nowrap;
}
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab.active { background: var(--gold-bg); color: var(--gold-text); font-weight: 600; }
.userbox { display: flex; align-items: center; gap: 12px; }
.who { font-size: 13px; color: var(--text-3); }
.who b { color: var(--text); font-weight: 600; }
.who .role {
  font-size: 11px; background: var(--surface-2); color: var(--text-3);
  padding: 1px 6px; border-radius: 20px; margin-left: 6px;
}

main { flex: 1; padding: 22px 20px 40px; }
.view { max-width: 1160px; margin: 0 auto; }

/* ---------- 聊天 ---------- */
.chat-wrap { display: flex; flex-direction: column; min-height: calc(100vh - 130px); }
.chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.chat-head h2 { margin-bottom: 2px; }

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 4px 2px 12px;
  display: flex; flex-direction: column; gap: 16px;
  min-height: 260px; max-height: calc(100vh - 340px);
}
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg-col { display: flex; flex-direction: column; gap: 6px; max-width: 78%; min-width: 0; }
.msg.user .msg-col { align-items: flex-end; }
.msg .avatar {
  width: 28px; height: 28px; flex: none; border-radius: 8px;
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
}
.msg.user { flex-direction: row-reverse; }
.msg.user .avatar { background: var(--surface-3); color: var(--gold-text); border: 1px solid var(--line); }
.msg.bot .avatar { background: var(--gold); color: #1b1508; }
.bubble {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 15px;
  max-width: 100%;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .25);
  overflow-wrap: anywhere;
}
.msg.user .bubble { background: var(--gold-bg); border-color: var(--gold-line); color: var(--text); }
.msg.user .bubble a { color: var(--gold-text); }
.bubble p { margin: 0 0 8px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble ul, .bubble ol { margin: 6px 0; padding-left: 20px; }
.bubble li { margin: 2px 0; }
.bubble h3 { font-size: 14px; margin: 10px 0 6px; color: var(--gold-text); }
.bubble strong { color: var(--text); }
.msg.user .bubble strong { color: var(--gold-text); }
.bubble a { color: var(--gold); }
.bubble blockquote {
  margin: 8px 0; padding: 8px 12px;
  background: var(--gold-bg); border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0; color: var(--gold-text);
}
.bubble blockquote p { margin: 0; }
.bubble table { border-collapse: collapse; margin: 8px 0; font-size: 13px; width: 100%; }
.bubble th, .bubble td { border: 1px solid var(--line); padding: 5px 9px; text-align: left; }
.bubble th { background: var(--surface-3); font-weight: 600; color: var(--text-2); }
.bubble td { background: rgba(255, 255, 255, .015); }
.bubble pre {
  background: #f6f7f9; color: #333a44; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line);
  overflow-x: auto; font-family: var(--mono); font-size: 12.5px; margin: 8px 0;
}
.toolchips { display: flex; flex-wrap: wrap; gap: 6px; }
.toolchip {
  font-size: 11.5px; color: var(--text-3);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 20px;
}
.toolchip::before { content: "⚙ "; color: var(--gold); }
.cursor::after {
  content: "▍"; color: var(--gold); animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 12px; }
.chip {
  font: inherit; font-size: 12.5px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text-3); padding: 5px 11px; border-radius: 20px; cursor: pointer;
}
.chip:hover { border-color: var(--gold); color: var(--gold-text); background: var(--gold-bg); }

.composer {
  display: flex; gap: 10px; align-items: flex-end;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px;
  box-shadow: var(--shadow);
}
.composer:focus-within { border-color: var(--gold-line); }
.composer textarea {
  flex: 1; font: inherit; border: 0; resize: none; outline: none;
  padding: 8px 6px; max-height: 180px; background: transparent; color: var(--text);
}
.composer .btn { padding: 10px 22px; }

/* ---------- 看板 ---------- */
.ops-head { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; }
.stat-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 18px; min-width: 108px;
}
.stat span { display: block; font-size: 22px; font-weight: 650; letter-spacing: -.02em; color: var(--text); }
.stat span.sm { font-size: 14px; font-weight: 600; padding-top: 5px; }
.stat label { font-size: 11.5px; color: var(--text-mute); }
.ops-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ops-tools input[type="search"] {
  font: inherit; padding: 8px 12px; border: 1px solid var(--line); color: var(--text);
  border-radius: 9px; background: var(--input); min-width: 240px;
}
.ops-tools input[type="search"]:focus { outline: 2px solid var(--gold-bg); border-color: var(--gold); }
.check { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 5px; cursor: pointer; }

.table-wrap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: auto; box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
table.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.grid th, table.grid td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.grid th {
  font-size: 12px; font-weight: 600; color: var(--text-3);
  background: var(--surface-2); position: sticky; top: 0; z-index: 1;
  letter-spacing: .03em;
}
table.grid tbody tr:hover { background: var(--surface-2); }
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid .num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.low { background: var(--danger-bg); color: var(--danger); }
.pill.off { background: var(--surface-3); color: var(--text-mute); }
.sku { font-family: var(--mono); font-size: 12.5px; color: var(--text-3); }

/* ---------- 文件 ---------- */
.files-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.segmented { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg {
  font: inherit; font-size: 13px; border: 0; background: transparent;
  color: var(--text-3); padding: 6px 14px; border-radius: 8px; cursor: pointer;
}
.seg.active { background: var(--accent); color: #fff; font-weight: 600; }
.files-actions { display: flex; gap: 8px; }
.crumbs { font-size: 13px; color: var(--text-mute); margin-bottom: 8px; min-height: 20px; }
.crumbs a { color: var(--gold); text-decoration: none; cursor: pointer; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span.sep { padding: 0 5px; color: var(--line); }
.dropzone { position: relative; border-radius: var(--radius); transition: .15s; }
.dropzone.drag { outline: 2px dashed var(--gold); outline-offset: 4px; background: var(--gold-bg); }
.drop-hint { display: none; text-align: center; color: var(--text-mute); font-size: 13px; padding: 10px; }
.dropzone.drag .drop-hint { display: block; }
.empty { text-align: center; color: var(--text-mute); padding: 26px; font-size: 13px; }
.linkbtn {
  font: inherit; font-size: 13px; border: 0; background: transparent;
  color: var(--gold); cursor: pointer; padding: 2px 6px;
}
.linkbtn:hover { text-decoration: underline; }
.linkbtn.danger { color: var(--danger); }
.linkbtn:disabled { opacity: .35; cursor: not-allowed; text-decoration: none; }
.role-select {
  font: inherit; font-size: 12.5px; color: var(--text);
  padding: 4px 7px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--input); cursor: pointer;
}
.role-select:hover { border-color: var(--gold-line); }
.dir { color: var(--text); cursor: pointer; font-weight: 500; }
.dir:hover { color: var(--gold); }

/* ---------- 用户管理 ---------- */
.admin-head { margin-bottom: 16px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.inline-form input, .inline-form select {
  font: inherit; padding: 8px 11px; border: 1px solid var(--line); color: var(--text);
  border-radius: 9px; background: var(--input);
}
.inline-form input:focus, .inline-form select:focus { outline: 2px solid var(--gold-bg); border-color: var(--gold); }

/* ---------- 红点角标 ---------- */
.badge {
  display: inline-block; min-width: 16px; height: 16px; line-height: 16px;
  padding: 0 4px; margin-left: 5px; border-radius: 20px;
  background: var(--danger); color: #1b0f0e; font-size: 10.5px; font-weight: 700;
  text-align: center; vertical-align: 1px;
}

/* ---------- 同事消息 ---------- */
.im {
  display: grid; grid-template-columns: 250px 1fr; gap: 14px;
  height: calc(100vh - 150px); min-height: 430px;
}
.im-side {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden;
}
.im-side-head {
  padding: 11px 13px; border-bottom: 1px solid var(--line-2);
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.im-side-head h2 { font-size: 14px; }
.im-side-head select {
  font: inherit; font-size: 12.5px; border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 4px 6px; background: var(--input); max-width: 96px;
}
.im-threads { flex: 1; overflow-y: auto; }
.thread {
  display: flex; gap: 9px; padding: 10px 13px; cursor: pointer;
  border-bottom: 1px solid var(--line-2); align-items: center;
}
.thread:hover { background: var(--surface-2); }
.thread.active { background: var(--gold-bg); }
.tavatar {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: var(--gold); color: #1b1508;
}
.thread .tinfo { flex: 1; min-width: 0; }
.thread .tname { font-size: 13.5px; font-weight: 500; }
.thread .tlast {
  font-size: 12px; color: var(--text-mute); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.thread .tdot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: none; }
.thread .tcount {
  font-size: 10.5px; background: var(--danger); color: #1b0f0e;
  border-radius: 20px; padding: 0 5px; min-width: 16px; text-align: center; font-weight: 700;
}
.im-main {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden;
}
.im-title {
  padding: 12px 16px; border-bottom: 1px solid var(--line-2);
  font-size: 14px; font-weight: 600;
}
.im-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.im-bubble {
  max-width: 68%; padding: 8px 12px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.im-bubble.me { align-self: flex-end; background: var(--gold-bg); color: #f6ead0; border-color: var(--gold-line); }
.im-time { font-size: 11px; color: var(--text-mute); text-align: center; }
.im-empty { color: var(--text-mute); text-align: center; font-size: 13px; padding: 30px; margin: auto; }
.im-form {
  display: flex; gap: 10px; align-items: flex-end;
  padding: 10px; border-top: 1px solid var(--line-2);
}
.im-form textarea {
  flex: 1; font: inherit; border: 1px solid var(--line); border-radius: 10px; color: var(--text);
  padding: 9px 11px; resize: none; outline: none; background: var(--input);
  max-height: 120px;
}
.im-form textarea:focus { border-color: var(--gold-line); }

/* ---------- 待办 ---------- */
.todo-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 14px; flex-wrap: wrap;
}
.todo-head h2 { margin-bottom: 2px; }
.todo-tools { display: flex; gap: 10px; align-items: center; }
.todo-form {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px;
}
.todo-form input, .todo-form select {
  font: inherit; padding: 8px 11px; border: 1px solid var(--line); color: var(--text);
  border-radius: 9px; background: var(--input);
}
#td-title { flex: 1; min-width: 260px; }
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-item {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 15px;
}
.todo-item.done { opacity: .5; }
.todo-item.overdue { border-color: var(--danger-line); background: var(--danger-bg); }
.todo-check {
  width: 18px; height: 18px; margin-top: 2px; flex: none;
  accent-color: var(--gold); cursor: pointer;
}
.todo-body { flex: 1; min-width: 0; }
.todo-title { font-size: 14px; font-weight: 500; }
.todo-item.done .todo-title { text-decoration: line-through; }
.todo-meta { font-size: 12px; color: var(--text-mute); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.todo-meta .warn { color: var(--danger); font-weight: 600; }
.todo-note { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.empty-box {
  background: var(--surface); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: 40px; text-align: center; color: var(--text-mute); font-size: 13.5px;
}

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(6, 7, 8, .68);
  backdrop-filter: blur(2px);
  display: grid; place-items: center; padding: 20px;
}
.modal-card {
  width: 100%; max-width: 440px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 24px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8);
}
.modal-card h2 { font-size: 17px; margin-bottom: 4px; }
.reminder-list { margin: 16px 0 18px; display: flex; flex-direction: column; gap: 9px; }
.reminder-item {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 13px;
}
.reminder-item .rt { font-size: 13.5px; font-weight: 500; }
.reminder-item .rm { font-size: 12px; color: var(--text-mute); margin-top: 3px; }

/* ---------- 回答里的文件卡片 ---------- */
.file-cards { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.file-card {
  display: flex; align-items: center; gap: 10px;
  font: inherit; text-align: left; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; transition: .15s;
  max-width: 100%;
}
.file-card:hover { border-color: var(--gold-line); background: var(--gold-bg); }
.fc-icon { font-size: 18px; flex: none; }
.fc-info { display: flex; flex-direction: column; min-width: 0; }
.fc-name { font-size: 13.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-meta { font-size: 11.5px; color: var(--text-mute); }
/* 聊天里的图片卡片：缩略图 */
.file-card-img { padding: 8px 10px; align-items: center; }
.fc-thumb {
  width: 64px; height: 64px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); flex: 0 0 auto; background: var(--input);
}
.file-card-img:hover .fc-thumb { border-color: var(--gold); }

/* ---------- 知识库表单 ---------- */
.kb-card { max-width: 620px; }
.kb-fields { display: flex; gap: 12px; margin: 14px 0 10px; flex-wrap: wrap; }
.kb-fields label { flex: 1; min-width: 160px; }
.kb-card label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 12.5px; color: var(--text-3);
}
.kb-fields label:first-child { flex: 0 0 160px; min-width: 160px; }
.kb-card input, .kb-card select, .kb-card textarea {
  font: inherit; font-size: 13.5px; color: var(--text);
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--input); width: 100%;
}
.kb-card textarea {
  resize: vertical; line-height: 1.65; min-height: 150px;
  font-family: var(--sans);
}
.kb-card input:focus, .kb-card select:focus, .kb-card textarea:focus {
  outline: 2px solid var(--gold-bg); border-color: var(--gold);
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.modal-card h2 + p.muted { margin-top: 2px; }

/* ---------- 回答下方的操作 ---------- */
.msg-actions { display: flex; gap: 4px; opacity: .55; transition: opacity .15s; margin-top: 4px; }
.msg:hover .msg-actions, .msg-actions:focus-within { opacity: 1; }
.msg-actions .act {
  font: inherit; font-size: 11.5px; color: var(--text-mute);
  background: transparent; border: 1px solid var(--line);
  padding: 2px 9px; border-radius: 20px; cursor: pointer;
}
.msg-actions .act:hover { color: var(--gold-text); border-color: var(--gold-line); background: var(--gold-bg); }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 999;
  background: var(--surface-3); color: var(--text);
  border: 1px solid var(--line);
  padding: 9px 16px; border-radius: 9px; font-size: 13px;
  box-shadow: var(--shadow); animation: toastIn .2s ease;
  max-width: 70vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.toast.ok { background: var(--ok-bg); color: var(--ok); border-color: #27492f; }
.toast.bad { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }

/* ---------- 运营看板子板块 ---------- */
.ops-seg { margin-bottom: 16px; }
.ops-block-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 14px; flex-wrap: wrap;
}
.ops-block-head h2 { margin-bottom: 2px; }

.act-list { display: flex; flex-direction: column; gap: 10px; }
.act-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
}
.act-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.act-name { font-size: 15px; font-weight: 600; }
.act-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.act-time {
  font-size: 12.5px; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 2px 10px; border-radius: 20px;
}
.act-body { margin-top: 9px; font-size: 13px; color: var(--text-2); line-height: 1.7; }

.as-group { font-size: 13.5px; margin: 20px 0 10px; color: var(--gold-text); letter-spacing: .02em; }
.as-group:first-child { margin-top: 0; }
.as-card { margin-bottom: 16px; }
.as-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.as-name { font-size: 14px; font-weight: 600; }
.as-meta { font-size: 12px; color: var(--text-mute); }
.as-search {
  margin-left: auto; font: inherit; font-size: 13px; color: var(--text);
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--input); min-width: 190px;
}
.as-search:focus { outline: 2px solid var(--gold-bg); border-color: var(--gold); }
.as-table { max-height: 460px; overflow: auto; }
.as-table table.grid td { white-space: normal; max-width: 340px; }
.as-table table.grid th { white-space: nowrap; }

/* ---------- 客服看板（话术 / 新知识） ---------- */
.cs-search {
  font: inherit; font-size: 13px; color: var(--text);
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--input); min-width: 230px;
}
.cs-search:focus { outline: 2px solid var(--gold-bg); border-color: var(--gold); }
.script-body { display: flex; flex-direction: column; gap: 12px; }
.script-intro {
  background: var(--surface); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: 12px 16px;
  font-size: 13px; color: var(--text-2); line-height: 1.75;
}
.script-intro p { margin: 0 0 4px; }
.script-intro a { color: var(--gold); }
.script-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
}
.script-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.script-head h3 { font-size: 15px; margin: 0; color: var(--gold-text); }
.script-meta { font-size: 11.5px; color: var(--text-mute); }
.script-ops { margin-left: auto; display: flex; gap: 4px; }
.script-content { font-size: 13.5px; color: var(--text-2); line-height: 1.8; }
.script-content p { margin: 0 0 6px; }
.script-content p:last-child { margin-bottom: 0; }
.script-content ul, .script-content ol { margin: 6px 0; padding-left: 20px; }
.script-content li { margin: 2px 0; }
.script-content strong { color: var(--text); }
.script-content blockquote {
  margin: 8px 0; padding: 10px 14px;
  background: var(--gold-bg); border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0; color: var(--gold-text);
  font-size: 14px; line-height: 1.75;
}
.script-content blockquote p { margin: 0; }
.script-content code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.script-content hr, .script-intro hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }

/* ---------- 退货录像系统 ---------- */
.ret-bar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px;
}
.ret-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px;
}
.ret-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ret-no { font-family: var(--mono); font-size: 13.5px; color: var(--text); font-weight: 600; }
.ret-time { font-size: 12.5px; color: var(--text-mute); }
.ret-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ret-chip {
  font-size: 12px; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 2px 9px; border-radius: 20px;
}
.ret-chip.warn { color: var(--danger); border-color: var(--danger-line); background: var(--danger-bg); }
.ret-remark { margin-top: 8px; font-size: 12.5px; color: var(--text-3); }

/* ---------- 退货区（跳转页） ---------- */
.ret-redirect {
  max-width: 620px; margin: 40px auto 0; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 36px 32px;
}
.ret-redirect-icon { font-size: 44px; line-height: 1; margin-bottom: 12px; }
.ret-redirect h2 { font-size: 20px; margin-bottom: 8px; }
.ret-redirect-actions { margin: 22px 0 14px; }
.ret-redirect-actions .btn { padding: 12px 28px; font-size: 15px; }
.ret-tips {
  text-align: left; margin-top: 26px; padding-top: 20px;
  border-top: 1px solid var(--line-2);
}
.ret-tips h3 { font-size: 13.5px; color: var(--gold-text); margin-bottom: 10px; }
.ret-tips ul { margin: 0; padding-left: 20px; }
.ret-tips li { font-size: 13px; color: var(--text-2); margin: 6px 0; line-height: 1.7; }
.ret-tips b { color: var(--text); }

/* ---------- 一键复制（话术引用块） ---------- */
.bubble blockquote, .script-content blockquote { position: relative; padding-right: 58px; }
.copy-btn {
  position: absolute; top: 6px; right: 6px;
  font: inherit; font-size: 11px; line-height: 1;
  padding: 5px 9px; border-radius: 6px; cursor: pointer;
  background: rgba(0, 0, 0, .3); color: var(--gold-text);
  border: 1px solid var(--gold-line);
  transition: .15s;
}
.copy-btn:hover { background: var(--gold); color: #221b0d; border-color: var(--gold); }
.copy-btn:active { transform: translateY(1px); }

/* ---------- 意见箱 ---------- */
.feedback-form {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px;
}
.fb-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.fb-row select {
  font: inherit; font-size: 13px; color: var(--text);
  background: var(--input); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px;
}
.feedback-form textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 13.5px; color: var(--text);
  background: var(--input); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; resize: vertical; line-height: 1.7;
}
.feedback-form textarea:focus { outline: 2px solid var(--gold-bg); border-color: var(--gold); }
.fb-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.fb-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px;
}
.fb-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.fb-kind {
  font-size: 11.5px; color: var(--text-mute);
  border: 1px solid var(--line); padding: 1px 8px; border-radius: 20px;
}
.fb-who { font-size: 11.5px; color: var(--text-mute); }
.fb-body { font-size: 13.5px; color: var(--text); line-height: 1.75; white-space: pre-wrap; }
.fb-reply { margin-top: 8px; font-size: 12.5px; color: var(--ok); }
.fb-ops { display: flex; gap: 8px; margin-top: 10px; }
.pill.warn { color: var(--gold-text); background: var(--gold-bg); border-color: var(--gold-line); }
.pill.muted { color: var(--text-3); background: var(--surface-2); }

/* 列表里的行内缩略图 */
.row-thumb {
  width: 38px; height: 38px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--line); vertical-align: middle; margin-right: 10px;
  cursor: zoom-in; background: var(--input);
}
.row-name.zoomable { cursor: zoom-in; vertical-align: middle; }
.row-name.zoomable:hover { color: var(--gold-text); }
/* ---------- 文件：图片墙 / 大图 ---------- */
.seg-sm .seg { padding: 5px 12px; font-size: 12.5px; }
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px; margin-top: 12px;
}
.fg-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; cursor: pointer;
  transition: .15s; display: flex; flex-direction: column;
}
.fg-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.fg-thumb {
  aspect-ratio: 4 / 3; background: var(--input); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.fg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fg-icon { font-size: 30px; padding: 22px 0 6px; text-align: center; }
.fg-name {
  font-size: 12px; color: var(--text-2);
  padding: 8px 10px 2px; word-break: break-all; line-height: 1.5;
}
.fg-meta { font-size: 11px; color: var(--text-mute); padding: 0 10px 9px; }
.fg-file { padding-bottom: 8px; }
.fg-file .fg-icon { font-size: 26px; padding: 30px 0 6px; }
.fg-file .linkbtn { margin: 2px 10px 0; align-self: flex-start; }

.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: #0a0c0e;
  display: flex; flex-direction: column;
}
.lb-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.lb-name { font-size: 13px; color: var(--text-2); word-break: break-all; }
.lb-actions { margin-left: auto; display: flex; gap: 8px; }
.lb-stage {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 18px; overflow: hidden; cursor: default; user-select: none;
}
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; transition: transform .12s ease-out; transform-origin: center center; will-change: transform; }
.lb-zoom { font-size: 12.5px; color: var(--text-3); min-width: 46px; text-align: center; }

/* 页签可拖动排序 */
.tab { cursor: pointer; }
.tab[draggable="true"] { cursor: grab; }
.tab.dragging { opacity: .45; }
.tab[draggable="true"]:active { cursor: grabbing; }

/* 图片墙工具条 */
.grid-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 12px 0 0; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.grid-bar .cs-search { min-width: 200px; }
.grid-bar .check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; }
  main { padding: 14px 12px 30px; }
  .bubble { max-width: 88%; }
  .messages { max-height: none; }
  .stat { padding: 10px 14px; min-width: 92px; }
  .stat span { font-size: 18px; }
  .im { grid-template-columns: 1fr; height: auto; }
  .im-side { max-height: 240px; }
  .im-main { min-height: 400px; }
  .im-bubble { max-width: 82%; }
}
/* 用户消息下方的操作条（右对齐） */
.msg-actions.right { justify-content: flex-end; padding-left: 0; padding-right: 2px; }
.msg.user .msg-actions .act { color: var(--text-mute); }
/* AI 用量小字 */
.usage-line {
  font-size: 11.5px; color: var(--text-mute);
  border: 1px dashed var(--line); border-radius: 20px;
  padding: 3px 10px; cursor: pointer; margin-right: 8px;
}
.usage-line:hover { color: var(--gold-text); border-color: var(--gold-line); }
/* ================= 手机端布局修正 ================= */
@media (max-width: 900px) {
  /* 顶栏压到一行，高度最小化 */
  .topbar {
    flex-wrap: nowrap; gap: 8px; padding: 6px 10px;
    align-items: center;
  }
  .topbar .brand.small { flex: 0 0 auto; gap: 6px; }
  .topbar .brand.small .brand-mark { width: 26px; height: 26px; font-size: 13px; border-radius: 7px; }
  .topbar .brand.small strong { font-size: 13px; white-space: nowrap; }
  .tabs {
    order: initial; flex: 1 1 auto; min-width: 0;
    overflow-x: auto; gap: 2px; padding-bottom: 1px;
    -webkit-overflow-scrolling: touch;
  }
  .tab {
    font-size: 13.5px; padding: 9px 13px; min-height: 38px;
    flex: 0 0 auto; white-space: nowrap;
  }
  .userbox { flex: 0 0 auto; gap: 6px; }
  .userbox .who {
    font-size: 12px; max-width: 72px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .userbox .who .role { display: none; }
  #btn-logout { padding: 5px 10px; font-size: 12px; white-space: nowrap; }
  main { padding: 12px 10px 40px; }

  /* 文件页工具条：不换行、可横滑 */
  .files-head { flex-wrap: nowrap; gap: 8px; align-items: center; }
  .files-head .segmented { flex: 0 0 auto; }
  .files-actions {
    flex: 1 1 auto; min-width: 0;
    overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .files-actions::-webkit-scrollbar { display: none; }
  .files-actions .btn { flex: 0 0 auto; white-space: nowrap; }
  .seg { white-space: nowrap; flex: 0 0 auto; }
  .btn { white-space: nowrap; }

  /* 其他工具条同理 */
  .ops-tools, .ops-block-head { flex-wrap: wrap; gap: 8px; }
  .ops-tools { width: 100%; }
  .grid-bar { gap: 10px; padding: 8px 10px; }
  .grid-bar .cs-search, .cs-search { min-width: 0; flex: 1 1 auto; }
}

/* 特别窄的屏幕：标题文字省掉，只留 Logo */
@media (max-width: 430px) {
  .topbar .brand.small strong { display: none; }
  .topbar { gap: 6px; padding: 5px 8px; }
  .tab { padding: 8px 11px; font-size: 13px; min-height: 36px; }
  .userbox .who { display: none; }
}
/* Markdown 阅读弹窗 */
.md-view-card {
  max-width: 880px; width: 92vw; max-height: 86vh;
  display: flex; flex-direction: column;
}
.md-view-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px; flex: none;
}
.md-view-body {
  overflow: auto; font-size: 14px; line-height: 1.85; color: var(--text-2);
  padding-right: 6px;
}
.md-view-body h1, .md-view-body h2, .md-view-body h3 { color: var(--text); margin: 16px 0 8px; }
.md-view-body h1 { font-size: 20px; }
.md-view-body h2 { font-size: 17px; }
.md-view-body h3 { font-size: 15px; }
.md-view-body table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.md-view-body th, .md-view-body td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; }
.md-view-body th { background: var(--surface-2); color: var(--text); }
.md-view-body blockquote {
  border-left: 3px solid var(--gold); background: var(--gold-bg);
  padding: 8px 12px; margin: 10px 0; border-radius: 0 8px 8px 0; color: var(--gold-text);
}
.md-view-body code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.md-view-body ul, .md-view-body ol { padding-left: 22px; }
/* 经销商价格表 · 产品图 */
.dealer-img-cell { width: 88px; padding: 4px 6px !important; }
.dealer-thumb {
  width: 76px; height: 76px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface-2); cursor: zoom-in; display: block;
}
.dealer-thumb:hover { border-color: var(--gold); }
.thumb-upload {
  width: 76px; height: 76px; border: 1px dashed var(--line);
  border-radius: 8px; background: transparent; color: var(--text-3);
  font-size: 12px; cursor: pointer; line-height: 1.2;
}
.thumb-upload:hover { border-color: var(--gold); color: var(--gold-text); background: var(--gold-bg); }
.dealer-grid td { vertical-align: middle; }

/* ================= 产品库 ================= */
.prod-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}
@media (max-width: 1100px) { .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .prod-grid { grid-template-columns: 1fr; } }

.prod-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.prod-cat {
  border: 1px solid var(--line); background: transparent; color: var(--text-2);
  border-radius: 20px; padding: 4px 12px; font-size: 12.5px; cursor: pointer;
}
.prod-cat:hover { border-color: var(--gold); color: var(--gold-text); }
.prod-cat.active { background: var(--gold-bg); border-color: var(--gold); color: var(--gold-text); }

.prod-mini {
  display: flex; gap: 9px; padding: 9px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
}
.prod-mini-img {
  width: 62px; height: 62px; flex: none; border-radius: 8px; overflow: hidden;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  cursor: zoom-in;
}
.prod-mini-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-mini-noimg { font-size: 11px; color: var(--text-3); cursor: pointer; }
.prod-mini-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.prod-mini-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.prod-mini-title { font-weight: 600; font-size: 13.5px; color: var(--text); }
.prod-mini-meta { font-size: 11.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-mini-remark { font-size: 11px; color: var(--gold-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-mini-actions { display: flex; gap: 6px; margin-top: auto; }
.mini-btn {
  border: 1px solid var(--line); background: transparent; color: var(--text-3);
  border-radius: 5px; font-size: 11px; padding: 0 6px; line-height: 18px; cursor: pointer;
}
.mini-btn:hover { border-color: var(--gold); color: var(--gold-text); }
.mini-btn.danger:hover { border-color: #c66; color: #e88; }
.prod-item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; display: flex; flex-direction: column;
}
.prod-item-img {
  height: 150px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; cursor: zoom-in;
}
.prod-item-img img { width: 100%; height: 100%; object-fit: contain; }
.prod-item-noimg { color: var(--text-3); font-size: 13px; }
.prod-item-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.prod-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prod-item-name { font-weight: 600; color: var(--text); font-size: 15px; }
.prod-item-cat {
  font-size: 11px; color: var(--gold-text); background: var(--gold-bg);
  border-radius: 20px; padding: 1px 8px;
}
.prod-item-params { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.prod-param-line { display: flex; gap: 4px; }
.prod-param-k { color: var(--text-3); flex: none; }
.prod-param-v { color: var(--text-2); }
.prod-item-remark {
  font-size: 12px; color: var(--gold-text); background: var(--gold-bg);
  border-radius: 8px; padding: 6px 8px; line-height: 1.5;
}
.prod-pkg-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.prod-pkg-label { color: var(--text-3); }
.prod-pkg-thumb img { width: 54px; height: 54px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); cursor: zoom-in; }
.prod-pkg-empty { color: var(--text-3); }
.prod-item-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 4px; }

.prod-card { max-width: 760px; width: 92vw; max-height: 88vh; overflow: auto; }
.prod-form-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.prod-form-row label { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-3); }
.prod-form-row select, .prod-form-row input { padding: 7px 9px; }
.prod-form-block { margin-bottom: 12px; }
.prod-form-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-3); margin-bottom: 6px; }
.prod-fields { display: flex; flex-direction: column; gap: 6px; max-height: 34vh; overflow: auto; }
.prod-field-row { display: flex; gap: 6px; align-items: center; }
.prod-field-k { width: 34%; }
.prod-field-v { flex: 1; }
.prod-remark-label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-3); }
.prod-img-row { display: flex; gap: 18px; margin: 6px 0 14px; }
.prod-img-slot { flex: 1; }
.prod-img-label { font-size: 13px; color: var(--text-3); margin-bottom: 6px; }
.prod-img-box { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.prod-img { width: 120px; height: 120px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); cursor: zoom-in; }
.prod-img-empty { width: 120px; height: 120px; border: 1px dashed var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 12px; }
.prod-img-bar { display: flex; gap: 8px; }
.prod-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* 经销商缩略图上的 换/删 */
.thumb-bar { display: flex; gap: 4px; margin-top: 3px; }
.thumb-mini {
  border: 1px solid var(--line); background: transparent; color: var(--text-3);
  border-radius: 5px; font-size: 11px; padding: 0 5px; line-height: 18px; cursor: pointer;
}
.thumb-mini:hover { border-color: var(--gold); color: var(--gold-text); }
.thumb-mini.danger:hover { border-color: #c66; color: #e88; }

/* 产品小卡：左图列（主图+包装图）+ 右侧完整参数 */
.prod-mini { align-items: flex-start; }
.prod-mini-imgcol {
  width: 82px; flex: none; display: flex; flex-direction: column; gap: 6px;
}
.img-slot {
  position: relative; width: 82px; border-radius: 8px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
}
.img-slot-main { height: 82px; }
.img-slot-pkg { height: 62px; }
.img-slot img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.img-slot-empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%; font-size: 10.5px; color: var(--text-3); cursor: pointer; text-align: center;
}
.img-slot-empty:hover { color: var(--gold-text); background: var(--gold-bg); }
.img-slot-ops {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 2px;
  justify-content: center; padding: 2px; background: rgba(0,0,0,.55);
  opacity: 0; transition: opacity .15s;
}
.img-slot:hover .img-slot-ops { opacity: 1; }
.img-slot-ops .mini-btn {
  border-color: transparent; background: transparent; color: #ddd; padding: 0 3px; line-height: 14px; font-size: 10px;
}
.img-slot-ops .mini-btn:hover { color: #fff; background: rgba(255,255,255,.15); }
.prod-mini-body { min-width: 0; }
.prod-mini-params { display: flex; flex-direction: column; gap: 1px; margin-top: 2px; }
.prod-mini-param {
  font-size: 11.5px; line-height: 1.5; color: var(--text-2);
  display: flex; gap: 2px; flex-wrap: wrap; word-break: break-word;
}
.prod-mini-k { color: var(--text-3); flex: none; }
.prod-mini-v { color: var(--text-2); }
.prod-mini-remark {
  white-space: normal; line-height: 1.5; margin-top: 4px;
  color: var(--gold-text); background: var(--gold-bg); border-radius: 6px; padding: 3px 6px;
}

/* 退货区：快捷查询 + 镜像内嵌 */
.ret-quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.ret-quick input { flex: 1; min-width: 220px; }
.ret-result { margin-bottom: 16px; }
.ret-embed-head { margin: 18px 0 8px; }
.ret-embed-head h3 { margin: 0 0 4px; font-size: 15px; }
.ret-frame {
  width: 100%; height: 72vh; min-height: 480px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
}

.ret-embed-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* 退货区：突破 1160 宽度限制，占满可用宽度 + 全屏 */
#view-ret { max-width: none; width: 100%; }
#view-ret .ret-frame { width: 100%; height: 78vh; min-height: 540px; }
@media (min-width: 1600px) { #view-ret .ret-frame { height: 82vh; } }
@media (max-width: 760px) { #view-ret .ret-frame { height: 68vh; min-height: 380px; } }

#view-ret .ret-frame.ret-fullscreen {
  position: fixed; inset: 0; width: 100vw !important; height: 100vh !important;
  min-height: 0 !important; max-width: none !important;
  z-index: 9000; border: none; border-radius: 0; background: #111;
}
body.ret-fs-lock { overflow: hidden; }

/* 系统维护卡 */
.sys-card {
  margin-top: 22px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.sys-card h3 { margin: 0 0 6px; font-size: 15px; }
.sys-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }

/* 表格 / PDF 预览弹窗 */
.table-card { max-width: 1200px; width: 94vw; max-height: 88vh; display: flex; flex-direction: column; }
.table-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 10px; flex: none;
}
.table-modal-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.table-modal-body { flex: 1; overflow: auto; min-height: 200px; }
.table-modal-scroll { overflow: auto; }
.preview-grid { font-size: 12.5px; }
.preview-grid th, .preview-grid td { white-space: nowrap; padding: 5px 9px; }
.preview-grid thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; }
.preview-no { color: var(--text-3); text-align: right; width: 46px; background: var(--surface); position: sticky; left: 0; }
.inline-file-frame { width: 100%; height: 74vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* ================= 补发登记与审核（reship） ================= */
.rs-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:12px}
.rs-tabs{display:flex;align-items:center;gap:4px;flex:1;min-width:0;overflow:auto}
.rs-tab{font:inherit;font-size:14px;color:var(--text-3);background:none;border:0;border-bottom:2px solid transparent;padding:6px 12px;cursor:pointer;white-space:nowrap;position:relative;top:1px}
.rs-tab b{font-weight:600;color:var(--text-mute);font-size:11.5px;margin-left:5px;background:var(--surface-2);border-radius:8px;padding:1px 6px}
.rs-tab:hover{color:var(--text)}
.rs-tab.on{color:var(--text);border-bottom-color:var(--gold)}
.rs-tab.on b{color:var(--gold-text)}
.rs-actions{display:flex;align-items:center;gap:8px}
.rs-search{position:relative;width:300px}
.rs-search input{padding-left:30px;font-size:12.5px;padding-top:6px;padding-bottom:6px}
.rs-search::before{content:"⌕";position:absolute;left:10px;top:3px;color:var(--text-mute);font-size:15px}
.rs-filters{display:flex;gap:8px;align-items:center;margin-bottom:10px;flex-wrap:wrap}
.rs-filters select{width:118px;font-size:12.5px;padding:6px 9px}
.rs-datewrap{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:8px;background:var(--input);padding:0 6px}
.rs-datewrap:focus-within{border-color:#4a5460}
.rs-datewrap input[type=datetime-local]{width:198px;border:0;background:transparent;padding:6px 2px;font-size:12.5px;color:var(--text-2)}
.rs-datewrap input::-webkit-calendar-picker-indicator{opacity:.5;cursor:pointer}
.rs-sep{color:var(--text-mute);font-size:12px;padding:0 2px}
.rs-draftbar{background:var(--gold-bg);border:1px solid var(--gold-line);color:var(--gold-text);border-radius:9px;padding:7px 12px;font-size:12.5px;margin-bottom:10px;cursor:pointer}
.rs-batch{display:flex;align-items:center;gap:9px;background:var(--gold-bg);border:1px solid var(--gold-line);border-radius:9px;padding:7px 12px;margin-bottom:10px;font-size:13px;color:var(--gold-text)}
.rs-tablewrap{border:1px solid var(--line-2);border-radius:12px;background:var(--bg-2);overflow:auto}
table.rs-table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}
.rs-table thead th{position:sticky;top:0;z-index:2;background:var(--surface-2);color:var(--text-mute);font-size:12px;font-weight:500;text-align:left;padding:8px 10px;border-bottom:1px solid var(--line);white-space:nowrap}
.rs-table tbody td{padding:8px 10px;border-bottom:1px solid var(--line-2);vertical-align:middle}
.rs-table tbody tr{cursor:pointer}
.rs-table tbody tr:hover{background:var(--surface)}
.rs-table tbody tr:last-child td{border-bottom:0}
.rs-table tr.rs-overdue{background:linear-gradient(90deg,rgba(226,119,111,.06),transparent 60%)}
.rs-table tr.rs-overdue td:first-child{box-shadow:inset 3px 0 0 var(--danger)}
.rs-table tr.sel{background:rgba(211,173,99,.07)}
.rs-cb{width:34px}
.rs-cb input{width:auto;cursor:pointer}
.rs-num{color:var(--text-mute);font-size:12px}
.rs-src{font-size:12.5px;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rs-src-sub{font-size:11px;color:var(--text-mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rs-rc{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rs-rc .rs-tel{color:var(--text-3);font-size:12.5px;margin-left:5px}
.rs-addr{font-size:12px;color:var(--text-mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px}
.rs-goods-cell{display:flex;align-items:center;gap:8px;min-width:0}
.rs-thumbs{display:flex;gap:4px;flex:none}
.rs-thumb{width:34px;height:34px;border-radius:6px;border:1px solid var(--line);object-fit:cover;cursor:zoom-in;background:var(--surface-2)}
.rs-goods-txt{min-width:0;flex:1}
.rs-goods{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rs-goods .rs-qty{color:var(--text-3);margin-left:6px;font-size:12px}
.rs-tags{display:flex;gap:4px;margin-top:2px;flex-wrap:nowrap;overflow:hidden;align-items:center}
.rs-owner{font-size:10.5px;padding:1.5px 6px;border-radius:5px;border:1px solid var(--line);color:var(--text-3);white-space:nowrap}
.rs-owner.factory{color:#e6bd77;border-color:var(--gold-line);background:rgba(211,173,99,.08)}
.rs-owner.warehouse{color:#6f9fd8;border-color:#2b3d55;background:rgba(111,159,216,.08)}
.rs-owner.shop{color:var(--ok);border-color:#26463a;background:rgba(95,191,144,.08)}
.rs-owner.customer{color:var(--text-3)}
.rs-owner.other{color:var(--text-mute)}
.rs-tn{font-family:var(--mono);font-size:11.5px;padding:5px 7px;border:1px solid var(--line);background:var(--input);color:var(--text-2);width:100%}
.rs-tn:hover{border-color:#3b4550}
.rs-tn:focus{border-color:var(--gold-line);color:var(--text)}
.rs-tn::placeholder{color:var(--text-mute);font-family:var(--sans);font-size:11.5px}
.rs-pushcell{font-size:11.5px;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rs-none{color:var(--text-mute)}
.rs-time{font-size:12px;color:var(--text-3);white-space:nowrap}
.rs-time .rs-over{color:var(--danger);font-size:11px;display:block}
.rs-ops{text-align:right;white-space:nowrap}
.rs-ops .btn{opacity:.65}
.rs-table tr:hover .rs-ops .btn{opacity:1}
.rs-go{background:transparent;border-color:var(--gold-line);color:var(--gold-text)}
.rs-go:hover{background:var(--gold-bg)}
.rs-empty{text-align:center;color:var(--text-mute);padding:44px 0!important;font-size:13px}
.rs-foot{display:flex;gap:10px;align-items:center;color:var(--text-mute);font-size:12px;padding:10px 2px}
.rs-pill{font-size:11px;line-height:1;padding:4px 8px;border-radius:999px;border:1px solid var(--line);color:var(--text-3);background:var(--surface-2);white-space:nowrap}
.rs-pill.pending{color:var(--gold-text);border-color:var(--gold-line);background:var(--gold-bg)}
.rs-pill.ready{color:#6f9fd8;border-color:#2b3d55;background:rgba(111,159,216,.1)}
.rs-pill.shipped{color:var(--ok);border-color:#26463a;background:rgba(95,191,144,.1)}
.rs-pill.void{color:var(--danger);border-color:var(--danger-line);background:var(--danger-bg)}

/* 抽屉 */
.rs-scrim{position:fixed;inset:0;background:rgba(20,26,33,.45);backdrop-filter:blur(2px);z-index:60}
.rs-drawer{position:fixed;top:0;right:0;bottom:0;width:min(580px,100%);background:var(--bg-2);border-left:1px solid var(--line);z-index:61;display:flex;flex-direction:column;box-shadow:-24px 0 60px -30px rgba(20,26,33,.28);animation:rsSlide .2s ease}
@keyframes rsSlide{from{transform:translateX(24px)}to{transform:none}}
.rs-dw-head{padding:15px 18px 12px;border-bottom:1px solid var(--line-2);display:flex;gap:10px;align-items:flex-start}
.rs-dw-title{display:flex;align-items:center;gap:8px;flex:1;flex-wrap:wrap}
.rs-dw-title .rs-no{font-size:15px;font-weight:700}
.rs-dw-sub{font-size:12px;color:var(--text-mute);margin-top:3px}
.rs-dw-body{flex:1;overflow:auto;padding:15px 18px 24px}
.rs-sec{margin-bottom:18px}
.rs-sec>h3{font-size:11.5px;letter-spacing:.08em;color:var(--text-mute);margin-bottom:8px;display:flex;align-items:center;gap:8px}
.rs-sec>h3::after{content:"";flex:1;height:1px;background:var(--line-2)}
.rs-sec>h3 .btn{margin-left:auto;order:2}
.rs-grid2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.rs-field{display:flex;flex-direction:column;gap:3px}
.rs-field label{font-size:11px;color:var(--text-mute)}
.rs-field.full,.rs-field.rs-full{grid-column:1/-1}
.rs-field input,.rs-field select{font-size:13px;padding:7px 10px}
.rs-item{border:1px solid var(--line);background:var(--surface);border-radius:10px;padding:10px 11px;margin-bottom:8px}
.rs-item-head{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.rs-item-no{width:18px;height:18px;border-radius:5px;background:var(--surface-3);color:var(--text-3);font-size:10.5px;display:grid;place-items:center;flex:none}
.rs-item-head input.rs-it-name{flex:1;font-size:13px;font-weight:600;padding:6px 9px}
.rs-row2{display:grid;grid-template-columns:56px 1fr 72px;gap:8px;align-items:center;margin-bottom:6px}
.rs-row2 label{font-size:11px;color:var(--text-mute)}
.rs-thumbs-edit{display:flex;gap:6px;align-items:center;margin-top:7px;flex-wrap:wrap}
.rs-imgbox{position:relative;width:54px;height:54px}
.rs-imgbox img{width:54px;height:54px;border-radius:7px;border:1px solid var(--line);object-fit:cover;cursor:zoom-in}
.rs-imgx{position:absolute;top:-6px;right:-6px;width:18px;height:18px;border-radius:50%;border:1px solid var(--line);background:var(--surface-3);color:var(--danger);font-size:12px;line-height:16px;padding:0;cursor:pointer}
.rs-imgadd{width:54px;height:54px;border-radius:7px;border:1px dashed var(--line);display:grid;place-items:center;color:var(--text-mute);font-size:20px;cursor:pointer}
.rs-imgadd:hover{color:var(--gold-text);border-color:var(--gold-line)}
.rs-logs{font-size:12.5px}
.rs-log{display:grid;grid-template-columns:88px 1fr;gap:9px;padding:6px 0;border-bottom:1px dashed var(--line-2)}
.rs-log:last-child{border-bottom:0}
.rs-log .t{color:var(--text-mute);font-size:11px}
.rs-dw-foot{padding:11px 18px;border-top:1px solid var(--line);display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.rs-dw-tip{margin-left:auto}

/* 弹窗 */
.rs-modal{position:fixed;inset:0;z-index:70;display:grid;place-items:center;padding:20px;background:rgba(20,26,33,.5);backdrop-filter:blur(2px)}
.rs-modal-card{background:var(--bg-2);border:1px solid var(--line);border-radius:14px;width:min(560px,100%);max-height:92vh;overflow:auto;padding:17px 19px;box-shadow:var(--shadow)}
.rs-modal-card h2{font-size:15px;margin-bottom:3px}
.rs-modal-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:14px;flex-wrap:wrap}
.rs-push-row{display:flex;align-items:center;gap:9px;padding:9px 11px;border:1px solid var(--line);border-radius:10px;background:var(--surface);margin-bottom:8px;font-size:12.5px}
.rs-push-row>span{width:34px;color:var(--text-2)}
.rs-push-row input[type=checkbox]{width:auto}
.rs-push-row select{flex:1;font-size:12.5px;padding:5px 8px}
.rs-preview{margin-top:12px;border:1px solid var(--line-2);border-radius:10px;background:var(--surface);padding:11px 12px;font-size:12.5px}
.rs-pv-h{font-size:11px;letter-spacing:.06em;color:var(--text-mute);margin-bottom:7px}
.rs-pv-item{border-top:1px dashed var(--line-2);padding-top:7px;margin-top:7px}
.rs-pv-check{color:var(--gold-text);margin-top:2px}
.rs-pv-imgs{display:flex;gap:5px;margin-top:5px}
.rs-pv-imgs img{width:38px;height:38px;border-radius:6px;border:1px solid var(--line);object-fit:cover}
.rs-dropzone{display:block;border:1px dashed var(--line);border-radius:11px;padding:20px;text-align:center;color:var(--text-mute);font-size:12.5px;background:var(--input);cursor:pointer;margin-top:8px}
.rs-dropzone:hover,.rs-dropzone.drag{border-color:var(--gold-line);color:var(--gold-text)}
.rs-sum{font-size:12.5px;margin:12px 0 8px}
.rs-mini{width:100%;border-collapse:collapse;font-size:12px}
.rs-mini th,.rs-mini td{border-bottom:1px solid var(--line-2);padding:6px 7px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}
.rs-mini th{color:var(--text-mute);font-weight:500;font-size:11px}
.rs-mini td{color:var(--text-2)}
.rs-ok{color:var(--ok)}.rs-warn{color:var(--gold-text)}.rs-bad{color:var(--danger)}
.rs-maps{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;margin:10px 0}
.rs-maprow{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--text-3)}
.rs-maprow>span{width:62px;color:var(--text-mute);flex:none}
.rs-maprow select{flex:1;font-size:12px;padding:5px 8px}
.rs-prev{margin-top:8px;overflow:auto;max-height:180px}
.rs-check{display:flex;gap:6px;align-items:center;font-size:12.5px;color:var(--text-2);margin-top:6px}
.rs-check input{width:auto}
.rs-tn2{font-family:var(--mono)}

/* 对话里的补发卡片 */
.rs-chat-card{margin-top:9px;border:1px solid var(--gold-line);background:linear-gradient(180deg,rgba(211,173,99,.06),transparent 60%),var(--surface);border-radius:10px;padding:10px 12px;cursor:pointer;font-size:13px}
.rs-chat-card:hover{border-color:#6b5a33}
.rs-chat-head{display:flex;align-items:center;gap:7px;margin-bottom:5px}
.rs-draft-card{margin-top:8px;border:1px dashed var(--line);background:var(--bg-2);border-radius:9px;padding:8px 11px;color:var(--text-3);font-size:12.5px}
.rs-hover{position:fixed;z-index:90;width:220px;height:220px;border-radius:11px;border:1px solid var(--line);box-shadow:var(--shadow);overflow:hidden;background:#ffffff;pointer-events:none}
.rs-hover img{width:100%;height:100%;object-fit:cover}

@media (max-width:900px){
  .rs-head{gap:8px}
  .rs-tabs{order:2;width:100%}
  .rs-actions{order:1;width:100%}
  .rs-search{width:auto;flex:1}
  .rs-table{min-width:780px}
  .rs-drawer{width:100%}
  .rs-grid2{grid-template-columns:1fr}
  .rs-maps{grid-template-columns:1fr}
}

/* 补发页占满宽度（和退货区一样突破 1160 限制） */
#view-reship{max-width:none}
#view-reship .rs-search{flex:none}
.rs-table{min-width:760px}

/* 补发：设置弹窗 + 导出选列 */
.rs-set-sec{margin-top:14px;border-top:1px solid var(--line-2);padding-top:10px}
.rs-set-sec h3{font-size:12.5px;color:var(--text-2);margin-bottom:8px}
.rs-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.rs-chip{display:inline-flex;align-items:center;gap:6px;font-size:12px;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:3px 6px 3px 10px;color:var(--text-2)}
.rs-chip button{border:0;background:transparent;color:var(--danger);cursor:pointer;font-size:13px;line-height:1;padding:0 2px}
.rs-addrow{display:flex;gap:8px}
.rs-addrow input{flex:1;font-size:12.5px;padding:6px 9px}
.rs-export-mode{display:flex;flex-direction:column;gap:6px;margin:10px 0}
.rs-cols{display:grid;grid-template-columns:repeat(3,1fr);gap:6px 10px;border:1px solid var(--line-2);border-radius:10px;padding:10px;margin-top:6px;background:var(--surface)}


/* 补发：日期框（文本样式 + 原生日历）/ 行内复制 / 单号状态 */
.rs-dt{width:150px;border:0;background:transparent;padding:6px 4px;font-size:12.5px;color:var(--text-2);cursor:pointer}
.rs-dt::placeholder{color:var(--text-mute)}
.rs-hiddenpicker{position:fixed;left:-9999px;top:0;width:1px;height:1px;opacity:0}
.rs-cal{color:var(--text-mute);font-size:12px;padding-right:4px}
.rs-cell-copy{display:flex;align-items:center;gap:6px;min-width:0}
.rs-copybody{min-width:0;flex:1}
.rs-copy{border:1px solid var(--line);background:var(--surface-2);color:var(--text-3);font-size:10.5px;padding:2px 6px;border-radius:6px;cursor:pointer;opacity:0;transition:.12s;flex:none}
tr:hover .rs-copy,.rs-cell-copy:hover .rs-copy{opacity:1}
.rs-copy:hover{color:var(--gold-text);border-color:var(--gold-line)}
.rs-tn-box{display:flex;align-items:center;gap:4px}
.rs-tn-box.ok .rs-tn{color:var(--ok);border-color:#26463a;background:var(--ok-bg)}
.rs-tn-box.warn .rs-tn{color:var(--danger);border-color:var(--danger-line);background:var(--danger-bg)}
.rs-tn[readonly]{cursor:pointer}
.rs-dot{width:7px;height:7px;border-radius:50%;background:var(--ok);flex:none;box-shadow:0 0 0 3px rgba(95,191,144,.15)}
.rs-tncopy{padding:2px 5px;font-size:12px}

.rs-date-field{position:relative;display:inline-block;width:150px;height:30px;cursor:pointer}
.rs-date-field>span{position:absolute;inset:0;line-height:30px;padding:0 6px;font-size:12.5px;color:var(--text-mute);pointer-events:none;white-space:nowrap;overflow:hidden}
.rs-date-field.filled>span{color:var(--text-2)}
.rs-date-field>input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;border:0;background:transparent}

.rs-filtergroup{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:10px;padding:4px 6px;background:var(--surface)}
.rs-filtergroup select{border:0;background:transparent;width:110px}
.rs-filtergroup .rs-datewrap{border:0;background:transparent}
.rs-failtag{display:inline-block;font-size:11px;color:var(--danger);border:1px solid var(--danger-line);background:var(--danger-bg);border-radius:6px;padding:1px 6px;margin-top:2px}

.rs-failtag{max-width:112px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}

.rs-quick{border:1px solid var(--gold-line);background:var(--gold-bg);border-radius:11px;padding:10px 12px;margin-bottom:8px}
.rs-quick-grid{display:grid;grid-template-columns:1fr 1fr 1fr 1.2fr auto;gap:8px}
.rs-quick-grid input{font-size:12.5px;padding:6px 9px;background:var(--input)}
.rs-quick .rsq-wide{grid-column:1/4}
.rs-quick .hint{padding-top:6px}
@media (max-width:900px){.rs-quick-grid{grid-template-columns:1fr 1fr}.rs-quick .rsq-wide{grid-column:1/-1}}

.rs-nickcell{display:flex;align-items:center;gap:6px;min-width:0}
.rs-nicktext{font-size:12.5px;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}
.rs-nickcell:hover .rs-nicktext{color:var(--gold-text)}
.rs-recv{cursor:pointer;border-radius:6px;padding:2px 4px;margin:-2px -4px}
.rs-recv:hover{background:var(--surface-2)}
.rs-miss{display:inline-block;margin-top:3px;font-size:10.5px;color:var(--danger);border:1px solid var(--danger-line);background:var(--danger-bg);border-radius:5px;padding:1px 6px}
.rs-owner-sels{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.rs-own-sel{font-size:11px;padding:1px 4px;border-radius:5px;border:1px solid var(--line);background:var(--surface-2);color:var(--text-3);width:auto;max-width:110px}
.rs-own-sel:hover{border-color:var(--gold-line);color:var(--gold-text)}
.rs-edit{display:flex;flex-direction:column;gap:5px;background:var(--surface-2);border:1px solid var(--gold-line);border-radius:8px;padding:6px}
.rs-edit .rs-e1{font-size:12px;padding:4px 7px}
.rs-edit-btns{display:flex;gap:6px}
.rs-goods{cursor:pointer;border-radius:6px;padding:2px 4px;margin:-2px -4px}
.rs-goods:hover{background:var(--surface-2);color:var(--gold-text)}

.rsq-row{display:flex;gap:10px;align-items:flex-end}
.rsq-field{flex:1;display:flex;flex-direction:column;gap:4px;font-size:11.5px;color:var(--text-mute);min-width:0}
.rsq-field input{font-size:13px;padding:9px 11px;border-color:var(--gold-line);background:var(--input)}
.rsq-field input:focus{border-color:var(--gold)}
.rsq-info{flex:1.7}
.rsq-btn{padding:10px 24px;font-size:14px}
@media (max-width:900px){.rsq-row{flex-wrap:wrap}.rsq-field{flex:1 1 45%}}

/* 补发：列宽拖拽 */
#view-reship table.rs-table th{position:relative;user-select:none}
.rs-grip{position:absolute;top:0;right:-3px;width:7px;height:100%;cursor:col-resize;z-index:4}
.rs-grip::after{content:"";position:absolute;left:3px;top:22%;height:56%;width:1px;background:transparent}
#view-reship table.rs-table th:hover .rs-grip::after{background:var(--gold)}
.rs-th-drag .rs-grip::after{background:var(--gold);top:0;height:100%;width:2px;box-shadow:0 0 10px rgba(211,173,99,.75)}
.rs-dragtip{position:absolute;top:calc(100% + 6px);right:2px;z-index:20;background:var(--gold);color:#231c0e;font-size:11px;font-weight:700;padding:2px 8px;border-radius:6px;white-space:nowrap}

/* 补发：可点文字 */
.rs-click{border-radius:5px;padding:1px 3px;margin:-1px -3px;cursor:text}
.rs-click:hover{background:var(--surface-3);box-shadow:0 0 0 1px var(--line);color:var(--gold-text)}
.rs-more{padding:2px 7px;color:var(--text-3)}

/* 补发：C 版补发条（胶囊） */
.rsq-bar{display:flex;align-items:center;gap:2px;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:6px;margin-bottom:6px}
.rsq-seg{flex:1;min-width:0;display:flex;align-items:center;gap:8px;padding:0 12px;border-right:1px solid var(--line)}
.rsq-seg.f2{flex:1.7}
.rsq-seg:last-of-type{border-right:0}
.rsq-seg span{font-size:11.5px;color:var(--gold);white-space:nowrap;opacity:.9}
.rsq-seg input{flex:1;min-width:0;height:34px;border:0;background:transparent;font-size:13px;color:var(--text)}
.rsq-seg input::placeholder{color:var(--text-mute)}
.rsq-btn{height:38px;padding:0 20px;border:0;border-radius:999px;background:linear-gradient(180deg,#e7c98a,#d3ad63);color:#231c0e;font-weight:700;font-size:13px;cursor:pointer;white-space:nowrap}
.rsq-btn:hover{filter:brightness(1.06)}
.rsq-tip{font-size:11.5px;color:var(--text-mute);margin:0 10px 8px}

.rs-quick{background:transparent;border:0;padding:0;margin-bottom:8px}

.rsq-seg input:focus,.rsq-seg input:active{border:0;background:transparent;box-shadow:none;outline:0}
.rsq-seg:focus-within{background:rgba(211,173,99,.06);border-radius:999px}

.rs-raw{white-space:normal;word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;cursor:pointer;border-radius:6px;padding:2px 4px;margin:-2px -4px}
.rs-raw.open{display:block;-webkit-line-clamp:unset}
.rs-raw:hover{background:var(--surface-2)}
.rs-more-raw{display:inline-block;font-size:11px;color:var(--gold-text);cursor:pointer;margin-top:2px;padding:0 2px}
.rs-more-raw:hover{text-decoration:underline}
.rs-detail-txt{font-size:11.5px;color:var(--text-3);margin-top:3px}

.rs-e2{width:100%;min-height:64px;background:var(--input);border:1px solid var(--line);border-radius:6px;color:var(--text);font:inherit;font-size:12.5px;padding:7px;resize:vertical}
.rs-e2:focus{outline:0;border-color:var(--gold)}

.rs-own-chip{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;color:var(--text-2);background:var(--surface-2);border:1px solid var(--line);border-radius:999px;padding:2px 4px 2px 9px}
.rs-own-chip .rs-own-sel{border-radius:999px;max-width:96px}

/* 来源行内下拉 */
.rs-src-sel{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;border-radius:7px;color:var(--text-2);font:inherit;font-size:12.5px;padding:3px 18px 3px 6px;cursor:pointer;
  background-image:linear-gradient(45deg,transparent 50%,var(--text-3) 50%),linear-gradient(135deg,var(--text-3) 50%,transparent 50%);
  background-position:calc(100% - 10px) 52%,calc(100% - 6px) 52%;background-size:4px 4px,4px 4px;background-repeat:no-repeat}
.rs-src-sel:hover{border-color:var(--line);background-color:var(--surface-2);color:var(--gold-text)}
.rs-src-sel:focus{outline:0;border-color:var(--gold);background-color:var(--surface-2);color:var(--gold-text)}

/* 图片列 */
.rs-pics{display:flex;gap:5px;align-items:center;flex-wrap:nowrap}
.rs-pics.open{flex-wrap:wrap}
.rs-picwrap{position:relative;display:inline-block;flex:none}
.rs-pic{width:44px;height:44px;border-radius:7px;border:1px solid var(--line);object-fit:cover;display:block;cursor:zoom-in;background:#f0f2f5}
.rs-picwrap:hover .rs-pic{border-color:var(--gold)}
.rs-zoom{display:none;position:absolute;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%);z-index:30;text-align:center}
.rs-picwrap:hover .rs-zoom{display:block}
.rs-zoom img{width:180px;height:180px;object-fit:cover;border-radius:10px;border:1px solid var(--gold-line);box-shadow:0 24px 50px -18px rgba(20,26,33,.28);display:block}
.rs-zoomcp{margin-top:6px;border:0;border-radius:999px;background:linear-gradient(180deg,#e7c98a,#d3ad63);color:#231c0e;font-size:11.5px;font-weight:700;padding:3px 12px;cursor:pointer}
.rs-picadd{width:44px;height:44px;border-radius:7px;border:1px dashed var(--gold-line);background:rgba(211,173,99,.05);color:var(--gold-text);display:grid;place-items:center;font-size:17px;cursor:pointer;flex:none}
.rs-picadd:hover{background:rgba(211,173,99,.12);border-color:var(--gold)}
.rs-picmore{width:44px;height:44px;border-radius:7px;border:1px solid var(--line);background:var(--surface-2);color:var(--text-2);display:grid;place-items:center;font-size:12px;cursor:pointer;flex:none}
.rs-picmore:hover{border-color:var(--gold);color:var(--gold-text)}

/* 图片悬停放大：全局浮层，不被表格裁切 */
.rs-zoomtip{position:fixed;z-index:9999;display:none;background:var(--surface);border:1px solid var(--gold-line);border-radius:12px;padding:8px;box-shadow:0 24px 60px -20px #000;text-align:center}
.rs-zoomtip img{width:200px;height:200px;object-fit:cover;border-radius:8px;display:block;background:#f0f2f5}
.rs-zoomtip button{margin-top:7px;border:0;border-radius:999px;background:linear-gradient(180deg,#e7c98a,#d3ad63);color:#231c0e;font-size:11.5px;font-weight:700;padding:4px 14px;cursor:pointer}

/* 放大预览再大一点 */
.rs-zoomtip{padding:10px}
.rs-zoomtip img{width:min(380px,42vw);height:min(380px,42vw)}
.rs-zoomtip button{font-size:12.5px;padding:6px 18px;margin-top:8px}

.rs-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 4px 2px}
.rs-pg-btns{display:flex;align-items:center;gap:8px}
.rs-pg-now{min-width:28px;text-align:center;font-size:12.5px;color:var(--text-2)}
.rs-pg-size{font-size:12px;padding:3px 6px;border-radius:7px;width:auto}

/* ================= 维修（repair） ================= */
#view-repair { max-width: none; }
.rp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 18px 0 10px; }
.rp-head h1 { margin: 0; font-size: 19px; display: flex; align-items: center; gap: 10px; }
.rp-k { font-size: 11px; font-weight: 500; color: var(--text-mute); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.rp-head p { margin: 4px 0 0; font-size: 12px; }
.rp-acts { display: flex; gap: 8px; align-items: center; }

.rp-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); }
.rp-tab { position: relative; padding: 9px 13px 10px; color: var(--text-3); font-size: 13px; display: flex; align-items: center; gap: 6px; border: 0; background: transparent; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; font-family: inherit; }
.rp-tab b { font-weight: 600; font-size: 11px; color: var(--text-mute); background: var(--surface-2); border-radius: 8px; padding: 1px 6px; min-width: 18px; text-align: center; }
.rp-tab.on { color: var(--gold-text); border-bottom-color: var(--gold); }
.rp-tab.on b { background: var(--gold-bg); color: var(--gold-text); }
.rp-tab.warn b { background: var(--danger-bg); color: var(--danger); }

.rp-filters { display: flex; align-items: center; gap: 10px; padding: 12px 0; flex-wrap: wrap; }
.rp-fgroup { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--input); border-radius: 9px; padding: 3px 3px 3px 10px; height: 34px; }
.rp-fgroup .rp-lab { color: var(--text-mute); font-size: 12px; }
.rp-fgroup input[type=date] { background: transparent; border: 0; color: var(--text-2); font-family: inherit; font-size: 12px; width: 118px; outline: none; }
.rp-sep { color: var(--text-mute); font-size: 11px; }
.rp-fsel { height: 34px; border: 1px solid var(--line); background: var(--input); border-radius: 9px; color: var(--text-2); font-family: inherit; font-size: 12px; padding: 0 8px; }
.rp-fcheck { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--text-2); font-size: 12px; background: var(--input); }
.rp-search { flex: 1; max-width: 300px; height: 34px; border: 1px solid var(--line); background: var(--input); border-radius: 9px; display: flex; align-items: center; padding: 0 4px 0 10px; }
.rp-search input { flex: 1; background: transparent; border: 0; outline: none; color: var(--text); font-family: inherit; font-size: 12.5px; }
.rp-qbtn { width: 26px; height: 26px; border: 0; border-radius: 6px; background: var(--surface-2); color: var(--text-3); cursor: pointer; }
.rp-hint { margin-left: auto; color: var(--text-mute); font-size: 11.5px; }

.rp-tablewrap { flex: 1; min-height: 0; border: 1px solid var(--line-2); border-radius: 12px; overflow: auto; background: var(--surface); }
.rp-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.rp-table thead th { height: 36px; background: var(--surface-3); color: var(--text-3); font-weight: 500; font-size: 11.5px; text-align: left; padding: 0 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 2; }
.rp-table tbody td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; font-size: 12.5px; color: var(--text-2); }
.rp-table tbody tr:hover { background: var(--surface-2); }
.rp-table tbody tr.late { background: linear-gradient(90deg, rgba(226,119,111,.07), transparent 45%); }
.rp-empty { text-align: center; color: var(--text-mute); padding: 40px 0 !important; }

.rp-chip { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; background: var(--surface-2); color: var(--text-3); }
.rp-chip.wait { color: #8fa6bd; background: #1a232c; border-color: #26333f; }
.rp-chip.fix { color: var(--blue); background: var(--blue-bg); border-color: #22405c; }
.rp-chip.back { color: var(--gold-text); background: var(--gold-bg); border-color: var(--gold-line); }
.rp-chip.done { color: var(--ok); background: var(--ok-bg); border-color: #22483a; }
.rp-chip.bad { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-line); }
.rp-chip.guar { color: var(--ok); background: var(--ok-bg); border-color: #22483a; }
.rp-chip.shop { color: var(--blue); background: var(--blue-bg); border-color: #22405c; }
.rp-chip.plast { color: var(--teal, #63c6bd); background: #122a29; border-color: #234b48; }
.rp-stsel { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.rp-caret { color: var(--text-mute); font-size: 9px; }
.rp-cell-time { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.rp-cell-time small { display: block; font-size: 10px; color: var(--text-mute); }
.rp-cell-no { cursor: pointer; }
.rp-cell-no b { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--text); font-weight: 600; word-break: break-all; }
.rp-cell-no small { font-size: 10px; color: var(--text-mute); }
.rp-cell-cust { cursor: pointer; }
.rp-c1 { display: flex; gap: 6px; align-items: baseline; }
.rp-name { color: var(--text); font-weight: 600; font-size: 12.5px; }
.rp-tel { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); }
.rp-ad { color: var(--text-mute); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-cell-goods { cursor: pointer; }
.rp-gline { display: flex; gap: 6px; align-items: baseline; padding: 1px 0; }
.rp-gline:hover .rp-mdl { color: var(--gold-text); }
.rp-mdl { font-weight: 600; color: var(--text); font-size: 12px; white-space: nowrap; }
.rp-pr { color: var(--text-2); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-q { font-family: var(--mono); font-size: 10.5px; color: var(--text-mute); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.rp-none { color: var(--text-mute); font-size: 11.5px; }
.rp-table td small { display: block; font-size: 10px; color: var(--text-mute); }
.rp-due b { font-family: var(--mono); font-size: 12px; color: var(--text); }
.rp-due.now b { color: var(--gold-text); }
.rp-due.late b, .rp-due.late small { color: var(--danger); }
.rp-cell-fee { cursor: pointer; }
.rp-cell-fee b { font-family: var(--mono); color: var(--text); }
.rp-ops { text-align: right; white-space: nowrap; }
.rp-foot { padding: 10px 2px; color: var(--text-mute); font-size: 11.5px; }

.rp-edit { background: var(--input); border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.rp-inp { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--text); font-family: inherit; font-size: 12px; padding: 4px 6px; outline: none; }
.rp-inp:focus { border-color: var(--gold-line); }
.rp-acts2 { display: flex; gap: 4px; margin-top: 5px; }
.rp-feegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.rp-feegrid label { font-size: 10px; color: var(--text-mute); }

.rp-mask { position: fixed; inset: 0; background: rgba(20,26,33,.45); z-index: 40; }
.rp-drawer { position: fixed; top: 0; right: 0; width: 620px; max-width: 96vw; height: 100vh; background: var(--bg-2); border-left: 1px solid var(--line); box-shadow: -30px 0 60px -20px rgba(0,0,0,.8); z-index: 41; display: flex; flex-direction: column; }
.rp-dhead { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line-2); }
.rp-chip2 { font-size: 11.5px; color: var(--text-3); }
.rp-x { margin-left: auto; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: transparent; color: var(--text-3); cursor: pointer; font-size: 15px; }
.rp-dtitle { padding: 10px 16px 0; font-size: 17px; font-weight: 650; }
.rp-dtitle span { font-family: var(--mono); font-size: 12px; color: var(--text-3); font-weight: 400; }
.rp-dsub { padding: 3px 16px 10px; color: var(--text-mute); font-size: 11.5px; }
.rp-dbody { flex: 1; overflow: auto; padding: 0 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.rp-card { background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.rp-card h4 { margin: 0 0 6px; font-size: 11px; color: var(--text-mute); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.rp-card h4 .btn { margin-left: auto; }
.rp-addr { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.rp-note { margin-top: 6px; font-size: 11.5px; color: var(--gold-text); background: var(--gold-bg); border: 1px solid var(--gold-line); border-radius: 6px; padding: 4px 7px; }
.rp-ships { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rp-ship { border: 1px dashed var(--line); border-radius: 8px; padding: 7px 9px; background: var(--input); }
.rp-ship .t { font-size: 10.5px; color: var(--text-mute); }
.rp-ship .n { font-family: var(--mono); font-size: 12px; color: var(--text); word-break: break-all; }
.rp-ship .s { font-size: 10.5px; color: var(--text-mute); }
.rp-ship.todo { border-color: var(--gold-line); background: #221c11; }
.rp-ship.todo .n { color: var(--gold-text); }
.rp-item { border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 9px; background: var(--input); margin-bottom: 6px; }
.rp-ihead { display: flex; align-items: center; gap: 7px; }
.rp-idx { width: 16px; height: 16px; border-radius: 4px; background: var(--surface-3); color: var(--text-3); font-size: 10px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); }
.rp-iprob { color: var(--text-2); font-size: 11.5px; margin-left: auto; text-align: right; }
.rp-imeta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; font-size: 11px; color: var(--text-mute); }
.rp-imeta b { color: var(--text-2); font-weight: 600; }
.rp-imeta b.w-in { color: var(--ok); }
.rp-imeta b.w-shop { color: var(--blue); }
.rp-imeta b.w-over { color: var(--danger); }
.rp-imgs { display: flex; align-items: center; gap: 4px; margin-top: 7px; flex-wrap: wrap; }
.rp-imglabel { font-size: 10px; color: var(--text-mute); }
.rp-thumb { width: 34px; height: 34px; border-radius: 5px; object-fit: cover; border: 1px solid #333b44; cursor: pointer; }
.rp-thumb.ok { border-color: #2f5a46; }
.rp-addimg { width: 34px; height: 34px; border-radius: 5px; border: 1px dashed #3a434d; color: var(--text-mute); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; }
.rp-tl .e { display: grid; grid-template-columns: 14px 1fr; gap: 8px; padding: 4px 0; font-size: 11.5px; color: var(--text-2); }
.rp-tl .e i { width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--line); margin-top: 4px; }
.rp-tl .e:first-child i { border-color: var(--gold); background: var(--gold); }
.rp-tl .t { color: var(--text-mute); font-family: var(--mono); font-size: 10px; margin-left: 6px; }
.rp-dfoot { padding: 10px 16px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; background: #121519; }
.rp-dfoot .primary { margin-left: auto; }

.rp-modal-card { max-width: 760px; width: 92vw; max-height: 88vh; overflow: auto; }
.rp-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.rp-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-3); }
.rp-form label.full { grid-column: 1 / -1; }
.rp-form input, .rp-form textarea, .rp-form select { background: var(--input); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-family: inherit; font-size: 13px; padding: 7px 9px; outline: none; }
.rp-block { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; font-size: 12px; color: var(--text-3); }
.rp-block input { background: var(--input); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: 13px; padding: 7px 9px; }
.rp-mini { font-size: 10.5px; color: var(--text-mute); }
.rp-paste { margin-top: 12px; padding: 10px; border: 1px dashed var(--line); border-radius: 9px; }
.rp-paste-t { font-size: 11.5px; color: var(--text-3); margin-bottom: 6px; }
.rp-paste textarea { width: 100%; background: var(--input); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-family: inherit; font-size: 12.5px; padding: 7px 9px; }
.rp-h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 16px 0 8px; }
.rp-rt { width: 100%; border-collapse: collapse; }
.rp-rt th { text-align: left; font-size: 10.5px; color: var(--text-mute); font-weight: 500; padding: 0 4px 5px; }
.rp-rt td { padding: 3px 4px; }
.rp-check { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--text-2); }
.rp-hol { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.rp-hol input { flex: 1; }

.rp-card h4 .btn { padding: 2px 8px; font-size: 11px; border-radius: 6px; }
.rp-item .btn.small { padding: 2px 8px; font-size: 11px; }

/* 日期框：整块可点，点哪都弹日历（跟补发表一致） */
.rp-date{position:relative;display:inline-flex;align-items:center;height:30px;min-width:120px;padding:0 7px;border:1px solid var(--line);border-radius:7px;background:var(--input);cursor:pointer}
.rp-date>span{font-size:12px;color:var(--text-mute);pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rp-date.filled>span{color:var(--text-2)}
.rp-date>input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;border:0;background:transparent}
.rp-fgroup .rp-date{height:26px;min-width:108px;border-color:transparent;background:transparent}
.rp-dates{display:flex;gap:8px;flex-wrap:wrap;margin-top:7px}
.rp-dates .rp-date{height:32px;min-width:150px}
.rp-edit input,.rp-edit textarea,.rp-edit select{max-width:100%;box-sizing:border-box}

/* 日期框：输入框透明铺满、整块接管点击（Edge 下点文字也能弹日历） */
.rp-date>input{pointer-events:none}
.rp-form .rp-date{height:38px;min-width:0;width:100%;padding:0 9px;border-radius:8px}
.rp-form .rp-date>span{font-size:13px}
.rp-edit .rp-date{width:100%;min-width:0;height:28px}

/* 赔付 / 运费 */
.rp-comp b{font-family:var(--mono);font-size:12px;color:var(--text-mute);font-weight:600}
.rp-comp small{display:block;font-size:10px;color:var(--text-mute)}
.rp-comp.bad b{color:var(--danger)}
.rp-comp.bad small{color:var(--danger)}
.rp-compval{color:var(--danger);font-weight:600}
.rp-fee-ships{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.rp-fee-ship{border:1px solid var(--line);border-radius:9px;padding:8px 9px;background:var(--input)}
.rp-fee-ship .t{font-size:11px;color:var(--text-mute);margin-bottom:5px}
.rp-fee-ship .l{display:flex;gap:6px}
.rp-fee-ship input{width:96px;background:var(--surface);border:1px solid var(--line);border-radius:7px;color:var(--text);padding:6px 8px;font-size:13px}
.rp-fee-ship select{flex:1;background:var(--surface);border:1px solid var(--line);border-radius:7px;color:var(--text-2);padding:6px 8px;font-size:12px;font-family:inherit}

.rp-ver{display:inline-block;margin-left:8px;font-family:var(--mono);font-size:10.5px;color:var(--text-mute);border:1px solid var(--line);border-radius:5px;padding:0 5px;vertical-align:1px}

/* 认领 */
.rp-claimbox{display:flex;align-items:center;gap:12px;border:1px solid var(--danger-line);background:linear-gradient(180deg,#2a1a19,#1d1514);border-radius:10px;padding:11px 12px}
.rp-claimbox .ic{width:34px;height:34px;border-radius:50%;background:var(--danger-bg);border:1px solid var(--danger-line);color:var(--danger);display:flex;align-items:center;justify-content:center;font-weight:700;flex:none}
.rp-claimbox .tx{flex:1;min-width:0}
.rp-claimbox .tx b{display:block;color:#f0c0bb;font-size:13px}
.rp-claimbox .tx span{font-size:11px;color:#c99490}
.rp-claimdone{border:1px solid #22483a;background:#15251d;border-radius:9px;padding:8px 11px;font-size:12px;color:var(--ok)}
.rp-claimdone b{color:#bfe6cf}
.rp-claimdone .btn{margin-left:8px}
.rp-own{display:flex;flex-direction:column;gap:1px}
.rp-own b{font-size:12px;color:var(--text)}
.rp-own small{font-size:10px;color:var(--text-mute);font-family:var(--mono)}
.rp-ownnone{display:inline-block;font-size:11px;font-weight:600;color:var(--danger);background:var(--danger-bg);border:1px solid var(--danger-line);border-radius:6px;padding:1px 6px;white-space:nowrap}
.rp-ownnone.soft{color:#8fa6bd;background:#1a232c;border-color:#26333f}
.rp-warn{color:var(--danger)}

/* 删除确认 */
.rp-delwarn{margin:10px 0;padding:9px 11px;border:1px solid var(--danger-line);background:var(--danger-bg);color:#f0c0bb;font-size:12px;line-height:1.6;border-radius:9px}

/* 删除记录表 */
.rp-deltable{max-height:52vh;overflow:auto;border:1px solid var(--line);border-radius:9px;margin-top:10px}
.rp-deltable table{width:100%;border-collapse:collapse}
.rp-deltable th{position:sticky;top:0;background:var(--surface-3);color:var(--text-3);font-size:11px;font-weight:500;text-align:left;padding:7px 9px;border-bottom:1px solid var(--line);white-space:nowrap}
.rp-deltable td{padding:7px 9px;border-bottom:1px solid var(--line-2);font-size:12px;color:var(--text-2);vertical-align:top}
.rp-deltable td.mono{font-family:var(--mono);font-size:11.5px;color:var(--text)}
.rp-deltable td small{display:block;color:var(--text-mute);font-size:10px}

/* 列宽拖动 + 图片删除 */
.rp-table{min-width:1180px}
.rp-th{position:relative}
.rp-grip{position:absolute;top:0;right:-4px;height:100%;width:9px;cursor:col-resize;z-index:4}
.rp-grip::after{content:"";position:absolute;top:7px;bottom:7px;left:4px;width:1px;background:var(--line)}
.rp-grip:hover::after{background:var(--gold);width:2px}
body.rp-col-dragging{cursor:col-resize;user-select:none}
.rp-imgbox{position:relative;display:inline-flex}
.rp-imgx{position:absolute;top:-5px;right:-5px;width:15px;height:15px;border-radius:50%;border:1px solid #4a2a28;background:#2a1414;color:#e2776f;font-size:11px;line-height:1;padding:0;display:none;align-items:center;justify-content:center;cursor:pointer;z-index:2}
.rp-imgbox:hover .rp-imgx{display:flex}

/* 列宽拖动：加大热区，拖动时显示数值 */
.rp-table thead th{user-select:none}
.rp-grip{right:-7px;width:15px;z-index:8;touch-action:none}
.rp-grip::after{left:7px;width:2px;top:6px;bottom:6px;background:var(--line);opacity:.5}
.rp-th:hover .rp-grip::after{background:var(--gold);opacity:1}
.rp-grip:hover::after{background:var(--gold);opacity:1}
.rp-dragtip{position:absolute;top:-24px;left:50%;transform:translateX(-50%);background:var(--gold);color:#241c0c;font-size:10.5px;font-weight:600;padding:1px 6px;border-radius:4px;white-space:nowrap;z-index:9;font-family:var(--mono);pointer-events:none}

/* 一句话建单 */
.rp-quick{margin:10px 0 12px;border:1px solid var(--gold-line);background:linear-gradient(180deg,#241f14,#1a1710);border-radius:12px;padding:11px 13px}
.rp-quick-lab{display:flex;align-items:baseline;gap:10px;margin-bottom:8px}
.rp-quick-lab b{color:var(--gold-text);font-size:12.5px}
.rp-quick-lab span{color:#c9b183;font-size:11px}
.rp-quick-row{display:flex;gap:8px;align-items:center}
.rp-quick-row input{flex:1;height:40px;border:1px solid var(--gold-line);background:var(--input);border-radius:9px;padding:0 12px;color:var(--text);font-family:inherit;font-size:13px;outline:none}
.rp-quick-row input:focus{border-color:var(--gold)}
.rp-quick-img{height:40px;display:inline-flex;align-items:center;padding:0 12px;cursor:pointer}
.rp-quick-row .btn{height:40px}
.rp-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.rp-qhint{color:var(--text-mute);font-size:11px}
.rp-pchip{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 9px;border-radius:7px;font-size:11.5px;border:1px solid #22483a;background:var(--ok-bg);color:#a9d8bf;cursor:pointer}
.rp-pchip i{font-style:normal;color:#7fb79a;font-size:10.5px}
.rp-pchip b{color:var(--text);font-weight:600}
.rp-pchip.miss{border-color:var(--gold-line);background:var(--gold-bg);color:var(--gold-text);cursor:default}
.rp-pchip.miss i{color:#c9b183}
.rp-pchip.miss em{font-style:normal;color:#c9b183;font-size:10px}

/* 列表图片列 */
.rp-cell-img{white-space:nowrap}
.rp-cellimg{width:24px;height:24px;border-radius:4px;object-fit:cover;border:1px solid #333b44;margin-right:2px;cursor:zoom-in;vertical-align:middle;background:#1d2228}
.rp-cellimg.a{border-color:#2f5a46}
.rp-picmore{font-size:10px;color:var(--text-mute);margin-left:2px}
.rp-zoomtip{position:fixed;z-index:3000;background:var(--bg-2);border:1px solid var(--line);border-radius:10px;padding:8px;box-shadow:0 22px 60px -18px #000;display:flex;flex-direction:column;gap:6px;width:440px}
.rp-zoomtip img{width:100%;max-height:72vh;object-fit:contain;border-radius:6px;display:block}
.rp-zoomtip button{border:1px solid var(--line);background:var(--surface-2);color:var(--text-2);border-radius:6px;font-size:11px;padding:4px 0;cursor:pointer;font-family:inherit}
.rp-zoomtip button:hover{border-color:var(--gold-line);color:var(--gold-text)}

/* 列表图片：修前/修后 两行，可直接加图 */
.rp-imggrp{display:flex;flex-direction:column;gap:3px}
.rp-imgrow{display:flex;align-items:center;gap:2px;min-height:22px}
.rp-imgtag{font-size:9.5px;color:var(--text-mute);width:22px;flex:none}
.rp-imgtag.after{color:#7fb79a}
.rp-imgadd{width:20px;height:20px;border:1px dashed #4a525c;border-radius:4px;background:transparent;color:var(--text-mute);font-size:11px;line-height:1;cursor:pointer;padding:0;flex:none}
.rp-imgadd:hover{border-color:var(--gold-line);color:var(--gold-text)}
.rp-cellimg{width:20px;height:20px}
.rp-cell-war{cursor:pointer}

/* 操作列锁在右边，横向滚动也不跑；不许拖宽度 */
.rp-table thead th:last-child,
.rp-table tbody td:last-child{position:sticky;right:0;z-index:3;background:var(--surface)}
.rp-table thead th:last-child{z-index:6;background:var(--surface-3);box-shadow:-10px 0 14px -10px rgba(0,0,0,.75)}
.rp-table tbody td:last-child{box-shadow:-10px 0 14px -10px rgba(0,0,0,.55)}
.rp-table tbody tr:hover td:last-child{background:var(--surface-2)}
.rp-table tbody tr.late td:last-child{background:#1e1717}
.rp-table thead th:last-child .rp-grip{display:none}

/* 操作列居中 */
.rp-table thead th:last-child{text-align:center}
.rp-table tbody td.rp-ops{text-align:center}
.rp-ops{justify-content:center;display:flex;align-items:center;gap:6px}

/* 操作列贴合行背景，去掉浮动感 */
.rp-table tbody tr{background:var(--surface)}
.rp-table tbody tr:nth-child(even){background:#1c2126}
.rp-table tbody tr:hover{background:var(--surface-2)}
.rp-table tbody tr.late{background:#1f1716}
.rp-table tbody td:last-child{background:inherit;box-shadow:none}
.rp-table thead th:last-child{background:var(--surface-3);box-shadow:none}

/* B 方案：操作列回到普通单元格，不再固定 */
.rp-table thead th:last-child,
.rp-table tbody td:last-child{position:static;background:inherit;box-shadow:none}
.rp-table thead th:last-child{background:var(--surface-3)}
.rp-table tbody td:last-child{background:inherit}

/* 最终清理：操作列就是普通单元格，底色跟行一致，不要任何独立背景/阴影 */
.rp-table tbody tr{background:transparent!important}
.rp-table tbody tr:nth-child(even){background:rgba(255,255,255,.015)!important}
.rp-table tbody tr:hover{background:var(--surface-2)!important}
.rp-table tbody tr.late{background:linear-gradient(90deg,rgba(226,119,111,.07),transparent 45%)!important}
.rp-table tbody td:last-child{position:static!important;background:transparent!important;box-shadow:none!important}
.rp-table thead th:last-child{position:static!important;background:var(--surface-3)!important;box-shadow:none!important}
.rp-tablewrap{background:var(--surface)}

/* 操作列回归普通单元格：文字居中，按钮当普通内容排 */
.rp-table tbody td.rp-ops{display:table-cell!important;text-align:center!important;white-space:nowrap;vertical-align:middle}
.rp-table tbody td.rp-ops .btn{display:inline-block;vertical-align:middle;margin:0 2px}
.rp-table thead th:last-child{text-align:center!important}

/* 维修表字号放大两档（只作用于维修页，其他页面不动） */
#view-repair .rp-table thead th{font-size:14px}
#view-repair .rp-table tbody td{font-size:15.5px;padding:11px 11px}
#view-repair .rp-table tbody td small{font-size:12px}
#view-repair .rp-mdl{font-size:15px}
#view-repair .rp-pr{font-size:14.5px}
#view-repair .rp-cell-time{font-size:14px}
#view-repair .rp-cell-time small{font-size:12px}
#view-repair .rp-cell-no b{font-size:14px}
#view-repair .rp-cell-no small{font-size:12px}
#view-repair .rp-name{font-size:15px}
#view-repair .rp-tel{font-size:12.5px}
#view-repair .rp-ad{font-size:13px}
#view-repair .rp-cell-fee b{font-size:14.5px}
#view-repair .rp-due b{font-size:14.5px}
#view-repair .rp-due small{font-size:12px}
#view-repair .rp-comp b{font-size:14.5px}
#view-repair .rp-comp small{font-size:12px}
#view-repair .rp-own b{font-size:14.5px}
#view-repair .rp-own small{font-size:12px}
#view-repair .rp-ownnone{font-size:13px;padding:2px 8px}
#view-repair .rp-table .rp-chip{height:24px;padding:0 9px;font-size:13px}
#view-repair .rp-ops .btn{font-size:14px;padding:6px 13px;border-radius:8px}
#view-repair .rp-imgtag{font-size:11px;width:26px}
#view-repair .rp-imgadd{width:24px;height:24px;font-size:13px}
#view-repair .rp-cellimg{width:24px;height:24px}
#view-repair .rp-picmore{font-size:11px}
#view-repair .rp-q{font-size:12px;padding:1px 5px}
#view-repair .rp-foot{font-size:12.5px}
#view-repair .rp-hint{font-size:12px}

/* 维修：客户昵称 / 店铺名称（行内直接改） */
.rp-c2{display:flex;align-items:center;gap:6px;margin-top:3px;flex-wrap:wrap}
.rp-nicklbl,.rp-shoplbl{font-size:11px;color:var(--text-mute)}
.rp-nick{font-size:13px;color:var(--text-2);cursor:pointer;border-bottom:1px dashed transparent;padding:0 1px}
.rp-nick:hover{color:var(--text);border-bottom-color:var(--gold-line)}
.rp-shop{display:inline-flex;align-items:center;height:19px;padding:0 7px;border-radius:5px;font-size:12px;color:var(--gold-text);background:var(--gold-bg);border:1px solid var(--gold-line);cursor:pointer}
.rp-shop:hover{border-color:var(--gold)}
.rp-fieldedit{background:var(--input);border:1px solid var(--gold-line);border-radius:6px;padding:2px 6px}
.rp-fieldinp{border:0;background:transparent;color:var(--text);font-family:inherit;font-size:13px;outline:none;width:92px}

/* 质保：无保 / 手动选择 */
.rp-wbtns{display:flex;flex-direction:column;gap:3px;align-items:flex-start}
.rp-wbtns .btn{padding:2px 8px;font-size:11.5px}
.rp-chip.none{color:#a8adb4;background:#22272d;border-color:#3a4149}
.rp-wmenu{display:flex;flex-direction:column;gap:2px;margin-top:10px}
.rp-wopt{text-align:left;border:1px solid transparent;background:transparent;color:var(--text-2);padding:8px 10px;border-radius:8px;font-size:13.5px;font-family:inherit;cursor:pointer}
.rp-wopt:hover{background:var(--surface-2)}
.rp-wopt.on{background:var(--gold-bg);border-color:var(--gold-line);color:var(--gold-text);font-weight:600}
.rp-wreason{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:8px;padding-top:8px;border-top:1px dashed var(--line);font-size:12px;color:var(--text-mute)}
.rp-wreason button{border:1px solid var(--line);background:var(--input);color:var(--text-2);border-radius:6px;padding:3px 9px;font-size:12.5px;font-family:inherit;cursor:pointer}
.rp-wreason button.on{border-color:var(--gold-line);background:var(--gold-bg);color:var(--gold-text)}

/* 时间列：客户订单时间 / 工厂收货时间 */
.rp-tbox{cursor:pointer;border-radius:7px;padding:1px 2px}
.rp-tbox:hover{background:var(--surface-2)}
.rp-tline{display:flex;flex-direction:column;line-height:1.25}
.rp-tline+.rp-tline{margin-top:3px}
.rp-tline span{font-size:10.5px;color:var(--text-mute)}
.rp-tline b{font-size:12.5px;color:var(--text-2);font-weight:600;font-family:var(--mono)}
.rp-fldhint{font-style:normal;font-size:11px;color:var(--text-mute);margin-left:6px}

/* 缺信息红标 + 汇总条 */
.rp-missbar{display:flex;align-items:center;gap:7px;margin:8px 0 0;padding:8px 12px;border:1px solid var(--danger-line);background:rgba(226,119,111,.08);border-radius:9px;color:#f0c0bb;font-size:12.5px}
.rp-missbar b{color:#fff}
.rp-missbar span:first-child{font-size:13px}
.rp-cellmiss{box-shadow:inset 0 0 0 1.5px var(--danger-line)!important;background:rgba(226,119,111,.06)!important;border-radius:6px}
.rp-misstxt{color:var(--danger)!important;font-weight:600}

/* ================= 浅色主题补充（2026-11-17） ================= */
body { background: var(--bg); }
header.topbar { background: var(--bg-2); border-bottom: 1px solid var(--line); }
::selection { background: #dbe4ee; color: #1f242b; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c9ccd2; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b4b8bf; }
::-webkit-scrollbar-track { background: transparent; }
.login { background: radial-gradient(1200px 600px at 15% -10%, #ffffff 0%, rgba(255,255,255,0) 55%), var(--bg); }
.grid thead th { background: var(--surface-3); color: var(--text-2); }
.grid tbody tr:hover { background: var(--surface-2); }

/* ===== 深色专用配色 → 浅色修正（维修 / 补发 / 内部消息）2026-11-17 ===== */

/* ① 信息不全汇总条：实色红底 + 白字（老板指定） */
.rp-missbar{background:#c0392b;border-color:#a93226;color:#fff}
.rp-missbar b,
.rp-missbar span,
.rp-missbar span:first-child{color:#fff}

/* ② 删除确认警告：同样实色红底白字 */
.rp-delwarn{background:#c0392b;border-color:#a93226;color:#fff}
.rp-delwarn b{color:#fff}

/* ③ 认领 / 完成提示框 */
.rp-claimbox{background:#fdf1f0;border-color:#efc9c5}
.rp-claimbox .tx b{color:#b3524a}
.rp-claimbox .tx span{color:#a2635e}
.rp-claimdone{background:#e7f3ed;border-color:#bfe0cd;color:#2f7d5d}
.rp-claimdone b{color:#2f7d5d}
.rp-ownnone.soft{color:#5f7286;background:#eef1f4;border-color:#dfe3e8}

/* ④ 一句话建单 */
.rp-quick{background:#fbf7ee;border-color:#e6d3ae}
.rp-quick-lab span{color:#8a6418}
.rp-quick-row input{background:#fff}

/* ⑤ 状态小胶囊（原来用 --blue 等深色变量）*/
.rp-chip.wait{color:#5f7286;background:#eef1f4;border-color:#dfe3e8}
.rp-chip.fix,
.rp-chip.shop{color:#3f6c8e;background:#eaf1f6;border-color:#c9d9e6}
.rp-chip.done,
.rp-chip.guar{color:#2f7d5d;background:#e7f3ed;border-color:#bfe0cd}
.rp-chip.plast{color:#2f6f68;background:#e6f4f2;border-color:#bfe0da}
.rp-chip.none{color:#6f7783;background:#f4f6f8;border-color:#dfe3e8}

/* ⑥ 发货块 / 抽屉底栏 / 表格行 */
.rp-ship.todo{border-color:#e6d3ae;background:#fbf2e2}
.rp-thumb{border-color:#d4d7dd}
.rp-thumb.ok{border-color:#bfe0cd}
.rp-addimg{border-color:#c9ccd2}
.rp-dfoot{background:#f4f6f8}
.rp-table tbody tr:nth-child(even){background:#f7f9fa}
.rp-table tbody tr.late{background:#fdf1f0}
.rp-table tbody tr.late td:last-child{background:#fbe6e4}
.rp-table thead th:last-child{box-shadow:-10px 0 14px -10px rgba(30,36,44,.18)}
.rp-table tbody td:last-child{box-shadow:none}

/* ⑦ 图片相关 */
.rp-cellimg{border-color:#d4d7dd;background:#f4f6f8}
.rp-cellimg.a{border-color:#bfe0cd}
.rp-imgtag.after{color:#2f7d5d}
.rp-imgx{border-color:#e0b7b3;background:#fdf1f0;color:#b3524a}
.rp-misstxt{color:#b3524a!important}
.rp-cellmiss{background:#fdf1f0!important;box-shadow:inset 0 0 0 1.5px #e0b7b3!important}

/* ⑧ 补发模块的状态胶囊 */
.rs-owner.warehouse{color:#3f6c8e;border-color:#c9d9e6;background:#eaf1f6}
.rs-owner.shop{color:#2f7d5d;border-color:#bfe0cd;background:#e7f3ed}
.rs-owner.factory{color:#8a6418;border-color:#e6d3ae;background:#fbf2e2}
.rs-pill.ready{color:#3f6c8e;border-color:#c9d9e6;background:#eaf1f6}
.rs-pill.shipped{color:#2f7d5d;border-color:#bfe0cd;background:#e7f3ed}
.rs-tn:hover{border-color:#c9ccd2}
.rs-tn-box.ok .rs-tn{border-color:#bfe0cd}

/* ⑨ 内部消息气泡（自己的消息） */
.im-bubble.me{color:var(--text)}

/* ⑩ 图片槽右上角按钮：加半透明深底，任何图片上都看得清 */
.img-slot-ops .mini-btn{color:#fff;background:rgba(0,0,0,.45);border-radius:4px;padding:0 4px}
.img-slot-ops .mini-btn:hover{background:rgba(0,0,0,.65);color:#fff}

/* ⑪ 其他浅色下的对比度小修 */
.btn:hover{border-color:#c9ccd2}
.badge,.thread .tcount{color:#fff}
.toast.ok{border-color:#bfe0cd}
.pill.warn{border-color:#e6d3ae}
.rp-zoomtip{box-shadow:0 22px 60px -18px rgba(30,36,44,.25)}

/* ⑫ 表格表头 & 次要文字加深（2026-11-17 第二轮） */
.rs-table thead th{color:var(--text);font-weight:600}
.rp-table thead th{color:var(--text);font-weight:600}
.grid thead th{color:var(--text)}
.rs-table tbody td{color:var(--text)}
.rs-addr,.rs-time,.rs-src-sub,.rs-none,.rs-foot,.rs-empty,.rs-goods .rs-qty{color:var(--text-3)}
.rs-tn::placeholder,.rs-dt::placeholder{color:var(--text-3)}
.rs-detail-txt,.rs-dw-sub,.rs-maprow,.rs-draft-card{color:var(--text-2)}
.rs-tab{color:var(--text-2)}
.rs-tab b{color:var(--text-3)}
.rs-pill{color:var(--text-2)}
.rs-more{color:var(--text-2)}

/* ================= 审计日志 ================= */
#admin-tabs { margin: 4px 0 14px; }
.audit-tools { display: flex; gap: 10px; align-items: center; margin: 4px 0 12px; flex-wrap: wrap; }
.audit-tools .cs-search { max-width: 320px; flex: 1 1 220px; }
.audit-wrap { max-height: 62vh; overflow: auto; }
.audit-grid th { position: sticky; top: 0; z-index: 1; }
.audit-grid td { font-size: 12.5px; vertical-align: top; }
.audit-time { color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.audit-ip { color: var(--text-3); font-family: var(--mono); font-size: 11.5px; white-space: nowrap; }
.audit-detail { color: var(--text-2); overflow-wrap: anywhere; }
.audit-badge {
  display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2);
  white-space: nowrap;
}
.audit-badge.bad { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }
.audit-foot { display: flex; gap: 10px; align-items: center; margin-top: 10px; }

/* ================= 侧边栏布局（2026-11-20） =================
   参考 8800：电脑端固定左侧 224px，手机端变抽屉（☰ 打开、点遮罩/菜单项关闭）
   顶部菜单模式 = 旧布局，可用「⇤ 顶部栏 / ☰ 侧边栏」按钮随时切回
   ============================================================ */

/* 默认（顶部模式）下这些新元素都不显示 → 保持原样 */
.icon-btn { display: none; }
.side-brand { display: none; }
.nav-scrim { display: none; }

/* 汉堡三横线 */
.icon-btn {
  width: 34px; height: 34px; flex: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--text-2);
  align-items: center; justify-content: center; flex-direction: column; gap: 3px;
  padding: 0;
}
.icon-btn span { display: block; width: 15px; height: 2px; border-radius: 2px; background: currentColor; }
.icon-btn:hover { background: var(--surface-2); }

/* ---------- 侧边栏模式（body.layout-side）---------- */
body.layout-side .icon-btn { display: inline-flex; }
body.layout-side .topbar .brand.small { display: none; }
body.layout-side .side-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 6px 14px; margin: 0 0 6px;
  border-bottom: 1px solid var(--line);
}
body.layout-side .side-brand .brand-mark { width: 34px; height: 34px; font-size: 16px; border-radius: 9px; }
body.layout-side .side-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
body.layout-side .side-brand-text strong { font-size: 14.5px; }
body.layout-side .side-brand-text span { font-size: 9.5px; letter-spacing: .16em; color: var(--text-mute); }

body.layout-side nav.tabs {
  position: fixed; left: 0; top: 0; bottom: 0; width: 224px;
  flex-direction: column; align-items: stretch; gap: 2px;
  overflow-y: auto; overflow-x: hidden;
  padding: 14px 10px; background: var(--bg-2);
  border-right: 1px solid var(--line); z-index: 60;
  flex: none;
}
body.layout-side nav.tabs::-webkit-scrollbar { width: 6px; }
body.layout-side .tab {
  width: 100%; text-align: left; border-radius: 9px;
  padding: 9px 12px; font-size: 14px;
  display: flex; align-items: center; gap: 8px;
}
body.layout-side .tab.active { background: var(--surface-3); color: var(--accent); font-weight: 600; }
body.layout-side .tab .badge { margin-left: auto; }

body.layout-side .topbar {
  position: sticky; top: 0; left: 0; right: auto;
  margin-left: 224px; height: 56px; z-index: 50;
  padding: 0 18px; gap: 12px;
}
body.layout-side main { margin-left: 224px; padding: 20px 20px 40px; }
body.layout-side main .view { max-width: none; }

/* 侧边栏模式下表格吸顶避开顶栏 */
body.layout-side .grid thead th,
body.layout-side .audit-grid th,
body.layout-side .rs-table thead th,
body.layout-side .rp-table thead th { top: 56px; }

/* 手机上侧栏品牌保守显示 */
@media (max-width: 900px) {
  body.layout-side .side-brand { display: flex; }
  body.layout-side .topbar .brand.small { display: flex; }
  body.layout-side nav.tabs {
    transform: translateX(-100%);
    transition: transform .22s ease;
    width: min(78vw, 280px);
    box-shadow: 0 12px 40px -12px rgba(20, 26, 33, .35);
  }
  body.layout-side.nav-open nav.tabs { transform: none; }
  body.layout-side .topbar {
    margin-left: 0; height: 52px; padding: 0 12px; gap: 8px;
  }
  body.layout-side main { margin-left: 0; padding: 14px 12px 30px; }
  body.layout-side .topbar .userbox .who { display: none; }
  body.layout-side .topbar .vision-badge { display: none; }
  body.layout-side.nav-open .nav-scrim {
    display: block; position: fixed; inset: 0;
    background: rgba(20, 26, 33, .38); z-index: 45;
  }
  body.layout-side .grid thead th,
  body.layout-side .audit-grid th,
  body.layout-side .rs-table thead th,
  body.layout-side .rp-table thead th { top: 52px; }
}

/* 切回顶部模式时手机端隐藏侧栏专属元素 */
@media (max-width: 900px) {
  body.layout-top .side-brand { display: none; }
  body.layout-top .icon-btn { display: none; }
}

/* ================= 手机端适配（2026-11-20 补） ================= */
@media (min-width: 901px) {
  body.layout-side .icon-btn { display: none; }
}
@media (max-width: 900px) {
  body.layout-side .icon-btn { display: inline-flex; }
  body.layout-top .icon-btn { display: none; }

  /* 聊天区头部不再挤成一列 */
  .chat-head { flex-wrap: wrap; gap: 8px; align-items: center; }
  .chat-head > div:first-child { flex: 1 1 100%; min-width: 0; }
  .chat-head h2 { font-size: 17px; line-height: 1.35; }
  .chat-head .muted { font-size: 12px; line-height: 1.5; }
  .chat-head .usage-line { flex: 1 1 100%; order: 5; justify-content: flex-start; font-size: 11.5px; }
  .chat-head > .btn { flex: 0 0 auto; }
  .chat-wrap { min-height: calc(100vh - 200px); }

  /* 顶部工具条 / 分段控件：可横向滑动，不换行挤成一坨 */
  .segmented { display: flex; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .segmented::-webkit-scrollbar { display: none; }
  .segmented .seg { flex: 0 0 auto; }
  .files-head, .ops-block-head, .todo-head, .cs-tools, .admin-head {
    flex-wrap: wrap; gap: 8px; align-items: center;
  }

  /* 表格：横向滚动，不要把页面撑爆 */
  .table-wrap, .audit-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* 卡片 / 统计 */
  .stat-cards { gap: 8px; }
  .stat { min-width: 92px; padding: 9px 11px; }
  .prod-grid { grid-template-columns: 1fr !important; }

  /* 弹窗 / 输入 */
  .modal-card { width: 96vw !important; max-width: 96vw !important; max-height: 90vh; padding: 16px; }
  .composer textarea { font-size: 14px; }
  .todo-form { flex-wrap: wrap; }
  .inline-form { flex-wrap: wrap; }
}

@media (max-width: 420px) {
  body.layout-side main { padding: 10px 10px 26px; }
  .chat-head h2 { font-size: 16px; }
  .usage-line { display: none; }
  .composer .btn { padding: 9px 16px; }
}

/* ===== 侧栏抽屉底部按钮（2026-11-20） ===== */
.nav-foot { display: none; }
.nav-foot-btn {
  width: 100%; text-align: left; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--text-2);
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 9px; padding: 9px 12px;
}
.nav-foot-btn:hover { background: var(--surface-2); }
.bubble b { color: var(--text); }

@media (max-width: 900px) {
  .topbar #nav-reset, .topbar .nav-reset { display: none !important; }
  body.layout-side .nav-foot {
    display: flex; flex-direction: column; gap: 6px;
    margin-top: auto; padding-top: 10px;
    border-top: 1px solid var(--line);
  }
  body.layout-side #btn-layout { display: none; }
  .hide-mobile { display: none !important; }
}


/* 2026-11-20 侧栏布局修正：顶部栏移到左侧后，表格 .table-wrap/.rs-tablewrap 本身就是滚动容器，
   表头再 top:56px 会被顶下去盖住第一行。这里把吸顶偏移改回容器顶部 0。 */
body.layout-side .grid thead th,
body.layout-side .audit-grid th,
body.layout-side .rs-table thead th,
body.layout-side .rp-table thead th { top: 0; }
@media (max-width: 900px) {
  body.layout-side .grid thead th,
  body.layout-side .audit-grid th,
  body.layout-side .rs-table thead th,
  body.layout-side .rp-table thead th { top: 0; }
}

/* ---------- 侧栏模式修正（顶栏宽度 / 横向溢出 / 吸顶） ---------- */
body.layout-side { overflow-x: hidden; }
body.layout-side #app { min-height: 100vh; }
body.layout-side .topbar {
  width: calc(100% - 224px);
  box-sizing: border-box;
  margin-left: 224px;
  left: auto;
  right: 0;
  overflow: hidden;
}
body.layout-side .topbar .userbox { margin-left: auto; flex: 0 0 auto; gap: 8px; }
body.layout-side .topbar .userbox .btn,
body.layout-side .topbar .userbox .who { white-space: nowrap; }
body.layout-side main { width: auto; max-width: none; }
body.layout-side .view { max-width: none; width: auto; }
body.layout-side .rs-tablewrap,
body.layout-side .rp-tablewrap { max-width: none; }
/* 小屏时顶栏铺满 */
@media (max-width: 900px) {
  body.layout-side .topbar { width: 100%; margin-left: 0; }
}

/* ---------- 侧栏模式：固定顶栏 + 固定侧栏（彻底避免重叠/裁切） ---------- */
body.layout-side { padding-top: 0; }
body.layout-side .topbar {
  position: fixed !important;
  top: 0; left: 224px; right: 0;
  width: auto !important;
  margin: 0 !important;
  height: 56px;
  box-sizing: border-box;
  padding: 0 18px;
  z-index: 70;
  overflow: visible;
}
body.layout-side nav.tabs {
  top: 0 !important; bottom: 0 !important; height: 100vh;
  z-index: 80;
}
body.layout-side main {
  margin-left: 224px !important;
  padding: 72px 20px 44px !important;
  width: auto;
}
body.layout-side main .view { max-width: none; width: auto; }
/* 页签条 / 筛选条不要吸顶，避免和顶栏叠在一起 */
body.layout-side #view-reship .rs-tabs,
body.layout-side #view-repair .rp-tabs,
body.layout-side #view-express .ex-tabs {
  position: static !important; top: auto !important;
  padding-top: 2px;
}
body.layout-side #view-reship .rs-filters { flex-wrap: wrap; row-gap: 8px; }
@media (max-width: 900px) {
  body.layout-side .topbar { left: 0; right: 0; width: 100% !important; }
  body.layout-side main { margin-left: 0 !important; padding: 66px 12px 30px !important; }
}
