/* Custom styles for Local AI Search Engine */
:root {
  --bg-main: #0a0e17;
  --bg-card: rgba(22, 28, 45, 0.65);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --bg-sidebar: rgba(15, 23, 42, 0.95);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(99, 102, 241, 0.4);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --accent-color: #6366f1;
  --accent-color-hover: #4f46e5;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.2) transparent;
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  height: 100vh;
  display: flex;
  overflow: hidden;
}

/* App Layout */
.app-container {
  display: flex;
  flex-direction: row-reverse;
  width: 100%;
  height: 100vh;
  position: relative;
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
}

/* Sidebar Styling */
.sidebar {
  width: 320px;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  z-index: 10;
  backdrop-filter: blur(16px);
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-header svg {
  width: 32px;
  height: 32px;
  stroke: url(#gradient);
}

.logo-text h1 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Import Card */
.import-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.import-card:hover {
  border-color: var(--border-color-hover);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.1);
}

.import-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 50%;
  color: var(--accent-color);
}

.import-card h3 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.import-card p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s, transform 0.1s;
  width: 100%;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(1px);
}

/* Stats Section */
.status-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-section h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 2px;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* Progress Area */
.progress-container {
  display: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 8px;
  margin-top: 8px;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--accent-gradient);
  transition: width 0.2s ease;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.progress-log {
  font-family: monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  max-height: 50px;
  overflow-y: auto;
  margin-top: 6px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Sidebar Footer & Settings */
.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Search Header */
.search-header {
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-box-container {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 54px 16px 54px;
  color: var(--text-primary);
  font-size: 1.05rem;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.temp-upload-btn {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: all 0.2s;
}

.temp-upload-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-color);
}

.search-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 4px 30px rgba(99, 102, 241, 0.15);
  background: var(--bg-card-hover);
}

.search-icon-btn {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.3s;
}

.search-input:focus + .search-icon-btn {
  color: var(--accent-color);
}

/* Search suggestions dropdown helper */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-top: 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
  display: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.suggestion-item {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: background 0.2s, color 0.2s;
}

.suggestion-item:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--text-primary);
}

/* Search Controls (Filters & Toggle) */
.search-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

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

.filter-badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.filter-badge.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-color);
  color: var(--text-primary);
}

.search-info-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Results Content Area */
.results-area {
  flex: 1;
  overflow-y: auto;
  padding: 0 40px 40px;
}

/* Empty State / Welcome Screen */
.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 70%;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.welcome-icon {
  width: 80px;
  height: 80px;
  background: rgba(99, 102, 241, 0.06);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  margin-bottom: 24px;
  animation: float 4s ease-in-out infinite;
}

.welcome-screen h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.welcome-screen p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Results List */
.results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Result Card */
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s;
}

