@charset "UTF-8";
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--nexus-bg);
  color: var(--nexus-text);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
.sidebar {
  width: 220px;
  min-height: 100vh;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 16px;
  background: var(--nexus-sidebar-bg);
  border-right: 1px solid var(--nexus-border-soft);
  backdrop-filter: blur(20px);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--nexus-heading, #ffffff);
  text-decoration: none;
}
.sidebar-logo img {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.45));
}
.sidebar-logo span {
  font-size: 13px;
  letter-spacing: 6px;
  font-weight: 600;
}

.sidebar nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-nav-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.sidebar-nav-label {
  padding: 0 14px 4px;
  color: var(--nexus-muted, #94a3b8);
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.sidebar nav a {
  display: block;
  width: 100%;
  min-width: 0;
  padding: var(--nexus-nav-padding-y, 10px) 14px;
  border-radius: 12px;
  color: var(--nexus-soft, #cbd5e1);
  font-size: 15px;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: 0.25s ease;
}
.sidebar nav a:hover {
  background: rgba(34, 211, 238, 0.08);
  color: var(--nexus-heading, #ffffff);
}
.sidebar nav a.active {
  background: rgba(34, 211, 238, 0.13);
  box-shadow: inset 3px 0 0 #22d3ee;
  color: var(--nexus-heading, #ffffff);
}

/* Collapsible AI tools menu */
.sidebar-ai-group {
  width: 100%;
  min-width: 0;
}
.sidebar-ai-group summary {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 10px 38px 10px 14px;
  border-radius: 12px;
  color: var(--nexus-soft, #cbd5e1);
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: 0.25s ease;
}
.sidebar-ai-group summary::-webkit-details-marker {
  display: none;
}
.sidebar-ai-group summary::after {
  content: "";
  position: absolute;
  right: 15px;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}
.sidebar-ai-group summary:hover {
  background: rgba(34, 211, 238, 0.08);
  color: var(--nexus-heading, #ffffff);
}
.sidebar-ai-group summary:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.7);
  outline-offset: 2px;
}
.sidebar-ai-group[open] summary {
  background: rgba(34, 211, 238, 0.05);
  color: var(--nexus-heading, #ffffff);
}
.sidebar-ai-group[open] summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.sidebar-ai-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0 0 14px;
  padding-left: 10px;
  border-left: 1px solid rgba(34, 211, 238, 0.22);
}
.sidebar-ai-links a {
  padding: 9px 12px;
  font-size: 14px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--nexus-border-muted);
}

.sidebar-footer .logout {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--nexus-muted, #94a3b8);
  font-size: 15px;
  line-height: 1.35;
  text-decoration: none;
  transition: 0.25s ease;
}
.sidebar-footer .logout:hover {
  background: rgba(34, 211, 238, 0.08);
  color: var(--nexus-heading, #ffffff);
}

.dashboard-page {
  min-height: 100vh;
  overflow-x: hidden;
}

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

.dashboard-main {
  flex: 1;
  min-width: 0;
  padding: 40px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.graph-panel {
  grid-row: span 2;
}

.recent-note-list {
  display: grid;
  gap: var(--nexus-list-gap, 12px);
}

.recent-note-item {
  display: block;
  padding: var(--nexus-item-padding-y, 14px) var(--nexus-item-padding-x, 16px);
  border-radius: 12px;
  background: var(--nexus-surface);
  border: 1px solid var(--nexus-border-muted);
  text-decoration: none;
  transition: 0.25s ease;
}
.recent-note-item strong {
  display: block;
  color: var(--nexus-heading, #ffffff);
  margin-bottom: 6px;
}
.recent-note-item span {
  color: var(--nexus-muted, #94a3b8);
  font-size: 12px;
}
.recent-note-item:hover {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.12);
  transform: translateY(-1px);
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.action-card {
  display: block;
  min-height: 98px;
  padding: var(--nexus-panel-padding, 24px) var(--nexus-item-padding-x, 16px);
  border: 1px solid var(--nexus-border-soft);
  border-radius: 18px;
  background: var(--nexus-surface);
  color: var(--nexus-heading, #ffffff);
  text-align: center;
  text-decoration: none;
  font-size: 26px;
  transition: 0.25s ease;
}
.action-card span {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--nexus-soft, #cbd5e1);
}
.action-card:hover {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.18);
  transform: translateY(-2px);
}

.live-graph {
  position: relative;
  height: 360px;
  margin-bottom: 22px;
  overflow: hidden;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.1), transparent 35%), radial-gradient(circle, rgba(34, 211, 238, 0.14) 0 2px, transparent 3px);
  background-size: auto, 68px 68px;
}

.connection-map {
  position: relative;
  perspective: 900px;
  overflow: hidden;
}

.map-orbit {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.connection-map:hover .map-node,
.connection-map:hover .graph-cluster::before,
.connection-map:hover .graph-cluster::after {
  animation-play-state: paused;
}

.graph-cluster {
  position: absolute;
  width: 46px;
  height: 46px;
}

.graph-node {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
  text-decoration: none;
  transition: 0.25s ease;
  cursor: pointer;
}
.graph-node:hover {
  transform: scale(1.18);
}

.map-node-main {
  animation: mapPulse 4.2s ease-in-out infinite;
}

.map-node-secondary {
  animation: nodeDrift 14s ease-in-out infinite;
}

.map-node:hover {
  transform: scale(1.18) !important;
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.55), 0 0 0 6px rgba(34, 211, 238, 0.06);
}

.tag-node,
.note-node,
.knowledge-node {
  animation-delay: calc(var(--node-index, 0) * 0.18s);
}

.graph-cluster::before,
.graph-cluster::after {
  animation: linePulse 5.5s ease-in-out infinite;
}

@keyframes mapPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 18px rgba(34, 211, 238, 0.18));
  }
  50% {
    transform: scale(1.03);
    filter: drop-shadow(0 0 28px rgba(34, 211, 238, 0.26));
  }
}
@keyframes nodeDrift {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(1px, -2px);
  }
  50% {
    transform: translate(-1px, 1px);
  }
  75% {
    transform: translate(2px, 0px);
  }
  100% {
    transform: translate(0, 0);
  }
}
@keyframes linePulse {
  0%, 100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.62;
  }
}
.tag-node {
  width: 46px;
  height: 46px;
  background: rgba(59, 130, 246, 0.9);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 0 28px rgba(59, 130, 246, 0.8);
  z-index: 3;
}

.note-node {
  width: 16px;
  height: 16px;
  background: #22d3ee;
  box-shadow: 0 0 20px #22d3ee;
}

.knowledge-node {
  width: 18px;
  height: 18px;
  background: #8b5cf6;
  box-shadow: 0 0 22px #8b5cf6;
}

.graph-cluster::before,
.graph-cluster::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 1px;
  background: rgba(34, 211, 238, 0.25);
  transform-origin: left center;
}

.graph-cluster::before {
  left: 22px;
  top: 22px;
  transform: rotate(28deg);
}

.graph-cluster::after {
  left: 22px;
  top: 22px;
  transform: rotate(-34deg);
}

.graph-cluster-1 {
  top: 18%;
  left: 18%;
}

.graph-cluster-2 {
  top: 24%;
  left: 58%;
}

.graph-cluster-3 {
  top: 58%;
  left: 38%;
}

.graph-cluster-4 {
  top: 66%;
  left: 72%;
}

.graph-cluster-5 {
  top: 48%;
  left: 12%;
}

.graph-cluster .graph-node:nth-child(2) {
  top: -34px;
  left: 84px;
}

.graph-cluster .graph-node:nth-child(3) {
  top: 46px;
  left: 104px;
}

.graph-cluster .graph-node:nth-child(4) {
  top: -58px;
  left: -38px;
}

.graph-cluster .graph-node:nth-child(5) {
  top: 72px;
  left: -24px;
}

.empty-graph-message {
  height: 100%;
  display: grid;
  place-items: center;
  color: #94a3b8;
  text-align: center;
  padding: 24px;
}

.tag-node,
.note-node,
.knowledge-node {
  animation: graphPulse 3s ease-in-out infinite;
}

@keyframes graphPulse {
  0%, 100% {
    opacity: 0.75;
  }
  50% {
    opacity: 1;
  }
}
.placeholder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 26px;
}

.placeholder-main {
  min-height: 520px;
}

.module-status {
  color: #22d3ee;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.placeholder-orb {
  position: relative;
  height: 280px;
  margin: 38px 0;
  border-radius: 18px;
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.22), transparent 28%), radial-gradient(circle at 35% 65%, rgba(139, 92, 246, 0.18), transparent 26%), rgba(2, 6, 23, 0.4);
  overflow: hidden;
}

