/* Core CSS Reset & Variable Definitions */
:root {
  --bg-primary: #0d0e12;
  --bg-secondary: #15171e;
  --bg-tertiary: #1f222d;
  --border-color: rgba(255, 255, 255, 0.06);
  --border-color-hover: rgba(255, 255, 255, 0.12);
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --primary: #6366f1; /* Indigo */
  --accent: #6366f1;
  --accent-color: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.2);
  
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #0ea5e9;
  
  --font-sans: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  --sidebar-width: 280px;
  --header-height: 64px;
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Layout Structure */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Sidebar Styling (Glassmorphism inspired) */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-header {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), #a855f7);
  color: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}

.brand span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.5px;
}

.sidebar-search {
  padding: 12px 20px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

#search-bar {
  width: 100%;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px 8px 36px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: var(--transition-smooth);
}

#search-bar:focus {
  border-color: var(--primary);
  background-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

/* Document Tree Nodes */
.document-tree {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.folder-group {
  margin-bottom: 8px;
}

.folder-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
  overflow: hidden;
  position: relative;
}

.folder-header:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.folder-header span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  display: inline-block;
  transition: transform 1.5s ease-in-out;
}

.folder-header span.running-text {
  text-overflow: clip;
  overflow: visible;
  animation: marqueeScroll 4s linear infinite alternate;
  animation-delay: 0.5s;
}

.folder-content {
  padding-left: 20px;
  border-left: 1px solid var(--border-color);
  margin-left: 15px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
  overflow: hidden;
  position: relative;
}

.doc-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.doc-item.active {
  background-color: var(--primary-glow);
  color: #a5b4fc;
  font-weight: 500;
}

.doc-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  display: inline-block;
}

/* Sidebar Unified Icon Standardizer */
.sidebar i,
.sidebar svg {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
  stroke-width: 1.75px !important;
  color: var(--text-muted);
  display: inline-block;
}

.doc-item.active i,
.doc-item.active svg {
  color: var(--primary) !important;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(var(--scroll-dist, 0px)); }
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.workspace-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
}

.btn-settings {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}
.btn-settings:hover {
  color: var(--text-primary);
}

.workspace-info i {
  width: 12px;
  height: 12px;
}

/* Main Workspace */
.main-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: var(--bg-primary);
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  outline: none;
  transition: var(--transition-smooth);
}

.btn-icon {
  padding: 8px 12px;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

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

.btn-danger {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.btn-danger:hover {
  background-color: var(--danger);
  color: white;
}

/* Welcome Screen */
.welcome-screen {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
  height: 100%;
}

.welcome-card {
  max-width: 600px;
  text-align: center;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  animation: fadeIn 0.4s ease-out;
}

.welcome-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), #a855f7);
  color: white;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.welcome-card h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  margin-bottom: 12px;
}

.welcome-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 28px;
}

.welcome-tips {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  text-align: left;
}

