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; }
::placeholder { color: #a8b5c1 !important; }
textarea::placeholder { color: #a8b5c1 !important; }

.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 rgba(0, 224, 255, 0.15);
  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(12, 16, 31, 0.75);
  border: 1px solid rgba(0, 224, 255, 0.12);
  box-shadow: 0 0 6px rgba(0, 224, 255, 0.04);
}

.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(12, 16, 31, 0.75);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  box-shadow: 0 0 6px rgba(0, 224, 255, 0.04);
}

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

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

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

.channel-card {
  background: rgba(12, 16, 31, 0.75);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  box-shadow: 0 0 6px rgba(0, 224, 255, 0.04);
  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(0, 224, 255, 0.12);
  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(12, 16, 31, 0.75);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  box-shadow: 0 0 6px rgba(0, 224, 255, 0.04);
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.integration-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 224, 255, 0.5);
  box-shadow: 0 0 20px rgba(0, 224, 255, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.integration-card .card-hint {
  display: block;
  font-size: 11px;
  color: var(--neon-cyan);
  margin-top: 2px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  letter-spacing: 0.04em;
}

.integration-card:hover .card-hint {
  opacity: 1;
  transform: translateY(0);
}

.integration-card-add {
  border-style: dashed;
  border-color: rgba(0, 224, 255, 0.25);
  justify-items: center;
  align-content: center;
}

.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-card .card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.integration-card .account-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 224, 255, 0.25);
  background: rgba(0, 224, 255, 0.08);
  white-space: nowrap;
}

.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: rgba(12, 16, 31, 0.75);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 14px;
  padding: 24px;
  margin-top: 16px;
  color: #a8b5c1;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(0, 224, 255, 0.04);
}

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

.tiptap-shell {
  min-height: 240px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(12, 16, 31, 0.75);
  border: 1px solid rgba(0, 224, 255, 0.12);
  box-shadow: 0 0 6px rgba(0, 224, 255, 0.04);
}

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

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

.select select {
  background: #0b0f14;
  color: #e6edf3;
  border-color: rgba(0, 224, 255, 0.15);
}

.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(0, 224, 255, 0.10);
}

.history-card {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 224, 255, 0.10);
}

.diff-panel {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 224, 255, 0.12);
  background: rgba(12, 16, 31, 0.75);
  box-shadow: 0 0 6px rgba(0, 224, 255, 0.04);
}

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

.diff-block {
  background: rgba(12, 16, 31, 0.75);
  border-radius: 10px;
  padding: 12px;
  min-height: 120px;
  border: 1px solid rgba(0, 224, 255, 0.12);
  box-shadow: 0 0 6px rgba(0, 224, 255, 0.04);
}

.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(12, 16, 31, 0.75);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 16px;
  padding: 12px;
  min-height: 180px;
  box-shadow: 0 0 6px rgba(0, 224, 255, 0.04);
}

.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(0, 224, 255, 0.12);
  background: rgba(12, 16, 31, 0.75);
  box-shadow: 0 0 6px rgba(0, 224, 255, 0.04);
  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(0, 224, 255, 0.12);
  background: rgba(12, 16, 31, 0.75);
  box-shadow: 0 0 6px rgba(0, 224, 255, 0.04);
}

.calendar-card {
  background: rgba(12, 16, 31, 0.75);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 0 6px rgba(0, 224, 255, 0.04);
}

.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(12, 16, 31, 0.75);
  border: 1px solid rgba(0, 224, 255, 0.12);
  box-shadow: 0 0 6px rgba(0, 224, 255, 0.04);
}

.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(0, 224, 255, 0.12);
  background: #0b0f14;
  font-size: 12px;
  color: #b0bac5;
}

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

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

.input {
  background: #0b0f14;
  border-color: rgba(0, 224, 255, 0.15);
  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: rgba(0, 224, 255, 0.15);
  color: #e6edf3;
}

.button.is-dark.is-outlined {
  background: transparent;
  border-color: rgba(0, 224, 255, 0.12);
}

.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;
}

/* ── Integration detail modal ── */
.detail-section {
  margin-bottom: 20px;
}

.detail-section .section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #b0bac5;
  font-weight: 600;
  margin-bottom: 10px;
}

.detail-section hr {
  border-color: rgba(35, 42, 53, 0.6);
  margin: 20px 0;
}

.account-list {
  max-height: 340px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 224, 255, 0.2) transparent;
}

.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(15, 23, 35, 0.65);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.account-row-clickable {
  cursor: pointer;
}