.placeholder-orb::before,
.placeholder-orb::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.placeholder-orb::after {
  inset: 28%;
  border-color: rgba(139, 92, 246, 0.25);
  transform: rotate(24deg);
}

.placeholder-orb span {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 24px #22d3ee;
}

.placeholder-orb span:nth-child(1) {
  top: 34%;
  left: 28%;
}

.placeholder-orb span:nth-child(2) {
  top: 58%;
  left: 52%;
  background: #8b5cf6;
  box-shadow: 0 0 24px #8b5cf6;
}

.placeholder-orb span:nth-child(3) {
  top: 28%;
  left: 72%;
}

.placeholder-copy {
  max-width: 650px;
  color: #94a3b8;
  line-height: 1.7;
}

.preview-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 14px;
}
.preview-list li {
  padding: 15px 16px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.65);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.preview-list li::before {
  content: "•";
  color: #22d3ee;
  margin-right: 10px;
}

@media (max-width: 1000px) {
  .mobile-menu-btn {
    display: block;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1300;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    border: 1px solid rgba(34, 211, 238, 0.4);
    background: rgba(5, 15, 35, 0.9);
    color: #ffffff;
    font-size: 28px;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(82vw, 340px);
    height: 100vh;
    max-width: 100%;
    z-index: 1200;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(5, 15, 35, 0.96);
    box-shadow: 16px 0 36px rgba(2, 6, 23, 0.6);
  }
  body.menu-open .sidebar {
    transform: translateX(0);
  }
  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 1100;
    pointer-events: none;
  }
  body.menu-open .mobile-menu-backdrop {
    display: block;
    pointer-events: auto;
  }
  body.menu-open {
    overflow: hidden;
  }
  body.menu-open .dashboard-main {
    pointer-events: none;
  }
  .dashboard-main {
    padding: 90px 20px 24px;
  }
  .stats-grid,
  .dashboard-grid,
  .placeholder-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .graph-panel {
    grid-row: auto;
  }
  .actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
}
.dashboard-header h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.1;
}
.dashboard-header p {
  margin: 8px 0 0;
  color: var(--nexus-muted, #94a3b8);
}

.page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.dashboard-search-form {
  width: 340px;
  max-width: 100%;
}
.dashboard-search-form input {
  width: 100%;
  padding: var(--nexus-control-padding-y, 15px) var(--nexus-control-padding-x, 16px);
  border-radius: 14px;
  border: 1px solid var(--nexus-search-border, rgba(255, 255, 255, 0.1));
  background: var(--nexus-search-bg, rgba(5, 15, 35, 0.7));
  color: var(--nexus-input-text, #ffffff);
  outline: none;
}
.dashboard-search-form input:focus {
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.18);
}

.mobile-menu-btn,
.mobile-menu-backdrop {
  display: none;
}

@media (max-width: 1000px) {
  .mobile-menu-btn {
    display: block;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1300;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    border: 1px solid rgba(34, 211, 238, 0.4);
    background: var(--nexus-sidebar-bg);
    color: var(--nexus-heading, #ffffff);
    font-size: 28px;
  }
  .dashboard-main {
    padding: 90px 20px 24px;
  }
  .dashboard-header {
    flex-direction: column;
    gap: 20px;
  }
  .page-actions,
  .dashboard-search-form {
    width: 100%;
  }
  .page-actions {
    justify-content: flex-start;
  }
}
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--nexus-button-min-height, 48px);
  padding: var(--nexus-button-padding-y, 14px) var(--nexus-button-padding-x, 18px);
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: normal;
  transition: 0.25s ease;
  border: 1px solid var(--nexus-ghost-border, rgba(34, 211, 238, 0.42));
  color: var(--nexus-ghost-text, #e0faff);
  background: var(--nexus-ghost-bg, rgba(2, 6, 23, 0.45));
  box-shadow: var(--nexus-shadow-soft, 0 0 20px rgba(34, 211, 238, 0.12));
  font-size: 13px;
}
.ghost-btn:hover {
  border-color: var(--nexus-ghost-border-hover, rgba(34, 211, 238, 0.75));
  box-shadow: var(--nexus-shadow-strong, 0 0 28px rgba(34, 211, 238, 0.24));
}
.ghost-btn:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.65);
  outline-offset: 2px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--nexus-button-min-height, 48px);
  padding: var(--nexus-button-padding-y, 14px) var(--nexus-button-padding-x, 18px);
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: normal;
  transition: 0.25s ease;
  border: 1px solid var(--nexus-accent, #22d3ee);
  background: var(--nexus-primary-bg, rgba(34, 211, 238, 0.14));
  color: var(--nexus-primary-text, var(--nexus-heading, #ffffff));
  box-shadow: var(--nexus-shadow-soft, 0 0 20px rgba(34, 211, 238, 0.12));
}
.btn-primary:hover {
  box-shadow: var(--nexus-shadow-strong, 0 0 28px rgba(34, 211, 238, 0.24));
  border-color: var(--nexus-accent, #22d3ee);
}
.btn-primary:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.65);
  outline-offset: 2px;
}

.delete-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--nexus-button-min-height, 48px);
  padding: var(--nexus-button-padding-y, 14px) var(--nexus-button-padding-x, 18px);
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: normal;
  transition: 0.25s ease;
  width: 100%;
  border: 1px solid var(--nexus-danger-border, rgba(248, 113, 113, 0.6));
  border-radius: 999px;
  background: var(--nexus-danger-bg, rgba(127, 29, 29, 0.25));
  color: var(--nexus-danger-text, #fecaca);
}
.delete-btn:hover,
.danger-btn:hover {
  box-shadow: 0 0 24px rgba(248, 113, 113, 0.25);
}

.panel {
  background: rgba(5, 15, 35, 0.55);
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 22px;
  padding: 24px;
  backdrop-filter: blur(12px);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.panel-header a {
  color: #22d3ee;
  text-decoration: none;
}

input,
textarea,
select {
  color: var(--nexus-input-text, #ffffff);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  border: 1px solid var(--nexus-input-border, rgba(34, 211, 238, 0.25));
  border-radius: 14px;
  background: var(--nexus-input-bg, rgba(2, 6, 23, 0.65));
  padding: var(--nexus-control-padding-y, 15px) var(--nexus-control-padding-x, 16px);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--nexus-muted, #94a3b8);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.14);
}

label {
  color: var(--nexus-soft, #cbd5e1);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

input[type=checkbox],
input[type=radio] {
  accent-color: var(--nexus-accent, #22d3ee);
}

.panel {
  background: var(--nexus-panel-bg);
  border: 1px solid var(--nexus-panel-border);
  border-radius: 22px;
  backdrop-filter: blur(12px);
  box-shadow: var(--nexus-panel-shadow, none);
  padding: 32px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.panel-header h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.panel-header a {
  color: #22d3ee;
  text-decoration: none;
  font-size: 13px;
}

.stat-card {
  background: var(--nexus-panel-bg);
  border: 1px solid var(--nexus-panel-border);
  border-radius: 22px;
  backdrop-filter: blur(12px);
  box-shadow: var(--nexus-panel-shadow, none);
  padding: 32px;
}
.stat-card span {
  display: block;
  font-size: 12px;
  letter-spacing: 3px;
  color: #94a3b8;
  text-transform: uppercase;
}
.stat-card strong {
  display: block;
  margin: 16px 0;
  font-size: 48px;
  line-height: 1;
}
.stat-card small {
  color: #22d3ee;
}
.stat-card.purple {
  border-color: rgba(139, 92, 246, 0.35);
}
.stat-card.blue {
  border-color: rgba(59, 130, 246, 0.35);
}

.empty-state {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.empty-state p {
  margin: 0 0 8px;
  font-size: 20px;
}
.empty-state small {
  color: #94a3b8;
}

.tag-selector {
  position: relative;
  display: grid;
  gap: 10px;
}
.tag-selector label {
  color: #cbd5e1;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.tag-selector-box {
  min-height: 54px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.65);
}

.tag-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: #e0faff;
  cursor: pointer;
}
.tag-chip span {
  color: #94a3b8;
}

.tag-selector-input {
  flex: 1;
  min-width: 180px;
  border: 0 !important;
  background: transparent !important;
  color: #ffffff;
  padding: 8px 4px !important;
  outline: none;
}

.tag-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  margin-top: 6px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.96);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.tag-suggestion {
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
  cursor: pointer;
}
.tag-suggestion:hover {
  background: rgba(34, 211, 238, 0.12);
  color: #ffffff;
}

.create-tag {
  color: #22d3ee;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 16px;
}
.search-form input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: rgba(2, 6, 23, 0.65);
  color: #ffffff;
  outline: none;
}
.search-form input:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.2);
}
.search-form button {
  border: 1px solid #22d3ee;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: #ffffff;
  cursor: pointer;
  letter-spacing: 3px;
  text-transform: uppercase;
}

@media (max-width: 800px) {
  .search-form {
    grid-template-columns: 1fr;
  }
  .search-form button {
    padding: 15px 18px;
  }
}
.ai-inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.ai-action-btn {
  letter-spacing: 1px;
  text-transform: none;
  padding: 10px 14px;
  border-radius: 999px;
}

.ai-inline-message {
  margin: 0;
  color: #94a3b8;
  font-size: 13px;
}

.ai-suggestion-card {
  margin-top: 16px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  background: rgba(2, 6, 23, 0.7);
}

.ai-suggestion-card h2 {
  margin: 0 0 12px;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #cbd5e1;
}

.ai-suggestion-body {
  color: #e5e7eb;
  line-height: 1.7;
  font-size: 15px;
}

.ai-suggestion-body p,
.ai-suggestion-body ul,
.ai-suggestion-body ol,
.ai-suggestion-body blockquote,
.ai-suggestion-body pre,
.ai-suggestion-body code {
  margin: 0 0 10px;
}

.ai-suggestion-body ul,
.ai-suggestion-body ol {
  padding-left: 20px;
}

.ai-suggestion-body pre {
  background: rgba(2, 6, 23, 0.95);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  overflow-x: auto;
}

.ai-suggestion-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: rgba(34, 211, 238, 0.12);
  padding: 0.12em 0.35em;
  border-radius: 4px;
}

