:root {
  --ink: #14215c;
  --muted: #6f7798;
  --paper: #fff;
  --canvas: #f5f7fc;
  --line: #e4e8f2;
  --red: #c93228;
  --blue: #0f2070;
  --blue-deep: #091654;
  --orange: #f37308;
  --green: #16845d;
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% -10%, rgba(243,115,8,.11), transparent 32rem),
    radial-gradient(circle at 8% 0, rgba(15,32,112,.09), transparent 30rem),
    var(--canvas);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
a { color: var(--blue); }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }

.gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.loginCard { width: min(440px,100%); padding: 36px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: 0 28px 80px rgba(15,32,112,.14); }
.brandLogo { display: inline-block; width: 180px; height: 36px; flex: 0 0 auto; }
.brandLogo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.loginLogo { width: 220px; height: 44px; margin-bottom: 22px; }
.loginLogo img { width: 100%; }
.loginCard h1 { margin: 10px 0; color: var(--blue); font-size: 32px; letter-spacing: -.04em; }
.loginCard > p:not(.eyebrow) { color: var(--muted); line-height: 1.8; }
.loginCard label { display: grid; gap: 8px; margin-top: 24px; font-size: 12px; font-weight: 800; }
.loginCard input, textarea, select, #monitorSearch { padding: 12px; border: 1px solid #ccd2e3; border-radius: 11px; background: #fff; }
.loginCard button, .primary, .download { padding: 12px 16px; border: 0; border-radius: 999px; color: #fff; background: var(--orange); font-weight: 800; text-decoration: none; cursor: pointer; }
.loginCard button { width: 100%; margin-top: 14px; box-shadow: 0 12px 26px rgba(243,115,8,.2); }
.loginCard small { display: block; min-height: 20px; margin-top: 9px; color: var(--red); }

main { width: min(1280px,calc(100% - 36px)); margin: 0 auto; padding: 24px 0 44px; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-radius: 20px; color: #fff; background: linear-gradient(135deg,var(--blue-deep),var(--blue)); box-shadow: 0 18px 44px rgba(15,32,112,.18); }
.brand { display: flex; align-items: center; gap: 13px; margin-right: auto; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 3px; color: #b9c2e2; font-size: 9px; letter-spacing: .08em; }
.quietButton, .officialSitePending { padding: 8px 12px; border: 1px solid #ffffff38; border-radius: 999px; color: #fff; background: #ffffff0d; font-size: 12px; text-decoration: none; cursor: pointer; }
.officialSitePending { color: #bdc5df; cursor: default; }
.workerState { display: flex; align-items: center; gap: 7px; color: #c2cae1; font-size: 12px; }
.workerState i { width: 8px; height: 8px; border-radius: 50%; background: #7b8490; }
.workerState i.online { background: #35cf91; box-shadow: 0 0 0 4px #35cf9120; }
.eyebrow { margin: 0 0 7px; color: var(--orange); font-size: 10px; font-weight: 850; letter-spacing: 1.8px; }

.metrics { display: grid; grid-template-columns: repeat(5,1fr); gap: 13px; margin-top: 16px; }
.metrics article, .panel { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 10px 28px rgba(15,32,112,.05); }
.metrics span, .metrics small { display: block; color: var(--muted); font-size: 11px; }
.metrics strong { display: block; margin: 8px 0 5px; font-size: 30px; letter-spacing: -.04em; }
.metrics .dangerMetric { border-color: #efc8c4; background: #fff8f7; }
.dangerMetric strong, .dangerText { color: var(--red); }
.metrics .modeText { color: var(--green); font-size: 22px; }

.panel, .resultSection { margin-top: 18px; }
.sectionHead { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.sectionHead h2 { margin: 0; color: var(--blue); letter-spacing: -.03em; }
.sectionHead > p { margin: 0; color: var(--muted); font-size: 12px; }
.controls { display: flex; gap: 10px; flex-wrap: wrap; }
.controls button { padding: 11px 15px; border: 1px solid #cbd0d6; border-radius: 999px; background: #fff; cursor: pointer; font-weight: 800; }
.controls .primary { border-color: var(--orange); background: var(--orange); }
.modelControl { display: flex; }
.modelControl select { border-radius: 999px 0 0 999px; }
.modelControl button { border-radius: 0 999px 999px 0; }
.controls button:disabled, #intakeForm button:disabled { opacity: .45; cursor: not-allowed; }
.taskBanner { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin-top: 15px; padding: 13px; border-radius: 12px; background: #f1f3fa; font-size: 12px; }
.taskBanner progress { grid-column: 1/-1; width: 100%; }
#intakeForm { display: grid; gap: 10px; }
textarea { width: 100%; resize: vertical; line-height: 1.6; }
#intakeForm button { justify-self: start; }
.actionMessage { min-height: 18px; margin: 10px 0 0; color: #9e312a; font-size: 12px; }

.tableWrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 11px 9px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 10px; }
.mono { font-family: ui-monospace,monospace; }
.status { display: inline-block; padding: 4px 7px; border-radius: 7px; background: #edf0f8; font-size: 10px; }
.status.bad, .task-failed { color: #a9261e; background: #fbe8e6; }
.task-running { color: #146947; background: #e6f5ef; }
.task-needs_review { color: #8a5b11; background: #fff2d9; }
.emptyCell { text-align: center; color: var(--muted); }

.historyList { display: grid; gap: 8px; }
.historyList article { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding: 12px; border-radius: 12px; background: #f5f7fc; }
.historyList small { display: block; color: var(--muted); margin-top: 3px; }
.historyList p { grid-column: 1/-1; margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.download { font-size: 12px; }

.violationList { display: grid; gap: 14px; }
.violationCard { display: grid; grid-template-columns: 200px 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 12px 34px rgba(15,32,112,.06); }
.productImage { width: 100%; height: 100%; min-height: 245px; object-fit: cover; background: #eef0f2; }
.cardBody { min-width: 0; padding: 21px 23px; }
.cardTop { display: flex; justify-content: space-between; }
.model { padding: 5px 9px; border-radius: 7px; color: var(--blue); background: #edf0fa; font-size: 12px; font-weight: 850; }
.monitorId { color: #9298a1; font: 11px monospace; }
.cardBody h3 { margin: 14px 0 5px; }
.title { overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.prices { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 18px 0 12px; }
.prices div { padding: 10px 12px; border-radius: 10px; background: #f5f7fc; }
.prices span { display: block; color: var(--muted); font-size: 10px; }
.prices strong, .prices b { display: block; margin-top: 5px; font-size: 17px; }
.prices strong { color: var(--red); font-size: 23px; }
.reason { color: #9e312a; font-size: 12px; }
details { border-top: 1px solid var(--line); padding-top: 11px; }
summary { color: var(--blue); font-size: 12px; font-weight: 800; cursor: pointer; }
.evidence { width: min(520px,100%); margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; }
.empty { padding: 25px; border-radius: 12px; background: #fff; color: var(--muted); }
footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 24px; padding-top: 18px; border-top: 1px solid #d9dde8; color: var(--muted); font-size: 11px; }

@media (max-width: 960px) {
  .topbar { flex-wrap: wrap; }
  .workerState { order: 4; width: 100%; }
  .metrics { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 800px) {
  main { width: min(100% - 20px,700px); padding-top: 10px; }
  .sectionHead { align-items: flex-start; flex-direction: column; }
  .violationCard { grid-template-columns: 110px 1fr; }
  .cardBody { padding: 15px; }
  .prices { grid-template-columns: 1fr; }
  .title { white-space: normal; }
}

@media (max-width: 520px) {
  .brand { width: 100%; }
  .workerState { order: 5; }
  .metrics { grid-template-columns: 1fr; }
  .violationCard { grid-template-columns: 1fr; }
  .productImage { height: 210px; }
  footer { flex-direction: column; }
}
