:root {
  --bg: #0e1015;
  --bg-2: #141823;
  --card: #1b2130;
  --muted: #9aa4b2;
  --text: #e7edf6;
  --accent: #00c2a8;
  --accent-2: #5b7cfa;
  --danger: #ff5f5f;
  --shadow: rgba(10, 12, 18, 0.45);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(800px 400px at 10% 10%, rgba(0, 194, 168, 0.2), transparent 60%),
    radial-gradient(700px 500px at 90% 10%, rgba(91, 124, 250, 0.22), transparent 60%),
    linear-gradient(160deg, #0b0d12 0%, #121625 40%, #0f1119 100%);
  z-index: -1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px rgba(0, 194, 168, 0.6);
}

.brand .title {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand .subtitle {
  color: var(--muted);
  font-size: 13px;
}

.session {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 13px;
}

.status.ok {
  color: #0ee6c0;
  background: rgba(14, 230, 192, 0.12);
}

.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  padding: 28px;
  max-width: 1200px;
  margin: 0 auto 80px;
}

.sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
  background: rgba(27, 33, 48, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 20px 50px var(--shadow);
  height: fit-content;
}

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

.nav-link {
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  display: block;
  text-decoration: none;
}

.nav-link:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.nav-link.is-active {
  background: rgba(0, 194, 168, 0.15);
  border-color: rgba(0, 194, 168, 0.4);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}


.card {
  background: rgba(27, 33, 48, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: 0 20px 50px var(--shadow);
}

.card h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--text);
}

.muted {
  color: var(--muted);
  margin: 0 0 16px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  background: var(--bg-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid rgba(0, 194, 168, 0.4);
  border-color: rgba(0, 194, 168, 0.6);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.wide {
  margin-top: 16px;
}

.btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, border 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 194, 168, 0.5);
}

.btn.primary {
  background: linear-gradient(135deg, rgba(0, 194, 168, 0.8), rgba(91, 124, 250, 0.8));
  border: none;
}

.btn.ghost {
  background: transparent;
}

.btn.danger {
  border-color: rgba(255, 95, 95, 0.4);
  color: #ff9e9e;
}

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

.output {
  background: var(--bg-2);
  border-radius: 12px;
  padding: 12px;
}

.list-area {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: rgba(15, 18, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
}

.stat-card strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
}

.list-card {
  background: rgba(15, 18, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
}

.list-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.list-meta {
  color: var(--muted);
  font-size: 12px;
}

.output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted);
}

.code {
  margin: 0;
  max-height: 320px;
  overflow: auto;
  font-family: "JetBrains Mono", "SFMono-Regular", ui-monospace, monospace;
  font-size: 12px;
  color: #c5f6ff;
  white-space: pre-wrap;
}

.small {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .layout {
    padding: 20px;
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}