.welcome-tips h3 {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.welcome-tips ul {
  list-style: none;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.welcome-tips li {
  position: relative;
  padding-left: 18px;
}

.welcome-tips li::before {
  content: "•";
  color: var(--primary);
  font-weight: bold;
  font-size: 16px;
  position: absolute;
  left: 0;
  top: -2px;
}

/* Editor Container */
.editor-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.workspace-header {
  height: var(--header-height);
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

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

.doc-icon {
  color: var(--primary);
  display: flex;
  align-items: center;
}

.doc-title-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  width: 100%;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: var(--transition-smooth);
}

.doc-title-input:focus {
  border-bottom-color: var(--primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* Save Status Indicator */
.save-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.status-icon {
  width: 14px;
  height: 14px;
}

.status-icon.success-icon {
  color: var(--success);
}

.status-icon.loading-icon {
  animation: rotate 1s linear infinite;
  color: var(--info);
}

/* Mode Switcher Buttons */
.mode-switcher {
  display: flex;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2px;
}

.btn-toggle {
  background: transparent;
  border: none;
  outline: none;
  padding: 6px 12px;
  border-radius: 4px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-toggle i {
  width: 14px;
  height: 14px;
}

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

.btn-toggle.active {
  background-color: var(--bg-tertiary);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Panels */
.workspace-panels {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

.panel {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  padding: 32px;
  transition: var(--transition-smooth);
}

.preview-article {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: 80px;
}
/* Edit Mode Textarea styling */
.panel-edit {
  background-color: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
}

#markdown-textarea {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  tab-size: 4;
}

/* Toggle displays for view modes */
.mode-edit-only .panel-preview {
  display: none;
}
.mode-edit-only .panel-edit {
  border-right: none;
  flex: 1;
}

.mode-preview-only .panel-edit {
  display: none;
}
.mode-preview-only .panel-preview {
  flex: 1;
}

.mode-split-screen .panel-edit,
.mode-split-screen .panel-preview {
  flex: 1;
  width: 50%;
  display: block;
}

/* Markdown Preview Render Styles */
.markdown-body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  line-height: 1.625;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.markdown-body h1 { font-size: 1.8em; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
.markdown-body h2 { font-size: 1.4em; }
.markdown-body h3 { font-size: 1.2em; }

.markdown-body p, 
.markdown-body ul, 
.markdown-body ol,
.markdown-body table {
  margin-bottom: 16px;
  font-size: 14px;
}

.markdown-body ul, 
.markdown-body ol {
  padding-left: 20px;
}

.markdown-body li {
  margin-top: 4px;
}

.markdown-body a {
  color: var(--primary);
  text-decoration: none;
}
.markdown-body a:hover {
  text-decoration: underline;
}

.markdown-body blockquote {
  padding: 12px 16px;
  background-color: var(--bg-secondary);
  border-left: 4px solid var(--primary);
  border-radius: 0 6px 6px 0;
  margin: 16px 0;
  color: var(--text-secondary);
}

/* GitHub style Alerts */
.markdown-body blockquote.alert-note { border-left-color: var(--primary); background-color: rgba(99, 102, 241, 0.05); }
.markdown-body blockquote.alert-tip { border-left-color: var(--success); background-color: rgba(16, 185, 129, 0.05); }
.markdown-body blockquote.alert-important { border-left-color: var(--info); background-color: rgba(14, 165, 233, 0.05); }
.markdown-body blockquote.alert-warning { border-left-color: var(--warning); background-color: rgba(245, 158, 11, 0.05); }
.markdown-body blockquote.alert-caution { border-left-color: var(--danger); background-color: rgba(239, 68, 68, 0.05); }

.markdown-body code {
  font-family: var(--font-mono);
  background-color: var(--bg-tertiary);
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 85%;
  color: #ff7b72;
}

.markdown-body pre {
  margin: 16px 0;
  background-color: #161b22;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: auto;
}

.markdown-body pre code {
  color: #c9d1d9;
  background-color: transparent;
  padding: 16px;
  display: block;
  font-size: 13px;
  overflow-x: auto;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

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

.markdown-body th {
  background-color: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
}

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

/* Task Checklists */
.markdown-body ul.task-list {
  list-style-type: none;
  padding-left: 4px;
}

.markdown-body ul.task-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.markdown-body ul.task-list input[type="checkbox"] {
  margin-top: 5px;
  accent-color: var(--primary);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Loading skeleton keyframes */
.loading-skeleton {
  height: 20px;
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border-color-hover) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

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

/* Settings Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.2s ease-out;
}

.modal-card {
  width: 900px;
  height: 620px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
  display: flex;
  overflow: hidden;
  position: relative;
  animation: modalScaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

/* Modal Close Button */
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  z-index: 9999 !important;
  transition: var(--transition-smooth);
}
.modal-close:hover {
  color: var(--text-primary);
}

/* Modal Sidebar Navigation */
.modal-sidebar {
  width: 220px;
  background: rgba(0, 0, 0, 0.15);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
}

.modal-sidebar h3 {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  padding-left: 8px;
}

.modal-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  margin-bottom: 2px;
}
.modal-nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}
.modal-nav-item.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--primary);
  font-weight: 500;
}

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

.modal-content-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.modal-content-header {
  margin-bottom: 24px;
}

.modal-content-header h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  margin-bottom: 4px;
}

.modal-content-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Settings Sections */
.settings-section {
  margin-bottom: 28px;
}

.settings-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

/* Chat Settings Cards & Toggles */
.settings-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.settings-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-info label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.settings-info span {
  font-size: 11px;
  color: var(--text-muted);
}

/* Switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-tertiary);
  transition: .2s;
  border-radius: 34px;
  border: 1px solid var(--border-color);
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .2s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--primary);
  border-color: transparent;
}
input:checked + .slider:before {
  transform: translateX(22px);
  background-color: white;
}

/* General Input Controls in Settings */
.settings-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.settings-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.settings-select {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  width: 100%;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.settings-select:focus {
  border-color: var(--primary);
}

/* Theme Color Picker Row Layout */
.theme-config-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.theme-config-box h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.theme-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 12px;
}

.theme-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.theme-item label {
  font-size: 11px;
  color: var(--text-muted);
}

.color-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px 8px;
  gap: 8px;
  height: 36px;
}

.color-picker {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: none;
}
.color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}
.color-picker::-webkit-color-swatch {
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.color-hex {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  width: 100%;
  outline: none;
  text-transform: uppercase;
}

/* Dashboard Styles */
.dashboard-container {
  width: 100%;
  max-width: 1000px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  animation: fadeIn 0.4s ease-out;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, rgba(64, 120, 242, 0.05) 0%, rgba(64, 120, 242, 0.01) 100%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body.theme-light .dashboard-header {
  background: linear-gradient(135deg, rgba(64, 120, 242, 0.04) 0%, rgba(64, 120, 242, 0.01) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.dashboard-title-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboard-title-info h1,
.dashboard-title-info h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.dashboard-title-info p {
  font-size: 14px;
  color: var(--text-secondary);
}

.recent-files-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.recent-files-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.recent-files-header h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.badge {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.table-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.recent-files-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.recent-files-table th,
.recent-files-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
}

.recent-files-table th {
  background-color: rgba(0, 0, 0, 0.12);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.theme-light .recent-files-table th {
  background-color: rgba(0, 0, 0, 0.03);
}

.recent-files-table tr:last-child td {
  border-bottom: none;
}

.recent-files-table tbody tr {
  cursor: pointer;
  transition: var(--transition-smooth);
}

.recent-files-table tbody tr:hover {
  background-color: var(--bg-tertiary);
}

.recent-files-table td.empty-table-state {
  text-align: center;
  color: var(--text-muted);
  padding: 48px;
  font-style: italic;
}

.recent-link {
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.recent-link:hover {
  text-decoration: underline;
}

/* Custom modal configurations */
.select-doc-modal {
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

/* Toast UI Editor Custom Styles & Theme Overrides */
.toastui-editor-defaultUI {
  border: none !important;
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-sans) !important;
  height: 100% !important;
}

.toastui-editor-toolbar {
  background-color: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-color) !important;
  padding: 6px 12px !important;
}

.toastui-editor-toolbar-group {
  margin-right: 12px !important;
}

.toastui-editor-main {
  background-color: var(--bg-primary) !important;
}

.toastui-editor-main-container {
  color: var(--text-primary) !important;
  background-color: var(--bg-primary) !important;
}

.toastui-editor-ww-container {
  background-color: var(--bg-primary) !important;
}

.toastui-editor-md-container {
  background-color: var(--bg-primary) !important;
}

.toastui-editor-contents {
  color: var(--text-primary) !important;
  background-color: var(--bg-primary) !important;
  font-family: var(--font-sans) !important;
  font-size: 14px !important;
  line-height: 1.625 !important;
}

.toastui-editor-contents p,
.toastui-editor-contents h1,
.toastui-editor-contents h2,
.toastui-editor-contents h3,
.toastui-editor-contents h4,
.toastui-editor-contents h5,
.toastui-editor-contents h6,
.toastui-editor-contents li,
.toastui-editor-contents th,
.toastui-editor-contents td {
  color: var(--text-primary) !important;
}

.toastui-editor-contents pre {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px !important;
}

.toastui-editor-contents code {
  background-color: var(--bg-tertiary) !important;
  color: #ff7b72 !important;
  font-family: var(--font-mono) !important;
  border-radius: 4px !important;
  padding: 2px 4px !important;
}

/* Toolbar button styling overrides */
.toastui-editor-toolbar button {
  color: var(--text-secondary) !important;
  border: 1px solid transparent !important;
  background-color: transparent !important;
  border-radius: 4px !important;
  transition: var(--transition-smooth) !important;
}

body.theme-dark .toastui-editor-toolbar button {
  filter: invert(0.85) !important;
}

.toastui-editor-toolbar button:hover {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
}

.toastui-editor-toolbar button.active {
  background-color: var(--bg-tertiary) !important;
  color: var(--primary) !important;
  border-color: var(--border-color) !important;
}

/* Editor Popup Windows */
.toastui-editor-popup {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
  border-radius: 8px !important;
  color: var(--text-primary) !important;
}

.toastui-editor-popup label {
  color: var(--text-secondary) !important;
}

.toastui-editor-popup input {
  background-color: var(--bg-primary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: 4px !important;
}

.toastui-editor-button-container button {
  border-radius: 4px !important;
}

.toastui-editor-button-container .toastui-editor-ok-button {
  background-color: var(--primary) !important;
  color: #ffffff !important;
  border: none !important;
}

.toastui-editor-button-container .toastui-editor-ok-button:hover {
  background-color: var(--primary-hover) !important;
}

.toastui-editor-button-container .toastui-editor-close-button {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
}

/* Mode Switch Tabs at the bottom */
.toastui-editor-mode-switch {
  background-color: var(--bg-secondary) !important;
  border-top: 1px solid var(--border-color) !important;
  height: 34px !important;
  padding: 0 12px !important;
  display: flex !important;
  align-items: center !important;
}

.toastui-editor-mode-switch .tab-item {
  border: 1px solid var(--border-color) !important;
  background-color: var(--bg-primary) !important;
  color: var(--text-secondary) !important;
  border-radius: 4px !important;
  margin-right: 6px !important;
  font-size: 11px !important;
  padding: 4px 10px !important;
  line-height: 1 !important;
  height: 22px !important;
}

.toastui-editor-mode-switch .tab-item.active {
  background-color: var(--bg-tertiary) !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
  font-weight: 600 !important;
}

/* Mermaid SVG Preview Container styling */
.mermaid {
  background-color: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  padding: 20px !important;
  margin: 16px 0 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

body.theme-light .mermaid {
  background-color: rgba(0, 0, 0, 0.01) !important;
}

/* WYSIWYG code block custom height */
.toastui-editor-ww-codeblock {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px !important;
}

/* Premium Workspace Header Design & Alignment */
.mode-switcher {
  display: flex;
  gap: 6px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.workspace-header .btn,
.workspace-header .btn-toggle {
  height: 32px !important;
  padding: 0 14px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-family: var(--font-sans) !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  border: 1px solid var(--border-color) !important;
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  outline: none !important;
  transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.workspace-header .btn:hover,
.workspace-header .btn-toggle:hover:not(.active) {
  transform: translateY(-1px);
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: var(--border-color-hover) !important;
}

body.theme-light .workspace-header .btn:hover,
body.theme-light .workspace-header .btn-toggle:hover:not(.active) {
  background-color: rgba(0, 0, 0, 0.03) !important;
}

.workspace-header .btn:active,
.workspace-header .btn-toggle:active {
  transform: translateY(0);
}

.workspace-header .btn-toggle.active {
  background-color: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(0, 122, 204, 0.25) !important;
}

.workspace-header #btn-delete {
  background-color: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.2) !important;
  color: var(--danger) !important;
}

.workspace-header #btn-delete:hover {
  background-color: var(--danger) !important;
  color: #ffffff !important;
  border-color: var(--danger) !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25) !important;
}

/* Mermaid SVG Zoom Modal & Cursor styling */
.panel-preview .mermaid {
  cursor: zoom-in;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.panel-preview .mermaid:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 4px 16px rgba(0, 122, 204, 0.15) !important;
}

.panel-preview .mermaid::after {
  content: "🔍 Click to Zoom";
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.panel-preview .mermaid:hover::after {
  opacity: 1;
}

body.theme-dark .mermaid-modal-body {
  background-color: rgba(255, 255, 255, 0.02) !important;
}

#mermaid-modal-content svg {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
}

/* Custom language select dropdown styled to match editor theme */
.toastui-editor-ww-code-block-language {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
  width: 130px !important;
  height: 28px !important;
  padding: 2px !important;
}

.slate-language-dropdown {
  width: 100%;
  height: 100%;
  border: none !important;
  outline: none !important;
  background-color: transparent !important;
  color: var(--text-primary) !important;
  font-family: var(--font-sans) !important;
  font-size: 12px !important;
  cursor: pointer !important;
}

.slate-language-dropdown option {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

/* Glassmorphic Auth Layout */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at top left, rgba(0, 122, 204, 0.12), transparent 45%),
              radial-gradient(circle at bottom right, rgba(239, 68, 68, 0.04), transparent 45%),
              var(--bg-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.auth-card {
  background-color: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  width: 420px;
  padding: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: authEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body.theme-light .auth-card {
  background-color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}

@keyframes authEntrance {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.auth-logo {
  width: 48px;
  height: 48px;
  background-color: var(--primary);
  color: #ffffff;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(0, 122, 204, 0.3);
}

.auth-card h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 30px;
  text-align: center;
}

.auth-tabs {
  display: flex;
  width: 100%;
  background-color: var(--bg-secondary);
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
  box-sizing: border-box;
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.active {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

body.theme-light .auth-tab.active {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.auth-group label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.auth-input {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
  width: 100% !important;
  outline: none !important;
  box-sizing: border-box !important;
  font-family: var(--font-sans) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.auth-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.15) !important;
}

.auth-submit-btn {
  width: 100%;
  height: 40px !important;
  margin-top: 10px;
  justify-content: center;
  font-size: 13px !important;
  border-radius: 8px !important;
}

.auth-error-msg {
  width: 100%;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger);
  font-size: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 18px;
  text-align: center;
  box-sizing: border-box;
}

/* MCP Auth Card Overrides */
.mcp-auth-card {
  width: 480px;
}

.mcp-permissions-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 24px;
  box-sizing: border-box;
}

.mcp-permission-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-primary);
}

.mcp-permission-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.mcp-action-buttons {
  display: flex;
  width: 100%;
  gap: 12px;
}

.mcp-btn {
  flex: 1;
  height: 40px !important;
  justify-content: center;
  border-radius: 8px !important;
}

.mcp-success-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: authEntrance 0.3s ease forwards;
}

/* Profile Footer styling */
.user-profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 4px;
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

body.theme-light .user-profile-card {
  background-color: rgba(0, 0, 0, 0.01);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 122, 204, 0.2);
}

.user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.user-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  color: var(--danger);
  background-color: rgba(239, 68, 68, 0.1);
}

/* Segmented Control Switcher styling */
.workspace-header .mode-switcher {
  display: inline-flex !important;
  background-color: var(--bg-secondary) !important;
  padding: 2px !important;
  border-radius: 8px !important;
  border: 1px solid var(--border-color) !important;
  gap: 0 !important;
  align-items: center !important;
}

.workspace-header .mode-switcher .btn-toggle {
  height: 28px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  background-color: transparent !important;
  color: var(--text-secondary) !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transform: none !important;
  transition: all 0.15s ease !important;
}

.workspace-header .mode-switcher .btn-toggle.active {
  background-color: var(--bg-primary) !important;
  color: var(--primary) !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
  transform: none !important;
}

body.theme-light .workspace-header .mode-switcher .btn-toggle.active {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

.workspace-header .mode-switcher .btn-toggle:hover:not(.active) {
  color: var(--text-primary) !important;
  background-color: rgba(255, 255, 255, 0.04) !important;
  border-color: transparent !important;
  transform: none !important;
}

body.theme-light .workspace-header .mode-switcher .btn-toggle:hover:not(.active) {
  background-color: rgba(0, 0, 0, 0.02) !important;
}

/* Settings Modal Tabs & Profile styling */
.settings-tab-pane.hidden {
  display: none !important;
}

.settings-profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 16px 20px;
  border-radius: 8px;
  margin-top: 12px;
}

.settings-avatar-badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  font-family: var(--font-display);
  box-shadow: 0 4px 12px rgba(0, 122, 204, 0.15);
}

body.theme-light .settings-avatar-badge {
  box-shadow: 0 4px 12px rgba(0, 122, 204, 0.08);
}

.settings-profile-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-profile-details h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-sans);
}

