/* ==========================================
   EXPLORER VIEW STYLES
   ========================================== */

/* Main Container - Split Panel Layout */
.explorer-container {
  display: flex;
  height: calc(100vh - 200px);
  min-height: 500px;
  gap: 1px;
  background: hsl(var(--border));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  overflow: hidden;
}

/* Left Panel - File Tree */
.explorer-tree-panel {
  width: 320px;
  min-width: 240px;
  max-width: 480px;
  background: hsl(var(--card));
  display: flex;
  flex-direction: column;
  resize: horizontal;
  overflow: hidden;
}

.explorer-tree-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: hsl(var(--muted));
  border-bottom: 1px solid hsl(var(--border));
}

.explorer-tree-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: hsl(var(--foreground));
}

.explorer-icon {
  font-size: 16px;
}

.explorer-refresh-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.explorer-refresh-btn:hover {
  background: hsl(var(--hover));
  color: hsl(var(--foreground));
}

.explorer-refresh-btn.refreshing svg {
  animation: spin 1s linear infinite;
}

.explorer-tree-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
}

/* Tree Items */
.tree-item {
  user-select: none;
}

.tree-item-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.1s ease;
  min-height: 28px;
}

.tree-item-row:hover {
  background: hsl(var(--hover));
}

.tree-item-row.selected,
.tree-file.selected .tree-item-row {
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
}

