        .hidden-upload { display: none; }
        .hud-dialog-jarvis { width: 400px; background: var(--jarvis-bg); border: 1px solid var(--jarvis-cyan); padding: 2px; box-shadow: 0 0 50px rgba(0,0,0,0.8); }
        .dialog-header-tech { padding: 15px; border-bottom: 1px solid rgba(0, 245, 212, 0.2); display: flex; justify-content: space-between; }
        .dialog-body-tech { padding: 25px; }
        .dialog-label { font-family: var(--font-mono); font-size: 9px; color: var(--jarvis-cyan); margin-bottom: 10px; opacity: 0.6; }
        .jarvis-input { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid rgba(0, 245, 212, 0.2); padding: 12px; color: #fff; font-family: var(--font-mono); outline: none; }
        .jarvis-input:focus { border-color: var(--jarvis-cyan); box-shadow: 0 0 10px rgba(0, 245, 212, 0.2); }
        .dialog-actions-tech { padding: 15px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid rgba(255,255,255,0.05); }
        .action-btn-jarvis.small { padding: 4px 10px; }

.chat-view {
  display: flex;
  height: 100%;
  overflow: visible;
}

.chat-view.blur-when-modal .conv-sidebar,
.chat-view.blur-when-modal .chat-area {
  filter: blur(8px);
  pointer-events: none;
}

.sidebar-runtime-panel {
  flex: 1;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, rgba(7, 12, 24, 0.92), rgba(7, 11, 20, 0.82));
  overflow-y: auto;
  min-height: 0;
}

.runtime-sidebar-footer {
  flex-shrink: 0;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(34, 211, 238, 0.08);
  background: linear-gradient(180deg, rgba(6, 10, 18, 0.96), rgba(5, 8, 16, 0.98));
}

.runtime-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.runtime-env-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(56, 189, 248, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(8, 18, 36, 0.78), rgba(8, 14, 26, 0.62));
}

.runtime-env-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.runtime-env-key {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: #7dd3fc;
  flex-shrink: 0;
}

.runtime-env-value {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  text-align: right;
  word-break: break-word;
}

.weather-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.weather-icon,
.weather-inline .wi {
  font-size: 16px;
  color: #7dd3fc;
  flex-shrink: 0;
}

.runtime-meta-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  background: rgba(8, 14, 26, 0.68);
}

.runtime-meta-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.runtime-meta-key {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  flex-shrink: 0;
}

.runtime-meta-value {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  text-align: right;
  word-break: break-all;
}

.runtime-card,
.runtime-activity-card {
  border: 1px solid rgba(34, 211, 238, 0.12);
  border-radius: 12px;
  background: rgba(10, 16, 30, 0.74);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  padding: 10px;
}

.runtime-topline,
.runtime-activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.runtime-label,
.runtime-activity-title,
.runtime-stat-key {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.runtime-value,
.runtime-stat-value {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

.runtime-badge {
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.cpu-card { border-color: rgba(34, 211, 238, 0.22); }
.gpu-card { border-color: rgba(244, 114, 182, 0.24); }
.mem-card { border-color: rgba(167, 139, 250, 0.22); }
.disk-card { border-color: rgba(74, 222, 128, 0.22); }
.network-card { border-color: rgba(37, 99, 235, 0.26); }

.gpu-info-copy {
  font-family: var(--font-display);
  font-size: 10px;
  line-height: 1.5;
  color: var(--text-primary);
  text-align: right;
  word-break: break-word;
}


.disk-capacity-copy {
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.gpu-info-stats {
  margin-top: 8px;
  display: grid;
  gap: 4px;
}

.gpu-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gpu-info-key {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.gpu-info-value {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--text-primary);
}

.network-metric-head,
.feed-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.network-metric-head {
  margin-bottom: 8px;
}

.network-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.network-direction {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.network-speed,
.runtime-log-count {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
}

.network-direction.up,
.network-speed.up {
  color: #2563eb;
}

.network-direction.down,
.network-speed.down {
  color: #38bdf8;
}

.network-overlay-chart {
  position: relative;
}

.network-overlay-chart :deep(svg) {
  display: block;
}

.network-overlay-chart :deep(svg + svg) {
  margin-top: -34px;
}

.runtime-feed {
  margin-top: 0;
}

.runtime-feed-launch {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(8, 16, 30, 0.9), rgba(8, 14, 26, 0.72));
  text-align: left;
  color: var(--text-primary);
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

.runtime-feed-launch:hover {
  transform: translateX(-2px);
  border-color: rgba(34, 211, 238, 0.26);
  box-shadow: 0 12px 28px rgba(4, 10, 22, 0.34), 0 0 18px rgba(34, 211, 238, 0.08);
}

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

.feed-hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.runtime-feed-launch .feed-title {
  color: var(--text-primary);
}

.runtime-feed-launch .runtime-log-count {
  color: #f8fafc;
}

.feed-launch-arrow {
  color: var(--accent-cyan);
}

.feed-empty {
  font-size: 12px;
  color: var(--text-muted);
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.feed-marker {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.2);
  flex-shrink: 0;
}

.feed-item.tool .feed-marker {
  background: var(--accent-amber);
  box-shadow: 0 0 8px rgba(249, 168, 37, 0.24);
}

.feed-item.success .feed-marker {
  background: var(--accent-green);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.24);
}

.feed-item.error .feed-marker {
  background: var(--accent-red);
  box-shadow: 0 0 8px rgba(255, 71, 87, 0.24);
}

.feed-label {
  line-height: 1.5;
}

.agent-drawer-shell {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
}

.agent-drawer-shell.open {
  pointer-events: auto;
}

.agent-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(2, 6, 14, 0.52);
  backdrop-filter: blur(4px);
}

.agent-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  transform: translateX(100%);
  transition: transform var(--transition-mid);
}

.agent-drawer.open {
  transform: translateX(0);
}

.agent-drawer :deep(.orchestration-panel) {
  height: 100%;
  padding: 12px 12px 12px 0;
}

.agent-drawer :deep(.panel-frame) {
  height: 100%;
}

.agent-drawer-close {
  position: absolute;
  top: 16px;
  right: 72px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(8, 14, 26, 0.86);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.agent-drawer-close:hover {
  border-color: rgba(34, 211, 238, 0.26);
  color: var(--accent-cyan);
  background: rgba(8, 16, 30, 0.96);
}

.knowledge-hud-shell {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 35;
}

.knowledge-hud-shell.open {
  pointer-events: auto;
}

/* Kanban Drawer (四象限任务管理) */
.kanban-drawer-shell {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 32;
}

.kanban-drawer-shell.open {
  pointer-events: auto;
}

.kanban-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(2, 6, 14, 0.52);
  backdrop-filter: blur(4px);
}

.kanban-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 900px;
  transform: translateX(100%);
  transition: transform var(--transition-mid);
}

.kanban-drawer.open {
  transform: translateX(0);
}

.kanban-drawer :deep(.kanban-panel) {
  height: 100%;
  padding: 12px 12px 12px 0;
}

.kanban-drawer :deep(.kanban-frame) {
  height: 100%;
}

.knowledge-hud-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background:
    radial-gradient(circle at top center, rgba(34, 211, 238, 0.12), transparent 32%),
    rgba(2, 6, 14, 0.68);
  backdrop-filter: blur(10px);
}