.settings-profile-details p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
}

/* Dashboard Recent Files Refinements */
.recent-link {
  font-weight: 500 !important;
  color: var(--text-primary) !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.recent-link i {
  color: var(--primary) !important;
  width: 15px !important;
  height: 15px !important;
}

.owner-badge-cell {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.owner-avatar-circle {
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  background-color: var(--bg-tertiary) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-color) !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: var(--font-sans) !important;
}

/* Pastel Badge Styles for Folders */
.badge.prd {
  background-color: rgba(64, 120, 242, 0.12) !important;
  color: var(--primary) !important;
  border-color: rgba(64, 120, 242, 0.25) !important;
}

.badge.daily-activities {
  background-color: rgba(245, 158, 11, 0.12) !important;
  color: #f59e0b !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
}

.badge.personal {
  background-color: rgba(16, 185, 129, 0.12) !important;
  color: #10b981 !important;
  border-color: rgba(16, 185, 129, 0.25) !important;
}

/* Sleek Workspace Header Overrides */
.workspace-header {
  background: var(--bg-primary) !important;
}

.workspace-header .btn {
  height: 32px !important;
  padding: 0 12px !important;
  background-color: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  color: var(--text-secondary) !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
  transform: none !important;
}

.workspace-header .btn:hover {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
  transform: none !important;
  box-shadow: none !important;
}

.workspace-header #btn-delete {
  color: var(--danger) !important;
}