.tree-chevron {
  width: 16px;
  font-size: 10px;
  color: hsl(var(--muted-foreground));
  text-align: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.tree-chevron-spacer {
  width: 16px;
  flex-shrink: 0;
}

.tree-icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.tree-name {
  font-size: 13px;
  color: hsl(var(--foreground));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* File Type Icons */
.file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 16px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 3px;
  font-family: system-ui, -apple-system, sans-serif;
  letter-spacing: -0.3px;
}

.file-icon-js { background: #f7df1e; color: #000; }
.file-icon-jsx { background: #61dafb; color: #000; }
.file-icon-ts { background: #3178c6; color: #fff; }
.file-icon-tsx { background: #3178c6; color: #fff; }
.file-icon-py { background: #3776ab; color: #ffd43b; }
.file-icon-go { background: #00add8; color: #fff; }
.file-icon-rs { background: #dea584; color: #000; }
.file-icon-java { background: #ed8b00; color: #fff; }
.file-icon-rb { background: #cc342d; color: #fff; }
.file-icon-php { background: #777bb4; color: #fff; }
.file-icon-c { background: #a8b9cc; color: #000; }
.file-icon-cpp { background: #00599c; color: #fff; }
.file-icon-h { background: #a8b9cc; color: #000; }
.file-icon-cs { background: #68217a; color: #fff; }
.file-icon-swift { background: #fa7343; color: #fff; }
.file-icon-kt { background: #7f52ff; color: #fff; }

.file-icon-html { background: #e34f26; color: #fff; }
.file-icon-css { background: #1572b6; color: #fff; }
.file-icon-scss { background: #c6538c; color: #fff; }
.file-icon-less { background: #1d365d; color: #fff; }
.file-icon-vue { background: #42b883; color: #fff; }
.file-icon-svelte { background: #ff3e00; color: #fff; }

.file-icon-json { background: #292929; color: #f5a623; }
.file-icon-yaml { background: #cb171e; color: #fff; }
.file-icon-xml { background: #0060ac; color: #fff; }
.file-icon-toml { background: #9c4121; color: #fff; }
.file-icon-ini { background: #6d6d6d; color: #fff; }
.file-icon-env { background: #ecd53f; color: #000; }

.file-icon-md { background: #083fa1; color: #fff; }
.file-icon-txt { background: #6d6d6d; color: #fff; }
.file-icon-log { background: #4a4a4a; color: #8bc34a; }

.file-icon-sh { background: #4eaa25; color: #fff; }
.file-icon-ps1 { background: #012456; color: #fff; }
.file-icon-bat { background: #c1f12e; color: #000; }

.file-icon-sql { background: #f29111; color: #fff; }
.file-icon-db { background: #003b57; color: #fff; }

.file-icon-img { background: #8bc34a; color: #fff; }
.file-icon-svg { background: #ffb13b; color: #000; }

.file-icon-lock { background: transparent; font-size: 14px; }
.file-icon-docker { background: transparent; font-size: 14px; }
.file-icon-default { background: transparent; font-size: 14px; }
.file-icon-claude { background: #d97706; color: #fff; font-size: 12px; }

/* Folder Children */
.tree-children {
  display: none;
  overflow: hidden;
}

.tree-children.show {
  display: block;
}

.tree-folder.expanded > .tree-item-row .tree-chevron {
  transform: rotate(0deg);
}

.tree-folder:not(.expanded) > .tree-item-row .tree-chevron {
  transform: rotate(-90deg);
}

/* CLAUDE.md Badge and Update Button */
.claude-md-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: hsl(var(--success) / 0.15);
  color: hsl(var(--success));
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 6px;
  flex-shrink: 0;
}

.claude-md-badge .badge-icon {
  font-size: 10px;
}

.claude-md-badge .badge-text {
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Folder Action Buttons */
.tree-folder-actions {
  display: none;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex-shrink: 0;
}

.tree-item-row:hover .tree-folder-actions {
  display: flex;
}

.tree-update-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 22px;
  border: none;
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s ease;
}

.tree-update-btn .update-icon {
  font-size: 12px;
}

.tree-update-btn:hover {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  transform: scale(1.05);
}

.tree-update-btn.tree-update-multi:hover {
  background: hsl(var(--success));
}

/* Highlight folders with CLAUDE.md */
.tree-folder.has-claude-md > .tree-item-row {
  background: hsl(var(--success) / 0.05);
}

.tree-folder.has-claude-md > .tree-item-row:hover {
  background: hsl(var(--success) / 0.1);
}

/* Highlight CLAUDE.md files */
.tree-file.is-claude-md .tree-name {
  color: hsl(var(--primary));
  font-weight: 500;
}

/* Tree States */
.tree-loading,
.tree-error,
.tree-empty {
  padding: 8px 16px;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.tree-error {
  color: hsl(var(--destructive));
}

/* Right Panel - Preview */
.explorer-preview-panel {
  flex: 1;
  background: hsl(var(--card));
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.explorer-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: hsl(var(--muted));
  border-bottom: 1px solid hsl(var(--border));
  min-height: 44px;
  flex-shrink: 0;
}

.preview-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.preview-filename {
  font-weight: 600;
  font-size: 14px;
  color: hsl(var(--foreground));
  white-space: nowrap;
  flex-shrink: 0;
}

.preview-path {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.preview-header-tabs {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  background: hsl(var(--background));
  padding: 3px;
  border-radius: 6px;
}

.explorer-preview-content {
  flex: 1;
  overflow: auto;
  padding: 0;
}

/* Preview Empty State */
.explorer-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: hsl(var(--muted-foreground));
}

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

.preview-empty-text {
  font-size: 14px;
}

/* Preview Info Bar */
.preview-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  background: hsl(var(--muted) / 0.5);
  border-bottom: 1px solid hsl(var(--border));
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.preview-lang {
  padding: 2px 8px;
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
  border-radius: 4px;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 11px;
}

/* Code Preview */
.preview-code {
  margin: 0;
  padding: 16px;
  background: hsl(var(--muted) / 0.3);
  overflow: auto;
  font-size: 13px;
  line-height: 1.5;
}

.preview-code code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  background: transparent;
}

/* Preview Tabs (for Markdown) - in header */
.preview-tab {
  padding: 5px 12px;
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preview-tab:hover {
  color: hsl(var(--foreground));
}

.preview-tab.active {
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  box-shadow: 0 1px 2px hsl(var(--foreground) / 0.08);
}

.preview-tab-content {
  display: none;
}

.preview-tab-content.show {
  display: block;
}

/* Markdown Preview */
.markdown-preview {
  padding: 20px;
  line-height: 1.6;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3,
.markdown-preview h4 {
  color: hsl(var(--foreground));
  margin-top: 24px;
  margin-bottom: 12px;
}

.markdown-preview h1 { font-size: 1.75em; border-bottom: 1px solid hsl(var(--border)); padding-bottom: 8px; }
.markdown-preview h2 { font-size: 1.5em; border-bottom: 1px solid hsl(var(--border)); padding-bottom: 6px; }
.markdown-preview h3 { font-size: 1.25em; }
.markdown-preview h4 { font-size: 1.1em; }

.markdown-preview p {
  margin-bottom: 12px;
  color: hsl(var(--foreground));
}

.markdown-preview ul,
.markdown-preview ol {
  margin-bottom: 12px;
  padding-left: 24px;
}

.markdown-preview li {
  margin-bottom: 4px;
}

.markdown-preview code {
  background: hsl(var(--muted));
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
}

.markdown-preview pre {
  background: hsl(var(--muted));
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
}

.markdown-preview pre code {
  background: transparent;
  padding: 0;
}

.markdown-preview blockquote {
  border-left: 4px solid hsl(var(--primary));
  padding-left: 16px;
  margin: 16px 0;
  color: hsl(var(--muted-foreground));
}

.markdown-preview a {
  color: hsl(var(--primary));
  text-decoration: none;
}

.markdown-preview a:hover {
  text-decoration: underline;
}

.markdown-preview table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.markdown-preview th,
.markdown-preview td {
  border: 1px solid hsl(var(--border));
  padding: 8px 12px;
  text-align: left;
}

.markdown-preview th {
  background: hsl(var(--muted));
  font-weight: 600;
}

/* Loading and Error States */
.explorer-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: hsl(var(--muted-foreground));
  font-size: 14px;
}

.explorer-error {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: hsl(var(--destructive));
  font-size: 14px;
}

/* ==========================================
   UPDATE CLAUDE.MD MODAL
   ========================================== */

.claude-md-modal {
  animation: fadeIn 0.15s ease-out;
}

.claude-md-modal-backdrop {
  animation: fadeIn 0.15s ease-out;
}

.claude-md-modal-content {
  animation: slideUp 0.2s ease-out;
}

.claude-md-modal.hidden {
  display: none;
}

.claude-md-target-path {
  background: hsl(var(--muted));
  padding: 8px 12px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 12px;
  color: hsl(var(--foreground));
  word-break: break-all;
}

.claude-md-form-group {
  margin-bottom: 16px;
}

.claude-md-form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--foreground));
}

.claude-md-form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 14px;
}

.claude-md-form-group select:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.2);
}

.claude-md-status {
  margin-top: 16px;
  min-height: 40px;
}

.status-running {
  color: hsl(var(--warning));
  font-size: 13px;
}

.status-success {
  color: hsl(var(--success));
  font-size: 13px;
}

.status-error {
  color: hsl(var(--destructive));
  font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
  .explorer-container {
    flex-direction: column;
    height: auto;
  }

  .explorer-tree-panel {
    width: 100%;
    max-width: none;
    height: 300px;
    resize: vertical;
  }

  .explorer-preview-panel {
    height: 400px;
  }
}

/* ==========================================
   FLOATING ACTION BUTTON & TASK QUEUE
   ========================================== */

/* Floating Action Button */
.explorer-fab {
  position: fixed;
  bottom: 80px;
  right: 30px;
  width: 56px;
  height: 56px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px hsl(var(--primary) / 0.4);
  transition: all 0.2s ease;
  z-index: 100;
}

.explorer-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px hsl(var(--primary) / 0.5);
}

.explorer-fab.active {
  background: hsl(var(--foreground));
  transform: rotate(45deg);
}

.explorer-fab .fab-icon {
  font-size: 24px;
  transition: transform 0.2s ease;
}

.explorer-fab.active .fab-icon {
  transform: rotate(-45deg);
}

.explorer-fab .fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* Task Queue Panel */
.task-queue-panel {
  position: fixed;
  bottom: 150px;
  right: 30px;
  width: 360px;
  max-height: 450px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  box-shadow: 0 8px 32px hsl(var(--foreground) / 0.15);
  z-index: 99;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.2s ease;
}

.task-queue-panel.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.task-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--muted));
  border-radius: 12px 12px 0 0;
  gap: 8px;
}

.queue-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
}

.queue-tab {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.queue-tab:hover {
  background: hsl(var(--hover));
  color: hsl(var(--foreground));
}

.queue-tab.active {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  box-shadow: 0 1px 2px hsl(var(--foreground) / 0.1);
}

.queue-tab-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
}

.queue-tab-badge:not(:empty) {
  display: inline-flex;
}

.queue-tab-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.queue-tab-content.hidden {
  display: none;
}

.task-queue-title {
  font-weight: 600;
  font-size: 14px;
  color: hsl(var(--foreground));
}

.task-queue-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-size: 20px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.task-queue-close:hover {
  background: hsl(var(--hover));
  color: hsl(var(--foreground));
}

/* Task Queue Toolbar */
.task-queue-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid hsl(var(--border));
  gap: 8px;
}

/* CLI Selector */
.queue-cli-selector {
  display: flex;
  align-items: center;
  gap: 6px;
}

.queue-cli-selector label {
  font-size: 12px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.queue-cli-selector select {
  padding: 5px 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 100px;
}

.queue-cli-selector select:hover {
  border-color: hsl(var(--primary));
}

.queue-cli-selector select:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.2);
}

.task-queue-actions {
  display: flex;
  gap: 4px;
}

.queue-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.queue-action-btn:hover:not(:disabled) {
  background: hsl(var(--hover));
  border-color: hsl(var(--primary));
}

.queue-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.queue-action-btn.queue-start-btn {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

.queue-action-btn.queue-start-btn:hover:not(:disabled) {
  background: hsl(var(--primary) / 0.9);
}

.queue-action-btn.queue-clear-btn:hover:not(:disabled) {
  background: hsl(var(--destructive) / 0.1);
  border-color: hsl(var(--destructive));
  color: hsl(var(--destructive));
}

.task-queue-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  max-height: 280px;
}

.task-queue-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
  color: hsl(var(--muted-foreground));
}

.task-queue-empty span {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.task-queue-empty p {
  font-size: 12px;
  margin: 0;
}

/* Task Item */
.task-queue-item {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  transition: all 0.15s ease;
}

.task-queue-item:last-child {
  margin-bottom: 0;
}

.task-queue-item.status-running {
  border-color: hsl(var(--warning));
  background: hsl(var(--warning) / 0.05);
}

.task-queue-item.status-completed {
  border-color: hsl(var(--success));
  background: hsl(var(--success) / 0.05);
}

.task-queue-item.status-failed {
  border-color: hsl(var(--destructive));
  background: hsl(var(--destructive) / 0.05);
}

.task-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-status-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.task-folder-name {
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--foreground));
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-remove-btn {
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.task-remove-btn:hover {
  background: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
}

.task-item-meta {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.task-strategy,
.task-tool {
  font-size: 11px;
  padding: 2px 6px;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  border-radius: 4px;
}

.task-item-message {
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid hsl(var(--border));
}

.task-queue-item.status-running .task-status-icon {
  animation: spin 1s linear infinite;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .explorer-fab {
    bottom: 70px;
    right: 20px;
    width: 50px;
    height: 50px;
  }

  .task-queue-panel {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: 130px;
  }
}

/* ==========================================
   GLOBAL NOTIFICATION SYSTEM
   ========================================== */

/* Global FAB - positioned above explorer FAB */
.global-notif-fab {
  position: fixed;
  bottom: 150px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px hsl(var(--foreground) / 0.15);
  transition: all 0.2s ease;
  z-index: 100;
}

.global-notif-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px hsl(var(--foreground) / 0.2);
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.global-notif-fab.active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.global-notif-fab .fab-icon {
  font-size: 20px;
}

.global-notif-fab .fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
  border-radius: 9px;
  font-size: 10px;
  font-weight: 600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Global Notification Panel */
.global-notif-panel {
  position: fixed;
  bottom: 210px;
  right: 30px;
  width: 380px;
  max-height: 500px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  box-shadow: 0 8px 32px hsl(var(--foreground) / 0.15);
  z-index: 99;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.2s ease;
}

.global-notif-panel.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.global-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--muted));
  border-radius: 12px 12px 0 0;
}

.global-notif-title {
  font-weight: 600;
  font-size: 14px;
  color: hsl(var(--foreground));
}

.global-notif-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-size: 20px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.global-notif-close:hover {
  background: hsl(var(--hover));
  color: hsl(var(--foreground));
}

.global-notif-actions {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid hsl(var(--border));
}

.notif-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.notif-action-btn:hover {
  background: hsl(var(--hover));
}

.global-notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  max-height: 350px;
}

.global-notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  text-align: center;
  color: hsl(var(--muted-foreground));
}

.global-notif-empty span {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.global-notif-empty p {
  font-size: 12px;
  margin: 0;
}

/* Notification Item */
.global-notif-item {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  transition: all 0.15s ease;
}

.global-notif-item:last-child {
  margin-bottom: 0;
}

.global-notif-item.type-success {
  border-left: 3px solid hsl(var(--success));
}

.global-notif-item.type-error {
  border-left: 3px solid hsl(var(--destructive));
}

.global-notif-item.type-warning {
  border-left: 3px solid hsl(var(--warning));
}

.global-notif-item.type-info {
  border-left: 3px solid hsl(var(--primary));
}

.global-notif-item.read {
  opacity: 0.7;
}

.notif-item-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.notif-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.notif-message {
  font-size: 13px;
  color: hsl(var(--foreground));
  flex: 1;
  line-height: 1.4;
}

.notif-source {
  font-size: 10px;
  padding: 2px 6px;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.notif-details {
  font-size: 11px;
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  color: hsl(var(--muted-foreground));
  margin-top: 8px;
  margin-left: 22px;
  padding: 8px 10px;
  line-height: 1.5;
  background: hsl(var(--muted) / 0.5);
  border-radius: 6px;
  border-left: 2px solid hsl(var(--border));
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 100px;
  overflow-y: auto;
}

.notif-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.notif-time {
  font-size: 11px;
  color: hsl(var(--muted-foreground));
}

/* Toast Notification - Compact */
.notif-toast {
  position: fixed;
  top: 70px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  box-shadow: 0 4px 12px hsl(var(--foreground) / 0.12);
  z-index: 1000;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  max-width: 260px;
}

.notif-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.notif-toast.type-success {
  border-left: 3px solid hsl(var(--success));
}

.notif-toast.type-error {
  border-left: 3px solid hsl(var(--destructive));
}

.notif-toast .toast-icon {
  font-size: 14px;
}

.notif-toast .toast-message {
  font-size: 0.8125rem;
  color: hsl(var(--foreground));
  line-height: 1.3;
}

/* Mobile responsive for global notifications */
@media (max-width: 768px) {
  .global-notif-fab {
    bottom: 130px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  .global-notif-panel {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: 185px;
  }
}

