:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  --ink: #20283a;
  --muted: #8b93a5;
  --line: #e7e9ef;
  --paper: #fff;
  --canvas: #f4f5f8;
  --purple: #6264df;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: linear-gradient(135deg,#7e80f0,#5153d7); color: white; font-weight: 800; }
.brand > div { display: flex; flex-direction: column; gap: 2px; }
.brand strong { font-size: 16px; }
.brand small { color: #9aa1b0; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.brand b { padding: 4px 8px; border-radius: 6px; background: #efeffd; color: #6264cf; font-size: 11px; }
.source-badge { display: flex; align-items: center; gap: 8px; color: #697184; font-size: 13px; }
.source-badge i { width: 7px; height: 7px; border-radius: 50%; background: #3dc891; box-shadow: 0 0 0 4px #e0f7ef; }
main { width: min(1440px, calc(100% - 64px)); margin: 0 auto; padding: 40px 0 80px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 26px; }
.eyebrow { color: var(--purple); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
h1 { margin: 8px 0 6px; font-size: 40px; letter-spacing: -.04em; }
.hero p { margin: 0; color: var(--muted); font-size: 14px; }
.primary { min-width: 118px; padding: 12px 18px; border: 0; border-radius: 10px; background: var(--purple); color: white; box-shadow: 0 8px 22px rgba(98,100,223,.22); }
.primary:disabled { cursor: wait; opacity: .55; }
.auto-sync { display: flex; align-items: center; gap: 12px; padding: 11px 15px; border: 1px solid #dfe7e3; border-radius: 11px; background: #f7fbf9; }
.auto-sync > i { width: 9px; height: 9px; border-radius: 50%; background: #35c38b; box-shadow: 0 0 0 5px #dcf5eb; }
.auto-sync > span { display: flex; flex-direction: column; gap: 2px; }.auto-sync strong { font-size: 12px; }.auto-sync small { color: var(--muted); font-size: 10px; }
.metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 20px; }
.metrics article { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.metrics small { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.metrics strong { font-size: 24px; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 16px 40px rgba(31,40,60,.04); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 24px; }
.panel-head h2 { margin: 0 0 4px; font-size: 20px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 12px; }
.search { display: flex; width: min(360px,100%); height: 42px; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid #dfe2e9; border-radius: 10px; background: #fafbfc; color: #9ba1ae; }
.search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); }
.table-head, .event-summary { display: grid; grid-template-columns: minmax(300px,1.7fr) minmax(126px,.62fr) repeat(4,minmax(74px,.42fr)) 28px; align-items: center; gap: 16px; }
.table-head { padding: 13px 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fafbfc; color: #979eac; font-size: 11px; }
.event-row { border-bottom: 1px solid var(--line); }
.event-row:last-child { border-bottom: 0; }
.event-summary { width: 100%; padding: 18px 24px; border: 0; background: white; color: inherit; text-align: left; transition: 150ms ease; }
.event-summary:hover { background: #fbfbfe; }
.event-name { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.event-name strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.event-name small, .detail-head code { color: #9aa1ae; font: 11px ui-monospace,monospace; }
.topic-total { display: flex; align-items: baseline; gap: 5px; }
.topic-total strong { color: var(--purple); font-size: 24px; }
.topic-total small { color: var(--muted); font-size: 10px; }
.material-total { display: inline-flex; align-items: baseline; gap: 4px; width: fit-content; min-width: 54px; padding: 7px 10px; border-radius: 9px; background: #f3f4f7; }
.material-total strong { color: #50586b; font-size: 18px; }
.material-total small { color: var(--muted); font-size: 10px; }
.material-total.ai { background: #f1efff; }.material-total.ai strong { color: #6656df; }
.material-total.atmosphere { background: #edf7f4; }.material-total.atmosphere strong { color: #2f9675; }
.material-total.source { background: #eef4fb; }.material-total.source strong { color: #3f77b5; }
.task-status { display: inline-flex; align-items: center; gap: 7px; width: fit-content; color: #747c8c; font-size: 12px; }
.task-status i { width: 7px; height: 7px; border-radius: 50%; background: #9ea4b1; }
.task-status.pending i { background: #f0ad4e; }.task-status.running i { background: #6d6fe4; }.task-status.completed i { background: #39c58d; }.task-status.failed i { background: #e45c66; }
.event-summary time { color: #687184; font: 12px ui-monospace,monospace; }
.arrow { color: #a2a8b4; font-size: 18px; transition: 160ms ease; }
.event-row.open .arrow { transform: rotate(180deg); }
.event-detail { display: none; padding: 4px 24px 24px; background: #fafbfc; }
.event-row.open .event-detail { display: block; }
.detail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 18px 0 14px; }
.detail-head > div { display: flex; flex-direction: column; gap: 5px; }
.detail-head small { color: var(--purple); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.detail-head strong { font-size: 13px; }
.event-detail ol { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 0; padding: 0; list-style: none; }
.event-detail li { display: grid; grid-template-columns: 30px minmax(160px,.7fr) 1fr; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border: 1px solid #e6e8ed; border-radius: 10px; background: white; }
.event-detail li > b { color: #8e90e7; font: 12px ui-monospace,monospace; }
.event-detail li > div { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.event-detail li strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.event-detail li small { color: #a1a7b3; font: 9px ui-monospace,monospace; }
.event-detail li p { display: -webkit-box; margin: 0; overflow: hidden; color: #7d8594; font-size: 11px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.asset-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-top: 22px; padding: 16px 0 12px; border-top: 1px solid var(--line); }
.asset-head.compact { margin-top: 0; border-top: 0; }
.asset-head > div { display: flex; flex-direction: column; gap: 4px; }.asset-head small { color: var(--purple); font-size: 9px; font-weight: 800; letter-spacing: .1em; }.asset-head strong { font-size: 13px; }
.asset-actions { display: flex; align-items: center; gap: 8px; }
.ai-generate { padding: 7px 11px; border: 1px solid #c8c9f4; border-radius: 8px; background: #f4f4ff; color: #5557cf; font-size: 10px; }.ai-generate:disabled { cursor: wait; opacity: .65; }
.bulk-remove { padding: 7px 11px; border: 1px solid #e5b9bd; border-radius: 8px; background: #fff7f7; color: #c84c57; font-size: 10px; }.bulk-remove:disabled { cursor: default; border-color: #e2e4e9; background: #f5f6f8; color: #a5abb7; }
.requirement-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-top: 22px; padding: 16px 0 12px; border-top: 1px solid var(--line); }
.requirement-head > div { display: flex; flex-direction: column; gap: 4px; }.requirement-head small { color: var(--purple); font-size: 9px; font-weight: 800; letter-spacing: .1em; }.requirement-head strong { font-size: 13px; }.requirement-summary { color: var(--muted); font-size: 10px; }
.requirement-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.requirement-card { padding: 13px; border: 1px solid #e3e6ec; border-radius: 11px; background: white; }
.requirement-card header { display: flex; justify-content: space-between; margin-bottom: 9px; }.requirement-card header span { color: var(--purple); font-size: 9px; font-weight: 700; }.requirement-card header em { color: var(--muted); font-size: 9px; font-style: normal; }
.requirement-card > strong { display: block; font-size: 11px; line-height: 1.5; }.requirement-card p { margin: 6px 0; color: #687184; font-size: 10px; line-height: 1.55; }.requirement-card > small { color: var(--muted); font-size: 9px; line-height: 1.5; }.requirement-card.available { border-color: #bde8d7; }.requirement-card.failed { border-color: #edc5c9; }
.material-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.capture-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.capture-card { display: grid; grid-template-columns: 104px minmax(0,1fr); gap: 11px; min-height: 96px; padding: 10px; border: 1px solid #e3e6ec; border-radius: 11px; background: white; }
.capture-card.rejected,.capture-card.failed { border-color: #edc5c9; }.capture-card.registered { border-color: #bde8d7; }
.capture-card img,.capture-placeholder { width: 104px; height: 78px; border-radius: 8px; background: #f0f1f5; object-fit: cover; }.capture-placeholder { display: grid; place-items: center; color: #a1a7b3; font: 10px ui-monospace,monospace; }
.capture-card header { display: flex; justify-content: space-between; gap: 8px; }.capture-card header b { color: var(--purple); font-size: 9px; text-transform: uppercase; }.capture-card header em { color: var(--muted); font-size: 9px; font-style: normal; }
.capture-card a { display: block; margin: 7px 0 4px; overflow: hidden; color: #242936; font-size: 11px; font-weight: 700; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }.capture-card small { display: block; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.capture-card p { display: -webkit-box; margin: 4px 0 0; overflow: hidden; color: #7d8594; font-size: 9px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.material-card { position: relative; overflow: hidden; border: 1px solid #e3e6ec; border-radius: 11px; background: white; }
.material-card > a { display: block; color: inherit; text-decoration: none; }
.material-card > a > img, .material-card > a > video { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #eceef3; }
.material-card > a > span { display: flex; min-width: 0; flex-direction: column; gap: 4px; padding: 10px; }.material-card strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.material-card em { display: -webkit-box; overflow: hidden; color: #687184; font-size: 9px; font-style: normal; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }.material-card small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.material-select { position: absolute; z-index: 2; top: 8px; right: 8px; display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid rgba(255,255,255,.8); border-radius: 7px; background: rgba(25,31,45,.72); box-shadow: 0 2px 10px rgba(0,0,0,.14); }.material-select input { width: 14px; height: 14px; margin: 0; accent-color: var(--purple); }
.material-empty { display: grid; grid-column: 1/-1; min-height: 100px; place-items: center; border: 1px dashed #dfe2e9; border-radius: 10px; color: var(--muted); font-size: 11px; }.material-empty.error { color: #d45a65; }
.empty { display: grid; min-height: 240px; place-items: center; color: #969dab; font-size: 13px; }.empty.error { color: #d45a65; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-top: 1px solid var(--line); background: #fafbfc; color: var(--muted); font-size: 11px; }
.pagination > div { display: flex; align-items: center; gap: 10px; }
.pagination button { padding: 7px 10px; border: 1px solid #dfe2e8; border-radius: 7px; background: white; color: #687184; }.pagination button:disabled { opacity: .4; cursor: default; }
.toast { position: fixed; right: 24px; bottom: 24px; transform: translateY(20px); padding: 12px 16px; border-radius: 10px; background: #20283a; color: white; font-size: 13px; opacity: 0; pointer-events: none; transition: 180ms ease; }.toast.show { transform: none; opacity: 1; }
@media (max-width: 820px) {
  .topbar { padding: 0 18px; }.source-badge { display: none; }
  main { width: calc(100% - 28px); padding-top: 24px; }
  .hero { align-items: stretch; flex-direction: column; }.hero .primary { width: 100%; }
  h1 { font-size: 32px; }
  .metrics { grid-template-columns: 1fr; }
  .panel-head { align-items: stretch; flex-direction: column; }.search { width: 100%; }
  .table-head { display: none; }
  .event-summary { grid-template-columns: 1fr repeat(4,auto); gap: 8px; }
  .event-summary time { display: none; }
  .material-total { min-width: 0; padding: 5px 7px; }.material-total small { display: none; }
  .arrow { display: none; }
  .event-detail ol { grid-template-columns: 1fr; }
  .event-detail li { grid-template-columns: 26px 1fr; }.event-detail li p { grid-column: 2; }
  .detail-head code { display: none; }
  .requirement-grid { grid-template-columns: 1fr; }
  .material-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .capture-grid { grid-template-columns: 1fr; }
}
