/* 鍥惧簱鍚庡彴绠＄悊锛堝钩鍙板寲缁熶竴鐧诲綍鐗堬級鏍峰紡 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: #f0f2f5;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
}
.container { max-width: 1280px; margin: 0 auto; padding: 0; display: flex; align-items: stretch; min-height: 100vh; }
.hidden { display: none !important; }
/* 子账号板块权限勾选：横向排布 */
.check-inline { display: inline-flex; align-items: center; gap: 4px; margin: 4px 14px 4px 0; white-space: nowrap; cursor: pointer; }
.check-inline input[type="checkbox"] { width: 14px; height: 14px; }

/* ---------- 鎸夐挳 ---------- */
.btn {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #fff;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  line-height: 1.5;
  user-select: none;
}
.btn:hover { background: #f5f5f5; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: #1a73e8; border-color: #1a73e8; color: #fff; }
.btn.primary:hover { background: #1664c9; }
.btn.small { padding: 3px 10px; font-size: 13px; }
.btn.danger { background: #d9534f; border-color: #d9534f; color: #fff; }
.btn.danger:hover { background: #c9302c; }
.btn.ghost { background: transparent; border-color: #bbb; color: #555; }

/* ---------- 鐧诲綍閬�缃� ---------- */
.login-mask {
  position: fixed;
  inset: 0;
  background: rgba(30, 40, 60, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.login-card {
  width: 380px;
  max-width: 92vw;
  background: #fff;
  border-radius: 10px;
  padding: 28px 26px 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.login-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 18px;
  color: #1a73e8;
}
.login-error { color: #d9534f; font-size: 13px; min-height: 18px; margin: 4px 0 6px; }

/* ---------- 登录页宣传文案 ---------- */
.login-promo {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(128, 128, 128, 0.28);
  text-align: center;
}
.login-promo .promo-main {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: #1a73e8;
}
.login-promo .promo-sub {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #555;
}
.login-promo .promo-support {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #888;
}

/* ---------- 椤舵爮 ---------- */
.role-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.role-bar h1 { font-size: 20px; color: #1a73e8; }
.page-sub { font-size: 13px; color: #888; margin-top: 2px; }
.role-bar-actions { display: flex; align-items: center; gap: 10px; }
.role-text { font-size: 13px; color: #555; }

/* ---------- 闈㈡澘 ---------- */
.panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
}
.panel-head {
  padding: 12px 18px;
  border-bottom: 1px solid #eee;
  font-size: 16px;
  font-weight: 600;
  color: #222;
}
.panel-sub { font-size: 12px; font-weight: 400; color: #999; margin-left: 6px; }
.panel-body { padding: 14px 18px 18px; }
.panel-title { font-size: 16px; font-weight: 600; }

/* ---------- 琛ㄥ崟 ---------- */
.form-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 10px;
}
.form-row label { min-width: 96px; font-size: 14px; color: #555; }
.form-row input, .form-row select {
  flex: 1;
  min-width: 180px;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
}
.form-row input:focus, .form-row select:focus { outline: none; border-color: #1a73e8; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px 14px;
  margin-bottom: 12px;
}
.form-grid label { display: block; font-size: 13px; color: #666; }
.form-grid input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
  margin-top: 4px;
}
.form-grid input:focus { outline: none; border-color: #1a73e8; }
.hint { font-size: 12px; color: #999; margin: 4px 0; }
.empty-tip { font-size: 14px; color: #aaa; padding: 16px 0; text-align: center; }
.divider { border: 0; border-top: 1px solid #eee; margin: 14px 0; }

/* ---------- 琛ㄦ牸 ---------- */
.store-table, .item-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.store-table th, .item-table th {
  background: #f8f9fb;
  font-size: 13px;
  color: #666;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}
.store-table td, .item-table td {
  font-size: 13px;
  padding: 7px 10px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
.store-table tr:hover, .item-table tr:hover { background: #fafbfd; }
.status { padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.status.ok { background: #e7f6ec; color: #188038; }
.status.off { background: #fde7e7; color: #c5221f; }
.user-link { color: #1a73e8; text-decoration: none; cursor: pointer; }
.user-link:hover { text-decoration: underline; }
.page-ops { margin-top: 10px; }
/* 公司图库视图切换（小/中/大） */
.view-switch { display: inline-flex; gap: 4px; }
.view-switch .view-btn.active { background: #3b82f6; border-color: #3b82f6; color: #fff; }

/* ---------- 琛屽唴鏌ュ崟 ---------- */
.store-query-box {
  background: #f7f9fc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 14px;
  margin: 6px 0;
}

/* ---------- 璁㈠崟鍧� ---------- */
.order-block {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin: 12px 0;
  overflow: hidden;
}
.order-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  background: #f8f9fb;
  padding: 8px 12px;
  font-size: 13px;
  color: #444;
}
.order-head .btn { margin-left: 2px; }
.thumb { width: 42px; height: 42px; object-fit: cover; border-radius: 4px; display: block; }
td.path { font-size: 12px; color: #888; max-width: 200px; word-break: break-all; }

/* ---------- 鍒嗙被绠＄悊 ---------- */
.cat-order-input { width: 64px; padding: 3px 6px; border: 1px solid #ccc; border-radius: 4px; }
.cat-display-input { width: 130px; padding: 3px 6px; border: 1px solid #ccc; border-radius: 4px; }

/* ---------- 鍥剧墖涓婁紶 ---------- */
.img-result-line { font-size: 13px; margin: 4px 0; }
.img-result-line.ok { color: #188038; }
.img-result-line.fail { color: #c5221f; }
.img-result-path { font-size: 12px; color: #888; word-break: break-all; }
.img-result-summary { font-size: 13px; font-weight: 600; color: #333; margin-top: 8px; }

/* ---------- 璁剧疆寮圭獥 ---------- */
.settings-mask {
  position: fixed;
  inset: 0;
  background: rgba(30, 40, 60, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
}
.settings-card {
  width: 440px;
  max-width: 94vw;
  max-height: 86vh;
  overflow-y: auto;
  padding: 18px 20px 20px;
}
.settings-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.settings-row { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.settings-label { width: 72px; font-size: 14px; color: #555; }
.settings-value { font-size: 13px; color: #888; width: 48px; }
.settings-row input[type="range"] { flex: 1; }
.settings-card .form-row label { min-width: 72px; }
.panel-subtitle { font-size: 14px; font-weight: 600; color: #444; margin: 12px 0 8px; }
.block-order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid #eee;
  border-radius: 5px;
  margin: 6px 0;
  font-size: 14px;
  background: #fafbfd;
}

/* ---------- Toast ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  max-width: 80vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 1200;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 搴曢儴 ---------- */
.foot-tip { text-align: center; font-size: 12px; color: #aaa; margin-top: 20px; }

/* ---------- 公司端：顶部入口标签 / 图库网格 / 相册卡片 ---------- */
.store-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.store-tab.active { background: #3b82f6; border-color: #3b82f6; color: #fff; }

.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 8px; }
#companyImageGrid.view-small { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
#companyImageGrid.view-medium { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
#companyImageGrid.view-medium .img-grid-item img.thumb { height: 132px; }
#companyImageGrid.view-large { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
#companyImageGrid.view-large .img-grid-item img.thumb { height: 170px; }
.img-grid-item { position: relative; border: 1px solid #eee; border-radius: 6px; overflow: hidden; background: #fff; cursor: pointer; }
.img-grid-item img.thumb { width: 100%; height: 96px; object-fit: cover; display: block; border-radius: 0; }
.img-grid-item .img-name { font-size: 11px; color: #888; padding: 3px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.img-grid-item.selected { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35); }
.img-grid-item .check-tag { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,0.92); border: 1px solid #ccc; text-align: center; line-height: 16px; font-size: 12px; color: #fff; cursor: pointer; }
.img-grid-item.selected .check-tag { background: #3b82f6; border-color: #3b82f6; }

/* company image fullscreen preview mask: click image or mask to close */
.preview-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.86); z-index: 2000; display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.preview-mask img { max-width: 94vw; max-height: 94vh; object-fit: contain; background: #000; border-radius: 4px; cursor: zoom-out; box-shadow: 0 8px 40px rgba(0,0,0,0.5); }

.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 8px; }
.album-card { border: 1px solid #eee; border-radius: 8px; background: #fff; overflow: hidden; cursor: pointer; transition: box-shadow 0.15s; }
.album-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.album-card .album-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #f5f6f8; }
.album-card .album-info { padding: 8px 10px; }
.album-card .album-name { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-card .album-meta { font-size: 12px; color: #999; margin-bottom: 8px; }
.album-card .album-actions { display: flex; gap: 6px; }
.album-card .album-actions .btn { flex: 1; }

/* folder cards for company albums */
.folder-grid { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.folder-card {
  width: 210px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 14px 14px 12px; cursor: pointer; transition: box-shadow .15s ease, transform .1s ease;
}
.folder-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-1px); }
.folder-icon { position: relative; width: 92px; height: 72px; margin: 0 auto 10px; }
.folder-tab {
  position: absolute; left: 0; top: 0; width: 34px; height: 12px;
  background: #f0b64c; border-radius: 6px 6px 0 0; z-index: 1;
}
.folder-body {
  position: absolute; left: 0; top: 10px; width: 92px; height: 60px;
  background: #ffc966; border-radius: 0 8px 8px 8px; z-index: 2;
}
.folder-card:hover .folder-body { background: #ffb83d; }
.folder-info { text-align: center; }
.folder-name { font-weight: 600; font-size: 14px; color: #333; word-break: break-all; }
.folder-meta { font-size: 12px; color: #999; margin: 4px 0 8px; }
.folder-actions { display: flex; gap: 8px; justify-content: center; }

/* company library dot: clicked/pending state turns blue */
.check-tag.picked {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #fff !important;
}

/* album pick layer items */
.album-pick-item {
  padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 8px;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
.album-pick-item:hover { border-color: #3b82f6; background: #f5f8ff; }

/* ===== phash image search ===== */
.phash-preview-img { max-width: 160px; max-height: 160px; border: 1px solid #ddd; border-radius: 4px; margin-top: 4px; }
#companyPhashResult { margin-top: 10px; }
.img-grid-item .phash-score {
  position: absolute; top: 4px; left: 4px; background: rgba(59,130,246,0.9); color: #fff;
  font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 10px; z-index: 2;
}

/* ========== 涓夊�� UI 涓婚�橈紙A 鐢诲粖鏋佺畝 / B 鏆楄皟褰辨�� / C 鏉傚織缂栬緫锛� ========== */
.theme-options { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.theme-option { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 8px; cursor: pointer; background: #fff; user-select: none; }
.theme-option input { margin: 0; }
.theme-swatch { display: inline-block; width: 26px; height: 18px; border-radius: 3px; border: 1px solid rgba(0,0,0,0.15); }
.swatch-a { background: linear-gradient(135deg, #fafaf8 0%, #e9e9e6 60%, #1a1a1a 100%); }
.swatch-b { background: linear-gradient(135deg, #141412 0%, #181817 60%, #c9a86a 100%); }
.swatch-c { background: linear-gradient(135deg, #faf6ee 0%, #fdfaf4 60%, #c9a86a 100%); }
.theme-name { font-size: 13px; color: #333; }

/* ---- A 鐢诲粖鏋佺畝椋庯細娴呯伆绫崇櫧銆佺櫧鍗°�侀粦瀛椼��4px 鍦嗚�� ---- */
body.theme-a {
  background: #e9e9e6;
  color: #1a1a1a;
}
body.theme-a .login-card,
body.theme-a .role-bar,
body.theme-a .panel,
body.theme-a .settings-card { background: #fafaf8; border-radius: 4px; }
body.theme-a .panel-head { border-bottom-color: #e3e3df; color: #1a1a1a; }
body.theme-a .role-bar h1,
body.theme-a .login-title { color: #1a1a1a; }
body.theme-a .login-promo { border-top-color: rgba(26, 26, 26, 0.2); }
body.theme-a .login-promo .promo-main { color: #1a1a1a; }
body.theme-a .login-promo .promo-sub { color: #555; }
body.theme-a .login-promo .promo-support { color: #888; }
body.theme-a .btn { border-radius: 2px; border-color: #1a1a1a; background: transparent; color: #1a1a1a; }
body.theme-a .btn:hover { background: #1a1a1a; color: #fafaf8; }
body.theme-a .btn.primary { background: #1a1a1a; border-color: #1a1a1a; color: #fafaf8; }
body.theme-a .btn.primary:hover { background: #3a3a3a; }
body.theme-a .btn.danger { background: transparent; border-color: #b3261e; color: #b3261e; }
body.theme-a .btn.danger:hover { background: #b3261e; color: #fff; }
body.theme-a .store-table th, body.theme-a .item-table th { background: #f1f1ee; color: #1a1a1a; }
body.theme-a .store-table td, body.theme-a .item-table td { border-bottom-color: #e3e3df; }
body.theme-a .form-row input, body.theme-a .form-row select,
body.theme-a .form-grid input { border-color: #cfcfcb; border-radius: 2px; }
body.theme-a .form-row input:focus, body.theme-a .form-row select:focus, body.theme-a .form-grid input:focus { border-color: #1a1a1a; }
body.theme-a .theme-option { border-radius: 4px; background: #fafaf8; }
body.theme-a .theme-name { color: #1a1a1a; }

/* ---- B 鏆楄皟褰辨�氶�庯細娣遍粦鑳屾櫙銆侀噾妫曞己璋冦�佺洿瑙掔粏杈规�� ---- */
body.theme-b {
  background: #141412;
  color: #ecebe4;
}
body.theme-b .login-card,
body.theme-b .role-bar,
body.theme-b .panel,
body.theme-b .settings-card { background: #181817; border-radius: 2px; border: 1px solid #2a2a27; }
body.theme-b .panel-head { border-bottom-color: #2a2a27; color: #ecebe4; }
body.theme-b .panel-sub { color: #9a948a; }
body.theme-b .role-bar h1,
body.theme-b .login-title { color: #c9a86a; }
body.theme-b .login-promo { border-top-color: rgba(201, 168, 106, 0.25); }
body.theme-b .login-promo .promo-main { color: #c9a86a; }
body.theme-b .login-promo .promo-sub { color: #b9b4aa; }
body.theme-b .login-promo .promo-support { color: #8a8577; }
body.theme-b .role-text, body.theme-b .page-sub { color: #9a948a; }
body.theme-b .btn { border-radius: 2px; border-color: #3c3c38; background: #22221f; color: #ecebe4; }
body.theme-b .btn:hover { background: #2e2e2a; }
body.theme-b .btn.primary { background: #c9a86a; border-color: #c9a86a; color: #141412; }
body.theme-b .btn.primary:hover { background: #d9bc80; }
body.theme-b .btn.danger { background: transparent; border-color: #a0483f; color: #e58e84; }
body.theme-b .btn.danger:hover { background: #a0483f; color: #fff; }
body.theme-b .btn.ghost { border-color: #3c3c38; color: #b9b4aa; }
body.theme-b .store-table th, body.theme-b .item-table th { background: #1e1e1c; color: #c9a86a; border-bottom-color: #2a2a27; }
body.theme-b .store-table td, body.theme-b .item-table td { border-bottom-color: #242422; color: #d4d0c6; }
body.theme-b .store-table tr:hover, body.theme-b .item-table tr:hover { background: #1e1e1c; }
body.theme-b .form-row label { color: #b9b4aa; }
body.theme-b .form-row input, body.theme-b .form-row select,
body.theme-b .form-grid input { background: #141412; border-color: #3c3c38; color: #ecebe4; }
body.theme-b .form-row input:focus, body.theme-b .form-row select:focus, body.theme-b .form-grid input:focus { border-color: #c9a86a; }
body.theme-b .settings-card .form-row input { color-scheme: dark; }
body.theme-b .panel-subtitle { color: #c9a86a; }
body.theme-b .settings-label { color: #b9b4aa; }
body.theme-b .block-order-item { background: #1e1e1c; border-color: #2a2a27; color: #d4d0c6; }
body.theme-b .store-query-box { background: #1a1a18; border-color: #2a2a27; }
body.theme-b .order-head { background: #1e1e1c; color: #d4d0c6; }
body.theme-b .order-block { border-color: #2a2a27; }
body.theme-b .store-tab.active { background: #c9a86a; border-color: #c9a86a; color: #141412; }
body.theme-b .img-grid-item { border-color: #2a2a27; background: #1e1e1c; }
body.theme-b .img-grid-item .img-name { color: #b9b4aa; }
body.theme-b .album-card, body.theme-b .folder-card { border-color: #2a2a27; background: #1e1e1c; }
body.theme-b .album-card .album-cover { background: #242422; }
body.theme-b .album-card .album-name, body.theme-b .folder-name { color: #ecebe4; }
body.theme-b .album-card .album-meta, body.theme-b .folder-meta { color: #9a948a; }
body.theme-b .album-pick-item { border-color: #2a2a27; color: #d4d0c6; }
body.theme-b .album-pick-item:hover { border-color: #c9a86a; background: #1e1e1c; }
body.theme-b .theme-option { border-color: #3c3c38; background: #181817; }
body.theme-b .theme-name { color: #ecebe4; }
body.theme-b .login-mask { background: rgba(8, 8, 6, 0.88); }
body.theme-b .login-error { color: #e58e84; }
body.theme-b .hint { color: #9a948a; }

/* ---- C 鏉傚織缂栬緫椋庯細绫宠壊鑳屾櫙銆佽‖绾挎爣棰樸�侀噾鑹插乏杈规�嗐�佹�曡壊鏂囧瓧 ---- */
body.theme-c {
  background: #faf6ee;
  color: #3a332a;
}
body.theme-c .login-card,
body.theme-c .role-bar,
body.theme-c .panel,
body.theme-c .settings-card { background: #fdfaf4; border-radius: 0; border: 1px solid #e5dcc8; }
body.theme-c .role-bar, body.theme-c .panel { box-shadow: none; }
body.theme-c .panel-head { border-bottom-color: #e5dcc8; color: #3a332a; font-family: Georgia, 'Songti SC', 'SimSun', serif; font-weight: 600; }
body.theme-c .panel-sub { color: #8a7f6a; }
body.theme-c .role-bar h1,
body.theme-c .login-title { font-family: Georgia, 'Songti SC', 'SimSun', serif; color: #3a332a; }
body.theme-c .login-title::before,
body.theme-c .role-bar h1::before { content: ""; display: inline-block; width: 4px; height: 18px; background: #c9a86a; margin-right: 8px; vertical-align: -2px; }
body.theme-c .login-promo { border-top-color: rgba(58, 51, 42, 0.2); }
body.theme-c .login-promo .promo-main { font-family: Georgia, 'Songti SC', 'SimSun', serif; color: #3a332a; }
body.theme-c .login-promo .promo-sub { color: #6b5f4c; }
body.theme-c .login-promo .promo-support { color: #8a7f6a; }
body.theme-c .btn { border-radius: 0; border-color: #c9b98f; background: #fdfaf4; color: #3a332a; }
body.theme-c .btn:hover { background: #f4eee0; }
body.theme-c .btn.primary { background: #3a332a; border-color: #3a332a; color: #fdfaf4; }
body.theme-c .btn.primary:hover { background: #57493a; }
body.theme-c .btn.danger { background: transparent; border-color: #a0483f; color: #a0483f; }
body.theme-c .btn.danger:hover { background: #a0483f; color: #fff; }
body.theme-c .btn.ghost { border-color: #c9b98f; color: #6b5f4c; }
body.theme-c .store-table th, body.theme-c .item-table th { background: #f4eee0; color: #3a332a; border-bottom-color: #e5dcc8; }
body.theme-c .store-table td, body.theme-c .item-table td { border-bottom-color: #ece3d0; }
body.theme-c .store-table tr:hover, body.theme-c .item-table tr:hover { background: #faf5ea; }
body.theme-c .form-row label { color: #6b5f4c; }
body.theme-c .form-row input, body.theme-c .form-row select,
body.theme-c .form-grid input { background: #fffdf8; border-color: #d9ccae; color: #3a332a; }
body.theme-c .form-row input:focus, body.theme-c .form-row select:focus, body.theme-c .form-grid input:focus { border-color: #c9a86a; }
body.theme-c .panel-subtitle { color: #6b5f4c; font-family: Georgia, 'Songti SC', 'SimSun', serif; }
body.theme-c .settings-label { color: #6b5f4c; }
body.theme-c .block-order-item { background: #faf5ea; border-color: #e5dcc8; }
body.theme-c .store-query-box { background: #f7f1e3; border-color: #e5dcc8; }
body.theme-c .order-head { background: #f4eee0; color: #3a332a; }
body.theme-c .order-block { border-color: #e5dcc8; }
body.theme-c .store-tab.active { background: #3a332a; border-color: #3a332a; color: #fdfaf4; }
body.theme-c .img-grid-item { border-color: #e5dcc8; background: #fffdf8; }
body.theme-c .img-grid-item .img-name { color: #8a7f6a; }
body.theme-c .album-card, body.theme-c .folder-card { border-color: #e5dcc8; background: #fffdf8; }
body.theme-c .album-card .album-cover { background: #f0e8d5; }
body.theme-c .album-card .album-name, body.theme-c .folder-name { color: #3a332a; }
body.theme-c .album-card .album-meta, body.theme-c .folder-meta { color: #8a7f6a; }
body.theme-c .album-pick-item { border-color: #e5dcc8; }
body.theme-c .album-pick-item:hover { border-color: #c9a86a; background: #faf5ea; }
body.theme-c .theme-option { border-radius: 0; border-color: #d9ccae; background: #fdfaf4; }
body.theme-c .theme-name { color: #3a332a; }

/* 搴楅摵鐮佹诞灞� */
.store-qr-img-wrap { text-align: center; padding: 10px 0; }
.store-qr-img-wrap img { max-width: 260px; height: auto; border: 1px solid #e0e0e0; border-radius: 8px; background: #fff; }
.qr-env-option { margin-right: 10px; white-space: nowrap; }

/* ---------- custom search priority keywords ---------- */
.search-kw-block { margin-bottom: 4px; }
.kw-chip {
  display: inline-block;
  margin: 4px 6px 4px 0;
  padding: 2px 10px;
  border: 1px solid #d0d7de;
  border-radius: 14px;
  background: #f6f8fa;
  color: #24292f;
  font-size: 13px;
  vertical-align: middle;
}
.kw-chip .btn {
  margin-left: 4px;
  padding: 0 6px;
  border: none;
  background: transparent;
  color: #d9534f;
  font-size: 14px;
  line-height: 1.4;
}
/* kw index status indicator */
.kw-index-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
  color: #57606a;
  line-height: 1.4;
}
.kw-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}
.kw-status-dot.st-none { background: #d0d7de; }
.kw-status-dot.st-adding { background: #d29922; }
.kw-status-dot.st-done { background: #2da44e; }
.kw-status-dot.st-fail { background: #d1242f; }

/* kw shared schedule states */
.kw-state-on { color: #07c160; font-weight: 600; }
.kw-state-off { color: #e64340; font-weight: 600; }

/* 鍏抽敭璇嶅叡浜�锛氬叧閿�璇嶅垪琛� / 鎵嬪姩寤哄崱 */
.kw-card-table { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 13px; }
.kw-card-table th, .kw-card-table td { border: 1px solid #eee; padding: 6px 8px; text-align: left; }
.kw-card-table th { background: #f7f8fa; font-weight: 600; }
#kwImportWords { width: 100%; box-sizing: border-box; resize: vertical; font-size: 13px; }


/* ---------- 宸︿晶娣辫壊瀵艰埅鏍� + 缁忓吀鍚庡彴甯冨眬锛堝竷灞�鏀归�犳柊澧烇級 ---------- */
.side-nav {
  width: 210px;
  flex: 0 0 210px;
  background: #1f2937;
  color: #e5e7eb;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 0 0 30px;
}
.side-nav .nav-brand {
  padding: 18px 20px 16px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.side-nav .nav-group {
  padding: 16px 20px 6px;
  font-size: 12px;
  letter-spacing: 1px;
  color: #9ca3af;
}
.side-nav .side-nav-item {
  display: block;
  padding: 10px 20px;
  color: #d1d5db;
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
  cursor: pointer;
  user-select: none;
}
.side-nav .side-nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.side-nav .side-nav-item.active {
  background: rgba(59, 130, 246, 0.16);
  color: #fff;
  border-left-color: #3b82f6;
}
.side-nav .side-nav-item-group { display: none; }
.side-nav.show-platform .side-nav-item-group.platform { display: block; }
.side-nav.show-store .side-nav-item-group.store { display: block; }
.main-content { flex: 1; min-width: 0; padding: 20px 24px 40px; }
/* ---------- 标签修正（词库更新面板子板块） ---------- */
.tagfix-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.tagfix-item { display: flex; gap: 12px; padding: 10px 12px; border: 1px solid #e2e6ec; border-radius: 8px; background: #fff; align-items: flex-start; }
.tagfix-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; background: #f3f5f8; }
.tagfix-nothumb { display: flex; align-items: center; justify-content: center; color: #999; font-size: 12px; }
.tagfix-body { flex: 1; min-width: 0; }
.tagfix-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; word-break: break-all; }
.tagfix-meta { font-size: 12px; color: #888; margin-bottom: 4px; }
.tagfix-tags, .tagfix-kws { font-size: 13px; color: #444; margin-bottom: 2px; word-break: break-all; }
.tagfix-actions { display: flex; flex-direction: column; gap: 6px; }
.tagfix-editrow { margin-top: 6px; }
.tagfix-editrow label { display: block; font-size: 12px; color: #888; margin-bottom: 3px; }
.tagfix-editrow input, .tagfix-editrow textarea { width: 100%; box-sizing: border-box; padding: 6px 10px; border: 1px solid #ccc; border-radius: 5px; font-size: 13px; }
body.theme-b .tagfix-item { background: #1e1e1c; border-color: #2a2a27; }
body.theme-b .tagfix-tags, body.theme-b .tagfix-kws { color: #d4d0c6; }
body.theme-b .tagfix-editrow input, body.theme-b .tagfix-editrow textarea { background: #141412; border-color: #3c3c38; color: #ecebe4; }
body.theme-c .tagfix-item { background: #fffdf8; border-color: #e5dcc8; }
body.theme-c .tagfix-tags, body.theme-c .tagfix-kws { color: #3a332a; }
body.theme-c .tagfix-editrow input, body.theme-c .tagfix-editrow textarea { background: #fffdf8; border-color: #d9ccae; color: #3a332a; }

/* ===== 标签修正店铺下拉选择器（可搜索） ===== */
.tagfix-select { position: relative; flex: 0 0 220px; min-width: 160px; }
.tagfix-select-trigger {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; box-sizing: border-box;
  padding: 6px 10px; border: 1px solid #ccc; border-radius: 6px;
  background: #fff; cursor: pointer; font-size: 13px; color: #333;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tagfix-select-trigger::after {
  content: '▾'; margin-left: 6px; color: #888; font-size: 12px; flex: none;
}
.tagfix-select-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 100;
  width: 260px; background: #fff; border: 1px solid #ccc; border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.tagfix-select-filter {
  width: calc(100% - 16px); margin: 6px 8px; padding: 5px 8px;
  border: 1px solid #ddd; border-radius: 4px; font-size: 13px; box-sizing: border-box;
}
.tagfix-select-list { max-height: 220px; overflow-y: auto; padding: 4px 0; }
.tagfix-select-opt { padding: 7px 12px; cursor: pointer; font-size: 13px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tagfix-select-opt:hover { background: #f2f6ff; }
.tagfix-select-opt.active { background: #e8f0fe; color: #1a66ff; font-weight: 600; }
.tagfix-select-empty { padding: 10px 12px; color: #999; font-size: 13px; }
body.theme-b .tagfix-select-trigger, body.theme-b .tagfix-select-dropdown, body.theme-b .tagfix-select-filter { background: #fff; }
body.theme-c .tagfix-select-trigger { background: #fffdf8; border-color: #d9ccae; color: #3a332a; }
body.theme-c .tagfix-select-dropdown { background: #fffdf8; border-color: #d9ccae; }
body.theme-c .tagfix-select-filter { background: #fffdf8; border-color: #d9ccae; color: #3a332a; }

/* ===== Inline user order album (user list lower area) ===== */
#userOrders { margin-top: 12px; border-top: 1px dashed #ddd; padding-top: 4px; }
.user-order-block { border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 12px; margin: 10px 0; background: #fafafa; }
.user-order-head { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: #333; margin-bottom: 8px; }
.user-order-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.user-order-thumbs .thumb { width: 64px; height: 64px; }
#userList tr.selected td { background: #eaf2ff; }
#userList tr.selected .user-link { font-weight: 700; }

/* ========== 搜索规则板块 ========== */
.rule-item-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #eee; flex-wrap: wrap; }
.rule-item-row .rule-check { min-width: 150px; font-weight: 600; }
.rule-item-row .hint { flex: 1; min-width: 220px; }
.rule-prio-btns { display: inline-flex; gap: 4px; }
.rule-prio-num { color: #888; font-size: 12px; min-width: 70px; text-align: right; }
.rule-check-all { font-weight: 600; margin-right: 12px; }
.rule-store-item { display: block; padding: 4px 0; }
.rule-apply-box { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(720px, 92vw); max-height: 80vh; overflow: auto; background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 16px; z-index: 2000; box-shadow: 0 6px 30px rgba(0,0,0,.25); }

/* 强制改密遮罩必须置于最顶层（高于登录弹窗 z-index:999 与其余遮罩），避免登录弹窗未关闭时遮挡改密窗口 */
#forcePwdMask { z-index: 3000; }
#ruleApplyModal.hidden { display: none; }
.btn.tiny { padding: 2px 8px; font-size: 12px; }
.btn.danger { background: #c0392b; color: #fff; }

/* 商家列表操作区：更多二级菜单 */
.store-ops { position: relative; display: inline-block; }
.store-ops .store-ops-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; display: none; min-width: 130px; padding: 4px 0; background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.14); }
.store-ops .store-ops-menu.open { display: block; }
.store-ops .store-ops-menu .menu-item { display: block; width: 100%; padding: 8px 16px; border: none; background: none; font-size: 13px; color: #333; text-align: left; cursor: pointer; white-space: nowrap; }
.store-ops .store-ops-menu .menu-item:hover { background: #f0f4f9; }
.store-ops .store-ops-menu .menu-item.danger { color: #d9534f; }
