:root {
  --surface: var(--panel, #111113);
}

.report-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.report-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
}

.report-brand {
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  padding-top: 0.35rem;
}

.report-brand span {
  color: var(--accent);
}

.report-server-pick {
  flex: 1;
  min-width: 0;
}

.report-muted {
  color: var(--muted);
  font-size: 0.8rem;
}

.server-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.server-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.server-chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
}

.server-chip.active {
  background: var(--accent-dim, rgba(245, 158, 11, 0.15));
  border-color: rgba(245, 158, 11, 0.45);
  color: var(--accent);
}

.chip-count,
.chip-meta {
  font-size: 0.65rem;
  opacity: 0.75;
  font-weight: 500;
}

.report-main {
  flex: 1;
  padding: 1rem 1.25rem 2rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.report-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  min-width: 100px;
}

.stat-pill-muted {
  margin-left: auto;
}

.stat-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.stat-value {
  font-size: 0.9rem;
  font-weight: 700;
}

.stat-value.accent { color: var(--accent); }
.stat-value.warn { color: #fbbf24; }

.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.report-search {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.report-filter {
  width: auto;
  min-width: 150px;
}

.report-table-wrap {
  margin-bottom: 0.5rem;
}

.report-table {
  font-size: 0.8rem;
}

.report-table th {
  white-space: nowrap;
}

.report-table .steam-id {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.report-table .reason-cell {
  max-width: 220px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
  font-size: 0.75rem;
}

.report-table .actions-cell {
  white-space: nowrap;
}

.row-actions {
  display: flex;
  gap: 0.25rem;
}

.report-row.row-check td {
  background: rgba(245, 158, 11, 0.04);
}

.report-count {
  color: #fbbf24;
}

.server-tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-check {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-idle {
  background: rgba(113, 113, 122, 0.15);
  color: var(--muted);
}

.table-footnote {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.report-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.discord-tag {
  display: inline-block;
  background: #5865f2;
  color: #fff;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.modal.hidden {
  display: none;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  width: min(420px, 92vw);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-card h3 {
  margin: 0 0 0.5rem;
}

.modal-sub {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.modal-card label {
  display: block;
  font-size: 0.8rem;
  margin: 0.5rem 0 0.25rem;
  color: var(--muted);
}

.modal-card input,
.modal-card textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.5rem 0.65rem;
  font-family: inherit;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.modal-card-wide {
  width: min(520px, 94vw);
}

.modal-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.2rem 0 0.5rem;
}

.modal-hint a {
  color: var(--accent);
}

.act-dismiss {
  opacity: 0.85;
}

@media (max-width: 900px) {
  .report-table-wrap {
    overflow-x: auto;
  }

  .stat-pill-muted {
    margin-left: 0;
  }

  .report-top {
    flex-direction: column;
    align-items: stretch;
  }
}