.result-card:hover {
  border-color: var(--border-color-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.result-card:hover::before {
  opacity: 1;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.result-title-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-type-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.type-txt { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.type-md { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.type-pdf { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.type-docx { background: rgba(79, 70, 229, 0.15); color: #4f46e5; }
.type-msg { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }
.type-excel { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.type-code { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.type-image { background: rgba(236, 72, 153, 0.15); color: #ec4899; }

.result-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.result-score {
  font-size: 0.7rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-color);
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.result-path {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-family: monospace;
}

.result-snippet {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.result-snippet mark {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-bottom: 1px solid #d97706;
  padding: 0 2px;
  border-radius: 2px;
}

.result-footer {
  display: flex;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 12px;
}

.result-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.result-meta-item svg {
  width: 14px;
  height: 14px;
}

/* Document Viewer Modal Overlay */
.viewer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.viewer-window {
  background: #111725;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 100%;
  max-width: 1100px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.viewer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.viewer-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  margin-right: 16px;
}

.viewer-title h3 {
  font-size: 1.1rem;
  font-weight: 600;
  word-break: break-all;
  white-space: normal;
  line-height: 1.4;
}

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

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

.btn-icon.close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--error-color);
  color: var(--error-color);
}

/* Viewer Body Layout (Split View: Summary/Meta on Left, Content on Right) */
.viewer-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.viewer-side {
  width: 300px;
  border-right: 1px solid var(--border-color);
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: rgba(0, 0, 0, 0.15);
}

.viewer-main-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background: #0d121f;
  position: relative;
  scroll-padding-top: 180px;
}

.viewer-side-section h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 600;
}

.viewer-summary-box {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 8px;
  padding: 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.viewer-summary-box p {
  margin-bottom: 8px;
}

.viewer-summary-box p:last-child {
  margin-bottom: 0;
}

.viewer-similar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.viewer-similar-item {
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.viewer-similar-item:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--accent-color);
}

.viewer-similar-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.viewer-similar-meta {
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* Document Content Rendering */
.doc-content-pre {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text-secondary);
}

/* Highlight style in full document viewer */
.doc-content-pre mark, .doc-markdown-render mark {
  background: rgba(245, 158, 11, 0.35);
  color: #fff;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 500;
}

.doc-markdown-render {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.doc-markdown-render h1, .doc-markdown-render h2, .doc-markdown-render h3 {
  color: var(--text-primary);
  margin: 20px 0 10px;
}

.doc-markdown-render p {
  margin-bottom: 12px;
}

.doc-markdown-render code {
  font-family: monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  color: #fbbf24;
}

/* Modals General (Settings, Synonym Panel) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-window {
  background: #111725;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 100%;
  max-width: 550px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: zoomIn 0.25s ease-out;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Form Styles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--accent-color);
}

/* Synonym List Panel */
.synonym-list-container {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  max-height: 180px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.1);
}

.synonym-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
}

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

.synonym-keys {
  font-weight: 600;
  color: var(--accent-color);
}

.synonym-values {
  color: var(--text-secondary);
}

.synonym-delete {
  color: var(--error-color);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.05);
}

.synonym-delete:hover {
  background: rgba(239, 68, 68, 0.2);
}

.synonym-form-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap: 8px;
}

/* PDF/Word guide section */
.guide-box {
  background: rgba(245, 158, 11, 0.04);
  border: 1px dashed rgba(245, 158, 11, 0.3);
  padding: 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  color: #f59e0b;
  line-height: 1.5;
}

.guide-box ol {
  padding-left: 16px;
  margin-top: 4px;
}

/* Notifications toasts */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.toast {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  border-left: 4px solid var(--accent-color);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 0.85rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 250px;
  animation: slideInRight 0.25s ease-out;
}

.toast.toast-success { border-left-color: var(--success-color); }
.toast.toast-error { border-left-color: var(--error-color); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Loading skeleton overlay in result card */
.skeleton-result {
  height: 120px;
  background: linear-gradient(90deg, rgba(255,255,255,0.01) 25%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.01) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* AI Q&A Chat Styling */
.ai-response-card {
  background: linear-gradient(135deg, rgba(27, 35, 48, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.ai-response-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
}

.ai-response-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.ai-response-status {
  font-size: 0.75rem;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-color);
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-response-status.running {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.ai-response-status.running::before {
  content: '';
  width: 6px;
  height: 6px;
  background-color: var(--warning-color);
  border-radius: 50%;
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.3); opacity: 1; }
}

.ai-response-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 4px;
  min-height: 40px;
}

/* Citation markers */
.ai-response-text .citation-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 4px;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  font-weight: 700;
  margin: 0 3px;
  vertical-align: super;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-response-text .citation-badge:hover {
  background: var(--accent-color);
  color: #fff;
  transform: scale(1.1);
}

/* AI Rendered Table Styles */
.ai-table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.4);
  margin: 4px 0 0 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.ai-rendered-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.825rem;
  text-align: left;
}

.ai-rendered-table th {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-color);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 2px solid rgba(99, 102, 241, 0.3);
}

.ai-rendered-table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  white-space: nowrap;
}

.ai-rendered-table tr:last-child td {
  border-bottom: none;
}

.ai-rendered-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.ai-rendered-table tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

/* AI Tab Container & Buttons */
.ai-response-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.ai-tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-tab-btn:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--border-color-hover);
  color: var(--text-primary);
}

.ai-tab-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-color);
  color: var(--accent-color);
  font-weight: 600;
}

.ai-tab-panel {
  display: none;
  animation: fadeIn 0.2s ease-in-out;
}

