/* Agent selector in satellite launch prompt */
.satellite-agent-field {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.satellite-agent-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.satellite-agent-select {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text);
  font-size: var(--text-sm);
}

.satellite-agent-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Agent badge on satellite items */
.satellite-agent-badge {
  font-size: 11px;
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  background: var(--accent-10);
  color: var(--accent);
  border: 1px solid var(--accent-20, rgba(255,255,255,0.1));
}

/* ============================================
   NAV TABS (Sessions / Agents toggle)
   ============================================ */

.satellite-nav-tabs {
  display: flex;
  gap: 0;
}

.satellite-nav-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.satellite-nav-tab:hover {
  color: var(--text);
}

.satellite-nav-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Tab content areas */
.satellite-tab-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.agents-tab-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ============================================
   AGENTS MODULE STYLES
   ============================================ */

/* Loading state */
.agents-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.agents-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}

/* Empty state */
.agents-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6);
  color: var(--text-muted);
}

.agents-empty-icon {
  font-size: var(--text-3xl);
  opacity: 0.5;
}

.agents-empty-text {
  font-size: var(--text-sm);
}

/* List header */
.agents-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--white-05);
}

.agents-list-count {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.agents-refresh-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: var(--text-base);
  padding: var(--space-1);
  border-radius: var(--radius-md);
  transition: color 0.15s, background 0.15s;
}

.agents-refresh-btn:hover {
  color: var(--text);
  background: var(--white-05);
}

/* Agent list */
.agents-list {
  flex: 1;
  overflow-y: auto;
}

/* Agent item */
.agent-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--white-05);
}

.agent-item:hover {
  background: var(--white-05);
}

.agent-item:last-child {
  border-bottom: none;
}

.agent-item-emoji {
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.agent-item-avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
}

.agent-list-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.agent-item-info {
  flex: 1;
  min-width: 0;
}

.agent-item-name-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.agent-item-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-item-theme {
  font-size: var(--text-xs);
  color: var(--text-secondary, var(--text-muted));
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.7;
}

.agent-item-meta {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.agent-meta-sep {
  opacity: 0.4;
}

.agent-item-chevron {
  color: var(--text-muted);
  font-size: var(--text-lg);
  flex-shrink: 0;
  opacity: 0.5;
}

/* Agent badges */
.agent-badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

.agent-badge-default {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent);
}

.agent-badge-sandbox {
  background: rgba(245, 158, 11, 0.2);
  color: rgb(245, 158, 11);
}

.agent-badge-partial {
  background: rgba(245, 158, 11, 0.1);
  color: rgb(217, 147, 38);
}

.agent-badge-off {
  background: var(--white-05);
  color: var(--text-muted);
}

/* ============================================
   AGENT DETAIL VIEW
   ============================================ */

.agent-detail {
  padding: 0;
  font-family: var(--font-sans);
  color: var(--text);
}

.agents-tab-content,
.agents-list,
.agent-detail {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-30) transparent;
}

.agents-tab-content::-webkit-scrollbar,
.agents-list::-webkit-scrollbar,
.agent-detail::-webkit-scrollbar {
  width: 8px;
}

.agents-tab-content::-webkit-scrollbar-track,
.agents-list::-webkit-scrollbar-track,
.agent-detail::-webkit-scrollbar-track {
  background: transparent;
}

.agents-tab-content::-webkit-scrollbar-thumb,
.agents-list::-webkit-scrollbar-thumb,
.agent-detail::-webkit-scrollbar-thumb {
  background: var(--accent-30);
  border-radius: var(--radius-full);
}

.agents-tab-content::-webkit-scrollbar-thumb:hover,
.agents-list::-webkit-scrollbar-thumb:hover,
.agent-detail::-webkit-scrollbar-thumb:hover {
  background: var(--accent-50);
}

/* Hero banner � 1:1 square avatar */
.agent-detail-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 400px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-input, #1a1a2e);
}

.agent-detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  background: var(--bg-input, #1a1a2e);
}

.agent-detail-hero-fallback {
  font-size: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-input, #1a1a2e) 0%, var(--accent-bg, rgba(120,90,255,0.15)) 100%);
}

.agent-detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(0,0,0,0.75) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
}

.agent-detail-hero-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.agent-detail-hero .agent-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  border-radius: 0;
}

.agent-detail-hero:hover .agent-avatar-overlay {
  opacity: 1;
}

.agent-avatar-remove {
  position: absolute;
  top: var(--space-2, 8px);
  right: var(--space-2, 8px);
  z-index: 10;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  pointer-events: auto;
}