.account-row-clickable:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 224, 255, 0.45);
  box-shadow: 0 0 14px rgba(0, 224, 255, 0.2), 0 6px 18px rgba(0, 0, 0, 0.3);
}

.account-row-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-row-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.env-var-info {
  padding: 10px 14px;
  background: rgba(15, 23, 35, 0.55);
  border: 1px solid rgba(0, 224, 255, 0.08);
  border-radius: 10px;
  margin-bottom: 10px;
}

/* ── Accounts view toolbar ── */
.accounts-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 2px;
}

/* ── Shared OAuth credentials section ── */
.oauth-credentials-section {
  margin-top: 28px;
  padding: 20px;
  background: rgba(12, 16, 31, 0.55);
  border: 1px solid rgba(0, 224, 255, 0.08);
  border-radius: 14px;
}

/* ── Detail table ── */
.detail-table {
  width: 100%;
  border-collapse: collapse;
}

.detail-table td {
  padding: 6px 0;
  vertical-align: top;
}

.detail-table td:first-child {
  width: 110px;
  white-space: nowrap;
  padding-right: 12px;
}

/* ── Template tag picker ── */
.template-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.template-tag {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(15, 23, 35, 0.65);
  color: #93c5fd;
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.template-tag:hover {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.1);
  color: #bfdbfe;
}

.template-tag.is-selected {
  border-color: var(--neon-cyan);
  background: rgba(0, 224, 255, 0.15);
  color: var(--neon-cyan);
  box-shadow: 0 0 8px rgba(0, 224, 255, 0.25);
  font-weight: 600;
}

/* ── Clickable metric cards ── */
.metric-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.metric-link:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 224, 255, 0.5);
  box-shadow: 0 0 20px rgba(0, 224, 255, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.metric-link:hover .metric-link-hint {
  opacity: 1;
  transform: translateY(0);
}

.metric-link-hint {
  display: block;
  font-size: 11px;
  color: var(--neon-cyan);
  margin-top: 8px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  letter-spacing: 0.04em;
}

/* ── Agent detail panel ── */
.agent-detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.agent-detail-overlay.is-active {
  display: block;
}

.agent-detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 520px;
  max-width: 90vw;
  height: 100vh;
  z-index: 101;
  background: #0f1520;
  border-left: 1px solid rgba(0, 224, 255, 0.2);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  padding: 28px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.agent-detail-panel.is-active {
  transform: translateX(0);
}

.agent-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 224, 255, 0.10);
}

.agent-detail-header h2 {
  font-family: "Orbitron", "Titillium Web", sans-serif;
  color: var(--neon-cyan);
  font-size: 18px;
  margin: 0;
}

.agent-detail-close {
  background: transparent;
  border: 1px solid rgba(0, 224, 255, 0.12);
  color: #b0bac5;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease;
}

.agent-detail-close:hover {
  border-color: rgba(239, 68, 68, 0.6);
  color: #ff9d96;
}

.agent-detail-section {
  margin-bottom: 24px;
}

.agent-detail-section .section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #b0bac5;
  margin-bottom: 12px;
  font-weight: 600;
}

.agent-detail-meta {
  display: grid;
  gap: 10px;
}

.agent-detail-meta .meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(15, 23, 35, 0.65);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 10px;
  font-size: 13px;
}

.agent-detail-meta .meta-label {
  color: #b0bac5;
}

.agent-detail-meta .meta-value {
  color: #e6edf3;
  font-weight: 600;
}

.agent-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.agent-status-badge.status-ready {
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.1);
}

.agent-status-badge.status-offline {
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
}

.agent-detail-channels {
  display: grid;
  gap: 8px;
}

.agent-detail-channel-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(15, 23, 35, 0.65);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 10px;
  font-size: 13px;
}

