/* 云署 deploy-worker 样式（2026-12-04 设计/PWA 棒重排）
 *
 * 品牌色板（与 static/img/logo.svg 一致）：
 * - 主色 云署蓝 #0b5fff，深色 #0848c4（悬停/渐变底），浅底 天青 #eaf1ff
 * - 墨色 #101828（页眉/标题），正文 #1a1a1a，次要 #6b7280
 * - 辅色 印章红 #e5484d（仅 LOGO 箭头与少量强调），底色 #f7f7f5，边框 #e3e3e0
 * 排版层级：正文 16px/1.65；h1 26px，h2 19px，h3 17px；meta/次要 13px。
 * 响应式断点：1024 / 768 / 480（覆盖 390px 手机）；表单字号 16px 防 iOS 聚焦放大；
 * 可点目标最小 44px；管理后台表格横向滚动。
 */
:root {
  --brand: #0b5fff;
  --brand-dark: #0848c4;
  --brand-soft: #eaf1ff;
  --ink: #101828;
  --text: #1a1a1a;
  --muted: #6b7280;
  --bg: #f7f7f5;
  --surface: #fff;
  --border: #e3e3e0;
  --border-soft: #f0f0ee;
  --danger: #b91c1c;
  --danger-bg: #fde8e8;
  --warn: #92400e;
  --warn-bg: #fef3c7;
  --success: #166534;
  --success-bg: #dcfce7;
  --seal: #e5484d;
  --radius: 10px;
  --radius-sm: 6px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--text); background: var(--bg); font-size: 16px; line-height: 1.65; }