.ai-suggestion-body pre code {
  background: transparent;
  padding: 0;
}

.ai-tag-suggestions .ai-tag-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-tag-chip {
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(2, 6, 23, 0.65);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  transition: 0.2s ease;
}

.ai-tag-chip:hover {
  border-color: rgba(34, 211, 238, 0.6);
  color: #ffffff;
}

.ai-tag-chip.used {
  opacity: 0.7;
  border-color: rgba(34, 211, 238, 0.18);
}

.ai-context-badge {
  display: inline-flex;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(2, 6, 23, 0.45);
  color: #cbd5e1;
  font-size: 12px;
}

.ai-context-panel {
  margin-bottom: 14px;
}

.ai-context-panel summary {
  cursor: pointer;
  color: #22d3ee;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.ai-context-panel ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.ai-context-panel li {
  margin: 6px 0;
  color: #cbd5e1;
}

.ai-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.ai-context-grid label {
  color: #cbd5e1;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-context-preview {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.ai-context-preview p {
  margin: 0;
  color: #94a3b8;
}

.ai-insight-card {
  border: 1px solid rgba(34, 211, 238, 0.24);
  background: rgba(2, 6, 23, 0.55);
}

.ai-insight-card p {
  margin: 0 0 10px;
  color: #cbd5e1;
  line-height: 1.6;
}

@media (max-width: 700px) {
  .ai-context-grid {
    grid-template-columns: 1fr;
  }
}
.ai-workspace-fab-wrap {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1200;
}

.ai-workspace-overlay,
.command-palette-overlay {
  position: fixed;
  inset: 0;
  background: var(--nexus-overlay-bg);
  backdrop-filter: blur(2px);
  z-index: 1290;
}

.ai-workspace-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(520px, 96vw);
  height: 100vh;
  max-height: 100vh;
  background: var(--nexus-ai-panel-bg);
  border-left: 1px solid rgba(34, 211, 238, 0.2);
  box-shadow: -10px 0 30px rgba(2, 6, 23, 0.24);
  z-index: 1300;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 14px;
  gap: 10px;
}

.ai-workspace-panel.is-open {
  transform: translateX(0);
}

.ai-workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.ai-workspace-header h2 {
  margin: 0;
  font-size: 20px;
}

.ai-workspace-header p {
  margin: 6px 0 0;
  color: var(--nexus-muted, #94a3b8);
}

.ai-workspace-panel h3 {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.ai-workspace-panel textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
}

.ai-workspace-panel .ai-suggestion-body {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ai-workspace-panel .ai-suggestion-body pre {
  overflow-x: auto;
}

.command-palette-open {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 1200;
}

.command-palette {
  position: fixed;
  top: 12vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 94vw);
  background: var(--nexus-modal-bg);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 16px;
  padding: 14px;
  z-index: 1310;
}

.command-palette header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.command-palette input {
  width: 100%;
  margin-bottom: 10px;
}

.command-palette ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 52vh;
  overflow: auto;
}

.command-palette li {
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 8px;
  cursor: pointer;
}

.command-palette li.is-selected,
.command-palette li:hover {
  border-color: rgba(34, 211, 238, 0.5);
  background: var(--nexus-surface);
}

.sidebar-ai-group summary {
  cursor: pointer;
  color: #94a3b8;
  margin-bottom: 8px;
}

body.ai-workspace-active {
  overflow: hidden;
}

@media (max-width: 900px) {
  .ai-workspace-panel {
    width: 100vw;
    border-left: none;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .ai-workspace-fab-wrap {
    right: 12px;
    bottom: 12px;
  }
  .command-palette {
    top: 8vh;
    width: 96vw;
  }
}
/* ================================
   Nexus Landing Page
================================ */
.landing-page {
  overflow: hidden;
}

.landing-page canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.landing-page .overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  background: radial-gradient(circle at 70% 35%, rgba(0, 255, 255, 0.12), transparent 35%), radial-gradient(circle at 20% 70%, rgba(124, 58, 237, 0.16), transparent 35%), linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.55) 50%, rgba(2, 6, 23, 0.88) 100%);
  pointer-events: none;
}

.landing-page header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 48px;
}

.landing-page .logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 8px;
}

.landing-page .logo img {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.5));
}

.landing-page .login-btn {
  color: #e0faff;
  border: 1px solid rgba(34, 211, 238, 0.7);
  padding: 12px 28px;
  border-radius: 999px;
  letter-spacing: 4px;
  font-size: 12px;
  background: rgba(2, 6, 23, 0.55);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.15);
  transition: all 0.3s ease;
}

.landing-page .login-btn:hover {
  background: rgba(34, 211, 238, 0.12);
  box-shadow: 0 0 35px rgba(34, 211, 238, 0.45);
  transform: translateY(-2px);
}

.landing-page main {
  position: relative;
  z-index: 4;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 48px;
}

.landing-page .hero {
  max-width: 760px;
  animation: breathe 6s ease-in-out infinite;
}

.landing-page .eyebrow {
  color: #22d3ee;
  letter-spacing: 7px;
  font-size: 12px;
  margin-bottom: 28px;
  opacity: 0.85;
}

.landing-page h1 {
  margin: 0;
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.95;
  letter-spacing: 8px;
  font-weight: 400;
  text-transform: uppercase;
}

.landing-page .highlight {
  color: #22d3ee;
  text-shadow: 0 0 30px rgba(34, 211, 238, 0.6);
}

.landing-page .tagline {
  margin-top: 32px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 22px);
  letter-spacing: 4px;
  line-height: 1.7;
}

.landing-page .status {
  position: fixed;
  left: 48px;
  bottom: 36px;
  z-index: 5;
  display: flex;
  gap: 18px;
  color: rgba(203, 213, 225, 0.65);
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.landing-page .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 20px #22d3ee;
  animation: pulse 1.8s ease-in-out infinite;
  margin-top: 2px;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.4;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}