.knowledge-hud {
  position: absolute;
  inset: 26px 36px 26px 20px;
  transform: scale(0.96);
  opacity: 0;
  transition: transform var(--transition-mid), opacity var(--transition-mid);
}

.knowledge-hud.open {
  transform: scale(1);
  opacity: 1;
}

.knowledge-hud-frame {
  position: relative;
  height: 100%;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background:
    linear-gradient(180deg, rgba(8, 16, 30, 0.96), rgba(5, 10, 20, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(34, 211, 238, 0.08),
    0 24px 80px rgba(2, 6, 14, 0.54);
  overflow: hidden;
}

.knowledge-hud-frame::before,
.knowledge-hud-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.knowledge-hud-frame::before {
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.08), transparent 14%, transparent 86%, rgba(34, 211, 238, 0.08)),
    linear-gradient(180deg, rgba(34, 211, 238, 0.08), transparent 16%, transparent 84%, rgba(245, 158, 11, 0.08));
}

.knowledge-hud-frame::after {
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 24%),
    radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.08), transparent 28%);
}

.knowledge-hud-chrome {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(34, 211, 238, 0.12);
  background: linear-gradient(180deg, rgba(10, 22, 38, 0.88), rgba(8, 16, 28, 0.72));
}

.knowledge-hud-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: #c8f7ff;
  text-shadow: 0 0 14px rgba(34, 211, 238, 0.16);
}

.knowledge-hud-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(8, 14, 26, 0.78);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.knowledge-hud-close:hover {
  border-color: rgba(34, 211, 238, 0.28);
  color: var(--accent-cyan);
  background: rgba(8, 18, 32, 0.94);
}

.knowledge-hud-body {
  position: relative;
  z-index: 1;
  height: calc(100% - 63px);
  overflow: hidden;
}

.knowledge-hud-body :deep(.knowledge-view) {
  height: 100%;
  background: transparent;
}

.knowledge-hud-body :deep(.page-header) {
  padding-top: 18px;
}

@media (max-width: 960px) {
  .knowledge-hud {
    inset: 16px 14px 16px 14px;
  }
}

/* ── Conversation Sidebar ── */
.conv-sidebar {
  width: 320px;
  min-width: 320px;
  background: var(--bg-panel);
  border-right: 1px solid rgba(0, 245, 212, 0.15);
  display: flex;
  flex-direction: column;
  overflow: visible;
  border-radius: 0;
  transition: width var(--transition-mid), min-width var(--transition-mid);
}

.conv-sidebar.collapsed {
  width: 78px;
  min-width: 78px;
  border-radius: 0;
}

.runtime-sidebar {
  width: 280px;
  min-width: 280px;
  background: var(--bg-panel);
  border-left: 1px solid var(--border-dim);
  overflow: visible;
  display: flex;
  flex-direction: column;
  border-radius: 0;
}

.conv-sidebar-header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border-dim);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

.sidebar-runtime-panel .section-label {
  margin-bottom: 10px;
}

.jarvis-sidebar-scroll .section-label {
  margin-bottom: 8px;
  padding: 0 12px;
}

.conv-sidebar-header .section-label {
  margin-bottom: 0;
}

.conv-sidebar-footer {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border-dim);
}

.new-chat-btn.muted {
  background: rgba(0, 245, 212, 0.08);
}

.new-chat-btn.muted:hover {
  background: rgba(0, 245, 212, 0.14);
}

.new-chat-btn {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.new-chat-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0,245,212,0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.4s;
}

.new-chat-btn:hover::before { transform: translateX(100%); }

