:root {
  --blue: #185fa5;
  --blue-2: #2478cc;
  --blue-3: #0c447c;
  --blue-50: #eef4fb;
  --blue-100: #dbe9f8;
  --ink: #1f2937;
  --ink-2: #4b5563;
  --muted: #6b7280;
  --bg: #f5f7fa;
  --card: #ffffff;
  --line: #e3e8ef;
  --line-2: #eef1f6;
  --amber: #b45309;
  --amber-bg: #fef3c7;
  --amber-line: #fde68a;
  --green: #15803d;
  --green-bg: #dcfce7;
  --green-line: #bbf7d0;
  --red: #dc2626;
  --red-bg: #fee2e2;
  --red-line: #fecaca;
  --purple: #6d28d9;
  --purple-bg: #ede9fe;
  --purple-line: #ddd6fe;
  --gray-bg: #f3f5f8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 4px 14px rgba(16, 24, 40, .09);
  --shadow-lg: 0 12px 32px rgba(12, 68, 124, .26);
  --ring: 0 0 0 3px rgba(24, 95, 165, .15);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }

/* ===== 登录 ===== */
.login-box {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0c447c, #185fa5 55%, #2478cc);
}
.login-card {
  background: #fff; width: 364px; max-width: 90vw;
  border-radius: 16px; padding: 40px 32px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  display: inline-block; background: var(--blue-50); color: var(--blue);
  font-size: 13px; font-weight: 600; padding: 5px 14px; border-radius: 20px;
  margin-bottom: 16px; letter-spacing: 1px;
}
.login-card h1 { font-size: 21px; margin: 0 0 6px; font-weight: 600; color: var(--ink); }
.login-card input {
  width: 100%; margin: 20px 0 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.login-card input:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
.err { color: var(--red); font-size: 13px; min-height: 18px; margin: 6px 0 0; }

/* ===== 顶栏 ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 58px; background: var(--blue); color: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
  position: sticky; top: 0; z-index: 20;
}
.brand { font-size: 16px; font-weight: 600; letter-spacing: .3px; display: flex; align-items: center; gap: 8px; }
.ver {
  font-size: 11px; font-weight: 400; opacity: .85;
  background: rgba(255, 255, 255, .16); padding: 2px 8px; border-radius: 20px;
}

/* ===== 按钮 ===== */
.btn-primary {
  background: linear-gradient(135deg, #185fa5, #2478cc); color: #fff;
  border: none; border-radius: 10px; padding: 12px 0; font-size: 15px;
  font-weight: 600; cursor: pointer; letter-spacing: 2px; width: 100%;
  box-shadow: 0 1px 2px rgba(24, 95, 165, .25);
  transition: filter .15s, transform .1s, box-shadow .15s;
}
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 4px 12px rgba(24, 95, 165, .3); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary.sm {
  width: auto; padding: 8px 16px; font-size: 13px;
  border-radius: 20px; letter-spacing: 1px; line-height: 1.4;
}
.btn-ghost {
  background: var(--blue); color: #fff; border: 1px solid var(--blue);
  border-radius: 10px; padding: 10px 18px; font-size: 14px; cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.btn-ghost:hover { background: var(--blue-2); border-color: var(--blue-2); box-shadow: 0 2px 8px rgba(24, 95, 165, .24); }
.btn-ghost.sm {
  background: var(--blue); color: #fff; border: 1px solid var(--blue);
  padding: 8px 16px; font-size: 13px; border-radius: 20px;
}
.btn-ghost.sm:hover { background: var(--blue-2); border-color: var(--blue-2); }
.topbar .btn-ghost.sm { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .5); }
.topbar .btn-ghost.sm:hover { background: rgba(255, 255, 255, .24); border-color: #fff; }

/* ===== 统计卡 ===== */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; padding: 20px 24px;
}
.stat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--blue); }
.stat-num { font-size: 26px; font-weight: 700; line-height: 1.25; }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 2px; }
.stat-card.t-all .stat-num { color: var(--blue); }
.stat-card.t-all::before { background: var(--blue); }
.stat-card.t-pending .stat-num { color: var(--amber); }
.stat-card.t-pending::before { background: var(--amber); }
.stat-card.t-confirmed .stat-num { color: var(--purple); }
.stat-card.t-confirmed::before { background: var(--purple); }
.stat-card.t-testing .stat-num { color: var(--blue-2); }
.stat-card.t-testing::before { background: var(--blue-2); }
.stat-card.t-done .stat-num { color: var(--green); }
.stat-card.t-done::before { background: var(--green); }