.workspace-header #btn-delete:hover {
  background-color: rgba(239, 68, 68, 0.1) !important;
  color: var(--danger) !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
  box-shadow: none !important;
}

/* Micro pill style Saved status */
.workspace-header .save-status {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  font-size: 11px !important;
  color: var(--text-muted) !important;
  margin-right: 8px !important;
  height: 24px !important;
}

.workspace-header .save-status .status-icon {
  width: 12px !important;
  height: 12px !important;
}

/* Sidebar tree actions button (3-dots) */
.folder-header, .doc-item {
  position: relative !important;
}

.btn-tree-actions {
  position: absolute !important;
  right: 8px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 4px !important;
  border: none !important;
  background: transparent !important;
  color: var(--text-muted) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  opacity: 0 !important;
  transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease !important;
  z-index: 10 !important;
  padding: 0 !important;
}

.btn-tree-actions i,
.btn-tree-actions svg {
  width: 14px !important;
  height: 14px !important;
  color: var(--text-muted) !important;
}

.folder-header:hover .btn-tree-actions,
.doc-item:hover .btn-tree-actions {
  opacity: 1 !important;
}

.btn-tree-actions:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
}

body.theme-light .btn-tree-actions:hover {
  background-color: rgba(0, 0, 0, 0.05) !important;
}

/* Custom Context Menu styling */
.tree-context-menu {
  position: absolute !important;
  background-color: var(--bg-tertiary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px !important;
  padding: 4px !important;
  min-width: 120px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
  z-index: 1000 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

body.theme-light .tree-context-menu {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.tree-context-menu.hidden {
  display: none !important;
}

.context-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  border: none !important;
  background: transparent !important;
  color: var(--text-secondary) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  width: 100% !important;
  text-align: left !important;
  transition: background-color 0.15s ease, color 0.15s ease !important;
}

.context-item i,
.context-item svg {
  width: 14px !important;
  height: 14px !important;
}

.context-item:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-primary) !important;
}

body.theme-light .context-item:hover {
  background-color: rgba(0, 0, 0, 0.03) !important;
}

.context-item.danger:hover {
  background-color: rgba(239, 68, 68, 0.1) !important;
  color: var(--danger) !important;
}

/* Premium Dashboard Mockup Layout */
.dashboard-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 8px !important;
}

.dashboard-header-block {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.dashboard-title-info h1,
.dashboard-title-info h2 {
  font-family: var(--font-display) !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  margin: 0 0 6px 0 !important;
}

.dashboard-title-info p {
  font-size: 13px !important;
  color: var(--text-muted) !important;
  margin: 0 !important;
}

/* Metrics Row */
.metrics-row {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
}

.metric-card {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  padding: 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

body.theme-light .metric-card {
  background-color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 4px 12px rgba(0,0,0,0.01) !important;
}

.metric-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08) !important;
}

.metric-icon-wrap {
  width: 46px !important;
  height: 46px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.metric-icon-wrap i,
.metric-icon-wrap svg {
  width: 22px !important;
  height: 22px !important;
}

.metric-icon-wrap.blue {
  background-color: rgba(37, 99, 235, 0.1) !important;
  color: #2563eb !important;
}

.metric-icon-wrap.green {
  background-color: rgba(16, 185, 129, 0.1) !important;
  color: #10b981 !important;
}

.metric-icon-wrap.purple {
  background-color: rgba(168, 85, 247, 0.1) !important;
  color: #a855f7 !important;
}

.metric-icon-wrap.orange {
  background-color: rgba(249, 115, 22, 0.1) !important;
  color: #f97316 !important;
}

.metric-content {
  display: flex !important;
  flex-direction: column !important;
}

.metric-content h2 {
  font-family: var(--font-display) !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  margin: 0 0 2px 0 !important;
}

.metric-label {
  font-size: 12px !important;
  color: var(--text-muted) !important;
  font-weight: 500 !important;
  margin-bottom: 6px !important;
}

.metric-trend {
  font-size: 11px !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-weight: 600 !important;
}

.metric-trend i,
.metric-trend svg {
  width: 12px !important;
  height: 12px !important;
}

.metric-trend.up {
  color: #10b981 !important;
}

.metric-trend.down {
  color: #ef4444 !important;
}

.metric-trend .trend-text {
  font-weight: 400 !important;
  color: var(--text-muted) !important;
}

/* Two-Column Split Layout */
.dashboard-split {
  display: grid !important;
  grid-template-columns: 1fr 320px !important;
  gap: 20px !important;
  width: 100% !important;
}

@media (max-width: 900px) {
  .dashboard-split {
    grid-template-columns: 1fr !important;
  }
}

.recent-files-section {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  padding: 20px !important;
}

body.theme-light .recent-files-section {
  background-color: #ffffff !important;
}

.recent-files-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 16px !important;
}

.recent-files-header h2 {
  font-family: var(--font-display) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  margin: 0 !important;
}

