* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #0a0a0a;
  color: #e5e7eb;
}

.container {
  max-width: 1400px;
  margin: 24px auto;
  padding: 0 16px;
}

.panel {
  background: #111827;
  border: 1px solid #374151;
  border-radius: 14px;
  padding: 16px;
}

.hidden {
  display: none;
}

.muted {
  color: #9ca3af;
}

.error {
  color: #fca5a5;
  margin-top: 10px;
}

form {
  display: grid;
  gap: 10px;
  max-width: 420px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

input {
  width: 100%;
  background: #0f172a;
  border: 1px solid #4b5563;
  border-radius: 8px;
  color: #e5e7eb;
  padding: 10px;
}

button {
  background: #2563eb;
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #374151;
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid #1f2937;
  padding: 10px;
  vertical-align: top;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: rgba(59, 130, 246, 0.08);
}

th {
  position: sticky;
  top: 0;
  background: #0f172a;
  z-index: 1;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.text-cell {
  max-width: 520px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 20px;
  max-height: 60px;
}

.detail-dialog {
  width: min(1200px, 95vw);
  max-height: 88vh;
  border: 1px solid #374151;
  background: #111827;
  color: #e5e7eb;
  border-radius: 12px;
  padding: 14px;
}

.detail-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.ghost-btn {
  background: #1f2937;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.meta-grid > div {
  display: grid;
  gap: 4px;
  background: #0f172a;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 8px;
}

.meta-label {
  font-size: 12px;
  color: #9ca3af;
}

.detail-row {
  margin-bottom: 12px;
}

.detail-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-col h4 {
  margin: 0 0 8px;
}

.pre-box {
  margin: 0;
  white-space: pre-wrap;
  overflow: auto;
  max-height: 46vh;
  background: #0f172a;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 960px) {
  .meta-grid {
    grid-template-columns: 1fr;
  }
  .detail-split {
    grid-template-columns: 1fr;
  }
}
