:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --border: oklch(0.922 0 0);
  --sidebar: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.94 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --success: oklch(0.6 0.15 150);
  --warning: oklch(0.7 0.15 75);
  --destructive: oklch(0.58 0.22 27);
  --info: oklch(0.6 0.15 250);
  --radius: 0.625rem;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font: 14px/1.5 var(--sans);
  color: var(--foreground);
  background: var(--background);
}

a {
  color: inherit;
}

code,
.mono {
  font-family: var(--mono);
  font-size: 12px;
}

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

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 8px;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-title {
  padding: 4px 8px;
  font-weight: 600;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  padding: 0 8px 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: calc(var(--radius) - 2px);
  text-decoration: none;
}

.nav-item:hover {
  background: var(--sidebar-accent);
}

.nav-item[aria-current="page"] {
  background: var(--sidebar-accent);
  font-weight: 500;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.sidebar-footer .who {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 24px 32px;
}

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

.page-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.page-header .sub {
  margin-top: 2px;
}

h2 {
  margin: 28px 0 10px;
  font-size: 15px;
  font-weight: 600;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

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

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

th {
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  color: var(--muted-foreground);
  background: var(--muted);
}

th,
td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

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

tr.clickable {
  cursor: pointer;
}

tr.clickable:hover > td {
  background: var(--muted);
}

td.empty {
  text-align: center;
  color: var(--muted-foreground);
  padding: 24px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  background: var(--background);
}

button.badge {
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

button.badge[aria-pressed="true"] {
  border-color: var(--foreground);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-foreground);
}

.s-succeeded .dot {
  background: var(--success);
}

.s-claimed .dot {
  background: var(--info);
}

.s-ready .dot {
  background: var(--warning);
}

.s-failed .dot,
.s-upstream_failed .dot {
  background: var(--destructive);
}

.button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--background);
  font: inherit;
  cursor: pointer;
}

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

.button.ghost {
  border-color: transparent;
}

.attempts {
  padding: 8px 12px 12px;
  background: var(--muted);
}

.attempts table {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
}

pre.error {
  margin: 0;
  max-height: 160px;
  overflow: auto;
  white-space: pre-wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--destructive);
}

.load-more {
  display: flex;
  justify-content: center;
  padding: 12px;
}

.clerk-host {
  max-width: 880px;
}

.loading {
  padding: 24px 32px;
}

.centered {
  display: flex;
  justify-content: center;
  padding-top: 64px;
}

@media (max-width: 760px) {
  .shell {
    flex-direction: column;
  }

  .sidebar {
    width: auto;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .main {
    padding: 16px;
    overflow-x: auto;
  }
}

a.button {
  display: inline-block;
  color: inherit;
  text-decoration: none;
}
