:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --surface-2: #fbf9f5;
  --ink: #201d19;
  --muted: #756e64;
  --line: #e7e0d6;
  --line-strong: #d8cfc2;
  --accent: #b8402c;
  --accent-soft: #f8e8e3;
  --green: #2f6f5a;
  --green-soft: #e5f0eb;
  --gold: #a8781f;
  --gold-soft: #f8efd9;
  --blue: #2f5d8a;
  --blue-soft: #e8eff7;
  --red: #b23a34;
  --red-soft: #f8e6e4;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(32, 29, 25, .04), 0 8px 24px rgba(32, 29, 25, .04);
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}
.is-admin { --accent: #2f6f5a; --accent-soft: #e5f0eb; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
p { margin: 0 0 10px; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: .1px; }
button, input, select, textarea { font-family: inherit; font-size: 14px; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 12.5px; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.link { color: var(--accent); font-weight: 600; }
.link:hover { text-decoration: underline; }
.num { font-variant-numeric: tabular-nums; }
.hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 246px;
  flex: 0 0 246px;
  background: #1c1a17;
  color: #f3ede3;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.is-admin .sidebar { background: #16201d; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 18px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 17px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.brand-mark svg { width: 82%; height: 82%; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; letter-spacing: 1px; }
.brand-text small { color: #9d958a; font-size: 10.5px; letter-spacing: .6px; }
.workspace {
  display: flex; gap: 9px; align-items: center;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 10px;
  padding: 9px 10px;
  margin: 0 2px 16px;
}
.ws-dot { width: 7px; height: 7px; border-radius: 50%; background: #5fbf9a; flex: 0 0 7px; }
.ws-name { font-size: 12.8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 176px; }
.ws-sub { font-size: 10.5px; color: #9d958a; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 9px;
  color: #c9c2b7; font-size: 13px;
  position: relative;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.on { background: var(--accent); color: #fff; }
.nav-badge {
  margin-left: auto; font-style: normal; font-size: 10.5px; line-height: 1;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: #c9553f; color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600;
}
.nav-item.on::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 3px 3px 0; background: #fff;
}
.ic { width: 17px; height: 17px; flex: 0 0 17px; }
.sidebar-foot {
  margin-top: auto; display: flex; align-items: center; gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 12px;
}
.me { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px;
  background: rgba(255, 255, 255, .13); color: #fff;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 600;
}
.me-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.me-text strong { font-size: 12.3px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { font-size: 10.5px; color: #9d958a; }
.logout-form { display: inline; margin: 0; }
.logout { color: #9d958a; display: grid; place-items: center; padding: 5px; border-radius: 7px; border: 0; background: none; cursor: pointer; }
.logout:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 22px 30px 0;
  max-width: 1280px; width: 100%; margin: 0 auto;
}
.topbar-title h1 { font-size: 21px; letter-spacing: .2px; }
.topbar-title p { color: var(--muted); font-size: 12.5px; margin: 4px 0 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; padding-top: 3px; }
.pill {
  font-size: 11.5px; padding: 3px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
}
.pill-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.topbar-date { font-size: 12px; color: var(--muted); }
.content { padding: 20px 30px 48px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* ---------- layout ---------- */
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); }
.copilot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-form { display: flex; flex-direction: column; gap: 12px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 4px 0 16px; }
.page-head.tight { margin-top: 0; }
.page-head h2 { font-size: 19px; }
.page-head p { color: var(--muted); font-size: 12.5px; margin: 4px 0 0; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 15px 18px 0;
}
.card-head h3 { font-size: 14px; }
.card-head p { color: var(--muted); font-size: 12px; margin: 3px 0 0; }
.card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-body { padding: 15px 18px 18px; }
.card-body > :last-child { margin-bottom: 0; }

.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.stat-label { color: var(--muted); font-size: 12px; letter-spacing: .2px; }
.stat-value { font-size: 27px; font-weight: 680; letter-spacing: -.6px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-sub { color: var(--muted); font-size: 11.5px; }
.stat.good .stat-value { color: var(--green); }
.stat.warn .stat-value { color: var(--gold); }
.stat.bad .stat-value { color: var(--red); }

/* ---------- buttons / badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 15px; border-radius: 9px;
  border: 1px solid transparent; cursor: pointer;
  font-size: 13px; font-weight: 600; line-height: 1;
  background: var(--surface); color: var(--ink);
  transition: .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(184, 64, 44, .18); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn .ic { width: 15px; height: 15px; }
.btn.ready { animation: readyPulse 1.8s ease-in-out infinite; }
@keyframes readyPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(184, 64, 44, .14); }
  50% { box-shadow: 0 0 0 7px rgba(184, 64, 44, .04); }
}
#hint b { color: var(--accent); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; line-height: 1;
  padding: 4px 8px; border-radius: 999px;
  background: #f1eee9; color: #6d655a; white-space: nowrap;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-gold { background: var(--gold-soft); color: var(--gold); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-gray { background: #f1eee9; color: #6d655a; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -2px; }
.table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.table th {
  text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .4px;
  color: var(--muted); text-transform: none;
  padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 11px 10px; border-bottom: 1px solid #f1ece5; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fcfaf7; }
.table b { font-weight: 600; }
.cell-sub { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .2px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--surface); color: var(--ink); padding: 9px 11px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { resize: vertical; line-height: 1.6; }
.input-lg { min-height: 116px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.select-sm { width: auto; padding: 5px 26px 5px 9px; font-size: 11.5px; border-radius: 7px; }
.row-end { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.span-2 { grid-column: 1 / -1; }
.store-type-note { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; line-height: 1.7; }
.store-type-note b { color: var(--ink); }
.fact-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fact-fieldset[disabled] .input, .fact-fieldset[disabled] .select, .fact-fieldset[disabled] .textarea { background: #f7f4ef; color: #8a8278; }
.form-section { border-top: 1px solid var(--line); padding: 18px 0 4px; }
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section h3 { font-size: 13px; margin-bottom: 12px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }
.form-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form-inline .grow { flex: 1; min-width: 260px; }
.form-inline .input, .form-inline .select { width: auto; }
.page-head.tight p { margin-top: 0; }
.inline-form { display: inline; }

/* ---------- dashboard ---------- */
.funnel { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.funnel-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.funnel-top b { font-variant-numeric: tabular-nums; }
.funnel-track { height: 9px; border-radius: 99px; background: #f2ede6; overflow: hidden; }
.funnel-fill { display: block; height: 100%; border-radius: 99px; }
.tone-accent { background: var(--accent); }
.tone-gold { background: var(--gold); }
.tone-green { background: var(--green); }
.tone-blue { background: var(--blue); }

.checklist { display: flex; flex-direction: column; gap: 10px; }
.check { display: flex; gap: 9px; align-items: flex-start; }
.check-mark {
  width: 18px; height: 18px; border-radius: 50%; flex: 0 0 18px;
  background: var(--gold-soft); color: var(--gold);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; margin-top: 1px;
}
.check.ok .check-mark { background: var(--green-soft); color: var(--green); }
.check-mark .ic { width: 11px; height: 11px; }
.check b { display: block; font-size: 12.3px; font-weight: 600; }
.check small { color: var(--muted); font-size: 11.3px; }
.checklist.compact { gap: 7px; }
.quality-meter { height: 6px; border-radius: 99px; background: #f0ebe3; margin: 14px 0 8px; overflow: hidden; }
.quality-meter span { display: block; height: 100%; background: var(--green); border-radius: 99px; }

.findings { display: flex; flex-direction: column; gap: 10px; }
.finding {
  border: 1px solid var(--line); border-left: 3px solid var(--line-strong);
  border-radius: 10px; padding: 13px 15px; background: var(--surface);
}
.finding.level-high { border-left-color: var(--red); background: #fffbfa; }
.finding.level-mid { border-left-color: var(--gold); background: #fffdf8; }
.finding.level-info { border-left-color: var(--blue); background: #fbfcfe; }
.finding.level-ok { border-left-color: var(--green); background: #fbfdfc; }
.finding-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.finding-head h4 { font-size: 13.2px; flex: 1; }
.level-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); flex: 0 0 7px; }
.level-high .level-dot { background: var(--red); }
.level-mid .level-dot { background: var(--gold); }
.level-info .level-dot { background: var(--blue); }
.level-ok .level-dot { background: var(--green); }
.finding-level { font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 2px 7px; }
.finding p { font-size: 12.3px; color: #4e4840; margin: 0 0 4px; }
.finding p b { color: var(--ink); font-weight: 600; margin-right: 6px; }
.finding-no { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.finding-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
.finding-grid > div > b { display: block; font-size: 11px; color: var(--muted); letter-spacing: .3px; margin-bottom: 1px; }
.finding-grid p { margin: 0; }

.report-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.eyebrow { font-size: 10.5px; letter-spacing: 1.2px; color: var(--accent); font-weight: 700; text-transform: uppercase; }
.report-title { font-size: 19px; margin: 4px 0 6px; }
.report-badge { display: flex; gap: 6px; flex-wrap: wrap; }
.report-metrics .metric-box {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--surface-2);
}
.metric-box > span { font-size: 11.5px; color: var(--muted); display: block; }
.metric-box > b { font-size: 23px; font-variant-numeric: tabular-nums; display: block; margin: 2px 0; }
.metric-box small { font-size: 11px; color: var(--muted); }
.metric-box i { font-style: normal; margin-left: 4px; }
.metric-box .up { color: var(--green); }
.metric-box .down { color: var(--red); }
.notice { border-radius: 9px; padding: 10px 12px; font-size: 12.3px; margin: 10px 0 14px; }
.notice-warn { background: var(--gold-soft); color: #7a5714; }
.notice-ok { background: var(--green-soft, #e8f2ec); color: #2f6f5a; }
.notice b { display: inline-block; margin-bottom: 3px; }
.code-inline {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px; letter-spacing: .06em; padding: 3px 9px; border-radius: 6px;
  background: #f3efe8; border: 1px solid #e3dbcd; color: #2b2723; user-select: all;
}
.action-list { margin: 0; padding-left: 18px; font-size: 12.5px; color: #4e4840; }
.action-list li { margin-bottom: 7px; }
.notes { margin: 0; padding-left: 17px; font-size: 12.3px; color: var(--muted); }
.notes li { margin-bottom: 6px; }

/* ---------- upload ---------- */
.drop {
  border: 1.5px dashed var(--line-strong); border-radius: 12px;
  padding: 22px; text-align: center; background: var(--surface-2);
  transition: .15s;
}
.drop.hot { border-color: var(--accent); background: var(--accent-soft); }
.drop .ic { width: 24px; height: 24px; color: var(--accent); margin-bottom: 4px; }
.drop h4 { font-size: 13px; margin-bottom: 3px; }
.drop p { color: var(--muted); font-size: 11.5px; margin: 0 0 10px; }
.drop input[type=file] { display: none; }
.or { text-align: center; color: var(--muted); font-size: 11px; margin: 12px 0; position: relative; }
.or::before, .or::after { content: ""; position: absolute; top: 50%; width: 38%; height: 1px; background: var(--line); }
.or::before { left: 0; } .or::after { right: 0; }
.upload-result { margin-top: 10px; font-size: 12.3px; }
.format-demo {
  background: #1f1d1a; color: #e8e0d4; border-radius: 9px; padding: 11px 13px;
  font-size: 12px; line-height: 1.7; margin-top: 12px; font-family: ui-monospace, Consolas, monospace;
}
.format-demo span { color: #e8a17e; }

/* ---------- chat ---------- */
.conv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.conv-head h3 { font-size: 15px; }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 620px; overflow-y: auto; padding: 4px 2px 2px; }
.bubble-row { display: flex; }
.bubble-row.right { justify-content: flex-end; }
.bubble {
  max-width: 76%; padding: 9px 12px; border-radius: 12px; font-size: 12.8px;
  white-space: pre-wrap; word-break: break-word;
}
.bubble.customer { background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.cs { background: var(--accent-soft); border: 1px solid #efd2c9; border-bottom-right-radius: 4px; }
.bubble time { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }

/* ---------- facts ---------- */
.pkg-rows { display: flex; flex-direction: column; gap: 7px; margin-bottom: 8px; }
.pkg-row { display: grid; grid-template-columns: 1.1fr .7fr .7fr .8fr 1fr 1.2fr 26px; gap: 6px; align-items: center; }
.pkg-row .input { padding: 7px 8px; font-size: 12.3px; }
.icon-btn {
  width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); cursor: pointer; line-height: 1;
}
.icon-btn:hover { color: var(--red); border-color: var(--red); }
.timeline { display: flex; flex-direction: column; gap: 9px; }
.tl-item { display: flex; gap: 9px; align-items: flex-start; }
.tl-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); margin-top: 6px; flex: 0 0 7px; }
.tl-item b { font-size: 12.3px; display: block; }
.tl-item small { color: var(--muted); font-size: 11px; }

/* ---------- copilot ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.chip {
  border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: 999px; padding: 4px 11px; font-size: 11.8px; color: var(--muted); cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ctx { margin: 4px 0 0; }
.ctx summary { font-size: 11.5px; color: var(--muted); cursor: pointer; }
.ctx .textarea { margin-top: 7px; }
.ground-box { font-size: 12.3px; }
.opt { border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; margin-bottom: 10px; background: var(--surface); }
.opt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.opt-no { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: 0 0 20px; }
.opt-text { font-size: 12.8px; white-space: pre-wrap; line-height: 1.7; color: #2c2823; }
.opt-why { font-size: 11.5px; color: var(--muted); margin-top: 7px; border-top: 1px dashed var(--line); padding-top: 7px; }
.opt-actions { display: flex; gap: 6px; margin-top: 9px; }
.opt-edit { width: 100%; min-height: 90px; margin-top: 7px; }
.risk {
  background: var(--red-soft); color: #7d2a25; border: 1px solid #efc9c4;
  border-radius: 9px; padding: 9px 11px; font-size: 12px; margin-bottom: 10px;
}
.risk b { display: block; margin-bottom: 2px; }
.mini-stats { display: flex; gap: 22px; margin-bottom: 10px; }
.mini-stats div { display: flex; flex-direction: column; }
.mini-stats b { font-size: 19px; font-variant-numeric: tabular-nums; }
.mini-stats span { font-size: 11px; color: var(--muted); }
.recent-list { display: flex; flex-direction: column; }
.recent-item { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f1ece5; font-size: 12.2px; }
.recent-item:last-child { border-bottom: 0; }
.recent-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-item small { color: var(--muted); white-space: nowrap; font-size: 10.8px; }

/* ---------- playbook ---------- */
.script { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; margin-bottom: 9px; position: relative; background: var(--surface); }
.script-head { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.script-head b { font-size: 12.6px; }
.script p { font-size: 12.3px; color: #4e4840; margin: 0; white-space: pre-wrap; }
.script .copy {
  position: absolute; right: 9px; top: 9px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 6px; padding: 3px 7px; font-size: 10.5px; color: var(--muted); cursor: pointer;
  display: inline-flex; gap: 3px; align-items: center;
}
.script .copy:hover { color: var(--accent); border-color: var(--accent); }
.script .copy .ic { width: 11px; height: 11px; }
.tag { font-size: 10.3px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 1px 7px; }
.kv { display: grid; grid-template-columns: 88px 1fr; gap: 5px 10px; font-size: 12.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.kv.compact { font-size: 12px; grid-template-columns: 64px 1fr; }

/* ---------- admin ---------- */
.mini-bar { display: inline-block; width: 46px; height: 5px; border-radius: 99px; background: #f0ebe3; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.mini-bar i { display: block; height: 100%; background: var(--green); }
.health { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 11.5px; font-weight: 700; }
.h-good { background: var(--green-soft); color: var(--green); }
.h-mid { background: var(--gold-soft); color: var(--gold); }
.h-bad { background: var(--red-soft); color: var(--red); }
.good-text { color: var(--green); font-weight: 600; }
.bad-text { color: var(--red); font-weight: 600; }
.todo-list { display: flex; flex-direction: column; gap: 9px; }
.todo { display: flex; gap: 10px; align-items: center; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; }
.todo b { font-size: 12.4px; }
.todo small { display: block; color: var(--muted); font-size: 11px; }
.todo .link { margin-left: auto; font-size: 11.5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); flex: 0 0 7px; }
.dot.red { background: var(--red); }
.signal { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-bottom: 1px solid #f1ece5; }
.signal b { font-size: 12.3px; }
.signal span { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.signal small { color: var(--muted); font-size: 11px; }
.dist { margin-bottom: 14px; }
.dist-label { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.dist-label small { color: var(--muted); }
.dist-track { position: relative; height: 8px; border-radius: 99px; background: #f0ebe3; }
.dist-band { position: absolute; top: 0; height: 8px; background: var(--green-soft); border-radius: 99px; }
.dist-med { position: absolute; top: -2px; width: 3px; height: 12px; border-radius: 2px; background: var(--green); }
.rules { display: flex; flex-direction: column; gap: 10px; }
.rule { display: flex; gap: 12px; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.rule-main { min-width: 0; }
.rule-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 4px; }
.rule-head b { font-size: 12.8px; }
.rule p { font-size: 12.2px; color: #4e4840; margin: 0 0 5px; }
.rule small { font-size: 11px; }

/* ---------- empty / flash ---------- */
.empty { text-align: center; padding: 34px 20px; }
.empty-mark { width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 10px; }
.empty h3 { font-size: 14px; margin-bottom: 4px; }
.empty p { color: var(--muted); font-size: 12.3px; margin: 0 0 12px; }
.empty.small { padding: 18px; }
.empty.small p { margin: 0; }
.flash { border-radius: 9px; padding: 10px 13px; font-size: 12.5px; margin-bottom: 14px; }
.flash-ok { background: var(--green-soft); color: var(--green); border: 1px solid #cfe5db; }
.flash-err { background: var(--red-soft); color: #7d2a25; border: 1px solid #efc9c4; }

/* ---------- auth ---------- */
.auth-body {
  background:
    radial-gradient(700px 420px at 50% -10%, #f8e8e3, transparent 65%),
    var(--bg);
}
.auth-simple { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: min(380px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 32px 26px;
  box-shadow: 0 18px 50px rgba(32, 29, 25, .07);
  text-align: center;
}
.auth-mark { width: 48px; height: 48px; font-size: 23px; border-radius: 12px; margin: 0 auto 14px; }
.auth-card h1 { font-size: 22px; letter-spacing: .5px; }
.auth-tagline { color: var(--muted); font-size: 12px; margin: 4px 0 22px; }
.auth-card .field { text-align: left; margin-bottom: 12px; }
.auth-card .btn-block { height: 44px; margin-top: 8px; }
.auth-foot { color: var(--muted); font-size: 11px; margin: 18px 0 0; }
.auth-card .flash { text-align: left; margin-bottom: 12px; }

/* 全屏品牌登录 */
.auth-luxe {
  min-height: 100vh;
  margin: 0;
  position: relative;
  overflow: hidden;
  color: #f4eee5;
  background:
    radial-gradient(1000px 700px at 8% 18%, rgba(184, 64, 44, .36), transparent 62%),
    radial-gradient(900px 700px at 92% 88%, rgba(47, 111, 90, .20), transparent 60%),
    linear-gradient(135deg, #161412 0%, #1e1b17 52%, #121110 100%);
}
.auth-luxe::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse at 35% 45%, #000 8%, transparent 72%);
  mask-image: radial-gradient(ellipse at 35% 45%, #000 8%, transparent 72%);
}
.auth-luxe::after {
  content: "";
  position: absolute;
  width: 680px;
  height: 680px;
  right: -240px;
  top: -240px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 50%;
  pointer-events: none;
}
.auth-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 30px 44px;
  font-size: 12.5px;
  letter-spacing: .3px;
  color: #cfc6b9;
}
.auth-brand-mark { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; color: #f6f1e8; }
.auth-brand-mark svg { width: 42px; height: 42px; display: block; }
.auth-stage {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 94px);
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 6vw 5vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  align-items: center;
  gap: 5vw;
}
.auth-hero { max-width: 760px; }
.auth-rule { display: block; width: 48px; height: 2px; background: #b8402c; margin-bottom: 28px; }
.auth-hero h1 {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 54px);
  line-height: 1.2;
  letter-spacing: -1.2px;
  font-weight: 700;
  color: #f6f1e8;
}
.auth-login { justify-self: end; width: min(400px, 100%); }
.auth-card-dark {
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 20px;
  padding: 30px 30px 26px;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.auth-card-dark h2 { font-size: 20px; color: #fff; margin-bottom: 20px; }
.auth-card-dark .field { margin-bottom: 12px; }
.auth-card-dark .field > span { color: #b8afa3; }
.auth-card-dark .input {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .14);
  color: #fff;
}
.auth-card-dark .input::placeholder { color: #8e8579; }
.auth-card-dark .input:focus { border-color: #d47a62; box-shadow: 0 0 0 3px rgba(184, 64, 44, .22); }
.auth-card-dark .btn-block { height: 44px; margin-top: 8px; }
.auth-card-dark .flash-err {
  background: rgba(178, 58, 52, .18);
  border-color: rgba(178, 58, 52, .42);
  color: #f3c7c2;
  text-align: left;
}
@media (max-width: 900px) {
  .auth-luxe { overflow: auto; }
  .auth-top { padding: 20px 22px; }
  .auth-stage { grid-template-columns: 1fr; gap: 34px; padding: 24px 22px 40px; min-height: auto; }
  .auth-hero h1 { font-size: 34px; letter-spacing: -.8px; }
  .auth-rule { margin-bottom: 18px; }
  .auth-login { justify-self: stretch; width: 100%; max-width: 420px; margin: 0 auto; }
}
.auth { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 100vh; }
.auth-art {
  position: relative; padding: 40px 48px; color: #f4eee5;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(184, 64, 44, .34), transparent 60%),
    radial-gradient(700px 500px at 90% 90%, rgba(47, 111, 90, .25), transparent 60%),
    #1b1916;
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, .08);
}
.auth-brand { display: flex; align-items: center; gap: 10px; font-size: 14px; letter-spacing: .4px; }
.auth-copy { margin-top: auto; margin-bottom: 40px; }
.auth-copy h1 { font-size: 38px; line-height: 1.28; letter-spacing: -1px; font-weight: 700; }
.auth-copy p { color: #b8afa3; font-size: 13.5px; max-width: 480px; margin-top: 16px; line-height: 1.9; }
.auth-points { display: flex; gap: 18px; margin-top: 22px; flex-wrap: wrap; color: #d8cfc2; font-size: 12px; }
.auth-quote { border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 18px; max-width: 520px; }
.auth-quote p { font-size: 15px; color: #f4eee5; margin-bottom: 4px; }
.auth-quote small { color: #9d958a; font-size: 11.5px; }
.auth-form-wrap { background: var(--bg); display: grid; place-items: center; padding: 40px; }
.auth-form { width: 100%; max-width: 360px; }
.auth-form h2 { font-size: 22px; margin-bottom: 20px; }
.auth-sub { color: var(--muted); font-size: 12px; margin-bottom: 20px; }
.auth-form .field { margin-bottom: 13px; }
.auth-form .btn-block { margin-top: 6px; height: 42px; }
.demo-box { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 14px; }
.demo-title { font-size: 10.5px; color: var(--muted); letter-spacing: .6px; margin-bottom: 6px; }
.demo-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px; margin-bottom: 6px; cursor: pointer; text-align: left;
}
.demo-row:hover { border-color: var(--accent); }
.demo-row b { font-size: 11.6px; font-weight: 600; }
.demo-row span { color: var(--muted); font-size: 10.6px; }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-1, .grid-3, .copilot-grid { grid-template-columns: 1fr; }
  .auth-copy h1 { font-size: 30px; }
}
@media print {
  .sidebar, .topbar, .page-actions, .report-badge button, .flash, .copy { display: none !important; }
  .shell { display: block; }
  .content { max-width: none; padding: 0; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ddd; break-inside: avoid; margin-bottom: 12px; }
  .grid { display: block; }
  .finding { break-inside: avoid; }
}

@media (max-width: 820px) {
  .sidebar { width: 74px; flex-basis: 74px; padding: 14px 8px; }
  .brand-text, .workspace, .nav-item span, .me-text { display: none; }
  .nav-item { justify-content: center; padding: 10px; }
  .nav-item.on::before { left: -8px; }
  .brand { justify-content: center; padding-bottom: 14px; }
  .sidebar-foot { justify-content: center; flex-direction: column; gap: 8px; }
  .logout { display: grid; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .pkg-row { grid-template-columns: 1fr 1fr; }
  .pkg-row .icon-btn { display: none; }
}

/* 备案号 */
.site-foot { padding: 18px 0 26px; text-align: center; font-size: 12px; color: #8a8378; }
.site-foot a { color: #8a8378; }
.site-foot a:hover { color: #2b2723; }

/* 危险操作：红色按钮 + 折叠区 */
.btn-danger {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn-danger:hover { background: #9c2f2a; border-color: #9c2f2a; }
details.danger-zone { margin-top: 4px; }
details.danger-zone > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: var(--red);
  border-color: #e3c3bf;
}
details.danger-zone > summary::-webkit-details-marker { display: none; }
details.danger-zone > summary::before { content: '⚠ '; }
details.danger-zone > summary:hover { background: var(--red-soft); }
/* ===== 套餐矩阵（平台端） ===== */
.matrix th.matrix-col { min-width: 150px; vertical-align: top; }
.matrix .matrix-corner { width: 260px; }
.matrix .matrix-label { line-height: 1.35; }
.matrix .matrix-cell { text-align: center; vertical-align: middle; }
.matrix .matrix-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.matrix .matrix-gap td { padding: 6px 0; border: 0; }
.input-tight { height: 30px; padding: 0 8px; font-size: 13px; }
.select-tight { height: 30px; padding: 0 6px; font-size: 13px; }
input.num { text-align: center; width: 84px; }

.switch { display: inline-flex; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span {
  width: 42px; height: 24px; border-radius: 999px; background: #d8cfc2; border: 1px solid #cdc2b2;
  position: relative; transition: background .15s; display: inline-block;
}
.switch span::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent-soft); }

/* 模块状态小药丸 */
.module-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.module-pill {
  font-size: 12.5px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
}
.module-pill.on { border-color: #cfe3d8; background: var(--green-soft); color: var(--green); }
.module-pill small { font-size: 11px; opacity: .8; }
/* 开关：静态状态类（on）+ :checked 双保险 */
.switch span.on { background: #2f6f5a; border-color: #2f6f5a; }
.switch span.on::after { transform: translateX(18px); }

/* 矩阵里的模块开关：按钮式（勾选状态靠 label 的 class，不依赖子元素背景） */
.mod-toggle { display: inline-block; cursor: pointer; user-select: none; }
.mod-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mod-face {
  display: inline-block; min-width: 74px; padding: 5px 10px; border-radius: 8px;
  font-size: 12.5px; text-align: center; border: 1px solid #e0d8cc;
  background: #f3efe8; color: #6f675c;
}
.mod-toggle.on .mod-face { background: #2f6f5a; border-color: #2f6f5a; color: #fff; font-weight: 600; }
.mod-toggle:hover .mod-face { border-color: #b8402c; }
.mod-toggle input:focus-visible + .mod-face { outline: 2px solid #f8e8e3; }

/* ===== 套餐：导航锁 / 顶部标签 / 到期提醒 ===== */
.nav-item.locked { color: #9a938a; }
.nav-item.locked .ic { opacity: .55; }
.nav-lock { margin-left: auto; display: inline-flex; opacity: .6; }
.nav-lock .ic { width: 13px; height: 13px; }
.pill-warn { background: var(--gold-soft); color: var(--gold); border-color: #ecd9ae; }
.plan-banner {
  margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; font-size: 13px;
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
}
.plan-banner.warn { background: var(--gold-soft); color: #7a5710; border: 1px solid #ecd9ae; }
.plan-banner.info { background: var(--blue-soft); color: #234b6f; border: 1px solid #cddff0; }
.banner-x {
  border: 1px solid currentColor; background: transparent; color: inherit;
  border-radius: 7px; padding: 3px 9px; font-size: 12px; cursor: pointer; opacity: .8;
}
.banner-x:hover { opacity: 1; }
.usage-line { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.usage-line:last-child { border-bottom: 0; }
.locked-teaser {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 12px;
  background: var(--surface-2); margin-top: 12px;
}
/* ===== 导航分组 ===== */
.nav-group {
  font-size: 11px; color: #6f675c; letter-spacing: 1px;
  padding: 14px 12px 6px; text-transform: none;
}
.nav-group:first-child { padding-top: 4px; }
@media (max-width: 820px) {
  .nav-group {
    font-size: 0; padding: 0; margin: 8px 10px; height: 1px;
    background: rgba(255,255,255,.12);
  }
}
/* ===== 内容设置页（批次 E） ===== */
.tabs { display: flex; gap: 6px; margin: 4px 0 16px; flex-wrap: wrap; }
.tab {
  padding: 8px 14px; border-radius: 10px; border: 1px solid #e7e0d6;
  background: #ffffff; font-size: 13.5px; color: #756e64; display: inline-block;
}
.tab:hover { border-color: #d8cfc2; color: #201d19; }
.tab.on { background: #201d19; border-color: #201d19; color: #ffffff; }
.tab-ok { color: var(--green); font-style: normal; font-weight: 700; }
.tab.on .tab-ok { color: #a8e0c8; }

.chips-check { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); font-size: 13px;
}
.chip-check input { accent-color: var(--green); }
.chip-check:has(input:checked) { background: var(--green-soft); border-color: #bfdccb; color: #1f4f3f; }

.story-list { display: flex; flex-direction: column; gap: 10px; }
.story-row { display: flex; flex-direction: column; gap: 4px; }
.story-meta { text-align: right; }

.style-card {
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
  padding: 12px 14px; margin: 8px 0;
}
.style-head { font-weight: 650; font-size: 13.5px; margin-bottom: 6px; }
.style-body { font-size: 13px; line-height: 1.8; color: #4e4840; }
.style-body b { color: var(--ink); }
/* ===== 每日内容页（批次 G） ===== */
.content-grid { align-items: start; }
.content-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.content-plat { font-weight: 700; margin-right: 6px; }
.content-block { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.content-block:last-of-type { border-bottom: 0; }
.content-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.content-title { font-size: 16px; font-weight: 650; line-height: 1.5; }
.content-body { font-size: 14px; line-height: 1.85; white-space: pre-wrap; color: #3d3831; }
.content-hook { font-size: 14.5px; font-weight: 600; background: var(--gold-soft); padding: 8px 10px; border-radius: 8px; }
.content-cover { display: inline-block; padding: 6px 12px; border: 1px dashed var(--line-strong); border-radius: 8px; font-weight: 650; }
.content-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.content-tags .tag { font-size: 12.5px; color: var(--blue); background: var(--blue-soft); padding: 3px 8px; border-radius: 999px; }
.content-risk { margin-top: 12px; background: var(--gold-soft); border: 1px solid #ecd9ae; border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #7a5710; }
.content-risk ul { margin: 6px 0; padding-left: 18px; }
.content-risk li { margin: 2px 0; }
.content-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.content-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.content-actions .btn { min-height: 36px; }
.shots-table td { vertical-align: top; font-size: 13px; }
.shots-table td:nth-child(1) { white-space: nowrap; color: var(--muted); }

@media (max-width: 820px) {
  .content-grid { grid-template-columns: 1fr; }
  .content-actions .btn { flex: 1 1 auto; min-height: 44px; }
  .content-label .copy { min-height: 32px; }
  .content-body { font-size: 15px; }
}
/* 概览页：今日内容卡片 */
.content-summary .cs-line { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.content-summary .cs-plat { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.content-summary .cs-plat.on { background: var(--green-soft); border-color: #cfe3d8; color: var(--green); }
.content-summary .cs-title { margin-top: 8px; font-size: 14.5px; font-weight: 600; }


/* 改一改 */
.edit-box { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.edit-box > summary { list-style: none; display: inline-flex; }
.edit-box > summary::-webkit-details-marker { display: none; }
.edit-box[open] > summary { color: var(--accent); border-color: var(--accent); }


/* ===== 内容设置：对标账号卡片 ===== */
/* 三个小红书之间要一眼分得清：卡片之间留大间距 + 顶部色条 */
#app .card + .card { margin-top: 18px; }
.acct-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.acct-plat {
  font-size: 12px; padding: 2px 9px; border-radius: 999px;
  background: var(--blue-soft); color: var(--blue); font-weight: 600;
}
.acct-edit { margin: 6px 0 4px; }
.acct-edit > summary { list-style: none; cursor: pointer; display: inline-block; border-bottom: 1px dashed var(--line-strong); }
.acct-edit > summary::-webkit-details-marker { display: none; }
.acct-card-gap { height: 1px; }


/* ===== 新手四步 ===== */
.steps-card { margin-bottom: 16px; }
.steps-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.steps-head small { display: block; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.step { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit; background: #fff; }
.step:hover { border-color: var(--accent); }
.step.done { background: var(--green-soft); border-color: transparent; }
.step-no { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.step.done .step-no { background: var(--green); }
.step b { display: block; font-size: 14px; }
.step small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }
.step-cta { margin-left: auto; font-size: 12px; color: var(--accent); white-space: nowrap; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ===== 诊断发现：改法在前 ===== */
.finding-fix { margin: 8px 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--gold-soft); }
.finding-fix > b { display: block; font-size: 13px; margin-bottom: 4px; }
.finding-fix > p { margin: 0 0 8px; }
.script-block { border-top: 1px dashed rgba(0,0,0,.12); padding-top: 8px; }
.script-row { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; }
.script-row p { margin: 0; flex: 1; }
.finding-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* 打印/存 PDF：只留报告正文 */
@media print {
  .sidebar, .topbar, .page-head, .btn, .locked-teaser, .flash, form { display: none !important; }
  body { background: #fff; }
  .main, .content { padding: 0 !important; margin: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; }
  .grid-2-1, .grid-3 { display: block !important; }
  .finding { break-inside: avoid; }
  a[href]:after { content: ""; }
}


/* ===== 照片成文 ===== */
.photo-drop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 10px; }
.photo-grid { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.photo-cell { position: relative; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; background: #f3f3f1; }
.photo-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-rm { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.photo-job { margin-bottom: 14px; }
.photo-job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.photo-job-thumbs { display: flex; gap: 6px; }
.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.photo-title { margin: 8px 0 6px; font-size: 17px; }
.photo-body { white-space: pre-wrap; line-height: 1.75; }
.photo-tags { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.photo-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: flex-start; }