.new-chat-btn:hover {
  background: rgba(0, 245, 212, 0.18);
  box-shadow: var(--glow-cyan);
}

.btn-line {
  width: 1px;
  height: 12px;
  background: var(--accent-cyan);
  opacity: 0.6;
}

.conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.conv-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-bottom: 2px;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  overflow: hidden;
}

.conv-item:hover {
  background: rgba(0, 245, 212, 0.04);
  border-color: var(--border-dim);
}

.conv-item.active {
  background: var(--accent-cyan-dim);
  border-color: var(--border-mid);
}

.conv-active-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-cyan);
  opacity: 0;
  transition: opacity var(--transition-fast);
  box-shadow: 0 0 6px var(--accent-cyan);
}

.conv-item.active .conv-active-line { opacity: 1; }

.conv-item-icon {
  color: var(--text-dim);
  flex-shrink: 0;
}

.conv-item.active .conv-item-icon { color: var(--accent-cyan); }

.conv-item-body { flex: 1; min-width: 0; }

.conv-title {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--text-secondary);
}

.conv-item.active .conv-title { color: var(--accent-cyan); }

.conv-date {
  font-size: 9px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.conv-delete {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 3px;
  opacity: 0;
  transition: all var(--transition-fast);
  border-radius: 3px;
}

.conv-item:hover .conv-delete { opacity: 1; }
.conv-delete:hover { color: var(--accent-red); background: rgba(255,71,87,0.1); }

.conv-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px;
  gap: 8px;
}

.empty-icon { color: var(--text-dim); }
.empty-text { font-family: var(--font-display); font-size: 12px; color: var(--text-dim); }
.empty-hint { font-family: var(--font-display); font-size: 10px; color: var(--text-muted); }

/* ── Chat Area ── */
.chat-area {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.chat-area::before,
.chat-area::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.chat-area::before {
  background:
    linear-gradient(
      180deg,
      rgba(34, 211, 238, 0) 0%,
      rgba(34, 211, 238, 0.012) 44%,
      rgba(34, 211, 238, 0.055) 49%,
      rgba(125, 211, 252, 0.09) 50%,
      rgba(34, 211, 238, 0.055) 51%,
      rgba(34, 211, 238, 0.012) 56%,
      rgba(34, 211, 238, 0) 100%
    );
  transform: translateY(-100%);
  opacity: 0.62;
  filter: blur(1.5px);
  animation: chat-scan-sweep 10.5s ease-in-out infinite;
}

.chat-area::after {
  background:
    repeating-linear-gradient(
      180deg,
      rgba(125, 211, 252, 0.012) 0px,
      rgba(125, 211, 252, 0.012) 0.5px,
      transparent 0.5px,
      transparent 6px
    );
  opacity: 0.18;
  animation: chat-scan-drift 14s linear infinite;
}

.chat-shell {
  display: flex;
  height: 100%;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.chat-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 1200px) {
  .runtime-sidebar {
    width: 240px;
    min-width: 240px;
  }
}

@media (max-width: 960px) {
  .chat-view {
    flex-direction: column;
  }

  .conv-sidebar,
  .runtime-sidebar {
    width: 100%;
    min-width: 0;
  }

  .conv-sidebar {
    max-height: 220px;
    border-right: none;
    border-bottom: 1px solid var(--border-dim);
  }

  .runtime-sidebar {
    max-height: 260px;
    border-left: none;
    border-top: 1px solid var(--border-dim);
  }
}

.chat-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border-dim);
  background: rgba(5, 8, 16, 0.6);
  backdrop-filter: blur(8px);
}

.chat-shortcuts {
  display: flex;
  align-items: center;
  min-width: 0;
}


.chat-model-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-model-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.chat-model-select {
  min-width: 220px;
  padding: 7px 12px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 10px;
  background: rgba(10, 16, 28, 0.92);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
}

.chat-model-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.chat-model-display {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--accent-amber);
  padding: 3px 10px;
  border: 1px solid rgba(249, 168, 37, 0.2);
  border-radius: 20px;
  background: var(--accent-amber-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.chat-model-display span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Messages ── */
.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Welcome screen */
.welcome-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-bottom: 80px;
}

.welcome-icon {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.welcome-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--accent-cyan);
  animation: spin linear infinite;
}

.r1 { width: 80px; height: 80px; opacity: 0.3; animation-duration: 8s; border-style: dashed; }
.r2 { width: 60px; height: 60px; opacity: 0.5; animation-duration: 5s; animation-direction: reverse; }
.r3 { width: 40px; height: 40px; opacity: 0.7; animation-duration: 3s; }

.welcome-core {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 12px var(--accent-cyan));
  animation: pulse-glow 2s ease-in-out infinite;
}

.welcome-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--accent-cyan);
  text-shadow: var(--glow-cyan);
}

.welcome-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.welcome-hint {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 20px;
}

/* Message rows */
.message-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  animation: fade-in-up 0.3s ease both;
}

.message-row.user {
  flex-direction: row-reverse;
}

.message-row.assistant {
  justify-content: flex-start;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 4px;
}

.user .msg-avatar {
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid var(--border-mid);
  color: var(--accent-cyan);
}

.assistant .msg-avatar {
  background: linear-gradient(135deg, var(--accent-cyan-dim), var(--accent-purple-dim));
  border: 1px solid var(--border-bright);
  color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan-glow);
}

.msg-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: min(75%, 820px);
}

.user .msg-content {
  align-items: flex-end;
}

