/* ====== 拼好搭 全局样式 · 清新薄荷 · 圆润软糯风 ====== */
:root {
  /* 主色：薄荷绿 */
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: #34d399;
  --primary-soft: #d1fae5;

  /* 辅色：天蓝 + 珊瑚 */
  --secondary: #38bdf8;
  --accent: #fb7185;
  --accent-dark: #f43f5e;

  /* 功能色 */
  --success: #10b981;
  --success-dark: #059669;
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --warning: #f59e0b;

  /* 中性色 */
  --bg: #f0fdfa;
  --bg-soft: #ecfeff;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text: #1e293b;
  --text-2: #64748b;
  --text-3: #94a3b8;

  /* 阴影（柔和扩散） */
  --shadow-sm: 0 2px 8px rgba(16, 185, 129, 0.08);
  --shadow-md: 0 8px 24px rgba(16, 185, 129, 0.12);
  --shadow-lg: 0 16px 40px rgba(16, 185, 129, 0.16);

  /* 圆角（圆润） */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* 间距 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;

  /* 过渡 */
  --ease: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --dur-fast: 0.2s;
  --dur: 0.35s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "微软雅黑", Tahoma, Arial, sans-serif;
  background: linear-gradient(180deg, #f0fdfa 0%, #ecfeff 100%);
  background-attachment: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--primary-dark); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--primary); }

/* 应用容器 */
.app {
  max-width: 820px;
  margin: 0 auto;
  padding-bottom: 84px;
  min-height: 100vh;
}

/* ====== 顶部标题栏（毛玻璃） ====== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}
.topbar-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}
.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 13px;
  color: var(--text-2);
}
.topbar-right .user-name {
  font-weight: 600;
  color: var(--text);
}

.container { padding: var(--space-5); }

/* ====== 卡片（圆润 + 柔和阴影） ====== */
.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
  animation: popIn var(--dur) var(--ease) both;
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.card:hover { box-shadow: var(--shadow-md); }

.card-hd {
  background: linear-gradient(135deg, var(--primary-soft) 0%, #e0f2fe 100%);
  padding: 16px 22px;
  font-weight: 700;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: 0.5px;
  font-size: 15px;
}
.card-bd { padding: 22px; }

/* ====== 按钮（圆润胶囊） ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 22px;
  background: var(--surface-2);
  border: 1.5px solid transparent;
  border-radius: var(--r-pill);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  line-height: 1.4;
  transition: all var(--dur-fast) var(--ease);
  user-select: none;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.btn:active { transform: translateY(0) scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.42);
  filter: brightness(1.05);
}
.btn-success {
  background: linear-gradient(135deg, #6ee7b7, var(--success));
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.btn-danger {
  background: linear-gradient(135deg, #fca5a5, var(--danger));
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover { box-shadow: 0 6px 20px rgba(239, 68, 68, 0.42); }
.btn-sm { padding: 6px 16px; font-size: 12px; }
.btn-plain {
  background: rgba(255,255,255,0.6);
  color: var(--primary-dark);
  border-color: var(--primary-light);
}
.btn-plain:hover { background: var(--primary-soft); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ====== 表单 ====== */
.form-group { margin-bottom: var(--space-5); }
.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}
.form-group label .req { color: var(--accent); margin-left: 2px; }
.form-group label small { color: var(--text-3); font-weight: 400; }

input[type=text], input[type=password], input[type=number],
select, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: all var(--dur-fast) var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}
select { cursor: pointer; }
textarea { resize: vertical; min-height: 88px; }
.form-row { display: flex; gap: var(--space-4); }
.form-row > .form-group { flex: 1; }

/* ====== 性别标签 ====== */
.badge {
  display: inline-block;
  padding: 2px 12px;
  border-radius: var(--r-pill);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}
/* 男=蓝，女=粉（通过 PHP 输出 inline style 颜色，这里兜底） */

/* ====== 列表项 ====== */
.list-item {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  transition: background var(--dur-fast) var(--ease);
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--bg-soft); }
.list-main { flex: 1; min-width: 0; }
.list-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  font-size: 15px;
}
.list-title a { color: var(--primary-dark); }
.list-title a:hover { color: var(--primary); }
.list-meta { color: var(--text-3); font-size: 12px; }
.list-meta span { margin-right: var(--space-3); }

/* ====== 同行标签 ====== */
.comp-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag {
  display: inline-block;
  padding: 4px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--r-pill);
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}
.tag.tag-ok {
  background: var(--primary-soft);
  border-color: transparent;
  color: var(--primary-dark);
  font-weight: 600;
}
.tag.tag-full {
  background: #fee2e2;
  border-color: transparent;
  color: var(--danger-dark);
  font-weight: 600;
}

