/* ============================================================
   吴师傅咸鱼翻生工作台 · UI
   深空 / 霓虹 / 扫描光带
   ============================================================ */

:root {
  --bg-0: #0a0605;
  --bg-1: #100907;
  --panel: rgba(26, 15, 12, 0.80);
  --panel-2: rgba(33, 19, 16, 0.92);
  --line: rgba(255, 138, 112, 0.16);
  --line-strong: rgba(255, 138, 112, 0.38);
  --accent: #ff7a5c;
  --accent-dim: #c25f42;
  --gold: #ffd166;
  --gold-dim: #c99e35;
  --text: #f6e9e3;
  --text-dim: #bda49b;
  --text-mute: #8f736a;
  --ok: #2ee6a8;
  --warn: #ffc24b;
  --danger: #ff5c7a;
  --radius: 14px;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* 必须在所有 display 规则之前并加 !important：
   .modal/.center-page 里的 display:flex 会覆盖 [hidden] 的默认 display:none */
[hidden] { display: none !important; }

html, body { height: 100%; }

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

/* ---------- 背景层：星云 + 网格 ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(920px 620px at 14% -12%, rgba(255, 122, 92, 0.16), transparent 62%),
    radial-gradient(820px 520px at 90% 6%, rgba(255, 209, 102, 0.10), transparent 64%),
    radial-gradient(760px 720px at 52% 112%, rgba(255, 96, 140, 0.12), transparent 62%),
    linear-gradient(180deg, #0a0605 0%, #120a07 46%, #0a0605 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 138, 112, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 138, 112, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 35%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 35%, transparent 78%);
  animation: gridDrift 26s linear infinite;
}

@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 44px 44px, 44px 44px; }
}

/* ---------- 排版 ---------- */
h1 { font-size: 21px; font-weight: 600; margin: 0 0 6px; letter-spacing: 0.5px; }
h2 { font-size: 15px; font-weight: 600; margin: 0; letter-spacing: 1.2px; color: var(--text); }
h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; letter-spacing: 0.5px; }

.muted { color: var(--text-dim); font-size: 13px; }
.small { font-size: 12.5px; line-height: 1.65; }
.err { color: var(--danger) !important; }
.ok { color: var(--ok) !important; }

/* ---------- 布局 ---------- */
.center-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------- 面板（核心视觉） ---------- */
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  box-shadow:
    0 0 0 1px rgba(255, 122, 92, 0.04),
    0 18px 50px -24px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* 四角科技括号 */
.card::before {
  content: "";
  position: absolute;
  inset: 6px;
  pointer-events: none;
  border-radius: 10px;
  background:
    linear-gradient(var(--accent), var(--accent)) left top / 14px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left top / 1px 14px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right top / 14px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right top / 1px 14px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left bottom / 14px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left bottom / 1px 14px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right bottom / 14px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right bottom / 1px 14px no-repeat;
  opacity: 0.35;
}

/* 扫描光带：从左侧掠过 */
.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 30%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 122, 92, 0.055) 45%,
    rgba(255, 122, 92, 0.11) 50%,
    rgba(255, 122, 92, 0.055) 55%,
    transparent 100%
  );
  animation: sweep 7s ease-in-out infinite;
}

.card:nth-of-type(2)::after { animation-delay: 1.6s; }
.card:nth-of-type(3)::after { animation-delay: 3.1s; }
.card:nth-of-type(4)::after { animation-delay: 4.4s; }

@keyframes sweep {
  0%   { left: -40%; opacity: 0; }
  12%  { opacity: 1; }
  55%  { opacity: 1; }
  75%  { left: 115%; opacity: 0; }
  100% { left: 115%; opacity: 0; }
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 30px 28px;
}

.auth-card::after { animation-duration: 5.5s; }

/* ---------- 品牌 ---------- */
.logo {
  font-size: 30px;
  text-align: center;
  margin-bottom: 14px;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(255, 122, 92, 0.65), 0 0 42px rgba(255, 122, 92, 0.28);
  animation: breathe 3.4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.72; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.06); }
}

.auth-card h1 { text-align: center; font-size: 19px; letter-spacing: 2px; }

.sub-brand {
  text-align: center;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 2.4px;
  color: var(--accent-dim);
  margin: 4px 0 14px;
  text-transform: uppercase;
}

.auth-card .muted { text-align: center; margin-bottom: 20px; letter-spacing: 0.4px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 20px;
  height: 62px;
  background: linear-gradient(180deg, rgba(14, 8, 6, 0.96), rgba(14, 8, 6, 0.80));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--gold), transparent);
  background-size: 200% 100%;
  opacity: 0.55;
  animation: lineFlow 6s linear infinite;
}