.ai-tab-panel.active {
  display: block;
}

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

.ai-response-footer {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
}

/* AI Rendered Email Card Styles */
.ai-email-card {
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(30, 41, 59, 0.25);
  margin: 4px 0 0 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.ai-email-header {
  background: rgba(99, 102, 241, 0.08);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-email-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.ai-email-badge {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-color);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.ai-email-filename {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 250px;
}

.ai-email-header-row {
  display: flex;
  font-size: 0.8rem;
  line-height: 1.4;
}

.ai-email-header-row .label {
  color: var(--text-muted);
  width: 70px;
  font-weight: 600;
  flex-shrink: 0;
}

.ai-email-header-row .val {
  color: var(--text-primary);
  word-break: break-all;
}

.ai-email-body {
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.ai-email-body p {
  margin: 0 0 8px 0;
}
.ai-email-body p:last-child {
  margin-bottom: 0;
}

/* AI Rendered Document Card Styles */
.ai-doc-card {
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.3);
  margin: 4px 0 0 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.ai-doc-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-doc-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* Document Type Badge Colors */
.ai-doc-badge.type-pdf {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}
.ai-doc-badge.type-docx {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}
.ai-doc-badge.type-md {
  background: rgba(20, 184, 166, 0.15);
  color: #2dd4bf;
}
.ai-doc-badge.type-code {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
.ai-doc-badge.type-txt {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}
.ai-doc-badge.type-excel,
.ai-doc-badge.type-xlsx,
.ai-doc-badge.type-xls {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
.ai-doc-badge.type-msg {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}
.ai-doc-badge.type-tiff {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}
.ai-doc-badge.type-image,
.ai-doc-badge.type-png,
.ai-doc-badge.type-jpg,
.ai-doc-badge.type-jpeg {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
}

/* Tab panels container */
.ai-tab-panels {
  min-height: 60px;
}

.ai-doc-name {
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-grow: 1;
}

.ai-doc-body {
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.ai-doc-body p {
  margin: 0 0 8px 0;
}
.ai-doc-body p:last-child {
  margin-bottom: 0;
}

/* AI Error Box */
.ai-error-box {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  padding: 16px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* AI Sources Section */
.ai-sources-section {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.ai-sources-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.ai-sources-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.ai-source-badge:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--border-color-hover);
  color: var(--text-primary);
}

.ai-source-index {
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

/* Sync Index Button Icon Micro-Animation */
#syncIndexBtn:hover .sync-icon-rotate {
  transform: rotate(180deg);
}

.sync-icon-rotate {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Synced Folder Item Hover Animations */
.synced-folder-item {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.synced-folder-item:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(99, 102, 241, 0.25) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Settings Tabs Styling */
.settings-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 12px 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
  outline: none;
}

.settings-tab-btn:hover {
  color: var(--text-primary);
}

.settings-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

/* Split Layout for Settings Modal */
.settings-split-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  border-top: 1px solid var(--border-color);
}

.settings-tab-sidebar {
  width: 210px;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.15);
  border-right: 1px solid var(--border-color);
  padding: 16px 8px;
  gap: 6px;
  flex-shrink: 0;
  overflow-y: auto;
}

/* Override tab button styles for vertical layout */
.settings-tab-sidebar .settings-tab-btn {
  text-align: left;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  width: 100%;
  transition: all 0.25s ease;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  position: relative;
  outline: none;
}

.settings-tab-sidebar .settings-tab-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.settings-tab-sidebar .settings-tab-btn.active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--text-primary);
}

/* Remove horizontal active line */
.settings-tab-sidebar .settings-tab-btn.active::after {
  display: none;
}

/* Vertical accent bar on the left of active tab */
.settings-tab-sidebar .settings-tab-btn.active::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

/* Make sure modal-body fills the remaining space */
#settingsModal .modal-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  max-height: none;
}

/* Settings modal sidebar clear index button */
.settings-tab-sidebar #clearIndexBtn {
  margin-top: auto;
  color: var(--error-color);
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.03);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.25s ease;
}

.settings-tab-sidebar #clearIndexBtn:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--error-color);
}