/* ====== 详情信息行 ====== */
.info-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.info-row:last-child { border-bottom: none; }
.info-label { width: 100px; color: var(--text-3); flex-shrink: 0; font-size: 13px; }
.info-value { flex: 1; color: var(--text); word-break: break-all; }

/* ====== 参与者 ====== */
.member-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-soft);
  border: 1px solid transparent;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--primary-dark);
  transition: all var(--dur-fast) var(--ease);
}
.member-chip:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

/* ====== 空状态 ====== */
.empty {
  text-align: center;
  color: var(--text-3);
  padding: 60px 16px;
  font-size: 14px;
}

/* ====== 提示条 ====== */
.alert {
  padding: 14px 20px;
  border-radius: var(--r-md);
  margin-bottom: var(--space-4);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  animation: popIn var(--dur) var(--ease) both;
}
.alert-error { background: #fef2f2; border-color: #fecaca; color: var(--danger-dark); }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: var(--success-dark); }

/* ====== 登录注册盒子 ====== */
.auth-box { max-width: 420px; margin: 56px auto; }
.auth-box .card { box-shadow: var(--shadow-lg); }
.auth-box .card-bd { padding: 34px 30px; }

/* ====== 底部导航（毛玻璃 + 彩色激活） ====== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 820px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: rgba(255, 255, 255, 0.85);
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  display: flex;
  z-index: 100;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 24px rgba(16, 185, 129, 0.08);
}
.bottom-nav a {
  flex: 1;
  text-align: center;
  color: var(--text-3);
  padding: 8px 4px;
  font-size: 12px;
  position: relative;
  font-weight: 500;
  transition: color var(--dur-fast) var(--ease);
  text-decoration: none;
}
.bottom-nav a:hover { color: var(--primary); }
.bottom-nav a.active { color: var(--primary); font-weight: 700; }
/* 激活态：小圆点在图标上方 */
.bottom-nav a.active::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  background: var(--primary);
  border-radius: 50%;
  animation: dotIn var(--dur) var(--ease);
}
@keyframes dotIn {
  from { transform: translateX(-50%) scale(0); }
  to   { transform: translateX(-50%) scale(1); }
}
.nav-ico {
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto 4px;
  position: relative;
  transition: transform var(--dur-fast) var(--ease);
}
.bottom-nav a:hover .nav-ico { transform: translateY(-2px) scale(1.08); }
.bottom-nav a.active .nav-ico { transform: scale(1.1); }

/* 同行：两个人形 */
.nav-ico-companion::before,
.nav-ico-companion::after {
  content: '';
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: currentColor;
  top: 1px;
}
.nav-ico-companion::before { left: 1px; }
.nav-ico-companion::after { right: 1px; }
.nav-ico-companion {
  background:
    linear-gradient(currentColor, currentColor) left 1px bottom 0 / 9px 7px no-repeat,
    linear-gradient(currentColor, currentColor) right 1px bottom 0 / 9px 7px no-repeat;
  border-radius: 3px 3px 0 0;
}
/* 接单：针线 */
.nav-ico-jobs::before {
  content: '';
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  top: 1px; left: 1px;
}
.nav-ico-jobs::after {
  content: '';
  position: absolute;
  width: 16px; height: 2px;
  background: currentColor;
  top: 12px; left: 3px;
  transform: rotate(-35deg);
  transform-origin: left center;
  border-radius: 1px;
}
/* 消息：对话气泡 */
.nav-ico-msg::before {
  content: '';
  position: absolute;
  inset: 1px 1px 4px 1px;
  border: 2px solid currentColor;
  border-radius: 6px;
}
.nav-ico-msg::after {
  content: '';
  position: absolute;
  width: 0; height: 0;
  border-left: 4px solid currentColor;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  bottom: 0; left: 5px;
}
/* 我的：人形 */
.nav-ico-me::before {
  content: '';
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: currentColor;
  top: 1px; left: 50%;
  transform: translateX(-50%);
}
.nav-ico-me::after {
  content: '';
  position: absolute;
  width: 16px; height: 9px;
  background: currentColor;
  border-radius: 8px 8px 0 0;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
}

/* 未读小红点 */
.dot {
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 0 7px;
  font-size: 11px;
  margin-left: 3px;
  font-weight: 700;
}

/* ====== 接单图片 ====== */
.job-img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--r-md);
  margin-bottom: 16px;
  transition: transform var(--dur) var(--ease);
}
.job-img-thumb {
  width: 100px; height: 100px;
  object-fit: cover;
  border-radius: var(--r-md);
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease);
}
.list-item:hover .job-img-thumb { transform: scale(1.05); }