.agent-detail-logs {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.agent-detail-log-entry {
  padding: 10px 12px;
  background: rgba(15, 23, 35, 0.65);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 10px;
  font-size: 12px;
}

.agent-detail-log-entry .log-time {
  color: #a8b5c1;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.agent-detail-log-entry .log-message {
  color: var(--neon-cyan);
  margin-bottom: 4px;
}

.agent-detail-log-entry .log-response {
  color: #e6edf3;
}

/* ── History page ── */
.history-timeline {
  display: grid;
  gap: 12px;
}

.history-entry {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(15, 23, 35, 0.65);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 12px;
  font-size: 13px;
  transition: border-color 0.2s ease;
}

.history-entry:hover {
  border-color: rgba(0, 224, 255, 0.3);
}

.history-entry .history-time {
  color: #a8b5c1;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 2px;
}

.history-entry .history-content {
  display: grid;
  gap: 4px;
}

.history-entry .history-agent-name {
  font-weight: 600;
  color: var(--neon-cyan);
}

.history-entry .history-message {
  color: #e6edf3;
}

.history-entry .history-response {
  color: #b0bac5;
  font-size: 12px;
}

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

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

.history-stat-card {
  background: rgba(15, 23, 35, 0.65);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.history-stat-card .stat-number {
  font-size: 24px;
  font-weight: 700;
  color: var(--neon-cyan);
}

.history-stat-card .stat-desc {
  font-size: 11px;
  color: #b0bac5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.empty-history {
  text-align: center;
  padding: 60px 20px;
  color: #a8b5c1;
}

.empty-history .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.load-more-bar {
  text-align: center;
  padding: 16px;
}

/* ── Email page ── */

.email-inbox-panel {
  border: 1px solid rgba(0, 224, 255, 0.15);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(12, 16, 31, 0.82);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 200px);
  max-height: calc(100vh - 160px);
}

.email-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 224, 255, 0.10);
  flex-shrink: 0;
}

.email-toolbar .email-search {
  flex: 1;
  background: #0b0f14;
  border: 1px solid rgba(0, 224, 255, 0.15);
  border-radius: 10px;
  padding: 7px 12px;
  color: #e6edf3;
  font-size: 13px;
  font-family: inherit;
}

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

.email-account-tabs {
  display: flex;
  gap: 0;
  padding: 0 16px;
  border-bottom: 1px solid rgba(0, 224, 255, 0.10);
  flex-shrink: 0;
  overflow-x: auto;
}

.email-account-tab {
  padding: 10px 16px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #b0bac5;
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-family: inherit;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.email-account-tab:hover { color: #e6edf3; }

.email-account-tab.is-active {
  color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
}

.email-account-tab .tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0, 224, 255, 0.15);
  color: var(--neon-cyan);
  font-size: 10px;
  font-weight: 600;
  margin-left: 6px;
}

.email-scroll {
  flex: 1;
  overflow-y: auto;
}

/* Email rows */
.email-row {
  border-bottom: 1px solid rgba(0, 224, 255, 0.08);
  transition: background 0.12s ease;
}

.email-row-header {
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  cursor: pointer;
}

.email-row:hover .email-row-header {
  background: rgba(59, 130, 246, 0.08);
}

.email-row.is-expanded .email-row-header {
  background: rgba(0, 224, 255, 0.06);
  border-left: 3px solid var(--neon-cyan);
  padding-left: 13px;
}

.email-row.is-unread .email-row-header {
  background: rgba(15, 23, 35, 0.85);
}

.email-row.is-unread .email-row-subject {
  font-weight: 600;
  color: #e6edf3;
}

.email-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.email-row-from {
  font-size: 13px;
  color: #e6edf3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-row-date {
  font-size: 11px;
  color: #a8b5c1;
  white-space: nowrap;
  flex-shrink: 0;
}

.email-row-subject {
  font-size: 13px;
  color: #b0bac5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-row-snippet {
  font-size: 12px;
  color: #a8b5c1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-row-labels {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.email-label-chip {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.email-label-chip.is-promo { border-color: rgba(255, 195, 0, 0.3); color: var(--neon-amber); }
.email-label-chip.is-social { border-color: rgba(255, 138, 242, 0.3); color: var(--neon-pink); }
.email-label-chip.is-updates { border-color: rgba(170, 255, 0, 0.3); color: var(--neon-lime); }

/* Accordion */
.email-accordion {
  padding: 0 16px 16px 16px;
  border-top: 1px solid rgba(0, 224, 255, 0.08);
  background: rgba(10, 14, 26, 0.6);
}

.email-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  flex-wrap: wrap;
}

.email-accordion-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #b0bac5;
}