@keyframes breathe {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.96;
  }
  50% {
    transform: translateY(-8px);
    opacity: 1;
  }
}
@media (max-width: 700px) {
  .landing-page header {
    padding: 24px;
  }
  .landing-page main {
    padding: 0 24px;
  }
  .landing-page .logo {
    letter-spacing: 5px;
    font-size: 15px;
  }
  .landing-page .logo img {
    width: 28px;
    height: 28px;
  }
  .landing-page .login-btn {
    padding: 10px 18px;
    letter-spacing: 3px;
  }
  .landing-page .status {
    left: 24px;
    right: 24px;
    bottom: 24px;
    font-size: 9px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .landing-page h1 {
    letter-spacing: 5px;
  }
}
/* ================================
   Nexus Login Page
================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 70% 35%, rgba(0, 255, 255, 0.08), transparent 35%), radial-gradient(circle at 20% 70%, rgba(124, 58, 237, 0.12), transparent 35%), #020617;
}

.login-box {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.82);
  box-shadow: 0 0 60px rgba(34, 211, 238, 0.16);
  backdrop-filter: blur(12px);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.login-logo img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.5));
}

.login-logo h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 5px;
  font-weight: 500;
  text-transform: uppercase;
}

.login-box p {
  margin-bottom: 32px;
  color: #94a3b8;
  letter-spacing: 3px;
  font-size: 13px;
  text-transform: uppercase;
}

.login-box label {
  display: block;
  margin-bottom: 8px;
  color: #cbd5e1;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.login-box input {
  width: 100%;
  padding: 15px;
  margin-bottom: 22px;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: #020617;
  color: white;
  font-size: 16px;
}

.login-box input:focus {
  outline: none;
  border-color: #22d3ee;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
}

.login-box button {
  width: 100%;
  padding: 15px;
  border-radius: 999px;
  border: 1px solid #22d3ee;
  background: rgba(34, 211, 238, 0.12);
  color: white;
  letter-spacing: 4px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.login-box button:hover {
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.18);
}

.login-page .back {
  display: block;
  margin-top: 24px;
  color: #64748b;
  text-align: center;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.login-page .back:hover {
  color: #94a3b8;
}

@media (max-width: 700px) {
  .login-box {
    padding: 30px 24px;
  }
  .login-logo img {
    width: 32px;
    height: 32px;
  }
  .login-logo h1 {
    font-size: 24px;
    letter-spacing: 4px;
  }
}
.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.note-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
}

.note-card-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #94a3b8;
  font-size: 12px;
  margin-bottom: 18px;
}

.note-card-top span {
  color: #22d3ee;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.note-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.25;
}

.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.note-preview {
  color: #cbd5e1;
  line-height: 1.6;
  margin: 0;
}

.note-project {
  color: #94a3b8;
  margin: 0 0 14px;
}

.empty-notes {
  grid-column: 1/-1;
  min-height: 260px;
}

.empty-notes h2 {
  margin-top: 0;
}

.empty-notes p {
  color: #94a3b8;
}

@media (max-width: 1100px) {
  .notes-grid {
    grid-template-columns: 1fr;
  }
}
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.knowledge-card {
  display: block;
  min-height: 240px;
  transition: 0.25s ease;
}

.knowledge-card:hover {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.16);
  transform: translateY(-2px);
}

.knowledge-card span {
  display: block;
  color: #22d3ee;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.knowledge-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.25;
}

.knowledge-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.knowledge-card p {
  color: #cbd5e1;
  line-height: 1.6;
}

.empty-knowledge {
  grid-column: 1/-1;
  min-height: 260px;
}

.empty-knowledge h2 {
  margin-top: 0;
}

.empty-knowledge p {
  color: #94a3b8;
  margin-bottom: 24px;
}

@media (max-width: 1100px) {
  .knowledge-grid {
    grid-template-columns: 1fr;
  }
}
.markdown-content {
  color: #e5e7eb;
  line-height: 1.8;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  margin: 1.8rem 0 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.markdown-content h1 {
  font-size: 2.3rem;
}

.markdown-content h2 {
  font-size: 1.75rem;
}

.markdown-content h3 {
  font-size: 1.4rem;
}

.markdown-content p {
  margin: 1rem 0;
  max-width: 78ch;
}

.markdown-content ul,
.markdown-content ol {
  margin: 1rem 0 1rem 1.25rem;
}

.markdown-content li {
  margin: 0.5rem 0;
}

.markdown-content pre,
.markdown-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  max-width: 100%;
}

.markdown-content pre {
  padding: 18px;
  margin: 1rem 0;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.8);
  overflow-x: auto;
  white-space: pre;
}

.markdown-content code {
  padding: 0.2rem 0.35rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.75);
}

.markdown-content pre code {
  white-space: inherit;
  overflow-wrap: normal;
  word-break: normal;
}

.markdown-content :not(pre) > code {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.markdown-content a {
  color: #22d3ee;
  text-decoration: underline;
}

.markdown-content blockquote {
  margin: 1rem 0;
  padding: 0.8rem 1rem;
  border-left: 3px solid rgba(34, 211, 238, 0.5);
  background: rgba(2, 6, 23, 0.55);
  color: #cbd5e1;
  border-radius: 8px;
}

.markdown-help {
  margin: 0 0 10px;
  color: #94a3b8;
  font-size: 13px;
}

.note-detail-main {
  padding: 36px 44px 44px;
}

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

.note-header-main {
  min-width: 0;
}

.back-link {
  display: inline-block;
  color: #22d3ee;
  margin-bottom: 18px;
}

.note-detail-header h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.15;
}

.note-detail-header .dashboard-search-form {
  width: min(320px, 100%);
}

.note-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.note-content-column {
  min-width: 0;
}

.note-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: sticky;
  top: 24px;
  align-self: start;
}

.note-detail-sidebar.panel {
  padding: 0;
  overflow: hidden;
}

.detail-action-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem;
}

.detail-action-group + .detail-action-group {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-action-heading {
  margin: 0 0 0.25rem;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.detail-action-group .page-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: stretch;
}

.detail-action-group a,
.detail-action-group button,
.detail-action-group form {
  width: 100%;
}

.detail-action-group a,
.detail-action-group button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  min-height: 38px;
  white-space: normal;
}

.detail-action-group--ai .ghost-btn {
  border-color: rgba(34, 211, 238, 0.35);
}

.note-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 16px;
}

.note-meta-primary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.note-meta-primary .type-badge,
.note-meta-primary .date-badge,
.note-meta-primary .project-badge {
  padding: 8px 12px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.45);
  font-size: 12px;
}

.note-meta .note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}

.note-meta .note-tags .tag-pill {
  margin: 0;
}

.note-content-panel {
  max-width: 1000px;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.note-content {
  white-space: pre-wrap;
  color: #e5e7eb;
  line-height: 1.75;
  font-size: 16px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.markdown-content,
.note-content-panel.markdown-content {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  display: block;
  overflow-x: auto;
  white-space: normal;
}

.markdown-content thead,
.markdown-content tbody,
.markdown-content tfoot {
  width: 100%;
}

.markdown-content th,
.markdown-content td {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

.markdown-content th {
  background: rgba(255, 255, 255, 0.05);
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  background: rgba(2, 6, 23, 0.45);
  color: #22d3ee;
  font-size: 12px;
  margin-right: 6px;
  margin-bottom: 6px;
}

.related-content-panel {
  margin-top: 22px;
}

.related-content-list {
  display: grid;
  gap: 12px;
}

.related-content-item {
  display: block;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  background: rgba(2, 6, 23, 0.32);
}

.related-content-item strong {
  display: block;
  margin-bottom: 6px;
}

.related-content-item span {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  margin-bottom: 8px;
}

.related-content-item p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 8px;
  align-items: center;
}

.related-content-item p .tag-pill {
  margin: 0;
}

.related-content-item small {
  color: #94a3b8;
}

@media (max-width: 1100px) {
  .note-detail-main {
    padding: 84px 24px 32px;
  }
  .note-detail-header h2 {
    font-size: 30px;
  }
}
@media (max-width: 900px) {
  .note-detail-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .note-detail-sidebar {
    position: static;
  }
  .note-detail-header {
    flex-direction: column;
    align-items: stretch;
  }
  .note-detail-header .dashboard-search-form {
    width: 100%;
  }
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 220px;
  color: #e5e7eb;
  text-decoration: none;
  border-left: 4px solid var(--project-accent, #2563eb);
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.65);
}

.project-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.project-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.12);
  font-size: 20px;
}

.project-status {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #cbd5e1;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.project-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.6;
}

.project-card__empty {
  color: #94a3b8;
}

.project-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.note-form-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 900px) {
  .note-form-row {
    grid-template-columns: 1fr;
  }
}
.connections-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.connection-cluster {
  min-height: 260px;
}

.connection-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}

.connection-header span {
  display: block;
  color: #22d3ee;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.connection-header h2 {
  margin: 0;
  font-size: 26px;
}

.connection-header strong {
  min-width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.1);
  color: #ffffff;
  font-size: 24px;
}

.connection-items {
  display: grid;
  gap: 12px;
}

.connection-item {
  display: block;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: 0.25s ease;
}

.connection-item:hover {
  border-color: rgba(34, 211, 238, 0.45);
  transform: translateY(-1px);
}

.connection-item span {
  display: block;
  color: #22d3ee;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.connection-item strong {
  display: block;
  color: #ffffff;
  margin-bottom: 6px;
}

.connection-item small {
  color: #94a3b8;
}

.empty-connections {
  grid-column: 1/-1;
  min-height: 260px;
}

.empty-connections h2 {
  margin-top: 0;
}

.empty-connections p {
  color: #94a3b8;
  margin-bottom: 24px;
}

@media (max-width: 1100px) {
  .connections-grid {
    grid-template-columns: 1fr;
  }
}
.tags-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.tag-card {
  display: block;
  min-height: 160px;
  transition: 0.25s ease;
}

.tag-card-link {
  display: block;
  margin-bottom: 16px;
}

.tag-card:hover {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.16);
  transform: translateY(-2px);
}

.tag-card span {
  display: block;
  color: #22d3ee;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.tag-card strong {
  display: block;
  font-size: 44px;
  line-height: 1;
  margin-bottom: 10px;
}

.tag-card small {
  color: #94a3b8;
}

.tag-card-actions {
  display: grid;
  gap: 10px;
}

.tag-inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.tag-inline-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: rgba(2, 6, 23, 0.65);
  color: #fff;
}

.empty-tags {
  grid-column: 1/-1;
  min-height: 260px;
}

.empty-tags h2 {
  margin-top: 0;
}

.empty-tags p {
  color: #94a3b8;
  margin-bottom: 24px;
}

@media (max-width: 1100px) {
  .tags-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .tags-grid {
    grid-template-columns: 1fr;
  }
}
.database-panel {
  overflow-x: auto;
}

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

.database-table th,
.database-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  text-align: left;
  vertical-align: top;
}

.database-table th {
  color: #22d3ee;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.database-table td {
  color: #cbd5e1;
  font-size: 14px;
}

.database-table tr:hover td {
  background: rgba(34, 211, 238, 0.06);
}

/* ================================
   Nexus New Note Page
================================ */
.new-note-page .note-page-main {
  padding: 36px 44px 44px;
}

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

.note-page-header h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 600;
}