@keyframes lineFlow {
  from { background-position: 0% 0; }
  to   { background-position: 200% 0; }
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  white-space: nowrap;
}

.brand-mark {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(255, 122, 92, 0.8);
  animation: breathe 3s ease-in-out infinite;
}

.brand-sub {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 1.8px;
  color: var(--text-mute);
  font-weight: 400;
}

.tabs { display: flex; gap: 2px; margin-left: auto; }

.tab {
  position: relative;
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13.5px;
  letter-spacing: 1.2px;
  padding: 20px 16px;
  cursor: pointer;
  transition: color 0.2s;
}

.tab:hover { color: var(--text); }

.tab.active {
  color: var(--accent);
  text-shadow: 0 0 14px rgba(255, 122, 92, 0.55);
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent), 0 0 26px rgba(255, 122, 92, 0.5);
}

.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ---------- 区块头 ---------- */
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 122, 92, 0.09);
  /* 标题不能被工具条挤成一个字一行（客服页 320px 宽度时会发生） */
  flex-wrap: wrap;
  row-gap: 8px;
}

.sec-head h2 { white-space: nowrap; }

.sec-head h2::before {
  content: "";
  display: inline-block;
  width: 3px; height: 13px;
  margin-right: 9px;
  vertical-align: -2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* ---------- 表单 ---------- */
label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  margin-bottom: 13px;
}

input, select, textarea, .input {
  width: 100%;
  margin-top: 7px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  background: rgba(12, 7, 5, 0.74);
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

textarea { resize: vertical; line-height: 1.6; }

input::placeholder, textarea::placeholder { color: var(--text-mute); }

input:focus, select:focus, textarea:focus {
  border-color: var(--line-strong);
  background: rgba(18, 10, 8, 0.92);
  box-shadow: 0 0 0 3px rgba(255, 122, 92, 0.09), 0 0 18px -4px rgba(255, 122, 92, 0.5);
}

select option { background: #140b08; color: var(--text); }

.chk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
  margin-bottom: 12px;
  cursor: pointer;
}

.chk input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.chk.tight { margin-bottom: 0; padding-top: 22px; }

/* ---------- 按钮 ---------- */
.btn {
  position: relative;
  padding: 10px 16px;
  font-size: 13.5px;
  font-family: inherit;
  letter-spacing: 0.8px;
  color: var(--text);
  background: rgba(20, 12, 9, 0.92);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.18s;
}

.btn:hover:not(:disabled) {
  border-color: var(--line-strong);
  box-shadow: 0 0 16px -4px rgba(255, 122, 92, 0.6);
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn.primary {
  color: #2a0f08;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  border-color: transparent;
  box-shadow: 0 0 20px -6px rgba(255, 122, 92, 0.85);
}

.btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff9d82, var(--accent));
  box-shadow: 0 0 26px -4px rgba(255, 122, 92, 1);
}

.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 12px; font-size: 12.5px; }
.btn.danger { color: var(--danger); border-color: rgba(255, 92, 122, 0.32); }
.btn.danger:hover:not(:disabled) { box-shadow: 0 0 16px -4px rgba(255, 92, 122, 0.7); }
.btn.block { width: 100%; margin-top: 6px; }

.row-btns { display: flex; gap: 10px; margin-top: 4px; }

/* ---------- 搜索过滤 ---------- */
.filters {
  display: grid;
  grid-template-columns: 170px 1fr 104px 104px 150px auto;
  gap: 10px;
  align-items: center;
}

.filters .input { margin-top: 0; }
.filters .num { text-align: right; font-family: var(--mono); font-size: 13px; }

.filters-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.filters-sub .chk { margin-bottom: 0; }

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.hint-box {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.6px;
  color: var(--accent-dim);
  background: rgba(255, 122, 92, 0.045);
  border: 1px solid rgba(255, 122, 92, 0.13);
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 14px;
}

/* ---------- 账号 / 任务行 ---------- */
.acct-list { display: flex; flex-direction: column; gap: 10px; }

.acct-item {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;      /* 手机上一行放不下时，主信息独占一行 */
  gap: 12px;
  padding: 13px 15px;
  background: rgba(16, 9, 7, 0.66);
  border: 1px solid rgba(255, 122, 92, 0.1);
  border-radius: 10px;
  transition: 0.2s;
}

.acct-item:hover {
  border-color: rgba(255, 122, 92, 0.28);
  background: rgba(22, 13, 10, 0.84);
  box-shadow: 0 0 22px -10px rgba(255, 122, 92, 0.6);
}

