/* ============================================================
   纵安工程管理服务平台 · 全站样式系统
   配色取向：工程蓝 + 安全橙（区别于高专商城的科技蓝渐变）
   ============================================================ */
:root {
  --primary: #2563eb;
  --primary-deep: #1e3a8a;
  --primary-soft: #eff4ff;
  --accent: #f59e0b;
  --accent-deep: #b45309;
  --accent-soft: #fff7ed;
  --green: #15803d;
  --green-soft: #f0fdf4;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --purple: #7c3aed;
  --purple-soft: #f5f3ff;
  --cyan: #0891b2;
  --cyan-soft: #ecfeff;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-light: #94a3b8;
  --bg: #f4f6fb;
  --bg-soft: #f8fafc;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --gradient: linear-gradient(135deg, #2563eb, #0e7490);
  --gradient-accent: linear-gradient(135deg, #f59e0b, #ea580c);
  /* 分层阴影：更自然、更轻的抬升感 */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, .05);
  --shadow: 0 10px 30px -8px rgba(15, 23, 42, .12);
  --shadow-lg: 0 24px 60px -12px rgba(15, 23, 42, .18);
  --shadow-blue: 0 12px 30px -10px rgba(37, 99, 235, .30);
  /* 键盘焦点环 */
  --ring: 0 0 0 3px rgba(37, 99, 235, .16);
  /* 蓝图网格纹理（工程图纸感，极低存在感） */
  --bp-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cpath d='M30 0H0V30' fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='1'/%3E%3C/svg%3E");
  --radius: 12px;
  --radius-sm: 8px;
  --tracking-tight: -.02em;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, "Segoe UI", sans-serif;
  --mono: "SF Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.6; -webkit-font-smoothing: antialiased; min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

/* ==================== 无障碍：键盘焦点环 / 选中色 ==================== */
:where(a, button, .btn, summary, [tabindex], input, select, textarea):focus-visible {
  outline: none; box-shadow: var(--ring); border-radius: 7px;
}
::selection { background: rgba(37, 99, 235, .16); color: var(--ink); }
.site-header, .sidebar { scrollbar-gutter: stable; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: 0; background: none; color: inherit; }
table { border-collapse: collapse; width: 100%; }
.container { width: min(1240px, 94%); margin: 0 auto; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); letter-spacing: -.2px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.muted { color: var(--ink-light); }
.soft { color: var(--ink-soft); }
.nowrap { white-space: nowrap; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.flex { display: flex; } .between { justify-content: space-between; }
.items-center { align-items: center; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.gap-16 { gap: 16px; } .wrap { flex-wrap: wrap; } .grow { flex: 1; }

/* ==================== 顶部导航 ==================== */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 60; }
.header-top { background: var(--primary-deep); color: #c7d2fe; font-size: 12.5px; }
/*
 * ⚠️ 这里原来是 `height: 34px`（写死的固定高度）+ `space-between`。
 * 而这一行里其实塞了三样东西：服务热线 + 一整条地址 + 三个入口链接。
 * 手机上必然折行，**却折在一个写死 34px 的盒子里** —— 字挤成一团、
 * 甚至压到下一行去。这就是"这些字在手机上看好难看"的根源。
 * 所以：高度改成 auto（该长高就长高）+ 允许折行 + 上下留一点内边距。
 */
.header-top .container { display: flex; justify-content: space-between; align-items: center; height: auto; min-height: 34px; gap: 8px 18px; flex-wrap: wrap; padding: 6px 0; }
.header-top a:hover { color: #fff; }
.header-top .portals { display: flex; gap: 14px; }
/* 热线做成可点拨号；并且**整段不许折行** —— 电话号码被拦腰折断最难认 */
.header-top .hotline { color: inherit; text-decoration: none; white-space: nowrap; }
.header-top .hotline b { color: #fff; }
.header-main { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 11px; background: var(--gradient);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px;
  box-shadow: var(--shadow-sm); letter-spacing: -.5px;
}
.brand-text b { display: block; font-size: 16.5px; letter-spacing: .3px; line-height: 1.25; }
.brand-text span { font-size: 10.5px; color: var(--ink-light); letter-spacing: 1.4px; }
.main-nav { border-top: 1px solid var(--line); }
.main-nav .container { display: flex; gap: 24px; height: 46px; align-items: center; overflow-x: auto; }
.main-nav a { font-size: 14.5px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; padding: 4px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: var(--primary); }
.main-nav a.active { border-bottom-color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
/*
 * 新通知提示音的开关（🔔 / 🔕）。
 * 放在 .header-actions **之后**：那一组自带 margin-left:auto 会贴到最右边，
 * 这个按钮紧跟其后就是标准位置（右上角），而且不用去动任何现有布局。
 */
.chime-toggle {
  flex: 0 0 auto; width: 38px; height: 38px; margin-left: 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff;
  color: var(--primary); /* 图标用 currentColor 取这个颜色，声音开着时是品牌色 */
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s, background .15s, opacity .15s, color .15s;
}
/* 图标是内嵌 SVG：定死尺寸，避免各浏览器给 svg 一个默认高度把按钮撑变形 */
.chime-toggle svg { width: 19px; height: 19px; display: block; }
.chime-toggle:hover { border-color: #c7d2fe; background: var(--primary-soft); }
/* 静音：打叉的扬声器 + 整体压暗 + 变灰，三重区别，扫一眼就知道是关着的 */
.chime-toggle.is-muted { opacity: .4; color: var(--ink-light); }
.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 6px 14px 6px 6px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg-soft); font-size: 13.5px;
}
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--gradient); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.user-chip small { color: var(--ink-light); font-size: 11.5px; display: block; line-height: 1.2; }
.user-chip b { font-size: 13px; font-weight: 600; }
.notif-dot {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red);
  color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
  position: absolute; top: -6px; right: -6px;
}

/* ==================== 顶栏通知面板（点铃铛就地看，不跳个人中心） ==================== */
.notif-wrap { position: relative; display: inline-flex; }
.notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  width: 380px; max-width: calc(100vw - 24px);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-md, 12px);
  box-shadow: var(--shadow); overflow: hidden;
}
/* 手机上贴到屏幕边缘：380px 宽的浮层在手机上会被挤出去一半 */
@media (max-width: 640px) {
  .notif-panel { position: fixed; left: 12px; right: 12px; width: auto; top: auto; }
}
.notif-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--bg-soft);
  font-size: 13.5px;
}
.notif-panel-body { max-height: 62vh; overflow-y: auto; }
.notif-item { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); cursor: default; }
.notif-item[data-link] { cursor: pointer; }
.notif-item[data-link]:hover { background: var(--bg-soft); }
.notif-item.unread { border-left: 3px solid var(--primary); background: var(--primary-soft); }
.notif-item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.notif-item-top b { font-size: 13.5px; }
.notif-go { color: var(--primary); font-size: 12px; font-weight: 600; white-space: nowrap; }
.notif-item-body { color: var(--ink-soft); font-size: 12.5px; line-height: 1.65; margin-top: 3px; }
.notif-item-time { color: var(--ink-light); font-size: 11.5px; margin-top: 4px; }
.notif-empty { padding: 22px 14px; text-align: center; color: var(--ink-light); font-size: 13px; }
.notif-panel-foot {
  padding: 10px 14px; border-top: 1px solid var(--line); background: var(--bg-soft);
  text-align: center; font-size: 13px;
}
.nav-toggle { display: none; }

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  background: var(--bg-soft); color: var(--ink-soft); border: 1px solid var(--line);
  transition: all .16s ease; white-space: nowrap; line-height: 1.4;
}
.btn:hover { border-color: var(--ink-light); color: var(--ink); }
.btn-primary { background: var(--gradient); color: #fff; border-color: transparent; box-shadow: var(--shadow-sm); }
.btn-primary:hover { color: #fff; filter: brightness(1.08); box-shadow: var(--shadow); }
.btn-accent { background: var(--gradient-accent); color: #fff; border-color: transparent; }
.btn-accent:hover { color: #fff; filter: brightness(1.06); }
.btn-danger { background: #fff; color: var(--red); border-color: #fecaca; }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.btn-success { background: var(--green); color: #fff; border-color: transparent; }
.btn-success:hover { color: #fff; filter: brightness(1.08); }
.btn-sm { padding: 6px 13px; font-size: 13px; border-radius: 7px; }
.btn-lg { padding: 13px 30px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ==========================================================================
   一套按钮规矩（三端共用，2026-10-14 定）
   --------------------------------------------------------------------------
   用户原话：「网页简化一点。关键按钮要明显一点」。定的三条：
     · 主操作：每页/每卡片**最多一个** → 用 .act-main（实心品牌色、加大、够高）
     · 次操作：描边、跟在主操作旁边 → 用 .act-sub
     · 危险操作：**红色描边**（不是实心红）、放边上、一律二次确认 → 用 .act-danger
   ⚠️ 为什么不是"每个按钮都做大"：一页里全是同样大的实心按钮，就等于**没有主操作** ——
      师傅在工地上要一眼看出"下一步该点哪个"，靠的正是"只有一个是实心的"。
   ⚠️ 手机上主操作要够高（≥44px，拇指点得准），这是 .act-main 的 min-height 的来源。
   ========================================================================== */
.btn.act-main {
  background: var(--gradient); color: #fff; border-color: transparent;
  box-shadow: var(--shadow-sm); font-size: 15px; font-weight: 700;
  padding: 12px 24px; min-height: 44px;
}
.btn.act-main:hover { color: #fff; filter: brightness(1.08); box-shadow: var(--shadow); }
.btn.act-sub { background: #fff; color: var(--ink-soft); border-color: var(--line); }
.btn.act-sub:hover { border-color: var(--primary); color: var(--primary); }
.btn.act-danger { background: #fff; color: var(--red); border-color: #fecaca; }
.btn.act-danger:hover { background: var(--red-soft); border-color: var(--red); color: var(--red); }

/*
 * 操作条：一个页面/一张卡片上"该动手的事"都排在这里。
 * 手机上（≤640px）它**贴在屏幕底部**，拇指够得到 —— 师傅站在工地上单手操作。
 */
.act-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.act-bar .act-main { order: -1; }
.act-note { font-size: 12.5px; color: var(--ink-light); }

@media (max-width: 640px) {
  .act-bar.sticky-actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(255, 255, 255, .97); backdrop-filter: blur(6px);
    border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(15, 23, 42, .08);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    gap: 8px; flex-wrap: nowrap;
  }
  .act-bar.sticky-actions .act-main { order: 0; flex: 1 1 auto; padding-left: 14px; padding-right: 14px; }
  .act-bar.sticky-actions .act-sub,
  .act-bar.sticky-actions .act-danger { flex: 0 0 auto; }
  /*
   * 贴底操作条会盖住最后一行内容 —— 给它让出位置（只在有操作条时才加这个类）。
   * ⚠️ 选择器必须写到三段（`body.has-act-bar .app-shell .app-main`）：
   *    下面「响应式」区里那条 `.app-main { padding: 18px 14px 50px }`（≤860px）
   *    在源码里排在后面，两条都是"一个类 + 同层"时后面那条赢 —— 只写两段的话，
   *    手机上这行让位会被悄悄干掉，表现就是"最下面一行被按钮条压住半截"。
   */
  body.has-act-bar .app-shell .app-main { padding-bottom: 96px; }
}

/*
 * 「展开看更多」：不常用的说明与次要字段收进来，**默认收起**。
 * ⚠️ 金额、状态、收款账户、对账要用的字段**永远不许折进来** ——
 *    这个平台是记账工具，把该看见的钱藏起来就是事故。
 */
.more-fold { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.more-fold > summary {
  cursor: pointer; font-size: 13px; color: var(--primary); font-weight: 600;
  list-style: none; display: flex; align-items: center; gap: 6px; user-select: none;
}
.more-fold > summary::-webkit-details-marker { display: none; }
.more-fold > summary::before { content: '▸'; font-size: 11px; transition: transform .15s; }
.more-fold[open] > summary::before { transform: rotate(90deg); }
.more-fold > summary:hover { color: var(--primary-deep); }
.more-fold-body { margin-top: 10px; font-size: 13px; color: var(--ink-soft); line-height: 1.85; }

/*
 * 「查询条件」也收起来，但它不是"更多说明" —— 它顶在列表上方、是**唯一**的通用操作，
 * 所以单独一个变体：去掉虚线分隔与上边距，摘要行本身要高一点（手机上能点得准），
 * 而且要能一眼看出"现在有没有在筛选"（摘要右边那句在筛选时高亮）。
 */
.filter-fold { margin-top: 0; border-top: 0; padding-top: 0; }
.filter-fold > summary { font-size: 13.5px; padding: 2px 0; }
.filter-fold .filter-cur { color: var(--ink-soft); font-weight: 400; }
.filter-fold .filter-cur.on { color: var(--primary-deep); font-weight: 600; }

/* ==================== 卡片 ==================== */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, border-color .2s ease; }
.card:hover { box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.card-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.card-head h2, .card-head h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.card-head h2::before, .card-head h3::before {
  content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--gradient-accent);
}
.card-head .sub { font-size: 12.5px; color: var(--ink-light); font-weight: 400; }
.card-body { padding: 20px; }
.card-body.tight { padding: 14px 16px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line-soft); background: var(--bg-soft); border-radius: 0 0 var(--radius) var(--radius); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* ==================== 表单 ==================== */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
.field > label .req { color: var(--red); margin-left: 3px; }
.field .hint { font-size: 12px; color: var(--ink-light); margin-top: 5px; }
.field .err { font-size: 12.5px; color: var(--red); margin-top: 5px; display: none; }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); background: var(--red-soft); }
input[type=text], input[type=password], input[type=number], input[type=date],
input[type=tel], input[type=search], select, textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); outline: 0; transition: border-color .15s, box-shadow .15s; font-size: 14px;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29, 78, 216, .1); }
textarea { resize: vertical; min-height: 96px; line-height: 1.65; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check-row input { width: 16px; height: 16px; accent-color: var(--primary); }

/* 互斥选项卡片：材料安排这类三选一用，避免出现自相矛盾的组合 */
.radio-list { display: flex; flex-direction: column; gap: 9px; }
.radio-card {
  display: flex; gap: 11px; align-items: flex-start; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
  background: #fff; transition: border-color .15s, background .15s;
}
.radio-card:hover { border-color: #c7d2fe; background: var(--bg-soft); }
.radio-card.checked { border-color: var(--primary); background: var(--primary-soft); }
.radio-card input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--primary); flex: 0 0 auto; }
.radio-card b { font-size: 13.8px; font-weight: 600; display: block; }
.radio-card span { font-size: 12.3px; color: var(--ink-light); line-height: 1.6; }

/* 材料/机具信息条：师傅接单前最需要一眼看到的东西 */
.tag-row { display: flex; gap: 7px; flex-wrap: wrap; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 600; border: 1px solid;
}
.tag-material { background: var(--accent-soft); border-color: #fed7aa; color: var(--accent-deep); }
.tag-tool { background: var(--cyan-soft); border-color: #a5f3fc; color: #0e7490; }
.tag-plain { background: var(--bg-soft); border-color: var(--line); color: var(--ink-soft); }

/* ==================== 师傅等级徽章 ==================== */
/* 五级：见习 / 初级 / 中级 / 高级 / 金牌，按等级高低配色递进，金牌用金色渐变突出 */
.lv {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; border: 1px solid; white-space: nowrap;
}
.lv-0 { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.lv-1 { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.lv-2 { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.lv-3 { background: #fff7ed; color: #b45309; border-color: #fed7aa; }
.lv-4 { background: linear-gradient(135deg, #f59e0b, #ea580c); color: #fff; border-color: transparent; }

/* 升级进度条 */
.lv-progress { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px; }
.lv-progress .bar { height: 7px; background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; margin: 7px 0 5px; }
.lv-progress .bar > i { display: block; height: 100%; background: var(--gradient); }
.lv-progress .meta { font-size: 12.3px; color: var(--ink-soft); line-height: 1.8; }
.lv-progress .meta b { color: var(--accent-deep); }

/* ==================== 徽标 / 状态 ==================== */
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--bg-soft); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-plain::before { display: none; }
/*
 * 报价环节的两个状态用**红色系**是有意的：
 * 它们代表"还没谈定价、这单还动不了"，需要有人去处理；
 * 和待派单（橙）区分开，服务部扫一眼就知道该找客户还是该找师傅。
 */
.st-pending_quote { background: var(--red-soft); color: var(--red); border-color: #fecaca; }
.st-quoted { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.st-pending_assign { background: var(--accent-soft); color: var(--accent-deep); border-color: #fed7aa; }
.st-assigned { background: var(--primary-soft); color: var(--primary); border-color: #bfdbfe; }
.st-accepted { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.st-working { background: var(--cyan-soft); color: #0e7490; border-color: #a5f3fc; }
.st-pending_accept { background: var(--purple-soft); color: var(--purple); border-color: #ddd6fe; }
.st-completed { background: var(--green-soft); color: var(--green); border-color: #bbf7d0; }
.st-settled { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.st-cancelled { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.st-published { background: var(--primary-soft); color: var(--primary); border-color: #bfdbfe; }
.st-ordered { background: var(--accent-soft); color: var(--accent-deep); border-color: #fed7aa; }
.st-in_progress { background: var(--cyan-soft); color: #0e7490; border-color: #a5f3fc; }
.st-draft { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.st-confirmed { background: var(--primary-soft); color: var(--primary); border-color: #bfdbfe; }
.st-active { background: var(--green-soft); color: var(--green); border-color: #bbf7d0; }
.st-disabled, .st-rejected { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.st-pending { background: var(--accent-soft); color: var(--accent-deep); border-color: #fed7aa; }
.st-approved { background: var(--green-soft); color: var(--green); border-color: #bbf7d0; }
.st-urgent { background: var(--red-soft); color: var(--red); border-color: #fecaca; }
.st-high { background: var(--accent-soft); color: var(--accent-deep); border-color: #fed7aa; }
.st-normal { background: var(--bg-soft); color: var(--ink-soft); border-color: var(--line); }
.st-low { background: var(--bg-soft); color: var(--ink-light); border-color: var(--line); }

/* ==================== 表格 ==================== */
.table-wrap { overflow-x: auto; }
.table { font-size: 14px; }
.table th {
  text-align: left; padding: 11px 14px; background: var(--bg-soft); color: var(--ink-soft);
  font-size: 12.5px; font-weight: 700; letter-spacing: .3px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:hover { background: #fbfcfe; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { font-family: var(--mono); font-weight: 600; }
.table-empty { padding: 46px 20px; text-align: center; color: var(--ink-light); font-size: 14px; }

/* ==================== 统计卡 ==================== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat {
  background: linear-gradient(180deg, #ffffff, #fafbff); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  /*
   * display 必须**显式**写成 block：`.stat` 既用在 <div> 上，也用在可点卡片
   * `<a class="stat">` 上，而 <a> 默认是 inline —— 不写的话链接版卡片撑不满
   * 网格单元格，背景和左边那条色条会缩成文字大小的一块，看起来像样式坏了。
   */
  display: block;
}
/* 能点的卡片给个hover反馈，否则用户不知道这里可以点（跟 .item-card 保持同一套反馈） */
.stat[href] { transition: all .16s; }
.stat[href]:hover { border-color: #c7d2fe; box-shadow: var(--shadow); }
.stat::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gradient); }
.stat.accent::after { background: var(--gradient-accent); }
.stat.green::after { background: linear-gradient(180deg, #22c55e, #15803d); }
.stat.red::after { background: linear-gradient(180deg, #f87171, #dc2626); }
.stat .label { font-size: 13px; color: var(--ink-light); display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 27px; font-weight: 800; letter-spacing: -.5px; margin-top: 5px; font-family: var(--mono); }
.stat .value small { font-size: 14px; font-weight: 600; color: var(--ink-light); margin-left: 3px; font-family: var(--font); }
.stat .foot { font-size: 12px; color: var(--ink-light); margin-top: 5px; }

/* ==================== 业务流程步骤条 ==================== */
.flow { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 4px 0; }
.flow-step {
  flex: 1 1 0; min-width: 108px; text-align: center; padding: 12px 6px; position: relative;
  font-size: 12.5px; color: var(--ink-light);
}
.flow-step::after {
  content: ''; position: absolute; top: 26px; right: -6px; width: 12px; height: 12px;
  border-top: 2px solid var(--line); border-right: 2px solid var(--line); transform: rotate(45deg);
}
.flow-step:last-child::after { display: none; }
.flow-step .dot {
  width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 7px; display: grid; place-items: center;
  background: var(--bg-soft); color: var(--ink-light); font-weight: 700; font-size: 13px; border: 2px solid var(--line);
}
.flow-step.done { color: var(--green); }
.flow-step.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.flow-step.current { color: var(--primary); font-weight: 700; }
.flow-step.current .dot { background: var(--gradient); border-color: transparent; color: #fff; box-shadow: 0 0 0 4px rgba(29, 78, 216, .12); }

/* ==================== 时间线 ==================== */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -22px; top: 5px; width: 11px; height: 11px; border-radius: 50%;
  background: #fff; border: 2px solid var(--primary);
}
.tl-item.done::before { background: var(--primary); }
.tl-item.warn::before { border-color: var(--accent); }
.tl-item.danger::before { border-color: var(--red); }
.tl-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tl-head b { font-size: 14px; }
.tl-head time { font-size: 12px; color: var(--ink-light); font-family: var(--mono); }
.tl-body { font-size: 13.5px; color: var(--ink-soft); margin-top: 3px; }

/* ==================== 描述列表 ==================== */
.desc { display: grid; grid-template-columns: 116px 1fr; gap: 10px 16px; font-size: 14px; }
.desc dt { color: var(--ink-light); font-size: 13.5px; }
.desc dd { color: var(--ink); word-break: break-word; }
.desc-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 26px; }
.desc-2 .item { display: flex; gap: 10px; font-size: 14px; }
.desc-2 .item .k { color: var(--ink-light); font-size: 13.5px; flex: 0 0 auto; min-width: 76px; }

/* ==================== 空状态 / 加载 ==================== */
.empty { padding: 54px 20px; text-align: center; color: var(--ink-light); }
.empty .icon { font-size: 40px; margin-bottom: 10px; opacity: .55; }
.empty h3 { font-size: 15.5px; color: var(--ink-soft); margin-bottom: 6px; font-weight: 600; }
.empty p { font-size: 13.5px; }
.skeleton { background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 6px; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.spinner {
  width: 17px; height: 17px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== 提示条 / Toast ==================== */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px; border: 1px solid; display: flex; gap: 9px; align-items: flex-start; }
.alert-info { background: var(--primary-soft); border-color: #bfdbfe; color: #1e40af; }
.alert-warn { background: var(--accent-soft); border-color: #fed7aa; color: var(--accent-deep); }
.alert-error { background: var(--red-soft); border-color: #fecaca; color: #b91c1c; }
.alert-success { background: var(--green-soft); border-color: #bbf7d0; color: var(--green); }
#toast-box { position: fixed; top: 84px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--radius-sm);
  padding: 12px 18px; font-size: 13.8px; box-shadow: var(--shadow-lg); min-width: 230px; max-width: 380px;
  animation: toastIn .22s ease; display: flex; gap: 9px; align-items: flex-start;
}
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--accent); }
.toast.out { animation: toastOut .22s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

/* ==================== 弹窗 ==================== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 150;
  display: grid; place-items: center; padding: 20px; animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: var(--radius); width: min(620px, 100%); max-height: 88vh; overflow: auto;
  box-shadow: var(--shadow-lg); animation: pop .18s ease;
}
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-head { padding: 17px 22px; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { font-size: 16px; font-weight: 700; }
.modal-head .close { font-size: 22px; line-height: 1; color: var(--ink-light); padding: 0 4px; }
.modal-head .close:hover { color: var(--ink); }
.modal-body { padding: 22px; }
.modal-foot { padding: 15px 22px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 10px; background: var(--bg-soft); }

/* ==================== 筛选栏 ==================== */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-bar input, .filter-bar select { width: auto; min-width: 150px; padding: 8px 12px; font-size: 13.5px; }
.filter-bar input[type=search] { min-width: 220px; }

/* ==================== 标签页 ==================== */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button {
  padding: 11px 17px; font-size: 14px; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button:hover { color: var(--primary); }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.tabs button .cnt {
  display: inline-block; margin-left: 5px; padding: 0 7px; border-radius: 999px;
  background: var(--bg-soft); font-size: 11.5px; color: var(--ink-soft);
}
.tabs button.active .cnt { background: var(--primary); color: #fff; }

/* ==================== 侧边栏布局（管理端 / 师傅端） ==================== */
.app-shell { display: grid; grid-template-columns: 226px 1fr; min-height: calc(100vh - 68px); }
.sidebar { background: #0f172a; color: #cbd5e1; padding: 18px 0; }
.sidebar .side-title { padding: 0 20px 12px; font-size: 11.5px; letter-spacing: 1.5px; color: #64748b; font-weight: 700; }
.sidebar a {
  display: flex; align-items: center; gap: 10px; padding: 11px 20px; font-size: 14px; font-weight: 500;
  color: #cbd5e1; border-left: 3px solid transparent; transition: all .14s;
}
.sidebar a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.sidebar a.active { background: rgba(29, 78, 216, .22); color: #fff; border-left-color: var(--accent); font-weight: 600; }
.sidebar a .ico { width: 18px; text-align: center; font-size: 15px; }
.sidebar a .badge {
  margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 999px;
}
.app-main { padding: 24px 26px 60px; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.page-head .sub { font-size: 13px; color: var(--ink-light); margin-top: 3px; }
/*
 * 副标题**永远渲染**（哪怕内容为空），这是刻意的：
 * 详情页的副标题要等数据回来才知道，而页面脚本会去 `querySelector('.sub')` 写它 ——
 * 骨架若按条件省掉这个元素，页面一进来就抛
 * 「Cannot set properties of null」，整页只剩"加载失败"（真出过这个事故）。
 * 既然永远渲染，就得让空的那个**不占高度**。
 */
.page-head .sub:empty { display: none; }

/* ==================== 首页 Hero ==================== */
.hero {
  background: var(--primary-deep); color: #fff; padding: 72px 0 64px; position: relative; overflow: hidden;
  background-image: var(--bp-grid); background-size: 30px 30px;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(circle at 78% 18%, rgba(245, 158, 11, .22), transparent 46%),
              radial-gradient(circle at 12% 82%, rgba(14, 116, 144, .42), transparent 52%);
}
.hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 72px; z-index: 1;
  background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none;
}
.hero .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1.08fr .92fr; gap: 46px; align-items: center; }
.hero h1 { font-size: 38px; font-weight: 800; line-height: 1.24; letter-spacing: -.6px; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { font-size: 15.5px; color: #c7d2fe; line-height: 1.85; margin-bottom: 26px; max-width: 560px; }
.hero-actions { display: flex; gap: 13px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats .hs b { display: block; font-size: 25px; font-family: var(--mono); font-weight: 800; color: var(--accent); }
.hero-stats .hs span { font-size: 12.5px; color: #94a3b8; }
.hero-panel { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .13); border-radius: 16px; padding: 22px; backdrop-filter: blur(6px); }
.hero-panel h3 { font-size: 15px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.hero-panel .hp-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.hero-panel .hp-item:last-child { border-bottom: 0; }
.hero-panel .hp-num {
  width: 26px; height: 26px; border-radius: 8px; background: var(--gradient-accent); color: #fff;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 800; flex: 0 0 auto;
}
.hero-panel .hp-txt b { display: block; font-size: 13.5px; }
.hero-panel .hp-txt span { font-size: 11.5px; color: #94a3b8; }

.section { padding: 58px 0; }
.section.alt { background: #fff; }
.section-head { text-align: center; margin-bottom: 38px; }
.section-head h2 { font-size: 27px; font-weight: 800; letter-spacing: -.4px; }
.section-head p { color: var(--ink-light); font-size: 14.5px; margin-top: 9px; }
.section-head h2::after { content: ''; display: block; width: 46px; height: 4px; border-radius: 2px; background: var(--gradient-accent); margin: 13px auto 0; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 22px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow-sm); transition: all .22s ease; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-blue); border-color: #bcd0ff; }
.feature .fi {
  width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-size: 21px; margin-bottom: 15px;
}
.feature h3 { font-size: 16px; font-weight: 700; margin-bottom: 9px; }
.feature p { font-size: 13.8px; color: var(--ink-soft); line-height: 1.8; }

.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 14px; }
.svc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 15px 17px; display: flex; align-items: center; gap: 12px; }
.svc .si { font-size: 20px; }
.svc b { font-size: 14px; display: block; }
.svc span { font-size: 11.8px; color: var(--ink-light); }

/* ==================== 列表卡片（工程 / 订单） ==================== */
.item-list { display: flex; flex-direction: column; gap: 14px; }
.item-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 19px; box-shadow: var(--shadow-sm); transition: all .18s ease; }
.item-card:hover { border-color: #bcd0ff; box-shadow: var(--shadow-blue); transform: translateY(-2px); }
.item-card .ic-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.item-card .ic-title { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.item-card .ic-title a:hover { color: var(--primary); }
.item-card .ic-meta { font-size: 12.5px; color: var(--ink-light); margin-top: 5px; display: flex; gap: 14px; flex-wrap: wrap; }
.item-card .ic-desc { font-size: 13.5px; color: var(--ink-soft); margin-top: 10px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-card .ic-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 13px; padding-top: 13px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.item-card .ic-money { font-family: var(--mono); font-weight: 700; font-size: 16px; color: var(--accent-deep); }
.item-card .ic-money small { font-size: 11.5px; color: var(--ink-light); font-family: var(--font); font-weight: 400; margin-right: 3px; }

/* ==================== 金额条 ==================== */
.money-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--line-soft); font-size: 14px; }
.money-row:last-child { border-bottom: 0; }
.money-row .v { font-family: var(--mono); font-weight: 700; font-size: 15.5px; }
.money-row .v.in { color: var(--green); }
.money-row .v.out { color: var(--accent-deep); }
.money-row.total { border-top: 2px solid var(--line); border-bottom: 0; margin-top: 4px; padding-top: 13px; font-weight: 700; }
.money-row.total .v { font-size: 19px; color: var(--primary); }

/* ==================== 评价 ==================== */
.stars { display: inline-flex; gap: 2px; font-size: 15px; color: #fbbf24; letter-spacing: 1px; }
.stars .off { color: #e2e8f0; }
.rating-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; font-size: 27px; }
.rating-input input { display: none; }
.rating-input label { color: #e2e8f0; cursor: pointer; transition: color .12s; line-height: 1; }
.rating-input label:hover, .rating-input label:hover ~ label,
.rating-input input:checked ~ label { color: #fbbf24; }
.review-item { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.review-item:last-child { border-bottom: 0; }
.review-item .rv-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-item .rv-name { font-weight: 700; font-size: 14px; }
.review-item .rv-time { font-size: 12px; color: var(--ink-light); font-family: var(--mono); }
.review-item .rv-body { font-size: 14px; color: var(--ink-soft); margin-top: 8px; line-height: 1.8; }
.review-item .rv-reply {
  margin-top: 11px; padding: 11px 14px; background: var(--bg-soft); border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 13.5px; color: var(--ink-soft);
}
.review-item .rv-reply b { color: var(--primary); }

/* ==================== 登录页 ==================== */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-side { background: var(--primary-deep); color: #fff; padding: 54px 56px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; background-image: var(--bp-grid); background-size: 30px 30px; }
.auth-side::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 72% 22%, rgba(245, 158, 11, .22), transparent 46%), radial-gradient(circle at 18% 84%, rgba(14, 116, 144, .4), transparent 52%); }
.auth-side > * { position: relative; }
.auth-side h1 { font-size: 31px; font-weight: 800; line-height: 1.3; margin-bottom: 15px; letter-spacing: -.4px; }
.auth-side h1 em { font-style: normal; color: var(--accent); }
.auth-side p { color: #c7d2fe; font-size: 14.5px; line-height: 1.9; margin-bottom: 26px; }
.auth-side ul li { display: flex; gap: 11px; align-items: flex-start; padding: 8px 0; font-size: 14px; color: #dbeafe; }
.auth-side ul li .ck { color: var(--accent); font-weight: 800; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.auth-box { width: min(410px, 100%); }
.auth-box h2 { font-size: 23px; font-weight: 800; margin-bottom: 7px; }
.auth-box .sub { color: var(--ink-light); font-size: 13.8px; margin-bottom: 26px; }
.auth-tabs { display: flex; gap: 8px; background: var(--bg-soft); padding: 4px; border-radius: 999px; margin-bottom: 22px; }
.auth-tabs button { flex: 1; padding: 9px; border-radius: 999px; font-size: 13.8px; font-weight: 600; color: var(--ink-soft); }
.auth-tabs button.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.auth-foot { margin-top: 20px; font-size: 13.5px; color: var(--ink-light); text-align: center; }
.auth-foot a { color: var(--primary); font-weight: 600; }
.demo-accounts { margin-top: 22px; padding: 14px 16px; background: var(--accent-soft); border: 1px dashed #fed7aa; border-radius: var(--radius-sm); font-size: 12.8px; color: var(--accent-deep); line-height: 1.95; }
.demo-accounts b { display: block; margin-bottom: 4px; }
.demo-accounts code { background: #fff; padding: 1px 6px; border-radius: 4px; font-family: var(--mono); font-size: 12px; border: 1px solid #fed7aa; cursor: pointer; }

/* ==================== 页脚 ==================== */
.site-footer { background: #0f172a; color: #94a3b8; padding: 44px 0 26px; font-size: 13.5px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 34px; padding-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.site-footer h4 { color: #fff; font-size: 14px; margin-bottom: 14px; font-weight: 700; }
.site-footer a:hover { color: var(--accent); }
.site-footer li { padding: 4px 0; }
.footer-bottom { padding-top: 20px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: #64748b; }
.footer-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.footer-brand .brand-mark { background: var(--gradient-accent); }
.footer-brand b { color: #fff; font-size: 15.5px; display: block; }
.footer-brand span { font-size: 10.5px; letter-spacing: 1.3px; }

/* ==================== 打印（结算单 / 对账单 / 报价单） ==================== */
.print-only { display: none; }
@media print {
  body { background: #fff; }
  .no-print, .site-header, .site-footer, .sidebar, #toast-box { display: none !important; }
  .print-only { display: block; }
  .app-shell { grid-template-columns: 1fr; }
  .app-main { padding: 0; }
  .card { border: 1px solid #cbd5e1; box-shadow: none; break-inside: avoid; }
  .card + .card { margin-top: 14px; }
  .container { width: 100%; }
  a { text-decoration: none; }
  @page { margin: 14mm; }
}
.receipt-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--ink); padding-bottom: 16px; margin-bottom: 20px; }
.receipt-head h1 { font-size: 22px; font-weight: 800; letter-spacing: 1px; }
.receipt-head .rs { font-size: 12.5px; color: var(--ink-soft); line-height: 1.9; text-align: right; }

/* ==================== 响应式 ==================== */
@media (max-width: 1080px) {
  .hero .container { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: flex; overflow-x: auto; padding: 8px 10px; gap: 4px; }
  .sidebar .side-title { display: none; }
  .sidebar a { padding: 9px 14px; border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; border-radius: 8px; }
  .sidebar a.active { border-left: 0; border-bottom-color: var(--accent); }
  .sidebar a .badge { margin-left: 6px; }
  .app-main { padding: 18px 14px 50px; }
  .form-grid, .form-grid-3, .desc-2 { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .hero h1 { font-size: 27px; }
  .hero-stats { gap: 22px; }
  .header-main { height: auto; padding: 12px 0; flex-wrap: wrap; }
  .main-nav .container { gap: 16px; }
  .desc { grid-template-columns: 92px 1fr; }
  .stat .value { font-size: 23px; }
  .review-item .rv-head { gap: 7px; }
  /*
   * 窄屏下顶栏只留"服务热线"一句话：地址太长、一折就是好几行的小字，
   * 看着乱。地址**并没有丢** —— 页脚里本来就有完整一条（见 renderFooter）。
   */
  .header-top { font-size: 12px; }
  .header-top .head-addr { display: none; }
}
@media (max-width: 560px) {
  .hero { padding: 44px 0 40px; }
  .section { padding: 40px 0; }
  .filter-bar input, .filter-bar select { min-width: 0; width: 100%; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .footer-grid { grid-template-columns: 1fr; }
  #toast-box { left: 14px; right: 14px; top: 76px; }
  .toast { max-width: none; }
  /*
   * 手机上的顶栏：三个入口（客户端 / 服务部管理端 / 师傅端）在这里既挤又碍事 ——
   * 客户不需要看到"服务部管理端"，师傅和管理的导航在自己的侧边栏里。
   * 所以窄屏直接收起，顶栏只剩一句热线（可点拨号）。
   */
  .header-top .portals { display: none; }
  .header-top .container { justify-content: center; padding: 7px 0; }
  /* 页脚在手机上也收紧一点：原来是 44px 顶距 + 单列，滚起来一大片 */
  .site-footer { padding: 26px 0 18px; font-size: 13px; }
  .footer-grid { gap: 20px; padding-bottom: 20px; }
  .site-footer li { padding: 2px 0; }
}

/* ============================================================
   约经理看现场（现场勘察预约）
   ============================================================ */

/* 预约状态色：st-done 补一个绿色，st-pending / st-confirmed / st-cancelled 复用已有的 */
.st-done { background: var(--green-soft); color: var(--green); border-color: #bbf7d0; }

/* 从站内消息跳进来时把目标那条预约框出来，否则客户不知道该看哪一条 */
.item-card.focus-ring { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* 服务部答复 / 勘察结论的说明块 */
.visit-box { border-radius: 10px; padding: 10px 13px; font-size: 13px; line-height: 1.8; margin-top: 11px; }
.visit-box > b { display: block; margin-bottom: 3px; font-size: 13.5px; }
.visit-confirm { background: var(--primary-soft); border: 1px solid #bfdbfe; color: #1e3a8a; }
.visit-note { background: var(--green-soft); border: 1px solid #bbf7d0; color: #14532d; }
.visit-wait { background: var(--accent-soft); border: 1px solid #fed7aa; color: #7c2d12; }
/* ============================================================
   擅长工种选择器（师傅只能接自己工种范围内的活）
   ============================================================ */
.skill-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px;
  font-size: 13px; background: #fff; transition: all .15s;
}
.skill-chip:hover { border-color: #c7d2fe; }
.skill-chip input { width: 15px; height: 15px; accent-color: var(--primary); margin: 0; }
.skill-chip:has(input:checked) {
  border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600;
}

/* ==================== 减弱动效（无障碍 / 系统偏好） ==================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}