.view-all-link {
  font-size: 12px !important;
  color: var(--primary) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.view-all-link i,
.view-all-link svg {
  width: 12px !important;
  height: 12px !important;
}

/* Sidebar Widgets Column */
.dashboard-sidebar-widgets {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

.widget-card {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  padding: 16px !important;
}

body.theme-light .widget-card {
  background-color: #ffffff !important;
}

.widget-card h3 {
  font-family: var(--font-display) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  color: var(--text-muted) !important;
  margin: 0 0 12px 0 !important;
}

/* Calendar Widget styling */
.calendar-widget .calendar-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 12px !important;
}

.calendar-widget .calendar-header h3 {
  margin: 0 !important;
  text-transform: none !important;
  color: var(--text-primary) !important;
  font-size: 14px !important;
}

.calendar-arrows {
  display: flex !important;
  gap: 4px !important;
}

.cal-arrow-btn {
  width: 24px !important;
  height: 24px !important;
  border-radius: 4px !important;
  border: none !important;
  background: transparent !important;
  color: var(--text-muted) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

.cal-arrow-btn:hover {
  background-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

.calendar-days-grid {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  text-align: center !important;
  font-size: 11px !important;
  row-gap: 8px !important;
}

.calendar-days-grid span {
  font-weight: 500 !important;
  color: var(--text-secondary) !important;
  padding: 4px 0 !important;
}

.calendar-days-grid span.muted {
  color: rgba(255, 255, 255, 0.2) !important;
}

body.theme-light .calendar-days-grid span.muted {
  color: rgba(0, 0, 0, 0.25) !important;
}

.calendar-days-grid span.active {
  background-color: #2563eb !important;
  color: #ffffff !important;
  border-radius: 50% !important;
  font-weight: 700 !important;
  width: 22px !important;
  height: 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto !important;
}

/* Activity Feed Widget styling */
.feed-widget .feed-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 12px !important;
}

.feed-widget .feed-header h3 {
  margin: 0 !important;
}

.feed-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.feed-item {
  display: flex !important;
  gap: 10px !important;
  align-items: flex-start !important;
}

.feed-avatar-circle {
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
}

.feed-avatar-circle.blue { background-color: #2563eb !important; }
.feed-avatar-circle.green { background-color: #10b981 !important; }
.feed-avatar-circle.purple { background-color: #a855f7 !important; }

.feed-item-desc {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.feed-item-desc p {
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1.4 !important;
  color: var(--text-secondary) !important;
}

.feed-item-desc span {
  font-size: 10px !important;
  color: var(--text-muted) !important;
}

/* Quick Links Widget styling */
.quick-links-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
}

.quick-link-card {
  background-color: var(--bg-tertiary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  padding: 10px 4px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  transition: border-color 0.15s ease, background-color 0.15s ease !important;
}

body.theme-light .quick-link-card {
  background-color: #f8fafc !important;
}

.quick-link-card:hover {
  border-color: var(--primary) !important;
}

.quick-link-card span {
  font-size: 10px !important;
  font-weight: 500 !important;
  text-align: center !important;
  color: var(--text-secondary) !important;
}

.quick-link-icon-wrap {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.quick-link-icon-wrap i,
.quick-link-icon-wrap svg {
  width: 16px !important;
  height: 16px !important;
}

.quick-link-icon-wrap.blue {
  background-color: rgba(37, 99, 235, 0.1) !important;
  color: #2563eb !important;
}

.quick-link-icon-wrap.green {
  background-color: rgba(16, 185, 129, 0.1) !important;
  color: #10b981 !important;
}

.quick-link-icon-wrap.purple {
  background-color: rgba(168, 85, 247, 0.1) !important;
  color: #a855f7 !important;
}

/* Dark Sidebar override to match corporate mockup */
.sidebar {
  background: #0b1528 !important;
  color: #f1f5f9 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.sidebar-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.brand-logo {
  background: #2563eb !important; /* solid blue logo */
  color: #ffffff !important;
}

.sidebar h2, .sidebar h3, .sidebar span, .sidebar a, .sidebar button {
  color: #f1f5f9;
}

.doc-item {
  color: #94a3b8 !important;
}

.doc-item:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
}

.doc-item.active {
  background-color: #2563eb !important; /* Blue active link */
  color: #ffffff !important;
}

.folder-header {
  color: #cbd5e1 !important;
}

.folder-header:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
}

.btn-sidebar-new {
  background: #2563eb !important;
  color: #ffffff !important;
}

.btn-sidebar-new:hover {
  background: #1d4ed8 !important;
}

.user-profile-card {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.user-profile-details h3 {
  color: #ffffff !important;
}

.user-profile-details p {
  color: #94a3b8 !important;
}

/* Guidelines for nested folders in dark sidebar */
.folder-content {
  border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Force light mode background styling for main workspace welcome dashboard to match corporate dashboard mockup */
body.theme-light .main-workspace {
  background-color: #f8fafc !important;
}

/* Ensure all sidebar SVG/Lucide icons are visible on the dark navy background regardless of general theme */
.sidebar svg,
.sidebar i,
.sidebar .chevron-icon,
.sidebar [data-lucide],
.btn-settings svg,
.btn-logout svg {
  color: #94a3b8 !important;
  fill: none !important;
}

/* Hover states for sidebar items makes icons white */
.folder-header:hover svg,
.folder-header:hover i,
.doc-item:hover svg,
.doc-item:hover i,
.btn-settings:hover svg,
.btn-settings:hover i,
.btn-logout:hover svg,
.btn-logout:hover i {
  color: #ffffff !important;
}

/* Active document item icon color */
.doc-item.active svg,
.doc-item.active i {
  color: #ffffff !important;
}

/* Professional Settings Modal and Activity Feed Styles */
#settings-modal .modal-card {
  width: 1150px;
  max-width: 95vw;
  height: 680px;
}

#table-settings-activity th {
  padding: 12px 16px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
}

#table-settings-activity td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 12px;
}

#table-settings-activity tbody tr {
  transition: background 0.15s ease;
}

#table-settings-activity tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Document link styling in activity */
.activity-doc-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}

.activity-doc-link:hover {
  border-bottom-color: var(--accent);
  filter: brightness(1.2);
}

/* VS Code style tabs */
.editor-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  border-top: 2px solid transparent;
  border-right: 1px solid var(--border-color);
  padding: 6px 16px;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  border-radius: 4px 4px 0 0;
  transition: background-color 0.2s, color 0.2s;
  height: 31px;
  box-sizing: border-box;
}

.editor-tab:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.editor-tab.active {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border-top-color: var(--primary);
  font-weight: 500;
}

.editor-tab .tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1;
  transition: background-color 0.2s, color 0.2s;
}

.editor-tab .tab-close:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

/* Icon button style overrides for balanced square layout */
.icon-btn-only {
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-secondary) !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

.icon-btn-only:hover {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color-hover) !important;
}

.icon-btn-only i {
  width: 18px !important;
  height: 18px !important;
}

/* Collaborative viewer avatars */
.viewer-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  border: 2px solid var(--border-color);
  position: relative;
  cursor: default;
  transition: transform 0.2s;
}

.viewer-avatar:hover {
  transform: scale(1.1);
  z-index: 10;
}

/* --- CODE BLOCKS AND INLINE CODE THEMING (GITHUB / ANTIGRAVITY STYLE) --- */

/* Default / Dark Mode */
.toastui-editor-contents pre,
.markdown-body pre {
  background-color: #161b22 !important;
  border: 1px solid #30363d !important;
  border-radius: 8px !important;
  padding: 16px !important;
  margin: 16px 0 !important;
}

.toastui-editor-contents pre code,
.markdown-body pre code {
  color: #c9d1d9 !important;
  background-color: transparent !important;
  font-family: var(--font-mono) !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  padding: 0 !important;
  display: block !important;
}

.toastui-editor-contents code,
.markdown-body code {
  background-color: rgba(110, 118, 129, 0.4) !important;
  color: #ff9591 !important;
  font-family: var(--font-mono) !important;
  border-radius: 6px !important;
  padding: 3px 6px !important;
  font-size: 85% !important;
}

/* Ensure code block code elements don't get inline code styles */
.toastui-editor-contents pre code,
.markdown-body pre code {
  background-color: transparent !important;
  color: #c9d1d9 !important;
  padding: 0 !important;
}

/* Dark Mode Token Highlight Overrides */
.toastui-editor-contents pre .token.comment,
.toastui-editor-contents pre .token.prolog,
.toastui-editor-contents pre .token.doctype,
.toastui-editor-contents pre .token.cdata,
.markdown-body pre .token.comment {
  color: #8b949e !important;
  font-style: italic !important;
}
.toastui-editor-contents pre .token.keyword,
.markdown-body pre .token.keyword {
  color: #ff7b72 !important;
  font-weight: 600 !important;
}
.toastui-editor-contents pre .token.string,
.markdown-body pre .token.string {
  color: #a5d6ff !important;
}
.toastui-editor-contents pre .token.number,
.toastui-editor-contents pre .token.boolean,
.markdown-body pre .token.number,
.markdown-body pre .token.boolean {
  color: #79c0ff !important;
}
.toastui-editor-contents pre .token.function,
.markdown-body pre .token.function {
  color: #d2a8ff !important;
}
.toastui-editor-contents pre .token.operator,
.toastui-editor-contents pre .token.punctuation,
.markdown-body pre .token.operator,
.markdown-body pre .token.punctuation {
  color: #c9d1d9 !important;
}
.toastui-editor-contents pre .token.class-name,
.markdown-body pre .token.class-name {
  color: #ffa657 !important;
}
.toastui-editor-contents pre .token.property,
.markdown-body pre .token.property {
  color: #79c0ff !important;
}