.assistant .msg-content {
  align-items: flex-start;
}

.msg-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.user .msg-meta {
  justify-content: flex-end;
}

.msg-role {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

.msg-model {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-cyan);
  letter-spacing: 0.08em;
}

.msg-time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
}

.msg-bubble {
  display: inline-block;
  max-width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.65;
  word-break: break-word;
  white-space: pre-wrap;
}

.user .msg-bubble {
  background: var(--accent-cyan-dim);
  border: 1px solid rgba(0, 245, 212, 0.2);
  border-radius: var(--radius-md) var(--radius-md) 4px var(--radius-md);
  color: var(--text-primary);
}

.assistant .msg-bubble {
  background: rgba(13, 21, 37, 0.8);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 4px;
  color: var(--text-secondary);
  backdrop-filter: blur(4px);
}

.think-panel {
  margin-bottom: 8px;
}

.think-summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.think-summary::-webkit-details-marker {
  display: none;
}

.think-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background: linear-gradient(135deg, rgba(40, 24, 68, 0.72), rgba(18, 24, 48, 0.72));
  color: #c4b5fd;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 0 12px rgba(167, 139, 250, 0.08);
}

.think-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.think-content {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(167, 139, 250, 0.14);
  border-radius: 12px;
  background: rgba(18, 20, 34, 0.55);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.think-block {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
}

.markdown-body :deep(p),
.think-block :deep(p) {
  margin: 0;
}

.markdown-body :deep(p + p),
.think-block :deep(p + p) {
  margin-top: 10px;
}

.markdown-body :deep(.md-heading),
.think-block :deep(.md-heading) {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
}

.markdown-body :deep(.md-list),
.think-block :deep(.md-list) {
  margin: 0;
  padding-left: 18px;
}

.markdown-body :deep(.md-list li),
.think-block :deep(.md-list li) {
  margin: 4px 0;
}

.markdown-body :deep(code),
.think-block :deep(code) {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.14);
  font-family: var(--font-mono);
  font-size: 12px;
}

.markdown-body :deep(.md-pre),
.think-block :deep(.md-pre) {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(5, 10, 20, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.12);
  overflow-x: auto;
}

.markdown-body :deep(.md-pre code),
.think-block :deep(.md-pre code) {
  padding: 0;
  background: transparent;
}

.markdown-body :deep(.md-table-wrap),
.think-block :deep(.md-table-wrap) {
  width: 100%;
  overflow-x: auto;
  margin: 2px 0;
  border-radius: 10px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  background: rgba(5, 10, 20, 0.46);
}

.markdown-body :deep(.md-table),
.think-block :deep(.md-table) {
  width: 100%;
  min-width: 320px;
  border-collapse: collapse;
  font-size: 12px;
}

.markdown-body :deep(.md-table th),
.markdown-body :deep(.md-table td),
.think-block :deep(.md-table th),
.think-block :deep(.md-table td) {
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  text-align: left;
  vertical-align: top;
}

.markdown-body :deep(.md-table th),
.think-block :deep(.md-table th) {
  background: rgba(34, 211, 238, 0.1);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.markdown-body :deep(.md-table tbody tr:nth-child(even)),
.think-block :deep(.md-table tbody tr:nth-child(even)) {
  background: rgba(148, 163, 184, 0.04);
}

.think-panel[open] .think-chip {
  border-color: rgba(167, 139, 250, 0.3);
  color: #ddd6fe;
}

.think-panel[open] .think-chip-dot {
  animation: pulse-glow 1.4s ease-in-out infinite;
}

/* Typing indicator */
.thinking-row {
  padding-top: 2px;
}

.thinking-bubble {
  min-width: 280px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(12, 20, 36, 0.92), rgba(16, 18, 34, 0.84));
  border-color: rgba(34, 211, 238, 0.18);
}

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

.thinking-core {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.thinking-ring,
.thinking-dot {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.thinking-ring {
  border: 1px solid rgba(34, 211, 238, 0.45);
}

.ring-1 {
  animation: spin 2.6s linear infinite;
}

.ring-2 {
  inset: 4px;
  border-color: rgba(167, 139, 250, 0.38);
  animation: spin 1.8s linear infinite reverse;
}

.ring-3 {
  inset: 8px;
  border-color: rgba(245, 158, 11, 0.36);
  animation: pulse-glow 1.4s ease-in-out infinite;
}

.thinking-dot {
  inset: 11px;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.7);
}

.thinking-copy {
  min-width: 0;
  flex: 1;
}

.thinking-title {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent-cyan);
}

.thinking-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-dim);
}

.typing .dot,
.typing-inline .dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-cyan);
  margin: 0 2px;
  animation: typing-bounce 1.2s ease-in-out infinite;
}

.typing-inline {
  flex-shrink: 0;
  white-space: nowrap;
}

.typing .dot:nth-child(2),
.typing-inline .dot:nth-child(2) { animation-delay: 0.2s; }
.typing .dot:nth-child(3),
.typing-inline .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

@keyframes chat-scan-sweep {
  0% { transform: translateY(-100%); opacity: 0; }
  12% { opacity: 0.38; }
  50% { opacity: 0.62; }
  88% { opacity: 0.38; }
  100% { transform: translateY(100%); opacity: 0; }
}

@keyframes chat-scan-drift {
  0% { transform: translateY(0); }
  100% { transform: translateY(12px); }
}