.acct-main { flex: 1; min-width: 0; }
.acct-name { font-size: 14px; font-weight: 500; letter-spacing: 0.4px; }
.acct-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-mute);
  letter-spacing: 0.3px;
  /* break-all 会把「≤¥500」断成「≤¥50 / 0」，只在实在放不下时断 */
  overflow-wrap: anywhere;
  word-break: normal;
}

/* ---------- 状态标签 ---------- */
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.tag.ok {
  color: var(--ok);
  background: rgba(46, 230, 168, 0.09);
  border-color: rgba(46, 230, 168, 0.32);
}

.tag.warn {
  color: var(--warn);
  background: rgba(255, 194, 75, 0.09);
  border-color: rgba(255, 194, 75, 0.32);
}

.tag.err {
  color: var(--danger);
  background: rgba(255, 92, 122, 0.09);
  border-color: rgba(255, 92, 122, 0.32);
}

.tag.gray {
  color: var(--text-mute);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ---------- 商品网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.item {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(16, 9, 7, 0.72);
  border: 1px solid rgba(255, 122, 92, 0.1);
  border-radius: 11px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: 0.22s;
}

.item:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 122, 92, 0.36);
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.9),
              0 0 24px -8px rgba(255, 122, 92, 0.55);
}

.item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #150c09;
  filter: saturate(0.94);
  transition: filter 0.25s;
}

.item:hover img { filter: saturate(1.08); }

.thumb-empty {
  width: 100%;
  aspect-ratio: 1 / 1;
  background:
    repeating-linear-gradient(45deg, rgba(255, 122, 92, 0.05) 0 8px, transparent 8px 16px),
    #150c09;
}

.item-body {
  padding: 10px 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.item-price {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255, 209, 102, 0.35);
  letter-spacing: 0.4px;
}

.item-price .unit { font-size: 11.5px; font-weight: 400; }

.item-title {
  font-size: 12.8px;
  line-height: 1.5;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}

.item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
}

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 3, 2, 0.74);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.18s ease-out;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 26px 24px;
  text-align: center;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(255, 122, 92, 0.08),
              0 30px 80px -30px rgba(0, 0, 0, 1),
              0 0 60px -20px rgba(255, 122, 92, 0.35);
  animation: popIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.modal-box.wide { max-width: 620px; text-align: left; max-height: 88vh; overflow-y: auto; }
.modal-box.wide h3 { text-align: center; }
.modal-box form { text-align: left; margin-top: 14px; }
.modal-box > .btn.ghost { margin-top: 14px; }

.qr {
  width: 216px;
  height: 216px;
  display: block;
  margin: 16px auto 10px;
  padding: 8px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 34px -8px rgba(255, 122, 92, 0.6);
}

/* ---------- 提示 ---------- */
.msg {
  min-height: 18px;
  margin-top: 10px;
  font-size: 12.5px;
  letter-spacing: 0.3px;
  color: var(--text-dim);
}

.toast-box {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
  pointer-events: none;
}

.toast-item {
  padding: 9px 18px;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--text);
  background: rgba(20, 12, 9, 0.96);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  box-shadow: 0 0 26px -8px rgba(255, 122, 92, 0.7);
  transition: opacity 0.26s;
}

.toast-item.ok { border-color: rgba(46, 230, 168, 0.55); color: var(--ok); }
.toast-item.err { border-color: rgba(255, 92, 122, 0.6); color: var(--danger); }

