
* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0; background: #f7f7f5; color: #222;
}
header {
  background: #1a1a1a; color: #fff; padding: 16px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
header h1 { margin: 0; font-size: 20px; font-weight: 600; }
header .crumbs { font-size: 13px; opacity: 0.7; }
main { max-width: 1200px; margin: 24px auto; padding: 0 24px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .row { grid-template-columns: 1fr; } }
.card {
  background: #fff; border: 1px solid #e2e2dc; border-radius: 8px;
  padding: 20px; margin-bottom: 16px;
}
.card h2 { margin: 0 0 12px; font-size: 16px; }
.card h3 { margin: 0 0 8px; font-size: 14px; color: #555; }
.muted { color: #888; font-size: 13px; }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 12px;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; margin-right: 6px;
}
.tag-pass     { background: #dff5e3; color: #1a7d3a; }
.tag-rewrite  { background: #fff4cc; color: #8a6d00; }
.tag-fail     { background: #fcdada; color: #a61d1d; }
.tag-pending  { background: #e7e7e7; color: #555; }
.tag-approved { background: #d4eaff; color: #1a4d80; }
.tag-rejected { background: #fcdada; color: #a61d1d; }
.tag-platform { background: #f0e8ff; color: #5a3aa3; }
.tag-running          { background: #e7f0ff; color: #1a4d80; }
.tag-awaiting_human   { background: #fff4cc; color: #8a6d00; }
.tag-failed_compliance{ background: #fcdada; color: #a61d1d; }
.tag-error            { background: #fcdada; color: #a61d1d; }
.tag-downloaded       { background: #e0f0e7; color: #1a7d3a; }
.tag-published        { background: #d4eaff; color: #1a4d80; font-weight: 700; }
.tag-not_yet          { background: #f0f0ec; color: #888; }
.timeline {
  display: flex; gap: 4px; align-items: stretch; margin: 12px 0;
  border-radius: 6px; overflow: hidden; background: #ececec; padding: 2px;
}
.timeline .step {
  flex: 1; padding: 8px 10px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px; text-align: center;
  background: #fff; color: #888; border-radius: 4px;
}
.timeline .step.completed         { background: #dff5e3; color: #1a7d3a; }
.timeline .step.in_progress       { background: #e7f0ff; color: #1a4d80; }
.timeline .step.awaiting_decision { background: #fff4cc; color: #8a6d00; }
.timeline .step.failed            { background: #fcdada; color: #a61d1d; }
.assets-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px; margin-top: 12px;
}
.assets-grid img, .assets-grid object {
  width: 100%; height: 220px; object-fit: contain;
  border: 1px solid #e2e2dc; border-radius: 6px; background: #fff;
}
.assets-grid .asset-label { font-size: 11px; color: #666; margin-top: 4px; word-break: break-all; }
.dropzone {
  border: 2px dashed #c5c5b8; border-radius: 10px; padding: 40px;
  text-align: center; background: #fcfcf8; transition: all 0.2s;
  cursor: pointer;
}
.dropzone:hover, .dropzone.drag { border-color: #1a4d80; background: #eef4fb; }
.dropzone p { margin: 6px 0; color: #555; font-size: 14px; }
.dropzone .hint { color: #888; font-size: 12px; }
.refs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px; margin-top: 14px;
}
.refs-grid .ref { position: relative; }
.refs-grid img {
  width: 100%; height: 140px; object-fit: cover;
  border: 1px solid #e2e2dc; border-radius: 6px; background: #fff;
}
.refs-grid .ref form {
  position: absolute; top: 4px; right: 4px;
}
.refs-grid .ref button.del {
  background: rgba(166,29,29,0.85); color: #fff; border: 0;
  border-radius: 4px; padding: 2px 8px; font-size: 11px; cursor: pointer;
}
.refs-grid .ref .name {
  font-size: 10px; color: #666; margin-top: 2px;
  text-align: center; word-break: break-all;
}
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.swatch {
  width: 88px; padding-top: 88px; position: relative;
  border-radius: 6px; border: 1px solid #e2e2dc;
}
.swatch .label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.92); font-size: 10px;
  padding: 4px 6px; border-radius: 0 0 6px 6px; text-align: center;
}
.swatch .role { color: #888; font-size: 9px; }
.kw-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.kw { background: #efefe9; padding: 4px 10px; border-radius: 12px; font-size: 12px; }
.kw.bad { background: #fcdada; color: #a61d1d; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #ececec; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: #666; background: #fafaf6; }
tr:hover td { background: #fafaf6; }
a { color: #1a4d80; text-decoration: none; }
a:hover { text-decoration: underline; }
pre {
  background: #f5f5f0; border: 1px solid #e2e2dc; border-radius: 6px;
  padding: 12px; overflow-x: auto; font-size: 12px;
  white-space: pre-wrap; word-break: break-word;
}
.caption {
  background: #fcfaf3; border-left: 3px solid #d4b800; padding: 12px 16px;
  border-radius: 0 6px 6px 0; white-space: pre-wrap;
}
.violation { background: #fcdada; padding: 10px 12px; border-radius: 6px; margin-bottom: 8px; }
.violation .sev { font-weight: 600; text-transform: uppercase; font-size: 11px; }
.warning   { background: #fff4cc; padding: 10px 12px; border-radius: 6px; margin-bottom: 8px; }
button, input[type=submit] {
  background: #1a4d80; color: #fff; border: 0; padding: 10px 18px;
  border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer;
}
button.danger, input.danger { background: #a61d1d; }
button.ghost { background: #fff; color: #1a4d80; border: 1px solid #1a4d80; }
input[type=text], textarea, select {
  width: 100%; padding: 8px 10px; border: 1px solid #d0d0c8; border-radius: 6px;
  font-size: 14px; font-family: inherit;
}
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; color: #444; }
.flex { display: flex; gap: 8px; align-items: center; }
.flex form { display: inline; }
.empty { text-align: center; padding: 40px; color: #888; }