.agent-detail-hero:hover .agent-avatar-remove {
  opacity: 1;
}

.agent-avatar-remove:hover {
  background: var(--danger, #e74c3c);
}

.agent-detail-hero .agent-badge-default {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-4);
}

.agent-detail-hero-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.agent-detail-back {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  font-size: var(--text-sm);
  padding: var(--space-1) var(--space-2);
  border-radius: 6px;
  transition: background 0.15s;
  backdrop-filter: blur(4px);
}

.agent-detail-back:hover {
  background: rgba(0, 0, 0, 0.6);
}

/* Danger zone � bottom of detail page */
.agent-detail-danger-zone {
  padding: var(--space-4);
  border-top: 1px solid var(--white-05);
  display: flex;
  justify-content: center;
}

.agent-detail-delete {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  cursor: pointer;
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-4);
  border-radius: 6px;
  transition: background 0.15s, border-color 0.15s;
  width: 100%;
}

.agent-detail-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
}

.agent-detail-name {
  display: block;
  font-weight: 700;
  font-size: var(--text-lg, 1.125rem);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.agent-detail-hero-info .agent-detail-id {
  display: block;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.7);
  font-family: var(--font-mono);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.agent-detail-theme-block {
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--white-05);
}

.agent-detail-theme {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}

/* Legacy agent avatar upload (for list view) */
.agent-avatar-upload {
  position: relative;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  max-width: 48px;
  max-height: 48px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
}

.agent-avatar-preview {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;
  display: none;
}

.agent-avatar-fallback {
  font-size: var(--text-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.agent-avatar-upload .agent-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 50%;
  pointer-events: none;
}

.agent-avatar-upload:hover .agent-avatar-overlay {
  opacity: 1;
}

.agent-detail-id {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Sections */
.agent-section {
  border-bottom: 1px solid var(--white-05);
  background: linear-gradient(180deg, var(--black-10), transparent 120%);
}

.agent-section:last-child {
  border-bottom: none;
}

.agent-section-header {
  padding: var(--space-4) var(--space-5) var(--space-3);
  background: linear-gradient(180deg, var(--black-20), transparent);
}

.agent-section-title {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.agent-section-body {
  padding: var(--space-3) var(--space-5) var(--space-5);
}

/* Detail rows */
.agent-detail-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-2) 0;
}

.agent-detail-label {
  font-size: var(--text-xs);
  color: var(--text-dim, var(--text-muted));
  min-width: 104px;
  flex-shrink: 0;
  padding-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.agent-detail-value {
  font-size: var(--text-sm);
  color: var(--accent);
  word-break: break-word;
  line-height: 1.55;
}

.agent-detail-mono {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
}

.agent-detail-muted {
  color: var(--text-muted);
  font-style: italic;
}

.agent-detail-inherited {
  color: var(--text-muted);
  font-size: 10px;
  font-style: italic;
  font-family: var(--font-sans, sans-serif);
}

/* In split view, hide satellite's own header (use side-panel header for consistency) */
.side-panel-content .satellite-nav-header {
  display: none !important;
}

/* Show inline tabs when satellite nav header is hidden in split view */
.side-panel-content .satellite-nav-tabs-inline {
  display: flex !important;
  gap: 0;
  padding: 0 var(--space-4);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* Navigator inside side-panel: fill the space, remove fixed positioning */
.side-panel-content .satellite-navigator {
  position: static;
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100%;
  border: none;
  border-radius: 0;
  box-shadow: none;
  z-index: auto;
}

.side-panel-content .satellite-navigator.visible {
  display: flex !important;
}

/* Tool tags */
.agent-tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.agent-tool-tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-md);
  background: var(--white-05);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.agent-tool-allow {
  background: rgba(34, 197, 94, 0.15);
  color: rgb(34, 197, 94);
}

.agent-tool-deny {
  background: rgba(239, 68, 68, 0.15);
  color: rgb(239, 68, 68);
}

/* Section header with edit button */
.agent-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.agent-section-actions {
  display: flex;
  gap: 6px;
}

.agent-section-btn {
  font-size: 11px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-input) 72%, transparent);
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 0.15s ease;
}

.agent-section-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.agent-section-edit:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.agent-section-save {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.agent-section-save:hover {
  opacity: 0.9;
}

.agent-section-cancel:hover {
  color: var(--text-primary);
}

/* Edit form fields */
.agent-edit-field {
  margin-bottom: var(--space-4);
}

.agent-edit-field:last-child {
  margin-bottom: 0;
}

.agent-edit-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-dim, var(--text-muted));
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  font-family: var(--font-sans);
  font-weight: 700;
}