/* ====== 聊天 ====== */
.chat-box {
  background: var(--surface);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 220px);
  min-height: 420px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}
.chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background: var(--bg-soft);
  scroll-behavior: smooth;
}
.chat-msgs::-webkit-scrollbar { width: 6px; }
.chat-msgs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.msg {
  margin-bottom: 14px;
  display: flex;
  animation: popIn 0.3s var(--ease) both;
}
.msg.self { justify-content: flex-end; }
.msg-bubble {
  max-width: 70%;
  padding: 11px 16px;
  border-radius: var(--r-lg);
  background: var(--surface);
  font-size: 13px;
  word-break: break-all;
  box-shadow: var(--shadow-sm);
  line-height: 1.5;
}
.msg.self .msg-bubble {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff;
}
.msg-time {
  font-size: 11px;
  color: var(--text-3);
  text-align: center;
  margin-bottom: 10px;
}
.chat-input {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--border-light);
  background: var(--surface);
}
.chat-input input { flex: 1; }

/* ====== 会话列表 ====== */
.conv-item {
  display: flex;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.conv-item:hover { background: var(--bg-soft); }
.conv-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.conv-main { flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; align-items: center; }
.conv-name { font-weight: 700; color: var(--text); font-size: 15px; }
.conv-time { color: var(--text-3); font-size: 11px; flex-shrink: 0; margin-left: 10px; }
.conv-preview {
  color: var(--text-2);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}
.unread-dot {
  display: inline-block;
  min-width: 20px;
  height: 20px;
  line-height: 20px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-pill);
  text-align: center;
  font-size: 11px;
  padding: 0 7px;
  font-weight: 700;
}

/* ====== 分区标题 ====== */
.section-title {
  font-weight: 700;
  color: var(--primary-dark);
  margin: 22px 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
  border-radius: 2px;
  font-size: 16px;
}

/* ====== 轮播图 ====== */
.banner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;        /* 横版 16:9，高度随宽度自动计算 */
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--space-5);
  box-shadow: none;
  background: transparent;
}
.banner-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.banner-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
}
.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;           /* 图片铺满容器，不变形，多余部分裁剪 */
  object-position: center;
  display: block;
}
.banner-title {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 20px 16px;
  background: transparent;
  color: #fff;
  font-size: 16px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  font-weight: 600;
}
.banner-prev, .banner-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-fast) var(--ease);
  opacity: 0;
}
.banner-prev { left: 12px; }
.banner-next { right: 12px; }
.banner-prev::before { content: '‹'; }
.banner-next::before { content: '›'; }
.banner:hover .banner-prev,
.banner:hover .banner-next { opacity: 1; }
.banner-prev:hover, .banner-next:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.12);
  box-shadow: var(--shadow-md);
}
.banner-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.banner-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.banner-dot.active {
  background: #fff;
  width: 24px;
  border-radius: 4px;
}
/* 小屏同样保持 16:9 横版比例 */
@media (max-width: 480px) {
  .banner {
    aspect-ratio: 16 / 9;
    width: calc(100% + 20px);
    margin-left: -10px;
    border-radius: 0;
    box-shadow: none;
  }
  .banner-prev, .banner-next { opacity: 1; width: 32px; height: 32px; }
}

/* ====== 悬浮发布按钮（FAB） ====== */
.fab {
  position: fixed;
  right: calc(50% - 390px);
  bottom: 86px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 22px 0 16px;
  height: 50px;
  border: none;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  z-index: 90;
  transition: all 0.3s var(--ease);
}
.fab:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.5);
  color: #fff;
}
.fab:active { transform: translateY(0) scale(0.97); }
.fab-ico {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.fab-ico::before,
.fab-ico::after {
  content: '';
  position: absolute;
  background: #fff;
  border-radius: 2px;
}
.fab-ico::before {
  top: 50%; left: 0;
  width: 20px; height: 3px;
  transform: translateY(-50%);
}
.fab-ico::after {
  left: 50%; top: 0;
  width: 3px; height: 20px;
  transform: translateX(-50%);
}
@media (max-width: 820px) {
  .fab { right: 18px; }
}
@media (max-width: 480px) {
  .fab {
    right: 16px;
    bottom: 80px;
    height: 46px;
    padding: 0 18px 0 14px;
    font-size: 14px;
  }
}

/* ====== 响应式 ====== */
@media (max-width: 480px) {
  .topbar-inner { padding: 12px 16px; }
  .logo { font-size: 20px; }
  .container { padding: 12px 10px; }
  .card-bd { padding: 18px; }
  .auth-box .card-bd { padding: 26px 20px; }
  .form-row { flex-direction: column; gap: 0; }
  .list-item { padding: 14px 18px; }
}
