:root {
  --bg: #0b1020;
  --panel: #111a33;
  --muted: rgba(255, 255, 255, 0.7);
  --text: rgba(255, 255, 255, 0.92);
  --line: rgba(255, 255, 255, 0.12);
  --accent: #6ea8ff;
  --btn: #22325f;
  --btn2: #1a2547;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 800px at 20% 10%, #13204a 0%, var(--bg) 60%);
  color: var(--text);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px;
}

.header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

h1 {
  font-size: 20px;
  margin: 0;
  letter-spacing: 0.2px;
}

.subtitle {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.actions { display: flex; gap: 10px; }

.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 180px 150px;
  gap: 12px;
}

.field .label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

input[type="text"], select {
  width: 100%;
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 10px;
  outline: none;
}

input[type="text"]:focus, select:focus {
  border-color: rgba(110, 168, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(110, 168, 255, 0.18);
}

button {
  background: var(--btn);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 600;
}

button:hover { border-color: rgba(255,255,255,0.22); }
button:disabled { opacity: 0.55; cursor: not-allowed; }

button.secondary {
  background: var(--btn2);
  font-weight: 600;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(0,0,0,0.18);
}

.stat .k { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stat .v { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hint {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.tablePanel { padding: 0; overflow: hidden; }
.tableWrap { overflow: auto; max-height: 65vh; }

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  position: sticky;
  top: 0;
  background: rgba(14, 20, 40, 0.95);
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 12px;
  text-align: left;
}

tbody td {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 9px 12px;
  font-size: 13px;
}

th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,0.14);
}

.muted { color: var(--muted); font-size: 12px; }

@media (max-width: 820px) {
  .row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