.agent-edit-hint {
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.7;
  font-weight: 500;
}

.agent-edit-input,
.agent-edit-select,
.agent-edit-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-input) 82%, transparent), color-mix(in srgb, var(--bg-secondary) 80%, transparent));
  color: var(--text);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.agent-edit-input::placeholder,
.agent-edit-textarea::placeholder {
  color: var(--text-muted);
}

.agent-edit-input:hover,
.agent-edit-select:hover,
.agent-edit-textarea:hover {
  border-color: var(--accent-30);
}

.agent-edit-input:focus,
.agent-edit-select:focus,
.agent-edit-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-10);
  background: color-mix(in srgb, var(--bg-input) 92%, transparent);
}

.agent-edit-input-short {
  width: 92px;
}

.agent-edit-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg-input) 82%, transparent), color-mix(in srgb, var(--bg-secondary) 80%, transparent));
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px),
    0 0;
  background-size: 6px 6px, 6px 6px, 100% 100%;
  background-repeat: no-repeat;
}

.agent-edit-select::-ms-expand {
  display: none;
}

.agent-edit-textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.5;
}

/* Tool groups editor */
.agent-tools-grid {
  margin-top: 8px;
}

.agent-tool-group {
  margin-bottom: 8px;
  border: 1px solid var(--white-05);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.agent-tool-group-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--black-20);
  cursor: pointer;
  font-size: 12px;
  color: var(--text-primary);
}

.agent-tool-group-label:hover {
  background: var(--white-05);
}

.agent-tool-group-hint {
  font-size: 9px;
  color: var(--text-muted);
  margin-left: auto;
  font-family: var(--font-mono);
}

.agent-tool-group-items {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px 8px 6px;
}

.agent-tool-item-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
}

.agent-tool-item-label:hover {
  color: var(--text-primary);
  background: var(--white-05);
}

.agent-tool-group-check,
.agent-tool-item-check {
  accent-color: var(--accent);
}

/* Agent list actions (create button) */
.agents-list-actions {
  padding: 8px 12px;
}

.agents-create-btn {
  width: 100%;
  padding: 8px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.15s ease;
}

.agents-create-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--white-05);
}

.agents-create-submit {
  border-style: solid;
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.agents-create-submit:hover {
  opacity: 0.9;
  color: var(--bg);
  border-color: var(--accent);
}

/* Create form */
.agent-create-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0 12px 4px;
}

.agent-create-warning {
  font-size: 11px;
  color: var(--text-muted);
  padding: 6px 12px;
  margin: 0 12px 8px;
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: var(--radius-md);
}

/* Delete button in detail header */
.agent-detail-delete {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: transparent;
  color: rgb(239, 68, 68);
  cursor: pointer;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
}

.agent-detail-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgb(239, 68, 68);
}

/* Delete confirmation overlay */
.agent-confirm-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--black-80);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 20px;
}

.agent-confirm-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  max-width: 320px;
  width: 100%;
}

.agent-confirm-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.agent-confirm-body {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.agent-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.agent-confirm-delete {
  background: rgb(239, 68, 68) !important;
  color: white !important;
  border-color: rgb(239, 68, 68) !important;
}

.agent-confirm-delete:hover {
  opacity: 0.9;
}

/* Restart overlay */
.agent-restart-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
}

.agent-restart-content {
  text-align: center;
}

.agent-restart-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 12px;
}

.agent-restart-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Raw JSON section */
.agent-raw-toggle {
  cursor: pointer;
}

.agent-raw-toggle:hover .agent-section-title {
  color: var(--text-primary);
}

.agent-raw-chevron {
  color: var(--text-muted);
  font-size: 12px;
  transition: transform 0.15s ease;
}

.agent-raw-json {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  color: var(--text-muted);
  background: var(--black-20);
  border: 1px solid var(--white-05);
  border-radius: var(--radius-md);
  padding: 8px;
  margin: 0;
  overflow-x: auto;
  white-space: pre;
  max-height: 300px;
  overflow-y: auto;
}

.agent-raw-copy {
  margin-top: 6px;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-mono);
}

.agent-raw-copy:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Tool presets */
.agent-preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.agent-preset-btn {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all 0.15s ease;
}

.agent-preset-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.agent-preset-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* Binding / routing editor */
.agent-binding-info {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}

.agent-binding-info em {
  color: var(--accent);
  font-style: normal;
}

.agent-bindings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agent-bindings-empty {
  font-size: 11px;
  padding: 8px 0;
}

.agent-binding-row {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  padding: 8px;
  background: var(--black-20);
  border: 1px solid var(--white-05);
  border-radius: var(--radius-md);
}