/* ── Top Buttons Row ── */
.top-buttons-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 8px 24px 6px;
  border-top: 1px solid rgba(0, 245, 212, 0.15);
  background: linear-gradient(180deg, transparent 0%, rgba(0, 245, 212, 0.03) 100%);
}

.top-action-btn {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 245, 212, 0.3);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.top-action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.top-action-btn:hover::before {
  opacity: 1;
}

.top-action-btn:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.5), inset 0 0 8px rgba(0, 245, 212, 0.15);
}

.top-action-btn:hover .btn-icon {
  animation: glitch 0.3s ease;
}

.top-action-btn:active {
  transform: scale(0.9);
}

.top-action-btn .btn-icon {
  font-size: 18px;
  font-weight: bold;
  filter: drop-shadow(0 0 4px rgba(0, 245, 212, 0.9));
}

/* Temple icon - diamond pattern */
.top-action-btn:nth-child(1) .btn-icon {
  animation: pulseRotate 4s ease-in-out infinite;
}

/* Knowledge icon - expanding ring */
.top-action-btn:nth-child(2) .btn-icon {
  animation: expandPulse 3s ease-in-out infinite;
}

/* War Room icon - hexagon scan */
.top-action-btn:nth-child(3) .btn-icon {
  animation: scanRotate 3.5s linear infinite;
}

@keyframes glitch {
  0% { transform: translate(0); filter: drop-shadow(0 0 4px rgba(0, 245, 212, 0.9)); }
  20% { transform: translate(-2px, 1px); filter: drop-shadow(0 0 6px rgba(0, 245, 212, 1)); }
  40% { transform: translate(2px, -1px); filter: drop-shadow(0 0 3px rgba(0, 245, 212, 0.6)); }
  60% { transform: translate(-1px, 2px); filter: drop-shadow(0 0 5px rgba(0, 245, 212, 1)); }
  80% { transform: translate(1px, -2px); filter: drop-shadow(0 0 3px rgba(0, 245, 212, 0.7)); }
  100% { transform: translate(0); filter: drop-shadow(0 0 4px rgba(0, 245, 212, 0.9)); }
}

@keyframes pulseRotate {
  0%, 100% { transform: rotate(0deg) scale(1); opacity: 1; }
  50% { transform: rotate(180deg) scale(1.1); opacity: 0.8; }
}

@keyframes expandPulse {
  0%, 100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 4px rgba(0, 245, 212, 0.9)); }
  50% { transform: scale(1.15); opacity: 0.7; filter: drop-shadow(0 0 8px rgba(0, 245, 212, 1)); }
}

@keyframes scanRotate {
  0% { transform: rotate(0deg); filter: hue-rotate(0deg) drop-shadow(0 0 4px rgba(0, 245, 212, 0.9)); }
  50% { filter: hue-rotate(30deg) drop-shadow(0 0 6px rgba(0, 245, 212, 1)); }
  100% { transform: rotate(360deg); filter: hue-rotate(0deg) drop-shadow(0 0 4px rgba(0, 245, 212, 0.9)); }
}

/* ── Input Area ── */
.input-area {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border-dim);
  background: rgba(5, 8, 16, 0.8);
  backdrop-filter: blur(12px);
}

.input-frame {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  transition: all var(--transition-mid);
}

.input-frame:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 1px rgba(0,245,212,0.1), var(--glow-cyan);
}

/* Corner accents */
.input-corners {
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
}
.input-corners::before,
.input-corners::after {
  content: '';
  position: absolute;
  background: var(--accent-cyan);
}
.input-corners::before { width: 100%; height: 1px; }
.input-corners::after { width: 1px; height: 100%; }
.tl { top: -1px; left: -1px; }
.tr { top: -1px; right: -1px; transform: scaleX(-1); }
.bl { bottom: -1px; left: -1px; transform: scaleY(-1); }
.br { bottom: -1px; right: -1px; transform: scale(-1); }

.input-frame textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  max-height: 120px;
  padding: 8px 0;
  vertical-align: middle;
  overflow: hidden;
}

.input-frame textarea::placeholder { color: var(--text-dim); }

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--text-muted);
  border: 1px solid transparent;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  transition: all var(--transition-fast);
}

.send-btn.active {
  background: var(--accent-cyan-dim);
  border-color: var(--border-mid);
  color: var(--accent-cyan);
}

.send-btn.active:hover {
  background: rgba(0, 245, 212, 0.2);
  box-shadow: var(--glow-cyan);
  transform: scale(1.05);
}

.enter-hint { display: none; }

.input-hints {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-left: 4px;
}

.hint-item {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.hint-sep {
  color: var(--text-muted);
  font-size: 9px;
}

/* File attachment button */
.attach-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.attach-btn:hover {
  background: var(--accent-cyan-dim);
  border-color: var(--border-mid);
  color: var(--accent-cyan);
}

/* Emoji button */
.emoji-wrapper {
  position: relative;
}
.emoji-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.emoji-btn:hover,
.emoji-btn.active {
  background: var(--accent-cyan-dim);
  border-color: var(--border-mid);
  color: var(--accent-cyan);
}

/* Message attachments */
.msg-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* ── JARVIS SIDEBAR STYLES ── */
.jarvis-sidebar {
  background: rgba(4, 10, 20, 0.95) !important;
  padding: 10px !important;
  gap: 12px;
}

.jarvis-panel {
  background: rgba(0, 20, 40, 0.5);
  border: 1px solid rgba(0, 243, 255, 0.15);
  padding: 12px;
  margin-bottom: 12px;
  position: relative;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.jarvis-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 6px; height: 6px;
  border-left: 1px solid #00f3ff; border-top: 1px solid #00f3ff;
}

.jarvis-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.jarvis-date-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: #00f3ff;
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.jarvis-month {
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0.6;
  letter-spacing: 0.1em;
}

.jarvis-time {
  font-family: var(--font-mono);
  font-size: 14px;
  color: #c8f7ff;
}

.jarvis-calendar {
  border-top: 1px solid rgba(0, 243, 255, 0.1);
  padding-top: 8px;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 9px;
  text-align: center;
  opacity: 0.4;
  margin-bottom: 4px;
}

.calendar-header .is-weekend {
  opacity: 1;
  color: rgba(0, 243, 255, 0.75);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 243, 255, 0.4);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  text-align: center;
}