/* ---------- 加载 ---------- */
.spinner {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255, 122, 92, 0.14);
  border-top-color: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 18px -4px rgba(255, 122, 92, 0.7);
  animation: spin 0.75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty {
  padding: 30px 0;
  text-align: center;
  font-size: 12.8px;
  letter-spacing: 0.4px;
  color: var(--text-mute);
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: #0a0605; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 122, 92, 0.2);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 122, 92, 0.36); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .topbar { height: auto; flex-wrap: wrap; padding: 10px 14px; gap: 4px 14px; }
  .tabs { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .tab { padding: 12px 13px; }
  .topbar-right { margin-left: auto; }
  .brand-sub { display: none; }
}

@media (max-width: 760px) {
  .wrap { padding: 14px; gap: 14px; }

  /* 主信息必须占满一行：flex:1 配 min-width:0 在换行容器里
     会被压成 0 宽，标题变成竖排一个字一行（监控任务列表就中过这个） */
  .acct-item .acct-main { flex: 1 1 100%; min-width: 100%; }
  .acct-item .tag { flex: 0 0 auto; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .btn { grid-column: 1 / -1; }
  .grid2 { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 11px; }
  .acct-item { flex-wrap: wrap; }
  .modal-box { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  body::after,
  .card::after,
  .topbar::after,
  .logo,
  .brand-mark,
  .modal,
  .modal-box { animation: none !important; }
  .card::after { display: none; }
}

/* ============================================================
   珊瑚光团：给整体加"活"的感觉（纯 transform 动画，不触发重绘）
   ============================================================ */
html::before,
html::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
}

html::before {
  width: 460px;
  height: 460px;
  top: -140px;
  left: -120px;
  background: radial-gradient(circle,
    rgba(255, 122, 92, 0.30) 0%,
    rgba(255, 122, 92, 0.10) 42%,
    transparent 70%);
  animation: orbA 24s ease-in-out infinite;
}

html::after {
  width: 420px;
  height: 420px;
  right: -130px;
  bottom: -150px;
  background: radial-gradient(circle,
    rgba(255, 96, 140, 0.24) 0%,
    rgba(255, 96, 140, 0.08) 44%,
    transparent 72%);
  animation: orbB 31s ease-in-out infinite;
}

@keyframes orbA {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
  50%      { transform: translate3d(110px, 80px, 0) scale(1.12); opacity: 1; }
}

@keyframes orbB {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
  50%      { transform: translate3d(-95px, -70px, 0) scale(1.15); opacity: 1; }
}

/* 激活标签的呼吸光 */
.tab.active::after {
  animation: tabPulse 2.6s ease-in-out infinite;
}

@keyframes tabPulse {
  0%, 100% { opacity: 0.75; box-shadow: 0 0 10px var(--accent); }
  50%      { opacity: 1; box-shadow: 0 0 20px var(--accent), 0 0 36px rgba(255, 122, 92, 0.55); }
}

/* 状态点呼吸 */
.tag.ok { animation: tagPulse 3.2s ease-in-out infinite; }

@keyframes tagPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 230, 168, 0.0); }
  50%      { box-shadow: 0 0 10px 0 rgba(46, 230, 168, 0.28); }
}

@media (prefers-reduced-motion: reduce) {
  html::before,
  html::after,
  .tab.active::after,
  .tag.ok { animation: none !important; }
}


/* ============================================================
   通知铃铛与面板
   ============================================================ */
.bell {
  position: relative;
  padding: 6px 10px;
  font-size: 15px;
  line-height: 1;
}

.bell-icon { color: var(--accent); }

.bell.has-unread .bell-icon {
  animation: bellShake 2.4s ease-in-out infinite;
  text-shadow: 0 0 12px var(--accent);
}

@keyframes bellShake {
  0%, 88%, 100% { transform: rotate(0); }
  90%           { transform: rotate(-12deg); }
  93%           { transform: rotate(10deg); }
  96%           { transform: rotate(-6deg); }
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #2a0f08;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(255, 122, 92, 0.8);
}

.notif-panel {
  position: fixed;
  top: 68px;
  right: 20px;
  width: 340px;
  max-width: calc(100vw - 32px);
  max-height: 420px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 1),
              0 0 40px -16px rgba(255, 122, 92, 0.5);
  overflow: hidden;
  animation: popIn 0.16s ease-out;
}

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.notif-list { overflow-y: auto; }

.notif-item {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 138, 112, 0.07);
  cursor: pointer;
  transition: background 0.15s;
}

.notif-item:hover { background: rgba(255, 122, 92, 0.06); }

.notif-item.unread { background: rgba(255, 122, 92, 0.05); }

.notif-item.unread .notif-title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
  box-shadow: 0 0 8px var(--accent);
}

.notif-title {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.notif-body {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-mute);
  white-space: pre-line;
}

.notif-time {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-mute);
  opacity: 0.7;
}

@media (max-width: 760px) {
  .notif-panel { right: 8px; left: 8px; width: auto; top: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .bell.has-unread .bell-icon { animation: none; }
}


/* 第二行筛选与分页 */
.filters-2 {
  /* 只放 5 个下拉；8 个勾选项单独一行，否则换行后和下拉错位 */
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 10px;
  align-items: center;
}

.chk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 14px;
}
/* 跟下拉同排时才需要往下垫，独立成行后垫高反而错位 */
.chk-row .chk.tight { padding-top: 0; }

.filters-2 .chk { margin-bottom: 0; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 138, 112, 0.1);
}

.pager-info {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-dim);
}