/* Light Mode Overrides */
body.theme-light .toastui-editor-contents pre,
body.theme-light .markdown-body pre {
  background-color: #f6f8fa !important;
  border: 1px solid #d0d7de !important;
}

body.theme-light .toastui-editor-contents pre code,
body.theme-light .markdown-body pre code {
  color: #24292f !important;
}

body.theme-light .toastui-editor-contents code,
body.theme-light .markdown-body code {
  background-color: rgba(175, 184, 193, 0.2) !important;
  color: #cf222e !important;
}

/* Ensure light theme code blocks don't get red inline color */
body.theme-light .toastui-editor-contents pre code,
body.theme-light .markdown-body pre code {
  background-color: transparent !important;
  color: #24292f !important;
}

/* Light Mode Token Highlight Overrides */
body.theme-light .toastui-editor-contents pre .token.comment,
body.theme-light .markdown-body pre .token.comment {
  color: #57606a !important;
  font-style: italic !important;
}
body.theme-light .toastui-editor-contents pre .token.keyword,
body.theme-light .markdown-body pre .token.keyword {
  color: #cf222e !important;
  font-weight: 600 !important;
}
body.theme-light .toastui-editor-contents pre .token.string,
body.theme-light .markdown-body pre .token.string {
  color: #0a3069 !important;
}
body.theme-light .toastui-editor-contents pre .token.number,
body.theme-light .toastui-editor-contents pre .token.boolean,
body.theme-light .markdown-body pre .token.number,
body.theme-light .markdown-body pre .token.boolean {
  color: #0550ae !important;
}
body.theme-light .toastui-editor-contents pre .token.function,
body.theme-light .markdown-body pre .token.function {
  color: #8250df !important;
}
body.theme-light .toastui-editor-contents pre .token.operator,
body.theme-light .toastui-editor-contents pre .token.punctuation,
body.theme-light .markdown-body pre .token.operator,
body.theme-light .markdown-body pre .token.punctuation {
  color: #24292f !important;
}
body.theme-light .toastui-editor-contents pre .token.class-name,
body.theme-light .markdown-body pre .token.class-name {
  color: #953800 !important;
}
body.theme-light .toastui-editor-contents pre .token.property,
body.theme-light .markdown-body pre .token.property {
  color: #0550ae !important;
}

/* Full Width Editor Mode */
.editor-full-width .toastui-editor-contents,
.editor-full-width .toastui-editor-defaultUI,
.editor-full-width .markdown-body {
  max-width: none !important;
}

.editor-full-width .preview-article {
  max-width: none !important;
  padding-left: 32px !important;
  padding-right: 32px !important;
}

/* --- Document Audit Trail & History Drawer --- */
.audit-drawer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  backdrop-filter: blur(2px);
  transition: opacity 0.3s ease;
}

.audit-drawer {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  height: 100vh;
  background: var(--bg-primary);
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.audit-drawer.open {
  right: 0;
}

.audit-drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
}

.audit-drawer-filters {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.audit-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
}

/* Timeline Components */
.audit-timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

.audit-timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 14px;
  width: 2px;
  background: var(--border-color);
  z-index: 0;
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 16px;
  z-index: 1;
}

.timeline-node {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.timeline-node.create { border-color: var(--success); color: var(--success); }
.timeline-node.edit { border-color: var(--accent); color: var(--accent); }
.timeline-node.approve { border-color: #10B981; color: #10B981; }
.timeline-node.system { border-color: var(--text-muted); color: var(--text-muted); }

.timeline-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  flex: 1;
}

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.timeline-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.timeline-time {
  font-size: 11px;
  color: var(--text-muted);
}

.timeline-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.timeline-comment {
  font-size: 12px;
  color: var(--text-primary);
  background: rgba(0,0,0,0.03);
  padding: 8px;
  border-radius: 4px;
  border-left: 2px solid var(--accent);
  margin-bottom: 10px;
}
body.theme-dark .timeline-comment { background: rgba(255,255,255,0.05); }

/* Diff View Highlights */
.diff-old del {
  background-color: rgba(239, 68, 68, 0.2);
  text-decoration: line-through;
  color: var(--text-primary);
}
.diff-new ins {
  background-color: rgba(16, 185, 129, 0.2);
  text-decoration: none;
  color: var(--text-primary);
}

/* Mobile responsive enhancements */
.mobile-top-bar {
  display: none;
  height: 56px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  position: sticky;
  top: 0;
  width: 100%;
  flex-shrink: 0;
}

body.theme-light .mobile-top-bar {
  background-color: #ffffff;
}

.btn-mobile-menu {
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.btn-mobile-menu:hover {
  background-color: var(--bg-tertiary);
}

body.theme-light .btn-mobile-menu:hover {
  background-color: #f1f5f9;
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .mobile-top-bar {
    display: flex;
  }
  
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    bottom: 0;
    width: 280px;
    height: 100vh;
    z-index: 999;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .sidebar.active {
    left: 0;
  }
  
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    z-index: 990;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .sidebar-overlay.active {
    display: block;
    opacity: 1;
  }
  
  .app-container {
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }
  
  .main-workspace {
    height: calc(100vh - 56px);
    overflow: hidden;
  }
  
  /* Dashboard tweaks */
  .dashboard-container {
    padding: 16px !important;
  }
  
  .dashboard-header-block {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }
  
  .metrics-row {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  .dashboard-split {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  /* Header tweaks */
  .workspace-header {
    padding: 0 8px !important;
    height: 48px !important;
    min-height: 48px !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }
  
  .header-left {
    flex: 1 1 auto !important;
    max-width: none !important;
    width: auto !important;
  }

  .header-left .doc-icon {
    display: none !important;
  }

  .header-left #doc-breadcrumb {
    display: none !important;
  }

  .doc-title-input {
    font-size: 13px !important;
  }
  
  .header-middle {
    flex: 0 0 auto !important;
  }

  .mode-switcher .btn-toggle span {
    display: none !important;
  }

  .mode-switcher .btn-toggle {
    padding: 6px 8px !important;
  }

  .header-right {
    flex: 0 0 auto !important;
    width: auto !important;
    justify-content: flex-end !important;
    gap: 4px !important;
  }
  
  #btn-toggle-width, #btn-history {
    display: none !important;
  }

  .save-status-capsule {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    height: auto !important;
  }

  .save-status-capsule span.status-text {
    display: none !important;
  }

  .save-status-capsule #btn-refresh {
    width: 28px !important;
    height: 28px !important;
  }
  
  /* Hide split screen switch option on small screens */
  .btn-toggle[id="mode-split"] {
    display: none !important;
  }
  
  /* Panel styling for editing on mobile */
  .panel {
    padding: 16px !important;
  }
  
  .welcome-card {
    padding: 20px !important;
    margin: 10px !important;
  }
  
  /* Modal responsive adjustment */
  .modal-card {
    flex-direction: column !important;
    width: 95% !important;
    max-height: 90vh !important;
  }
  
  .modal-sidebar {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-color);
    padding: 16px !important;
  }
  
  .modal-content {
    padding: 16px !important;
  }
  
  #settings-nav {
    flex-direction: row !important;
    overflow-x: auto;
    gap: 12px;
  }
  
  #settings-nav button {
    white-space: nowrap;
  }
}