.email-accordion-meta strong { color: #e6edf3; }

.email-accordion-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.email-accordion-body {
  border-top: 1px solid rgba(0, 224, 255, 0.06);
  padding-top: 12px;
}

.email-accordion-iframe {
  width: 100%;
  border: none;
  min-height: 300px;
  max-height: 800px;
  background: #fff;
  border-radius: 8px;
}

.email-accordion-text {
  font-size: 14px;
  line-height: 1.6;
  color: #e6edf3;
  white-space: pre-wrap;
  word-break: break-word;
}

.email-accordion-loading {
  padding: 20px;
  color: #a8b5c1;
  font-size: 13px;
}

/* Stats bar */
.email-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.email-stat-card {
  background: rgba(12, 16, 31, 0.82);
  border: 1px solid rgba(0, 224, 255, 0.15);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 0 12px rgba(0, 224, 255, 0.08);
}

.email-stat-clickable {
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.email-stat-clickable:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 224, 255, 0.5);
  box-shadow: 0 0 20px rgba(0, 224, 255, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.email-stat-card .stat-number {
  font-size: 22px;
  font-weight: 700;
  color: var(--neon-cyan);
}

.email-stat-card .stat-desc {
  font-size: 11px;
  color: #b0bac5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* Dashboard cards */
.email-dashboard-section {
  margin-bottom: 8px;
}

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

.email-dash-card {
  display: block;
  background: rgba(12, 16, 31, 0.75);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.email-dash-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 224, 255, 0.5);
  box-shadow: 0 0 20px rgba(0, 224, 255, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.email-dash-card .dash-card-icon {
  display: block;
  font-size: 24px;
  margin-bottom: 6px;
}

.email-dash-card .dash-card-counts {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0;
}

.email-dash-card .dash-card-counts .stat-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--neon-cyan);
}

.email-dash-card .dash-card-unread {
  font-size: 11px;
  color: var(--neon-amber);
}

/* Console */
.email-console {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 14, 26, 0.95);
  border-top: 1px solid rgba(0, 224, 255, 0.15);
  backdrop-filter: blur(8px);
  z-index: 100;
  padding: 0;
}

.email-console-response {
  max-height: 120px;
  overflow-y: auto;
  padding: 0 16px;
  scrollbar-width: thin;
}

.email-console-response:empty { display: none; }

.console-msg {
  padding: 6px 0;
  font-size: 13px;
  line-height: 1.5;
}

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

.console-msg.console-agent {
  color: #e6edf3;
  border-bottom: 1px solid rgba(0, 224, 255, 0.06);
  padding-bottom: 8px;
}

.email-console-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
}

.email-console-input {
  flex: 1;
  background: #0b0f14;
  border: 1px solid rgba(0, 224, 255, 0.15);
  border-radius: 10px;
  padding: 8px 12px;
  color: #e6edf3;
  font-size: 13px;
  font-family: inherit;
}

.email-console-input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 0.125em rgba(0, 224, 255, 0.15);
}

/* Misc */
.email-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #a8b5c1;
  gap: 8px;
}

.email-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #a8b5c1;
  font-size: 13px;
}

/* ── Wellness / Sport dashboard ── */

/* Sport page: narrow sidebar, main content takes rest (wider left/content area) */
.sport-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.sport-layout .sport-sidebar { max-width: none; }
.sport-layout .sport-main { max-width: none; min-width: 0; }

/* Single 12-col grid: row1 = 6×2 (3+3), row2 = 4×3 (2+2); same tracks so right edges align */
.wellness-cards-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.wellness-cards-grid .wellness-metric-card {
  grid-column: span 2;
}

.wellness-cards-grid .wellness-vital-card {
  grid-column: span 3;
}

.wellness-cards-grid .wellness-block-card {
  grid-column: span 6;
}

.wellness-vital-card .panel-card,
.wellness-block-card .panel-card {
  height: 100%;
}

.wellness-metric-card {
  background: rgba(12, 16, 31, 0.82);
  border: 1px solid rgba(0, 224, 255, 0.15);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 0 12px rgba(0, 224, 255, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.wellness-metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 224, 255, 0.4);
}

.wellness-metric-card .metric-icon {
  font-size: 22px;
  margin-bottom: 4px;
}

.wellness-metric-card .metric-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--neon-cyan);
  line-height: 1.2;
}