/* 评分徽标 */
.score {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.score.high { color: var(--ok); background: rgba(46, 230, 168, 0.1);
              border-color: rgba(46, 230, 168, 0.32); }
.score.mid  { color: var(--gold); background: rgba(255, 209, 102, 0.1);
              border-color: rgba(255, 209, 102, 0.3); }
.score.low  { color: var(--text-mute); background: rgba(255, 255, 255, 0.04);
              border-color: rgba(255, 255, 255, 0.1); }

@media (max-width: 760px) {
  .filters-2 { grid-template-columns: 1fr 1fr; }
  .filters-2 .muted { grid-column: 1 / -1; }
}


/* ============ 客服（IM） ============ */
.chat-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: start;
}

.chat-left, .chat-right {
  height: calc(100vh - 210px);
  min-height: 460px;
  max-height: 760px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-left .sec-head, .chat-right .sec-head { margin-bottom: 10px; }

.input.tiny { width: auto; margin: 0; padding: 5px 9px; font-size: 12px; }

.conv-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.conv-item {
  padding: 10px 11px;
  border: 1px solid rgba(255, 138, 112, 0.1);
  border-radius: 9px;
  background: rgba(16, 9, 7, 0.55);
  cursor: pointer;
  transition: 0.15s;
}

.conv-item:hover { border-color: rgba(255, 138, 112, 0.3); }
.conv-item.active { border-color: var(--accent); box-shadow: 0 0 16px -6px var(--accent); }

.conv-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.conv-nick { font-size: 13px; font-weight: 500; }
.conv-time { font-family: var(--mono); font-size: 10.5px; color: var(--text-mute); }
.conv-sum {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msg-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 4px 6px 2px;
}

.msg { display: flex; flex-direction: column; max-width: 78%; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.them { align-self: flex-start; }

.msg-bubble {
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg.me .msg-bubble {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #2a0f08;
  border-bottom-right-radius: 4px;
}

.msg.them .msg-bubble {
  background: rgba(30, 18, 15, 0.9);
  border: 1px solid rgba(255, 138, 112, 0.16);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.msg-meta {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-mute);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg.me .msg-meta { text-align: right; }

.draft-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 138, 112, 0.14);
}

.draft-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
  letter-spacing: 0.6px;
}

.draft-box textarea { margin-top: 0; }

@media (max-width: 900px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-left, .chat-right { min-height: auto; }
  .msg { max-width: 92%; }
}


/* ============ 自动化开关 ============ */
.switch-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 138, 112, 0.1);
}
.switch-row:last-of-type { border-bottom: 0; }
.switch-main { flex: 1; }
.switch-title { font-size: 14px; font-weight: 500; }
.switch-desc { margin-top: 3px; font-size: 12px; color: var(--text-mute); line-height: 1.6; }

.toggle { display: inline-block; cursor: pointer; margin: 0; }
.toggle input { display: none; }

.toggle .track {
  display: block;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(120, 100, 95, 0.35);
  border: 1px solid var(--line);
  position: relative;
  transition: 0.22s;
}

.toggle .knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #b9a49c;
  transition: 0.22s;
}

.toggle input:checked + .track {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  border-color: transparent;
  box-shadow: 0 0 16px -3px var(--accent);
}

.toggle input:checked + .track .knob {
  left: 22px;
  background: #2a0f08;
}

.risk-copy { text-align: left; font-size: 13px; line-height: 1.75; color: var(--text-dim); }
.risk-copy p { margin: 8px 0; }
.risk-copy b { color: var(--gold); }
.risk-copy ul { margin: 6px 0 10px; padding-left: 20px; }
.risk-copy li { margin: 4px 0; }

.queue-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid rgba(255, 138, 112, 0.12);
  border-radius: 10px;
  background: rgba(16, 9, 7, 0.55);
}

.queue-main { flex: 1; min-width: 0; }
.queue-title { font-size: 13px; line-height: 1.5; }
.queue-opener {
  margin-top: 6px;
  padding: 7px 10px;
  border-radius: 7px;
  background: rgba(255, 122, 92, 0.08);
  border-left: 2px solid var(--accent);
  font-size: 12.5px;
  color: var(--text);
}
.queue-meta {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
}


/* 推送到：多选区 */
.pick-box {
  margin: 4px 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 138, 112, 0.14);
  border-radius: 9px;
  background: rgba(16, 9, 7, 0.45);
}
.pick-label { font-size: 12.5px; color: var(--text-dim); margin-bottom: 8px; }
.pick-list { display: flex; flex-direction: column; gap: 6px; }

