:root {
  --bg-0: #07080d;
  --bg-1: #0b0d16;
  --bg-2: #11142055;
  --line: rgba(148, 163, 184, 0.12);
  --line-2: rgba(148, 163, 184, 0.22);
  --text: #e7ecf3;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --brand: #7c5cff;
  --brand-2: #22d3ee;
  --brand-3: #f472b6;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
}

* {
  box-sizing: border-box;
}

html,
body {
  background: var(--bg-0);
  color: var(--text);
}

body {
  font-family: "Inter", "Noto Sans SC", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", sans-serif;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.font-mono,
code,
pre,
kbd {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;
  font-feature-settings: "calt", "liga";
}

.bg-app {
  background:
    radial-gradient(1100px 600px at 8% -10%, rgba(124, 92, 255, 0.18), transparent 55%),
    radial-gradient(900px 600px at 100% 0%, rgba(34, 211, 238, 0.14), transparent 55%),
    radial-gradient(800px 600px at 50% 110%, rgba(244, 114, 182, 0.12), transparent 60%),
    linear-gradient(180deg, #07080d 0%, #090b14 100%);
}

.bg-grid {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

.glass {
  background: linear-gradient(180deg, rgba(20, 24, 36, 0.78), rgba(12, 14, 22, 0.78));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 24px 60px -30px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(14px);
}

.glass-2 {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: 14px;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1;
  border: 1px solid transparent;
  transition: transform 0.06s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  cursor: pointer;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, #7c5cff 0%, #22d3ee 100%);
  color: #06080f;
  box-shadow: 0 10px 30px -12px rgba(124, 92, 255, 0.7);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-2);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(124, 92, 255, 0.55);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.4);
  color: #fecaca;
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.2);
}

.btn-ok {
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.45);
  color: #bbf7d0;
}

.btn-ok:hover {
  background: rgba(52, 211, 153, 0.25);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 10px;
}

.input,
.textarea,
.select {
  width: 100%;
  background: rgba(7, 9, 16, 0.85);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted-2);
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: rgba(124, 92, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.12);
  background: rgba(7, 9, 16, 0.95);
}

.field-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--muted-2);
  margin-top: 0.4rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-2);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #cbd5e1;
  font-weight: 600;
}

.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--brand-2);
  box-shadow: 0 0 12px var(--brand-2);
}

.chip-brand {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(34, 211, 238, 0.16));
  border-color: rgba(124, 92, 255, 0.45);
  color: #ddd6fe;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge-queued { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.3); }