.wellness-metric-card .metric-label {
  font-size: 11px;
  color: #b0bac5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.wellness-metric-card.metric-steps .metric-value { color: #4ade80; }
.wellness-metric-card.metric-energy .metric-value { color: #fb923c; }
.wellness-metric-card.metric-hr .metric-value { color: #f87171; }
.wellness-metric-card.metric-sleep .metric-value { color: #a78bfa; }

.workout-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 224, 255, 0.08);
}

.workout-row:last-child { border-bottom: none; }

.workout-info { min-width: 0; }

.workout-hr {
  flex-shrink: 0;
  font-size: 13px;
}

.history-row {
  display: grid;
  grid-template-columns: 90px 1fr 60px;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}

.history-label {
  font-size: 11px;
  color: #b0bac5;
  white-space: nowrap;
}

.history-bar-track {
  height: 8px;
  background: rgba(0, 224, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.history-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), #4ade80);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.history-value {
  font-size: 11px;
  color: #e6edf3;
  text-align: right;
  font-weight: 600;
}

/* ── Signals page ── */
.signal-feed {
  display: grid;
  gap: 8px;
}

.signal-entry {
  display: grid;
  grid-template-columns: 6px 1fr auto;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(15, 23, 35, 0.65);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease;
  align-items: start;
}

.signal-entry:hover {
  border-color: rgba(0, 224, 255, 0.3);
}

.signal-entry.is-unread {
  background: rgba(15, 23, 35, 0.85);
}

.signal-severity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 6px;
}

.signal-severity-dot.severity-critical {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.signal-severity-dot.severity-warning {
  background: var(--neon-amber);
  box-shadow: 0 0 6px rgba(255, 195, 0, 0.4);
}

.signal-severity-dot.severity-info {
  background: var(--neon-cyan);
  box-shadow: 0 0 6px rgba(0, 224, 255, 0.3);
}

.signal-body {
  display: grid;
  gap: 3px;
}

.signal-title {
  font-size: 13px;
  font-weight: 600;
  color: #e6edf3;
}

.signal-entry.is-unread .signal-title {
  color: #fff;
}

.signal-detail {
  font-size: 12px;
  color: #b0bac5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: #a8b5c1;
}

.signal-source-badge {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.signal-time {
  white-space: nowrap;
}

.signal-type-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(0, 224, 255, 0.10);
  margin-bottom: 16px;
  overflow-x: auto;
}

.signal-type-tab {
  padding: 10px 16px;
  font-size: 12px;
  color: #b0bac5;
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-family: inherit;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.signal-type-tab:hover {
  color: #e6edf3;
}

.signal-type-tab.is-active {
  color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
}

.severity-pills {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.severity-pill {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 224, 255, 0.12);
  background: rgba(15, 23, 35, 0.65);
  color: #b0bac5;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.severity-pill:hover {
  border-color: rgba(59, 130, 246, 0.4);
}

.severity-pill.is-active {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(0, 224, 255, 0.08);
}

/* ── Research page ── */
.research-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.research-search-input {
  flex: 1;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(0, 224, 255, 0.25);
  background: rgba(12, 16, 31, 0.82);
  color: #e6edf3;
  font-size: 15px;
  font-family: inherit;
  box-shadow: var(--neon-glow);
}

.research-search-input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 224, 255, 0.3);
}

.research-search-input::placeholder {
  color: #a8b5c1;
}

.research-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(0, 224, 255, 0.10);
  margin-bottom: 16px;
  overflow-x: auto;
}

.research-tab {
  padding: 10px 16px;
  font-size: 12px;
  color: #b0bac5;
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-family: inherit;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.research-tab:hover {
  color: #e6edf3;
}

.research-tab.is-active {
  color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
}

.research-results {
  display: grid;
  gap: 10px;
}

.research-result {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(15, 23, 35, 0.65);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 12px;
  transition: border-color 0.15s ease;
}

.research-result:hover {
  border-color: rgba(0, 224, 255, 0.3);
}

.research-result-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 14px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  flex-shrink: 0;
}

.research-result-icon.type-note { background: rgba(0, 224, 255, 0.1); color: var(--neon-cyan); border-color: rgba(0, 224, 255, 0.3); }
.research-result-icon.type-task { background: rgba(170, 255, 0, 0.1); color: var(--neon-lime); border-color: rgba(170, 255, 0, 0.3); }
.research-result-icon.type-email { background: rgba(255, 195, 0, 0.1); color: var(--neon-amber); border-color: rgba(255, 195, 0, 0.3); }
.research-result-icon.type-agent { background: rgba(255, 138, 242, 0.1); color: var(--neon-pink); border-color: rgba(255, 138, 242, 0.3); }
.research-result-icon.type-web { background: rgba(59, 130, 246, 0.1); color: #93c5fd; border-color: rgba(59, 130, 246, 0.3); }

.research-result-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.research-result-title {
  font-size: 13px;
  font-weight: 600;
  color: #e6edf3;
}

.research-result-title a {
  color: inherit;
  text-decoration: none;
}

.research-result-title a:hover {
  color: var(--neon-cyan);
}

.research-result-snippet {
  font-size: 12px;
  color: #b0bac5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-result-meta {
  font-size: 11px;
  color: #a8b5c1;
}

.research-web-panel {
  margin-top: 20px;
  padding: 20px;
  border-radius: 16px;
  background: rgba(12, 16, 31, 0.82);
  border: 1px solid rgba(0, 224, 255, 0.15);
}

.research-web-panel .panel-title {
  margin-bottom: 12px;
}

.research-insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.research-insight-card {
  background: rgba(15, 23, 35, 0.65);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 12px;
  padding: 16px;
}

.research-insight-card .insight-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--neon-cyan);
}