.note-page-header p {
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: 15px;
}

.note-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas: "form helper";
  gap: 26px;
  align-items: start;
}

.note-form {
  grid-area: form !important;
  display: grid;
  gap: 14px;
  width: 100%;
}

.note-helper {
  grid-area: helper !important;
  width: 100%;
}

.note-form label {
  color: #cbd5e1;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.note-form input,
.note-form textarea,
.note-form select {
  width: 100%;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.65);
  color: #ffffff;
  padding: 15px 16px;
  outline: none;
}

.note-form textarea {
  min-height: 520px;
  resize: vertical;
  line-height: 1.6;
}

.note-form button {
  justify-self: start;
  margin-top: 12px;
  padding: 15px 26px;
  border: 1px solid #22d3ee;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: white;
  cursor: pointer;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.ghost-btn {
  display: inline-flex;
  padding: 14px 18px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  color: #e0faff;
  background: rgba(2, 6, 23, 0.45);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.12);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.ai-chat-page {
  display: flex;
  justify-content: center;
  width: 100%;
}

.ai-chat-window {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1100px;
  min-height: 64vh;
  gap: 18px;
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-chat-subtitle {
  color: #94a3b8;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.ai-clear-btn {
  min-height: 40px;
  padding: 10px 14px;
  letter-spacing: 1px;
  text-transform: none;
}

.ai-conversation {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 28px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.ai-message {
  max-width: 900px;
  width: fit-content;
  min-width: 160px;
  padding: 18px 20px;
  border-radius: 24px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
}

.ai-message-label {
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.7;
}

.ai-message-body {
  font-size: 15px;
  color: #e2e8f0;
}

.ai-message-body p,
.ai-message-body ul,
.ai-message-body ol,
.ai-message-body blockquote,
.ai-message-body table,
.ai-message-body h1,
.ai-message-body h2,
.ai-message-body h3,
.ai-message-body h4 {
  margin: 0 0 10px;
}

.ai-message-body ul,
.ai-message-body ol {
  padding-left: 20px;
}

.ai-message-body table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.ai-message-body th,
.ai-message-body td {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.ai-message-body th {
  background: rgba(255, 255, 255, 0.05);
}

.ai-message-user {
  margin-left: auto;
  background: rgba(34, 211, 238, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.24);
  color: #f8fafc;
}

.ai-message-assistant {
  margin-right: auto;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.12);
  color: #e2e8f0;
}

.ai-message-assistant.error {
  background: rgba(127, 29, 29, 0.22);
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
}

.ai-thinking-message {
  border-color: rgba(34, 211, 238, 0.28);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.12), 0 0 28px rgba(34, 211, 238, 0.14);
}

.ai-thinking-dots {
  display: inline-flex;
  gap: 5px;
  margin-left: 6px;
  vertical-align: middle;
}

.ai-thinking-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22d3ee;
  opacity: 0.35;
  animation: aiThinkingPulse 1.1s infinite ease-in-out;
}

.ai-thinking-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.ai-thinking-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes aiThinkingPulse {
  0%, 80%, 100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}
.ai-response-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.ai-debug-panel {
  margin-bottom: 14px;
  border: 1px dashed rgba(34, 211, 238, 0.35);
  background: rgba(2, 6, 23, 0.75);
}

.ai-debug-panel h2 {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 1px;
  color: #cbd5e1;
}

.ai-debug-panel dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0;
}

.ai-debug-panel dt {
  margin: 0;
  color: #94a3b8;
  font-size: 12px;
  text-transform: uppercase;
}

.ai-debug-panel dd {
  margin: 4px 0 0;
  color: #e2e8f0;
  word-break: break-word;
}

.ai-save-form {
  margin: 0;
}

.ai-save-btn {
  padding: 10px 14px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: none;
  box-shadow: none;
}

.ai-save-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.ai-message-body code,
.ai-message-body pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.ai-message-body pre {
  padding: 16px;
  border-radius: 14px;
  background: rgba(10, 16, 34, 0.95);
  overflow-x: auto;
  margin: 12px 0 0;
}

.ai-message-body :last-child {
  margin-bottom: 0;
}

.ai-composer {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 12px;
  padding: 18px;
  background: rgba(2, 6, 23, 0.92);
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: 24px;
}