/* Responsive adjustments */
@media (max-width: 680px) {
  .settings-split-container {
    flex-direction: column;
  }
  .settings-tab-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 16px;
    white-space: nowrap;
    gap: 12px;
  }
  .settings-tab-sidebar .settings-tab-btn {
    width: auto;
    padding: 8px 12px;
    text-align: center;
  }
  .settings-tab-sidebar #clearIndexBtn {
    margin-top: 0;
    width: auto;
    padding: 8px 12px;
  }
  .settings-tab-sidebar .settings-tab-btn.active::before {
    display: none;
  }
  .settings-tab-sidebar .settings-tab-btn.active::after {
    display: block;
    content: '';
    position: absolute;
    bottom: 2px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--accent-gradient);
  }
  #settingsModal .modal-body {
    max-height: 45vh;
  }
}

/* E-Posta Sonuç Kartı ve Önizleme Arayüzü */
.email-meta-card {
  background: rgba(99, 102, 241, 0.04);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0 12px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.email-meta-row {
  display: flex;
  font-size: 0.8rem;
  line-height: 1.4;
}

.email-meta-label {
  color: var(--text-secondary);
  font-weight: 600;
  width: 80px;
  flex-shrink: 0;
}

.email-meta-value {
  color: var(--text-primary);
  word-break: break-all;
}

.email-viewer-container {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.email-viewer-header {
  background: rgba(99, 102, 241, 0.04);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.email-viewer-meta-row {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  line-height: 1.5;
}

.email-meta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  margin-right: 8px;
  flex-shrink: 0;
}

.email-viewer-label {
  color: var(--text-secondary);
  font-weight: 600;
  width: 70px;
  flex-shrink: 0;
}

.email-viewer-value {
  color: var(--text-primary);
  word-break: break-all;
}

.email-sender-text {
  font-weight: 500;
  color: #a5b4fc;
}

.email-subject-text {
  font-weight: 600;
}

.email-viewer-body {
  padding: 20px;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
  overflow-y: auto;
  white-space: pre-wrap;
  background: transparent;
}

/* Zengin Metin ve Markdown Gösterim Stilleri */
.doc-markdown-render ul, .doc-markdown-render ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.doc-markdown-render li {
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.doc-markdown-render a {
  color: var(--accent-color);
  text-decoration: none;
  border-bottom: 1px dashed rgba(99, 102, 241, 0.4);
  transition: all 0.2s;
}

.doc-markdown-render a:hover {
  color: #a5b4fc;
  border-bottom-color: var(--accent-color);
}

.doc-markdown-render blockquote {
  border-left: 4px solid var(--accent-color);
  background: rgba(99, 102, 241, 0.03);
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-secondary);
}

.doc-markdown-render table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.85rem;
}

.doc-markdown-render th, .doc-markdown-render td {
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  text-align: left;
}

.doc-markdown-render th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-weight: 600;
}

.doc-markdown-render td {
  color: var(--text-secondary);
}

.doc-markdown-render tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}

.doc-markdown-render pre {
  background: rgba(0, 0, 0, 0.25) !important;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
  overflow-x: auto;
  margin: 16px 0;
}

.doc-markdown-render pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: #e2e8f0;
}

.doc-markdown-render hr {
  border: 0;
  height: 1px;
  background: var(--border-color);
  margin: 24px 0;
}

/* Tekli Evrak Görüntüleme Arama Paneli (Sticky Header) */
.doc-search-container {
  display: none;
  flex-direction: column;
  gap: 8px;
  background: #0d121f;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  position: sticky;
  top: -24px;
  z-index: 100;
  margin-left: -24px;
  margin-right: -24px;
  padding: 16px 24px;
}

#docSearchResults {
  display: none;
  max-height: 150px;
  overflow-y: auto;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  margin-top: 4px;
  font-size: 0.8rem;
  border-top: 1px solid var(--border-color);
}

/* Excel Tablo Önizleme Stilleri */
.excel-viewer-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.excel-sheet-section {
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
}

.excel-table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #0b0f19;
}

.excel-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.excel-table-wrapper th, 
.excel-table-wrapper td {
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  text-align: left;
  min-width: 85px;
  white-space: nowrap;
}