.calendar-day {
  padding: 3px 0;
  border-radius: 2px;
  color: rgba(0, 243, 255, 0.4);
  position: relative;
}

.calendar-day.active {
  background: #00f3ff;
  color: #000;
  font-weight: 800;
  box-shadow: 0 0 10px #00f3ff;
}

.jarvis-section-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(0, 243, 255, 0.6);
  margin-bottom: 8px;
  padding-left: 4px;
}

.jarvis-conv-list {
  padding: 0 !important;
  margin-bottom: 10px;
}

.jarvis-session-item {
  background: rgba(0, 243, 255, 0.03) !important;
  border-left: 2px solid transparent !important;
  border-bottom: 1px solid rgba(0, 243, 255, 0.05) !important;
  margin-bottom: 4px !important;
  border-radius: 0 !important;
  transition: all 0.3s;
}

.jarvis-session-item:hover {
  background: rgba(0, 243, 255, 0.08) !important;
  padding-left: 14px !important;
}

.jarvis-session-item.active {
  background: rgba(0, 243, 255, 0.12) !important;
  border-left-color: #00f3ff !important;
  box-shadow: inset 4px 0 15px rgba(0, 243, 255, 0.05);
}

.jarvis-text-glow {
  text-shadow: 0 0 8px rgba(0, 243, 255, 0.4);
}

.jarvis-section-title {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #00f3ff;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(0, 243, 255, 0.1);
  padding-bottom: 4px;
}

.jarvis-progress-item {
  margin-bottom: 6px;
}

.jarvis-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  font-family: var(--font-mono);
  opacity: 0.7;
  margin-bottom: 4px;
}

.jarvis-progress-bar {
  height: 3px;
  background: rgba(0, 243, 255, 0.1);
  width: 100%;
}

.jarvis-progress-fill {
  height: 100%;
  background: #00f3ff;
  box-shadow: 0 0 10px #00f3ff;
}

.jarvis-plan-list {
  list-style: none;
  font-size: 10px;
}

.jarvis-plan-item {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  opacity: 0.8;
}

.jarvis-plan-item .num {
  color: #00f3ff;
  font-weight: bold;
}

.jarvis-new-btn {
  background: rgba(0, 243, 255, 0.1) !important;
  border: 1px solid rgba(0, 243, 255, 0.3) !important;
  color: #00f3ff !important;
  font-family: var(--font-display);
  height: 36px;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.05);
}

.jarvis-new-btn:hover {
  background: rgba(0, 243, 255, 0.2) !important;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.15);
}

.conv-sidebar-footer {
  border-top: 1px solid rgba(0, 243, 255, 0.1) !important;
}

/* ── COMMANDER CARDS ── */
.jarvis-commander-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.commander-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(0, 243, 255, 0.02);
  border: 1px solid rgba(0, 243, 255, 0.1);
  color: #00f3ff;
  text-align: left;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  border-radius: 2px;
}

.commander-card:hover {
  background: rgba(0, 243, 255, 0.08);
  border-color: rgba(0, 243, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
  transform: translateY(-2px);
}

/* Internal Glow */
.commander-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 243, 255, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}
.commander-card:hover .commander-glow { opacity: 1; }

/* Scanning Line */
.commander-scan {
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.1), transparent);
  transition: none;
}
.commander-card:hover .commander-scan {
  animation: commander-scan-move 1.5s infinite;
}

@keyframes commander-scan-move {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Icon Box */
.commander-icon-box {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 243, 255, 0.05);
  border: 1px solid rgba(0, 243, 255, 0.2);
  position: relative;
  z-index: 1;
}

.commander-info { position: relative; z-index: 1; flex: 1; }
.commander-title { font-size: 14px; font-weight: 700; letter-spacing: 0.02em; margin-bottom: 2px; }
.commander-status { font-family: var(--font-mono); font-size: 8px; opacity: 0.5; letter-spacing: 0.15em; }

/* Corner Accents */
.commander-corner {
  position: absolute; width: 4px; height: 4px;
  border: 1px solid #00f3ff;
}
.commander-corner.top-r { top: 0; right: 0; border-left: none; border-bottom: none; }
.commander-corner.bottom-l { bottom: 0; left: 0; border-right: none; border-top: none; }

