/* ========== SPLASH INTRO ========== */
.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  background: #030712;
}

.splash-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 1%;
  transform: scale(5);
  transition: transform 3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.splash-img--animate {
  transform: scale(1);
}

.splash-title { display: none; }

.splash-overlay--fade {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6366f1;
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

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

/* Markdown content */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
  font-weight: 600;
  margin: 1em 0 0.5em;
}

.markdown-content h1 { font-size: 1.25rem; }
.markdown-content h2 { font-size: 1.125rem; }
.markdown-content h3 { font-size: 1rem; }

.markdown-content p {
  margin: 0.5em 0;
  line-height: 1.6;
}

.markdown-content ul,
.markdown-content ol {
  margin: 0.5em 0;
  padding-left: 1.5em;
}

.markdown-content ul { list-style: disc; }
.markdown-content ol { list-style: decimal; }

.markdown-content li {
  margin: 0.25em 0;
}

.markdown-content code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.875em;
}

.markdown-content pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1em;
  margin: 0.75em 0;
  overflow-x: auto;
}

.markdown-content pre code {
  background: none;
  padding: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

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

.markdown-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.75em 0;
}

.markdown-content th,
.markdown-content td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5em 0.75em;
  text-align: left;
}

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

.markdown-content blockquote {
  border-left: 3px solid #6366f1;
  padding-left: 1em;
  margin: 0.75em 0;
  color: #9ca3af;
}

.markdown-content a {
  color: #818cf8;
  text-decoration: underline;
}

.markdown-content strong {
  font-weight: 600;
  color: #e5e7eb;
}

/* Quick action hover */
.quick-action:hover {
  transform: translateY(-1px);
}

/* Fade in animation */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stop button (during processing) */
#send-btn.stop-mode {
  background: #dc2626 !important;
  animation: stop-pulse 2s infinite;
}
#send-btn.stop-mode:hover {
  background: #ef4444 !important;
}
@keyframes stop-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}

/* ========== PROGRESS CARD (SSE live updates) ========== */
.progress-card {
  min-width: 260px;
  max-width: 400px;
}

.progress-skill {
  margin-bottom: 8px;
}

.progress-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.progress-tools:empty {
  display: none;
}

.progress-tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 9999px;
  font-size: 0.7rem;
  color: #a5b4fc;
  white-space: nowrap;
  animation: chipFadeIn 0.2s ease;
}

.progress-tool-chip--done {
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.2);
  color: #86efac;
}

.progress-tool-spinner {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(165, 180, 252, 0.3);
  border-top-color: #a5b4fc;
  border-radius: 50%;
  animation: toolSpin 0.6s linear infinite;
}

.progress-tool-check {
  color: #4ade80;
  font-size: 0.75rem;
}

.progress-tool-time {
  color: #6b7280;
  font-size: 0.65rem;
}

.progress-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-label {
  font-size: 0.75rem;
  color: #9ca3af;
}

@keyframes toolSpin {
  to { transform: rotate(360deg); }
}

