/* ===================================================================
   WorkTrack OS - Design System & Modern Responsive Stylesheet
   Theme: Sleek Obsidian Glassmorphism with Vibrant Accents
   =================================================================== */

:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;

  /* Color Palette - Obsidian Dark */
  --bg-deep: #080b12;
  --bg-base: #0d121f;
  --bg-surface: #131a2c;
  --bg-card: rgba(19, 26, 44, 0.75);
  --bg-card-hover: rgba(28, 38, 64, 0.85);
  --bg-card-active: rgba(35, 48, 80, 0.95);
  --bg-input: rgba(10, 15, 26, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-bright: rgba(255, 255, 255, 0.22);

  /* Vibrant Accents */
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-primary-glow: rgba(99, 102, 241, 0.25);
  
  --color-purple: #8b5cf6;
  --color-rose: #ec4899;
  --color-emerald: #10b981;
  --color-amber: #f59e0b;
  --color-cyan: #06b6d4;
  --color-blue: #3b82f6;

  /* Text Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-inverse: #0b0f19;

  /* Shadows & Glow */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
  --glow-accent: 0 0 20px rgba(99, 102, 241, 0.35);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* Transitions */
  --trans-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Core */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
}
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-bright);
}

/* Container & Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(13, 18, 31, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-primary), var(--color-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-accent);
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
}

.brand-info h1 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.header-center {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.live-clock-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-emerald);
  box-shadow: 0 0 8px var(--color-emerald);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.today-stat-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
}

.today-stat-pill .val {
  font-weight: 600;
  color: #a5b4fc;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--trans-smooth);
  border: 1px solid transparent;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-primary-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-primary-glow);
  filter: brightness(1.1);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-medium);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-bright);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}
.btn-icon:hover {
  color: var(--text-main);
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

/* Navigation Bar */
.nav-bar {
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 1.5rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.1rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--trans-fast);
  white-space: nowrap;
}

.nav-tab:hover { color: var(--text-main); }
.nav-tab.active {
  color: #ffffff;
  border-bottom-color: var(--accent-primary);
}

/* Main Content */
.main-wrapper {
  flex: 1;
  padding: 1.5rem;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-out;
}
.tab-pane.active { display: block; }

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

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-title h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-title p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--trans-smooth);
}

.glass-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.col-8 { grid-column: span 8; }
.col-4 { grid-column: span 4; }

@media (max-width: 1024px) {
  .col-8, .col-4 { grid-column: span 12; }
}

.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-metric-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.stat-metric-info .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-metric-info .number {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Project Cards */
.projects-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.project-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--proj-color, var(--accent-primary));
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.project-brand-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.project-avatar-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.06);
}

.project-title-box h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.project-category-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.progress-container {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--proj-color, var(--accent-primary)), #818cf8);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Timetable */
.timetable-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.date-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.date-display-badge {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  min-width: 220px;
  text-align: center;
}

.timetable-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timetable-hour-slot {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-subtle);
  min-height: 80px;
}

.hour-label {
  width: 60px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  text-align: right;
  padding-top: 0.25rem;
}

.hour-blocks-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.timeblock-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--block-color, var(--accent-primary));
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all var(--trans-smooth);
}

.timeblock-card:hover {
  transform: translateX(4px);
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.timeblock-card.status-completed {
  opacity: 0.75;
  background: rgba(16, 185, 129, 0.08);
  border-left-color: var(--color-emerald);
}

.timeblock-card.status-in_progress {
  border-left-color: var(--color-amber);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.15);
}

.timeblock-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.timeblock-time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.timeblock-details h4 {
  font-size: 0.95rem;
  font-weight: 600;
}

.timeblock-details p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeblock-project-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
}

.timeblock-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Weekly Plan */
.weekly-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
}

@media (max-width: 1200px) {
  .weekly-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .weekly-grid { grid-template-columns: 1fr; }
}

.day-column-card {
  display: flex;
  flex-direction: column;
  min-height: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
  gap: 1rem;
}

.day-column-card.is-today {
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px var(--accent-primary-glow);
}

.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.day-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.day-target-pill {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
}

.day-focus-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  font-size: 0.85rem;
}

.day-focus-box textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  resize: none;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

.day-scheduled-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

/* Kanban */
.tasks-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.filters-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.select-input, .text-input {
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.85rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

.select-input:focus, .text-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-primary-glow);
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1100px) {
  .kanban-board { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 650px) {
  .kanban-board { grid-template-columns: 1fr; }
}

.kanban-col {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 550px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.kanban-col-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.kanban-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.task-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  cursor: grab;
  transition: all var(--trans-smooth);
}

.task-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.task-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.task-priority-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
}

.badge-urgent { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-high { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-medium { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.badge-low { background: rgba(100, 116, 139, 0.2); color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.4); }

.task-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

.task-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Notes Split Pane */
.notes-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  height: calc(100vh - 180px);
  min-height: 550px;
}

@media (max-width: 900px) {
  .notes-layout { grid-template-columns: 1fr; height: auto; }
}

.notes-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.notes-search-bar { display: flex; gap: 0.5rem; }

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow-y: auto;
  flex: 1;
  padding-right: 0.25rem;
}

.note-item-card {
  padding: 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--trans-fast);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.note-item-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.note-item-card.active {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.12);
}

.note-item-card .title {
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.note-item-card .snippet {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-item-card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.notes-editor-pane {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  gap: 1rem;
  height: 100%;
  overflow: hidden;
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.editor-title-input {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  flex: 1;
}

.editor-body-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  flex: 1;
  overflow: hidden;
}

@media (max-width: 1200px) {
  .editor-body-split { grid-template-columns: 1fr; }
}

.markdown-textarea {
  width: 100%;
  height: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  color: var(--text-main);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  resize: none;
  outline: none;
}

.markdown-textarea:focus { border-color: var(--accent-primary); }

.markdown-preview-pane {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}

.markdown-preview-pane h1, .markdown-preview-pane h2, .markdown-preview-pane h3 {
  font-family: var(--font-display);
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
}
.markdown-preview-pane p { margin-bottom: 0.75rem; }
.markdown-preview-pane ul { margin-left: 1.25rem; margin-bottom: 0.75rem; }
.markdown-preview-pane code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.82rem;
}
.markdown-preview-pane pre {
  background: #090d16;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 0.75rem;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans-smooth);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform var(--trans-smooth);
}

.modal-overlay.active .modal-card { transform: scale(1); }

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

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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