.agent-binding-fields {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.agent-binding-fields .agent-edit-field {
  margin-bottom: 0;
}

.agent-binding-fields .agent-edit-label {
  font-size: 9px;
  margin-bottom: 2px;
}

.agent-binding-fields .agent-edit-input,
.agent-binding-fields .agent-edit-select {
  font-size: 11px;
  padding: 4px 6px;
}

.agent-binding-remove {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: transparent;
  color: rgba(239, 68, 68, 0.6);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 12px;
  margin-top: 14px;
  transition: all 0.15s ease;
}

.agent-binding-remove:hover {
  background: rgba(239, 68, 68, 0.15);
  color: rgb(239, 68, 68);
  border-color: rgb(239, 68, 68);
}

.agent-binding-add {
  margin-top: 8px;
  font-size: 11px;
  padding: 6px 12px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-mono);
  width: 100%;
  transition: all 0.15s ease;
}

.agent-binding-add:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   SWITCH OVERLAY
   ============================================ */

.satellite-switch-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--black-80);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.15s ease;
  backdrop-filter: blur(2px);
}

.satellite-switch-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
}

.satellite-switch-spinner span:first-child {
  font-size: 32px;
  animation: satellitePulse 1s ease-in-out infinite;
}

@keyframes satellitePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.7; }
}

/* Input area disabled state during switch */
.input-area.switching-satellite,
.chat-input.switching-satellite {
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

/* ============================================
   PENDING DELETE STATE
   ============================================ */

.satellite-item.pending-delete {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: var(--error) !important;
  animation: pendingPulse 1s ease-in-out infinite;
}

.satellite-item.pending-delete .satellite-item-delete {
  background: var(--error);
  color: white;
  border-radius: var(--radius-md);
}

@keyframes pendingPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ============================================
   MOBILE (< 480px)
   ============================================ */

@media (max-width: 480px) {
  .satellite-navigator {
    bottom: 140px;
    left: var(--space-4);
    right: var(--space-4);
    width: auto;
  }
}

/* Accessibility: Respect reduced motion preference (M-09) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === SHORTCUTS === */

/* ============================================
   KEYBOARD SHORTCUTS PANEL STYLES
   ============================================ */

.shortcuts-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--z-overlay);
  padding: var(--space-5);
}

.shortcuts-panel.visible {
  display: flex;
}

.shortcuts-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
}

.shortcuts-panel-header h3 {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text);
  margin: 0;
}

.shortcuts-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-2xl);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: var(--radius-md);
}

.shortcuts-close:hover {
  color: var(--text);
}

.shortcuts-panel > .shortcuts-panel-header,
.shortcuts-panel > .shortcuts-list,
.shortcuts-panel > .shortcuts-footer {
  /* Direct children styling */
}

.shortcuts-panel-inner {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 450px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.shortcuts-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-3) 0;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-6);
  transition: background 0.15s;
}

.shortcut-row:hover {
  background: rgba(0, 240, 255, 0.05);
}

.shortcut-desc {
  font-size: var(--text-base);
  color: var(--text);
}

.shortcut-key {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-1) var(--space-2);
  color: var(--accent);
  min-width: 60px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.shortcut-key:hover {
  border-color: var(--accent);
  background: rgba(0, 240, 255, 0.1);
}

.shortcut-key.editing {
  border-color: var(--accent);
  background: rgba(0, 240, 255, 0.2);
  animation: pulse-border 1s infinite;
  color: var(--text);
}

@keyframes pulse-border {
  0%, 100% { border-color: var(--accent); }
  50% { border-color: transparent; }
}

.shortcuts-hint {
  padding: 0 var(--space-6);
  margin: 0 0 var(--space-2) 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.shortcuts-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.shortcuts-reset {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.shortcuts-reset:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* Settings button style */
.setting-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.setting-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Accessibility: Respect reduced motion preference (M-09) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === TIMESTAMPS === */

/* ============================================
   TIMESTAMPS STYLES
   Small light text under message content
   ============================================ */

/* Timestamp inside message bubble */
.message-timestamp {
  display: none;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-top: 6px;
  opacity: 0.5;
  user-select: none;
  line-height: 1;
}

/* Show when enabled */
.message.show-timestamp .message-timestamp {
  display: block;
}

/* Slightly brighter on hover */
.message:hover .message-timestamp {
  opacity: 0.8;
}

/* Right-align for user messages */
.message.user .message-timestamp {
  text-align: right;
}

/* Left-align for assistant messages */
.message.assistant .message-timestamp {
  text-align: left;
}

