:root {
  --ink: #191b1a; --muted: #6b716e; --line: #dfe3e0; --paper: #fff; --bg: #f2f3f0;
  --green: #176c5b; --green-dark: #105246; --wine: #7b2938; --gold: #aa7b2d; --soft: #edf4f1;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; letter-spacing: 0; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button, .upload-box { cursor: pointer; }
.app-shell { min-height: 100vh; }
.topbar { min-height: 76px; padding: 16px clamp(18px, 4vw, 56px); background: #202522; color: white; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar h1 { font-size: 24px; }
.eyebrow { color: var(--gold); font-size: 11px; font-weight: 800; margin: 0 0 5px; }
h1, h2, h3, p { margin-top: 0; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.status-dot { font-size: 13px; color: #b9c5c0; }
.status-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #d0a446; }
.status-dot.ready::before { background: #55b895; }
.stepbar { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0 clamp(18px, 4vw, 56px); border-bottom: 1px solid var(--line); background: white; }
.step { padding: 14px 8px; color: #7a817d; font-size: 13px; border-bottom: 3px solid transparent; text-align: center; }
.step b { display: inline-grid; place-items: center; width: 23px; height: 23px; border: 1px solid #cdd3cf; border-radius: 50%; margin-right: 6px; }
.step.active { color: var(--green); border-color: var(--green); font-weight: 700; }
.step.active b { color: white; background: var(--green); border-color: var(--green); }
.workspace-band { padding: 30px clamp(18px, 4vw, 56px); border-bottom: 1px solid var(--line); background: var(--paper); }
.workspace-band:nth-of-type(even) { background: #f7f8f6; }
.section-heading { max-width: 1480px; margin: 0 auto 20px; display: flex; justify-content: space-between; gap: 30px; align-items: end; }
.section-heading h2 { margin-bottom: 0; font-size: 21px; }
.section-heading > p { margin: 0; color: var(--muted); font-size: 13px; max-width: 580px; text-align: right; }
.input-layout { max-width: 1480px; margin: auto; display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 24px; }
.upload-column { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.upload-box { min-height: 280px; border: 1px dashed #aab5af; background: #fafbf9; display: grid; place-items: center; position: relative; overflow: hidden; border-radius: 6px; }
.upload-box.compact { min-height: 150px; }
.upload-box input { position: absolute; opacity: 0; pointer-events: none; }
.upload-box img { width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; }
.upload-empty { text-align: center; padding: 14px; color: var(--green); }
.upload-empty strong, .upload-empty small { display: block; }
.upload-empty small { margin-top: 7px; color: var(--muted); line-height: 1.45; }
.fields-column { display: grid; gap: 14px; align-content: start; }
.field-row, .auth-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
input, textarea { width: 100%; border: 1px solid #cfd5d1; border-radius: 5px; padding: 11px 12px; color: var(--ink); background: white; outline: none; }
input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,108,91,.1); }
textarea { resize: vertical; }
.form-actions, .selection-bar { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.form-actions span, .selection-bar > span { color: var(--muted); font-size: 13px; }
.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 9px 16px; border: 1px solid transparent; border-radius: 5px; text-decoration: none; white-space: nowrap; }
.button.primary { background: var(--green); color: white; }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { background: transparent; color: inherit; border-color: #9fa9a4; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.evidence-strip { max-width: 1480px; margin: 0 auto 18px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); background: white; }
.evidence-strip > div { padding: 12px 14px; }
.evidence-strip > div + div { border-left: 1px solid var(--line); }
.evidence-strip span { color: var(--green); font-size: 12px; font-weight: 800; }
.evidence-strip p { color: var(--muted); font-size: 13px; margin: 5px 0 0; line-height: 1.6; }
.plans-grid { max-width: 1480px; margin: auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.plan-card { border: 1px solid var(--line); background: white; border-radius: 6px; padding: 15px; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.plan-card.selected { border-color: var(--green); box-shadow: 0 0 0 2px rgba(23,108,91,.12); }
.plan-card-head { display: flex; align-items: flex-start; gap: 9px; }
.plan-card input { width: auto; accent-color: var(--green); margin-top: 4px; }
.rank { color: var(--wine); font-weight: 800; font-size: 12px; }
.role { display: inline-block; margin: 5px 0 12px; color: var(--green); background: var(--soft); padding: 3px 7px; font-size: 11px; }
.plan-card h3 { font-size: 16px; margin-bottom: 2px; }
.plan-detail { border-top: 1px solid #edf0ee; padding-top: 9px; margin-top: 9px; }
.plan-detail dt { font-size: 11px; color: #7c837f; font-weight: 700; }
.plan-detail dd { margin: 3px 0 8px; font-size: 12px; line-height: 1.55; }
.plan-risk { color: #77404a; background: #faf3f4; padding: 8px; font-size: 12px; line-height: 1.55; }
.selection-bar { max-width: 1480px; margin: 18px auto 0; padding-top: 16px; border-top: 1px solid var(--line); }
.quality-control { display: flex; border: 1px solid #bdc5c0; border-radius: 5px; overflow: hidden; }
.quality { border: 0; padding: 9px 12px; color: var(--muted); background: white; }
.quality + .quality { border-left: 1px solid #bdc5c0; }
.quality.active { background: #27302c; color: white; }
.lookbook-layout { max-width: 1180px; margin: auto; display: grid; grid-template-columns: minmax(0, 2fr) 360px; gap: 24px; align-items: start; }
.lookbook-stage { background: #f4f4f2; min-height: 650px; display: grid; place-items: center; border: 1px solid var(--line); }
.lookbook-stage img { display: block; width: 100%; max-height: 820px; object-fit: contain; }
.feedback-panel { border-left: 1px solid var(--line); padding-left: 24px; }
.feedback-panel h3 { margin-bottom: 18px; }
.feedback-panel > label:not(.check-row) { grid-template-columns: 100px 1fr 24px; align-items: center; margin-bottom: 12px; }
.feedback-panel input[type="range"] { padding: 0; accent-color: var(--wine); border: 0; box-shadow: none; }
.feedback-panel textarea { grid-column: 1 / -1; }
.check-row { display: flex; align-items: center; margin: 12px 0; }
.check-row input { width: auto; accent-color: var(--green); }
details { margin: 14px 0; border-top: 1px solid var(--line); padding-top: 12px; }
summary { cursor: pointer; color: var(--green); font-size: 13px; font-weight: 700; }
.metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.metrics-grid label { font-size: 11px; }
.metrics-grid input { padding: 8px; }
.full { width: 100%; }
.feedback-note { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
dialog { width: min(900px, calc(100vw - 32px)); max-height: 86vh; border: 0; border-radius: 6px; padding: 0; box-shadow: 0 22px 70px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(13,18,16,.56); }
.dialog-head { position: sticky; top: 0; background: white; border-bottom: 1px solid var(--line); padding: 18px 22px; display: flex; justify-content: space-between; z-index: 1; }
.close-button { width: 38px; height: 38px; font-size: 25px; border: 0; background: #f1f3f1; border-radius: 50%; }
.insights { margin: 18px 22px; padding: 14px; background: var(--soft); color: #31574d; font-size: 13px; line-height: 1.6; }
.history-list { padding: 0 22px 24px; }
.history-item { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; }
.history-item p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; color: white; background: #202522; padding: 11px 16px; border-radius: 5px; transition: .2s; z-index: 10; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
@media (max-width: 1100px) { .plans-grid { grid-template-columns: repeat(2, 1fr); } .input-layout { grid-template-columns: 300px 1fr; } }
@media (max-width: 760px) {
  .topbar { align-items: flex-start; } .topbar-actions { flex-direction: column; align-items: flex-end; }
  .stepbar { overflow-x: auto; grid-template-columns: repeat(4, minmax(130px, 1fr)); }
  .section-heading { display: block; } .section-heading > p { text-align: left; margin-top: 8px; }
  .input-layout, .lookbook-layout { grid-template-columns: 1fr; } .upload-column { grid-template-columns: 2fr 1fr; }
  .upload-box { min-height: 240px; } .plans-grid { grid-template-columns: 1fr; }
  .field-row, .auth-inline, .evidence-strip { grid-template-columns: 1fr; }
  .evidence-strip > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .selection-bar, .form-actions { align-items: stretch; flex-direction: column; }
  .quality-control { align-self: stretch; } .quality { flex: 1; }
  .feedback-panel { border-left: 0; border-top: 1px solid var(--line); padding: 20px 0 0; }
  .lookbook-stage { min-height: 460px; }
}