.research-insight-card .insight-label {
  font-size: 11px;
  color: #b0bac5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.research-empty {
  text-align: center;
  padding: 40px;
  color: #a8b5c1;
}

/* ── Social content module ── */

.ideas-grid {
  display: grid;
  gap: 14px;
}

.idea-card {
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.idea-card:hover {
  border-color: rgba(28, 201, 161, 0.4);
  transform: translateY(-1px);
}

.content-calendar {
  display: grid;
  gap: 2px;
}

.cal-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-header-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.cal-header-cell {
  text-align: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #b0bac5;
  padding: 6px 0;
}

.cal-cell {
  min-height: 90px;
  background: rgba(15, 23, 35, 0.65);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 8px;
  padding: 6px;
}

.cal-cell.cal-empty {
  background: transparent;
  border-color: transparent;
}

.cal-cell.cal-today {
  border-color: rgba(28, 201, 161, 0.5);
  box-shadow: 0 0 8px rgba(28, 201, 161, 0.15);
}

.cal-date {
  font-size: 12px;
  font-weight: 600;
  color: #b0bac5;
  margin-bottom: 4px;
}

.cal-today .cal-date {
  color: #1cc9a1;
}

.cal-dots {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.cal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.cal-items {
  display: grid;
  gap: 3px;
}

.cal-item {
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(12, 16, 31, 0.7);
  color: #e6edf3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cal-clickable:hover {
  border-color: rgba(28, 201, 161, 0.4);
  background: rgba(28, 201, 161, 0.06);
}

/* ── Day timeline view ── */

.day-timeline {
  display: grid;
  gap: 0;
}

.day-hour-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  min-height: 48px;
  border-bottom: 1px solid rgba(0, 224, 255, 0.08);
}

.day-hour-row.day-hour-now {
  background: rgba(28, 201, 161, 0.06);
  border-left: 2px solid #1cc9a1;
}

.day-hour-label {
  font-size: 11px;
  color: #b0bac5;
  padding: 6px 10px 6px 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  border-right: 1px solid rgba(0, 224, 255, 0.08);
}

.day-hour-now .day-hour-label {
  color: #1cc9a1;
  font-weight: 600;
}

.day-hour-content {
  padding: 4px 10px;
  display: grid;
  gap: 4px;
  align-content: start;
}

.day-item {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 35, 0.65);
  border: 1px solid rgba(0, 224, 255, 0.12);
}

.day-unscheduled {
  padding: 10px 0;
  margin-bottom: 8px;
  border-bottom: 2px solid rgba(0, 224, 255, 0.10);
  display: grid;
  gap: 6px;
}

.day-unscheduled-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #b0bac5;
  padding-left: 70px;
  margin-bottom: 2px;
}

/* ── Social channels grid (4 columns) ── */

.social-channels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 1200px) {
  .social-channels-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .social-channels-grid { grid-template-columns: repeat(2, 1fr); }
}

.social-channel-card {
  background: rgba(12, 16, 31, 0.75);
  border: 1px solid rgba(0, 224, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 0 6px rgba(0, 224, 255, 0.04);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 110px;
}

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

.social-channel-platform {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.social-channel-name {
  font-size: 14px;
  color: #e6edf3;
}

/* ── Master calendar timeline ── */

.master-cal-day {
  margin-bottom: 18px;
}

.master-cal-today {
  border-left: 2px solid var(--brand-teal);
  padding-left: 12px;
}

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

.master-cal-today .master-cal-date {
  color: var(--brand-teal-light);
}

.master-cal-items {
  display: grid;
  gap: 6px;
}

.master-cal-item {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(12, 16, 31, 0.75);
  border: 1px solid rgba(0, 224, 255, 0.12);
  box-shadow: 0 0 6px rgba(0, 224, 255, 0.04);
}
