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

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --danger: #ef4444;
  --green: #22c55e;
  --orange: #f97316;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { max-width: 800px; margin: 0 auto; padding: 0 16px; width: 100%; }

/* 导航 */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.nav-container { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 20px; font-weight: 700; color: var(--primary); text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 12px; }

.nav-link-btn {
  position: relative;
  font-size: 14px;
  color: var(--gray-700);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius);
}
.nav-link-btn:hover { background: var(--gray-100); }
.badge {
  position: absolute;
  top: -2px; right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  padding: 0 4px;
}

.nav-user { position: relative; cursor: pointer; }
.nav-nickname { font-weight: 500; padding: 6px 12px; border-radius: var(--radius); }
.nav-user:hover .nav-nickname { background: var(--gray-100); }
.dropdown {
  display: none; position: absolute; right: 0; top: 100%;
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius);
  box-shadow: var(--shadow-md); min-width: 120px; z-index: 200;
}
.nav-user:hover .dropdown { display: block; }
.dropdown a { display: block; padding: 8px 16px; color: var(--gray-700); text-decoration: none; font-size: 14px; }
.dropdown a:hover { background: var(--gray-50); }

/* 按钮 */
.btn { display: inline-block; padding: 8px 16px; border-radius: var(--radius); font-size: 14px; font-weight: 500; text-decoration: none; border: none; cursor: pointer; transition: all 0.2s; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: #fff; color: var(--gray-700); border: 1px solid var(--gray-300); }
.btn-outline:hover { background: var(--gray-50); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-take {
  background: var(--green); color: #fff; font-weight: 600;
  white-space: nowrap; align-self: center; flex-shrink: 0;
}
.btn-take:hover { background: #16a34a; }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: #ea580c; }
.complete-hint { font-size: 14px; color: var(--gray-500); margin-bottom: 10px; }
.complete-actions { display: flex; gap: 12px; }

/* 发单类型选择 */
.service-type-select { display: flex; gap: 16px; justify-content: center; padding: 20px 0; }
.service-btn { min-width: 120px; padding: 16px 24px; font-size: 16px; }
.service-btn:hover { border-color: var(--primary); color: var(--primary); }

/* 跑图信息 */
.service-info-box {
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: var(--radius);
  padding: 16px; margin-bottom: 20px;
}
.service-info-box h4 { margin: 0 0 8px; color: #1d4ed8; }
.service-info-box p { margin: 4px 0; font-size: 14px; color: var(--gray-700); }

/* 英雄区 */
.hero { text-align: center; padding: 32px 0 20px; }
.hero h1 { font-size: 26px; margin-bottom: 6px; }
.hero p { color: var(--gray-500); }

/* 订单列表 */
.order-list { display: flex; flex-direction: column; gap: 8px; }
.order-card {
  display: flex; gap: 12px; background: #fff; border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); transition: box-shadow 0.2s;
  align-items: flex-start; justify-content: space-between; cursor: pointer;
}
.order-card:hover { box-shadow: var(--shadow-md); }
.order-body { flex: 1; min-width: 0; }
.order-title { display: block; font-size: 15px; font-weight: 600; color: var(--gray-900); text-decoration: none; margin-bottom: 4px; }
.order-title:hover { color: var(--primary); }
.order-desc { font-size: 13px; color: var(--gray-500); margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-meta { display: flex; gap: 12px; font-size: 12px; color: var(--gray-500); align-items: center; flex-wrap: wrap; }
.order-author { color: var(--primary); text-decoration: none; font-weight: 500; }
.order-author:hover { text-decoration: underline; }
.order-price { color: var(--orange); font-weight: 600; font-size: 13px; }
.order-pay-tag {
  display: inline-block; padding: 1px 6px; border-radius: 3px;
  font-size: 11px; font-weight: 600;
}
.pay-now { background: #dcfce7; color: #16a34a; }
.pay-later { background: #fef3c7; color: #d97706; }
.order-closed { color: var(--danger); font-weight: 500; }

/* 分页 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 24px 0; }
.page-info { color: var(--gray-500); font-size: 14px; }

/* 帖子详情 */
.post-detail { background: #fff; border-radius: var(--radius); padding: 24px; margin: 20px 0; box-shadow: var(--shadow); }
.post-header { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--gray-200); }
.post-header h1 { font-size: 22px; margin: 10px 0; }
.post-info { display: flex; gap: 16px; font-size: 13px; color: var(--gray-500); }
.author-link { color: var(--primary); text-decoration: none; font-weight: 500; }
.author-link:hover { text-decoration: underline; }
.post-price-box {
  padding: 12px 16px; background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--radius); font-size: 16px; margin-bottom: 16px;
}
.post-detail-tags {
  display: flex; gap: 10px; align-items: center; margin-bottom: 16px;
}
.detail-price {
  font-size: 18px; font-weight: 600; color: var(--orange);
}
.post-content { font-size: 15px; line-height: 1.8; white-space: pre-wrap; margin-bottom: 20px; }
.post-bottom { padding-top: 16px; border-top: 1px solid var(--gray-200); }
.post-actions { margin-top: 12px; display: flex; gap: 8px; }

/* 聊天 */
.chat-page { margin: 20px 0; display: flex; flex-direction: column; }
.chat-header {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fff; border-radius: var(--radius); padding: 14px 16px;
  margin-bottom: 12px; box-shadow: var(--shadow);
}
.chat-header-info { flex: 1; }
.chat-header-info h2 { font-size: 17px; margin: 0; }
.chat-post-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.chat-post-tag { font-size: 13px; color: var(--gray-500); }
.chat-post-tag a { color: var(--primary); text-decoration: none; }
.chat-post-tag a:hover { text-decoration: underline; }
.drag-hint {
  display: none; text-align: center; padding: 12px; margin-bottom: 8px;
  background: #eff6ff; border: 2px dashed #93c5fd; border-radius: var(--radius);
  color: #3b82f6; font-size: 14px;
}
.upload-btn { cursor: pointer; padding: 6px 10px; font-size: 16px; }
.upload-area {
  border: 2px dashed var(--gray-300); border-radius: var(--radius);
  padding: 16px; margin-top: 8px; transition: border-color 0.2s;
}
.upload-area:hover { border-color: var(--primary); }
.upload-form { display: flex; flex-direction: column; gap: 8px; }
.upload-actions { display: flex; gap: 8px; align-items: center; }
.url-input-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.url-or { font-size: 12px; color: var(--gray-500); white-space: nowrap; }
.url-input { flex: 1; padding: 6px 10px; border: 1px solid var(--gray-300); border-radius: var(--radius); font-size: 13px; outline: none; }
.url-input:focus { border-color: var(--primary); }
.preview-bar {
  display: none; align-items: center; gap: 10px; padding: 8px 12px;
  margin-bottom: 8px; background: var(--gray-50); border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}
.preview-thumb { width: 48px; height: 48px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.preview-thumb img { width: 100%; height: 100%; object-fit: cover; }
.preview-name { flex: 1; font-size: 13px; color: var(--gray-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-remove {
  width: 28px; height: 28px; border: none; background: var(--gray-200);
  border-radius: 50%; cursor: pointer; font-size: 14px; color: var(--gray-700);
  display: flex; align-items: center; justify-content: center;
}
.preview-remove:hover { background: #fee2e2; color: var(--danger); }
.chat-post-tag a { color: var(--primary); text-decoration: none; }
.chat-post-tag a:hover { text-decoration: underline; }

.chat-messages {
  background: #fff; border-radius: var(--radius); padding: 16px;
  min-height: 350px; max-height: 55vh; overflow-y: auto;
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.chat-empty { text-align: center; padding: 60px 20px; color: var(--gray-500); }
.chat-date {
  text-align: center; font-size: 12px; color: var(--gray-500);
  margin: 12px 0; position: relative;
}
.chat-date::before, .chat-date::after {
  content: ''; position: absolute; top: 50%; width: 30%;
  height: 1px; background: var(--gray-200);
}
.chat-date::before { left: 0; }
.chat-date::after { right: 0; }

.chat-bubble { margin-bottom: 14px; max-width: 75%; }
.bubble-mine { margin-left: auto; text-align: right; }
.bubble-other { margin-right: auto; }
.bubble-name { font-size: 12px; color: var(--gray-500); margin-bottom: 3px; }
.bubble-content {
  display: inline-block; padding: 10px 14px; border-radius: 14px;
  font-size: 14px; line-height: 1.5; text-align: left; word-break: break-word;
}
.bubble-mine .bubble-content { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.bubble-other .bubble-content { background: var(--gray-100); color: var(--gray-900); border-bottom-left-radius: 4px; }
.bubble-time { font-size: 11px; color: var(--gray-500); margin-top: 3px; }

.chat-input {
  display: flex; gap: 8px; background: #fff;
  border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow);
  align-items: flex-end;
}
.chat-input textarea {
  flex: 1; padding: 10px 12px; border: 1px solid var(--gray-300);
  border-radius: var(--radius); font-size: 14px; resize: none; font-family: inherit; outline: none;
}
.chat-input textarea:focus { border-color: var(--primary); }

/* 聊天工具栏和图片上传 */
.chat-input-area {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 16px;
}
.chat-toolbar { display: flex; gap: 8px; margin-bottom: 8px; }
.img-upload-row { margin-bottom: 8px; }
.img-upload-form { display: flex; gap: 8px; }
.img-upload-form input[type="text"] {
  flex: 1; padding: 8px 12px; border: 1px solid var(--gray-300);
  border-radius: var(--radius); font-size: 14px; outline: none;
}
.img-upload-form input:focus { border-color: var(--primary); }

/* 接单请求气泡 */
.bubble-system { max-width: 90%; margin: 0 auto 14px; text-align: center; }
.bubble-order {
  background: #fefce8; border: 1px solid #fde68a; border-radius: 12px;
  padding: 16px; text-align: center;
}
.order-request-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.order-request-info { font-size: 14px; color: var(--gray-700); margin-bottom: 8px; }
.order-request-status { font-size: 13px; color: var(--gray-500); margin-bottom: 8px; }
.status-agreed { color: var(--green); font-weight: 600; }
.status-rejected { color: var(--danger); font-weight: 600; }
.order-request-actions { display: flex; gap: 10px; justify-content: center; }

/* 图片消息 */
.bubble-image { padding: 4px; background: #fff; border: 1px solid var(--gray-200); }
.bubble-image img { max-width: 240px; max-height: 240px; border-radius: 8px; display: block; }
.bubble-image a { display: block; }

.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #16a34a; }

/* 图片灯箱 */
.lightbox {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.85); z-index: 9999; align-items: center; justify-content: center;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 90%; max-height: 90%; object-fit: contain; border-radius: 8px;
  cursor: default;
}
.lightbox-close {
  position: absolute; top: 16px; right: 20px; width: 40px; height: 40px;
  border: none; background: rgba(255,255,255,0.2); color: #fff;
  font-size: 20px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,0.4); }
.chat-img { cursor: zoom-in; }

/* 我的订单 */
.my-orders-page { margin: 20px 0; }
.my-orders-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.my-orders-header h2 { margin: 0; }
.my-stats {
  display: flex; gap: 0; background: #fff; border-radius: var(--radius);
  margin-bottom: 20px; box-shadow: var(--shadow); overflow: hidden;
}
.order-taker { font-size: 12px; color: var(--gray-500); }
.order-taker a { color: var(--primary); text-decoration: none; }
.order-taker a:hover { text-decoration: underline; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none; padding: 8px 0;
}
.section-header h3 { margin: 0; }
.section-arrow { font-size: 16px; color: var(--gray-500); }

/* 消息列表 */
.messages-page { margin: 20px 0; }
.messages-page h2 { margin-bottom: 16px; font-size: 20px; }
.messages-empty { text-align: center; padding: 60px 20px; color: var(--gray-500); }
.messages-hint { font-size: 13px; margin-top: 8px; color: var(--gray-300); }

.conversation-list { display: flex; flex-direction: column; gap: 4px; }
.conversation-item {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: var(--radius); padding: 14px 16px;
  text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: background 0.15s;
}
.conversation-item:hover { background: var(--gray-50); }
.conversation-item.has-unread { background: #eef2ff; }
.conversation-item.has-unread:hover { background: #e0e7ff; }
.conv-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 18px; flex-shrink: 0;
}
.conv-body { flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.conv-name { font-weight: 600; font-size: 15px; color: var(--gray-900); }
.conv-time { font-size: 12px; color: var(--gray-500); flex-shrink: 0; }
.conv-msg { font-size: 13px; color: var(--gray-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-badge {
  background: var(--danger); color: #fff; font-size: 12px; font-weight: 600;
  min-width: 22px; height: 22px; line-height: 22px; text-align: center;
  border-radius: 11px; padding: 0 6px; flex-shrink: 0;
}

/* 表单 */
.form-page {
  background: #fff; border-radius: var(--radius); padding: 24px;
  margin: 20px auto; box-shadow: var(--shadow); max-width: 560px;
}
.form-page h2 { margin-bottom: 20px; font-size: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 14px; color: var(--gray-700); }
.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius);
  font-size: 14px; font-family: inherit; outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; }
.radio-group { display: flex; gap: 20px; flex-wrap: wrap; }
.radio-label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; }
.field-error { display: block; color: var(--danger); font-size: 13px; margin-top: 4px; }
.form-row { display: flex; gap: 16px; }
.form-half { flex: 1; min-width: 0; }

/* 认证 */
.auth-page { display: flex; justify-content: center; align-items: center; min-height: 60vh; }
.auth-card { background: #fff; border-radius: var(--radius); padding: 32px; width: 100%; max-width: 380px; box-shadow: var(--shadow-md); }
.auth-card-wide { max-width: 440px; }
.email-row { display: flex; gap: 8px; }
.email-row input { flex: 1; }
.email-row .btn { white-space: nowrap; flex-shrink: 0; }
.password-row { position: relative; }
.password-row input { width: 100%; padding-right: 42px; }
.btn-eye {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: none; background: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--gray-500); border-radius: var(--radius);
}
.btn-eye:hover { color: var(--gray-900); background: var(--gray-100); }
.auth-card h2 { text-align: center; margin-bottom: 24px; font-size: 22px; }
.auth-link { text-align: center; margin-top: 16px; font-size: 14px; color: var(--gray-500); }
.auth-link a { color: var(--primary); }

/* 个人主页 */
.profile-page { margin: 20px 0; }
.profile-header {
  display: flex; gap: 20px; align-items: center;
  background: #fff; border-radius: var(--radius); padding: 24px;
  margin-bottom: 20px; box-shadow: var(--shadow);
}
.avatar-placeholder {
  width: 64px; height: 64px; border-radius: 50%; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 600;
}
.profile-info h2 { margin-bottom: 2px; }
.profile-username { color: var(--gray-500); font-size: 14px; margin-bottom: 2px; }
.profile-email { color: var(--gray-500); font-size: 13px; margin-bottom: 4px; }
.profile-meta { color: var(--gray-500); font-size: 13px; margin-bottom: 10px; }
.profile-actions { display: flex; gap: 8px; }
.profile-stats {
  display: flex; gap: 0; background: #fff; border-radius: var(--radius);
  margin-bottom: 20px; box-shadow: var(--shadow); overflow: hidden;
}
.stat-item {
  flex: 1; text-align: center; padding: 16px 12px;
  border-right: 1px solid var(--gray-200);
}
.stat-item:last-child { border-right: none; }
.stat-num { display: block; font-size: 22px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--gray-500); }
.order-open { color: var(--green); font-weight: 500; font-size: 12px; }
.field-hint { display: block; font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.taken-tag { background: #dbeafe; color: #1d4ed8; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 3px; }
.settled-tag { background: #dcfce7; color: #16a34a; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 3px; }
.unsettled-tag { background: #fef3c7; color: #d97706; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 3px; }
.settle-orders-summary {
  background: #fff; border-radius: var(--radius); padding: 16px 20px;
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.settle-orders-summary h4 { margin: 0 0 10px; font-size: 15px; color: var(--gray-700); }
.btn-settle { background: var(--orange); color: #fff; font-size: 12px; padding: 2px 8px; }
.btn-settle:hover { background: #ea580c; }

/* 接单人 */
.taker-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.taker-card {
  background: #fff; border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); border-left: 4px solid var(--primary);
}
.taker-header {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none; padding: 4px 0;
  transition: background 0.15s; border-radius: 4px;
}
.taker-header:hover { background: var(--gray-50); }
.taker-summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.taker-name { font-weight: 600; font-size: 15px; color: var(--primary); text-decoration: none; }
.taker-name:hover { text-decoration: underline; }
.taker-count { font-size: 14px; color: var(--gray-700); }
.taker-total { font-size: 14px; color: var(--orange); font-weight: 600; }
.taker-unsettled { font-size: 13px; color: var(--danger); font-weight: 500; }
.taker-arrow { font-size: 16px; color: var(--gray-500); transition: transform 0.2s; flex-shrink: 0; }
.taker-orders { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--gray-100); margin-top: 8px; }
.taker-order-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 6px 0; font-size: 13px;
}
.taker-order-title { color: var(--gray-900); text-decoration: none; font-weight: 500; }
.taker-order-title:hover { color: var(--primary); }

/* 结算页面 */
.settle-page { margin: 20px auto; max-width: 640px; }
.settle-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.settle-header h2 { margin: 0; flex: 1; }
.settle-info {
  background: #fff; border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); margin-bottom: 20px;
}
.settle-info h3 { margin: 0 0 10px; font-size: 18px; }
.settle-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.settle-parties { display: flex; gap: 20px; font-size: 14px; color: var(--gray-700); flex-wrap: wrap; }

.settle-step {
  background: #fff; border-radius: var(--radius); padding: 16px 20px;
  box-shadow: var(--shadow); margin-bottom: 12px;
  border-left: 4px solid var(--gray-300);
}
.settle-step.step-done { border-left-color: var(--green); }
.step-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--gray-200);
  color: var(--gray-700); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.step-done .step-num { background: var(--green); color: #fff; }
.step-title { font-weight: 600; font-size: 15px; flex: 1; }
.step-check { color: var(--green); font-weight: 500; font-size: 14px; }

.receipt-preview {
  margin: 10px 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--gray-200); max-height: 300px;
}
.receipt-preview img { width: 100%; display: block; object-fit: contain; max-height: 300px; }
.receipt-link { padding: 10px; font-size: 13px; color: var(--gray-500); }
.receipt-link a { color: var(--primary); }

.receipt-form { display: flex; gap: 8px; }
.receipt-form input { flex: 1; padding: 8px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius); font-size: 14px; outline: none; }
.receipt-form input:focus { border-color: var(--primary); }

.settle-admin {
  background: #fff; border-radius: var(--radius); padding: 16px 20px;
  box-shadow: var(--shadow); text-align: center; margin-top: 20px;
  border: 1px solid #fca5a5;
}
.settle-admin p { margin-bottom: 10px; color: var(--gray-500); font-size: 14px; }

.settle-done {
  background: #fff; border-radius: var(--radius); padding: 40px 20px;
  box-shadow: var(--shadow); text-align: center;
}
.settle-done-icon { font-size: 48px; margin-bottom: 10px; }
.settle-done h3 { color: var(--green); margin-bottom: 8px; }
.settle-done p { color: var(--gray-500); }
.settle-time { font-size: 13px; color: var(--gray-500); margin-top: 4px; }

/* 警告 */
.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #16a34a; border: 1px solid #86efac; }

.empty { text-align: center; padding: 40px; color: var(--gray-500); }
.error-page { text-align: center; padding: 80px 0; }
.error-page h1 { font-size: 72px; color: var(--gray-300); }
.error-page p { font-size: 18px; color: var(--gray-500); margin: 16px 0 24px; }

.footer { margin-top: auto; padding: 20px 0; text-align: center; color: var(--gray-500); font-size: 13px; border-top: 1px solid var(--gray-200); }

.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.tag-red { background: #fee2e2; color: #dc2626; }
.tag-green { background: #dcfce7; color: #16a34a; }

hr { border: none; border-top: 1px solid var(--gray-200); margin: 16px 0; }

/* 管理后台 */
.admin-page { margin: 20px 0; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.admin-header h2 { margin: 0; }
.admin-table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { background: var(--gray-50); padding: 10px 12px; text-align: left; font-weight: 600; color: var(--gray-700); border-bottom: 2px solid var(--gray-200); white-space: nowrap; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.admin-table tr:hover { background: var(--gray-50); }
.row-banned { opacity: 0.6; }
.role-tag, .status-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.role-admin { background: #ede9fe; color: #7c3aed; }
.role-user { background: var(--gray-100); color: var(--gray-700); }
.status-active { background: #dcfce7; color: #16a34a; }
.status-banned { background: #fee2e2; color: #dc2626; }
.ban-reason { display: block; font-size: 11px; color: var(--gray-500); margin-top: 2px; }
.action-cell { white-space: nowrap; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ban-form { display: inline-flex; gap: 4px; align-items: center; }
.ban-reason-input { padding: 4px 8px; border: 1px solid var(--gray-300); border-radius: 4px; font-size: 12px; width: 100px; }
.text-muted { color: var(--gray-300); }

@media (max-width: 640px) {
  .hero h1 { font-size: 20px; }
  .order-card { padding: 10px 12px; }
  .chat-header { flex-direction: column; align-items: flex-start; }
  .chat-messages { min-height: 250px; max-height: 50vh; }
  .profile-header { flex-direction: column; text-align: center; }
}

/* 选项卡 */
.tab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--gray-200);
}
.tab-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.tab-btn:hover {
  color: var(--gray-700);
}
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-content {
  min-height: 100px;
}

.tag-yellow {
  background: #fef3c7;
  color: #d97706;
}