a { color: var(--brand); text-decoration: none; overflow-wrap: anywhere; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
h1 { font-size: 26px; line-height: 1.3; margin: 0 0 10px; color: var(--ink); }
h2 { font-size: 19px; line-height: 1.35; margin: 0 0 10px; color: var(--ink); }
h3 { font-size: 17px; line-height: 1.4; margin: 0 0 6px; color: var(--ink); }
p { margin: 0 0 10px; }
ul, ol { margin: 0 0 10px; }
code { overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* ---- 页眉 / 品牌 / 导航 ---- */
.site-header { background: var(--ink); color: #fff; position: relative; }
.header-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 700; color: #fff; line-height: 1; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 32px; height: 32px; display: block; }
.tagline { color: #b6bcc8; font-size: 13px; flex: 1; min-width: 0; }
.main-nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.main-nav a { color: #fff; font-size: 15px; padding: 10px 12px; border-radius: var(--radius-sm); min-height: 44px; display: inline-flex; align-items: center; }
.main-nav a:hover { background: rgba(255, 255, 255, .1); text-decoration: none; }
.nav-user { color: #b6bcc8; font-size: 14px; padding: 10px 4px; }
.nav-toggle { display: none; margin-left: auto; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--radius-sm); background: transparent; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }

main.wrap { padding-top: 24px; padding-bottom: 48px; }
.site-footer { border-top: 1px solid var(--border); padding: 20px 0 28px; color: var(--muted); font-size: 13px; }
.site-footer p { margin: 0 0 6px; }

/* ---- 通用：次要文字 / 徽章 / 空态 / 提示 ---- */
.muted { color: var(--muted); font-size: 13px; }
.meta { color: var(--muted); font-size: 13px; margin: 4px 0; }
.badge { display: inline-block; font-size: 12px; line-height: 1.5; padding: 1px 8px; border-radius: 999px; background: #eee; color: #555; vertical-align: middle; white-space: nowrap; }
.badge-refund { background: var(--danger-bg); color: var(--danger); }
.badge-private { background: var(--warn-bg); color: var(--warn); }
.empty { color: var(--muted); background: var(--surface); border: 1px dashed #ccc; border-radius: var(--radius); padding: 24px 16px; text-align: center; }
.form-error { color: var(--danger); background: var(--danger-bg); padding: 10px 12px; border-radius: var(--radius-sm); }
.notice { background: var(--warn-bg); color: var(--warn); padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; }
.refund-line { color: var(--danger); }
.stars { color: #d97706; letter-spacing: 1px; white-space: nowrap; }

/* ---- 按钮 ---- */
button { min-height: 44px; padding: 10px 20px; border: 0; border-radius: var(--radius-sm); background: var(--brand); color: #fff; cursor: pointer; font-size: 16px; line-height: 1.4; }
button:hover { background: var(--brand-dark); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border-radius: var(--radius-sm); background: var(--brand); color: #fff; font-size: 16px; line-height: 1.4; }
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn-ghost { background: var(--surface); color: var(--brand); border: 1px solid var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); }

/* ---- 首页 Hero / 统计 / 筛选 / 需求墙 / 口碑 ---- */
.hero { background: linear-gradient(135deg, var(--brand-soft), #fff 70%); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; margin-bottom: 20px; }
.hero h1 { font-size: 28px; margin-bottom: 8px; }
.hero p { color: #3f4756; max-width: 640px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.stats > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.stats strong { display: block; font-size: 24px; line-height: 1.25; color: var(--ink); overflow-wrap: anywhere; }
.stats span { color: var(--muted); font-size: 13px; line-height: 1.4; display: block; margin-top: 2px; }
.filters { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }
.filters form { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.filters select, .filters input { flex: 1 1 140px; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #ccc; border-radius: var(--radius-sm); background: #fff; font-size: 16px; }
.demand-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.demand-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-width: 0; }
.demand-card:hover { border-color: #c9d6f2; box-shadow: 0 2px 8px rgba(16, 24, 40, .06); }
.demand-card h3 { font-size: 17px; overflow-wrap: anywhere; }
.demand-card h3 a { color: var(--ink); }
.demand-card h3 a:hover { color: var(--brand); }
.reputation { margin-top: 28px; }
.reputation h2 { margin-bottom: 8px; }
.reviews { list-style: none; padding: 0; }
.reviews li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; overflow-wrap: anywhere; }

/* ---- 表单页（登录 / 注册 / 发布 / 管理） ---- */
.auth-form, .publish-form { max-width: 560px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 0 auto; }
.auth-logo, .about-logo, .maintenance-logo { text-align: center; margin: 0 0 8px; }
.auth-logo img, .about-logo img, .maintenance-logo img { display: inline-block; }
.auth-form h1, .publish-form h1 { text-align: center; }
.auth-form label, .publish-form label { display: block; margin-bottom: 14px; font-size: 15px; }
.auth-form input, .publish-form input, .publish-form textarea, .publish-form select { display: block; width: 100%; margin-top: 4px; min-height: 44px; padding: 10px 12px; border: 1px solid #ccc; border-radius: var(--radius-sm); font-size: 16px; background: #fff; }
.publish-form textarea { min-height: 96px; }
.publish-form fieldset { border: 1px solid #ddd; border-radius: var(--radius-sm); margin: 0 0 14px; padding: 12px; }
.publish-form fieldset legend { font-size: 14px; font-weight: 600; padding: 0 6px; }
.publish-form label.radio { display: flex; gap: 8px; align-items: center; min-height: 44px; }
.publish-form label.radio input { width: auto; min-height: 0; }
.publish-form label.inline select { width: auto; display: inline-block; }
.auth-form button, .publish-form button { width: 100%; }

/* ---- 需求详情页 ---- */
.demand-detail > h1 { overflow-wrap: anywhere; }
.demand-detail section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; min-width: 0; }
.demand-detail section h2 { font-size: 18px; padding-bottom: 8px; border-bottom: 1px solid var(--border-soft); margin-bottom: 12px; }
.demand-detail section ul { list-style: none; padding: 0; }
.demand-detail section ul li { padding: 6px 0; border-bottom: 1px solid var(--border-soft); overflow-wrap: anywhere; }
.demand-detail section ul li:last-child { border-bottom: 0; }
.demand-detail section ol { padding-left: 20px; }
.demand-detail form { margin-top: 12px; }
.demand-detail form label { display: block; margin-bottom: 10px; font-size: 15px; }
.demand-detail form input, .demand-detail form textarea, .demand-detail form select { display: block; width: 100%; margin-top: 4px; min-height: 44px; padding: 10px 12px; border: 1px solid #ccc; border-radius: var(--radius-sm); font-size: 16px; background: #fff; }
.demand-detail form textarea { min-height: 88px; }
.demand-detail label.inline select { width: auto; display: inline-block; }
.demand-detail details { margin-top: 12px; }
.demand-detail summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--brand); }
.delivery { border-top: 1px solid var(--border-soft); padding-top: 14px; margin-top: 14px; }
.delivery:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.delivery h3 { overflow-wrap: anywhere; }
.delivery-logo { max-width: 200px; display: block; margin-top: 6px; }
.timeline { padding-left: 20px; border-left: 2px solid var(--border); margin-left: 4px; }
.timeline li { margin-bottom: 12px; overflow-wrap: anywhere; }

/* ---- 静态页 / 用户主页 / 我的需求 ---- */
.static-page { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; overflow-wrap: anywhere; }
.user-profile h1 { overflow-wrap: anywhere; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid #ddd; margin: 16px 0; overflow-x: auto; }
.tabs a { padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; color: #555; white-space: nowrap; }
.tabs a.active { color: var(--brand); border-bottom: 2px solid var(--brand); margin-bottom: -2px; font-weight: 600; }
.my-demands { list-style: none; padding: 0; }
.my-demands li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; overflow-wrap: anywhere; }

/* ---- 支付页（易支付三通道，图标-only） ---- */
.pay-page { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.pay-page h1 { margin-top: 0; }
.pay-order-summary { list-style: none; padding: 0; }
.pay-order-summary li { padding: 6px 0; border-bottom: 1px solid var(--border-soft); overflow-wrap: anywhere; }
.deposit-notice { background: var(--warn-bg); border: 1px solid #f59e0b; color: var(--warn); border-radius: var(--radius-sm); padding: 10px 12px; font-weight: 600; }
.pay-warning { background: var(--warn-bg); border: 1px solid #f59e0b; color: var(--warn); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; }
.pay-saved { background: var(--success-bg); border: 1px solid #16a34a; color: var(--success); border-radius: var(--radius-sm); padding: 10px 12px; }
.pay-methods { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0; }
.pay-method-form { margin: 0; }
.pay-method { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; cursor: pointer; line-height: 0; min-width: 88px; min-height: 88px; display: inline-flex; align-items: center; justify-content: center; }
.pay-method:hover { border-color: var(--brand); background: var(--bg); }
.pay-method img { width: 56px; height: 56px; display: block; }
.pay-method-icon { width: 22px; height: 22px; vertical-align: middle; }
.pay-done { background: var(--success-bg); border-radius: var(--radius-sm); padding: 10px 12px; }
.pay-order-list h3 { margin: 16px 0 6px; font-size: 15px; }
.order-list { list-style: none; padding: 0; }
.order-list li { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 8px; }
.order-no { font-family: ui-monospace, monospace; font-size: 13px; overflow-wrap: anywhere; }
.order-amount { font-weight: 700; white-space: nowrap; }
.order-status { color: #555; font-size: 14px; }

/* ---- 管理后台 ---- */
.admin-form, .admin-card { max-width: 720px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 14px; }
.admin-form label, .admin-card label { display: block; margin-bottom: 12px; font-size: 15px; }
.admin-form input, .admin-form textarea, .admin-form select,
.admin-card input, .admin-card textarea, .admin-card select { display: block; width: 100%; margin-top: 4px; min-height: 44px; padding: 10px 12px; border: 1px solid #ccc; border-radius: var(--radius-sm); font-size: 16px; background: #fff; }
.admin-form textarea, .admin-card textarea { min-height: 88px; }
.admin-form fieldset, .admin-card fieldset { border: 1px solid #ddd; border-radius: var(--radius-sm); margin: 0 0 14px; padding: 12px; }
.admin-form fieldset legend { font-size: 14px; font-weight: 600; padding: 0 6px; }
.admin-form label.radio { display: flex; gap: 8px; align-items: center; min-height: 44px; }
.admin-form label.radio input { width: auto; min-height: 0; }
.admin-form label.inline select { width: auto; display: inline-block; }
.admin-card ul { list-style: none; padding: 0; }
.admin-card ul li { padding: 6px 0; border-bottom: 1px solid var(--border-soft); overflow-wrap: anywhere; }
.admin-card ul li:last-child { border-bottom: 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.admin-table { width: 100%; min-width: 720px; border-collapse: collapse; background: var(--surface); font-size: 14px; }
.admin-table th, .admin-table td { border-bottom: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.admin-table th { background: var(--bg); white-space: nowrap; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin .filters { margin-bottom: 14px; }
.admin h1 { overflow-wrap: anywhere; }

/* ---- 维护页 ---- */
.maintenance h1 { text-align: center; }
.maintenance p { text-align: center; }

/* ---- 响应式 ---- */
@media (max-width: 1024px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 900px) {
  .tagline { display: none; }
}
@media (max-width: 768px) {
  h1 { font-size: 22px; }
  .hero { padding: 20px 16px; }
  .hero h1 { font-size: 24px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; margin-left: 0; border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 8px; padding-top: 8px; }
  .main-nav.nav-open { display: flex; }
  .main-nav a, .nav-user { min-height: 44px; padding: 10px 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .main-nav a:last-child { border-bottom: 0; }
  .demand-detail section, .admin-form, .admin-card, .pay-page, .static-page { padding: 16px; }
  .auth-form, .publish-form { padding: 20px 16px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  main.wrap { padding-top: 16px; padding-bottom: 32px; }
  .hero { padding: 18px 14px; }
  .hero h1 { font-size: 22px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stats > div { padding: 12px; }
  .stats strong { font-size: 20px; }
  .filters select, .filters input { flex: 1 1 100%; }
  .filters button { flex: 1 1 100%; }
  .hero-actions .btn { flex: 1 1 100%; }
  .demand-wall { grid-template-columns: 1fr; }
  .pay-methods { gap: 12px; }
  .pay-method { min-width: 80px; min-height: 80px; }
  .pay-method img { width: 48px; height: 48px; }
  .order-list li { gap: 8px; }
}