/* Theme Colors */
.commander-card.schedule { color: #fbbf24; border-color: rgba(245, 158, 11, 0.1); }
.commander-card.schedule:hover { border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.08); }
.commander-card.schedule .commander-icon-box { background: rgba(245, 158, 11, 0.05); border-color: rgba(245, 158, 11, 0.2); }
.commander-card.schedule .commander-corner { border-color: #fbbf24; }
.commander-card.schedule .commander-glow { background: radial-gradient(circle at center, rgba(245, 158, 11, 0.15), transparent 70%); }

.commander-card.code { color: #a78bfa; border-color: rgba(167, 139, 250, 0.1); }
.commander-card.code:hover { border-color: rgba(167, 139, 250, 0.4); background: rgba(167, 139, 250, 0.08); }
.commander-card.code .commander-icon-box { background: rgba(167, 139, 250, 0.05); border-color: rgba(167, 139, 250, 0.2); }
.commander-card.code .commander-corner { border-color: #a78bfa; }
.commander-card.code .commander-glow { background: radial-gradient(circle at center, rgba(167, 139, 250, 0.15), transparent 70%); }

/* ── RSS FEED ── */
.jarvis-rss-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rss-item {
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.4;
  color: rgba(200, 247, 255, 0.7);
  padding: 4px;
  border-left: 1px solid rgba(0, 243, 255, 0.2);
  transition: color 0.2s;
}

.rss-item:hover {
  color: #00f3ff;
  background: rgba(0, 243, 255, 0.05);
}

.limited-height {
  max-height: 120px;
  overflow-y: auto;
}


/* Sidebar overrides */
.jarvis-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-panel) !important;
  padding: 0 !important;
  border-right: 1px solid rgba(0, 245, 212, 0.15);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.3);
  overflow: visible;
}

.jarvis-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 245, 212, 0.015) 2px,
    rgba(0, 245, 212, 0.015) 4px
  );
  opacity: 0.5;
  pointer-events: none;
}

.jarvis-sidebar-toggle {
  position: absolute;
  top: 22px;
  right: -14px;
  z-index: 4;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 2px;
  border: 1px solid rgba(0, 245, 212, 0.2);
  background: var(--bg-panel);
  color: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.jarvis-sidebar-toggle:hover {
  border-color: rgba(0, 245, 212, 0.3);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.2);
}

.jarvis-sidebar-toggle-icon {
  transition: transform var(--transition-fast);
}

.jarvis-sidebar-toggle-icon.expanded {
  transform: rotate(180deg);
}

.jarvis-sidebar-scroll {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  gap: 8px;
  padding: 14px 12px 16px;
  overflow-y: auto;
}

.jarvis-sidebar-icon-rail {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 56px 8px 14px;
}

.jarvis-sidebar-icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  border: 1px solid rgba(0, 245, 212, 0.2);
  background: rgba(0, 245, 212, 0.05);
  color: var(--accent-cyan);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.jarvis-sidebar-icon-btn:hover {
  border-color: rgba(0, 245, 212, 0.35);
  background: rgba(0, 245, 212, 0.15);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.3);
  transform: scale(1.05);
}

.jarvis-sidebar .jarvis-panel {
  background: linear-gradient(180deg, rgba(8, 18, 36, 0.78), rgba(8, 14, 26, 0.62)) !important;
  border: 1px solid rgba(56, 189, 248, 0.14) !important;
  border-radius: 12px;
  padding: 12px 10px 11px;
  margin-bottom: 0;
  position: relative;
  overflow: visible !important;
  flex-shrink: 0;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
  clip-path: none !important;
}

.jarvis-sidebar .jarvis-panel::before {
  display: none;
}

.jarvis-date-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.jarvis-location {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.location-icon {
  font-size: 20px;
  color: rgba(223, 247, 255, 0.9);
  flex-shrink: 0;
}

.location-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.location-name {
  font-size: 12px;
  font-weight: 500;
  color: rgba(223, 247, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-weather-text {
  font-size: 11px;
  font-weight: 400;
  color: rgba(160, 232, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jarvis-date-num {
  min-width: 62px;
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
  font-weight: 800;
  color: #dff7ff;
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.18);
}

.jarvis-date-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
}

.jarvis-month {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: none;
  color: rgba(160, 232, 255, 0.72);
}

.jarvis-time {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(224, 248, 255, 0.86);
}

.jarvis-calendar {
  border-top: 1px solid rgba(73, 208, 255, 0.12);
  padding-top: 12px;
}

.calendar-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.calendar-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(224, 248, 255, 0.86);
}

.calendar-time {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(0, 243, 255, 0.6);
}

.jarvis-date-panel {
  min-height: 258px;
}

.calendar-header,
.calendar-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-header {
  display: grid;
  gap: 6px;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: center;
  color: rgba(153, 199, 220, 0.52);
}

.calendar-grid {
  display: grid;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: center;
  grid-auto-rows: minmax(28px, auto);
}

.calendar-day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(73, 208, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(208, 240, 252, 0.68);
  transition: none;
}

.calendar-day.muted {
  background: transparent;
  color: transparent;
  border-color: transparent;
}

.calendar-day.busy::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.66);
}

.calendar-day.active {
  color: #04131f;
  background: linear-gradient(135deg, #7dd3fc, #38bdf8);
  border-color: rgba(125, 211, 252, 0.78);
  font-weight: 700;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.22);
  cursor: pointer;
}

.calendar-day.selected:not(.active) {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.15);
}

.calendar-day.clickable {
  cursor: pointer;
}

.calendar-day.clickable:hover:not(.active) {
  border-color: rgba(0, 243, 255, 0.4);
  background: rgba(0, 243, 255, 0.08);
}

.calendar-day.active:hover {
  /* Keep original blue, no hover effect */
}

.conv-indicator {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px rgba(0, 243, 255, 0.6);
}