.badge-running { background: rgba(34, 211, 238, 0.15); color: #67e8f9; border-color: rgba(34, 211, 238, 0.4); }
.badge-completed { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.4); }
.badge-failed { background: rgba(248, 113, 113, 0.15); color: #fca5a5; border-color: rgba(248, 113, 113, 0.45); }
.badge-pending { background: rgba(251, 191, 36, 0.13); color: #fde68a; border-color: rgba(251, 191, 36, 0.4); }
.badge-approved { background: rgba(52, 211, 153, 0.12); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.35); }
.badge-rejected { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.3); }
.badge-admin { background: linear-gradient(135deg, rgba(124, 92, 255, 0.22), rgba(34, 211, 238, 0.18)); color: #ddd6fe; border-color: rgba(124, 92, 255, 0.5); }
.badge-user { background: rgba(255, 255, 255, 0.06); color: #cbd5e1; border-color: var(--line-2); }

.sev {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.6rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.sev::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.sev-critical { background: rgba(220, 38, 38, 0.18); color: #fca5a5; border-color: rgba(220, 38, 38, 0.55); }
.sev-high { background: rgba(248, 113, 113, 0.12); color: #fca5a5; border-color: rgba(248, 113, 113, 0.4); }
.sev-medium { background: rgba(251, 191, 36, 0.12); color: #fde68a; border-color: rgba(251, 191, 36, 0.4); }
.sev-low { background: rgba(56, 189, 248, 0.12); color: #7dd3fc; border-color: rgba(56, 189, 248, 0.4); }
.sev-info { background: rgba(148, 163, 184, 0.13); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.3); }

.alert {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  border: 1px solid transparent;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.alert-error { background: rgba(248, 113, 113, 0.08); color: #fecaca; border-color: rgba(248, 113, 113, 0.35); }
.alert-success { background: rgba(52, 211, 153, 0.08); color: #bbf7d0; border-color: rgba(52, 211, 153, 0.35); }
.alert-info { background: rgba(34, 211, 238, 0.08); color: #a5f3fc; border-color: rgba(34, 211, 238, 0.3); }

.metric-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff 0%, #94a3b8 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.metric-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}

.kbd {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-2);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  color: #cbd5e1;
}

.codeblock {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.95), rgba(7, 11, 22, 0.92));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
}

.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.06s ease;
}

.list-row:hover {
  border-color: rgba(124, 92, 255, 0.45);
  background: rgba(124, 92, 255, 0.05);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-title h2 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.section-title .hint {
  font-size: 0.78rem;
  color: var(--muted);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.12s ease, background 0.12s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.nav-link.active {
  color: var(--text);
  background: rgba(124, 92, 255, 0.14);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c5cff 0%, #22d3ee 100%);
  color: #06080f;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 28px -10px rgba(124, 92, 255, 0.7);
  font-size: 0.9rem;
}

.scroll-pretty::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.scroll-pretty::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-pretty::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: 8px;
}

.scroll-pretty::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.35);
}

.log-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  padding: 0.4rem 0.65rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  border-radius: 8px;
  color: #cbd5e1;
  border: 1px solid transparent;
}

.log-line:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--line);
}

.log-line .ts {
  color: var(--muted-2);
  white-space: nowrap;
}

.log-line.error { color: #fca5a5; }
.log-line.warn { color: #fde68a; }

.timeline {
  position: relative;
  padding-left: 1.25rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.32rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: linear-gradient(180deg, var(--line-2), transparent);
}

.timeline-item {
  position: relative;
  padding-left: 0.4rem;
  padding-bottom: 1rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 0.5rem;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c5cff, #22d3ee);
  box-shadow: 0 0 14px rgba(124, 92, 255, 0.7);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 100vh;
}

@media (min-width: 900px) {
  .split-grid {
    grid-template-columns: 1.1fr 1fr;
  }
}

.split-aside {
  position: relative;
  overflow: hidden;
  padding: 3rem;
  background:
    radial-gradient(700px 400px at 0% 0%, rgba(124, 92, 255, 0.25), transparent 55%),
    radial-gradient(600px 400px at 100% 100%, rgba(34, 211, 238, 0.18), transparent 55%),
    linear-gradient(180deg, #0b0d18, #07080d);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.split-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.feature-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.feature-tile .ico {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(124, 92, 255, 0.14);
  color: #c4b5fd;
  flex-shrink: 0;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-2);
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.copy-btn:hover {
  background: rgba(124, 92, 255, 0.14);
  border-color: rgba(124, 92, 255, 0.5);
  color: #ddd6fe;
}

.severity-bar {
  display: grid;
  grid-template-columns: 80px 1fr 40px;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
}

.severity-bar .track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  position: relative;
}

.severity-bar .fill {
  position: absolute;
  inset: 0;
  width: var(--pct, 0%);
  border-radius: inherit;
  transition: width 0.4s ease;
}

.severity-bar.high .fill { background: linear-gradient(90deg, #f87171, #f43f5e); }
.severity-bar.medium .fill { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.severity-bar.low .fill { background: linear-gradient(90deg, #38bdf8, #22d3ee); }
.severity-bar.info .fill { background: linear-gradient(90deg, #94a3b8, #64748b); }

.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.kv {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.85rem;
  font-size: 0.85rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--line);
}

.kv:last-child {
  border-bottom: none;
}

.kv dt {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  font-weight: 600;
}

.kv dd {
  color: var(--text);
  word-break: break-word;
}

a {
  color: inherit;
}

a:hover {
  color: #fff;
}

.link {
  color: #c4b5fd;
  text-decoration: underline;
  text-decoration-color: rgba(196, 181, 253, 0.35);
  text-underline-offset: 3px;
}

.link:hover {
  color: #ddd6fe;
}

.fade-mask {
  -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
}