/* 竖排的复选行，不用药丸造型——弹窗窄的时候药丸会挤成三行 */
.pick-item {
  display: flex;
  flex-direction: row;   /* 全局 label 是 column，这里必须显式覆盖，否则文字宽度为 0 */
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid rgba(255, 138, 112, 0.18);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
  transition: 0.15s;
  overflow: hidden;
}
.pick-item:hover { border-color: rgba(255, 138, 112, 0.45); }
/* 全局 input{width:100%} 会把复选框撑满整行、把文字挤成 0 宽，必须覆盖 */
.pick-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}
.pick-item span {
  flex: 1 1 auto;
  min-width: 60px;
  width: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pick-item em {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 11px;
  color: var(--text-mute);
  max-width: 40%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pick-item:has(input:checked) {
  border-color: var(--accent);
  background: rgba(255, 122, 92, 0.1);
  box-shadow: 0 0 12px -6px var(--accent);
}


/* 窄屏（手机）：筛选控件两列排，别挤成一条 */
@media (max-width: 720px) {
  .filters-2 {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }
  .filters-2 > label,
  .filters-2 > select { min-width: 0; }
}


/* 实拍角标：叠在商品图右下角 */
.item { position: relative; }
.photo-badge {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
}
.tag.tiny { font-size: 11px; padding: 2px 6px; border-radius: 6px; }

/* 性价比角标：叠在商品图左下角 */
.value-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
}

/* 联网参考价 */
.ref-price {
  font-size: 12px;
  color: #7ec98a;
  margin-top: 4px;
}

/* 估算价用灰色，避免与真实成交价混淆 */
.ref-price.est { color: #9d8a82; }

/* 筛选区下方的说明行 */
.hint-line {
  font-size: 12.5px;
  color: #8a736c;
  line-height: 1.65;
  margin: 8px 0 10px;
}
/* 卡片内的子区块（如联网核价通道） */
.card-sub {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.card-sub-t {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

/* 页脚：技术背书 + 免责 + 版权 */
.site-footer {
  margin: 40px auto 24px;
  padding: 22px 16px 8px;
  max-width: 960px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  text-align: center;
}
.foot-tech {
  font-size: 13px;
  color: #9d8a82;
  line-height: 1.8;
}
.foot-tech b {
  color: #e2b5a8;
  font-weight: 600;
}
.foot-note {
  font-size: 12px;
  color: #6f5d57;
  line-height: 1.75;
  margin-top: 8px;
}
.foot-copy {
  font-size: 12px;
  color: #5d4d48;
  margin-top: 12px;
  letter-spacing: .3px;
}

/* 让主内容撑满视口高度，页脚自然贴底 */
#appPage {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
#appPage main.wrap { flex: 1 0 auto; }

/* 页脚备案号：法规要求常驻展示，做成最低调的一行 */
.foot-icp {
  font-size: 12px;
  color: #5d4d48;
  margin-top: 6px;
  line-height: 1.7;
}
.foot-icp a {
  color: #5d4d48;
  text-decoration: none;
}
.foot-icp a:hover {
  color: #9d8a82;
  text-decoration: underline;
}

/* 主题切换时短暂开启过渡：只在那 260ms 内生效，
   避免给所有元素常驻 transition 拖慢滚动 */
html.theme-fade,
html.theme-fade body,
html.theme-fade .card,
html.theme-fade .topbar,
html.theme-fade .acct-item,
html.theme-fade .item,
html.theme-fade .btn,
html.theme-fade input,
html.theme-fade select,
html.theme-fade textarea,
html.theme-fade .modal-box,
html.theme-fade .notif-panel,
html.theme-fade .toast-item,
html.theme-fade .tag,
html.theme-fade .hint-box,
html.theme-fade .site-footer {
  transition: background-color 0.26s ease, color 0.26s ease,
              border-color 0.26s ease, box-shadow 0.26s ease !important;
}

/* ============================================================
   Logo
   ============================================================ */
.brand {
  align-items: center;
  gap: 9px;
}

/* 19px 时海豚会糊成一个钩子，26px 才看得出形状 */
.brand-logo {
  width: 26px;
  height: 26px;
  display: block;
  flex: 0 0 auto;
  border-radius: 7px;
  box-shadow: 0 0 14px -4px rgba(212, 56, 13, 0.75);
}

.brand-text { white-space: nowrap; }

/* 登录 / 初始化页的应用徽标 */
.logo-badge {
  width: 56px;
  height: 56px;
  display: block;
  margin: 0 auto 16px;
  border-radius: 14px;
  box-shadow: 0 8px 24px -10px rgba(212, 56, 13, 0.6);
}

/* ============================================================
   尺寸规范
   - 桌面：内容区 1240，超大屏 1360（原来固定 1180，宽屏两侧留白过多）
   - 手机：输入框 16px（否则 iOS 聚焦会自动放大整页）、按钮 ≥42px
   ============================================================ */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.wrap {
  /* width:100% 不能少：main 是 #appPage（flex 列）的子项，
     配上 margin:0 auto 后会被当成 fit-content，
     max-width 永远不生效（实测 1440 和 1920 都是 912px） */
  width: 100%;
  max-width: 1240px;
  padding: 24px;
}

@media (min-width: 1600px) {
  .wrap { max-width: 1360px; }
}

@media (max-width: 760px) {
  .wrap { padding: 14px; gap: 14px; }

  /* 主信息必须占满一行：flex:1 配 min-width:0 在换行容器里
     会被压成 0 宽，标题变成竖排一个字一行（监控任务列表就中过这个） */
  .acct-item .acct-main { flex: 1 1 100%; min-width: 100%; }
  .acct-item .tag { flex: 0 0 auto; }

  /* iOS 会在 input 字号小于 16px 时自动放大页面，很难受 */
  input, select, textarea, .input { font-size: 16px; }

  /* 触摸目标：iOS 建议 44px，安卓 48dp，这里取折中 */
  .btn { min-height: 42px; }
  .btn.sm { min-height: 36px; padding: 8px 12px; }
  .theme-btn { width: 38px; height: 36px; }
  .bell { padding: 8px 12px; }

  .chk input { width: 18px; height: 18px; }
  .chk.tight { padding-top: 18px; }

  .tab { padding: 12px 13px; }

  /* .filters .num 原本是 13px，优先级高于上面的 input 规则 */
  .filters .num { font-size: 16px; }

  /* 手机上「账号 / 关键词 / 排序」需要整行：
     16px 字号后，半行宽会把账号名截断（xy1692717328…） */
  .filters #selAcct,
  .filters #kw,
  .filters #selSort { grid-column: 1 / -1; }

  .item-price { font-size: 16px; }
  .item-title { font-size: 13px; }
  .item-body { padding: 9px 10px 11px; }

  .modal-box { max-height: 90vh; overflow-y: auto; }

  .toast-box {
    top: 10px;
    left: 12px;
    right: 12px;
    transform: none;
    align-items: center;
  }
  .toast-item { text-align: center; }

  .brand { gap: 7px; }
  .brand-logo { width: 22px; height: 22px; border-radius: 6px; }
  .brand-text { font-size: 14px; letter-spacing: 0.5px; }
}

/* 极窄屏（320px）：两列商品卡不挤成一条 */
@media (max-width: 380px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .item-title { font-size: 12.4px; }
  .filters .num { font-size: 16px; }
}

/* 刘海屏 / 手势条安全区 */
@supports (padding: max(0px)) {
  .topbar {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  .site-footer {
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
  @media (max-width: 760px) {
    .topbar {
      padding-left: max(14px, env(safe-area-inset-left));
      padding-right: max(14px, env(safe-area-inset-right));
    }
    .wrap {
      padding-left: max(14px, env(safe-area-inset-left));
      padding-right: max(14px, env(safe-area-inset-right));
      padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }
  }
}

/* ============================================================
   搜索等待态：骨架屏 + 阶段提示
   一次深度搜索要 60–90 秒，之前界面只有一行秒表，用户不知道
   是在干活还是卡死。骨架屏给出"正在铺结果"的空间感，阶段文案
   按真实流水线顺序推进，让等待有解释。
   ============================================================ */
.skeleton-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: rgba(16, 9, 7, 0.5);
}
.skeleton-thumb {
  height: 132px;
  background: linear-gradient(100deg,
    rgba(255, 255, 255, 0.03) 30%,
    rgba(255, 138, 112, 0.13) 50%,
    rgba(255, 255, 255, 0.03) 70%);
  background-size: 250% 100%;
  animation: sk-shimmer 1.4s ease-in-out infinite;
}
.skeleton-line {
  height: 10px;
  margin: 10px 11px;
  border-radius: 4px;
  background: linear-gradient(100deg,
    rgba(255, 255, 255, 0.04) 30%,
    rgba(255, 138, 112, 0.12) 50%,
    rgba(255, 255, 255, 0.04) 70%);
  background-size: 250% 100%;
  animation: sk-shimmer 1.4s ease-in-out infinite;
}
.skeleton-line.short { width: 46%; }
@keyframes sk-shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -20% 0; }
}
/* 白色主题下改用浅灰，否则骨架屏在浅底上像脏块 */
html[data-theme="light"] .skeleton-card { background: #f7f4f2; }
html[data-theme="light"] .skeleton-thumb,
html[data-theme="light"] .skeleton-line {
  background: linear-gradient(100deg, #eeeae7 30%, #f8f2ee 50%, #eeeae7 70%);
  background-size: 250% 100%;
}

.search-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 2px;
  color: var(--text-dim);
  font-size: 13px;
}
.search-progress .spin {
  width: 14px; height: 14px; flex: 0 0 14px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: sk-rotate 0.8s linear infinite;
}
@keyframes sk-rotate { to { transform: rotate(360deg); } }
.search-progress .elapsed {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-mute);
}
@media (max-width: 760px) {
  .search-progress { font-size: 12.5px; }
  .skeleton-thumb { height: 110px; }
}

/* 操作日志：40 条一次性铺开会把设置页拉到几千像素，
   限高滚动后「修改密码」这类常用项就不用滚很久才找得到 */
.audit-scroll {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}
.audit-scroll::-webkit-scrollbar { width: 6px; }
.audit-scroll::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 3px;
}
@media (max-width: 760px) {
  .audit-scroll { max-height: 240px; }
}

/* 主动询问关闭时，下面的上限/门槛不生效——灰掉比留着可点更诚实 */
.inquiry-params.disabled {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.3);
}

/* 待询问卡片：三个按钮竖排挤在右侧很局促，改横排右对齐 */
.queue-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
  justify-content: flex-end;
}
@media (max-width: 620px) {
  .queue-item { flex-direction: column; }
  .queue-acts { width: 100%; justify-content: flex-start; }
}