.calendar-day.active.busy::after {
  background: rgba(4, 19, 31, 0.88);
  box-shadow: none;
}

.jarvis-plan-panel {
  flex: 0 0 auto;
  min-height: 156px;
}

.jarvis-focus-panel {
  display: flex;
  flex-direction: column;
  min-height: 140px;
  max-height: 180px;
}

.jarvis-review-panel {
  display: flex;
  flex-direction: column;
  min-height: 228px;
  flex: 1 1 auto;
  max-height: none;
}

.jarvis-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 0;
  border-bottom: none;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #e8fbff;
}

.jarvis-section-title::before {
  content: '';
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7dd3fc, #0ea5e9);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.34);
}

.jarvis-status-shell {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 108px;
}

.jarvis-progress-ring {
  --completion: 0%;
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: conic-gradient(#38bdf8 var(--completion), rgba(255, 255, 255, 0.08) 0);
  display: flex;
  align-items: center;
  justify-content: center;
}

.jarvis-progress-ring::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(4, 12, 24, 0.98), rgba(8, 18, 34, 0.98));
  border: 1px solid rgba(73, 208, 255, 0.08);
}

.jarvis-progress-core {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.jarvis-progress-core strong {
  font-family: var(--font-display);
  font-size: 20px;
  color: #ecfeff;
}

.jarvis-progress-core span {
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  color: rgba(155, 231, 255, 0.54);
}

.jarvis-status-copy {
  min-width: 0;
}

.jarvis-status-headline {
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(226, 248, 255, 0.84);
}

.jarvis-status-list,
.jarvis-focus-list,
.jarvis-review-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.jarvis-status-list {
  display: grid;
  gap: 8px;
}

.jarvis-status-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.done { background: #22c55e; }
.status-dot.doing { background: #f59e0b; }
.status-dot.pending { background: #ef4444; }
.status-dot.total { background: #38bdf8; }

.jarvis-status-item.is-total {
  border-top: 1px solid rgba(56, 189, 248, 0.2);
  padding-top: 8px;
  margin-top: 2px;
}

.status-label {
  color: rgba(178, 220, 236, 0.72);
}

.status-value {
  font-family: var(--font-mono);
  color: #f4fbff;
}

.jarvis-focus-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.jarvis-focus-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: transparent;
}

.jarvis-focus-item.is-doing { background: rgba(250, 204, 21, 0.08); }
.jarvis-focus-item.is-pending { background: rgba(251, 113, 133, 0.06); }
.jarvis-focus-item.is-done { background: rgba(74, 222, 128, 0.06); }

.jarvis-focus-item.is-done .focus-order.is-done {
  background: rgba(74, 222, 128, 0.15);
  color: #22c55e;
}

.focus-check {
  font-size: 12px;
  font-weight: 700;
}

.focus-title.is-done {
  text-decoration: line-through;
  opacity: 0.6;
}

.focus-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
  color: #8de7ff;
  font-family: var(--font-mono);
  font-size: 10px;
  flex-shrink: 0;
}

.focus-copy {
  min-width: 0;
}

.focus-label {
  display: none;
}

.focus-title {
  font-size: 12px;
  color: #eefbff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.focus-meta {
  display: none;
}

.jarvis-review-group + .jarvis-review-group {
  margin-top: 14px;
}

.jarvis-review-group {
  min-height: 0;
}

.jarvis-review-subtitle {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #9be7ff;
}

.jarvis-review-list {
  display: grid;
  gap: 8px;
  max-height: 116px;
  overflow-y: auto;
  padding-right: 4px;
}

.jarvis-review-item {
  position: relative;
  padding-left: 14px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(226, 248, 255, 0.74);
}

.jarvis-review-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(125, 211, 252, 0.9);
}

.jarvis-review-list.reflection .jarvis-review-item::before {
  background: rgba(251, 191, 36, 0.9);
}

.jarvis-empty-state {
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(73, 208, 255, 0.16);
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px;
  line-height: 1.6;
  color: rgba(178, 220, 236, 0.62);
}

.chat-intel-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 24px 11px;
  border-bottom: 1px solid rgba(34, 211, 238, 0.08);
  background: linear-gradient(180deg, rgba(5, 10, 19, 0.92), rgba(4, 9, 17, 0.8));
  overflow: hidden;
}

.chat-intel-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(125, 211, 252, 0.76);
  white-space: nowrap;
}

.chat-intel-marquee {
  position: relative;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.chat-intel-track {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  min-width: max-content;
  padding-right: 28px;
  animation: intel-marquee 34s linear infinite;
}

.chat-intel-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.chat-intel-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.55);
}

.chat-intel-item-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(125, 211, 252, 0.62);
  text-transform: uppercase;
}

.chat-intel-item-title {
  font-size: 12px;
  color: rgba(232, 251, 255, 0.82);
}

@keyframes intel-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 960px) {
  .jarvis-sidebar {
    max-height: 320px;
  }

  .jarvis-sidebar-toggle {
    top: 18px;
    right: -12px;
    width: 26px;
    height: 26px;
  }

  .jarvis-sidebar-scroll {
    max-height: 320px;
  }

  .jarvis-date-panel {
    min-height: 258px;
  }

  .jarvis-focus-panel,
  .jarvis-review-panel,
  .jarvis-feed-panel {
    max-height: none;
  }

  .chat-intel-strip {
    padding-inline: 16px;
  }

  .chat-intel-label {
    display: none;
  }
}

