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

body {
  font-family: 'JetBrains Mono', 'Cascadia Mono', Consolas, ui-monospace, monospace;
  background: #0d1117;
  color: #c9d1d9;
  font-size: 13px;
  line-height: 1.5;
}

a { color: #58a6ff; text-decoration: none; }
a:hover { text-decoration: underline; }

header {
  background: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  color: #f0f6fc;
}
.brand .dim { color: #6e7681; font-weight: 400; }

nav {
  display: flex;
  gap: 16px;
  flex: 1;
}
nav a {
  color: #8b949e;
  padding: 6px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
}
nav a.active {
  color: #f0f6fc;
  background: #21262d;
  border: 1px solid #30363d;
}
nav .user {
  margin-left: auto;
  color: #6e7681;
  font-size: 12px;
}

main {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

h2, h3 {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
  color: #8b949e;
  margin-bottom: 12px;
  font-weight: 600;
}
h2 { font-size: 14px; margin-bottom: 16px; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
}
.stat .num {
  font-size: 28px;
  font-weight: 700;
  color: #f0f6fc;
}
.stat .lbl {
  font-size: 10px;
  letter-spacing: 1px;
  color: #6e7681;
  margin-top: 4px;
}

.green  { color: #3fb950 !important; }
.red    { color: #f85149 !important; }
.orange { color: #ff8c42 !important; }
.blue   { color: #58a6ff !important; }
.dim    { color: #6e7681 !important; }

.bar {
  display: flex;
  height: 28px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 24px;
  background: #161b22;
  border: 1px solid #30363d;
}
.seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  font-weight: 600;
  transition: width 0.5s;
}
.seg.done    { background: #238636; }
.seg.claimed { background: #1f6feb; }
.seg.failed  { background: #da3633; }
.seg.pending { background: #db6d28; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.panel {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 16px;
}

table { width: 100%; border-collapse: collapse; }
table.wide td, table.wide th { padding: 8px 12px; }
table td, table th { padding: 6px 8px; text-align: left; border-bottom: 1px solid #21262d; }
table th { color: #8b949e; font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px; }
table tr:last-child td { border-bottom: none; }

.btn {
  display: inline-block;
  background: #21262d;
  color: #c9d1d9;
  border: 1px solid #30363d;
  border-radius: 4px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  margin-right: 8px;
}
.btn:hover { background: #30363d; color: #f0f6fc; text-decoration: none; }

/* Export dropdown */
.export-dropdown { position: relative; display: inline-block; }
.btn-icon {
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 4px;
  padding: 4px 8px;
  color: #8b949e;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}
.btn-icon:hover { background: #30363d; color: #f0f6fc; }
.export-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 4px 0;
  z-index: 50;
  min-width: 80px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.export-menu.show { display: block; }
.export-menu a {
  display: block;
  padding: 6px 14px;
  color: #c9d1d9;
  font-size: 12px;
  font-weight: 600;
}
.export-menu a:hover { background: #21262d; text-decoration: none; color: #f0f6fc; }

/* ===== DOCS PAGE ===== */
.docs-header {
  background: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.docs-layout {
  display: flex;
  min-height: calc(100vh - 48px);
}
.docs-sidebar {
  width: 240px;
  min-width: 240px;
  background: #0d1117;
  border-right: 1px solid #21262d;
  padding: 24px 0;
  position: sticky;
  top: 48px;
  height: calc(100vh - 48px);
  overflow-y: auto;
}
.docs-nav-group { margin-bottom: 24px; }
.docs-nav-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #6e7681;
  padding: 0 24px;
  margin-bottom: 8px;
}
.docs-nav-link {
  display: block;
  padding: 5px 24px;
  color: #8b949e;
  font-size: 13px;
  border-left: 3px solid transparent;
}
.docs-nav-link:hover { color: #c9d1d9; text-decoration: none; }
.docs-nav-link.active {
  color: #3fb950;
  border-left-color: #3fb950;
}
.docs-content {
  flex: 1;
  padding: 32px 48px;
  max-width: 1100px;
}
.docs-section { margin-bottom: 48px; }
.docs-heading {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.docs-hr {
  border: none;
  border-top: 1px solid #21262d;
  margin-bottom: 24px;
}
.docs-section p {
  margin-bottom: 16px;
  line-height: 1.7;
  font-size: 13px;
}
.docs-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: #f0f6fc;
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.docs-list {
  list-style: none;
  margin-bottom: 16px;
}
.docs-list li {
  padding: 4px 0;
  padding-left: 18px;
  position: relative;
}
.docs-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3fb950;
}

/* Pipeline flow */
.pipeline-flow {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
  overflow-x: auto;
}
.pipeline-box {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 16px 20px;
  text-align: center;
  min-width: 140px;
}
.pipeline-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.pipeline-desc {
  font-size: 11px;
  color: #8b949e;
  line-height: 1.4;
}
.pipeline-arrow {
  font-size: 18px;
  color: #6e7681;
  padding: 0 8px;
  flex-shrink: 0;
}

/* Callout boxes */
.callout {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 20px 24px;
  margin-bottom: 16px;
}
.callout h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #f0f6fc;
  margin-bottom: 10px;
}
.callout p { margin-bottom: 0; }
.callout.warning {
  border-left: 4px solid #f85149;
}
.callout.warning h3 { color: #f85149; }
.callout.info {
  border-left: 4px solid #58a6ff;
}
.callout.info h3 { color: #58a6ff; }

/* Code blocks */
.code-block {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.code-block pre {
  font-family: inherit;
  font-size: 12px;
  color: #c9d1d9;
  line-height: 1.6;
  white-space: pre;
  margin: 0;
}
.inline-code {
  background: #1c2128;
  border: 1px solid #30363d;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 12px;
  color: #79c0ff;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.badge.complete { background: #238636; color: #fff; }
.badge.running  { background: #1f6feb; color: #fff; }
.badge.pending  { background: #db6d28; color: #fff; }
.badge.notstarted { background: #da3633; color: #fff; }
.badge.limited  { background: #6e7681; color: #fff; }

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 32px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-card h1 {
  font-size: 18px;
  letter-spacing: 1px;
  color: #f0f6fc;
}
.login-card input {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 4px;
  padding: 10px 12px;
  color: #c9d1d9;
  font-family: inherit;
  font-size: 13px;
}
.login-card input:focus { outline: none; border-color: #58a6ff; }
.login-card button {
  background: #238636;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}
.login-card button:hover { background: #2ea043; }
.err {
  background: #4c1719;
  color: #ff8c8c;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
}
