:root {
  --bg: #0f0f12;
  --surface: #18181c;
  --border: #2a2a30;
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --accent: #22c55e;
  --accent-hover: #16a34a;
  --danger: #ef4444;
  --radius: 10px;
  --font: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.layout {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.header {
  margin-bottom: 2rem;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--text-muted);
  margin: 0 0 1rem 0;
  font-size: 0.95rem;
}

.text-muted {
  color: var(--text-muted);
}

.auth-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.auth-status.connected .status-dot {
  background: var(--accent);
}

.auth-status.error .status-dot {
  background: var(--danger);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.card p {
  margin: 0 0 1rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.card p:last-of-type {
  margin-bottom: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.btn {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

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

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--border);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  background: #35353d;
}

.hint {
  font-size: 0.8rem;
}

.hint code {
  font-family: var(--font-mono);
  background: var(--bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.stats span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.stats strong {
  color: var(--text);
  font-weight: 600;
}

.tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.tab {
  font-family: var(--font);
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  background: var(--border);
  color: var(--text);
  border-color: var(--border);
}

.tab-panel {
  overflow: auto;
}

.tab-panel.hidden {
  display: none;
}

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

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

th, td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text-muted);
  font-weight: 500;
}

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

.input {
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  width: 100%;
  max-width: 320px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  margin-bottom: 1rem;
}

.input::placeholder {
  color: var(--text-muted);
}

.message-card.success {
  border-color: var(--accent);
}

.message-card.error {
  border-color: var(--danger);
}

.message-card p {
  color: var(--text);
}