.ai-composer textarea {
  width: 100%;
  min-height: 64px;
  max-height: 180px;
  resize: none;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 18px;
  background: rgba(3, 9, 30, 0.85);
  color: #f8fafc;
  padding: 16px 18px;
  outline: none;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.ai-composer button {
  justify-self: end;
  width: fit-content;
  padding: 16px 24px;
  border: 1px solid #22d3ee;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
  color: white;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.ai-composer.is-loading textarea,
.ai-composer.is-loading button {
  opacity: 0.75;
}

.ai-composer.is-loading button {
  cursor: wait;
}

@media (max-width: 900px) {
  .ai-chat-window {
    min-height: auto;
  }
  .ai-conversation {
    padding: 18px;
  }
  .ai-message {
    max-width: 100%;
    width: 100%;
  }
  .ai-composer {
    padding: 14px;
  }
}
@media (max-width: 620px) {
  .note-page-header {
    flex-direction: column;
  }
  .ai-composer button {
    width: 100%;
  }
  .ai-response-actions {
    width: 100%;
  }
  .ai-debug-panel dl {
    grid-template-columns: 1fr;
  }
  .ai-save-form {
    width: 100%;
  }
  .ai-save-btn {
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 1100px) {
  .new-note-page .note-page-main {
    padding: 84px 24px 32px;
  }
  .note-page-header {
    flex-direction: column;
  }
  .note-create-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "form" "helper";
  }
}
.danger-copy {
  color: #94a3b8;
  line-height: 1.6;
  margin: 18px 0 24px;
}

.ai-chat-page {
  display: flex;
  justify-content: center;
  width: 100%;
}

.ai-chat-window {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1100px;
  min-height: 68vh;
  gap: 18px;
}

.ai-conversation {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 28px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.ai-message {
  max-width: 900px;
  width: fit-content;
  min-width: 180px;
  padding: 18px 22px;
  border-radius: 24px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
}

.ai-message-user {
  margin-left: auto;
  background: rgba(34, 211, 238, 0.16);
  border: 1px solid rgba(34, 211, 238, 0.24);
}

.ai-message-assistant {
  margin-right: auto;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.12);
}

.ai-message-assistant.error {
  background: rgba(127, 29, 29, 0.22);
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
}

.ai-message-label {
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.7;
}

.ai-message-body {
  font-size: 15px;
  color: #e2e8f0;
}

.ai-message-body code,
.ai-message-body pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.ai-message-body pre {
  padding: 16px;
  border-radius: 14px;
  background: rgba(10, 16, 34, 0.95);
  overflow-x: auto;
  margin: 12px 0 0;
}

.ai-composer {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 12px;
  padding: 18px;
  background: rgba(2, 6, 23, 0.92);
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: 24px;
}

.ai-composer textarea {
  width: 100%;
  min-height: 64px;
  max-height: 180px;
  resize: none;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 18px;
  background: rgba(3, 9, 30, 0.85);
  color: #f8fafc;
  padding: 16px 18px;
  outline: none;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.ai-composer button {
  justify-self: end;
  width: fit-content;
  padding: 16px 24px;
  border: 1px solid #22d3ee;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
  color: white;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .ai-chat-window {
    min-height: auto;
  }
  .ai-conversation {
    padding: 18px;
  }
  .ai-message {
    max-width: 100%;
    width: 100%;
  }
  .ai-composer {
    padding: 14px;
  }
}
@media (max-width: 620px) {
  .note-page-header {
    flex-direction: column;
  }
  .ai-composer button {
    width: 100%;
  }
}
.ai-response-content code,
.ai-response-content pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.ai-response-content pre {
  padding: 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  overflow-x: auto;
  margin: 12px 0;
}

.ai-response-content p {
  margin: 0 0 12px;
}

.ai-response-content ul,
.ai-response-content ol {
  margin: 0 0 12px 20px;
}

.ai-response-content li {
  margin-bottom: 6px;
}

@media (max-width: 768px) {
  .ai-response {
    max-width: 100%;
    padding: 20px;
  }
  .ai-response-content {
    max-height: min(60vh, 560px);
  }
}
.delete-btn {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(248, 113, 113, 0.6);
  border-radius: 999px;
  background: rgba(127, 29, 29, 0.25);
  color: #fecaca;
  cursor: pointer;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.delete-btn:hover {
  box-shadow: 0 0 24px rgba(248, 113, 113, 0.25);
}

/* Ask AI layout and response typography overrides */
.ai-chat-window {
  max-width: 1220px;
  min-height: auto;
}

.ai-conversation {
  flex: none;
  gap: 14px;
  padding: 20px 22px;
}

.ai-message {
  min-width: 0;
  width: auto;
  padding: 14px 16px;
  white-space: normal;
  line-height: 1.55;
}

.ai-message-user {
  max-width: 58%;
}

.ai-message-assistant {
  width: min(100%, 1120px);
  max-width: 1120px;
}

.ai-response-actions {
  margin-top: 20px;
}

.ai-response-content {
  font-size: 16px;
  line-height: 1.55;
}

.ai-response-content p {
  margin-top: 0;
  margin-bottom: 0.9rem;
}

.ai-response-content ul,
.ai-response-content ol {
  margin: 0.75rem 0;
  padding-left: 1.4rem;
}

.ai-response-content li {
  margin: 0.25rem 0;
  padding: 0;
  line-height: 1.5;
}

.ai-response-content ul ul,
.ai-response-content ul ol,
.ai-response-content ol ul,
.ai-response-content ol ol {
  margin: 0.35rem 0;
}

.ai-response-content h1,
.ai-response-content h2,
.ai-response-content h3 {
  margin-top: 1rem;
}

.ai-response-content h1 {
  margin-bottom: 0.8rem;
}

.ai-response-content h2 {
  margin-bottom: 0.6rem;
}

.ai-response-content h3 {
  margin-bottom: 0.5rem;
}

.ai-response-content pre {
  padding: 16px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 1rem 0;
}

.ai-response-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

@media (max-width: 900px) {
  .ai-message-user,
  .ai-message-assistant {
    width: 100%;
    max-width: 100%;
  }
}
.search-panel {
  margin-bottom: 22px;
}

.search-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.search-form input[name=q] {
  grid-column: span 3;
}

.search-form input,
.search-form select {
  width: 100%;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: rgba(2, 6, 23, 0.65);
  color: #ffffff;
  outline: none;
}

.search-form input:focus,
.search-form select:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.2);
}

.search-form select {
  appearance: none;
}

.search-form button {
  border: 1px solid #22d3ee;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: white;
  cursor: pointer;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.search-summary {
  color: #94a3b8;
  margin-bottom: 18px;
}

.search-clear-link {
  margin: 14px 0 0;
}

.search-clear-link a {
  color: #22d3ee;
}

.active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.4);
  color: #cbd5e1;
  font-size: 12px;
}

.search-hint {
  border-style: dashed;
}

.search-results {
  display: grid;
  gap: 18px;
}

.search-result-card {
  display: block;
  transition: 0.25s ease;
}

.search-result-card:hover {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.16);
  transform: translateY(-2px);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.result-actions form {
  margin: 0;
}

.result-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #94a3b8;
  font-size: 12px;
  margin-bottom: 14px;
}

.result-meta span {
  color: #22d3ee;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.search-result-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.result-tags {
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.result-project {
  margin: 0 0 14px;
  color: #94a3b8;
}

.result-preview {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.6;
}

.result-state {
  margin: 0 0 10px;
  color: #94a3b8;
  font-size: 12px;
}

.empty-search h2 {
  margin-top: 0;
}

.empty-search p {
  color: #94a3b8;
}

@media (max-width: 800px) {
  .search-form {
    grid-template-columns: 1fr;
  }
  .search-form button {
    padding: 15px 18px;
  }
}
.activity-panel {
  padding: 10px;
}

.activity-list {
  display: grid;
  gap: 12px;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.15);
  background: rgba(2, 6, 23, 0.35);
  color: inherit;
  text-decoration: none;
  transition: 0.25s ease;
}

.activity-item:hover {
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.12);
  transform: translateY(-1px);
}

.activity-item h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

.activity-item p {
  margin: 0;
  color: #94a3b8;
}

.activity-type {
  color: #22d3ee;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 12px;
}

.activity-item small {
  color: #94a3b8;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .activity-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .activity-item small {
    white-space: normal;
  }
}
.settings-form {
  display: grid;
  gap: 20px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.settings-panel {
  display: grid;
  gap: 20px;
}

.settings-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 14px;
}

.settings-fieldset legend,
.settings-control-group label {
  margin: 0;
}

.settings-help {
  margin: 0;
  color: var(--nexus-muted);
  font-size: 14px;
  line-height: 1.6;
}

.settings-choice-grid {
  display: grid;
  gap: 12px;
}

.settings-choice-grid--theme {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-choice-grid--density {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-choice-card {
  display: block;
  cursor: pointer;
}

.settings-choice-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.settings-choice-content {
  display: grid;
  gap: 12px;
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--nexus-border-muted);
  border-radius: 18px;
  background: var(--nexus-surface);
  transition: 0.2s ease;
}

.settings-choice-card:hover .settings-choice-content {
  border-color: rgba(34, 211, 238, 0.34);
  transform: translateY(-1px);
}

.settings-choice-card input:checked + .settings-choice-content {
  border-color: var(--nexus-accent);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.18), var(--nexus-shadow-soft);
}

.settings-choice-card input:focus-visible + .settings-choice-content,
.settings-checkbox-card input:focus-visible + span {
  outline: 2px solid rgba(34, 211, 238, 0.7);
  outline-offset: 2px;
}

.settings-choice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-choice-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--nexus-heading);
}

.settings-choice-description {
  color: var(--nexus-muted);
  line-height: 1.55;
  font-size: 14px;
}

.settings-choice-indicator {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid var(--nexus-border-muted);
  background: transparent;
  flex-shrink: 0;
}

.settings-choice-card input:checked + .settings-choice-content .settings-choice-indicator {
  border-color: var(--nexus-accent);
  background: var(--nexus-accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

.theme-choice-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 58px;
}

.theme-preview-panel,
.theme-preview-accent {
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.theme-preview-panel {
  height: 44px;
}

.theme-preview-accent {
  height: 28px;
}

.theme-choice-card[data-theme-preview=dark] .theme-preview-panel:nth-child(1) {
  background: rgba(5, 15, 35, 0.92);
}

.theme-choice-card[data-theme-preview=dark] .theme-preview-panel:nth-child(2) {
  background: rgba(15, 23, 42, 0.88);
}

.theme-choice-card[data-theme-preview=dark] .theme-preview-accent {
  background: rgba(34, 211, 238, 0.25);
  border-color: rgba(34, 211, 238, 0.45);
}

.theme-choice-card[data-theme-preview=light] .theme-preview-panel:nth-child(1) {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.24);
}

.theme-choice-card[data-theme-preview=light] .theme-preview-panel:nth-child(2) {
  background: #eef5fb;
  border-color: rgba(148, 163, 184, 0.24);
}

.theme-choice-card[data-theme-preview=light] .theme-preview-accent {
  background: rgba(34, 211, 238, 0.18);
  border-color: rgba(34, 211, 238, 0.35);
}

.theme-choice-card[data-theme-preview=system] .theme-preview-panel:nth-child(1) {
  background: linear-gradient(135deg, rgba(5, 15, 35, 0.92) 50%, #ffffff 50%);
  border-color: rgba(148, 163, 184, 0.24);
}

.theme-choice-card[data-theme-preview=system] .theme-preview-panel:nth-child(2) {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 50%, #eef5fb 50%);
  border-color: rgba(148, 163, 184, 0.24);
}

.theme-choice-card[data-theme-preview=system] .theme-preview-accent {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.25) 50%, rgba(139, 92, 246, 0.22) 50%);
  border-color: rgba(34, 211, 238, 0.35);
}

