.shadow-workbench-page { min-width: 0; }
.shadow-workbench-intro { align-items: flex-start; }
.shadow-mode-badge { border: 1px solid #7c3aed; border-radius: 999px; color: #6d28d9; font-size: .72rem; font-weight: 800; letter-spacing: .05em; padding: .45rem .7rem; white-space: nowrap; }
.shadow-safety-strip { align-items: center; background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 14px; display: flex; flex-wrap: wrap; gap: .55rem 1.1rem; margin-bottom: 1rem; padding: .8rem 1rem; }
.shadow-safety-strip strong { color: #5b21b6; }
.shadow-safety-strip span { color: #475569; font-size: .82rem; }
.shadow-workbench { min-width: 0; }
.shadow-evidence-panel { background: #fffdf7; border: 1px solid #f3d58b; border-left: 5px solid #d97706; border-radius: 14px; display: grid; gap: 1rem; margin-bottom: 1rem; padding: 1rem; }
.shadow-evidence-panel[hidden] { display: none; }
.shadow-evidence-panel h3 { margin: .2rem 0; }
.shadow-evidence-panel > div > p:last-child { color: #64748b; font-size: .8rem; margin: 0; }
.shadow-evidence-list { display: grid; gap: .65rem; }
.shadow-evidence-card { background: #fff; border: 1px solid #e7d5ad; border-radius: 12px; padding: .8rem; }
.shadow-evidence-card header { align-items: center; display: flex; gap: .6rem; justify-content: space-between; }
.shadow-evidence-card header span { background: #fef3c7; border-radius: 999px; color: #92400e; font-size: .68rem; font-weight: 800; padding: .28rem .5rem; }
.shadow-evidence-card dl { display: grid; gap: .5rem; grid-template-columns: repeat(4,minmax(0,1fr)); margin: .75rem 0; }
.shadow-evidence-card dl div { background: #fffbeb; border-radius: 8px; min-width: 0; padding: .5rem; }
.shadow-evidence-card dt { color: #78716c; font-size: .68rem; }
.shadow-evidence-card dd { font-size: .76rem; margin: .2rem 0 0; overflow: hidden; text-overflow: ellipsis; }
.shadow-evidence-card p { border-top: 1px solid #f3e8c8; color: #78350f; font-size: .75rem; margin: .7rem 0 0; padding-top: .65rem; }
.shadow-order-form { align-items: end; display: grid; gap: .75rem; grid-template-columns: minmax(240px, 1fr) auto auto; }
.shadow-order-form label { display: grid; gap: .35rem; }
.shadow-order-form label span { color: #475569; font-size: .78rem; font-weight: 700; }
.shadow-order-form input { border: 1px solid #cbd5e1; border-radius: 10px; min-width: 0; padding: .7rem .8rem; }
.shadow-status { background: #f8fafc; border-left: 4px solid #7c3aed; color: #334155; margin: 1rem 0; padding: .75rem 1rem; }
.shadow-status.is-warning { background: #fff7ed; border-color: #ea580c; color: #9a3412; }
.shadow-evaluation { display: grid; gap: .65rem; grid-template-columns: repeat(5, minmax(100px, 1fr)); margin: 1rem 0; }
.shadow-evaluation > div { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; display: grid; gap: .2rem; padding: .7rem; }
.shadow-evaluation span { color: #64748b; font-size: .72rem; }
.shadow-evaluation strong { font-size: 1.25rem; }
.shadow-evaluation .is-safe strong { color: #15803d; }
.shadow-evaluation .is-danger strong { color: #b91c1c; }
.shadow-evaluation > small { color: #6d28d9; grid-column: 1 / -1; }
.shadow-layout { display: grid; gap: 1rem; grid-template-columns: minmax(220px, .75fr) minmax(0, 2fr); min-width: 0; }
.shadow-run-list { display: grid; gap: .55rem; }
.shadow-run-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; color: inherit; cursor: pointer; display: grid; gap: .45rem; padding: .75rem; text-align: left; width: 100%; }
.shadow-run-card:hover, .shadow-run-card.is-active { border-color: #7c3aed; box-shadow: 0 0 0 2px #ede9fe; }
.shadow-run-card > span { align-items: center; display: flex; justify-content: space-between; gap: .5rem; }
.shadow-run-card small { color: #64748b; }
.shadow-run-state { border-radius: 999px; color: #5b21b6; font-size: .65rem; font-weight: 800; }
.shadow-run-detail { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; min-width: 0; padding: 1rem; }
.shadow-detail-header { align-items: flex-start; display: flex; justify-content: space-between; }
.shadow-detail-header h3 { margin: .2rem 0 0; }
.shadow-detail-header > span { background: #ede9fe; border-radius: 999px; color: #5b21b6; font-size: .7rem; font-weight: 800; padding: .35rem .55rem; }
.shadow-run-meta { display: grid; gap: .5rem; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 1rem 0; }
.shadow-run-meta div { background: #f8fafc; border-radius: 10px; min-width: 0; padding: .55rem; }
.shadow-run-meta dt { color: #64748b; font-size: .68rem; }
.shadow-run-meta dd { font-size: .8rem; margin: .2rem 0 0; overflow: hidden; text-overflow: ellipsis; }
.shadow-abstention { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; padding: .7rem; }
.shadow-abstention strong { flex-basis: 100%; }
.shadow-abstention code { background: #ffedd5; border-radius: 6px; color: #9a3412; padding: .2rem .35rem; }
.shadow-candidates { display: grid; gap: .65rem; }
.shadow-candidate { border: 1px solid #e2e8f0; border-radius: 12px; padding: .75rem; }
.shadow-candidate.is-selected { border-color: #7c3aed; box-shadow: inset 4px 0 #7c3aed; }
.shadow-candidate header { align-items: center; display: grid; gap: .6rem; grid-template-columns: auto 1fr auto; }
.shadow-candidate header > span { color: #7c3aed; font-size: 1.05rem; font-weight: 900; }
.shadow-candidate header div { display: grid; min-width: 0; }
.shadow-candidate header small { color: #64748b; }
.shadow-candidate header b { font-size: .76rem; }
.shadow-candidate p { color: #64748b; font-size: .78rem; margin: .55rem 0; }
.shadow-candidate details ul { margin-bottom: 0; padding-left: 1.2rem; }
.shadow-candidate .issue-blocker, .shadow-candidate .issue-missing_data { color: #b91c1c; }
.shadow-candidate .issue-warning { color: #b45309; }
.shadow-review-form, .shadow-review-result { background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 12px; display: grid; gap: .7rem; margin-top: 1rem; padding: .9rem; }
.shadow-review-form h4 { margin: 0; }
.shadow-review-form label { display: grid; gap: .3rem; }
.shadow-review-form label span { color: #475569; font-size: .75rem; font-weight: 700; }
.shadow-review-form select { border: 1px solid #cbd5e1; border-radius: 9px; min-width: 0; padding: .6rem; }
.shadow-review-result strong { color: #5b21b6; }
.shadow-review-result span { color: #475569; font-size: .8rem; }
.shadow-write-boundary { border-top: 1px solid #e2e8f0; color: #475569; font-size: .78rem; margin: 1rem 0 0; padding-top: .8rem; }

@media (max-width: 900px) {
  .shadow-mode-badge { white-space: normal; }
  .shadow-order-form { grid-template-columns: 1fr 1fr; }
  .shadow-order-form label { grid-column: 1 / -1; }
  .shadow-evaluation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shadow-layout { grid-template-columns: 1fr; }
  .shadow-run-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shadow-evidence-card dl { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 480px) {
  .shadow-order-form { grid-template-columns: 1fr; }
  .shadow-order-form label { grid-column: auto; }
  .shadow-order-form button { width: 100%; }
  .shadow-evaluation { grid-template-columns: 1fr 1fr; }
  .shadow-safety-strip { align-items: flex-start; flex-direction: column; }
  .shadow-run-meta { grid-template-columns: 1fr; }
  .shadow-evidence-card dl { grid-template-columns: 1fr; }
  .shadow-candidate header { grid-template-columns: auto 1fr; }
  .shadow-candidate header b { grid-column: 2; }
}