/* Custom Toggle Switch for Public Sharing */
.switch-container input:checked + .slider {
  background-color: var(--primary) !important;
}

.switch-container .slider::before {
  content: "";
  position: absolute;
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-primary);
  transition: .3s;
  border-radius: 50%;
}

.switch-container input:checked + .slider::before {
  transform: translateX(16px);
}

/* Inline Comments styling */
.preview-article > *, #markdown-content > * {
  position: relative;
  margin-bottom: 20px;
}

/* Color identification for sections with active comments */
.preview-article > .has-active-comments, #markdown-content > .has-active-comments {
  border-left: 4px solid var(--primary) !important;
  padding-left: 16px !important;
  background: rgba(99, 102, 241, 0.06) !important;
  border-radius: 4px;
}

body.light-theme .preview-article > .has-active-comments, body.light-theme #markdown-content > .has-active-comments {
  background: rgba(99, 102, 241, 0.03) !important;
}

/* Comment trigger button showing on block hover */
.inline-comment-trigger-btn {
  position: absolute;
  left: -36px;
  top: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 10;
}

/* If a block has comments, keep trigger bubble permanently visible and highlighted! */
.inline-comment-trigger-btn.has-comments {
  opacity: 0.8;
  color: var(--primary);
  border-color: var(--primary);
}

.preview-article > *:hover .inline-comment-trigger-btn, #markdown-content > *:hover .inline-comment-trigger-btn {
  opacity: 1;
}

.inline-comment-trigger-btn:hover {
  color: var(--primary);
  border-color: rgba(99, 102, 241, 0.4);
  background: var(--bg-tertiary);
}

@media (max-width: 900px) {
  .inline-comment-trigger-btn {
    left: auto;
    right: 4px;
    opacity: 0.35;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
  .inline-comment-trigger-btn:hover {
    opacity: 1;
    background: transparent !important;
  }
  .inline-comment-trigger-btn.has-comments {
    opacity: 0.8;
    color: var(--primary);
  }
}

/* Comments section container below blocks */
.inline-comments-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-top: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

body.light-theme .inline-comments-section {
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.inline-comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  max-height: 250px;
  overflow-y: auto;
}

.inline-comment-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.inline-comment-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.inline-comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 11px;
}

.inline-comment-author {
  font-weight: 600;
  color: var(--text-primary);
}

.inline-comment-body {
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: pre-wrap;
}

.inline-comment-input-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.inline-comment-input-area textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
  outline: none;
}

.inline-comment-input-area textarea:focus {
  border-color: var(--primary);
}

.btn-comment-submit {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 12px;
  transition: background 0.2s;
}

.btn-comment-submit:hover {
  background: #4f46e5;
}

.inline-comment-section-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
  font-weight: 500;
}

body.light-theme .inline-comment-section-badge {
  background: rgba(99, 102, 241, 0.05);
  color: var(--primary);
}

.btn-comment-resolve {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  transition: all 0.2s ease;
}

.btn-comment-resolve:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

/* --- SPA LANDING PAGE STYLING SYSTEM --- */
/* Enable viewport scrolling on landing and login pages */
html[data-slate-page="landing"],
html[data-slate-page="landing"] body,
html[data-slate-page="login"],
html[data-slate-page="login"] body {
  height: auto !important;
  overflow: auto !important;
  overflow-x: hidden !important;
}

.landing-page {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  position: relative;
  scroll-behavior: smooth;
}

/* Gradients */
.landing-page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08), transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(239, 68, 68, 0.05), transparent 45%);
  pointer-events: none;
  z-index: 1;
}

/* Header */
.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 16px 0;
}
.landing-header-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.landing-brand-logo {
  background: var(--accent);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 18px;
}
.landing-brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
}
.landing-nav {
  display: flex;
  gap: 24px;
}
.landing-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s;
}
.landing-nav-link:hover, .landing-nav-link.active {
  color: var(--accent);
}
.btn-landing-login {
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
}

/* Inner layouts */
.landing-section {
  padding: 100px 24px;
  position: relative;
  z-index: 5;
}
.landing-container-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Hero Section */
.hero-section {
  padding-top: 160px;
}
.hero-wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-content .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  margin-bottom: 24px;
}
.hero-content .badge-text {
  font-size: 12px;
  font-weight: 600;
  color: #a5b4fc;
}
.hero-content h1 {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero-content h1 span {
  background: linear-gradient(135deg, #818cf8, #e066ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-content p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 32px;
}
.hero-buttons {
  display: flex;
  gap: 16px;
}
.btn-cta-start {
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
}
.btn-cta-mcp {
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
}

/* Hero Mockup showcase */
.showcase-browser {
  background: #1e293b;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.browser-header {
  background: #0f172a;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border-color);
}
.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.browser-dot.red { background: #ef4444; }
.browser-dot.yellow { background: #f59e0b; }
.browser-dot.green { background: #10b981; }
.browser-address {
  margin-left: 20px;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.05);
  color: var(--text-muted);
  font-size: 11px;
  padding: 2px 24px;
  border-radius: 4px;
  flex: 1;
  text-align: center;
}
.browser-body {
  height: 280px;
  display: grid;
  grid-template-columns: 140px 1fr;
  font-size: 12px;
}
.showcase-sidebar {
  background: #0f172a;
  border-right: 1px solid var(--border-color);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-item {
  color: var(--text-muted);
  padding: 4px 6px;
  border-radius: 4px;
}
.sidebar-item.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}
.sidebar-item.sub {
  margin-left: 12px;
}
.showcase-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #15171e;
}
.showcase-code {
  padding: 16px;
  border-right: 1px solid var(--border-color);
  font-family: var(--font-mono);
  color: #a5b4fc;
}
.showcase-code .code-comment { color: var(--text-muted); }
.showcase-preview {
  padding: 16px;
  position: relative;
}
.showcase-preview h3 { margin: 0 0 10px 0; }
.showcase-preview pre {
  background: #1e293b;
  padding: 8px;
  border-radius: 6px;
  font-size: 11px;
}
.ai-comment-bubble {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(99, 102, 241, 0.95);
  padding: 8px 12px;
  border-radius: 8px;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Why Slate Text Slider */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 50px auto;
}
.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}
.section-header p {
  color: var(--text-secondary);
}
.slider-wrapper {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.slider-container {
  height: 180px;
  position: relative;
}
.slider-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
  pointer-events: none;
}
.slider-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.slide-icon {
  font-size: 40px;
  margin-bottom: 16px;
}
.slider-slide h3 {
  font-size: 22px;
  margin-bottom: 12px;
}
.slider-slide p {
  color: var(--text-secondary);
  line-height: 1.6;
}
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 20px;
}
.slider-arrow {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}
.slider-arrow:hover {
  background: var(--border-color);
}
.slider-dots {
  display: flex;
  gap: 8px;
}
.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: all 0.2s;
}
.slider-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

