:root {
  --blue: #0b5cff;
  --blue-dark: #0846c7;
  --dark: #0d1b2a;
  --muted: #64748b;
  --bg: #f6f8fb;
  --card: #ffffff;
  --line: #e2e8f0;
  --green: #0f9f6e;
  --orange: #f59e0b;
  --red: #e11d48;
  --shadow: 0 8px 28px rgba(15, 23, 42, .07);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.hide { display: none !important; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.topbar { background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--blue), #38bdf8); color: #fff; display: grid; place-items: center; font-weight: 900; flex: 0 0 auto; box-shadow: 0 6px 16px rgba(11,92,255,.25); }
.brand-name { font-weight: 900; font-size: 16px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.partner-badge { font-size: 11px; color: var(--blue); background: #eaf1ff; padding: 7px 11px; border-radius: 999px; max-width: 46vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero { background: radial-gradient(circle at 80% 10%, rgba(56,189,248,.35), transparent 32%), linear-gradient(135deg, #0b1f3a, #0b5cff); color: #fff; padding: 44px 0 36px; }
.hero h1 { font-size: 30px; line-height: 1.16; margin: 0 0 12px; letter-spacing: -.5px; }
.hero p { color: #dbeafe; margin: 0 0 22px; line-height: 1.8; font-size: 14px; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .trust { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 20px; color: #dbeafe; font-size: 12px; }
.hero .trust span { display: inline-flex; align-items: center; gap: 5px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 800; cursor: pointer; font-size: 14px; transition: transform .12s ease, box-shadow .12s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: #fff; color: var(--blue); box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.32); }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 8px 18px rgba(11,92,255,.22); }
.btn-light { background: #eef4ff; color: var(--blue); }
.btn-outline { background: #fff; color: var(--blue); border: 1px solid #bfdbfe; }
.btn-sm { padding: 8px 12px; border-radius: 10px; font-size: 12px; }
.section { padding: 30px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section h2 { font-size: 21px; margin: 0 0 6px; letter-spacing: -.3px; }
.section-sub { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.65; }
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.service { display: flex; gap: 12px; align-items: flex-start; }
.icon { width: 44px; height: 44px; border-radius: 13px; background: #eef4ff; display: grid; place-items: center; font-size: 21px; flex: 0 0 auto; }
.service h3 { font-size: 15px; margin: 0 0 4px; }
.service p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.6; }
.price { color: var(--blue); font-weight: 900; font-size: 13px; margin-top: 7px; }
.case { padding: 0; overflow: hidden; }
.case-img { height: 142px; background: linear-gradient(135deg, #dbeafe, #bfdbfe 55%, #e0f2fe); display: grid; place-items: center; color: #1d4ed8; font-weight: 900; font-size: 13px; text-align: center; padding: 14px; }
.case-body { padding: 14px; }
.case h3 { font-size: 15px; margin: 0 0 6px; }
.case p { font-size: 12px; color: var(--muted); line-height: 1.65; margin: 0 0 9px; }
.tag { display: inline-block; font-size: 11px; background: #f1f5f9; color: #475569; padding: 4px 8px; border-radius: 999px; margin: 0 6px 6px 0; }
.tag.blue { background: #eff6ff; color: #1d4ed8; }
.form-card { padding: 18px; }
form { display: grid; gap: 11px; }
label { font-size: 12px; font-weight: 800; color: #334155; display: block; margin-bottom: 5px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; outline: none; color: var(--dark); transition: border .12s ease, box-shadow .12s ease; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,92,255,.1); }
textarea { min-height: 88px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.note { font-size: 11px; color: var(--muted); line-height: 1.7; }
.success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; padding: 14px; border-radius: 12px; font-size: 13px; display: none; line-height: 1.7; }
.error { background: #fff1f2; border: 1px solid #fecdd3; color: #be123c; padding: 12px; border-radius: 12px; font-size: 13px; display: none; line-height: 1.7; }
.footer { padding: 26px 0 44px; color: var(--muted); font-size: 12px; text-align: center; line-height: 1.8; }
.footer a { color: var(--blue); }
.footer .icp { margin-top: 8px; font-size: 11px; }
.admin-page { min-height: 100vh; background: #eef2f7; }
.admin-top { background: #0d1b2a; color: #fff; padding: 0; }
.admin-top .topbar-inner { height: 58px; }
.admin-top .brand-sub { color: #94a3b8; }
.admin-wrap { max-width: 1200px; margin: 0 auto; padding: 22px 16px 48px; }
.login { max-width: 390px; margin: 60px auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); }
.login h1 { font-size: 22px; margin: 0 0 8px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: 0 4px 14px rgba(15,23,42,.04); }
.stat b { display: block; font-size: 25px; margin-bottom: 3px; letter-spacing: -.5px; }
.stat span { font-size: 12px; color: var(--muted); }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; }
.tab { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: 9px 14px; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.panel { display: none; }
.panel.active { display: block; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head h2 { margin: 0; font-size: 19px; }
.table-wrap { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 900px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f8fafc; color: #475569; font-weight: 800; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.status-badge { display: inline-block; font-size: 11px; padding: 4px 8px; border-radius: 999px; background: #eef4ff; color: #1d4ed8; white-space: nowrap; }
.status-badge.done { background: #ecfdf5; color: #047857; }
.status-badge.new { background: #fff7ed; color: #c2410c; }
select.status-select { padding: 7px; border-radius: 9px; font-size: 12px; min-width: 100px; }
.partner-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; }
.partner-qr { width: 120px; height: 120px; border-radius: 12px; background: #f8fafc; border: 1px dashed #cbd5e1; display: grid; place-items: center; overflow: hidden; }
.partner-qr img { width: 100%; height: 100%; object-fit: contain; }
.partner-info h3 { margin: 0 0 5px; font-size: 15px; }
.partner-info .note { margin: 4px 0; }
.partner-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--muted); }
.partner-stats b { color: var(--dark); }
.qr-url { margin-top: 8px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 8px; font-size: 11px; color: #475569; word-break: break-all; }
.muted { color: var(--muted); }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }
.flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (min-width: 760px) {
  .hero { padding: 60px 0 48px; }
  .hero h1 { font-size: 42px; }
  .hero p { font-size: 16px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(5, 1fr); }
  .form-card { padding: 24px; }
  .partner-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (min-width: 560px) {
  .form-row { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

.business-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: radial-gradient(circle at 85% 15%, rgba(56,189,248,.35), transparent 35%), linear-gradient(135deg, #0d1b2a, #0b5cff);
  color: #fff; border: 0; padding: 24px;
}
.business-banner h2 { color: #fff; margin: 8px 0 8px; }
.business-banner p { color: #dbeafe; margin: 0; max-width: 680px; line-height: 1.75; font-size: 13px; }
.business-banner .tag { background: rgba(255,255,255,.16); color: #fff; }
.business-banner .btn-primary { flex: 0 0 auto; }
.steps { display: grid; grid-template-columns: 1fr; gap: 10px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.step b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; background: #eef4ff; color: var(--blue); margin-bottom: 8px; font-size: 12px; }
.step h3 { margin: 0 0 5px; font-size: 14px; }
.step p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(5, 1fr); } }

@media (min-width: 900px) {
  .stats { grid-template-columns: repeat(6, 1fr); }
  table { min-width: 1040px; }
}

/* 智能助手 */
.assistant-toggle {
  position: fixed; right: 18px; bottom: 18px; z-index: 80;
  border: 0; border-radius: 999px; padding: 13px 18px;
  background: linear-gradient(135deg, #0b5cff, #38bdf8); color: #fff;
  font-weight: 900; font-size: 14px; cursor: pointer;
  box-shadow: 0 10px 28px rgba(11,92,255,.35);
}
.assistant-panel {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 370px; max-width: calc(100vw - 24px); height: 560px; max-height: calc(100vh - 36px);
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15,23,42,.22); display: flex; flex-direction: column; overflow: hidden;
}
.assistant-head {
  background: linear-gradient(135deg, #0d1b2a, #0b5cff); color: #fff;
  padding: 14px 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.assistant-head b { font-size: 15px; }
.assistant-sub { color: #bfdbfe; font-size: 11px; margin-top: 3px; }
.assistant-close { border: 0; background: rgba(255,255,255,.14); color: #fff; width: 30px; height: 30px; border-radius: 10px; font-size: 20px; line-height: 1; cursor: pointer; }
.assistant-messages { flex: 1; overflow-y: auto; padding: 14px; background: #f8fafc; display: flex; flex-direction: column; gap: 9px; }
.assistant-msg { max-width: 88%; padding: 10px 12px; border-radius: 13px; font-size: 13px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.assistant-msg.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-top-left-radius: 5px; }
.assistant-msg.user { align-self: flex-end; background: var(--blue); color: #fff; border-top-right-radius: 5px; }
.assistant-msg.typing { color: var(--muted); background: #eef2f7; border: 0; }
.assistant-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line); background: #fff; max-height: 95px; overflow-y: auto; }
.assistant-chip { border: 1px solid #bfdbfe; background: #eff6ff; color: #1d4ed8; border-radius: 999px; padding: 7px 10px; font-size: 11px; font-weight: 700; cursor: pointer; }
.assistant-input-row { display: flex; gap: 7px; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; }
.assistant-input-row input { flex: 1; padding: 10px; border-radius: 10px; }
.assistant-lead { display: grid; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.assistant-lead input, .assistant-lead textarea { padding: 9px; border-radius: 9px; font-size: 12px; }
.assistant-lead textarea { min-height: 56px; }
.assistant-foot { padding: 7px 12px 10px; color: var(--muted); font-size: 10px; line-height: 1.5; background: #fff; }
@media (max-width: 520px) {
  .assistant-toggle { right: 12px; bottom: 12px; }
  .assistant-panel { right: 0; bottom: 0; width: 100%; max-width: 100%; height: 78vh; max-height: 78vh; border-radius: 18px 18px 0 0; }
}

.toast {
  position: fixed; top: 78px; right: 16px; z-index: 200;
  max-width: 360px; padding: 14px 16px; border-radius: 14px;
  background: #0d1b2a; color: #fff; box-shadow: 0 18px 45px rgba(15,23,42,.28);
  font-size: 13px; line-height: 1.65; cursor: pointer;
}
.toast b { color: #93c5fd; }
.toast .note { color: #cbd5e1; }

.hero-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  color: #dbeafe; font-size: 12px; font-weight: 700; letter-spacing: .5px;
  padding: 7px 12px; border-radius: 999px; margin-bottom: 14px;
}

/* 关于我们 */
.about-card {
  display: grid; gap: 20px; background: linear-gradient(135deg, #f8fbff, #eef4ff);
  border: 1px solid #dbeafe; border-radius: 20px; padding: 24px;
}
.about-kicker { color: var(--blue); font-size: 12px; font-weight: 900; letter-spacing: 1px; }
.about-main h2 { margin: 8px 0 10px; font-size: 22px; letter-spacing: -.4px; }
.about-main p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.about-points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.about-points > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.about-points b { display: block; color: var(--blue); font-size: 18px; margin-bottom: 3px; }
.about-points span { color: var(--muted); font-size: 11px; }
.about-side { background: #0d1b2a; color: #fff; border-radius: 16px; padding: 18px; }
.about-side-title { font-weight: 900; margin-bottom: 10px; }
.about-side ul { margin: 0; padding-left: 18px; color: #dbeafe; font-size: 13px; line-height: 1.9; }
.about-address { margin-top: 12px; color: #94a3b8; font-size: 11px; line-height: 1.6; }
@media (min-width: 760px) {
  .about-card { grid-template-columns: 1.5fr 1fr; align-items: center; padding: 30px; }
  .about-points { grid-template-columns: repeat(4, 1fr); }
}

/* 师傅接单 */
.tech-order { display: grid; gap: 10px; }
.tech-order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tech-order h3 { margin: 0; font-size: 16px; }
.tech-meta { color: var(--muted); font-size: 12px; line-height: 1.8; }
.tech-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dispatch-badge { display: inline-block; font-size: 11px; font-weight: 800; padding: 5px 9px; border-radius: 999px; background: #fff7ed; color: #c2410c; white-space: nowrap; }
.dispatch-badge.accepted { background: #eff6ff; color: #1d4ed8; }
.dispatch-badge.done { background: #ecfdf5; color: #047857; }
.dispatch-badge.late { background: #fff1f2; color: #be123c; }

/* 完工登记弹窗 */
.modal {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(15,23,42,.55); padding: 16px;
  display: flex; align-items: center; justify-content: center; overflow-y: auto;
}
.modal-card {
  width: 100%; max-width: 560px; background: #fff; border-radius: 18px;
  padding: 20px; box-shadow: 0 24px 70px rgba(15,23,42,.28); margin: auto;
}
.modal-card h2 { margin: 0 0 6px; font-size: 20px; }
@media (max-width: 520px) {
  .modal { align-items: flex-end; padding: 0; }
  .modal-card { border-radius: 18px 18px 0 0; max-height: 92vh; overflow-y: auto; }
}

.tech-photo-wrap { display: grid; gap: 8px; }
.tech-photo-group { display: grid; gap: 5px; }
.tech-photos { display: flex; gap: 6px; flex-wrap: wrap; }
.tech-photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); }
