body {
  margin: 0;
  min-height: 100vh;
  background: #0b0f14;
  color: #e6edf3;
  font-family: "Titillium Web", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

:root {
  --neon-cyan: #00e0ff;
  --neon-pink: #ff8af2;
  --neon-lime: #aaff00;
  --neon-amber: #ffc300;
  --neon-glow: 0 0 12px rgba(0, 224, 255, 0.5);
  --brand-teal: #1cc9a1;
  --brand-teal-light: #72dfca;
}

/* ── Global Bulma overrides for dark background (8:1+ contrast) ── */
.title { color: #e6edf3; }
.subtitle { color: #b0bac5; }
.label { color: #e6edf3; }
.help { color: #b0bac5; }

.dashboard-body {
  background: #0b0f14;
  position: relative;
  overflow-x: hidden;
}

.dashboard-shell {
  background: transparent;
  position: relative;
  z-index: 1;
}

.neon-title {
  font-family: "Orbitron", "Titillium Web", sans-serif;
  letter-spacing: 0.04em;
}

.neon-card {
  border: 1px solid rgba(0, 224, 255, 0.25);
  box-shadow: var(--neon-glow);
  background: rgba(12, 16, 31, 0.82);
  backdrop-filter: blur(6px);
}

.neon-cyan {
  color: var(--neon-cyan);
}

.neon-pink {
  color: var(--neon-pink);
}

.neon-lime {
  color: var(--neon-lime);
}

.neon-amber {
  color: var(--neon-amber);
}

.brainboard-shell {
  min-height: 220px;
  border-radius: 16px;
  padding: 16px;
  background: radial-gradient(circle at top, rgba(0, 224, 255, 0.18), rgba(12, 16, 31, 0.8) 60%);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 12px;
}

.brainboard-shell.is-graph {
  display: block;
  height: 280px;
  padding: 0;
}

.brainboard-node {
  border-radius: 18px;
  border: 1px solid rgba(255, 60, 240, 0.35);
  background: rgba(10, 14, 32, 0.85);
  padding: 16px;
  text-align: center;
  color: #f1f5ff;
  box-shadow: 0 0 14px rgba(255, 60, 240, 0.35);
  display: grid;
  gap: 10px;
  place-items: center;
  min-height: 140px;
}

.node-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "Orbitron", "Titillium Web", sans-serif;
  font-size: 22px;
  color: #f1f5ff;
  background: radial-gradient(circle at top, rgba(255, 60, 240, 0.45), rgba(10, 14, 32, 0.6));
  box-shadow: 0 0 18px rgba(255, 60, 240, 0.5);
}

.node-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.action-card {
  min-height: 170px;
  display: grid;
  gap: 12px;
  align-content: space-between;
}

.graph-shell {
  height: 200px;
  border-radius: 16px;
  background: rgba(15, 20, 38, 0.85);
  border: 1px solid rgba(0, 224, 255, 0.2);
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}

.graph-line {
  position: absolute;
  inset: 20px;
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(0, 224, 255, 0.2), rgba(255, 60, 240, 0.15));
}

.graph-bars {
  position: absolute;
  inset: 40px 24px 24px 24px;
  background-image: linear-gradient(to top, rgba(0, 224, 255, 0.5), rgba(0, 224, 255, 0)),
    linear-gradient(to top, rgba(255, 195, 0, 0.5), rgba(255, 195, 0, 0));
  background-size: 24px 100%, 24px 80%;
  background-position: 0 100%, 12px 100%;
  background-repeat: repeat-x;
  opacity: 0.55;
}

.particles-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.neon-nav {
  border: 1px solid rgba(0, 224, 255, 0.2);
  box-shadow: 0 0 18px rgba(0, 224, 255, 0.2);
  background: rgba(12, 16, 31, 0.75);
  backdrop-filter: blur(6px);
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.card {
  width: 100%;
  max-width: 480px;
  background: #10151c;
  border: 1px solid #232a35;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.card .title,
.card .subtitle,
.card label,
.card input,
.card .help {
  color: #e6edf3;
}

.card .subtitle {
  color: #b0bac5;
}

.app-shell {
  min-height: 100vh;
  padding: 40px 48px 64px;
  background: radial-gradient(circle at top, rgba(59, 130, 246, 0.12), transparent 45%);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #a8b5c1;
  margin-bottom: 6px;
}

/* ── Topbar brand header (teal-inspired from #1cc9a1) ── */
.topbar .eyebrow {
  color: var(--brand-teal);
  font-weight: 600;
}

.topbar .title {
  color: var(--brand-teal-light);
  font-family: "Orbitron", "Titillium Web", sans-serif;
  letter-spacing: 0.04em;
}

.topbar .subtitle {
  color: var(--brand-teal-light);
}

.side-nav {
  position: sticky;
  top: 20px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(0, 224, 255, 0.2);
  box-shadow: 0 0 18px rgba(0, 224, 255, 0.2);
  background: rgba(12, 16, 31, 0.75);
  backdrop-filter: blur(6px);
}

.side-nav .menu-label {
  color: #b0bac5;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.side-nav .menu-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.side-nav .menu-list a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  color: #e6edf3;
  text-decoration: none;
  font-size: 14px;
}

.side-nav .menu-list a:hover {
  background: rgba(59, 130, 246, 0.12);
}

.side-nav .menu-list a.is-active {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.35);
}

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

.panel-card {
  background: rgba(12, 16, 31, 0.82);
  border: 1px solid rgba(0, 224, 255, 0.15);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 0 12px rgba(0, 224, 255, 0.08), 0 18px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
}

.panel-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.panel-title {
  font-weight: 600;
  margin-bottom: 12px;
  color: #e6edf3;
}

.panel-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.panel-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 35, 0.65);
  border: 1px solid rgba(35, 42, 53, 0.6);
}

.panel-item.is-clickable {
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.panel-item.is-clickable:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.panel-item.is-active {
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}

.agent-log {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.log-entry {
  background: rgba(15, 23, 35, 0.65);
  border: 1px solid rgba(35, 42, 53, 0.6);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
}

.log-meta {
  color: #a8b5c1;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.log-error {
  margin-top: 6px;
  color: #ff7b72;
}

.channel-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.channel-card {
  background: rgba(15, 23, 35, 0.65);
  border: 1px solid rgba(35, 42, 53, 0.6);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid rgba(35, 42, 53, 0.6);
  background: rgba(15, 23, 35, 0.65);
}

.status-ok {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.4);
}

.status-error {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.4);
}

.status-unknown {
  color: #fef3c7;
  border-color: rgba(234, 179, 8, 0.4);
}

.integration-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.integration-card {
  background: rgba(15, 23, 35, 0.65);
  border: 1px solid rgba(35, 42, 53, 0.6);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.integration-card.is-highlighted {
  border-color: rgba(0, 224, 255, 0.8);
  box-shadow: 0 0 0 2px rgba(0, 224, 255, 0.4);
}

.integration-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.stat-label {
  color: #b0bac5;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  margin-top: 6px;
}

.placeholder {
  color: #a8b5c1;
  font-size: 13px;
  margin-top: 8px;
}

.muted {
  color: #b0bac5;
  font-size: 13px;
  margin-top: 4px;
}

.editor-shell,
.graph-shell {
  background: #0b0f14;
  border: 1px dashed #2b3442;
  border-radius: 14px;
  padding: 24px;
  margin-top: 16px;
  color: #7b8a9c;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.tiptap-shell {
  min-height: 240px;
  padding: 16px;
  border-radius: 14px;
  background: #0b0f14;
  border: 1px solid #232a35;
}

.tiptap-content {
  min-height: 200px;
  outline: none;
  color: #e6edf3;
}

.tiptap-content p {
  margin: 0 0 10px;
}

.select select {
  background: #0b0f14;
  color: #e6edf3;
  border-color: #232a35;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-button.is-active {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}

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

.tag-chip {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.backlinks-card {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(35, 42, 53, 0.6);
}

.history-card {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(35, 42, 53, 0.6);
}

.diff-panel {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(35, 42, 53, 0.6);
  background: rgba(15, 23, 35, 0.65);
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.diff-block {
  background: #0b0f14;
  border-radius: 10px;
  padding: 12px;
  min-height: 120px;
  border: 1px solid rgba(35, 42, 53, 0.6);
}

.diff-added {
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
  padding: 2px 4px;
  border-radius: 6px;
}

.diff-removed {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  padding: 2px 4px;
  border-radius: 6px;
  text-decoration: line-through;
}

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

.kanban-column {
  background: rgba(15, 23, 35, 0.65);
  border: 1px solid rgba(35, 42, 53, 0.6);
  border-radius: 16px;
  padding: 12px;
  min-height: 180px;
}

.kanban-header {
  font-weight: 600;
  color: #e6edf3;
  margin-bottom: 10px;
}

.kanban-list {
  display: grid;
  gap: 10px;
  min-height: 120px;
}

.kanban-card {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(35, 42, 53, 0.6);
  background: #0b0f14;
  cursor: grab;
}

.kanban-card:active {
  cursor: grabbing;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.calendar-grid.compact {
  grid-template-columns: 1fr;
}

.task-summary {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.task-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(35, 42, 53, 0.6);
  background: rgba(15, 23, 35, 0.65);
}

.calendar-card {
  background: #0b0f14;
  border: 1px solid rgba(35, 42, 53, 0.6);
  border-radius: 12px;
  padding: 12px;
}

.calendar-date {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b0bac5;
  margin-bottom: 8px;
}

.calendar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.calendar-item {
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(15, 23, 35, 0.65);
  border: 1px solid rgba(35, 42, 53, 0.6);
}

.weekday-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.checkbox-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(35, 42, 53, 0.6);
  background: #0b0f14;
  font-size: 12px;
  color: #b0bac5;
}

.button-group {
  display: flex;
  gap: 8px;
}

.input,
.button {
  border-radius: 10px;
}

.input {
  background: #0b0f14;
  border-color: #232a35;
  color: #e6edf3;
}

.input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 0.125em rgba(59, 130, 246, 0.25);
}

.button.is-primary {
  background: #3b82f6;
  border-color: transparent;
  color: #ffffff;
  font-weight: 600;
}

.button.is-primary:hover {
  background: #2563eb;
}

.button.is-dark {
  background: #1f2937;
  border-color: #232a35;
  color: #e6edf3;
}

.button.is-dark.is-outlined {
  background: transparent;
  border-color: #2b3442;
}

.tag.is-dark {
  background: #111827;
  border: 1px solid #1f2937;
  color: #b0bac5;
}

.mono {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.notification.is-danger.is-light {
  background: rgba(248, 81, 73, 0.12);
  color: #ff9d96;
  border: 1px solid rgba(248, 81, 73, 0.3);
}

.log-error {
  color: #ff9d96;
}