.watch-view-tip {
  display: inline-block;
  padding: 7px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 12.5px;
}
.watch-view-tip a { color: var(--accent); text-decoration: none; }
.watch-view-tip a:hover { text-decoration: underline; }

/* 结果卡片一直可点，但没有任何提示，用户以为是静态列表 */
.open-hint {
  margin-left: auto;
  color: var(--accent);
  font-size: 11px;
  opacity: 0.85;
  white-space: nowrap;
}
.item:hover .open-hint { opacity: 1; }

/* 搜索/取消要挤在同一格，否则多出来的按钮会被 grid 挤到下一行左侧 */
.search-btns { display: flex; gap: 8px; }
.search-btns .btn { flex: 0 0 auto; }
@media (max-width: 760px) {
  .search-btns { flex-wrap: wrap; }
  .search-btns .btn { flex: 1 1 auto; }
}

/* 手机端监控卡片：5 个按钮按 3 列排，比 4+1 的孤儿按钮整齐 */
@media (max-width: 760px) {
  #watchList .acct-item .btn {
    flex: 1 1 calc(33.333% - 8px);
    min-width: 88px;
    justify-content: center;
  }
}

/* 账号头像：图片盖在首字母上，加载失败就露出首字母，不留破图 */
.acct-avatar {
  position: relative;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
  user-select: none;
}
.acct-avatar::before { content: attr(data-initial); }
.acct-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 760px) {
  .acct-avatar { flex: 0 0 36px; width: 36px; height: 36px; font-size: 14px; }
}

