/* ===== 拼车行 PC 端样式 ===== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --person: #2563eb;   /* 人找车 */
  --car: #10b981;      /* 车找人 */
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
}

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

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

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container { width: 1180px; max-width: 92%; margin: 0 auto; }

/* ===== 顶部导航 ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.topbar-inner { display: flex; align-items: center; height: 64px; gap: 28px; }
.logo { font-size: 22px; font-weight: 800; color: var(--primary); white-space: nowrap; }
.nav { display: flex; gap: 6px; flex: 1; }
.nav a {
  padding: 8px 16px; border-radius: 8px; color: var(--muted);
  font-weight: 600; transition: all .15s;
}
.nav a:hover { background: #eff4ff; color: var(--primary); }
.nav a.active { background: var(--primary); color: #fff; }

.auth-area { display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #10b981);
  color: #fff; display: grid; place-items: center; font-weight: 700;
}
.user-chip .uname { font-weight: 600; }
.user-chip .ubalance {
  font-size: 12px; color: var(--car); background: #ecfdf5;
  padding: 2px 8px; border-radius: 999px; font-weight: 700;
}

/* ===== 按钮 ===== */
.btn {
  border: none; border-radius: 10px; padding: 10px 18px;
  font-weight: 700; font-size: 14px; transition: all .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: #eef2f7; color: var(--text); }
.btn-ghost:hover { background: #e2e8f0; }
.btn-block { width: 100%; padding: 13px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== 视图切换 ===== */
.view { display: none; padding-bottom: 60px; }
.view.active { display: block; }

/* ===== 首页 Hero ===== */
.hero {
  background: linear-gradient(120deg, #2563eb 0%, #4f46e5 55%, #10b981 120%);
  color: #fff; padding: 54px 0 64px;
}
.hero h1 { font-size: 34px; font-weight: 800; letter-spacing: 1px; }
.hero p { margin-top: 10px; opacity: .92; font-size: 16px; }

.search-box {
  margin-top: 26px; background: #fff; border-radius: var(--radius);
  padding: 14px; display: flex; gap: 12px; box-shadow: var(--shadow);
}
.search-box input {
  flex: 1; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font-size: 15px; outline: none;
}
.search-box input:focus { border-color: var(--primary); }

/* ===== 列表头 ===== */
.list-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 28px 0 18px;
}
.filter-tabs { display: flex; gap: 8px; }
.filter-tabs button {
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  padding: 8px 18px; border-radius: 999px; font-weight: 600; transition: all .15s;
}
.filter-tabs button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.sort { color: var(--muted); font-size: 14px; }
.sort span { color: var(--primary); font-weight: 800; }

/* ===== 拼车卡片网格 ===== */
.post-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.post-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04); transition: all .18s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.badge { padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; color: #fff; }
.badge-person { background: var(--person); }
.badge-car { background: var(--car); }
.pc-time { font-size: 13px; color: var(--muted); font-weight: 600; }
.pc-route { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.pc-from, .pc-to { font-size: 17px; font-weight: 800; }
.pc-arrow { color: var(--primary); font-weight: 800; font-size: 18px; }
.pc-meta { display: flex; gap: 18px; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.pc-meta b { color: var(--text); }
.reveal-phone { color: var(--primary); text-decoration: none; font-size: 13px; border-bottom: 1px dashed var(--primary); cursor: pointer; }
.reveal-phone:hover { opacity: .75; }
.pc-note {
  font-size: 14px; color: #4b5563; background: #f8fafc; border-radius: 8px;
  padding: 8px 10px; min-height: 38px; margin-bottom: 10px;
}
.pc-foot { font-size: 12px; color: #9ca3af; border-top: 1px dashed var(--border); padding-top: 8px; }
.pc-actions { display: flex; gap: 8px; margin-top: 10px; }
.btn-mini {
  padding: 5px 12px; border: 1px solid var(--border); border-radius: 7px;
  background: #fff; color: var(--text); font-size: 13px; cursor: pointer; transition: .15s;
}
.btn-mini:hover { border-color: var(--primary); color: var(--primary); }
.btn-mini.btn-danger:hover { border-color: #ef4444; color: #ef4444; }

/* ===== 管理后台 ===== */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tabs button {
  padding: 8px 18px; border: 1px solid var(--border); background: #fff; border-radius: 8px;
  cursor: pointer; font-size: 14px; color: var(--muted);
}
.tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.admin-table th { background: #f8fafc; color: var(--muted); font-weight: 600; }
.admin-table tbody tr:hover { background: #f8fafc; }
.muted { color: var(--muted); font-size: 13px; }


.empty {
  grid-column: 1 / -1; text-align: center; padding: 60px 0; color: var(--muted);
}
.empty .big { font-size: 48px; margin-bottom: 10px; }

/* ===== 通用面板 ===== */
.panel {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.page-title { font-size: 24px; font-weight: 800; margin: 30px 0 18px; }
.page-title small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 10px; }

/* ===== 表单 ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; max-width: 760px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 14px; }
.field label .req { color: #ef4444; }
.field input, .field select, .field textarea {
  border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px;
  font-size: 15px; outline: none; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }
.field textarea { resize: vertical; min-height: 84px; }
.radio-row { display: flex; gap: 12px; }
.radio-row label {
  flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: 12px;
  text-align: center; font-weight: 700; cursor: pointer; transition: all .15s;
}
.radio-row input { display: none; }
.radio-row label.sel-person { border-color: var(--person); background: #eff4ff; color: var(--person); }
.radio-row label.sel-car { border-color: var(--car); background: #ecfdf5; color: var(--car); }

/* ===== 充值 ===== */
.balance-card {
  background: linear-gradient(135deg, #1d4ed8, #10b981); color: #fff;
  border-radius: var(--radius); padding: 26px 30px; margin-bottom: 26px;
  display: flex; align-items: center; justify-content: space-between;
}
.balance-card .num { font-size: 40px; font-weight: 800; }
.balance-card .label { opacity: .9; }
.pkg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pkg {
  border: 2px solid var(--border); border-radius: var(--radius); padding: 26px 18px;
  text-align: center; cursor: pointer; transition: all .15s; background: #fff;
}
.pkg:hover { border-color: var(--primary); transform: translateY(-3px); }
.pkg .price { font-size: 30px; font-weight: 800; color: var(--primary); }
.pkg .amt { margin-top: 6px; color: var(--muted); font-weight: 600; }
.pkg .act { margin-top: 16px; }
.pkg .hint { margin-top: 8px; font-size: 12px; color: #9ca3af; }

/* ===== 未登录提示 / 收费标准 ===== */
.login-hint {
  margin-bottom: 14px; padding: 12px 14px; border-radius: 10px;
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 14px;
}
.login-hint b { color: #ea580c; }
.fee-panel {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 26px; margin-bottom: 26px; box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
}
.fee-title { font-size: 17px; font-weight: 800; margin-bottom: 12px; }
.fee-list { list-style: none; display: grid; gap: 10px; }
.fee-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: #f8fafc; border-radius: 10px; font-size: 15px;
}
.fee-list li span { color: var(--text); font-weight: 600; }
.fee-list li b { color: var(--primary); font-size: 16px; }
.fee-note { margin-top: 14px; font-size: 13px; color: #9a3412; }

/* ===== 个人中心 ===== */
.profile-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
}
.profile-head .avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #10b981); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 22px;
}
.stat-row { display: flex; gap: 18px; margin-bottom: 26px; }
.stat {
  flex: 1; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-align: center;
}
.stat .v { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat .k { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ===== 登录弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5);
  display: grid; place-items: center; z-index: 100; padding: 20px;
}
.modal-mask.hidden { display: none; }
.modal {
  background: #fff; border-radius: 16px; width: 400px; max-width: 100%;
  padding: 30px; box-shadow: var(--shadow); position: relative;
}
.modal .close {
  position: absolute; top: 14px; right: 16px; border: none; background: none;
  font-size: 22px; color: var(--muted); cursor: pointer;
}
.modal h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.modal .sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.modal-tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.modal-tabs button {
  flex: 1; border: 1px solid var(--border); background: #fff; padding: 10px;
  border-radius: 10px; font-weight: 700; color: var(--muted);
}
.modal-tabs button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.modal .field { margin-bottom: 16px; }
.modal .tip { font-size: 12px; color: #9ca3af; margin-top: 14px; text-align: center; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; top: 28px; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 12px 22px; border-radius: 10px;
  font-weight: 600; z-index: 200; box-shadow: var(--shadow); transition: opacity .25s;
}
.toast.hidden { opacity: 0; pointer-events: none; }
.toast.ok { background: #059669; }
.toast.err { background: #dc2626; }

/* ===== 网站底部 ===== */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 18px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--primary); text-decoration: underline; }

/* ===== 登录守卫提示 ===== */
.guard {
  text-align: center; padding: 70px 20px; color: var(--muted);
}
.guard .big { font-size: 52px; margin-bottom: 12px; }

/* ===== 微信支付弹窗 ===== */
.pay-modal { text-align: center; }
.pay-amount {
  font-size: 34px; font-weight: 800; color: var(--primary);
  margin-bottom: 18px;
}
.pay-qrcode {
  width: 200px; height: 200px; margin: 0 auto 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  display: grid; place-items: center; overflow: hidden;
}
.pay-qrcode img { width: 180px; height: 180px; object-fit: contain; }
.pay-code {
  display: flex; gap: 8px; max-width: 320px; margin: 0 auto 12px;
}
.pay-code input {
  flex: 1; border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 10px; font-size: 12px; color: var(--muted);
}
.btn-sm { padding: 8px 12px; font-size: 13px; }
.pay-status {
  font-size: 14px; color: var(--muted); font-weight: 600;
}
.pay-status.ok { color: var(--car); }

/* ===== 充值订单页 ===== */
.order-panel {
  max-width: 420px; margin: 0 auto; background: var(--card);
  border: 1px solid var(--border); border-radius: 16px;
  padding: 26px 24px; text-align: center;
}
.order-panel .op-title {
  font-size: 18px; font-weight: 800; margin-bottom: 18px;
}
.order-panel .op-rows {
  border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; margin-bottom: 22px; text-align: left;
}
.order-panel .op-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 16px; font-size: 14px;
}
.order-panel .op-row + .op-row { border-top: 1px solid var(--border); }
.order-panel .op-row span { color: var(--muted); }
.order-panel .op-row b { font-weight: 700; }
.order-panel .btn-block + .btn-block { margin-top: 10px; }

@media (max-width: 980px) {
  .post-grid, .pkg-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
