:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-alt: #f6f8fb;
  --primary: #1769e0;
  --primary-hover: #0f58c0;
  --border: #d8dde4;
  --text-main: #18212f;
  --text-secondary: #4a5568;
  --text-muted: #667287;
  --success: #117a3d;
  --warning: #b86d00;
  --danger: #bd1e24;
  --radius: 10px;
  --mono: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 14px;
  background: var(--bg);
  color: var(--text-main);
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.4;
}

header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
}

h3 {
  margin: 0 0 12px 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

h4 {
  margin: 0;
  font-size: 14px;
}

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

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

button {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

button:hover {
  border-color: var(--primary);
  background: #eef4ff;
}

button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

button.primary:hover {
  background: var(--primary-hover);
}

button.danger {
  color: var(--danger);
}

.status-line {
  min-height: 18px;
  color: var(--text-secondary);
  font-size: 12px;
}

.status-line.ok {
  color: var(--success);
}

.status-line.warn {
  color: var(--warning);
}

.status-line.error {
  color: var(--danger);
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.row.wrap {
  flex-wrap: wrap;
}

.row + .row {
  margin-top: 8px;
}

input,
select,
textarea {
  width: 100%;
  padding: 7px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-main);
  font-size: 12px;
}

input.mono,
textarea.mono,
code,
pre {
  font-family: var(--mono);
}

pre {
  margin: 0;
  background: #0f172a;
  color: #dce6fb;
  border-radius: 8px;
  padding: 10px;
  max-height: 220px;
  overflow: auto;
  font-size: 11px;
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.tag {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 2px 8px;
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--surface-alt);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface-alt);
}

.item-title {
  font-weight: 600;
  color: var(--text-main);
}

.item-url {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.caption {
  font-size: 11px;
  color: var(--text-muted);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.event-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 1px 7px;
  font-size: 10px;
  color: var(--text-secondary);
  background: #f0f4fa;
}

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

.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 14px 0;
}