/* MCP & AI Section */
.mcp-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.mcp-content h2 {
  font-size: 36px;
  margin: 10px 0 20px 0;
}
.mcp-badge {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-block;
}
.mcp-feature-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}
.mcp-feature-list li {
  display: flex;
  gap: 16px;
}
.mcp-feature-list li .icon {
  font-size: 24px;
}
.mcp-feature-list li strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}
.mcp-feature-list li span {
  color: var(--text-secondary);
}
.diagram-card {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
}
.diagram-card pre {
  background: #1e293b;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
}
.diagram-footer {
  margin-top: 16px;
  font-size: 13px;
  color: #a5b4fc;
}

/* Pricing cards grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  align-items: stretch;
}
.pricing-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.3s;
}
.pricing-card:hover {
  transform: translateY(-4px);
}
.pricing-card.premium {
  border-color: var(--accent);
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), rgba(255,255,255,0.02));
}
.pricing-card-header h3 {
  font-size: 20px;
  margin-bottom: 12px;
}
.pricing-card-header .price {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}
.pricing-card-header .price span {
  font-size: 14px;
  font-weight: normal;
  color: var(--text-secondary);
}
.pricing-card-header p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 24px;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.pricing-features li {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pricing-features li::before {
  content: "✓";
  color: var(--accent);
  font-weight: bold;
}
.pricing-features li.incl {
  color: var(--text-primary);
  font-weight: 500;
}
.pricing-card .card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Contact us */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.contact-info h2 {
  font-size: 36px;
  margin-bottom: 16px;
}
.contact-meta {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-form {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  padding: 30px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.landing-footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13px;
}

/* Mobile Menu Button for Landing Page */
.btn-landing-mobile-menu {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.2s;
  align-items: center;
  justify-content: center;
}
.btn-landing-mobile-menu:hover {
  background-color: rgba(255, 255, 255, 0.05);
}
body.theme-light .btn-landing-mobile-menu:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Responsive adjustments */
@media (max-width: 968px) {
  .btn-landing-mobile-menu {
    display: flex;
  }
  .landing-header-wrap {
    position: relative;
    padding: 0 16px;
  }
  .landing-nav {
    display: none;
    position: absolute;
    top: calc(100% + 16px);
    left: 16px;
    right: 16px;
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    z-index: 1001;
  }
  body.theme-light .landing-nav {
    background: #ffffff;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  }
  .landing-nav.active {
    display: flex;
  }
  .hero-wrap, .mcp-grid, .contact-wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto;
  }
  .hero-content h1 {
    font-size: 36px;
  }
  .landing-section {
    padding: 80px 16px;
  }
  .hero-section {
    padding-top: 120px;
  }
  .slider-wrapper {
    padding: 24px 16px;
  }
  .slider-container {
    height: auto;
    min-height: 240px;
  }
  .browser-body {
    grid-template-columns: 1fr;
    height: auto;
  }
  .showcase-sidebar {
    display: none;
  }
  .showcase-main {
    grid-template-columns: 1fr;
  }
  .showcase-code {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
}

@media (max-width: 576px) {
  .hero-buttons {
    flex-direction: column;
    gap: 12px;
  }
  .hero-buttons .btn {
    width: 100%;
    text-align: center;
  }
  .hero-content h1 {
    font-size: 28px;
  }
  .section-header h2 {
    font-size: 28px;
  }
  .contact-form {
    padding: 20px 16px;
  }
}


/* Light Theme overrides for Landing Page */
body.theme-light .landing-page {
  background-color: #f8fafc; /* slate-50 */
  color: #0f172a; /* slate-900 */
}
body.theme-light .landing-page::before {
  background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.04), transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(239, 68, 68, 0.02), transparent 45%);
}
body.theme-light .landing-header {
  background: rgba(248, 250, 252, 0.8);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
body.theme-light .landing-brand-name {
  color: #0f172a;
}
body.theme-light .landing-nav-link {
  color: #475569; /* slate-600 */
}
body.theme-light .landing-nav-link:hover,
body.theme-light .landing-nav-link.active {
  color: var(--accent);
}
body.theme-light .btn-landing-login {
  background: #0f172a;
  color: white;
  border: none;
}
body.theme-light .btn-landing-login:hover {
  background: #1e293b;
  color: white;
}
body.theme-light .hero-content p {
  color: #475569; /* slate-600 */
}
body.theme-light .btn-cta-mcp {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}
body.theme-light .btn-cta-mcp:hover {
  background: #f1f5f9;
}
body.theme-light .slider-wrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}
body.theme-light .slider-slide p {
  color: #475569;
}
body.theme-light .slider-arrow {
  border-color: #cbd5e1;
  color: #0f172a;
}
body.theme-light .slider-arrow:hover {
  background: #f1f5f9;
}
body.theme-light .slider-dot {
  background: rgba(0, 0, 0, 0.15);
}
body.theme-light .slider-dot.active {
  background: var(--accent);
}
body.theme-light .mcp-feature-list li span {
  color: #475569;
}
body.theme-light .pricing-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}
body.theme-light .pricing-card.premium {
  border-color: var(--accent);
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.02), #ffffff);
}
body.theme-light .pricing-card-header p {
  color: #475569;
}
body.theme-light .pricing-features li {
  color: #475569;
}
body.theme-light .btn-pricing-cta {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}
body.theme-light .btn-pricing-cta:hover {
  background: #e2e8f0;
}
body.theme-light .pricing-card.premium .btn-pricing-cta {
  background: var(--accent);
  color: white;
  border: none;
}
body.theme-light .pricing-card.premium .btn-pricing-cta:hover {
  background: #4f46e5;
}
body.theme-light .contact-form {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}
body.theme-light .landing-footer {
  border-top-color: #e2e8f0;
  color: #64748b;
}

/* Landing Page Quality of Life Fixes */
.landing-nav-link, .landing-brand, .btn {
  outline: none !important;
}
body.theme-light .landing-brand-logo {
  background: var(--primary) !important;
  color: #ffffff !important;
}
body.theme-light .landing-nav-link {
  color: #1e293b !important;
}
body.theme-light .landing-nav-link:hover,
body.theme-light .landing-nav-link.active {
  color: var(--primary) !important;
}

/* Toast UI Editor WYSIWYG Table Selection & Resize Enhancements */
.toastui-editor-contents table,
.toastui-editor-ww-container table {
  border-collapse: collapse !important;
  width: 100% !important;
  margin: 16px 0 !important;
}

.toastui-editor-contents th,
.toastui-editor-contents td,
.toastui-editor-ww-container th,
.toastui-editor-ww-container td {
  border: 1px solid var(--border-color) !important;
  padding: 8px 12px !important;
  text-align: left !important;
  position: relative !important;
}

/* Ensure headers have proper readable background and text contrast in all themes */
.toastui-editor-contents th,
.toastui-editor-ww-container th {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  font-weight: 600 !important;
}

body.theme-light .toastui-editor-contents th,
body.theme-light .toastui-editor-ww-container th {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

body.theme-dark .toastui-editor-contents th,
body.theme-dark .toastui-editor-ww-container th {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

/* Style active cell selection highlights in the editor */
.toastui-editor-ww-container td.toastui-editor-cell-selected,
.toastui-editor-ww-container th.toastui-editor-cell-selected {
  background-color: rgba(99, 102, 241, 0.15) !important;
  outline: 2px solid var(--primary) !important;
  outline-offset: -1px;
}

/* Fix popup/context menu overlays z-index and visibility */
.toastui-editor-popup,
.toastui-editor-context-menu {
  z-index: 9999 !important;
}


