/* 小蜜蜂家庭维修 - 白黄主题设计系统 */
:root {
  --brand: #FFB800;
  --brand-deep: #E09E00;
  --brand-light: #FFF7E0;
  --ink: #222222;
  --ink-2: #555555;
  --ink-3: #999999;
  --line: #EEEEEE;
  --bg: #F7F7F5;
  --card: #FFFFFF;
  --green: #2BA24C;
  --red: #E5484D;
  --blue: #3B82F6;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.topbar {
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 0 32px; height: 64px; display: flex; align-items: center; gap: 24px;
  position: sticky; top: 0; z-index: 50;
}
.logo { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.logo .bee { font-size: 28px; }
.logo-img { width: 36px; height: 36px; object-fit: contain; display: block; }
.topbar .nav { display: flex; gap: 8px; margin-left: 24px; }
.topbar .nav a { padding: 8px 16px; border-radius: 10px; color: var(--ink-2); font-weight: 500; }
.topbar .nav a.active, .topbar .nav a:hover { background: var(--brand-light); color: var(--brand-deep); }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.userchip { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; cursor: pointer; font-size: 15px; font-weight: 600;
  border-radius: 12px; padding: 10px 22px; transition: all .15s;
  background: var(--brand); color: #3A2B00;
}
.btn:hover { background: var(--brand-deep); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.big { font-size: 17px; padding: 14px 34px; border-radius: 14px; }
.btn.ghost { background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand-deep); background: #fff; }
.btn.danger { background: #FDECEC; color: var(--red); }
.btn.danger:hover { background: var(--red); color: #fff; }
.btn.small { padding: 6px 14px; font-size: 13px; border-radius: 9px; }

.container { max-width: 1080px; margin: 0 auto; padding: 28px 24px 64px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.page-title { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.page-sub { color: var(--ink-3); margin-bottom: 24px; }

/* 首页 hero */
.hero { text-align: center; padding: 40px 0 12px; }
.hero h1 { font-size: 34px; font-weight: 900; letter-spacing: 1px; }
.hero h1 em { font-style: normal; color: var(--brand-deep); }
.hero p { color: var(--ink-3); margin-top: 8px; font-size: 16px; }

/* 分类宫格 */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 24px; }
.cat-item {
  background: var(--card); border: 2px solid transparent; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 8px 16px; text-align: center; cursor: pointer;
  transition: all .15s;
}
.cat-item:hover { border-color: var(--brand); transform: translateY(-2px); }
.cat-item.selected { border-color: var(--brand); background: var(--brand-light); }
.cat-item .icon { font-size: 36px; }
.cat-item .name { font-weight: 700; margin-top: 8px; }
.cat-item .desc { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* 表单 */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 8px; }
.field label .req { color: var(--red); margin-left: 2px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font-size: 15px; outline: none; background: #fff; font-family: inherit;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); }
.field textarea { resize: vertical; min-height: 90px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.photo-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.photo-box {
  width: 108px; height: 108px; border-radius: 12px; overflow: hidden; position: relative;
  border: 1.5px solid var(--line); background: #fafafa;
}
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-box .del {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; border: none; cursor: pointer; font-size: 12px;
}
.photo-add {
  width: 108px; height: 108px; border-radius: 12px; border: 2px dashed #D8D8D8;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--ink-3); cursor: pointer; background: #fff; font-size: 13px; gap: 4px;
}
.photo-add:hover { border-color: var(--brand); color: var(--brand-deep); }
.photo-add .plus { font-size: 26px; }

/* 步骤指示 */
.steps { display: flex; align-items: center; justify-content: center; gap: 0; margin: 20px 0 28px; }
.step { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-weight: 600; }
.step .dot {
  width: 28px; height: 28px; border-radius: 50%; background: #E8E8E8; color: #999;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.step.active { color: var(--brand-deep); }
.step.active .dot { background: var(--brand); color: #3A2B00; }
.step-bar { width: 60px; height: 2px; background: #E8E8E8; margin: 0 10px; }

/* 订单卡片 */
.order-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; margin-bottom: 14px; display: flex; align-items: center; gap: 18px; }
.order-card .cat-icon { font-size: 34px; }
.order-card .main { flex: 1; min-width: 0; }
.order-card .title { font-weight: 700; font-size: 16px; }
.order-card .meta { color: var(--ink-3); font-size: 13px; margin-top: 4px; display: flex; gap: 16px; flex-wrap: wrap; }
.order-card .amount { font-size: 20px; font-weight: 800; color: var(--red); white-space: nowrap; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.pending { background: #FFF3D6; color: #9A6B00; }
.badge.assigned { background: #E8F1FF; color: #2563EB; }
.badge.accepted, .badge.checked_in { background: #E6F7EB; color: #1F7A3D; }
.badge.quoted { background: #F3E8FF; color: #7C3AED; }
.badge.paid, .badge.in_progress { background: #FFF7E0; color: #B87700; }
.badge.wait_accept { background: #FFEFE5; color: #C2410C; }
.badge.completed, .badge.reviewed { background: #E6F7EB; color: #1F7A3D; }
.badge.canceled { background: #F0F0F0; color: #888; }

/* 时间线 */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item::before {
  content: ''; position: absolute; left: -22px; top: 6px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--brand); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--brand);
}
.tl-item .t-title { font-weight: 700; }
.tl-item .t-time { font-size: 12px; color: var(--ink-3); }
.tl-item .t-note { color: var(--ink-2); font-size: 14px; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal { background: #fff; border-radius: 18px; padding: 28px; width: 420px; max-width: 92vw; max-height: 90vh; overflow: auto; position: relative; }
.modal h3 { font-size: 20px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.modal h3 .logo-img { width: 28px; height: 28px; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  border: none; background: #F5F5F5; color: var(--ink-2); font-size: 16px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.modal-close:hover { background: #EAEAEA; color: var(--ink); transform: rotate(90deg); }

.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 2px solid var(--line); }
.tabs button { border: none; background: none; padding: 10px 18px; font-size: 15px; font-weight: 600; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tabs button.active { color: var(--brand-deep); border-bottom-color: var(--brand); }

table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th, table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
table.tbl th { color: var(--ink-3); font-weight: 600; background: #FAFAFA; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.stat .num { font-size: 28px; font-weight: 900; color: var(--brand-deep); }
.stat .lbl { color: var(--ink-3); font-size: 13px; }

.toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); background: rgba(34,34,34,.92); color: #fff; padding: 10px 22px; border-radius: 12px; font-size: 14px; z-index: 200; }
.toast.err { background: rgba(229,72,77,.95); }

.empty { text-align: center; color: var(--ink-3); padding: 60px 0; }
.empty .e-icon { font-size: 44px; margin-bottom: 10px; }

.muted { color: var(--ink-3); font-size: 13px; }
.price-quote { background: var(--brand-light); border-radius: 12px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; margin: 14px 0; }
.price-quote .amt { font-size: 26px; font-weight: 900; color: var(--red); }
.stars { font-size: 24px; cursor: pointer; user-select: none; letter-spacing: 4px; color: #DDD; }
.stars .on { color: var(--brand); }

/* ---------- 动态上门费（打车式定价） ---------- */
.dist-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.dist-btn { border: 1.5px solid var(--brand); background: var(--brand-light); color: var(--brand-deep); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s; }
.dist-btn:hover { background: var(--brand); color: #3A2B00; }
.dist-btn.done { border-color: var(--green); background: #EBF8EF; color: var(--green); }
.dist-select { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 13px; background: #fff; color: var(--ink-2); }
.dist-tag { font-size: 13px; color: var(--ink-3); }
.dist-tag.on { color: var(--brand-deep); font-weight: 700; }

.urg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 2px; }
.urg-item { border: 2px solid var(--line); border-radius: 14px; padding: 14px 10px; text-align: center; cursor: pointer; transition: all .15s; background: #fff; }
.urg-item:hover { border-color: var(--brand); }
.urg-item.on { border-color: var(--brand); background: var(--brand-light); box-shadow: 0 4px 14px rgba(255,184,0,.22); }
.urg-item .u-icon { font-size: 22px; line-height: 1.2; }
.urg-item .u-label { font-weight: 800; font-size: 14px; margin-top: 4px; }
.urg-item .u-eta { font-size: 11px; color: var(--ink-3); }
.urg-item .u-desc { font-size: 11px; color: var(--brand-deep); font-weight: 700; margin-top: 2px; }

.fare-card { border: 1.5px solid var(--brand); border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; background: linear-gradient(180deg,#FFFDF6,#FFF7E0); }
.fare-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fare-label { font-weight: 800; font-size: 15px; }
.fare-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.fare-amt { font-size: 30px; font-weight: 900; color: var(--ink); letter-spacing: -.5px; }
.fare-amt small { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-left: 4px; }
.fare-lines { margin-top: 12px; border-top: 1px dashed rgba(224,158,0,.35); padding-top: 8px; }
.fare-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); padding: 4px 0; }
.fare-line b { color: var(--ink); }
.fare-line.accent b { color: var(--brand-deep); }
.fare-line.discount, .fare-line.discount b { color: var(--green); }
.fare-note { margin-top: 10px; font-size: 12px; color: var(--ink-3); line-height: 1.7; }
.fare-badge { display: inline-block; background: var(--brand); color: #3A2B00; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 7px; margin-left: 6px; vertical-align: 2px; }
@media (max-width: 640px) { .urg-grid { grid-template-columns: repeat(2, 1fr); } .fare-amt { font-size: 26px; } }

/* ---------- 移动端适配：手机上打开 / 外出演示时可用 ---------- */
@media (max-width: 760px) {
  body { font-size: 14px; }
  .topbar { height: auto; padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .logo { font-size: 16px; gap: 8px; }
  .logo-img { width: 28px; height: 28px; }
  .topbar .nav { margin-left: 0; width: 100%; overflow-x: auto; gap: 4px; -webkit-overflow-scrolling: touch; }
  .topbar .nav::-webkit-scrollbar { display: none; }
  .topbar .nav a { padding: 7px 12px; font-size: 13px; white-space: nowrap; }
  .topbar .right { margin-left: 0; width: 100%; justify-content: flex-end; }
  .container { padding: 16px 12px 48px; }
  .page-title { font-size: 20px; }
  .page-sub { font-size: 13px; margin-bottom: 16px; }
  .card { padding: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .row2 { grid-template-columns: 1fr; gap: 12px; }
  .tabs { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { padding: 9px 12px; font-size: 13.5px; flex: 0 0 auto; }
  .tbl { min-width: 640px; }
  .btn.big { width: 100%; padding: 12px 20px; font-size: 16px; }
  .modal { padding: 20px; width: auto; max-width: 94vw; }
  .pool-card { padding: 14px; }
  .pool-fee { font-size: 22px; }
  .pool-head { gap: 10px; }
  .preview-bar { padding: 12px 14px; font-size: 12.5px; }
}