.conv-filter {
  width: 100%;
  margin: 0 0 10px;
  font-size: 13px;
  padding: 8px 11px;
}
.msg-tip {
  margin: 0 auto 10px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 193, 75, 0.09);
  border: 1px dashed rgba(255, 193, 75, 0.35);
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
}

/* 会话列表头像：36px 圆形，图片挂了露出首字母 */
.conv-item {
  display: flex;
  gap: 10px;
  align-items: center;
}
.conv-main { flex: 1; min-width: 0; }
.conv-avatar {
  position: relative;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  user-select: none;
}
.conv-avatar::before { content: attr(data-initial); }
.conv-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 760px) {
  .conv-avatar { flex: 0 0 32px; width: 32px; height: 32px; font-size: 13px; }
}

/* 搜索页账号选择：select 里塞不了图片，就在左边挂一个头像，
   跟着选择变，一眼知道现在用的是哪个号 */
.acct-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.acct-pick select { flex: 1; min-width: 0; }
.acct-avatar.sm {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  font-size: 12px;
}

/* 商家/引流/WiFi 角标：过滤关掉时也要让人看出这条为什么不该在 */
.flag-badge {
  position: absolute;
  top: 34px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  z-index: 2;
}
.flag-badge .tag { backdrop-filter: blur(3px); }
