:root {
  --bg: #0f1419;
  --card: #1a222c;
  --line: #2a3542;
  --text: #e8eef5;
  --sub: #8b9aab;
  --brand: #2ee59d;
  --brand-2: #1bbf80;
  --danger: #ff6b6b;
  --me: #1f8a65;
  --you: #243040;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); }
button, input, select, label { font-family: inherit; }
button, .btn-file, .chat-fab, .ask-pill, .nav-chip, .rec-btn, .pill, .rec-contact, .rec-copy { cursor: pointer; }
a { color: var(--brand); }

.i {
  display: inline-block; width: 16px; height: 16px; vertical-align: middle;
  background: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}
.i-back { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M15 5l-7 7 7 7-1.4 1.4L5.2 12 13.6 3.6z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M15 5l-7 7 7 7-1.4 1.4L5.2 12 13.6 3.6z'/></svg>"); }
.i-shop { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M4 9l2-5h12l2 5v10H4V9zm3 4h4v6H7v-6z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M4 9l2-5h12l2 5v10H4V9zm3 4h4v6H7v-6z'/></svg>"); }
.i-msg { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M4 5h16v11H8l-4 3V5z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M4 5h16v11H8l-4 3V5z'/></svg>"); }
.i-refresh { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 6V3L8 7l4 4V8a4 4 0 1 1-4 4H6a6 6 0 1 0 6-6z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 6V3L8 7l4 4V8a4 4 0 1 1-4 4H6a6 6 0 1 0 6-6z'/></svg>"); }
.i-search { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='11' cy='11' r='6' fill='none' stroke='black' stroke-width='2'/><path fill='black' d='M16 16l5 5'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='11' cy='11' r='6' fill='none' stroke='black' stroke-width='2'/><path fill='black' d='M16 16l5 5'/></svg>"); }
.i-clip { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='2' d='M8 12.5V7a3 3 0 0 1 6 0v9a2.5 2.5 0 0 1-5 0V9'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='2' d='M8 12.5V7a3 3 0 0 1 6 0v9a2.5 2.5 0 0 1-5 0V9'/></svg>"); }
.i-face { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='8' fill='none' stroke='black' stroke-width='2'/><circle cx='9' cy='10' r='1' fill='black'/><circle cx='15' cy='10' r='1' fill='black'/><path d='M8.5 14.5c1 1.5 6 1.5 7 0' fill='none' stroke='black' stroke-width='1.6'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='8' fill='none' stroke='black' stroke-width='2'/><circle cx='9' cy='10' r='1' fill='black'/><circle cx='15' cy='10' r='1' fill='black'/><path d='M8.5 14.5c1 1.5 6 1.5 7 0' fill='none' stroke='black' stroke-width='1.6'/></svg>"); }
.i-chat { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M5 6h14v9H9l-4 3V6z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M5 6h14v9H9l-4 3V6z'/></svg>"); }

.page { min-height: 100%; display: flex; flex-direction: column; }
.hidden { display: none !important; }

.loading {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.logo { font-size: 28px; font-weight: 700; letter-spacing: 2px; }
.logo span { color: var(--brand); }
.spin {
  width: 36px; height: 36px; margin: 28px 0 16px;
  border: 3px solid #2a3542; border-top-color: var(--brand);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hint { color: var(--sub); font-size: 13px; }

.top {
  height: 52px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; border-bottom: 1px solid var(--line); background: #121920;
  position: sticky; top: 0; z-index: 2;
}
.top h1 { font-size: 16px; margin: 0; font-weight: 600; }
.top .sub { color: var(--sub); font-size: 12px; }
.back { background: none; border: 0; color: var(--brand); font-size: 15px; padding: 0; }

.store-list { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.store {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; display: flex; gap: 12px; cursor: pointer;
}
.store:active { transform: scale(0.99); }
.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #2ee59d, #1a6b8a);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0; position: relative;
}
.dot {
  position: absolute; right: 0; bottom: 0; width: 10px; height: 10px;
  border-radius: 50%; border: 2px solid var(--card);
}
.dot.on { background: #2ee59d; }
.dot.off { background: #667; }
.meta { flex: 1; min-width: 0; }
.meta .name { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.tag { font-size: 11px; color: #ffd36a; background: #3a2f12; border-radius: 8px; padding: 1px 6px; }
.stars { color: #ffd36a; font-size: 12px; margin-top: 2px; }
.welcome { color: var(--sub); font-size: 12px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { color: var(--sub); font-size: 12px; align-self: center; }

.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 78%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; word-break: break-word; }
.bubble.me { align-self: flex-end; background: var(--me); }
.bubble.you { align-self: flex-start; background: var(--you); }
.bubble.sys { align-self: center; background: transparent; color: var(--sub); font-size: 12px; }
.composer {
  display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #121920;
}
.composer input {
  flex: 1; height: 40px; border-radius: 20px; border: 1px solid var(--line);
  background: #1a222c; color: var(--text); padding: 0 14px; outline: none;
}
.composer button {
  height: 40px; padding: 0 16px; border: 0; border-radius: 20px;
  background: var(--brand); color: #062016; font-weight: 700;
}
.composer button:disabled { opacity: .5; }

.error-box { padding: 40px 20px; text-align: center; }
.error-box h2 { margin: 0 0 8px; }
.error-box p { color: var(--sub); }
.dev { margin-top: 24px; display: flex; gap: 8px; justify-content: center; }
.dev input {
  width: 140px; height: 36px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); padding: 0 10px;
}
.dev button {
  height: 36px; border: 0; border-radius: 8px; background: var(--brand); color: #062016; font-weight: 700; padding: 0 12px;
}

.desk { display: flex; height: 100%; }
.col { display: flex; flex-direction: column; min-width: 0; }
.col.left { width: 280px; border-right: 1px solid var(--line); }
.col.mid { flex: 1; }
.col.right { width: 300px; border-left: 1px solid var(--line); background: #121920; padding: 16px; overflow-y: auto; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button {
  flex: 1; height: 44px; border: 0; background: transparent; color: var(--sub);
}
.tabs button.on { color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); }
.sess {
  padding: 12px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.sess.on { background: #1d2a24; }
.sess .t { font-weight: 600; }
.sess .s { color: var(--sub); font-size: 12px; margin-top: 4px; }
.login {
  width: 360px; margin: 12vh auto; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px;
}
.login h2 { margin: 0 0 16px; }
.login input {
  width: 100%; height: 40px; margin-bottom: 12px; border-radius: 8px;
  border: 1px solid var(--line); background: #121920; color: var(--text); padding: 0 12px;
}
.login button {
  width: 100%; height: 40px; border: 0; border-radius: 8px; background: var(--brand); color: #062016; font-weight: 700;
}
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv span { color: var(--sub); }
.toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%);
  background: #000c; color: #fff; padding: 8px 14px; border-radius: 8px; font-size: 13px; z-index: 9;
}

body.player-app {
  background: #c5c9d1;
  display: flex;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
body.player-app #phone {
  width: 100%;
  max-width: 430px;
  height: 100%;
  height: 100dvh;
  background: #1b2a44;
  color: #e8eef8;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px #0002;
  overflow: hidden;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (max-width: 430px) {
  body.player-app { background: #1b2a44; }
  body.player-app #phone { max-width: 100%; box-shadow: none; }
}
body.player-app .page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
body.player-app .loading { flex: 1; }

.m-nav {
  display: flex;
  gap: 8px;
  padding: 10px 12px 6px;
}
.nav-back {
  flex: 0 0 auto;
  height: 36px;
  min-width: 64px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: #1a2740;
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.nav-back .i { width: 16px; height: 16px; background: #fff; }
.err-back { margin: 16px auto 0; background: #409eff; }
.nav-chip {
  flex: 1;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #2a3c5c;
  color: #d5deee;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
}
.nav-chip.on { background: #3d5a8a; color: #fff; }
.nav-chip .red-dot {
  position: absolute; top: 6px; right: 10px;
  width: 7px; height: 7px; border-radius: 50%; background: #ff4d4f;
}
.m-search-row {
  display: flex;
  gap: 8px;
  padding: 6px 12px 8px;
  align-items: center;
}
.search-box {
  flex: 1;
  height: 36px;
  border-radius: 18px;
  background: #243552;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 6px;
}
.search-box input {
  flex: 1;
  border: 0;
  background: transparent;
  color: #e8eef8;
  outline: none;
  font-size: 14px;
  min-width: 0;
}
.search-box input::placeholder { color: #7f8aa3; }
.rec-btn {
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: #2a3c5c;
  color: #d5deee;
  font-size: 12px;
  position: relative;
  white-space: nowrap;
}
.badge-num {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: #ff4d4f; color: #fff;
  font-size: 10px; line-height: 16px; text-align: center;
}
.m-tabs {
  display: flex;
  padding: 0 16px;
  border-bottom: 1px solid #2c3d5c;
}
.m-tabs button {
  flex: 1;
  height: 40px;
  border: 0;
  background: none;
  color: #8b9bb4;
  font-size: 15px;
}
.m-tabs button.on { color: #5b8def; box-shadow: inset 0 -2px 0 #5b8def; }
.m-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 12px 20px; }
.store-grid { display: flex; flex-direction: column; gap: 10px; }
.store-card {
  background: #24344f;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.store-card:active { opacity: .92; }
.store-ava {
  width: 52px; height: 52px; border-radius: 10px;
  background: linear-gradient(135deg, #4b7bec, #3867d6);
  color: #fff; font-weight: 700; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.store-ava img { width: 100%; height: 100%; object-fit: cover; }
.store-mid { flex: 1; min-width: 0; }
.store-name {
  font-size: 15px; font-weight: 600; color: #f2f6ff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.off-badge {
  display: inline-block; margin-left: 6px; padding: 0 6px; height: 18px; line-height: 18px;
  border-radius: 9px; background: #2b6de5; color: #fff; font-size: 11px; font-weight: 650;
  vertical-align: 1px;
}
.store-rate { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; color: #f7c948; }
.store-rate b { color: #c9d4e8; font-weight: 500; }
.store-rev { margin-top: 4px; font-size: 12px; color: #8b9bb4; }
.store-rev em { color: #5b8def; font-style: normal; margin-left: 4px; }
.chat-fab {
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: #3d6ee8; color: #fff;
  flex-shrink: 0; margin-top: 8px;
  display: flex; align-items: center; justify-content: center;
}
.chat-fab .i { width: 16px; height: 16px; }
.pill-row { display: flex; gap: 8px; margin-bottom: 10px; }
.pill {
  height: 28px; padding: 0 12px; border: 0; border-radius: 14px;
  background: #2a3c5c; color: #9aabc4; font-size: 13px;
}
.pill.on { background: #3557a0; color: #fff; }
.rec-card {
  background: #24344f; border-radius: 12px; padding: 14px 14px 10px; margin-bottom: 10px;
}
.rec-top { display: flex; justify-content: space-between; align-items: flex-start; }
.rec-amt { font-size: 26px; font-weight: 700; color: #3dd68c; line-height: 1.1; }
.rec-st { background: #2d6a4f; color: #7dffa3; font-size: 12px; border-radius: 10px; padding: 2px 8px; }
.rec-row { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; color: #9aabc4; }
.rec-row b { color: #dbe6f5; font-weight: 500; max-width: 62%; text-align: right; word-break: break-all; }
.rec-copy {
  display: inline-block; margin-left: 6px; padding: 0 6px; height: 18px; line-height: 18px;
  border-radius: 4px; background: #3a4d6b; color: #c5d2e6; font-size: 11px; border: 0;
}
.rec-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding-top: 8px; border-top: 1px solid #314662;
  font-size: 13px; color: #8b9bb4;
}
.rec-contact {
  height: 28px; padding: 0 14px; border: 0; border-radius: 14px;
  background: #3d6ee8; color: #fff; font-size: 13px;
}
.empty { text-align: center; color: #7f8aa3; padding: 48px 16px; font-size: 14px; }

.light-page { background: #fff; color: #1b1f24; }
.light-top {
  height: 48px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px; border-bottom: 1px solid #eee;
}
.light-top h1 { font-size: 17px; margin: 0; font-weight: 600; }
.icon-back {
  width: 36px; height: 36px; border: 0; background: none;
  color: #333; display: flex; align-items: center; justify-content: center;
}
.icon-back .i { width: 20px; height: 20px; }
.icon-back.light { color: #fff; }
.contact-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.contact {
  display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #f0f1f3;
  align-items: center;
}
.contact:active { background: #f6f7f9; }
.contact-ava {
  width: 46px; height: 46px; border-radius: 50%;
  background: #4c7dff; color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.contact-mid { flex: 1; min-width: 0; }
.contact-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-last { color: #888; font-size: 12px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-right { text-align: right; flex-shrink: 0; }
.contact-time { color: #aaa; font-size: 11px; }
.contact-agent { color: #3d6ee8; font-size: 11px; margin-top: 6px; }
.ver { text-align: center; color: #bbb; font-size: 11px; padding: 12px 0 16px; }

.chat-top {
  height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 6px; background: #fff; border-bottom: 1px solid #eee;
}
.chat-who { text-align: center; flex: 1; min-width: 0; padding: 0 4px; }
.chat-who h1 {
  margin: 0; font-size: 14px; font-weight: 600; color: #222;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-who p { margin: 3px 0 0; font-size: 11px; color: #888; }
.online-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e; margin-right: 4px; vertical-align: middle;
}
.online-dot.off { background: #bbb; }
.chat-top-space { width: 36px; }
.light-chat { background: #f4f5f7; }
.light-chat .msgs { background: #f4f5f7; padding: 8px 12px 12px; }
.light-chat .bubble.me { background: #2f6fed; color: #fff; border-radius: 12px 4px 12px 12px; }
.light-chat .bubble.you { background: #fff; color: #222; border-radius: 4px 12px 12px 12px; box-shadow: 0 1px 2px #0001; }
.light-chat .bubble.sys { color: #9aa0a6; }
.msg-row { display: flex; gap: 8px; align-items: flex-start; max-width: 100%; }
.msg-row.me { align-self: flex-end; flex-direction: row-reverse; }
.msg-ava {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.msg-col { max-width: 78%; min-width: 0; }
.msg-name { font-size: 11px; color: #999; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-row.me .msg-name { display: none; }
.msg-col .bubble { max-width: 100%; }
.ask-box { background: #fff; padding: 8px 12px 6px; border-top: 1px solid #eee; }
.ask-title { font-size: 12px; color: #888; margin-bottom: 8px; }
.ask-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-pill {
  height: 30px; padding: 0 12px; border: 1px solid #dbe3f0; border-radius: 15px;
  background: #f7f9fc; color: #3d6ee8; font-size: 13px;
}
.ask-pill:active { background: #e8eefc; }
.light-chat .composer {
  background: #fff; border-top: 1px solid #eee;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  align-items: center;
}
.light-chat .composer input {
  background: #f3f4f6; border: 0; color: #222; height: 36px;
}
.light-chat .composer button { background: #3d6ee8; color: #fff; height: 36px; padding: 0 14px; border-radius: 18px; font-weight: 500; }
.light-chat .composer .icon-tool { background: none; color: #6b7380; width: 32px; padding: 0; }
.icon-tool {
  width: 32px; height: 36px; border: 0; background: none; padding: 0;
  display: flex; align-items: center; justify-content: center; color: #6b7380;
}
.icon-tool .i { width: 20px; height: 20px; }

.admin-mid { overflow-y: auto; }
.admin-form, .admin-logs { padding: 16px 20px 32px; }
.admin-form label { display: block; margin: 12px 0 4px; color: var(--sub); font-size: 12px; }
.admin-form input, .admin-form select {
  width: 100%; height: 40px; border-radius: 8px;
  border: 1px solid var(--line); background: #121920; color: var(--text); padding: 0 12px;
}
.admin-form button#btn-save {
  margin-top: 18px; width: 160px; height: 40px; border: 0; border-radius: 8px;
  background: var(--brand); color: #062016; font-weight: 700;
}
.ava-row { display: flex; flex-direction: column; gap: 8px; }
.ava-preview { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #243040; }
.log-card { padding: 12px 0; border-bottom: 1px solid var(--line); }
.log-card .t { font-weight: 600; }
.log-card .s { color: var(--sub); font-size: 12px; margin-top: 4px; }
.quick-bar {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 10px; border-top: 1px solid var(--line); background: #121920;
}
.quick-chip {
  height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 14px;
  background: #1a222c; color: var(--text); font-size: 12px;
}
.quick-edit { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.quick-edit h1 { font-size: 16px; margin: 0 0 10px; }
.quick-edit input {
  width: 100%; height: 34px; margin-bottom: 8px; border-radius: 8px;
  border: 1px solid var(--line); background: #0f1419; color: var(--text); padding: 0 10px;
}
.quick-edit button {
  height: 32px; padding: 0 12px; border: 0; border-radius: 8px;
  background: #2a3542; color: var(--text);
}
.qr-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 13px; }
.qr-item button { height: 24px; padding: 0 8px; border: 0; border-radius: 6px; background: #3a2a2a; color: #ffb4b4; }
.msg-ava img, .contact-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.contact-ava { overflow: hidden; }

.upscore-box {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line);
}
.upscore-box h1 { font-size: 16px; margin: 0 0 12px; }
.upscore-box input {
  width: 100%; height: 40px; border-radius: 8px; margin-bottom: 10px;
  border: 1px solid var(--line); background: #0f1419; color: var(--text); padding: 0 12px;
}
.upscore-box button {
  width: 100%; height: 40px; border: 0; border-radius: 8px;
  background: #2f6fed; color: #fff; font-weight: 700;
}
.upscore-box button:disabled { opacity: .45; }
.msg-row.me .msg-ava.me {
  background: linear-gradient(135deg, #f5a623, #e67e22);
  border-radius: 50%;
}
.msg-read { font-size: 11px; color: #bbb; margin-top: 4px; text-align: right; }
.pay-wrap { max-width: 260px; }
.pay-card {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 8px #00012;
}
.pay-hd {
  background: #2f6fed; color: #fff; padding: 12px 12px 14px;
  display: flex; align-items: flex-start; gap: 8px;
}
.pay-ok {
  width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #2f6fed;
  font-size: 13px; font-weight: 700; line-height: 22px; text-align: center; flex-shrink: 0;
}
.pay-hd-txt { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.pay-sub { font-size: 11px; font-weight: 400; opacity: .85; margin-top: 2px; }
.pay-voucher {
  height: 24px; padding: 0 8px; border: 0; border-radius: 12px;
  background: #fff; color: #2f6fed; font-size: 11px; flex-shrink: 0;
}
.pay-amt {
  padding: 14px 12px 16px; font-size: 26px; font-weight: 700;
  color: #2f6fed; letter-spacing: .5px;
}
.desk-pay { align-self: flex-end; }
.voucher { background: #f4f5f7; color: #222; }
.voucher-bar {
  height: 48px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px; background: #2f6fed; color: #fff;
}
.voucher-bar h1 { font-size: 16px; margin: 0; font-weight: 600; }
.voucher-bar .icon-back { color: #fff; }
.voucher-hero {
  background: #2f6fed; color: #fff; text-align: center;
  padding: 12px 16px 32px;
}
.voucher-num { font-size: 36px; font-weight: 700; line-height: 1.1; }
.voucher-unit { font-size: 14px; margin-top: 6px; opacity: .95; }
.voucher-label { font-size: 12px; margin-top: 8px; opacity: .75; }
.voucher-list {
  background: #fff; margin: 12px; border-radius: 10px; overflow: hidden;
}
.voucher-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid #f3f3f3; font-size: 14px; color: #888;
}
.voucher-row:last-child { border-bottom: 0; }
.voucher-row b { color: #222; font-weight: 500; max-width: 62%; text-align: right; word-break: break-all; }

body.desk-app {
  background: #f0f2f5;
  color: #1f2329;
}
body.desk-app .login {
  background: #fff; border: 1px solid #e5e6eb; color: #1f2329;
}
body.desk-app .login input {
  background: #fff; border-color: #d0d3d9; color: #1f2329;
}
body.desk-app .login button,
body.desk-app .btn.primary,
body.desk-app .upscore-box button {
  background: #3d6ee8; color: #fff; font-weight: 600; border: 0; border-radius: 6px;
}
body.desk-app .hint { color: #86909c; }
body.desk-app .top {
  background: #fff; border-bottom: 1px solid #e5e6eb;
}
body.desk-app .top h1 { color: #1f2329; }
body.desk-app .top .sub { color: #86909c; }
body.desk-app .col.left, body.desk-app .col.mid { background: #fff; }
body.desk-app .col.right { background: #f7f8fa; border-left-color: #e5e6eb; }
body.desk-app .col.left { border-right-color: #e5e6eb; }
body.desk-app .tabs { border-bottom-color: #e5e6eb; }
body.desk-app .tabs button { color: #86909c; }
body.desk-app .tabs button.on { color: #3d6ee8; box-shadow: inset 0 -2px 0 #3d6ee8; }
body.desk-app .sess { border-bottom-color: #f0f1f3; }
body.desk-app .sess.on { background: #eef3ff; }
body.desk-app .sess .s { color: #86909c; }
body.desk-app .msgs { background: #f5f6f8; }
body.desk-app .bubble.me { background: #3d6ee8; color: #fff; }
body.desk-app .bubble.you { background: #fff; color: #1f2329; border: 1px solid #ececec; }
body.desk-app .bubble.sys { color: #9aa0a6; }
body.desk-app .composer { background: #fff; border-top-color: #e5e6eb; }
body.desk-app .composer input {
  background: #f5f6f8; border-color: #e5e6eb; color: #1f2329;
}
body.desk-app .composer button {
  background: #3d6ee8; color: #fff; border-radius: 6px; font-weight: 600;
}
body.desk-app .composer button.icon-tool {
  background: none; color: #6b7380; width: 36px; padding: 0; box-shadow: none;
}
body.desk-app .quick-bar { background: #fff; border-top-color: #e5e6eb; }
body.desk-app .quick-chip {
  background: #fff; border-color: #d6deea; color: #3d6ee8;
}
body.desk-app .quick-edit, body.desk-app .upscore-box { border-top-color: #e5e6eb; }
body.desk-app .quick-edit input,
body.desk-app .upscore-box input,
body.desk-app .admin-form input,
body.desk-app .admin-form select {
  background: #fff; border-color: #d0d3d9; color: #1f2329;
}
body.desk-app .kv { border-bottom-color: #ececec; }
body.desk-app .kv span { color: #86909c; }
body.desk-app .log-card { border-bottom-color: #ececec; }
body.desk-app .log-card .s { color: #86909c; }
body.desk-app .qr-item button { background: #fff; color: #c4564e; border: 1px solid #f0d0ce; }
.btn {
  height: 32px; padding: 0 12px; border-radius: 6px; border: 0; font-size: 13px;
}
.btn.ghost {
  background: #fff; color: #4e5969; border: 1px solid #d0d3d9;
}
.btn.primary { background: #3d6ee8; color: #fff; }
.btn:disabled { opacity: .45; }
.btn-file {
  display: inline-block; height: 32px; line-height: 30px; padding: 0 12px;
  border: 1px solid #d0d3d9; border-radius: 6px; background: #fff; color: #4e5969; font-size: 13px;
}
.btn-file input { display: none; }
.side-h { font-size: 14px; margin: 0 0 10px; font-weight: 600; color: #1f2329; }
.top-actions { display: flex; gap: 8px; }
body.desk-app .admin-form button#btn-save,
body.desk-app .admin-form .btn.primary {
  width: auto; min-width: 96px; margin-top: 18px;
}
.nav-chip .i, .search-box .i { margin-right: 4px; }
.search-box .i { color: #7f8aa3; }

.emoji-panel {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  padding: 8px 10px;
  background: #fff;
  border-top: 1px solid #eee;
  max-height: 168px;
  overflow-y: auto;
}
.emoji-panel.hidden { display: none !important; }
.emoji-panel button {
  height: 36px; border: 0; background: none; font-size: 22px; line-height: 1; padding: 0;
}
.emoji-panel button:active { background: #f3f4f6; border-radius: 6px; }
.chat-img { max-width: 180px; max-height: 240px; border-radius: 8px; display: block; cursor: zoom-in; }
.bubble.bubble-img { padding: 4px !important; background: transparent !important; box-shadow: none !important; }
.recv-pay {
  background: #fff; border-radius: 12px; padding: 12px; min-width: 176px; max-width: 220px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06); border: 1px solid #eef0f4;
}
.recv-pay-hd { font-weight: 650; margin-bottom: 6px; color: #1d2129; font-size: 14px; }
.recv-pay-addr { font-size: 13px; word-break: break-all; color: #4e5969; line-height: 1.4; margin-bottom: 8px; }
.recv-copy {
  height: 28px; padding: 0 10px; border: 1px solid #d6deea; border-radius: 14px;
  background: #f7f9fc; color: #3d6ee8; font-size: 12px;
}
.recv-pay img.recv-qr { max-width: 168px; width: 100%; display: block; margin: 10px 0 0; border-radius: 8px; cursor: zoom-in; background: #f7f8fa; }
.msg-row.me .recv-pay { border-color: #dbe8ff; }
.light-chat .recv-pay-hd { color: #1d2129; }