.excel-table-wrapper th {
  background-color: rgba(99, 102, 241, 0.12);
  color: var(--text-primary);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
}

.excel-table-wrapper tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}

.excel-table-wrapper tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

/* Aktif arama eşleşmesi vurgu animasyonu */
@keyframes activeMatchPulse {
  0% {
    background-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 0 0px rgba(245, 158, 11, 0.7);
    transform: scale(1);
  }
  30% {
    background-color: rgba(245, 158, 11, 0.95);
    box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    transform: scale(1.1);
  }
  100% {
    background-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 0 0px rgba(245, 158, 11, 0);
    transform: scale(1);
  }
}

.active-match-pulse {
  animation: activeMatchPulse 1.2s ease-in-out 2;
  outline: 3px dashed var(--accent-color) !important;
  outline-offset: 3px;
  position: relative;
  z-index: 5;
  transition: outline 0.3s, transform 0.3s;
  display: inline-block; /* ölçeklendirme efekti için */
}

/* PDF Satır İşaretçisi */
@keyframes pdfRowFlash {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  40% {
    opacity: 0.6;
  }
  60% {
    opacity: 1;
  }
  80% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
  }
}

.pdf-row-indicator {
  position: absolute;
  left: 2%;
  width: 96%;
  height: 2px;
  background-color: #f59e0b;
  pointer-events: none;
  z-index: 10;
  animation: pdfRowFlash 3s forwards;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.9);
}

/* Range input custom styling for premium look */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  height: 6px;
  border-radius: 3px;
  outline: none;
  transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-gradient);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
  transition: transform 0.1s, background 0.3s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: var(--accent-gradient);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
  transition: transform 0.1s, background 0.3s;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.2);
}

/* Sidebar toggle notch (only visible on mobile/tablet) */
.sidebar-toggle-notch {
  display: none;
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 80; /* sits below the sidebar but above main content */
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: 8px 0 0 8px; /* rounded on the left side */
  width: 32px;
  height: 48px;
  cursor: pointer;
  box-shadow: -2px 0 10px rgba(99, 102, 241, 0.3);
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-toggle-notch:hover {
  width: 38px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

/* Responsive sidebar configuration */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    z-index: 95;
    transform: translateX(100%);
    border-left: none;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  #closeSidebarBtn {
    display: flex !important;
  }
  
  .sidebar-toggle-notch {
    display: flex;
  }
}

/* Onboarding overlay styling */
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 80; /* below settings modal (100) and toasts (1000) */
  background: rgba(10, 14, 23, 0.4);
  backdrop-filter: blur(2px);
  pointer-events: none; /* click-through so it doesn't block interactions */
  opacity: 1;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  visibility: visible;
}

.onboarding-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.onboarding-item {
  position: absolute;
}

.glow-dot {
  width: 12px;
  height: 12px;
  background-color: var(--accent-color);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 12px var(--accent-color);
}

.glow-dot::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border: 2px solid var(--accent-color);
  border-radius: 50%;
  animation: pulseGlow 1.8s infinite ease-out;
  opacity: 0;
}

@keyframes pulseGlow {
  0% {
    transform: scale(0.6);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.onboarding-card {
  position: absolute;
  width: 250px;
  background: rgba(17, 23, 41, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.onboarding-card h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 6px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.onboarding-card p {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Card positioning relative to the dot */
.onboarding-item .card-bottom {
  top: 50px;
  left: 0;
  transform: translateX(-50%);
}

.onboarding-item .card-bottom-right {
  top: 30px;
  left: 45px;
}

.onboarding-item .card-bottom-left {
  top: 15px;
  right: 45px;
}

.onboarding-item .card-inwards-left {
  top: 20px;
  right: 180px;
}

.onboarding-item .card-inwards-left-bottom {
  bottom: 20px;
  right: 180px;
}

.onboarding-dismiss-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 23, 41, 0.85);
  border: 1px solid var(--border-color);
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
  pointer-events: none;
  animation: pulseOpacity 2s infinite alternate;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

@keyframes pulseOpacity {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* On mobile/tablet, hide the onboarding because layout changes and screen is too small */
@media (max-width: 1024px) {
  .onboarding-overlay {
    display: none !important;
  }
}