/* ===== 待办通知（统计卡下方） ===== */
.todo-panel { margin: 0 24px 4px; }
.todo-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow);
}
.th-title { font-size: 15px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.th-new {
  font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 10px;
  color: #fff; background: var(--red);
}
.th-right { display: flex; align-items: center; gap: 12px; }
.th-count { font-size: 13px; color: var(--muted); }
.todo-empty {
  padding: 18px; text-align: center; color: var(--muted); font-size: 13px;
  background: var(--card); border: 1px solid var(--line); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow);
}
.todo-rows {
  background: var(--card); border: 1px solid var(--line); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
}
.todo-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  cursor: pointer; transition: background .15s;
  border-bottom: 1px solid var(--line-2);
}
.todo-row:last-child { border-bottom: none; }
.todo-row:hover { background: var(--blue-50); }
.tr-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.tr-dot.red, .ti-dot.red { background: var(--red); }
.tr-dot.purple, .ti-dot.purple { background: var(--purple); }
.tr-dot.amber, .ti-dot.amber { background: var(--amber); }
.tr-dot.blue, .ti-dot.blue { background: var(--blue); }
.tr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tr-title { font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.tr-hint { font-size: 12px; }
.tr-count {
  font-size: 16px; font-weight: 700; min-width: 30px; text-align: center;
  padding: 2px 10px; border-radius: 14px; background: var(--gray-bg); color: var(--ink-2);
}
.tr-arrow { color: var(--muted); font-size: 14px; width: 14px; text-align: center; transition: transform .15s; }
.todo-row.open { background: var(--blue-50); }
.todo-row.open .tr-arrow { transform: rotate(90deg); }
.todo-items { background: var(--gray-bg); border-bottom: 1px solid var(--line-2); padding: 6px 12px; }
.todo-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 8px; margin: 6px 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.todo-item:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.ti-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ti-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ti-line1 { font-size: 13px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ti-line2 { font-size: 12px; }
.ti-new {
  font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 9px; line-height: 16px;
  color: var(--red); background: var(--red-bg); border: 1px solid var(--red-line);
}
.ti-go { font-size: 12px; color: var(--blue); white-space: nowrap; }

/* ===== 工具栏 ===== */
.toolbar { padding: 0 24px 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 240px; min-width: 0; }
.tab {
  padding: 7px 16px; border-radius: 20px; background: #fff;
  border: 1px solid var(--line); font-size: 13px; cursor: pointer; color: var(--ink-2);
  transition: color .15s, border-color .15s, background .15s;
}
.tab:hover { border-color: var(--blue); color: var(--blue); }
.tab.active {
  background: var(--blue); color: #fff; border-color: var(--blue);
  box-shadow: 0 1px 3px rgba(24, 95, 165, .26);
}
.search {
  padding: 9px 14px; border: 1px solid var(--line);
  border-radius: 20px; font-size: 13px; background: #fff; min-width: 240px;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
.tb-right {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
  flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end;
}
.search-box {
  position: relative; display: flex; align-items: center;
  flex: 0 0 300px; max-width: 100%;
}
.tb-right .search { flex: 1; min-width: 0; width: 100%; padding-right: 34px; }
.search-clear {
  position: absolute; right: 9px; width: 20px; height: 20px; padding: 0;
  border: none; border-radius: 50%; background: #cbd5e1; color: #fff;
  font-size: 14px; line-height: 18px; cursor: pointer; transition: background .15s;
}
.search-clear:hover { background: var(--muted); }

/* ===== 订单列表 ===== */
.list { padding: 4px 24px 40px; display: flex; flex-direction: column; gap: 12px; }
.order-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); cursor: pointer;
  border-left: 4px solid var(--blue);
  transition: box-shadow .15s, transform .15s, border-left-color .15s;
}
.order-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-left-color: var(--blue-2); }
.oc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.oc-no { font-weight: 600; font-size: 15px; letter-spacing: .2px; }
.oc-mid { margin: 8px 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.oc-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.oc-items { color: var(--ink); }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* ===== 状态徽章 ===== */
.badge {
  display: inline-block; padding: 3px 11px; border-radius: 20px;
  font-size: 12px; font-weight: 600; border: 1px solid transparent; white-space: nowrap;
  line-height: 1.5;
}
.badge.pending { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.badge.confirmed { background: var(--blue-50); color: var(--blue); border-color: var(--blue-100); }
.badge.testing { background: var(--purple-bg); color: var(--purple); border-color: var(--purple-line); }
.badge.done { background: var(--green-bg); color: var(--green); border-color: var(--green-line); }
.badge.done_uninvoiced { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.badge.done_invoiced { background: var(--green-bg); color: var(--green); border-color: var(--green-line); }

/* ===== 抽屉 ===== */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 480px; max-width: 94vw;
  background: var(--bg); overflow-y: auto; box-shadow: -8px 0 32px rgba(16, 24, 40, .18);
  animation: slideIn .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes slideIn { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.dp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; background: var(--blue); color: #fff;
  position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 3px rgba(16, 24, 40, .14);
}
.dp-head .title { font-size: 16px; font-weight: 600; }
.dp-close { font-size: 26px; cursor: pointer; line-height: 1; opacity: .85; transition: opacity .15s; }
.dp-close:hover { opacity: 1; }
.dp-body { padding: 16px 20px 40px; }
.dp-section {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.dp-section h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--blue); }
.kv { display: flex; font-size: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); }
.kv:last-child { border-bottom: none; }
.kv .k { width: 92px; color: var(--muted); flex: none; }
.kv .v { flex: 1; word-break: break-all; }

/* ===== 客户评价 ===== */
.stars { display: inline-flex; gap: 2px; }
.stars .star { color: #d8d8d8; font-size: 16px; }
.stars .star.on { color: #ffb400; }
.review-comment {
  margin-top: 8px; padding: 10px 12px; background: var(--gray-bg);
  border-radius: var(--radius-sm); font-size: 13px; color: var(--ink-2); line-height: 1.65;
}
.review-time { margin-top: 6px; font-size: 12px; }

/* ===== 表格 ===== */
table.items-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.items-tbl th, .items-tbl td { border: 1px solid var(--line-2); padding: 8px 8px; text-align: left; }
.items-tbl th { background: var(--gray-bg); color: var(--ink-2); font-weight: 600; }
.items-tbl .price { color: var(--blue); font-weight: 600; }

/* ===== 退样地址 ===== */
.kv .v.addr { line-height: 1.7; word-break: break-all; }
.kv .v.warn { color: var(--amber); font-weight: 600; }
.btn-copy {
  margin-left: 8px; padding: 2px 10px; font-size: 12px; font-family: inherit;
  color: var(--blue); background: var(--blue-50); border: 1px solid var(--blue-100);
  border-radius: 20px; cursor: pointer; white-space: nowrap; transition: background .15s;
}
.btn-copy:hover { background: var(--blue-100); }
.btn-copy:focus { outline: none; box-shadow: var(--ring); }

/* ===== 人工改价（订单详情抽屉） ===== */
.sec-hint { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.items-tbl.edit th:last-child, .items-tbl.edit td:last-child { text-align: right; }
.items-tbl.edit td { vertical-align: middle; }
.pi-name { font-weight: 600; color: var(--ink); }
.pi-tag {
  display: inline-block; margin-left: 6px; padding: 1px 6px; font-size: 11px; font-weight: 600;
  color: var(--purple); background: var(--purple-bg); border: 1px solid var(--purple-line); border-radius: 10px;
}
input.pi {
  width: 74px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 13px; font-family: inherit; color: var(--ink); background: #fff; text-align: right;
}
input.pi:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
input.pi::placeholder { color: #b6bfcc; text-align: right; }
.pi-line { white-space: nowrap; }
.pi-line.muted { color: var(--muted); font-weight: 500; }

.quote-form {
  margin-top: 12px; padding: 14px; background: var(--gray-bg);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  display: flex; flex-direction: column; gap: 10px;
}
.quote-form .a-input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 14px; background: #fff;
  color: var(--ink); font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.quote-form .a-input:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
.quote-form .chk { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.quote-form .chk input { width: 15px; height: 15px; accent-color: var(--blue); cursor: pointer; }
.quote-form .btn-primary.sm { align-self: flex-start; }
.quote-form .status-msg { margin-top: 0; }

.price-log { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.pl-title { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.pl-item {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid var(--line-2); font-size: 12px;
}
.pl-item:last-child { border-bottom: none; }
.pl-time { color: var(--muted); }
.pl-money { color: var(--blue); font-weight: 600; }
.pl-note { color: var(--ink-2); }

/* 列表卡片：待报价标记 */
.oc-quote {
  padding: 2px 8px; font-size: 11px; font-weight: 600; border-radius: 10px;
  color: var(--purple); background: var(--purple-bg); border: 1px solid var(--purple-line);
  margin-right: auto;
}

.sign-img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.img-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.img-grid img {
  width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm);
  border: 1px solid var(--line); cursor: pointer; transition: opacity .15s;
}
.img-grid img:hover { opacity: .85; }

/* ===== 时间线 ===== */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 8px 0; }
.tl-item::before {
  content: ''; position: absolute; left: -16px; top: 12px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px var(--blue-50);
}
.tl-item .tl-text { font-size: 14px; font-weight: 600; }
.tl-item .tl-time { font-size: 12px; color: var(--muted); }
.tl-item .tl-note { font-size: 13px; color: var(--ink); margin-top: 2px; }

/* ===== 表单 ===== */
.status-form { display: flex; flex-direction: column; gap: 10px; }
.status-form select, .status-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 14px; background: #fff; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.status-form select:focus, .status-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
.status-form textarea { height: 70px; resize: vertical; }
.status-msg { font-size: 13px; min-height: 16px; margin: 8px 0 0; transition: opacity .4s; }
.status-msg.ok {
  color: var(--green); background: var(--green-bg); border: 1px solid var(--green-line);
  border-radius: var(--radius-sm); padding: 9px 14px; font-weight: 600;
}
.status-msg.err {
  color: var(--red); background: var(--red-bg); border: 1px solid var(--red-line);
  border-radius: var(--radius-sm); padding: 9px 14px; font-weight: 600;
}

/* ===== 消息发布记录 ===== */
.msg-list { display: flex; flex-direction: column; gap: 12px; }
.msg-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; box-shadow: var(--shadow);
  border-left: 4px solid var(--blue);
}
.msg-item:hover { box-shadow: var(--shadow-md); }
.mi-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mi-type {
  flex: none; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 20px;
}
.mi-type.announce { background: var(--blue-50); color: var(--blue); border: 1px solid var(--blue-100); }
.mi-type.notice { background: var(--purple-bg); color: var(--purple); border: 1px solid var(--purple-line); }
.mi-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.mi-time { margin-left: auto; }
.mi-content {
  margin-top: 8px; padding: 10px 14px; background: var(--gray-bg);
  border-radius: var(--radius-sm); font-size: 13px; color: var(--ink-2); line-height: 1.6;
  word-break: break-all; white-space: normal;
}
.mi-meta { margin-top: 8px; font-size: 12px; }
.mi-del { flex: none; margin-left: 4px; }

/* ===== 公告发布 ===== */
.announce-box {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin: 0 24px 14px; box-shadow: var(--shadow);
}
.announce-box .a-input, .announce-box .a-text {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 10px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.announce-box .a-input:focus, .announce-box .a-text:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
.announce-box .a-text { height: 72px; resize: vertical; }
.announce-box .a-actions { display: flex; justify-content: flex-end; gap: 10px; }
.announce-box .a-actions .btn-primary { width: auto; padding: 10px 22px; letter-spacing: 1px; }

/* ===== 开票表单 ===== */
.invoice-form { display: flex; gap: 10px; margin-top: 10px; }
.invoice-form .a-input {
  margin-bottom: 0; flex: 1; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
}
.invoice-form .btn-primary { width: auto; padding: 10px 18px; letter-spacing: 1px; }

/* ===== 定价管理 ===== */
.price-panel { padding: 20px 24px 40px; }
.pp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.pp-head h2 { margin: 0 0 4px; font-size: 18px; font-weight: 600; color: var(--blue); }
.pp-head .muted { margin: 0; }
.pp-actions { display: flex; gap: 10px; flex: none; }
.pp-actions .btn-primary { width: auto; padding: 10px 18px; letter-spacing: 1px; }
.pp-actions .btn-ghost {
  background: var(--blue); color: #fff; border: 1px solid var(--blue);
  border-radius: 10px; padding: 10px 18px; font-size: 14px; cursor: pointer;
}
.price-tree { display: flex; flex-direction: column; gap: 16px; }
.pc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.pc-title { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.pg { margin: 10px 0; }
.pg-title { font-size: 13px; color: var(--muted); margin: 8px 0 6px; }
.pi-row { display: flex; align-items: center; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); }
.pi-row:last-child { border-bottom: none; }
.pi-name { width: 240px; flex: none; font-size: 14px; }
.pi-spec { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.pi-inputs { display: flex; flex-wrap: wrap; gap: 10px; flex: 1; }
.pi-inputs label { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); gap: 3px; }
.pi-inputs input {
  width: 132px; padding: 7px 9px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 13px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.pi-inputs input:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }

/* ===== 分类分组报价表格 ===== */
.pt-block { margin-bottom: 26px; }
.pt-cat { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0 0 10px; }
.price-tbl { width: 100%; border-collapse: collapse; margin-bottom: 6px; background: #fff; }
.price-tbl th, .price-tbl td { border: 1px solid var(--line-2); padding: 8px 10px; font-size: 13px; text-align: left; vertical-align: middle; }
.price-tbl thead th { background: var(--blue); color: #fff; font-weight: 600; }
.price-tbl .pt-grp th { background: var(--blue-50); color: var(--ink); font-weight: 600; text-align: left; }
.price-tbl .pt-name { font-weight: 500; min-width: 140px; }
.price-tbl .pt-spec { color: var(--muted); }
.price-tbl .pt-na { color: var(--muted); text-align: center; }
.price-tbl .pt-input {
  width: 100%; box-sizing: border-box; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 6px; font-size: 13px; background: #fff;
}
.price-tbl .pt-input:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }

/* ===== 目录结构编辑 ===== */
.pp-tabs { display: flex; gap: 8px; margin: 4px 0 16px; }
.pp-tab {
  background: #fff; color: var(--ink-2); border: 1px solid var(--line);
  border-radius: 20px; padding: 8px 22px; font-size: 14px; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.pp-tab:hover { border-color: var(--blue); color: var(--blue); }
.pp-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.cat-tree { display: flex; flex-direction: column; gap: 18px; }
.ct-cat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.ct-cat-head { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.ct-group { margin: 12px 0 12px 16px; border-left: 3px solid var(--blue-50); padding-left: 12px; }
.ct-grp-head { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--blue); margin-bottom: 8px; }
.ct-tbl { width: 100%; border-collapse: collapse; }
.ct-tbl th, .ct-tbl td { border: 1px solid var(--line-2); padding: 6px 8px; font-size: 13px; text-align: left; vertical-align: middle; }
.ct-tbl thead th { background: var(--blue-50); color: var(--ink); font-weight: 600; }
.ct-item:hover { background: #fafbfd; }
.ct-in {
  width: 100%; box-sizing: border-box; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 6px; font-size: 13px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.ct-in:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
.ct-type { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; background: #fff; font-family: inherit; }
.ct-type:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
.ct-name-in {
  width: auto; min-width: 140px; max-width: 280px; font-weight: 600;
  border: 1px solid transparent; border-radius: 6px; padding: 5px 8px; background: transparent;
  font-family: inherit; font-size: 14px; color: inherit;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.ct-name-in:hover { border-color: var(--line); background: #fff; }
.ct-name-in:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: var(--ring); }
.ct-cat-head .ct-name-in { font-size: 16px; }
.ct-grp-head .ct-name-in { font-size: 14px; color: var(--blue); }
.ct-id { color: #9aa6b2; font-weight: 400; font-size: 12px; }
.ct-num { max-width: 90px; }
.btn-add {
  background: var(--green); color: #fff; border: none; border-radius: 8px;
  padding: 6px 12px; font-size: 13px; cursor: pointer; transition: filter .15s;
}
.btn-add:hover { filter: brightness(1.08); }
.btn-del {
  background: var(--red); color: #fff; border: none; border-radius: 8px;
  padding: 6px 10px; font-size: 12px; cursor: pointer; transition: filter .15s;
}
.btn-del:hover { filter: brightness(1.08); }
.ct-addcat { margin-top: 6px; }

/* ===== 数据看板 ===== */
.stats-panel { padding: 20px 24px 40px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card.t-inv .stat-num { color: var(--green); }
.stat-card.t-inv::before { background: var(--green); }
.stat-card.t-uninv .stat-num { color: var(--amber); }
.stat-card.t-uninv::before { background: var(--amber); }
.month-section { padding: 16px 18px; }
.month-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.month-tbl th, .month-tbl td { border: 1px solid var(--line-2); padding: 10px 12px; text-align: left; }
.month-tbl th { background: var(--gray-bg); color: var(--ink-2); font-weight: 600; }
.month-tbl tbody tr:hover { background: #fafbfd; }
.month-tbl .price { font-weight: 600; color: var(--green); }
.month-tbl .price.warn { color: var(--amber); }
.month-tbl td:first-child { color: var(--ink); font-weight: 600; }

/* ===== 危险操作 ===== */
.dp-danger { border: 1px solid var(--red-line); background: #fef7f7; }
.btn-danger {
  background: var(--red); color: #fff; border: none; border-radius: 10px;
  padding: 11px 22px; font-size: 14px; font-weight: 600; cursor: pointer;
  letter-spacing: 1px; transition: filter .15s;
}
.btn-danger:hover { filter: brightness(.92); }
.btn-danger.sm {
  width: auto; padding: 6px 14px; font-size: 13px; font-weight: 500;
  border-radius: 20px; letter-spacing: 0;
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .toolbar { flex-direction: column; align-items: stretch; }
  .tb-right { margin-left: 0; flex-wrap: wrap; }
  .search { min-width: 0; }
  .search-box { flex: 1 1 100%; max-width: none; }
  .price-panel, .stats-panel, .list, .stats { padding-left: 14px; padding-right: 14px; }
  .announce-box { margin-left: 14px; margin-right: 14px; }
}