@keyframes chipFadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Light theme: progress card */
.theme-light .progress-tool-chip {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.2);
  color: #2563eb;
}
.theme-light .progress-tool-chip--done {
  background: rgba(22, 163, 74, 0.06);
  border-color: rgba(22, 163, 74, 0.2);
  color: #16a34a;
}
.theme-light .progress-tool-spinner {
  border-color: rgba(37, 99, 235, 0.2);
  border-top-color: #2563eb;
}
.theme-light .progress-tool-check { color: #16a34a; }
.theme-light .progress-tool-time { color: #94a3b8; }
.theme-light .progress-label { color: #64748b; }

/* Tool call badge */
.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 9999px;
  font-size: 0.75rem;
  color: #a5b4fc;
}

/* Download card */
.download-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  min-width: 280px;
  max-width: 400px;
}

.download-card--green { border-color: rgba(74, 222, 128, 0.3); }
.download-card--red { border-color: rgba(248, 113, 113, 0.3); }
.download-card--blue { border-color: rgba(96, 165, 250, 0.3); }
.download-card--orange { border-color: rgba(251, 191, 36, 0.3); }

.download-card--green .download-card__icon { color: #4ade80; }
.download-card--red .download-card__icon { color: #f87171; }
.download-card--blue .download-card__icon { color: #60a5fa; }
.download-card--orange .download-card__icon { color: #fbbf24; }

.download-card__icon {
  flex-shrink: 0;
  color: #a5b4fc;
}

.download-card__info {
  flex: 1;
  min-width: 0;
}

.download-card__filename {
  font-size: 0.875rem;
  font-weight: 500;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.download-card__type {
  font-size: 0.75rem;
  color: #9ca3af;
}

.download-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: #4f46e5;
  color: white;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.download-card__btn:hover {
  background: #6366f1;
}

/* Image result */
.image-result {
  max-width: 512px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.image-result img {
  display: block;
  width: 100%;
  height: auto;
}

/* Skill badge (on messages) */
.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.skill-badge--indigo { background: rgba(99,102,241,0.15); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.25); }
.skill-badge--amber  { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.25); }
.skill-badge--green  { background: rgba(74,222,128,0.12); color: #4ade80; border: 1px solid rgba(74,222,128,0.25); }
.skill-badge--red    { background: rgba(248,113,113,0.12); color: #f87171; border: 1px solid rgba(248,113,113,0.25); }
.skill-badge--purple { background: rgba(192,132,252,0.12); color: #c084fc; border: 1px solid rgba(192,132,252,0.25); }
.skill-badge--gray   { background: rgba(156,163,175,0.12); color: #9ca3af; border: 1px solid rgba(156,163,175,0.25); }

/* Capability chip bar */
.capability-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.cap-chip {
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  cursor: pointer;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #d1d5db;
  transition: all 0.15s;
}

.cap-chip:hover { background: rgba(255,255,255,0.1); color: #f3f4f6; }
.cap-chip--green:hover { border-color: rgba(74,222,128,0.4); color: #4ade80; }
.cap-chip--red:hover   { border-color: rgba(248,113,113,0.4); color: #f87171; }
.cap-chip--purple:hover { border-color: rgba(192,132,252,0.4); color: #c084fc; }

/* ── Mode toggle (segmented control) ── */
.mode-toggle {
  position: relative;
  display: inline-flex;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9999px;
  padding: 2px;
  gap: 0;
}

.mode-toggle__slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 2px);
  height: calc(100% - 4px);
  background: rgba(99,102,241,0.25);
  border: 1px solid rgba(99,102,241,0.4);
  border-radius: 9999px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.mode-toggle__opt {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border: none;
  background: none;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
}

.mode-toggle__opt:hover { color: #d1d5db; }
.mode-toggle__opt--active { color: #c7d2fe; }

.mode-toggle__icon { font-size: 0.85rem; }

.mode-toggle__hint {
  font-size: 0.65rem;
  color: #6b7280;
  white-space: nowrap;
  transition: color 0.2s;
}
.mode-toggle__hint--filter { color: #a5b4fc; }

/* Separator between mode toggle and skill chips */
.cap-bar-sep {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.1);
  margin: 0 4px;
}

/* ── Location picker ── */
.loc-picker {
  position: relative;
}

.loc-picker__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.loc-picker__chip:hover {
  background: rgba(255,255,255,0.1);
  color: #d1d5db;
}

.loc-picker__chip--active {
  background: rgba(99,102,241,0.15);
  border-color: rgba(99,102,241,0.3);
  color: #a5b4fc;
}

.loc-picker__chip--active:hover {
  background: rgba(99,102,241,0.25);
  color: #c7d2fe;
}

.loc-picker__icon {
  font-size: 0.85rem;
}

.loc-picker__label {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loc-picker__caret {
  width: 12px;
  height: 12px;
  opacity: 0.5;
  transition: transform 0.2s;
}

.loc-dropdown:not(.hidden) ~ .loc-picker__chip .loc-picker__caret,
.loc-picker__chip[aria-expanded="true"] .loc-picker__caret {
  transform: rotate(180deg);
}

.loc-dropdown {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  width: 240px;
  background: #1f2937;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 50;
  animation: locDropIn 0.15s ease;
}

.loc-dropdown.hidden {
  display: none;
}

@keyframes locDropIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.loc-dropdown__search {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 4px;
}

.loc-dropdown__search input {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #e5e7eb;
  font-size: 0.75rem;
  outline: none;
  transition: border-color 0.15s;
}

.loc-dropdown__search input:focus {
  border-color: rgba(99,102,241,0.5);
}

.loc-dropdown__search input::placeholder {
  color: #6b7280;
}

.loc-dropdown__search button {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(99,102,241,0.2);
  border-radius: 6px;
  color: #a5b4fc;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

.loc-dropdown__search button:hover {
  background: rgba(99,102,241,0.4);
}

.loc-dropdown__scroll {
  max-height: 220px;
  overflow-y: auto;
}

.loc-dropdown__scroll::-webkit-scrollbar {
  width: 4px;
}

.loc-dropdown__scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.loc-dropdown__group-label {
  padding: 6px 10px 2px;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  font-weight: 600;
}

.loc-dropdown__item {
  display: block;
  width: 100%;
  padding: 6px 10px;
  border: none;
  background: none;
  color: #d1d5db;
  font-size: 0.8125rem;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s, color 0.1s;
}

.loc-dropdown__item:hover {
  background: rgba(255,255,255,0.08);
  color: #f3f4f6;
}

.loc-dropdown__item--active {
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
}

.loc-dropdown__item--active:hover {
  background: rgba(99,102,241,0.25);
}

/* Welcome section labels */
.welcome-section {
  text-align: left;
  width: 100%;
  margin-top: 16px;
  margin-bottom: 8px;
}

.welcome-section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  font-weight: 600;
}

/* Select mode toggle button (sidebar header) */
.conv-select-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #9ca3af;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.conv-select-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Conversation list items */
.conv-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.conv-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.conv-item--active {
  background: #1f2937;
}
.conv-item--active:hover {
  background: #1f2937;
}
.conv-item-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #6b7280;
}
.conv-item--active .conv-item-icon {
  color: #a5b4fc;
}
.conv-item-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  color: #9ca3af;
  text-decoration: none;
  line-height: 1.4;
}
.conv-item--active .conv-item-title {
  color: #f3f4f6;
}
.conv-item:hover .conv-item-title {
  color: #d1d5db;
}
.conv-item--active:hover .conv-item-title {
  color: #f3f4f6;
}
.conv-item-kebab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border: none;
  background: none;
  color: #6b7280;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.conv-item:hover .conv-item-kebab,
.conv-item-kebab:focus {
  opacity: 1;
}
.conv-item-kebab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
}
.conv-item-kebab svg {
  width: 14px;
  height: 14px;
}

/* Conversation checkbox (select mode) */
.conv-item-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid #6b7280;
  border-radius: 4px;
  transition: background 0.15s, border-color 0.15s;
}
.conv-item-checkbox svg {
  width: 12px;
  height: 12px;
}
.conv-item-checkbox--checked {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}
.conv-item--selected {
  background: rgba(79, 70, 229, 0.12);
}

/* Select mode toolbar */
.conv-select-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.conv-select-bar.hidden { display: none; }
.conv-select-bar-label {
  font-size: 0.75rem;
  color: #9ca3af;
  white-space: nowrap;
}
.conv-select-bar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: #9ca3af;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.conv-select-bar-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
}
.conv-select-bar-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.conv-select-bar-btn:disabled:hover {
  background: none;
  color: #9ca3af;
}
.conv-select-bar-btn--danger:not(:disabled) {
  color: #ef4444;
}
.conv-select-bar-btn--danger:not(:disabled):hover {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

/* Delete confirmation modal */
.conv-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.conv-modal-overlay.hidden { display: none; }
.conv-modal-overlay.visible { opacity: 1; }
.conv-modal {
  background: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 24px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}
.conv-modal-overlay.visible .conv-modal {
  transform: scale(1);
}
.conv-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  margin-bottom: 12px;
}
.conv-modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: #f3f4f6;
  margin: 0 0 8px;
}
.conv-modal-text {
  font-size: 0.8125rem;
  color: #9ca3af;
  margin: 0 0 20px;
  line-height: 1.5;
}
.conv-modal-text strong {
  color: #f3f4f6;
}
.conv-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.conv-modal-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.conv-modal-btn--cancel {
  background: rgba(255, 255, 255, 0.08);
  color: #d1d5db;
}
.conv-modal-btn--cancel:hover {
  background: rgba(255, 255, 255, 0.14);
}
.conv-modal-btn--danger {
  background: #dc2626;
  color: #ffffff;
}
.conv-modal-btn--danger:hover {
  background: #ef4444;
}

/* Sidebar footer — compact icon bar */
.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
}

.sidebar-footer-icons {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.sidebar-footer-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: #6b7280;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.sidebar-footer-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
}

.sidebar-footer-icon--active {
  background: #4f46e5;
  color: #ffffff;
}

.sidebar-footer-icon--active:hover {
  background: #6366f1;
  color: #ffffff;
}

.sidebar-footer-icon--amber {
  color: #d97706;
}

.sidebar-footer-icon--amber:hover {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
}

/* Mobile viewport fix — 100vh lies on mobile browsers */
html, body { height: 100%; }
body { min-height: 100dvh; }
@supports not (min-height: 100dvh) {
  body { min-height: -webkit-fill-available; }
}
main, #sidebar, .h-screen { height: 100dvh !important; }
@supports not (height: 100dvh) {
  main, #sidebar, .h-screen { height: -webkit-fill-available !important; }
}

/* Mobile: capability bar wraps */
@media (max-width: 640px) {
  .capability-bar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 12px;
  }
}

/* Responsive sidebar */
@media (max-width: 1023px) {
  #sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  #sidebar.open {
    transform: translateX(0);
  }
}

/* Mobile: location dropdown becomes full-width */
@media (max-width: 640px) {
  .loc-dropdown {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 60vh;
    z-index: 100;
  }
  .loc-dropdown__scroll {
    max-height: 40vh;
  }
}

/* Welcome Wizard */
.wizard-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.wizard-overlay.hidden {
  display: none;
}

.wizard-overlay.visible {
  opacity: 1;
}

.wizard-modal {
  position: relative;
  background: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 520px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.wizard-overlay.visible .wizard-modal {
  transform: scale(1);
}

.wizard-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.wizard-dot.active {
  background: #6366f1;
  width: 20px;
  border-radius: 4px;
}

.wizard-dot.completed {
  background: #6366f1;
}

.wizard-step {
  display: none;
  animation: wizardFadeIn 0.3s ease;
}

.wizard-step.active {
  display: block;
}

@keyframes wizardFadeIn {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

.wizard-cap-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 0.875rem;
  transition: border-color 0.2s ease;
}

.wizard-cap-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

/* ========== LIGHT THEME ========== */
.theme-light {
  background: #f8fafc !important;
  color: #1e293b !important;
}

/* Backgrounds */
.theme-light .bg-gray-950 { background: #f8fafc !important; }
.theme-light .bg-gray-900 { background: #ffffff !important; }
.theme-light .bg-gray-900\/50 { background: rgba(255,255,255,0.8) !important; }
.theme-light .bg-gray-800 { background: #f1f5f9 !important; }
.theme-light .bg-gray-800\/50 { background: rgba(241,245,249,0.5) !important; }

/* Text */
.theme-light .text-gray-100 { color: #1e293b !important; }
.theme-light .text-gray-200 { color: #334155 !important; }
.theme-light .text-gray-300 { color: #475569 !important; }
.theme-light .text-gray-400 { color: #64748b !important; }
.theme-light .text-gray-500 { color: #94a3b8 !important; }
.theme-light .text-white { color: #ffffff !important; }

/* Borders */
.theme-light .border-gray-700 { border-color: #e2e8f0 !important; }
.theme-light .border-gray-800 { border-color: #e2e8f0 !important; }

/* Placeholder */
.theme-light .placeholder-gray-500::placeholder { color: #94a3b8 !important; }

/* Accent: indigo → blue */
.theme-light .bg-indigo-600 { background: #2563eb !important; }
.theme-light .bg-indigo-600\/20 { background: rgba(37,99,235,0.12) !important; }
.theme-light .hover\:bg-indigo-500:hover { background: #3b82f6 !important; }
.theme-light .text-indigo-400 { color: #2563eb !important; }
.theme-light .text-indigo-300 { color: #3b82f6 !important; }
.theme-light .border-indigo-500\/30 { border-color: rgba(37,99,235,0.3) !important; }
.theme-light .hover\:border-indigo-500\/50:hover { border-color: rgba(37,99,235,0.5) !important; }
.theme-light .focus\:ring-indigo-500:focus { --tw-ring-color: #2563eb !important; }

/* Sidebar */
.theme-light #sidebar { background: #ffffff !important; border-color: #e2e8f0 !important; }
.theme-light #sidebar .hover\:bg-gray-800:hover { background: #f1f5f9 !important; }
.theme-light .conv-select-toggle { border-color: #e2e8f0; color: #94a3b8; }
.theme-light .conv-select-toggle:hover { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.theme-light .conv-item:hover { background: #f1f5f9; }
.theme-light .conv-item--active { background: #f1f5f9; }
.theme-light .conv-item-icon { color: #94a3b8; }
.theme-light .conv-item--active .conv-item-icon { color: #2563eb; }
.theme-light .conv-item-title { color: #64748b; }
.theme-light .conv-item--active .conv-item-title { color: #1e293b; }
.theme-light .conv-item:hover .conv-item-title { color: #475569; }
.theme-light .conv-item-kebab { color: #94a3b8; }
.theme-light .conv-item-kebab:hover { background: #e2e8f0; color: #475569; }
.theme-light .conv-item-checkbox { border-color: #cbd5e1; }
.theme-light .conv-item-checkbox--checked { background: #2563eb; border-color: #2563eb; }
.theme-light .conv-item--selected { background: rgba(37, 99, 235, 0.06); }
.theme-light .conv-select-bar { border-bottom-color: #e2e8f0; }
.theme-light .conv-select-bar-label { color: #64748b; }
.theme-light .conv-select-bar-btn { color: #64748b; }
.theme-light .conv-select-bar-btn:hover { background: #f1f5f9; color: #1e293b; }
.theme-light .conv-select-bar-btn--danger:not(:disabled) { color: #dc2626; }
.theme-light .conv-select-bar-btn--danger:not(:disabled):hover { background: rgba(220,38,38,0.08); color: #b91c1c; }
.theme-light .conv-modal-overlay { background: rgba(0,0,0,0.4); }
.theme-light .conv-modal { background: #ffffff; border-color: #e2e8f0; box-shadow: 0 20px 40px rgba(0,0,0,0.15); }
.theme-light .conv-modal-icon { background: rgba(37,99,235,0.08); color: #2563eb; }
.theme-light .conv-modal-title { color: #1e293b; }
.theme-light .conv-modal-text { color: #64748b; }
.theme-light .conv-modal-text strong { color: #1e293b; }
.theme-light .conv-modal-btn--cancel { background: #f1f5f9; color: #475569; }
.theme-light .conv-modal-btn--cancel:hover { background: #e2e8f0; }
.theme-light .conv-modal-btn--danger { background: #dc2626; }
.theme-light .conv-modal-btn--danger:hover { background: #ef4444; }
.theme-light .sidebar-footer { border-top-color: #e2e8f0; }
.theme-light .sidebar-footer-icon { color: #94a3b8; }
.theme-light .sidebar-footer-icon:hover { background: #f1f5f9; color: #475569; }
.theme-light .sidebar-footer-icon--active { background: #2563eb; color: #ffffff; }
.theme-light .sidebar-footer-icon--active:hover { background: #3b82f6; color: #ffffff; }
.theme-light .sidebar-footer-icon--amber { color: #d97706; }
.theme-light .sidebar-footer-icon--amber:hover { background: rgba(245,158,11,0.1); color: #f59e0b; }

/* Chat messages */
.theme-light .bg-indigo-600.text-white { background: #2563eb !important; }
.theme-light .bg-gray-900.border { background: #ffffff !important; border-color: #e2e8f0 !important; }

/* Quick actions */
.theme-light .quick-action { background: #ffffff !important; border-color: #e2e8f0 !important; }
.theme-light .quick-action:hover { border-color: rgba(37,99,235,0.5) !important; }

/* Input */
.theme-light input[type="text"],
.theme-light input[type="password"],
.theme-light input[type="email"],
.theme-light select {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #1e293b !important;
}

/* Tool badge */
.theme-light .tool-badge {
  background: rgba(37,99,235,0.08) !important;
  border-color: rgba(37,99,235,0.2) !important;
  color: #2563eb !important;
}

/* Stop button */
.theme-light #send-btn.stop-mode { background: #dc2626 !important; }
.theme-light #send-btn.stop-mode:hover { background: #ef4444 !important; }

/* Typing indicator */
.theme-light .typing-indicator span { background: #2563eb; }

/* Markdown content */
.theme-light .markdown-content code { background: #f1f5f9; color: #2563eb; }
.theme-light .markdown-content pre { background: #f8fafc; border-color: #e2e8f0; }
.theme-light .markdown-content pre code.hljs { color: #1e293b; }
.theme-light .hljs-keyword { color: #9333ea; }
.theme-light .hljs-string { color: #16a34a; }
.theme-light .hljs-number { color: #2563eb; }
.theme-light .hljs-comment { color: #94a3b8; }
.theme-light .hljs-function { color: #2563eb; }
.theme-light .hljs-title { color: #2563eb; }
.theme-light .hljs-built_in { color: #d97706; }
.theme-light .markdown-content th { background: #f1f5f9; }
.theme-light .markdown-content th,
.theme-light .markdown-content td { border-color: #e2e8f0; }
.theme-light .markdown-content blockquote { border-color: #2563eb; color: #64748b; }
.theme-light .markdown-content a { color: #2563eb; }
.theme-light .markdown-content strong { color: #1e293b; }

/* Scrollbar */
.theme-light .custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); }
.theme-light .custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }

/* Wizard */
.theme-light .wizard-overlay { background: rgba(0,0,0,0.4); }
.theme-light .wizard-modal { background: #ffffff; border-color: #e2e8f0; box-shadow: 0 25px 50px rgba(0,0,0,0.15); }
.theme-light .wizard-dot.active { background: #2563eb; }
.theme-light .wizard-dot.completed { background: #2563eb; }
.theme-light .wizard-cap-card { background: #f8fafc; border-color: #e2e8f0; }
.theme-light .wizard-cap-card:hover { border-color: rgba(37,99,235,0.3); }

/* Approval card amber border */
.theme-light .border-amber-500\/50 { border-color: rgba(245,158,11,0.5) !important; }

/* Disabled button */
.theme-light .disabled\:bg-gray-700:disabled { background: #e2e8f0 !important; }

/* Download card (light) */
.theme-light .download-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.theme-light .download-card__filename { color: #1e293b; }
.theme-light .download-card__type { color: #64748b; }
.theme-light .download-card__btn { background: #2563eb; }
.theme-light .download-card__btn:hover { background: #3b82f6; }

/* Image result (light) */
.theme-light .image-result {
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Skill badge (light) */
.theme-light .skill-badge--indigo { background: rgba(99,102,241,0.1); color: #4f46e5; border-color: rgba(99,102,241,0.2); }
.theme-light .skill-badge--amber  { background: rgba(245,158,11,0.1); color: #d97706; border-color: rgba(245,158,11,0.2); }
.theme-light .skill-badge--green  { background: rgba(34,197,94,0.1); color: #16a34a; border-color: rgba(34,197,94,0.2); }
.theme-light .skill-badge--red    { background: rgba(239,68,68,0.1); color: #dc2626; border-color: rgba(239,68,68,0.2); }
.theme-light .skill-badge--purple { background: rgba(168,85,247,0.1); color: #9333ea; border-color: rgba(168,85,247,0.2); }
.theme-light .skill-badge--gray   { background: rgba(107,114,128,0.1); color: #4b5563; border-color: rgba(107,114,128,0.2); }

/* Capability bar (light) */
.theme-light .capability-bar { border-top-color: #e2e8f0; }
.theme-light .cap-chip { background: #f1f5f9; border-color: #e2e8f0; color: #475569; }
.theme-light .cap-chip:hover { background: #e2e8f0; color: #1e293b; }
.theme-light .cap-chip--green:hover { border-color: rgba(34,197,94,0.4); color: #16a34a; }
.theme-light .cap-chip--red:hover   { border-color: rgba(239,68,68,0.4); color: #dc2626; }
.theme-light .cap-chip--purple:hover { border-color: rgba(168,85,247,0.4); color: #9333ea; }
/* Light theme: mode toggle */
.theme-light .mode-toggle { background: #f1f5f9; border-color: #e2e8f0; }
.theme-light .mode-toggle__slider { background: rgba(37,99,235,0.12); border-color: rgba(37,99,235,0.25); }
.theme-light .mode-toggle__opt { color: #94a3b8; }
.theme-light .mode-toggle__opt:hover { color: #475569; }
.theme-light .mode-toggle__opt--active { color: #2563eb; }
.theme-light .mode-toggle__hint { color: #94a3b8; }
.theme-light .mode-toggle__hint--filter { color: #2563eb; }
.theme-light .cap-bar-sep { background: #e2e8f0; }

/* Light theme: location picker */
.theme-light .loc-picker__chip { background: #f1f5f9; border-color: #e2e8f0; color: #64748b; }
.theme-light .loc-picker__chip:hover { background: #e2e8f0; color: #475569; }
.theme-light .loc-picker__chip--active { background: rgba(37,99,235,0.08); border-color: rgba(37,99,235,0.25); color: #2563eb; }
.theme-light .loc-picker__chip--active:hover { background: rgba(37,99,235,0.14); color: #1d4ed8; }
.theme-light .loc-dropdown { background: #ffffff; border-color: #e2e8f0; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.theme-light .loc-dropdown__search { border-bottom-color: #e2e8f0; }
.theme-light .loc-dropdown__search input { background: #f1f5f9; border-color: #e2e8f0; color: #1e293b; }
.theme-light .loc-dropdown__search input:focus { border-color: rgba(37,99,235,0.5); }
.theme-light .loc-dropdown__search input::placeholder { color: #94a3b8; }
.theme-light .loc-dropdown__search button { background: rgba(37,99,235,0.1); color: #2563eb; }
.theme-light .loc-dropdown__search button:hover { background: rgba(37,99,235,0.2); }
.theme-light .loc-dropdown__group-label { color: #94a3b8; }
.theme-light .loc-dropdown__item { color: #475569; }
.theme-light .loc-dropdown__item:hover { background: #f1f5f9; color: #1e293b; }
.theme-light .loc-dropdown__item--active { background: rgba(37,99,235,0.08); color: #2563eb; }
.theme-light .loc-dropdown__item--active:hover { background: rgba(37,99,235,0.14); }
.theme-light .loc-dropdown__scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); }

/* Welcome section (light) */
.theme-light .welcome-section-label { color: #94a3b8; }

/* ========== MESSAGE EXPORT ========== */

/* Bubble wrapper needs relative for export menu positioning */
.msg-bubble { position: relative; }

/* Export actions wrapper — bottom-right of message */
.export-actions {
  position: absolute;
  bottom: 6px;
  right: 6px;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.msg-bubble:hover .export-actions {
  opacity: 1;
}

/* Kebab button (⋮) */
.export-kebab {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #9ca3af;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.export-kebab:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #e5e7eb;
}

/* Dropdown menu */
.export-dropdown {
  position: absolute;
  bottom: 32px;
  right: 0;
  min-width: 160px;
  background: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.export-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  background: none;
  color: #d1d5db;
  font-size: 0.8125rem;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.export-dropdown button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f3f4f6;
}

.export-icon {
  font-size: 0.9rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.export-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 3px 6px;
}

/* Toast notification */
.export-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.export-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.export-toast--success {
  background: #065f46;
  color: #6ee7b7;
  border: 1px solid rgba(110, 231, 183, 0.2);
}

.export-toast--error {
  background: #7f1d1d;
  color: #fca5a5;
  border: 1px solid rgba(252, 165, 165, 0.2);
}

/* ── Light theme: export menu ── */
.theme-light .export-kebab {
  background: rgba(0, 0, 0, 0.05);
  color: #94a3b8;
}
.theme-light .export-kebab:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #475569;
}
.theme-light .export-dropdown {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.theme-light .export-dropdown button {
  color: #475569;
}
.theme-light .export-dropdown button:hover {
  background: #f1f5f9;
  color: #1e293b;
}
.theme-light .export-divider {
  background: #e2e8f0;
}
.theme-light .export-toast--success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.theme-light .export-toast--error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

/* ========== PREVIEW PANEL (html-render expand) ========== */

/* Wrapper around inline iframe + expand button */
.html-render-wrapper {
  position: relative;
  width: 100%;
}

/* Expand button — appears on hover, top-right of the wrapper */
.html-render-expand-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 6px;
  color: #d1d5db;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}

.html-render-wrapper:hover .html-render-expand-btn {
  opacity: 1;
}

.html-render-expand-btn:hover {
  background: #4f46e5;
  color: #ffffff;
}

/* Preview panel aside */
#preview-panel {
  transition: width 0.2s ease;
  position: relative;
}

/* Drag handle on left edge */
.preview-panel-handle {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 10;
  background: transparent;
  transition: background 0.15s;
}

.preview-panel-handle:hover,
.preview-panel-handle:active {
  background: rgba(99, 102, 241, 0.4);
}

/* Mobile: full-screen overlay */
.preview-panel--mobile {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  z-index: 60;
}

.preview-panel--mobile .preview-panel-handle {
  display: none;
}

/* ── Light theme: preview panel ── */
.theme-light #preview-panel { background: #ffffff !important; border-color: #e2e8f0 !important; }
.theme-light #preview-panel .border-gray-800 { border-color: #e2e8f0 !important; }
.theme-light .html-render-expand-btn { background: rgba(255, 255, 255, 0.8); color: #64748b; }
.theme-light .html-render-expand-btn:hover { background: #2563eb; color: #ffffff; }
.theme-light .preview-panel-handle:hover,
.theme-light .preview-panel-handle:active { background: rgba(37, 99, 235, 0.3); }

/* ========== FILES PANEL ========== */

/* Main needs relative for drop overlay */
main { position: relative; }

/* Files panel */
#files-panel {
  transition: width 0.15s ease;
}

#files-panel .file-item.active {
  background: rgba(99, 102, 241, 0.1);
}

/* Resize handle (left edge) */
.fp-resize-handle {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 10;
  background: transparent;
  transition: background 0.15s;
}

.fp-resize-handle:hover,
.fp-resize-handle:active {
  background: rgba(99, 102, 241, 0.4);
}

/* Tab bar */
.fp-tab-bar {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 4px;
  gap: 2px;
}

.fp-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border: none;
  background: none;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fp-tab:hover {
  color: #d1d5db;
}

.fp-tab--active {
  color: #a5b4fc;
  border-bottom-color: #6366f1;
}

/* Preview header inside preview tab */
.fp-preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Toolbar buttons */
.fp-toolbar-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: #9ca3af;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.fp-toolbar-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
}

.fp-toolbar-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* File context menu */
.file-context-menu {
  position: fixed;
  z-index: 200;
  min-width: 160px;
  background: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.file-context-menu button,
.file-context-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  background: none;
  color: #d1d5db;
  font-size: 0.8125rem;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background 0.1s;
}

.file-context-menu button:hover,
.file-context-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f3f4f6;
}

.file-context-menu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  background: none;
  color: #d1d5db;
  font-size: 0.8125rem;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background 0.1s;
}

.file-context-menu-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f3f4f6;
}

.file-ctx-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 3px 6px;
}

.file-ctx-danger {
  color: #f87171 !important;
}

.file-ctx-danger:hover {
  background: rgba(248, 113, 113, 0.1) !important;
  color: #fca5a5 !important;
}

/* Mobile: files panel becomes fullscreen overlay */
@media (max-width: 1023px) {
  #files-panel:not(.hidden) {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    z-index: 55;
  }
}

/* Light theme: files panel */
.theme-light #files-panel { background: #ffffff !important; border-color: #e2e8f0 !important; }
.theme-light #files-panel .border-gray-800 { border-color: #e2e8f0 !important; }
.theme-light #files-panel .hover\:bg-gray-800:hover { background: #f1f5f9 !important; }
.theme-light .fp-toolbar-btn { color: #64748b; }
.theme-light .fp-toolbar-btn:hover:not(:disabled) { background: #f1f5f9; color: #1e293b; }
.theme-light .file-context-menu { background: #ffffff; border-color: #e2e8f0; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.theme-light .file-context-menu button,
.theme-light .file-context-menu a { color: #475569; }
.theme-light .file-context-menu button:hover,
.theme-light .file-context-menu a:hover { background: #f1f5f9; color: #1e293b; }
.theme-light .file-ctx-divider { background: #e2e8f0; }
.theme-light .file-ctx-danger { color: #dc2626 !important; }
.theme-light .file-ctx-danger:hover { background: rgba(220,38,38,0.08) !important; color: #b91c1c !important; }
.theme-light .fp-tab-bar { border-bottom-color: #e2e8f0; }
.theme-light .fp-tab { color: #94a3b8; }
.theme-light .fp-tab:hover { color: #475569; }
.theme-light .fp-tab--active { color: #2563eb; border-bottom-color: #2563eb; }
.theme-light .fp-preview-header { border-bottom-color: #e2e8f0; }
.theme-light .fp-resize-handle:hover,
.theme-light .fp-resize-handle:active { background: rgba(37, 99, 235, 0.3); }