.settings-control-group {
  display: grid;
  gap: 10px;
}

.settings-toggle-row {
  display: grid;
  gap: 10px;
}

.settings-checkbox-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--nexus-border-muted);
  border-radius: 18px;
  background: var(--nexus-surface);
  cursor: pointer;
}

.settings-checkbox-card input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.settings-checkbox-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--nexus-heading);
}

.settings-checkbox-card small {
  display: block;
  color: var(--nexus-muted);
  line-height: 1.55;
}

.settings-submit-row {
  display: flex;
  justify-content: flex-start;
}

.settings-alert {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
}

.settings-alert strong,
.settings-alert p {
  margin: 0;
}

.settings-alert--success {
  border-color: rgba(34, 211, 238, 0.32);
}

.settings-alert--error {
  border-color: rgba(248, 113, 113, 0.35);
}

@media (max-width: 1000px) {
  .settings-grid,
  .settings-choice-grid--theme,
  .settings-choice-grid--density {
    grid-template-columns: 1fr;
  }
}
html {
  color-scheme: dark;
  --nexus-bg: #020617;
  --nexus-surface: rgba(2, 6, 23, 0.65);
  --nexus-panel-bg: rgba(5, 15, 35, 0.55);
  --nexus-panel-strong: rgba(5, 15, 35, 0.78);
  --nexus-sidebar-bg: rgba(5, 15, 35, 0.65);
  --nexus-overlay-bg: rgba(2, 6, 23, 0.55);
  --nexus-ai-panel-bg: rgba(2, 6, 23, 0.97);
  --nexus-modal-bg: rgba(2, 6, 23, 0.98);
  --nexus-text: #ffffff;
  --nexus-heading: #ffffff;
  --nexus-muted: #94a3b8;
  --nexus-soft: #cbd5e1;
  --nexus-accent: #22d3ee;
  --nexus-accent-secondary: #8b5cf6;
  --nexus-border-soft: rgba(255, 255, 255, 0.08);
  --nexus-border-muted: rgba(148, 163, 184, 0.12);
  --nexus-panel-border: rgba(34, 211, 238, 0.15);
  --nexus-input-bg: rgba(2, 6, 23, 0.65);
  --nexus-input-border: rgba(34, 211, 238, 0.25);
  --nexus-input-text: #ffffff;
  --nexus-search-bg: rgba(5, 15, 35, 0.7);
  --nexus-search-border: rgba(255, 255, 255, 0.1);
  --nexus-ghost-bg: rgba(2, 6, 23, 0.45);
  --nexus-ghost-text: #e0faff;
  --nexus-ghost-border: rgba(34, 211, 238, 0.42);
  --nexus-ghost-border-hover: rgba(34, 211, 238, 0.75);
  --nexus-primary-bg: rgba(34, 211, 238, 0.12);
  --nexus-primary-text: #ffffff;
  --nexus-danger-bg: rgba(127, 29, 29, 0.25);
  --nexus-danger-border: rgba(248, 113, 113, 0.6);
  --nexus-danger-text: #fecaca;
  --nexus-code-bg: rgba(15, 23, 42, 0.82);
  --nexus-inline-code-bg: rgba(15, 23, 42, 0.75);
  --nexus-blockquote-bg: rgba(2, 6, 23, 0.55);
  --nexus-tag-bg: rgba(2, 6, 23, 0.45);
  --nexus-tag-border: rgba(34, 211, 238, 0.3);
  --nexus-table-header-bg: rgba(255, 255, 255, 0.05);
  --nexus-table-border: rgba(255, 255, 255, 0.08);
  --nexus-shadow-soft: 0 0 20px rgba(34, 211, 238, 0.12);
  --nexus-shadow-strong: 0 0 28px rgba(34, 211, 238, 0.24);
  --nexus-panel-shadow: none;
  --nexus-panel-padding: 24px;
  --nexus-button-min-height: 48px;
  --nexus-button-padding-y: 14px;
  --nexus-button-padding-x: 18px;
  --nexus-control-padding-y: 15px;
  --nexus-control-padding-x: 16px;
  --nexus-nav-padding-y: 10px;
  --nexus-list-gap: 12px;
  --nexus-item-padding-y: 14px;
  --nexus-item-padding-x: 16px;
  --nexus-action-card-min-height: 98px;
}

html[data-density=compact] {
  --nexus-panel-padding: 20px;
  --nexus-button-min-height: 42px;
  --nexus-button-padding-y: 11px;
  --nexus-button-padding-x: 16px;
  --nexus-control-padding-y: 12px;
  --nexus-control-padding-x: 14px;
  --nexus-nav-padding-y: 8px;
  --nexus-list-gap: 10px;
  --nexus-item-padding-y: 11px;
  --nexus-item-padding-x: 14px;
  --nexus-action-card-min-height: 84px;
}

html[data-theme=light] {
  color-scheme: light;
  --nexus-bg: #f4f7fb;
  --nexus-surface: rgba(255, 255, 255, 0.94);
  --nexus-panel-bg: rgba(255, 255, 255, 0.92);
  --nexus-panel-strong: rgba(248, 250, 252, 0.98);
  --nexus-sidebar-bg: rgba(247, 250, 253, 0.9);
  --nexus-overlay-bg: rgba(148, 163, 184, 0.28);
  --nexus-ai-panel-bg: rgba(251, 253, 255, 0.98);
  --nexus-modal-bg: rgba(255, 255, 255, 0.98);
  --nexus-text: #0f172a;
  --nexus-heading: #020617;
  --nexus-muted: #64748b;
  --nexus-soft: #334155;
  --nexus-border-soft: rgba(15, 23, 42, 0.08);
  --nexus-border-muted: rgba(148, 163, 184, 0.24);
  --nexus-panel-border: rgba(34, 211, 238, 0.18);
  --nexus-input-bg: rgba(255, 255, 255, 0.96);
  --nexus-input-border: rgba(148, 163, 184, 0.34);
  --nexus-input-text: #0f172a;
  --nexus-search-bg: rgba(255, 255, 255, 0.96);
  --nexus-search-border: rgba(148, 163, 184, 0.32);
  --nexus-ghost-bg: rgba(255, 255, 255, 0.9);
  --nexus-ghost-text: #0f172a;
  --nexus-ghost-border: rgba(34, 211, 238, 0.3);
  --nexus-ghost-border-hover: rgba(34, 211, 238, 0.55);
  --nexus-primary-bg: rgba(34, 211, 238, 0.14);
  --nexus-primary-text: #082f49;
  --nexus-danger-bg: rgba(254, 226, 226, 0.8);
  --nexus-danger-border: rgba(248, 113, 113, 0.45);
  --nexus-danger-text: #991b1b;
  --nexus-code-bg: rgba(226, 232, 240, 0.92);
  --nexus-inline-code-bg: rgba(226, 232, 240, 0.9);
  --nexus-blockquote-bg: rgba(241, 245, 249, 0.92);
  --nexus-tag-bg: rgba(255, 255, 255, 0.92);
  --nexus-tag-border: rgba(34, 211, 238, 0.25);
  --nexus-table-header-bg: rgba(148, 163, 184, 0.12);
  --nexus-table-border: rgba(148, 163, 184, 0.26);
  --nexus-shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.06);
  --nexus-shadow-strong: 0 18px 40px rgba(15, 23, 42, 0.10);
  --nexus-panel-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

html[data-theme=system] {
  color-scheme: light dark;
}

