:root {
  --bg: #0f172a;
  --panel: #111c33;
  --panel2: #17223b;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #8b5cf6;
  --accent2: #22c55e;
  --danger: #ef4444;
  --line: rgba(255,255,255,.1);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif; background: var(--bg); color: var(--text); }
.app { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: #0b1120; padding: 28px 22px; border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; }
.logo { font-weight: 900; letter-spacing: .08em; font-size: 22px; margin-bottom: 32px; }
.logo span { color: var(--accent); }
nav { display: grid; gap: 8px; }
nav a { color: var(--muted); text-decoration: none; padding: 12px 14px; border-radius: 12px; }
nav a.active, nav a:hover { background: var(--panel2); color: white; }
.hint { position: absolute; bottom: 24px; color: var(--muted); font-size: 13px; line-height: 1.5; }
main { flex: 1; padding: 28px; max-width: 1280px; }
.topbar { display: flex; justify-content: space-between; gap: 24px; align-items: start; margin-bottom: 22px; }
h1 { margin: 0; font-size: 32px; }
p { color: var(--muted); margin: 8px 0 0; }
.status { padding: 10px 14px; border-radius: 999px; background: var(--panel); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.status.ok { color: #bbf7d0; border-color: rgba(34,197,94,.4); }
.status.bad { color: #fecaca; border-color: rgba(239,68,68,.4); }
.grid.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.card, .panel { background: linear-gradient(180deg, var(--panel), #0f1a30); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.card { padding: 20px; }
.label, .muted { color: var(--muted); font-size: 14px; }
.value { font-size: 34px; font-weight: 800; margin-top: 8px; }
.value.small { font-size: 20px; }
.panel { padding: 20px; margin-bottom: 16px; }
.panelHeader { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
h2 { margin: 0; font-size: 20px; }
.form { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 12px; align-items: end; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 14px; }
input { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: #0b1120; color: var(--text); outline: none; }
input:focus { border-color: var(--accent); }
.checkbox { grid-column: 1 / 3; display: flex; align-items: center; gap: 8px; }
.checkbox input { width: auto; }
button { border: 0; border-radius: 12px; padding: 13px 16px; background: var(--accent); color: white; font-weight: 700; cursor: pointer; }
button:hover { filter: brightness(1.08); }
button.secondary { background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
.tableWrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 13px; font-weight: 600; }
td { font-size: 14px; }
.linkCell { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #bfdbfe; }
.badge { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: var(--panel2); color: var(--muted); font-size: 12px; }
.badge.parsed { color: #bbf7d0; background: rgba(34,197,94,.12); }
.badge.error { color: #fecaca; background: rgba(239,68,68,.12); }
.empty { color: var(--muted); padding: 20px; border: 1px dashed var(--line); border-radius: 14px; }
.reportGrid { display: grid; grid-template-columns: 260px 1fr; gap: 16px; }
.scoreBox { background: var(--panel2); border-radius: 16px; padding: 18px; text-align: center; }
.score { font-size: 58px; font-weight: 900; color: var(--accent2); }
.breakdown { display: grid; gap: 8px; margin-top: 14px; }
.metric { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.reportSection { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.reportSection h3 { margin: 0 0 12px; }
pre { white-space: pre-wrap; color: var(--muted); }
@media (max-width: 900px) {
  .app { display: block; }
  .sidebar { width: auto; height: auto; position: static; }
  .hint { position: static; margin-top: 24px; }
  .grid.cards, .form, .reportGrid { grid-template-columns: 1fr; }
  .checkbox { grid-column: auto; }
  .topbar { display: block; }
}
.score.good { color: #22c55e; }
.score.warn { color: #f59e0b; }
.score.bad { color: #ef4444; }
.heroReport h3 { font-size: 24px; margin-bottom: 16px; }
.miniGrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.miniGrid div { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.miniGrid span { display:block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.miniGrid b { font-size: 20px; }
.insightGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.insightCard { background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.insightCard.good { border-color: rgba(34,197,94,.35); }
.insightCard.warn { border-color: rgba(245,158,11,.35); }
.insightCard.bad { border-color: rgba(239,68,68,.35); }
.insightTop { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; }
.insightTop h3 { margin: 0; }
.insightTop span { font-size: 20px; font-weight: 900; }
.insightCard p { margin: 0 0 12px; }
#aiAuditBox ul { margin: 8px 0 16px 20px; color: var(--muted); }
#aiAuditBox li { margin: 6px 0; }
#aiAuditBox h4 { margin: 18px 0 8px; }
@media (max-width: 900px) { .miniGrid, .insightGrid { grid-template-columns: 1fr; } }
#aiAuditBox .badge { margin-left: 6px; transform: translateY(-1px); }
.bulkBox { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 18px; }
.bulkBox h3 { margin: 0 0 6px; }
textarea { width: 100%; min-height: 96px; resize: vertical; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: #0b1120; color: var(--text); outline: none; font-family: inherit; }
textarea:focus { border-color: var(--accent); }
.bulkActions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.actionsCell { display: flex; gap: 8px; flex-wrap: wrap; }
.actionsCell button { padding: 8px 10px; font-size: 12px; }


.argus-beta-note {
  margin: 32px auto 0;
  padding: 20px 22px;
  border: 1px solid rgba(118, 91, 255, 0.24);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(118, 91, 255, 0.12), rgba(0, 194, 255, 0.08));
  color: var(--text, #f8f9ff);
  box-shadow: 0 18px 50px rgba(10, 16, 40, 0.14);
}

.argus-beta-note strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.argus-beta-note p {
  margin: 0;
  color: var(--muted, #aab1c8);
  line-height: 1.55;
}

.argus-beta-note ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted, #aab1c8);
}

.argus-beta-note li + li {
  margin-top: 6px;
}


.argus-marketplaces {
  margin: 28px auto 0;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.argus-marketplaces strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.argus-marketplaces p {
  margin: 0 0 14px;
  color: var(--muted, #aab1c8);
  line-height: 1.55;
}

.marketplace-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.marketplace-chips span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(118, 91, 255, 0.16);
  color: var(--text, #f8f9ff);
  font-weight: 700;
}


.argus-diagnostics-preview {
  margin: 34px auto 0;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(118,91,255,0.10));
  border: 1px solid rgba(255,255,255,0.14);
}

.argus-diagnostics-preview h2 {
  margin: 6px 0 10px;
}

.argus-diagnostics-preview p {
  color: var(--muted, #aab1c8);
  line-height: 1.55;
}

.diagnostics-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
}

.diagnostics-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: rgba(8, 12, 30, 0.36);
}

.diagnostics-table th,
.diagnostics-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.diagnostics-table th {
  color: var(--text, #f8f9ff);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.diagnostics-table td {
  color: var(--muted, #aab1c8);
  vertical-align: top;
}

.diagnostics-note {
  margin-bottom: 0;
  font-weight: 700;
}
