/* ============================================================
   帮遛狗 · 即时通讯与通知中心样式
   颜色全部取自 tokens.css，保持与全局设计一致。
   ============================================================ */

/* ---------------- 会话列表 ---------------- */
.chat-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 12px var(--sp-4);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.chat-item:active { background: var(--surface-2); }
.chat-item .ci-avatar {
  position: relative;
  flex: none;
}
.chat-item .ci-avatar .ci-badge {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
  box-sizing: content-box;
}
.chat-item .ci-body { flex: 1; min-width: 0; }
.chat-item .ci-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2);
}
.chat-item .ci-name {
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-item .ci-time { flex: none; font-size: var(--fs-xs); color: var(--hint); }
.chat-item .ci-last {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-item .ci-task {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: var(--fs-xs);
  color: var(--primary);
  background: var(--primary-50);
  border-radius: var(--r-pill);
  padding: 1px 7px;
  margin-top: 6px;
}

/* ---------------- 聊天页 ---------------- */
.chat-scroll {
  padding: var(--sp-3) var(--sp-3) 108px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-peek {
  margin: 0 var(--sp-3) var(--sp-3);
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  display: flex; align-items: center; gap: var(--sp-3);
  cursor: pointer;
}
.chat-peek .cp-body { flex: 1; min-width: 0; }
.chat-peek .cp-t { font-size: var(--fs-xs); color: var(--hint); }
.chat-peek .cp-v {
  font-size: var(--fs-sm); color: var(--ink-2); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.chat-day {
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--hint);
  margin: 8px 0 2px;
}
.chat-day span {
  display: inline-block;
  padding: 2px 10px;
  background: var(--surface-3);
  border-radius: var(--r-pill);
}

.msg-row { display: flex; gap: 8px; align-items: flex-end; }
.msg-row.mine { flex-direction: row-reverse; }
.msg-row .msg-av { flex: none; }

.msg-bubble {
  max-width: 74%;
  padding: 9px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: var(--fs-base);
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
  box-shadow: var(--shadow-1);
}
.msg-row.mine .msg-bubble {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.msg-bubble .mb-img {
  display: flex; align-items: center; gap: 6px;
  opacity: .9;
}
.msg-time {
  flex: none;
  font-size: 10px;
  color: var(--hint);
  padding-bottom: 4px;
  white-space: nowrap;
}

/* 快捷语 */
.quick-bar {
  display: flex;
  gap: var(--sp-2);
  padding: 0 var(--sp-3) 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.quick-bar::-webkit-scrollbar { display: none; }
.quick-bar .qb {
  flex: none;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.quick-bar .qb:active { background: var(--primary-50); border-color: var(--primary-200); }

/* 输入栏：固定底部，与 app-shell 对齐 */
.chat-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max);
  z-index: 30;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.chat-bar .cb-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px var(--sp-3) calc(10px + env(safe-area-inset-bottom));
}
.chat-bar .cb-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-base);
  outline: none;
}
.chat-bar .cb-input:focus { border-color: var(--primary-300, var(--primary)); background: var(--surface); }
.chat-bar .cb-send {
  flex: none;
  width: 62px; height: 40px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--primary);
  color: var(--on-primary);
  font: inherit;
  font-size: var(--fs-base);
  font-weight: 500;
  cursor: pointer;
}
.chat-bar .cb-send:disabled { opacity: .5; }

/* ---------------- 通知中心 ---------------- */
.cat-tabs {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4) var(--sp-2);
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs .ct {
  flex: none;
  height: 30px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: var(--fs-sm);
  display: inline-flex; align-items: center; gap: 4px;
  cursor: pointer;
}
.cat-tabs .ct.on {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.cat-tabs .ct .ct-n {
  font-size: 10px;
  background: var(--danger);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 0 5px;
  line-height: 15px;
}
.cat-tabs .ct.on .ct-n { background: rgba(255, 255, 255, .28); }

.notif-item {
  display: flex;
  gap: var(--sp-3);
  padding: 13px var(--sp-4);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  position: relative;
}
.notif-item:active { background: var(--surface-2); }
.notif-item .ni-ic {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-3);
  color: var(--ink-2);
}
.notif-item .ni-ic.order { background: var(--primary-50); color: var(--primary); }
.notif-item .ni-ic.income { background: #e8f5ec; color: #3f8f5e; }
.notif-item .ni-ic.message { background: #fdf3e3; color: #b7791f; }
.notif-item .ni-ic.system { background: var(--surface-3); color: var(--muted); }
.notif-item .ni-body { flex: 1; min-width: 0; }
.notif-item .ni-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2);
}
.notif-item .ni-title {
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--ink);
}
.notif-item .ni-time { flex: none; font-size: var(--fs-xs); color: var(--hint); }
.notif-item .ni-content {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.55;
}
.notif-item.unread .ni-title::after {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--danger);
  vertical-align: middle;
}
.notif-item .ni-jump {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: var(--fs-xs);
  color: var(--primary);
  margin-top: 6px;
}
.notif-item .ni-del {
  position: absolute;
  right: 10px; bottom: 10px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--hint);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.notif-item .ni-del:active { background: var(--surface-3); }

/* ---------------- 实名认证 ---------------- */
.verify-hero {
  text-align: center;
  padding: var(--sp-6) var(--sp-4) var(--sp-4);
}
.verify-hero .vh-ic {
  width: 62px; height: 62px;
  margin: 0 auto var(--sp-3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-50);
  color: var(--primary);
}
.verify-hero .vh-t { font-size: var(--fs-xl); font-weight: 500; color: var(--ink); }
.verify-hero .vh-d { font-size: var(--fs-sm); color: var(--muted); margin-top: 6px; line-height: 1.6; }
