:root {
  --bg: #0b0f17;
  --surface: #111827;
  --surface-2: #161f30;
  --border: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #38bdf8;
  --accent-hover: #0ea5e9;
  --ok: #22c55e;
  --warn: #f59e0b;
  --err: #ef4444;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(17, 24, 39, 0.88);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.85rem;
}

.badge {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-link:hover,
.nav-link.primary {
  color: var(--accent);
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3.5rem;
}

.hero {
  margin-bottom: 1.75rem;
}

.hero-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--muted);
  max-width: 720px;
  font-size: 0.95rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.15rem;
}

.stat-label {
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.stat-sub {
  font-size: 0.76rem;
  color: var(--ok);
  margin-top: 0.15rem;
}

.notice {
  display: none;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
  color: #fcd34d;
  font-size: 0.88rem;
}

.notice.show {
  display: block;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.panel-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface-2);
}

.panel-header h2 {
  font-size: 1rem;
  font-weight: 600;
}

.panel-header .meta-text {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.toolbar {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pill {
  font-family: var(--mono);
  font-size: 0.76rem;
  padding: 0.32rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.pill:hover,
.pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
}

.search-box {
  padding: 0.42rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.84rem;
  min-width: 220px;
  outline: none;
}

.search-box:focus {
  border-color: var(--accent);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.89rem;
}

th, td {
  text-align: left;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

tbody tr:last-child td {
  border-bottom: none;
}

.mono {
  font-family: var(--mono);
  font-size: 0.82rem;
}

.fmt {
  font-family: var(--mono);
  font-size: 0.74rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.36rem 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.page-info {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.page-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.page-btn {
  font-family: var(--mono);
  font-size: 0.78rem;
  min-width: 32px;
  height: 30px;
  padding: 0 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #08101c;
  font-weight: 700;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.spec-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.15rem;
}

.spec-card h3 {
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.spec-card p {
  font-size: 0.85rem;
  color: var(--muted);
}

.cli-box {
  padding: 1rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.84rem;
  color: #cbd5e1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  overflow-x: auto;
}

.btn-primary {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  background: var(--accent);
  border-color: var(--accent);
  color: #08101c;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #08101c;
}

.login-section {
  max-width: 440px;
  margin: 0 auto;
}

.login-body {
  padding: 1.5rem 1.25rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.field input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}

.field input:focus {
  border-color: var(--accent);
}

.login-msg {
  margin-top: 0.9rem;
  font-size: 0.83rem;
  font-family: var(--mono);
  min-height: 1.2rem;
}

.login-msg.error {
  color: var(--err);
}

.login-msg.pending {
  color: var(--muted);
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--mono);
}

@media (max-width: 780px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .specs-grid {
    grid-template-columns: 1fr;
  }
}