@media (prefers-color-scheme: light) {
  html[data-theme=system] {
    color-scheme: light;
    --nexus-bg: #f4f7fb;
    --nexus-surface: rgba(255, 255, 255, 0.94);
    --nexus-panel-bg: rgba(255, 255, 255, 0.92);
    --nexus-panel-strong: rgba(248, 250, 252, 0.98);
    --nexus-sidebar-bg: rgba(247, 250, 253, 0.9);
    --nexus-overlay-bg: rgba(148, 163, 184, 0.28);
    --nexus-ai-panel-bg: rgba(251, 253, 255, 0.98);
    --nexus-modal-bg: rgba(255, 255, 255, 0.98);
    --nexus-text: #0f172a;
    --nexus-heading: #020617;
    --nexus-muted: #64748b;
    --nexus-soft: #334155;
    --nexus-border-soft: rgba(15, 23, 42, 0.08);
    --nexus-border-muted: rgba(148, 163, 184, 0.24);
    --nexus-panel-border: rgba(34, 211, 238, 0.18);
    --nexus-input-bg: rgba(255, 255, 255, 0.96);
    --nexus-input-border: rgba(148, 163, 184, 0.34);
    --nexus-input-text: #0f172a;
    --nexus-search-bg: rgba(255, 255, 255, 0.96);
    --nexus-search-border: rgba(148, 163, 184, 0.32);
    --nexus-ghost-bg: rgba(255, 255, 255, 0.9);
    --nexus-ghost-text: #0f172a;
    --nexus-ghost-border: rgba(34, 211, 238, 0.3);
    --nexus-ghost-border-hover: rgba(34, 211, 238, 0.55);
    --nexus-primary-bg: rgba(34, 211, 238, 0.14);
    --nexus-primary-text: #082f49;
    --nexus-danger-bg: rgba(254, 226, 226, 0.8);
    --nexus-danger-border: rgba(248, 113, 113, 0.45);
    --nexus-danger-text: #991b1b;
    --nexus-code-bg: rgba(226, 232, 240, 0.92);
    --nexus-inline-code-bg: rgba(226, 232, 240, 0.9);
    --nexus-blockquote-bg: rgba(241, 245, 249, 0.92);
    --nexus-tag-bg: rgba(255, 255, 255, 0.92);
    --nexus-tag-border: rgba(34, 211, 238, 0.25);
    --nexus-table-header-bg: rgba(148, 163, 184, 0.12);
    --nexus-table-border: rgba(148, 163, 184, 0.26);
    --nexus-shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.06);
    --nexus-shadow-strong: 0 18px 40px rgba(15, 23, 42, 0.10);
    --nexus-panel-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
  }
}
body,
.dashboard-page,
.dashboard-main,
.login-page {
  background: var(--nexus-bg);
  color: var(--nexus-text);
}

h1,
h2,
h3,
h4,
h5,
h6,
strong {
  color: var(--nexus-heading);
}

.panel,
.stat-card,
.activity-item,
.connection-item,
.related-content-item,
.ai-suggestion-card,
.ai-debug-panel,
.project-card,
.project-status,
.tag-card,
.search-result-card,
.recent-note-item,
.action-card,
.note-form input,
.note-form textarea,
.note-form select,
.tag-inline-form input,
.note-meta-primary .type-badge,
.note-meta-primary .date-badge,
.note-meta-primary .project-badge,
.connection-header strong {
  color: var(--nexus-text);
}

.panel,
.stat-card,
.note-detail-sidebar.panel,
.activity-item,
.connection-item,
.related-content-item,
.ai-suggestion-card,
.ai-debug-panel,
.tag-card,
.search-result-card,
.project-status,
.recent-note-item,
.action-card,
.connection-header strong,
.login-box,
.ai-message-assistant,
.command-palette,
.ai-workspace-panel {
  background: var(--nexus-panel-bg);
  border-color: var(--nexus-panel-border);
  box-shadow: var(--nexus-panel-shadow);
}

.panel,
.stat-card {
  padding: var(--nexus-panel-padding);
}

.recent-note-item,
.activity-item,
.connection-item,
.related-content-item,
.search-result-card,
.note-form input,
.note-form textarea,
.note-form select,
.tag-inline-form input {
  background: var(--nexus-surface);
  border-color: var(--nexus-border-muted);
}

.action-card {
  min-height: var(--nexus-action-card-min-height);
}

.dashboard-search-form input,
input,
textarea,
select,
.note-form input,
.note-form textarea,
.note-form select,
.tag-inline-form input,
.login-box input {
  background: var(--nexus-input-bg);
  border-color: var(--nexus-input-border);
  color: var(--nexus-input-text);
}

.sidebar,
.mobile-menu-btn {
  background: var(--nexus-sidebar-bg);
}

.sidebar nav a,
.sidebar-ai-group summary,
.sidebar-footer .logout,
.project-card,
.action-card,
.ai-message-user,
.ai-workspace-header h2,
.command-palette,
.note-form button,
.login-box button {
  color: var(--nexus-heading);
}

.sidebar-nav-label,
.dashboard-header p,
.note-page-header p,
.note-project,
.note-preview,
.activity-item p,
.activity-item small,
.connection-item small,
.tag-card small,
.project-card p,
.project-card__empty,
.markdown-help,
.ai-inline-message,
.ai-workspace-header p,
.settings-help,
.settings-choice-description,
.settings-checkbox-card small {
  color: var(--nexus-muted);
}

.tag-pill,
.ai-tag-chip,
.ai-context-badge,
.project-status,
.note-meta-primary .type-badge,
.note-meta-primary .date-badge,
.note-meta-primary .project-badge {
  background: var(--nexus-tag-bg);
  border-color: var(--nexus-tag-border);
  color: var(--nexus-soft);
}

.markdown-content,
.ai-suggestion-body,
.note-content,
.ai-message-body {
  color: var(--nexus-text);
}

.markdown-content pre,
.ai-suggestion-body pre,
.ai-conversation,
.ai-message-assistant,
.login-box,
.prompt-preview,
.database-table {
  background: var(--nexus-code-bg);
}

.markdown-content code,
.ai-suggestion-body code {
  background: var(--nexus-inline-code-bg);
}

.markdown-content blockquote {
  background: var(--nexus-blockquote-bg);
  color: var(--nexus-soft);
}

.markdown-content th,
.markdown-content td,
.database-table th,
.database-table td {
  border-color: var(--nexus-table-border);
}

.markdown-content th,
.database-table th {
  background: var(--nexus-table-header-bg);
}

.markdown-content a,
.panel-header a,
.connection-header span,
.connection-item span,
.tag-card span,
.activity-type {
  color: var(--nexus-accent);
}

.ai-workspace-overlay,
.command-palette-overlay,
.mobile-menu-backdrop {
  background: var(--nexus-overlay-bg);
}

.ai-workspace-panel,
.command-palette,
.login-box {
  background: var(--nexus-modal-bg);
}

.command-palette li,
.ai-tag-chip,
.settings-choice-content,
.settings-checkbox-card {
  border-color: var(--nexus-border-muted);
}

.login-page {
  background: radial-gradient(circle at 70% 35%, rgba(34, 211, 238, 0.08), transparent 35%), radial-gradient(circle at 20% 70%, rgba(124, 58, 237, 0.12), transparent 35%), var(--nexus-bg);
}

.login-box p,
.login-page .back {
  color: var(--nexus-muted);
}

.login-box button,
.note-form button {
  background: var(--nexus-primary-bg);
  border-color: var(--nexus-accent);
}

.note-form button,
.login-box button,
.btn-primary {
  box-shadow: var(--nexus-shadow-soft);
}

.note-form button:hover,
.login-box button:hover,
.btn-primary:hover,
.ghost-btn:hover,
.tag-card:hover,
.activity-item:hover,
.connection-item:hover,
.project-card:hover,
.action-card:hover,
.recent-note-item:hover {
  box-shadow: var(--nexus-shadow-strong);
}

.ai-message-assistant.error {
  background: var(--nexus-danger-bg);
  border-color: var(--nexus-danger-border);
  color: var(--nexus-danger-text);
}

.settings-alert--success {
  background: var(--nexus-panel-bg);
}

.settings-alert--error {
  background: var(--nexus-panel-bg);
}

html[data-density=compact] .sidebar,
html[data-density=compact] .dashboard-grid,
html[data-density=compact] .stats-grid,
html[data-density=compact] .settings-grid,
html[data-density=compact] .settings-form,
html[data-density=compact] .recent-note-list,
html[data-density=compact] .activity-list,
html[data-density=compact] .connection-items,
html[data-density=compact] .search-results,
html[data-density=compact] .notes-grid,
html[data-density=compact] .knowledge-grid {
  gap: var(--nexus-list-gap);
}

html[data-density=compact] .database-table th,
html[data-density=compact] .database-table td,
html[data-density=compact] .markdown-content th,
html[data-density=compact] .markdown-content td {
  padding: 0.6rem 0.85rem;
}

html[data-density=compact] .sidebar nav a,
html[data-density=compact] .sidebar-ai-group summary,
html[data-density=compact] .sidebar-ai-links a {
  min-height: 40px;
}

/*# sourceMappingURL=main.css.map */
