/* ============================================
   Layer - Linear-inspired Design System
   Main Stylesheet with Liquid Glass Effects & Mobile Responsive
   ============================================ */

/* ============================================
   Mobile Layout Variables
   ============================================ */
:root {
  /* Mobile Layout - Unified Variables */
  --mobile-header-height: 0px;
  --mobile-nav-height: 0px;
  --mobile-nav-safe-area: env(safe-area-inset-bottom, 0px);
  --mobile-total-bottom: calc(var(--mobile-nav-height) + var(--mobile-nav-safe-area));
  --mobile-content-padding-top: var(--mobile-header-height);
  --mobile-content-padding-bottom: calc(var(--mobile-nav-height) + var(--mobile-nav-safe-area) + 16px);
  --mobile-side-padding: 16px;
  --mobile-card-gap: 16px;
}

/* ============================================
   Minimal Loading Screen - Smooth Motion
   ============================================ */
/* ============================================
   Minimal Loading Screen - Smooth Motion
   ============================================ */
.loading-screen {
  position: fixed;
  inset: 0;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 1s cubic-bezier(0.65, 0, 0.35, 1);
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-animation-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.logo-animation {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon-animated .logo-rect {
  opacity: 0;
  transform-origin: center;
  /* Removed blur for less glowy effect */
}

.logo-rect-1 {
  animation: logoBuildUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.05s;
}

.logo-rect-2 {
  animation: logoBuildUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.1s;
}

.logo-rect-3 {
  animation: logoBuildUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.15s;
}

.logo-rect-4 {
  animation: logoBuildUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.2s;
}

@keyframes logoBuildUp {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(15px) rotate(-5deg);
  }

  40% {
    opacity: 0.8;
    transform: scale(1.02) translateY(-3px) rotate(1deg);
  }

  70% {
    opacity: 0.95;
    transform: scale(0.98) translateY(1px) rotate(-0.5deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(0deg);
  }
}

.loading-text-minimal {
  display: flex;
  gap: 12px;
}

.loading-text-minimal .letter {
  color: white;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2em;
  opacity: 0;
  transform: translateY(5px);
  animation: letterReveal 0.8s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}

.loading-text-minimal .letter:nth-child(1) {
  animation-delay: 0.7s;
}

.loading-text-minimal .letter:nth-child(2) {
  animation-delay: 0.8s;
}

.loading-text-minimal .letter:nth-child(3) {
  animation-delay: 0.9s;
}

.loading-text-minimal .letter:nth-child(4) {
  animation-delay: 1.0s;
}

.loading-text-minimal .letter:nth-child(5) {
  animation-delay: 1.1s;
}

.ai-chat-content,
.ai-message-content,
.ai-generated-content,
.ai-doc-content {
  letter-spacing: normal;
  word-spacing: normal;
}

@keyframes letterReveal {
  to {
    opacity: 0.8;
    transform: translateY(0);
  }
}

.loading-progress-container {
  width: 120px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1px;
  overflow: hidden;
  margin-top: -8px;
}

.loading-progress-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #7c3aed, transparent);
  transform: translateX(-100%);
  animation: progressPulse 2s cubic-bezier(0.65, 0, 0.35, 1) infinite 1.2s;
}

@keyframes progressPulse {
  0% {
    transform: translateX(-100%);
  }

  50%,
  100% {
    transform: translateX(100%);
  }
}

/* Light mode for loader */
.light .loading-screen {
  background: #ffffff;
}

.light .loading-text-minimal .letter {
  color: #000;
}

.light .loading-progress-container {
  background: rgba(0, 0, 0, 0.05);
}

/* Mobile Loading Screen Enhancements */
@media (max-width: 768px) {
  .loading-animation-wrapper {
    gap: 36px;
  }

  .logo-animation {
    width: 108px;
    height: 108px;
  }

  .loading-text-minimal {
    gap: 8px;
  }

  .loading-text-minimal .letter {
    font-size: 16px;
    letter-spacing: 0.25em;
  }

  .loading-progress-container {
    width: 140px;
    margin-top: -10px;
  }
}

@media (max-width: 480px) {
  .loading-animation-wrapper {
    gap: 32px;
  }

  .logo-animation {
    width: 92px;
    height: 92px;
  }

  .loading-text-minimal {
    gap: 6px;
  }

  .loading-text-minimal .letter {
    font-size: 14px;
    letter-spacing: 0.2em;
  }

  .loading-progress-container {
    width: 120px;
    margin-top: -8px;
  }
}

/* Mobile Touch Enhancements */
@media (max-width: 768px) {

  /* Enhanced touch targets */
  button,
  .btn,
  .nav-item,
  .mobile-nav-item,
  .task-action-btn,
  .calendar-nav-btn,
  .filter-chip,
  .filter-tab,
  .kanban-add-task,
  .mobile-header-btn,
  .sidebar-create-btn,
  .mobile-search-btn,
  .mobile-search-close-btn {
    min-height: 48px;
    min-width: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* Improve scroll behavior on mobile */
  * {
    -webkit-overflow-scrolling: touch;
  }

  /* Enhanced focus states for accessibility */
  button:focus,
  .btn:focus,
  .nav-item:focus,
  .mobile-nav-item:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
  }

  /* Reduce motion for users who prefer it */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }

  /* Better mobile typography */
  body {
    -webkit-text-size-adjust: 100%;
  }

  /* Prevent overscroll bounce */
  body {
    overscroll-behavior-y: none;
  }

  /* Enhanced mobile form controls */
  input,
  textarea,
  select {
    font-size: 16px;
    /* Prevents iOS zoom on focus */
  }
}

/* ============================================
   Beta Notification Popup
   ============================================ */
.beta-notification-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.beta-notification-overlay.show {
  opacity: 1;
  visibility: visible;
}

.beta-notification {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.beta-notification-overlay.show .beta-notification {
  transform: scale(1) translateY(0);
}

.beta-notification-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: var(--surface);
  border-radius: 50%;
}

.beta-notification-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 12px;
}

.beta-notification-message {
  font-size: 14px;
  color: var(--muted-foreground);
  line-height: 1.6;
  margin-bottom: 16px;
}

.beta-notification-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted-foreground);
  cursor: pointer;
  margin-bottom: 20px;
  user-select: none;
}

.beta-notification-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

.beta-notification-close {
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.beta-notification-close:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.light .beta-notification-overlay {
  background: rgba(255, 255, 255, 0.6);
}

/* CSS Variables - Dark Theme (Default) */

:root {
  /* Core backgrounds */
  --background: hsl(240 6% 8%);
  --foreground: hsl(0 0% 96%);

  --card: hsl(240 5% 11%);
  --card-foreground: hsl(0 0% 96%);
  --card-rgb: 27, 27, 30;

  --popover: hsl(240 5% 11%);
  --popover-foreground: hsl(0 0% 96%);

  /* Primary - indigo accent */
  --primary: hsl(239 84% 67%);
  --primary-foreground: hsl(0 0% 100%);
  --primary-rgb: 99, 102, 241;

  /* Secondary */
  --secondary: hsl(240 5% 13%);
  --secondary-foreground: hsl(0 0% 96%);

  /* Muted */
  --muted: hsl(240 5% 15%);
  --muted-foreground: hsl(220 9% 62%);

  /* Accent */
  --accent: hsl(240 5% 14%);
  --accent-foreground: hsl(0 0% 96%);

  /* Destructive */
  --destructive: hsl(0 84% 60%);
  --destructive-foreground: hsl(0 0% 100%);

  /* Borders */
  --border: hsla(240, 5%, 22%, 0.7);
  --border-strong: hsla(240, 5%, 28%, 0.9);
  --input: hsl(240 5% 13%);
  --ring: hsl(239 84% 67%);

  --radius: 0.5rem;

  /* Sidebar */
  --sidebar-background: hsl(240 6% 6%);
  --sidebar-foreground: hsl(220 9% 76%);
  --sidebar-primary: hsl(240 5% 12%);
  --sidebar-primary-foreground: hsl(0 0% 100%);
  --sidebar-accent: hsl(240 5% 10%);
  --sidebar-accent-foreground: hsl(0 0% 96%);
  --sidebar-border: hsla(240, 5%, 18%, 0.9);

  /* Status colors */
  --status-todo: hsl(215 16% 47%);
  --status-in-progress: hsl(217 91% 60%);
  --status-review: hsl(271 91% 65%);
  --status-done: hsl(142 71% 45%);
  --status-backlog: hsl(215 14% 45%);

  /* Priority colors */
  --priority-high: hsl(0 84% 60%);
  --priority-medium: hsl(48 96% 53%);
  --priority-low: hsl(142 71% 45%);

  /* Surface colors */
  --surface: hsl(240 5% 10%);
  --surface-hover: hsl(240 5% 13%);

  /* Text colors */
  --text-primary: hsl(0 0% 96%);
  --text-secondary: hsl(220 9% 70%);
  --text-tertiary: hsl(220 7% 56%);

  /* Event colors */
  --event-blue: hsl(217, 91%, 60%);
  --event-green: hsl(142, 71%, 45%);
  --event-purple: hsl(271, 91%, 65%);
  --event-orange: hsl(24, 90%, 60%);
  --event-red: hsl(0, 84%, 60%);
  --event-teal: hsl(173, 80%, 40%);
  --event-yellow: hsl(45, 93%, 47%);
  --event-pink: hsl(330, 85%, 60%);
  --event-cyan: hsl(190, 90%, 45%);
  --event-gray: hsl(215, 14%, 55%);

  /* Event colors RGB for gradients */
  --event-blue-rgb: 59, 130, 246;
  --event-green-rgb: 16, 185, 129;
  --event-purple-rgb: 147, 51, 234;
  --event-orange-rgb: 249, 115, 22;
  --event-red-rgb: 239, 68, 68;
  --event-teal-rgb: 16, 185, 170;
  --event-yellow-rgb: 234, 179, 8;
  --event-pink-rgb: 236, 72, 153;
  --event-cyan-rgb: 6, 182, 212;
  --event-gray-rgb: 100, 116, 139;

  /* Glass effect variables */
  --glass-blur: 16px;
  --glass-bg: hsla(240, 5%, 12%, 0.7);
  --glass-border: hsla(240, 5%, 24%, 0.7);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);

  --sidebar-expanded-width: 180px;
  --sidebar-collapsed-width: 56px;
  --sidebar-inset: 14px;
}

/* Light Theme */
.light,
[data-mode="light"] {
  --background: hsl(210 40% 98%);
  --foreground: hsl(224 71% 4%);

  --card: hsl(0 0% 100%);
  --card-foreground: hsl(224 71% 4%);

  --popover: hsl(0 0% 100%);
  --popover-foreground: hsl(224 71% 4%);

  --primary: #6366f1;
  --primary-foreground: hsl(0 0% 100%);
  --primary-rgb: 99, 102, 241;

  --secondary: hsl(220 14% 96%);
  --secondary-foreground: hsl(224 71% 4%);

  --muted: hsl(220 14% 96%);
  --muted-foreground: hsl(220 9% 40%);

  --accent: hsl(220 14% 97%);
  --accent-foreground: hsl(224 71% 4%);

  --destructive: hsl(0 84% 60%);
  --destructive-foreground: hsl(0 0% 100%);

  --border: hsl(220 13% 91%);
  --border-strong: hsl(220 13% 84%);
  --input: hsl(220 13% 91%);

  --sidebar-background: hsl(0 0% 100%);
  --sidebar-foreground: hsl(224 71% 4%);
  --sidebar-accent: hsl(220 14% 97%);
  --sidebar-accent-foreground: hsl(224 71% 4%);
  --sidebar-border: hsl(220 13% 91%);

  --surface: hsl(0 0% 100%);
  --surface-hover: hsl(220 14% 98%);

  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(15, 23, 42, 0.10);
  --glass-shadow: 0 12px 40px rgba(15, 23, 42, 0.10);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* App Layout */
#app {
  display: flex;
  min-height: 100vh;
}

/* Icon Base */
.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ============================================
   GLOBAL LIQUID GLASS EFFECT
   ============================================ */

/* Apply subtle glass to cards globally */
.card,
.project-card,
.backlog-task,
.activity-item,
.backlog-task-card,
.settings-section,
.kanban-column,
.kanban-task,
.sidebar-section {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: all 0.2s ease;
}

.card:hover,
.project-card:hover,
.backlog-task-card:hover {
  border-color: var(--primary);
  box-shadow: var(--glass-shadow), 0 0 20px rgba(var(--primary), 0.1);
}

/* ============================================
   Sidebar - Liquid Glass
   ============================================ */
.sidebar {
  width: var(--sidebar-expanded-width);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 20px;
  position: fixed;
  left: var(--sidebar-inset);
  top: var(--sidebar-inset);
  height: calc(100vh - (var(--sidebar-inset) * 2));
  z-index: 100;
  /* Remove overflow: hidden to allow collapse button to be visible */
  overflow: visible;
  transition:
    width 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

.sidebar-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: inherit;
}

.sidebar:hover {
  box-shadow: var(--glass-shadow), 0 14px 48px rgba(0, 0, 0, 0.28);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .user-name,
.sidebar.collapsed .focus-toggle-btn span,
.sidebar.collapsed .sign-in-btn span,
.sidebar.collapsed .spaces-section-label,
.sidebar.collapsed .space-name-text {
  display: none;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 8px;
}

/* Hide workspace title when sidebar is collapsed */
.sidebar.collapsed .workspace-title {
  display: none;
}

.sidebar.collapsed .workspace-section .nav-item-nested {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  margin-left: 0;
  max-width: 100%;
}

.sidebar.collapsed .workspace-section .nav-item-nested .icon {
  width: 18px;
  height: 18px;
}

/* Project Nested Navigation Active State */
.workspace-section .nav-item-nested.active,
.workspace-section .nav-item-nested:hover {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
  border-radius: 5px;
  width: 100%;
}

.sidebar.collapsed .sidebar-create-item .icon {
  width: 18px;
  height: 18px;
}

.sidebar.collapsed .user-info {
  justify-content: center;
}

.sidebar.collapsed .sidebar-header-actions {
  flex-direction: column;
  gap: 4px;
}

.sidebar.collapsed .theme-toggle {
  display: none;
}

.sidebar.collapsed .focus-toggle-btn {
  justify-content: center;
  padding: 8px;
}

.sidebar.collapsed .sign-in-btn {
  justify-content: center;
  padding: 8px;
}

.sidebar.collapsed .custom-space-item {
  justify-content: center;
  padding: 8px;
}

.sidebar.collapsed .custom-space-item-wrapper .delete-item-btn {
  display: none;
}

.sidebar.collapsed .spaces-divider {
  margin: 6px 8px;
}

/* Hide favorite star icon when sidebar collapsed */
.sidebar.collapsed .favorite-star-right {
  display: none;
}

.sidebar-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  min-height: 56px;
  position: relative;
}

.sidebar.collapsed .sidebar-header {
  padding: 10px;
  justify-content: center;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0px;
  overflow: hidden;
}

.sidebar.collapsed .sidebar-logo {
  gap: 0;
  justify-content: center;
  width: 100%;
}

.logo-icon {
  flex-shrink: 0;
  border-radius: 6px;
  display: block;
  transition: all 0.15s ease-out;
  cursor: pointer;
  animation: logoSubtleMotion 4s ease-in-out infinite;
}

@keyframes logoSubtleMotion {

  0%,
  100% {
    transform: rotate(0.2deg) scale(1);
  }

  25% {
    transform: rotate(-0.2deg) scale(1.005);
  }

  50% {
    transform: rotate(0.2deg) scale(0.995);
  }

  75% {
    transform: rotate(-0.2deg) scale(1.002);
  }
}

.logo-icon:hover {
  transform: translateY(-2px);
  /* No glow effect */
  filter: none;
}

@keyframes logoRectStagger {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
  }

  25% {
    transform: translateY(-3px) translateX(1px) rotate(1deg);
  }

  50% {
    transform: translateY(-2px) translateX(-1px) rotate(-1deg);
  }

  75% {
    transform: translateY(-1px) translateX(1px) rotate(0.5deg);
  }

  100% {
    transform: translateY(0) translateX(0) rotate(0deg);
  }
}

.logo-icon:hover rect:nth-child(1) {
  animation: logoRectStagger 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0s;
}

.logo-icon:hover rect:nth-child(2) {
  animation: logoRectStagger 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.05s;
}

.logo-icon:hover rect:nth-child(3) {
  animation: logoRectStagger 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.logo-icon:hover rect:nth-child(4) {
  animation: logoRectStagger 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
}

.logo-text-container {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar.collapsed .logo-text-container {
  display: none;
}

.logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--foreground);
}

.logo-subtitle {
  font-size: 8px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  opacity: 0.7;
}

/* Collapse Button - ClickUp Style */
.sidebar-collapse-btn {
  width: 20px;
  height: 20px;
  min-width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  position: absolute;
  right: -10px;
  top: 28px;
  transform: translateY(-50%);
  z-index: 101;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sidebar-collapse-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.sidebar-collapse-btn .icon {
  width: 14px;
  height: 14px;
}

.sidebar-collapse-btn .expand-icon {
  display: none;
}

.sidebar.collapsed .sidebar-collapse-btn .collapse-icon {
  display: none;
}

.sidebar.collapsed .sidebar-collapse-btn .expand-icon {
  display: block;
}

.sidebar.collapsed .sidebar-collapse-btn {
  right: -10px;
  top: 28px;
  transform: translateY(-50%);
}

/* Sidebar Create Section */
.sidebar-create-section {
  padding: 8px 10px;
  position: relative;
}

.sidebar.collapsed .sidebar-create-section {
  padding: 8px 6px;
}

.sidebar-create-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-create-btn:hover {
  background: var(--surface-hover);
  border-style: solid;
  border-color: var(--primary);
  color: var(--foreground);
}

.sidebar-create-btn .dropdown-chevron {
  width: 14px;
  height: 14px;
  margin-left: auto;
  transition: transform 0.2s ease;
}

.sidebar-create-btn.active .dropdown-chevron {
  transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-create-btn span,
.sidebar.collapsed .sidebar-create-btn .dropdown-chevron {
  display: none;
}

.sidebar.collapsed .sidebar-create-btn {
  justify-content: center;
  padding: 10px;
}

.sidebar-create-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 10px;
  right: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-top: 4px;
}

.sidebar-create-dropdown.show {
  display: block;
}

.sidebar.collapsed .sidebar-create-dropdown {
  position: fixed;
  left: 60px;
  right: auto;
  width: 160px;
  top: auto;
  margin-top: 0;
}

.sidebar-create-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--foreground);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sidebar-create-item:hover {
  background: var(--surface-hover);
}

.sidebar-create-item .icon {
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
}

/* Theme Toggle in Sidebar - HIDDEN */
.sidebar-theme-toggle {
  display: none !important;
}

.sidebar.collapsed .sidebar-theme-toggle {
  display: none !important;
}

.theme-toggle {
  display: none !important;
}

.sun-icon {
  display: none !important;
}

.moon-icon {
  display: none !important;
}

/* Favorites Layout Styles */
.favorite-item-layout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.favorite-type-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted-foreground);
}

.favorite-type-icon.doc-icon {
  color: hsl(217, 91%, 60%);
}

.favorite-type-icon.excel-icon {
  color: hsl(142, 71%, 45%);
}

.favorite-star-right {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: hsl(48, 96%, 53%);
  margin-left: auto;
}

.favorite-text-truncate {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Custom Space Item Active/Inactive States */
.custom-space-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  text-align: left;
}

.custom-space-item:hover,
.custom-space-item.active {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Dark theme: active custom-space items should be white */
html:not([data-mode="light"]) body:not(.light) .custom-space-item.active {
  color: #ffffff;
}

/* Dark theme: custom-space item hover should be white */
html:not([data-mode="light"]) body:not(.light) .custom-space-item:hover {
  color: #ffffff;
}

/* Light theme: active/hover custom-space item colors */
html[data-mode="light"] .custom-space-item:hover,
body.light .custom-space-item:hover,
html[data-mode="light"] .custom-space-item.active,
body.light .custom-space-item.active {
  color: var(--primary);
}

.custom-space-item:hover .space-name-text,
.custom-space-item.active .space-name-text {
  color: var(--primary);
}

/* Dark theme: active/hover custom-space item names should be white */
html:not([data-mode="light"]) body:not(.light) .custom-space-item:hover .space-name-text,
html:not([data-mode="light"]) body:not(.light) .custom-space-item.active .space-name-text {
  color: #ffffff;
}

/* Light theme: active/hover custom-space item names should be primary or darker foreground */
html[data-mode="light"] .custom-space-item:hover .space-name-text,
body.light .custom-space-item:hover .space-name-text,
html[data-mode="light"] .custom-space-item.active .space-name-text,
body.light .custom-space-item.active .space-name-text {
  color: var(--primary);
}

.custom-space-item .icon,
.custom-space-item svg:not(.favorite-star-right) {
  color: var(--muted-foreground);
  transition: color 0.2s;
}

.custom-space-item:hover .icon,
.custom-space-item:hover svg:not(.favorite-star-right),
.custom-space-item.active .icon,
.custom-space-item.active svg:not(.favorite-star-right) {
  color: var(--primary);
}

/* Dark theme: active/hover custom-space item icons should be white */
html:not([data-mode="light"]) body:not(.light) .custom-space-item:hover .icon,
html:not([data-mode="light"]) body:not(.light) .custom-space-item:hover svg:not(.favorite-star-right),
html:not([data-mode="light"]) body:not(.light) .custom-space-item.active .icon,
html:not([data-mode="light"]) body:not(.light) .custom-space-item.active svg:not(.favorite-star-right) {
  color: #ffffff;
}

/* Light theme: active/hover custom-space item icons should be primary or darker foreground */
html[data-mode="light"] .custom-space-item:hover .icon,
body.light .custom-space-item:hover .icon,
html[data-mode="light"] .custom-space-item:hover svg:not(.favorite-star-right),
body.light .custom-space-item:hover svg:not(.favorite-star-right),
html[data-mode="light"] .custom-space-item.active .icon,
body.light .custom-space-item.active .icon,
html[data-mode="light"] .custom-space-item.active svg:not(.favorite-star-right),
body.light .custom-space-item.active svg:not(.favorite-star-right) {
  color: var(--primary);
}

/* Sidebar Navigation */
.sidebar-nav {
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 10px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  border-radius: 12px;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.18s ease,
    box-shadow 0.22s ease;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
}

.nav-item:hover,
.nav-item.active {
  background: color-mix(in srgb, var(--foreground) 6%, transparent);
  color: var(--foreground);
  border-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.nav-item:active {
  transform: translateY(0px);
}

/* Dark theme: active nav items should be white */
html:not([data-mode="light"]) body:not(.light) .nav-item.active {
  color: #ffffff;
}

/* Light theme: hover background and text color */
html[data-mode="light"] .nav-item:hover,
body.light .nav-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--foreground);
}

/* Light theme: active nav items should be primary color */
html[data-mode="light"] .nav-item.active,
body.light .nav-item.active,
html[data-mode="light"] .nav-item.active .icon,
body.light .nav-item.active .icon {
  color: var(--primary) !important;
}

/* Dark theme: nav item hover should be white */
html:not([data-mode="light"]) body:not(.light) .nav-item:hover {
  color: #ffffff;
}

/* Active indicator dot for collapsed sidebar */
.sidebar.collapsed .nav-item.active,
.sidebar.collapsed .custom-space-item.active {
  position: relative;
}

.sidebar.collapsed .nav-item.active::after,
.sidebar.collapsed .custom-space-item.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--primary);
}

.nav-emoji {
  font-size: 16px;
}

.nav-item .icon {
  color: currentColor;
  flex-shrink: 0;
}

.nav-item-nested {
  padding: 6px 8px 6px 10px;
  font-size: 12.5px;
  margin-top: 2px;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
}

/* Workspace Section */
.workspace-section {
  margin-top: 8px;
}

.workspace-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px 2px;
  opacity: 0.7;
}

/* Add left margin to the Projects button */
.workspace-section .nav-item-nested {
  margin-left: 5px;
  margin-top: 0px;
  max-width: calc(100% - 20px);
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
}

.nav-item-nested .icon {
  width: 16px;
  height: 16px;
}

/* Workspace Spaces (nested under Projects) */
.workspace-space-item {
  margin-left: 5px;
  margin-top: 4px;
  margin-bottom: 4px;
}

.workspace-space-item .custom-space-item-wrapper.workspace-nested {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: calc(100% - 20px);
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
}

.workspace-space-item .custom-space-item.workspace-space {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}

.workspace-space-item .custom-space-item.workspace-space:hover {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.workspace-space-item .custom-space-item.workspace-space.active {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Dark theme: custom space item hover and active should be white */
:not(.light) .workspace-space-item .custom-space-item.workspace-space:hover {
  color: hsl(0 0% 100%);
}

:not(.light) .workspace-space-item .custom-space-item.workspace-space.active {
  color: hsl(0 0% 100%);
}

.workspace-space-item .custom-space-item.workspace-space .space-icon-svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: currentColor;
}

.workspace-space-item .custom-space-item.workspace-space .space-name-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-space-item .delete-item-btn {
  opacity: 0;
  margin-left: 4px;
  padding: 4px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.workspace-space-item:hover .delete-item-btn {
  opacity: 1;
}

.workspace-space-item .delete-item-btn:hover {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

/* Show workspace spaces when sidebar is collapsed */
.sidebar.collapsed .workspace-space-item {
  display: block;
  margin-left: 0;
}

.sidebar.collapsed .workspace-space-item .custom-space-item-wrapper.workspace-nested {
  max-width: 100%;
}

.sidebar.collapsed .workspace-space-item .custom-space-item.workspace-space {
  justify-content: center;
  padding: 8px;
}

.sidebar.collapsed .workspace-space-item .delete-item-btn {
  display: none;
}

/* Focus Mode Trigger */
.focus-mode-trigger {
  padding: 8px;
  margin-top: auto;
}

.focus-toggle-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: var(--glass-bg-primary);
  border: 1px solid var(--glass-border-normal);
  border-radius: 12px;
  color: var(--foreground);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.focus-toggle-btn:hover {
  background: var(--glass-bg-secondary);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
  color: var(--primary);
}

.focus-toggle-btn:hover .icon {
  transform: scale(1.1) rotate(15deg);
  filter: drop-shadow(0 0 8px var(--primary));
}

.focus-toggle-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.focus-toggle-btn:hover::before {
  left: 100%;
}

.focus-toggle-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background: var(--glass-bg-tertiary);
}

.focus-toggle-btn:active .icon {
  transform: scale(0.95);
}

.focus-toggle-btn .icon {
  color: currentColor;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 20px;
  height: 20px;
}

.focus-toggle-btn:hover .icon {
  color: currentColor;
}

.sidebar.collapsed .focus-toggle-btn span {
  display: none;
}

.sidebar.collapsed .focus-toggle-btn {
  justify-content: center;
  padding: 12px;
}

.sidebar.collapsed .focus-mode-trigger {
  padding: 8px 4px;
}

/* Expandable Focus Mode Content */
.focus-mode-expandable {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.2s ease;
  margin-top: 0;
}

.focus-mode-expandable.expanded {
  max-height: 200px;
  opacity: 1;
  margin-top: 4px;
}

/* Focus mode expandable when sidebar is collapsed */
.sidebar.collapsed .focus-mode-expandable {
  position: fixed;
  left: 60px;
  top: auto;
  width: 200px;
  max-height: 0;
}

.sidebar.collapsed .focus-mode-expandable.expanded {
  max-height: 250px;
}

.focus-mode-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.focus-form-group {
  margin-bottom: 8px;
}

.focus-form-group:last-child {
  margin-bottom: 0;
}

.focus-form-select {
  width: 100%;
  padding: 8px 10px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--foreground);
  font-size: 13px;
  font-family: inherit;
  transition: all 0.15s ease;
  cursor: pointer;
}

.focus-form-select:hover {
  border-color: var(--primary);
}

.focus-form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.focus-actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.focus-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  flex: 1;
  font-family: inherit;
}

.focus-btn-secondary {
  background: var(--muted);
  color: var(--muted-foreground);
}

.focus-btn-secondary:hover {
  background: var(--muted-foreground);
  color: var(--background);
}

.focus-btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.focus-btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 8px;
  border-top: 1px solid var(--glass-border);
}

.sidebar.collapsed .sidebar-footer {
  padding: 12px 8px;
}

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

.user-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), hsl(271 91% 65%));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 0 15px rgba(120, 180, 255, 0.3);
}

/* Google Avatar Image Styles */
.user-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* Settings Avatar Image Styles */
.settings-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  display: block;
  position: relative;
  top: 0;
  left: 0;
}


.user-avatar.fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), hsl(271 91% 65%));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 0 15px rgba(120, 180, 255, 0.3);
}

/* Settings Profile Card */
.settings-profile-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-profile-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, hsla(263, 70%, 50%, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.settings-avatar-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--surface);
  border: 3px solid var(--glass-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.settings-avatar-wrapper:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.user-status-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: #22c55e;
  border: 3px solid var(--glass-bg);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
  animation: statusPulse 2s ease-in-out infinite;
}

/* Edit Profile Button */
.btn-edit-profile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-edit-profile:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

.btn-edit-profile:active {
  transform: translateY(0);
  box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2);
}

.btn-edit-profile .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.btn-edit-profile:hover .icon {
  transform: rotate(15deg);
}

/* Profile Edit Header */
.profile-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
}

.edit-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.edit-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: editPulse 2s ease-in-out infinite;
}

@keyframes editPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

/* Advanced Form Group */
.form-group-advanced {
  position: relative;
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper-advanced {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 2px solid var(--glass-border);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.input-wrapper-advanced:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.input-wrapper-advanced.focused {
  border-color: var(--primary);
  background: var(--glass-bg);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-input-advanced {
  width: 100%;
  padding: 16px 48px 16px 16px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--foreground);
  transition: all 0.2s ease;
}

.form-input-advanced::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

/* Input Validation */
.input-validation {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.validation-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.validation-icon.valid {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.validation-icon.invalid {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.validation-icon.valid::after {
  content: '✓';
}

.validation-icon.invalid::after {
  content: '✕';
}

.validation-message {
  position: relative;
  bottom: auto;
  left: auto;
  top: auto;
  right: auto;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
  margin-top: 6px;
  display: block;
}

.validation-message:not(:empty) {
  color: #ef4444;
}

.input-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.char-counter {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.char-counter.warning {
  color: #f59e0b;
}

.char-counter.error {
  color: #ef4444;
}

/* Edit Actions */
.edit-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
}

.edit-actions .btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  position: relative;
  overflow: hidden;
}

.edit-actions .btn-secondary {
  background: var(--surface);
  color: var(--text-secondary);
  border: 2px solid var(--glass-border);
}

.edit-actions .btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  color: var(--text);
  transform: translateY(-1px);
}

.edit-actions .btn-primary {
  background: var(--primary);
  color: white !important;
  border: 2px solid var(--primary);
}

.edit-actions .btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

.edit-actions .btn-primary:active:not(:disabled) {
  background: var(--primary);
  color: white !important;
  transform: translateY(0);
}

.edit-actions .btn-primary .btn-text {
  color: white !important;
  font-weight: 600;
}

.edit-actions .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  color: white !important;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
}

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

  to {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .settings-profile-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 20px;
  }

  .settings-avatar-wrapper {
    width: 64px;
    height: 64px;
  }

  .edit-actions {
    flex-direction: column;
  }

  .edit-actions .btn {
    width: 100%;
  }
}

@keyframes statusPulse {

  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
  }
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  transition: opacity 0.2s;
}

/* Sign In Button */
.sign-in-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.sign-in-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.sign-in-btn .icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.sidebar.collapsed .sign-in-btn span {
  display: none;
}

.sidebar.collapsed .sign-in-btn {
  justify-content: center;
  padding: 12px;
}

/* Workspace Action Buttons */
.workspace-action-btn {
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s ease;
}

.workspace-action-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--foreground);
}

.workspace-action-btn .icon {
  width: 18px;
  height: 18px;
}

/* Sign Out Button */
.sign-out-btn {
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--muted-foreground);
  border-radius: 6px;
  transition: all 0.2s;
  margin-left: auto;
}

.sign-out-btn:hover {
  background: var(--surface-hover);
  color: var(--destructive);
}

.sign-out-btn .icon {
  width: 16px;
  height: 16px;
}

/* Destructive Outline Button */
.btn-destructive-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--destructive);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
  color: var(--destructive);
}

.btn-destructive-outline:hover {
  background: var(--destructive);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-destructive-outline .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Inline Delete Confirmation */
.inline-delete-confirmation {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-size: 14px;
  color: var(--foreground);
  min-width: 200px;
}

/* Small Button Variant */
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Auth Modal Styles - Modern & Professional */
.auth-container {
  padding: 12px 8px;
  animation: authFadeIn 0.4s ease-out;
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header-minimal {
  text-align: center;
  margin-bottom: 32px;
}

.auth-title-large {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--foreground) 0%, var(--muted-foreground) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-subtitle-minimal {
  font-size: 14px;
  color: var(--muted-foreground);
  font-weight: 400;
}

.auth-tabs-modern {
  display: flex;
  background: var(--surface);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 28px;
  border: 1px solid var(--glass-border);
}

.auth-tab-modern {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-tab-modern:hover:not(.active) {
  color: var(--foreground);
  background: var(--surface-hover);
}

.auth-tab-modern.active {
  background: var(--card);
  color: var(--foreground);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.auth-form-modern {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group-modern {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label-modern {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-left: 4px;
}

.input-wrapper-modern {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-modern {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--muted-foreground);
  pointer-events: none;
  transition: color 0.2s;
}

.form-input-modern {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--foreground);
  font-size: 15px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input-modern:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 4px hsla(240, 5%, 15%, 0.5);
}

.form-input-modern:focus+.input-icon-modern {
  color: var(--primary);
}

.auth-error-modern {
  padding: 12px;
  background: hsla(0, 84%, 60%, 0.1);
  border: 1px solid hsla(0, 84%, 60%, 0.2);
  border-radius: 10px;
  color: #ff4d4d;
  font-size: 13px;
  text-align: center;
}

.auth-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  background: var(--foreground);
  color: var(--background);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: 8px;
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  filter: brightness(1.1);
}

.auth-submit-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s;
}

.auth-submit-btn:hover svg {
  transform: translateX(4px);
}

.auth-divider-modern {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--muted-foreground);
  font-size: 12px;
}

.auth-divider-modern::before,
.auth-divider-modern::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--glass-border);
}

.google-auth-btn-modern {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.google-auth-btn-modern:hover {
  background: var(--surface-hover);
  border-color: var(--muted-foreground);
}

.google-auth-btn-modern:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.google-auth-btn-modern svg {
  width: 20px;
  height: 20px;
}

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

.google-auth-btn-modern .spinner {
  animation: spin 0.8s linear infinite;
}

.auth-footer-modern {
  margin-top: 32px;
  text-align: center;
  font-size: 14px;
  color: var(--muted-foreground);
}

.auth-footer-modern button {
  background: none;
  border: none;
  color: var(--foreground);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.auth-footer-modern button:hover {
  color: var(--primary);
}

/* Toast Animation */
@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: calc(var(--sidebar-expanded-width) + (var(--sidebar-inset) * 2));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed~.main-content {
  margin-left: calc(var(--sidebar-collapsed-width) + (var(--sidebar-inset) * 2));
}

/* Top Bar - Liquid Glass */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.breadcrumb {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.search-container {
  position: relative;
  width: 280px;
}

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

.search-input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--foreground);
  border-radius: 10px;
  font-size: 13px;
  transition: all 0.2s;
}

.search-input::placeholder {
  color: var(--muted-foreground);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsla(239, 84%, 67%, 0.15), 0 0 20px rgba(120, 180, 255, 0.1);
}

/* Views Container */
.views-container {
  flex: 1;
}

.views-container {
  position: relative;
  overflow: hidden;
}

.views-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.views-background {
  opacity: 0.35;
}

/* Light mode: higher opacity for better visibility */
body.light .views-background,
[data-mode="light"] .views-background {
  opacity: 0.20;
}

.views-background canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.views-content {
  position: relative;
  z-index: 1;
  height: 100%;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.2s ease-out forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.2s ease-out forwards;
}

/* Modal Overlay - Liquid Glass */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 16px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--glass-bg);
  backdrop-filter: blur(64px);
  -webkit-backdrop-filter: blur(64px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-auth-variant {
  max-width: 460px;
}

.modal-auth-variant .modal-header {
  display: none;
}

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

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

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
}

.modal-close {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--muted-foreground);
  border-radius: 8px;
  transition: all 0.2s;
}

.modal-close:hover {
  background-color: var(--surface-hover);
  color: var(--foreground);
}

.modal-content {
  padding: 16px 20px;
}

/* ============================================
   Mobile Bottom Navigation Bar - Minimalistic
   ============================================ */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mobile-nav-height);
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 3000;
  padding: 0 8px;
  padding-bottom: var(--mobile-nav-safe-area);
  justify-content: space-around;
  align-items: center;
  gap: 4px;
}

/* ============================================
   Mobile Burger Menu (Mobile-only)
   ============================================ */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 10px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--foreground);
  z-index: 3600;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
}

.mobile-menu-btn:active {
  transform: scale(0.95);
  background: var(--surface-hover);
}

.mobile-menu-btn .icon {
  width: 20px;
  height: 20px;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 3500;
}

.mobile-menu-overlay.active {
  display: block;
}

.mobile-menu-dropdown {
  display: none;
  position: fixed;
  top: 58px;
  right: 12px;
  width: min(260px, calc(100vw - 24px));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px;
  z-index: 3600;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.mobile-menu-dropdown.active {
  display: block;
}

.mobile-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.mobile-menu-item:active {
  background: var(--surface-hover);
}

.mobile-menu-item.active {
  background: var(--accent);
  color: var(--primary);
}

.mobile-menu-item .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mobile-menu-item span {
  font-size: 14px;
  font-weight: 600;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 12px;
  flex: 1;
  max-width: 72px;
  position: relative;
  touch-action: manipulation;
  min-height: 48px;
}

/* Hide labels by default - icons only for minimalistic look */
.mobile-nav-item span {
  display: none;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: capitalize;
}

/* Show label only for active item */
.mobile-nav-item.active span {
  display: block;
  color: var(--primary);
}

.mobile-nav-item .icon {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

/* Active state - filled pill background */
.mobile-nav-item.active {
  background: var(--accent);
  color: var(--primary);
}

.mobile-nav-item.active .icon {
  color: var(--primary);
}

/* Touch feedback */
.mobile-nav-item:active {
  transform: scale(0.95);
  background: var(--surface-hover);
}

.mobile-nav-item.active:active {
  background: var(--accent);
}

/* AI icon special styling - slightly larger */
.mobile-nav-item[data-view="ai"] .icon {
  width: 26px;
  height: 26px;
}

.mobile-nav-item[data-view="ai"].active .icon {
  color: var(--primary);
}

/* Mobile Header Bar - Minimalistic */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--mobile-header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 2500;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
}

.mobile-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-logo-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(94, 106, 210, 0.3));
  display: block;
  width: 24px;
  height: 24px;
}

.mobile-header-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: -0.5px;
}

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

.mobile-header-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
}

.mobile-header-btn:active {
  background: var(--surface-hover);
  color: var(--foreground);
  transform: scale(0.95);
}

.mobile-header-btn .icon {
  width: 20px;
  height: 20px;
}

/* Mobile Theme Toggle */
.mobile-theme-toggle {
  position: relative;
}

.mobile-theme-toggle .sun-icon {
  display: none;
}

.mobile-theme-toggle .moon-icon {
  display: block;
}

.light .mobile-theme-toggle .sun-icon {
  display: block;
}

.light .mobile-theme-toggle .moon-icon {
  display: none;
}

[data-theme][data-mode="light"] .mobile-theme-toggle .sun-icon {
  display: block;
}

[data-theme][data-mode="light"] .mobile-theme-toggle .moon-icon {
  display: none;
}

/* Mobile Search Overlay */
.mobile-search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  z-index: 4000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-search-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: var(--card);
  border-bottom: 1px solid var(--glass-border);
  transform: translateY(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-search-overlay.active .mobile-search-container {
  transform: translateY(0);
}

.mobile-search-input {
  flex: 1;
  width: 100%;
  padding: 16px 16px;
  padding-left: 48px;
  background: var(--surface);
  border: 2px solid var(--glass-border);
  border-radius: 16px;
  font-size: 16px;
  color: var(--foreground);
  transition: all 0.2s;
  min-height: 52px;
}

.mobile-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
}

.mobile-search-icon {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  width: 20px;
  height: 20px;
}

.mobile-search-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.mobile-search-close-btn:hover,
.mobile-search-close-btn:active {
  background: var(--surface-hover);
  color: var(--foreground);
}

.mobile-search-close-btn .icon {
  width: 18px;
  height: 18px;
}

/* ============================================
   Inline Issue Card - Professional & Structured
   ============================================ */
.inline-issue-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  margin-bottom: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  animation: slideDown 0.3s cubic-bezier(0.2, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
  }

  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 400px;
  }
}

.inline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

.inline-card-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  background: rgba(var(--primary-rgb, 94, 106, 210), 0.1);
  padding: 4px 10px;
  border-radius: 20px;
}

.btn-close-minimal {
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-close-minimal:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.inline-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inline-card-title-input {
  width: 100%;
  font-size: 18px;
  font-weight: 600;
  padding: 8px 0;
  border: none;
  background: transparent;
  color: var(--foreground);
  outline: none;
  font-family: inherit;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.inline-card-title-input:focus {
  border-bottom-color: var(--border);
}

.inline-card-title-input::placeholder {
  color: var(--muted-foreground);
  opacity: 0.6;
}

.inline-card-desc-input {
  width: 100%;
  font-size: 14px;
  line-height: 1.6;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--foreground);
  resize: none;
  font-family: inherit;
  outline: none;
  min-height: 60px;
}

.inline-card-desc-input::placeholder {
  color: var(--muted-foreground);
  opacity: 0.6;
}

.inline-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.inline-card-tools {
  display: flex;
  gap: 12px;
}

.select-pill-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.select-pill {
  appearance: none;
  -webkit-appearance: none;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s;
  height: 32px;
}

.select-pill:hover {
  border-color: var(--foreground);
  color: var(--foreground);
}

.select-pill:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--ring);
}

.inline-card-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-text-cancel {
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-text-cancel:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.btn-primary-create {
  background: var(--foreground);
  color: var(--background);
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 20px;
  border-radius: 8px;
  transition: all 0.2s;
  height: 36px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary-create:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}


/* ============================================
   MOBILE RESPONSIVE SYSTEM - Unified & Professional
   ============================================ */

/* Tablet and below - Show mobile UI */
@media (max-width: 768px) {
  
  /* ============================================
     Core Layout - Uses CSS Variables
     ============================================ */
  
  /* Hide desktop sidebar */
  .sidebar {
    display: none !important;
  }

  /* Main content - full width with proper padding */
  .main-content {
    margin-left: 0 !important;
    padding-top: var(--mobile-content-padding-top);
    padding-bottom: var(--mobile-content-padding-bottom);
    min-height: 100vh;
    min-height: 100dvh;
  }

  .mobile-header {
    display: none;
  }

  .mobile-search-overlay {
    display: none;
  }

  .mobile-bottom-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  /* Hide desktop top bar */
  .top-bar {
    display: none;
  }

  /* Views container */
  .views-container {
    padding: 0;
    padding-bottom: 0;
  }

  /* ============================================
     View Headers - Consistent Styling
     ============================================ */
  
  .view-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
  }

  .view-header {
    padding: var(--mobile-side-padding);
    padding-top: 20px;
    border-bottom: none;
    background: transparent;
    flex-direction: column;
    align-items: stretch;
    gap: var(--mobile-card-gap);
  }

  /* ============================================
     Cards - Professional Rounded Style
     ============================================ */
  
  .card {
    border-radius: 18px;
    margin: 0 var(--mobile-side-padding) var(--mobile-card-gap);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  }

  /* ============================================
     Projects View
     ============================================ */
  
  .projects-container {
    padding: 0 !important;
    padding-bottom: var(--mobile-nav-height) !important;
  }

  .projects-container .view-header {
    padding: 20px var(--mobile-side-padding) 12px;
  }

  .project-card {
    margin: 0 var(--mobile-side-padding) var(--mobile-card-gap);
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  }

  .project-card-header {
    margin-bottom: var(--mobile-card-gap);
  }

  .project-card-title {
    font-size: 17px;
    font-weight: 700;
  }

  /* ============================================
     Issues View
     ============================================ */
  
  .issues-container {
    padding: 0;
    padding-bottom: var(--mobile-nav-height);
  }

  .issues-container .view-header {
    padding: 20px var(--mobile-side-padding);
  }

  .filter-tabs {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
  }

  .filter-tab {
    flex-shrink: 0;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 14px;
  }

  .table-header.issues-grid {
    display: none;
  }

  .table-row.issues-grid {
    display: flex;
    flex-direction: column;
    padding: 18px;
    margin: 0 var(--mobile-side-padding) 14px;
    border-radius: 18px;
    gap: 12px;
    border: 1px solid var(--glass-border);
    background: var(--card);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  }

  .issue-id {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.5px;
  }

  .issue-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
  }

  .issue-description {
    font-size: 14px;
    line-height: 1.5;
    line-clamp: 2;
    -webkit-line-clamp: 2;
  }

  /* ============================================
     Settings View
     ============================================ */
  
  .settings-container {
    padding: 0 var(--mobile-side-padding);
    padding-bottom: var(--mobile-content-padding-bottom);
  }

  .settings-container .view-header {
    padding: 24px 0;
    text-align: left;
  }

  .settings-container .view-title {
    font-size: 24px;
  }

  .settings-section {
    border-radius: 20px;
    margin-bottom: 24px;
  }

  .section-title {
    padding: 22px 20px 10px;
  }

  .settings-item {
    padding: 18px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .settings-label {
    padding-right: 0;
  }

  .settings-value,
  .form-select {
    width: 100%;
    min-width: unset;
  }

  /* ============================================
     Inbox View
     ============================================ */
  
  .inbox-container {
    padding: 0 var(--mobile-side-padding);
    padding-bottom: var(--mobile-content-padding-bottom);
  }

  .inbox-container .view-title {
    padding: 20px 0 24px;
  }

  .activity-item {
    padding: 18px;
    border-radius: 18px;
    margin-bottom: 14px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  }

  /* ============================================
     Schedule/Calendar View
     ============================================ */
  
  .schedule-view-wrapper {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - var(--mobile-total-bottom));
    min-height: calc(100dvh - var(--mobile-total-bottom));
  }

  .schedule-sidebar {
    display: none;
  }

  .schedule-view {
    padding: 0 12px 12px;
    padding-bottom: var(--mobile-nav-height);
    overflow: visible;
  }

  .schedule-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 0;
    flex-wrap: nowrap;
  }

  .schedule-title-section {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    flex-shrink: 0;
  }

  .schedule-title-section .view-title {
    font-size: 20px !important;
    font-weight: 700 !important;
  }

  .schedule-subtitle {
    font-size: 13px;
    color: var(--muted-foreground);
  }

  .calendar-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    padding: 0;
  }

  .calendar-nav-btns {
    background: var(--surface);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
  }

  .calendar-nav-btn {
    padding: 8px 12px;
  }

  .calendar-nav-btn svg {
    width: 16px;
    height: 16px;
  }

  .calendar-controls .btn {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 10px;
  }

  .calendar-controls .btn svg {
    width: 14px;
    height: 14px;
  }

  .calendar-grid {
    border-radius: 16px;
    font-size: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
  }

  .weekday-header {
    padding: 10px 2px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
  }

  .calendar-day {
    padding: 6px;
    min-height: 56px;
    border-radius: 0;
  }

  .calendar-day .day-header {
    margin-bottom: 2px;
  }

  .calendar-day .day-number {
    width: 24px;
    height: 24px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
  }

  .calendar-day .day-name {
    display: none;
  }

  .day-tasks-container {
    gap: 3px;
  }

  .calendar-task {
    font-size: 10px;
    padding: 4px 6px;
    border-radius: 6px;
    border-left-width: 3px;
  }

  .calendar-task .task-mini {
    gap: 4px;
  }

  .task-time-mini,
  .recurring-badge {
    display: none;
  }

  .task-color-dot {
    width: 8px;
    height: 8px;
  }

  .task-title-mini {
    font-size: 10px;
    font-weight: 600;
    max-width: 40px;
  }

  .add-task-hint {
    display: none;
  }

  /* Expanded task on mobile */
  .calendar-task.expanded {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--mobile-total-bottom) + 10px);
    z-index: 1000;
    font-size: 14px;
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
    border-left-width: 4px;
  }

  .calendar-task.expanded .task-title-mini {
    font-size: 15px;
    max-width: none;
  }

  .calendar-task.expanded .task-expanded-details {
    display: block;
    padding-top: 10px;
    margin-top: 8px;
  }

  .calendar-task.expanded .task-time-mini,
  .calendar-task.expanded .recurring-badge {
    display: inline-flex;
  }

  /* ============================================
     Backlog View
     ============================================ */
  
  .backlog-modern {
    padding: 0 var(--mobile-side-padding);
    padding-bottom: var(--mobile-content-padding-bottom);
  }

  .backlog-header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--mobile-card-gap);
    padding: 20px 0;
  }

  .backlog-title-section .view-title {
    font-size: 24px !important;
  }

  .backlog-progress-ring {
    display: none;
  }

  .backlog-stats-row {
    justify-content: flex-start;
  }

  .stat-chip {
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 12px;
    font-weight: 600;
  }

  .backlog-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .backlog-filters {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .backlog-filters::-webkit-scrollbar {
    display: none;
  }

  .filter-chip {
    flex-shrink: 0;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 14px;
  }

  .backlog-task-card {
    padding: 18px 20px;
    border-radius: 18px;
    margin-bottom: 12px;
  }

  .task-checkbox {
    width: 32px;
    height: 32px;
  }

  .task-content .task-title {
    font-size: 16px;
    font-weight: 600;
  }

  .task-content .task-date {
    font-size: 14px;
  }

  .task-actions {
    opacity: 1;
    gap: 10px;
  }

  .task-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  /* ============================================
     Project Detail View - See Premium Kanban Section
     ============================================ */
  
  /* Project detail and kanban mobile styles are now in the 
     MOBILE RESPONSIVE - Projects Workspace & Details section 
     at line 21985+ for comprehensive styling */

  /* ============================================
     Focus Timer
     ============================================ */
  
  .focus-timer-float {
    bottom: var(--mobile-total-bottom);
    left: var(--mobile-side-padding);
    right: var(--mobile-side-padding);
  }

  .focus-timer-widget {
    min-width: auto;
    width: 100%;
    border-radius: 20px;
  }

  .timer-main {
    padding: 20px 24px;
  }

  .timer-display {
    font-size: 28px;
  }

  .timer-controls {
    padding: 0 24px 20px;
  }

  .timer-btn {
    padding: 14px 24px;
    font-size: 15px;
    border-radius: 14px;
  }

  /* ============================================
     Modals - Full screen on mobile
     ============================================ */
  
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    margin: 0;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 24px 24px 0 0;
    max-width: 100%;
    width: 100%;
  }

  .modal-header {
    padding: 24px 24px 18px;
  }

  .modal-title {
    font-size: 22px;
    font-weight: 700;
  }

  .modal-content {
    padding: 6px 24px 36px;
  }

  /* ============================================
     Buttons
     ============================================ */
  
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
  }

  .btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
    width: 100%;
    justify-content: center;
  }

  .btn-primary:hover {
    background-color: var(--primary/80);
    color: var(--primary-foreground);
  }

  .btn-outline {
    background-color: transparent;
    color: var(--foreground);
    border: 1px solid var(--border);
  }

  .btn-outline:hover {
    background-color: var(--accent);
  }

  .btn-secondary {
    background-color: var(--muted);
    color: var(--muted-foreground);
  }

  .btn-secondary:hover {
    background-color: var(--accent);
  }

  /* ============================================
     Forms
     ============================================ */
  
  .form-input,
  .form-textarea,
  .form-select {
    padding: 16px 18px;
    font-size: 16px;
    border-radius: 14px;
  }

  .form-actions {
    flex-direction: column-reverse;
    gap: 14px;
  }

  .form-actions .btn {
    width: 100%;
  }

  /* ============================================
     Empty States
     ============================================ */
  
  .empty-state {
    padding: 56px 28px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .empty-state-icon {
    font-size: 56px;
    margin-bottom: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary);
    border-radius: 16px;
  }

  .empty-state-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--foreground);
  }

  .empty-state-text {
    font-size: 15px;
    color: var(--muted-foreground);
    margin-bottom: 0;
    text-align: center;
    line-height: 1.5;
  }

  .empty-state-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
    width: 100%;
  }

  /* ============================================
     Drafts View
     ============================================ */
  
  .drafts-container {
    padding: 0 !important;
    padding-bottom: var(--mobile-nav-height) !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--background);
    overflow: hidden;
  }

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

  .drafts-header-left {
    display: flex;
    flex-direction: column;
    flex: 1;
  }

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

  .drafts-search {
    position: relative;
    display: flex;
    align-items: center;
  }

  .drafts-search input {
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--background);
    color: var(--foreground);
    width: 220px;
    font-size: 14px;
    transition: all 0.2s ease;
  }

  .drafts-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary/20);
  }

  .drafts-search .icon {
    position: absolute;
    left: 10px;
    width: 18px;
    height: 18px;
    color: var(--muted-foreground);
  }

  .view-actions {
    display: flex;
    gap: 8px;
  }

  .drafts-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--muted);
    gap: 16px;
  }

  .drafts-filters {
    display: flex;
    gap: 4px;
  }

  .filter-btn {
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--muted-foreground);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .filter-btn:hover {
    background: var(--hover);
    color: var(--foreground);
  }

  .filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
  }

  .drafts-sort select {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--background);
    color: var(--foreground);
    font-size: 13px;
    cursor: pointer;
  }

  .drafts-content {
    padding: 0;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  .drafts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--mobile-card-gap);
    padding: var(--mobile-side-padding);
    flex: 1;
  }

  .project-progress {
    margin-bottom: 12px;
  }

  .progress-bar {
    height: 10px;
    border-radius: 5px;
  }
}

  /* ============================================
     Extra Small Screens (480px and below)
     ============================================ */
  @media (max-width: 480px) {

    .mobile-menu-btn {
      top: 8px;
      right: 10px;
      width: 40px;
      height: 40px;
      border-radius: 12px;
    }

    .mobile-menu-dropdown {
      top: 54px;
      right: 10px;
      width: min(260px, calc(100vw - 20px));
      border-radius: 14px;
    }

    .mobile-menu-item {
      padding: 11px 12px;
      border-radius: 12px;
    }

    .main-content {
      padding-top: 8px;
      padding-bottom: 16px;
    }

    /* Compact view titles */
    .view-title {
      font-size: 20px !important;
      font-weight: 700 !important;
    }

    /* Compact cards */
    .card {
      margin: 0 14px 14px;
      border-radius: 16px;
    }

    .project-card {
      margin: 0 14px 14px;
      padding: 18px;
      border-radius: 16px;
    }

    .project-card-title {
      font-size: 16px;
    }

  .view-header {
    padding: 18px 14px;
    gap: 12px;
  }

  /* Compact cards */
  .card {
    margin: 0 14px 14px;
    border-radius: 16px;
  }

  .project-card {
    margin: 0 14px 14px;
    padding: 18px;
    border-radius: 16px;
  }

  .project-card-title {
    font-size: 16px;
  }

  /* Compact calendar */
  .calendar-day {
    min-height: 52px;
    padding: 6px 2px;
  }

  .calendar-day .day-number {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .calendar-task {
    padding: 4px 5px;
    font-size: 10px;
  }

  .task-title-mini {
    font-size: 10px;
    max-width: 38px;
  }

  .task-color-dot {
    width: 7px;
    height: 7px;
  }

  .weekday-header {
    font-size: 10px;
    padding: 10px 2px;
  }

  /* Compact backlog */
  .backlog-task-card {
    padding: 16px;
    border-radius: 16px;
  }

  .task-checkbox {
    width: 28px;
    height: 28px;
  }

  .task-content .task-title {
    font-size: 15px;
  }

  .task-action-btn {
    width: 36px;
    height: 36px;
  }

  /* Compact filters */
  .filter-chip,
  .filter-tab {
    padding: 10px 14px;
    font-size: 13px;
  }

  /* Compact issues */
  .table-row.issues-grid {
    padding: 16px;
    margin: 0 14px 12px;
    border-radius: 16px;
  }

  .issue-title {
    font-size: 15px;
  }

  /* Compact inbox */
  .inbox-container {
    padding: 0 14px;
  }

  .activity-item {
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 12px;
  }

  /* Compact settings */
  .settings-container {
    padding: 0 14px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px) + 16px);
  }

  .settings-section {
    border-radius: 16px;
  }

  .settings-item {
    padding: 16px 18px;
  }

  /* Compact buttons */
  .btn {
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 12px;
  }

  /* Compact forms */
  .form-input,
  .form-textarea,
  .form-select {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 12px;
  }

  /* Compact modal */
  .modal {
    border-radius: 20px 20px 0 0;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-content {
    padding: 6px 20px 28px;
  }

  /* Compact project detail */
  .project-detail-main {
    padding: 14px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px) + 16px);
  }

  .project-detail-title {
    font-size: 19px;
  }

  .kanban-column {
    width: 240px;
    min-width: 240px;
    border-radius: 14px;
  }

  .kanban-task {
    padding: 14px;
    border-radius: 12px;
  }

  /* Compact focus timer */
  .focus-timer-float {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    left: 14px;
    right: 14px;
  }

  .focus-timer-widget {
    border-radius: 16px;
  }

  .timer-main {
    padding: 14px 18px;
  }

  .timer-display {
    font-size: 22px;
  }

  /* Empty states */
  .empty-state {
    padding: 44px 22px;
    min-height: 280px;
  }

  .empty-state-icon {
    font-size: 44px;
    width: 56px;
    height: 56px;
  }

  .empty-state-title {
    font-size: 17px;
  }

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

@media (max-width: 1024px) {
  .project-detail-sidebar {
    display: none;
  }

  .schedule-sidebar {
    display: none;
  }

  .schedule-view-wrapper {
    flex-direction: column;
  }
}


/* ============================================
   Professional Schedule/Calendar Styles
   ============================================ */

.schedule-view-wrapper {
  display: flex;
  gap: 0;
  height: calc(100vh - 80px);
  overflow: hidden;
}

.schedule-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
}

.schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.schedule-title-section {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.schedule-subtitle {
  font-size: 16px;
  color: var(--muted-foreground);
  font-weight: 500;
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-nav-btns {
  display: flex;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.calendar-nav-btn {
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-nav-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.calendar-nav-btn:first-child {
  border-right: 1px solid var(--glass-border);
}

/* Calendar Grid - Liquid Glass */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  flex: 1;
  box-shadow: var(--glass-shadow);
}

.weekday-header {
  background: var(--surface);
  font-weight: 600;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--glass-border);
  border-right: 1px solid var(--glass-border);
}

.weekday-header:last-child {
  border-right: none;
}

.calendar-day {
  background: transparent;
  padding: 8px;
  min-height: 110px;
  font-size: 13px;
  border-right: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  display: flex;
  flex-direction: column;
}

.calendar-day:nth-child(7n+7) {
  border-right: none;
}

.calendar-day:hover {
  background: var(--surface-hover);
}

.calendar-day.today {
  background: var(--primary) / 0.08;
}

.calendar-day .day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.calendar-day .day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  width: 28px;
  height: 28px;
  color: var(--foreground);
  border-radius: 8px;
}

.calendar-day.today .day-number {
  background: var(--primary);
  color: var(--primary-foreground);
}

.calendar-day .day-name {
  font-size: 10px;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calendar-day.other-month {
  opacity: 0.35;
  pointer-events: none;
}

/* Dark mode - lighter calendar borders for better visibility */
@media (prefers-color-scheme: dark) {
  .calendar-grid {
    border-color: hsla(240, 5%, 45%, 0.4);
  }

  .weekday-header {
    border-bottom-color: hsla(240, 5%, 45%, 0.35);
    border-right-color: hsla(240, 5%, 45%, 0.35);
  }

  .calendar-day {
    border-right-color: hsla(240, 5%, 45%, 0.35);
    border-bottom-color: hsla(240, 5%, 45%, 0.35);
  }
}

/* Dark mode class override */
.dark .calendar-grid,
[data-mode="dark"] .calendar-grid {
  border-color: hsla(240, 5%, 45%, 0.4);
}

.dark .weekday-header,
[data-mode="dark"] .weekday-header {
  border-bottom-color: hsla(240, 5%, 45%, 0.35);
  border-right-color: hsla(240, 5%, 45%, 0.35);
}

.dark .calendar-day,
[data-mode="dark"] .calendar-day {
  border-right-color: hsla(240, 5%, 45%, 0.35);
  border-bottom-color: hsla(240, 5%, 45%, 0.35);
}

.day-tasks-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.add-task-hint {
  font-size: 11px;
  color: var(--muted-foreground);
  opacity: 0;
  text-align: center;
  margin-top: auto;
  padding: 4px;
  transition: opacity 0.15s;
}

.calendar-day:hover .add-task-hint {
  opacity: 0.7;
}

.calendar-task {
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-left: 3px solid transparent;
  transition: transform 0.18s, background-color 0.18s, box-shadow 0.18s, border-color 0.18s;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-task:hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.calendar-task.is-recurring {
  opacity: 0.95;
}

.calendar-task.compact {
  display: flex;
}

.calendar-task.expanded {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-left-width: 3px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.task-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.task-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

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

.task-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.03);
}

.task-title-mini {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.task-time-mini {
  color: var(--muted-foreground);
  font-size: 10px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
}

.recurring-badge {
  font-size: 11px;
  color: var(--muted-foreground);
  flex-shrink: 0;
  padding: 0 6px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
}

.task-recurring-label {
  font-size: 11px;
  color: var(--muted-foreground);
}

.task-expanded-details {
  display: none;
  padding-top: 8px;
  margin-top: 2px;
  border-top: 1px solid var(--glass-border);
}

.calendar-task.expanded .task-expanded-details {
  display: block;
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.task-info {
  flex: 1;
  min-width: 0;
}

.task-title-full {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 13px;
}

.task-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.task-time-full,
.task-date-small {
  color: var(--muted-foreground);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* Task Delete Button */
.task-delete-btn {
  background: var(--destructive);
  border: none;
  color: white;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.9;
}

.task-delete-btn:hover {
  opacity: 1;
  transform: translateY(-1px) scale(1.06);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
}

.task-delete-btn svg {
  width: 14px;
  height: 14px;
}

/* Schedule Sidebar - Liquid Glass */
.schedule-sidebar {
  width: 300px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid var(--glass-border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.sidebar-section {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--glass-border);
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.sidebar-section-header h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--foreground);
}

.add-recurring-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  border: none;
  color: var(--primary-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.add-recurring-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.recurring-empty {
  text-align: center;
  padding: 24px 12px;
  color: var(--muted-foreground);
}

.recurring-empty p {
  font-size: 14px;
  margin: 12px 0 4px;
}

.recurring-empty span {
  font-size: 12px;
  opacity: 0.7;
}

.recurring-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recurring-task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--background);
  border-radius: 10px;
  border-left: 3px solid;
  transition: all 0.2s;
}

.recurring-task-item:hover {
  background: var(--surface-hover);
}

.recurring-task-info {
  flex: 1;
  min-width: 0;
}

.recurring-task-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recurring-task-meta {
  font-size: 11px;
  color: var(--muted-foreground);
}

/* Recurring Task Delete Button - More Visible */
.recurring-delete-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--destructive);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: all 0.15s;
}

.recurring-delete-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.schedule-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0px;
}

.stat-item {
  text-align: center;
  padding: 12px 8px;
  border-radius: 10px;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--foreground);
}

.stat-label {
  font-size: 11px;
  color: var(--foreground);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-tips {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--primary) / 0.08;
  border-color: var(--primary) / 0.2;
}

.tip-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.tip-content {
  font-size: 12px;
  color: var(--muted-foreground);
  line-height: 1.5;
}

.tip-content strong {
  color: var(--foreground);
}

/* ============================================
   ADVANCED SCHEDULE VIEW - Professional Calendar
   Week View, Day View, Mini Calendar, Time Slots
   ============================================ */

.advanced-schedule-container {
  display: flex;
  height: calc(100vh - 10px);
  overflow: hidden;
  width: 100%;
  min-width: 0;
}

/* Left Sidebar */
.schedule-left-sidebar {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
}

/* Calendar Selector */
.calendar-selector {
  background: var(--glass-bg);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

/* Dark mode: glass background */
[data-mode="dark"] .calendar-selector {
  background: var(--glass-bg);
}

.calendar-selector:hover {
  background: var(--surface-hover);
}

.calendar-selector-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-selector-icon {
  position: relative;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.calendar-selector-icon svg {
  width: 20px;
  height: 20px;
}

.calendar-date-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 9px;
  font-weight: 700;
  background: var(--card);
  color: var(--primary);
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-selector-info {
  flex: 1;
  min-width: 0;
}

.calendar-selector-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.calendar-selector-subtitle {
  display: block;
  font-size: 12px;
  color: var(--muted-foreground);
}

.calendar-selector-chevron {
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

/* Mini Calendar */
.mini-calendar-section {
  background: var(--glass-bg);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
}

/* Dark mode: glass background */
[data-mode="dark"] .mini-calendar-section {
  background: var(--glass-bg);
}

.mini-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.mini-cal-month {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  flex: 1;
  text-align: center;
}

.mini-cal-nav {
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.mini-cal-nav:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.mini-cal-nav svg {
  width: 14px;
  height: 14px;
}

.mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
}

.mini-cal-weekday {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-align: center;
  padding: 4px 2px;
  text-transform: uppercase;
  min-width: 0;
  overflow: hidden;
}

.mini-cal-day {
  font-size: 11px;
  font-weight: 500;
  color: var(--foreground);
  text-align: center;
  padding: 5px 2px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-cal-day:hover {
  background: var(--surface-hover);
}

.mini-cal-day.other-month {
  color: var(--muted-foreground);
  opacity: 0.4;
}

.mini-cal-day.today {
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 700;
}

.mini-cal-day.selected {
  background: var(--primary) / 0.2;
  color: var(--primary);
  font-weight: 600;
}

.mini-cal-day.in-week {
  background: var(--primary) / 0.1;
}

.mini-cal-day.has-events::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
}

.mini-cal-day.today.has-events::after {
  background: var(--primary-foreground);
}

/* Filter Sections */
.schedule-filter-section {
  background: var(--glass-bg);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px;
}

/* Dark mode: glass background */
[data-mode="dark"] .schedule-filter-section {
  background: var(--glass-bg);
}

.filter-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding-bottom: 12px;
}

.filter-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
}

.filter-section-chevron {
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
  transition: transform 0.2s;
}

.filter-section-chevron.collapsed {
  transform: rotate(-90deg);
}

.filter-section-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  max-height: 300px;
  transition: max-height 0.3s ease, opacity 0.3s;
}

.filter-section-content.collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0;
}

.upcoming-event-card {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.upcoming-event-card:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.upcoming-event-accent {
  width: 4px;
  border-radius: 999px;
  flex: 0 0 4px;
}

.upcoming-event-main {
  flex: 1;
  min-width: 0;
}

.upcoming-event-title {
  font-size: 13px;
  font-weight: 650;
  color: var(--foreground);
  line-height: 1.25;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upcoming-event-meta {
  font-size: 12px;
  color: var(--muted-foreground);
  line-height: 1.25;
}

.upcoming-event-join {
  margin-top: 10px;
  width: 100%;
  height: 32px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--border));
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--foreground);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.upcoming-event-join:hover {
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  border-color: color-mix(in srgb, var(--primary) 60%, var(--border));
}

.upcoming-event-empty {
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: color-mix(in srgb, var(--card) 70%, transparent);
}

.upcoming-event-empty-title {
  font-size: 13px;
  font-weight: 650;
  color: var(--foreground);
  margin-bottom: 4px;
}

.upcoming-event-empty-sub {
  font-size: 12px;
  color: var(--muted-foreground);
}

/* Schedule Filter Items */
.schedule-filter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.schedule-filter-item:hover {
  background: var(--surface-hover);
}

.schedule-filter-item input[type="checkbox"] {
  display: none;
}

.filter-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.schedule-filter-item input:checked+.filter-checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.schedule-filter-item input:checked+.filter-checkbox::after {
  content: '✓';
  color: var(--primary-foreground);
  font-size: 11px;
  font-weight: 700;
}

.filter-label {
  font-size: 13px;
  color: var(--foreground);
}


/* Main Content Area */
.schedule-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px 20px;
  min-width: 0;
  max-width: 100%;
}

/* Breadcrumb */
.schedule-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.breadcrumb-item {
  font-size: 13px;
  color: var(--muted-foreground);
}

.breadcrumb-item.active {
  color: var(--foreground);
  font-weight: 500;
}

.breadcrumb-chevron {
  width: 14px;
  height: 14px;
  color: var(--muted-foreground);
}

/* Main Header */
.schedule-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.schedule-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.schedule-main-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--foreground);
  margin: 0 0 16px 0;
}

.schedule-main-title-mobile {
  display: none;
  font-size: 20px;
  font-weight: 700;
  color: var(--foreground);
  margin: 0;
}

.schedule-left-sidebar .schedule-main-title {
  font-size: 20px;
  margin: 0 0 20px 0;
  padding: 0 4px;
}

.schedule-month-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--glass-bg);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

/* Dark mode: glass background */
[data-mode="dark"] .schedule-month-selector {
  background: var(--glass-bg);
}

.schedule-month-selector:hover {
  background: var(--surface-hover);
}

.month-year-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
}

.month-chevron {
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
}

.schedule-event-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted-foreground);
  padding: 6px 12px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 20px;
}

.schedule-event-count svg {
  width: 14px;
  height: 14px;
  color: #22c55e;
}

/* View Toggle */
.schedule-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.schedule-view-toggle {
  display: flex;
  background: var(--glass-bg);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
}

/* Dark mode: glass background */
[data-mode="dark"] .schedule-view-toggle {
  background: var(--glass-bg);
}

.view-toggle-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.view-toggle-btn:hover {
  color: var(--foreground);
}

.view-toggle-btn.active {
  background: var(--card);
  color: var(--foreground);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.schedule-add-btn {
  display: flex;
  align-items: center;
  gap: 6px;
}

.schedule-add-btn svg {
  width: 16px;
  height: 16px;
}

/* Week View Container */
.week-view-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  min-width: 0;
  width: 100%;
}

/* Week Header */
.week-header {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  background: var(--glass-bg);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
  width: 100%;
}

/* Dark mode: glass background */
[data-mode="dark"] .week-header {
  background: var(--glass-bg);
}

.week-header-tz {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 4px;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-right: 1px solid var(--border);
  width: 60px;
  min-width: 60px;
  max-width: 60px;
  box-sizing: border-box;
}

.week-header-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  border-right: 1px solid var(--border);
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.week-header-day:last-child {
  border-right: none;
}

.week-header-day.today {
  background: var(--primary) / 0.08;
}

.week-day-number {
  font-size: 18px;
  font-weight: 700;
  color: var(--foreground);
}

.week-header-day.today .week-day-number {
  background: var(--primary);
  color: var(--primary-foreground);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.week-day-name {
  font-size: 9px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Week Grid */
.week-grid-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}

.week-grid {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  min-height: 100%;
  width: 100%;
}

/* Time Labels Column */
.time-labels-col {
  width: 60px;
  min-width: 60px;
  max-width: 60px;
  border-right: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  position: sticky;
  left: 0;
  z-index: 5;
}

/* Dark mode: glass background */
[data-mode="dark"] .time-labels-col {
  background: var(--glass-bg);
}

.time-label {
  height: 80px;
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-align: right;
  border-bottom: 1px solid transparent;
}

/* Day Columns */
.week-day-column {
  position: relative;
  border-right: 1px solid var(--border);
  min-height: calc(24 * 80px);
  /* 24 hours * 80px per hour */
  cursor: pointer;
  min-width: 0;
}

.week-day-column:last-child {
  border-right: none;
}

.week-day-column.today {
  background: var(--primary) / 0.02;
}

.time-slot-line {
  height: 80px;
  border-bottom: 1px solid var(--border);
}

.time-slot-line:last-child {
  border-bottom: none;
}

/* Event Cards in Week View - Google Calendar Style with Overlap Support */
.week-event-card {
  position: absolute;
  min-height: 40px;
  background: color-mix(in srgb, var(--event-color, var(--primary)) 18%, var(--surface));
  border-radius: 6px;
  border: none;
  border-left: 4px solid var(--event-color, var(--primary));
  overflow: visible;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s, z-index 0s;
  display: flex;
  z-index: 10;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  /* Default positioning - can be overridden by inline styles */
  left: 0;
  width: calc(100% - 2px);
}

/* Clip content inside but allow handles to overflow */
.week-event-card .week-event-content {
  overflow: hidden;
}

.week-event-card:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 20;
  background: color-mix(in srgb, var(--event-color, var(--primary)) 24%, var(--surface));
}

/* Disable hover transform when resizing */
.week-event-card.resizing,
.week-event-card.resizing:hover {
  transform: none;
  z-index: 100;
}

/* Hide the old color bar - now using full background */
.week-event-color-bar {
  display: none;
}

.week-event-content {
  flex: 1;
  padding: 6px 8px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.week-event-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: none;
}

.week-event-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: color-mix(in srgb, var(--foreground) 72%, transparent);
}

.week-event-time svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  opacity: 0.85;
}

/* Event Links Row (location, project, etc.) */
.event-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.event-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: color-mix(in srgb, var(--event-color, var(--primary)) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--event-color, var(--primary)) 32%, transparent);
  border-radius: 4px;
  font-size: 9px;
  color: color-mix(in srgb, var(--foreground) 88%, transparent);
  font-weight: 600;
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-link-badge svg {
  flex-shrink: 0;
  opacity: 0.9;
}

.event-join-btn {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in hsl, var(--primary) 35%, var(--glass-border));
  background: color-mix(in hsl, var(--primary) 14%, transparent);
  color: var(--foreground);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 28px;
  white-space: nowrap;
  user-select: none;
}

/* Agenda action buttons styles */
.agenda-event-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 4px;
}

.agenda-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid color-mix(in hsl, var(--primary) 25%, var(--glass-border));
  background: color-mix(in hsl, var(--primary) 10%, transparent);
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.agenda-action-btn:hover {
  background: color-mix(in hsl, var(--primary) 20%, transparent);
  border-color: color-mix(in hsl, var(--primary) 40%, var(--glass-border));
  transform: translateY(-1px);
}

.agenda-action-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Join meeting button - uses event's theme color */
.agenda-join-btn {
  background: color-mix(in srgb, var(--event-color, var(--primary)) 15%, transparent) !important;
  border-color: color-mix(in srgb, var(--event-color, var(--primary)) 35%, var(--glass-border)) !important;
  color: var(--event-color, var(--primary));
}

.agenda-join-btn:hover {
  background: color-mix(in srgb, var(--event-color, var(--primary)) 25%, transparent) !important;
  border-color: var(--event-color, var(--primary)) !important;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--event-color, var(--primary)) 30%, transparent);
}

.agenda-join-btn svg {
  color: var(--event-color, var(--primary));
}

/* Responsive adjustments for agenda-action-btn */
@media (max-width: 768px) {
  .agenda-action-btn {
    width: 26px;
    height: 26px;
  }
  
  .agenda-action-btn svg {
    width: 12px;
    height: 12px;
  }
}

@media (max-width: 480px) {
  .agenda-action-btn {
    width: 24px;
    height: 24px;
  }
  
  .agenda-action-btn svg {
    width: 10px;
    height: 10px;
  }
}

/* Responsive adjustments for event-join-btn */
@media (max-width: 768px) {
  .event-join-btn {
    font-size: 11px;
    padding: 5px 8px;
    gap: 4px;
    min-height: 26px;
  }
  
  .event-join-btn svg {
    width: 12px;
    height: 12px;
  }
  
  .meeting-provider-icon {
    width: 12px;
    height: 12px;
  }
}

@media (max-width: 480px) {
  .event-join-btn {
    font-size: 10px;
    padding: 4px 6px;
    gap: 3px;
    min-height: 24px;
  }
  
  .event-join-btn svg {
    width: 10px;
    height: 10px;
  }
  
  .meeting-provider-icon {
    width: 10px;
    height: 10px;
  }
}

.event-join-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.meeting-provider-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border-radius: 3px;
  display: inline-block;
  object-fit: contain;
}

.event-join-btn:hover {
  background: color-mix(in hsl, var(--primary) 22%, transparent);
  border-color: color-mix(in hsl, var(--primary) 55%, var(--glass-border));
  transform: translateY(-1px);
}

/* ============================================
   Event Resize Handle
   ============================================ */
.event-resize-handle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 12px;
  cursor: ns-resize;
  background: transparent;
  z-index: 15;
  border-radius: 0 0 8px 8px;
  transition: all 0.2s ease;
}

.event-resize-handle::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 3px;
  transform: translateX(-50%);
  width: 28px;
  height: 4px;
  background: transparent;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.week-event-card:hover .event-resize-handle::before {
  background: rgba(255, 255, 255, 0.6);
  opacity: 1;
}

.event-resize-handle:hover {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.2), transparent);
}

.event-resize-handle:hover::before {
  background: rgba(255, 255, 255, 0.9);
  opacity: 1;
  width: 36px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.week-event-card.resizing .event-resize-handle {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.25), transparent);
}

.week-event-card.resizing .event-resize-handle::before {
  background: #ffffff;
  opacity: 1;
  width: 40px;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
}

/* Resize preview tooltip */
.resize-time-tooltip {
  position: fixed;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--foreground);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;
}

.resize-time-tooltip .duration {
  color: var(--primary);
  font-size: 11px;
  margin-left: 6px;
}

/* Event Avatars */
/* Avatar styles removed - no longer used */

/* Day View */
.day-view-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.day-view-header {
  display: grid;
  grid-template-columns: 60px 1fr;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.day-view-tz {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 4px;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-right: 1px solid var(--border);
}

.day-view-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  gap: 4px;
}

.day-view-info.today {
  background: var(--primary) / 0.08;
}

.day-view-number {
  font-size: 24px;
  font-weight: 700;
  color: var(--foreground);
}

.day-view-info.today .day-view-number {
  background: var(--primary);
  color: var(--primary-foreground);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.day-view-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.day-view-grid-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  min-width: 0;
}

.day-view-grid {
  display: grid;
  grid-template-columns: 60px 1fr;
  min-height: 100%;
}

.day-events-column {
  position: relative;
  min-height: calc(24 * 80px);
  /* 24 hours * 80px per hour */
  cursor: pointer;
}

.day-event-card {
  left: 8px;
  right: 8px;
}

/* Month View */
.month-view-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.month-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.month-weekday {
  padding: 14px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-right: 1px solid var(--border);
}

.month-weekday:last-child {
  border-right: none;
}

.month-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(100px, 1fr);
}

.month-day {
  padding: 8px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.month-day:nth-child(7n) {
  border-right: none;
}

.month-day:hover {
  background: var(--surface-hover);
}

.month-day.today {
  background: var(--primary) / 0.05;
}

.month-day.other-month {
  opacity: 0.4;
}

.month-day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
  border-radius: 8px;
  margin-bottom: 6px;
}

.month-day.today .month-day-number {
  background: var(--primary);
  color: var(--primary-foreground);
}

.month-day-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.month-event {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  background: var(--event-color, var(--primary));
  border-radius: 4px;
  border-left: 3px solid color-mix(in srgb, var(--event-color, var(--primary)) 70%, #000);
  font-size: 11px;
  color: #ffffff;
  transition: all 0.15s;
  cursor: pointer;
}

.month-event:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.month-event-dot {
  display: none;
  /* Hide dot - using full background now */
}

.month-event-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.month-more-events {
  font-size: 10px;
  color: var(--muted-foreground);
  padding: 2px 6px;
  font-weight: 500;
}

/* Responsive - Large screens */
@media (max-width: 1280px) {
  .schedule-left-sidebar {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    padding: 14px;
  }

  .schedule-main-content {
    padding: 14px 16px;
  }
}

/* Responsive - Medium screens */
@media (max-width: 1024px) {
  .schedule-left-sidebar {
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    padding: 12px;
  }

  .mini-calendar-section {
    padding: 10px;
  }

  .mini-cal-day {
    font-size: 10px;
    padding: 4px 1px;
  }

  .mini-cal-weekday {
    font-size: 9px;
  }

  .week-day-name {
    font-size: 8px;
  }

  .week-day-number {
    font-size: 16px;
  }

  .schedule-main-title {
    font-size: 24px;
  }

  .schedule-main-title-mobile {
    font-size: 20px;
  }

  .schedule-add-event-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .schedule-left-sidebar .schedule-main-title {
    font-size: 18px;
  }
}

/* Responsive - Tablet */
@media (max-width: 900px) {
  .advanced-schedule-container {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 80px);
  }

  .schedule-left-sidebar {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 12px;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    height: auto;
    max-height: 220px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .calendar-selector {
    display: none;
  }

  .mini-calendar-section {
    flex: 0 0 220px;
    min-width: 220px;
    max-width: 220px;
  }

  .schedule-filter-section {
    flex: 0 0 160px;
    min-width: 160px;
  }

  .schedule-main-content {
    flex: 1;
    min-height: 500px;
  }

  .schedule-main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .schedule-header-left {
    flex-wrap: wrap;
    gap: 10px;
  }

  .schedule-header-right {
    width: 100%;
    justify-content: space-between;
  }

  /* Enhanced tablet calendar navigation */
  .schedule-month-selector {
    min-width: 150px;
  }

  /* Tablet calendar grid improvements */
  .week-grid {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Tablet calendar touch targets */
  .week-header-day {
    min-width: 60px;
  }
}

/* Responsive - Mobile */
@media (max-width: 640px) {
  .schedule-left-sidebar {
    display: none;
  }

  .schedule-main-title-mobile {
    display: block;
  }

  .schedule-breadcrumb {
    flex-direction: column;
    gap: 12px;
  }

  .schedule-add-event-btn {
    width: 100%;
    justify-content: center;
    order: -1;
  }

  .dashboard-search-bar {
    max-width: 100%;
  }

  .mini-calendar-section,
  .schedule-filter-section,
  .calendar-selector {
    display: none;
  }

  .advanced-schedule-container {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .schedule-main-header {
    margin-bottom: 12px;
    gap: 10px;
  }

  .schedule-header-left {
    width: 100%;
    justify-content: space-between;
  }

  .schedule-header-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .schedule-event-count {
    display: none;
  }

  .smart-schedule-btn {
    display: none;
  }

  .schedule-view-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .view-toggle-btn {
    flex: 1;
    text-align: center;
    padding: 10px 0;
  }

  .schedule-add-btn {
    width: 100%;
    justify-content: center;
  }

  .week-view-container,
  .month-view-container,
  .agenda-view-container,
  .year-view-container {
    border-radius: 14px;
  }

  .week-header-tz,
  .time-labels-col {
    display: none;
  }

  .week-header {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .week-grid {
    grid-template-columns: repeat(7, minmax(60px, 1fr));
  }

  .week-day-name {
    font-size: 7px;
  }

  .week-day-number {
    font-size: 14px;
  }

  .week-header-day.today .week-day-number {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .schedule-main-title {
    font-size: 20px;
  }

  .schedule-main-title-mobile {
    font-size: 18px;
  }

  .schedule-add-event-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .schedule-left-sidebar .schedule-main-title {
    font-size: 16px;
  }

  .schedule-month-selector {
    padding: 6px 10px;
  }

  .month-year-text {
    font-size: 13px;
  }

  .schedule-view-toggle {
    padding: 2px;
  }

  .view-toggle-btn {
    padding: 6px 10px;
    font-size: 11px;
  }

  .schedule-add-btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .schedule-add-btn span {
    display: none;
  }

  .week-event-card {
    /* Mobile: allow overlap positioning but with smaller gap */
    min-width: 40px;
  }

  .week-event-title {
    font-size: 10px;
  }

  .week-event-time {
    font-size: 8px;
  }

  .event-avatars {
    display: none;
  }

  /* Enhanced mobile calendar day touch targets */
  .mini-cal-day {
    min-height: 24px;
    padding: 4px 2px;
    font-size: 10px;
    border-radius: 6px;
  }

  /* Better touch targets for mobile */
  .mini-cal-nav-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  /* Mobile optimized calendar grid */
  .calendar-grid {
    gap: 2px;
  }

  .calendar-day {
    padding: 6px;
    border-radius: 8px;
  }

  .calendar-day .day-number {
    width: 24px;
    height: 24px;
    line-height: 24px;
    font-size: 12px;
  }

  /* Mobile agenda view improvements */
  .agenda-day-header {
    padding: 12px 16px;
  }

  .agenda-event-card {
    padding: 10px 14px;
    margin: 0 12px 8px;
  }

  /* Mobile day view improvements */
  .day-view-container {
    padding: 10px;
  }

  .day-hours-grid {
    gap: 8px;
  }

  .hour-slot {
    min-height: 40px;
    font-size: 12px;
  }

  .day-event-card {
    margin: 2px 0;
    padding: 6px 8px;
    font-size: 11px;
  }

  /* Month view mobile enhancements */
  .month-grid {
    gap: 2px;
  }

  .month-day {
    min-height: 60px;
    padding: 4px;
  }

  .month-day-number {
    font-size: 12px;
    width: 20px;
    height: 20px;
    line-height: 20px;
  }

  .month-events {
    font-size: 9px;
    gap: 1px;
  }

  /* Mobile calendar header improvements */
  .calendar-header {
    padding: 8px;
  }

  .calendar-title {
    font-size: 16px;
  }

  .calendar-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
  .mini-calendar-section,
  .schedule-filter-section,
  .calendar-selector,
  .schedule-left-sidebar {
    display: none;
  }

  .schedule-main-content {
    padding: 10px 12px;
  }

  .schedule-breadcrumb {
    display: none;
  }

  /* Further mobile optimizations for smallest screens */
  .mini-cal-day {
    min-height: 20px;
    padding: 2px 1px;
    font-size: 9px;
  }

  .mini-cal-nav-btn {
    width: 24px;
    height: 24px;
  }

  .calendar-day {
    padding: 4px;
  }

  .calendar-day .day-number {
    width: 20px;
    height: 20px;
    line-height: 20px;
    font-size: 11px;
  }

  .agenda-event-card {
    padding: 8px 12px;
    margin: 0 8px 6px;
  }

  .day-event-card {
    padding: 4px 6px;
    font-size: 10px;
  }

  .month-day {
    min-height: 50px;
    padding: 2px;
  }

  .month-day-number {
    font-size: 11px;
    width: 18px;
    height: 18px;
    line-height: 18px;
  }

  .calendar-nav-btn {
    width: 28px;
    height: 28px;
  }

  /* Mobile calendar swipe gestures */
  .calendar-grid,
  .week-grid,
  .month-grid {
    touch-action: pan-y;
  }

  /* Mobile calendar touch enhancements */
  .calendar-day,
  .mini-cal-day,
  .week-header-day,
  .month-day,
  .day-hour,
  .agenda-event-card {
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
    user-select: none;
  }

  /* Active/hover states for touch devices */
  .calendar-day:active,
  .mini-cal-day:active,
  .week-header-day:active,
  .month-day:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }

  /* Smooth transition for mobile interactions */
  .calendar-day,
  .mini-cal-day,
  .week-header-day,
  .month-day,
  .agenda-event-card,
  .day-event-card {
    transition: all 0.2s ease;
  }

  /* Compact calendar view for very small screens */
  .calendar-widget {
    padding: 16px;
  }

  /* Mobile calendar widget enhancements */
  .calendar-widget {
    margin: 0 8px 16px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }

  /* Mobile calendar navigation */
  .calendar-nav {
    gap: 6px;
  }

  .calendar-nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .calendar-nav-btn svg {
    width: 16px;
    height: 16px;
  }

  /* Mobile calendar day headers */
  .calendar-day-header {
    font-size: 10px;
    padding: 4px 0;
  }

  .calendar-title {
    font-size: 14px;
  }

  .calendar-header {
    padding: 6px;
  }
}

/* ============================================
   Professional Settings Layout & Styles
   ============================================ */

.settings-container {
  padding: 40px 24px;
  max-width: 960px;
  margin: 0 auto;
  max-height: calc(100vh - 10px);
  overflow-y: auto;
  overflow-x: hidden;

  scroll-behavior: smooth;
  /* Custom scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.settings-container::-webkit-scrollbar {
  width: 8px;
}

.settings-container::-webkit-scrollbar-track {
  background: transparent;
}

.settings-container::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.settings-container::-webkit-scrollbar-thumb:hover {
  background-color: var(--muted-foreground);
}

.view-header {
  margin-bottom: 40px;
  text-align: center;
}

.view-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--foreground);
}

.view-subtitle {
  font-size: 15px;
  color: var(--muted-foreground);
  margin: 0;
}

.settings-section {
  margin-bottom: 40px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  padding: 5px 24px;
  margin: 0;
  color: var(--foreground);
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.2s;
}

.settings-item:hover {
  background: var(--surface-hover);
}

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

.settings-label {
  flex: 1;
  padding-right: 24px;
}

.settings-label span {
  font-size: 15px;
  font-weight: 500;
  color: var(--foreground);
  display: block;
  margin-bottom: 4px;
}

.settings-description {
  font-size: 13px;
  color: var(--muted-foreground);
  margin: 0;
  line-height: 1.4;
}

.settings-value,
.form-select {
  min-width: 200px;
}

.danger-zone {
  background: rgba(220, 38, 38, 0.08);
  border-top: 1px solid rgba(220, 38, 38, 0.15);
}

.danger-zone .settings-label span {
  color: var(--destructive);
}

.danger-zone .btn-destructive {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

/* Responsive Settings */
@media (max-width: 768px) {
  .settings-container {
    padding: 24px 16px;
    max-height: calc(100vh - 100px);
  }

  .settings-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .settings-value,
  .form-select {
    width: 100%;
  }
}

.settings-section .btn {
  min-width: 180px;
  justify-content: center;
}

/* ============================================
   Professional Backlog Styles
   ============================================ */

.backlog-modern {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px;
}

.backlog-empty-state {
  text-align: center;
  padding: 100px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-illustration {
  margin-bottom: 32px;
  position: relative;
}

.empty-illustration svg {
  color: var(--primary);
  opacity: 0.15;
  filter: drop-shadow(0 0 20px var(--primary));
}

.empty-illustration::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, var(--primary-transparent) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  z-index: -1;
}

.empty-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

.empty-description {
  font-size: 15px;
  color: var(--muted-foreground);
  max-width: 340px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.backlog-empty-state .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px var(--primary-transparent);
}

.backlog-empty-state .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--primary-transparent);
  filter: brightness(1.1);
}

.backlog-empty-state .btn-primary svg {
  stroke-width: 2.5;
}

.backlog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 20px;
}

.backlog-title-section {
  flex: 1;
}

.backlog-stats-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.stat-chip {
  padding: 4px 10px;
  background: var(--surface);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.stat-chip.active {
  background: var(--primary) / 0.12;
  color: var(--primary);
}

.stat-chip.done {
  background: rgba(34, 197, 94, 0.12);
  color: hsl(142, 71%, 45%);
}

.backlog-progress-ring {
  position: relative;
  width: 80px;
  height: 80px;
}

.progress-ring-svg {
  transform: rotate(-90deg);
}

.progress-ring-svg circle {
  transition: stroke-dashoffset 0.5s ease;
}

.backlog-progress-ring .progress-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--foreground);
}

.backlog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.backlog-filters {
  display: flex;
  gap: 6px;
}

.filter-chip {
  padding: 8px 14px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-chip:hover {
  border-color: var(--primary);
  color: var(--foreground);
}

.filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.sort-select {
  padding: 8px 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--foreground);
  cursor: pointer;
}

.backlog-tasks-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.backlog-task-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  transition: all 0.2s;
}

.backlog-task-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.backlog-task-card.done {
  opacity: 0.6;
}

.backlog-task-card.done .task-title {
  text-decoration: line-through;
}

.task-card-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.task-checkbox {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--muted-foreground);
  transition: all 0.15s;
}

.task-checkbox:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.task-content {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.task-content .task-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--foreground);
  display: block;
  margin-bottom: 2px;
}

.task-content .task-date {
  font-size: 12px;
  color: var(--muted-foreground);
}

.task-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}

.backlog-task-card:hover .task-actions {
  opacity: 1;
}

.task-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  color: var(--muted-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.task-action-btn:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.task-action-btn.delete:hover {
  background: var(--destructive);
  border-color: var(--destructive);
  color: white;
}

.backlog-no-results {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted-foreground);
}

.backlog-add-section {
  margin-top: 24px;
}

.backlog-quick-input {
  width: 100%;
  padding: 16px 20px;
  font-size: 15px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--foreground);
  border: 2px solid var(--glass-border);
  border-radius: 14px;
  outline: none;
  transition: all 0.2s;
}

.backlog-quick-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary) / 0.1;
}

.backlog-quick-input::placeholder {
  color: var(--muted-foreground);
}

.backlog-quick-add-wrapper {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}

.quick-add-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary);
  border: none;
  color: var(--primary-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.quick-add-btn:hover {
  transform: translateY(-50%) scale(1.05);
}

.backlog-clear-section {
  margin-top: 32px;
  text-align: center;
}

.clear-completed-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--muted-foreground);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.clear-completed-btn:hover {
  border-color: var(--destructive);
  color: var(--destructive);
}

/* ============================================
   Focus Mode Floating Timer - Liquid Glass
   ============================================ */

.focus-timer-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  user-select: none;
  touch-action: none;
}

/* Snap animation for smooth corner transitions */
.focus-timer-float.snapping {
  transition: left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    right 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    top 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.focus-timer-float.dragging {
  cursor: grabbing;
  opacity: 0.95;
  transform: scale(1.02);
}

.focus-timer-widget {
  background: var(--surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease, min-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 180px;
  cursor: grab;
}

.focus-timer-widget:active {
  cursor: grabbing;
}

.focus-timer-float.dragging .focus-timer-widget {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.focus-timer-widget.expanded {
  min-width: 320px;
}

.focus-timer-widget.tasks-visible {
  min-width: 340px;
}

/* Drag handle indicator */
.timer-drag-handle {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 4px;
  background: var(--muted-foreground);
  border-radius: 2px;
  opacity: 0.3;
  transition: opacity 0.2s;
}

.focus-timer-widget:hover .timer-drag-handle {
  opacity: 0.6;
}

.timer-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px 14px;
  cursor: pointer;
  position: relative;
}

.timer-display {
  font-size: 28px;
  font-weight: 700;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  color: var(--foreground);
  letter-spacing: 2px;
}

.timer-project {
  font-size: 12px;
  color: var(--muted-foreground);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timer-controls {
  display: flex;
  gap: 8px;
  padding: 0 18px 14px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.25s ease;
}

.focus-timer-widget:hover .timer-controls,
.focus-timer-widget.expanded .timer-controls {
  opacity: 1;
  max-height: 60px;
  padding-bottom: 14px;
}

.timer-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.timer-btn.pause {
  background: var(--primary);
  color: var(--primary-foreground);
}

.timer-btn.pause:hover {
  filter: brightness(1.1);
}

.timer-btn.stop {
  background: var(--surface);
  color: var(--muted-foreground);
  border: 1px solid var(--glass-border);
}

.timer-btn.stop:hover {
  background: var(--destructive);
  color: white;
  border-color: var(--destructive);
}

.timer-tasks {
  border-top: 1px solid var(--glass-border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.focus-timer-widget.tasks-visible .timer-tasks {
  max-height: 300px;
}

.timer-tasks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timer-tasks-list {
  padding: 0 12px 12px;
  max-height: 200px;
  overflow-y: auto;
}

.timer-task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.timer-task-item:hover {
  background: var(--surface-hover);
}

.timer-task-item.done {
  opacity: 0.5;
}

.timer-task-item.done span {
  text-decoration: line-through;
}

.timer-task-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--muted-foreground);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.timer-task-item:hover .timer-task-checkbox {
  border-color: var(--primary);
}

.timer-task-item.done .timer-task-checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.timer-task-item.done .timer-task-checkbox::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.timer-task-item span {
  font-size: 13px;
  color: var(--foreground);
}

/* Compact Backlog Progress Bar */
.backlog-progress .progress-bar {
  width: 100%;
  height: 5px;
  background-color: var(--muted);
  border-radius: 3px;
  overflow: hidden;
}

.backlog-progress .progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ============================================
   Team Updates Styles
   ============================================ */

.new-update-area {
  display: flex;
  gap: 16px;
  padding: 20px;
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  border-radius: 16px 16px 0 0;
}

.new-update-area .user-avatar {
  width: 40px;
  height: 40px;
  font-size: 16px;
  flex-shrink: 0;
}

.new-update-area textarea {
  flex: 1;
  min-height: 120px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  resize: vertical;
  font-size: 15px;
  line-height: 1.6;
  color: var(--foreground);
}

.new-update-area textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}



.update-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.update-header-left strong {
  font-weight: 600;
  font-size: 15px;
}

.update-header-left span {
  font-size: 13px;
  color: var(--muted-foreground);
}

.update-message {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
  white-space: pre-wrap;
  word-break: break-word;
}

.update-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.update-actions .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  height: 32px;
}

.update-actions .btn-ghost:hover {
  background-color: var(--surface-hover);
  color: var(--foreground);
}

.update-actions .btn-ghost svg {
  width: 18px;
  height: 18px;
}

.update-actions .btn-ghost.liked {
  color: var(--primary);
}

.update-actions .btn-ghost.liked svg {
  fill: currentColor;
}

/* Delete button */
.delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--muted-foreground);
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
}

.reply-item:hover .delete-btn {
  opacity: 1;
}

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

.delete-btn svg {
  width: 16px;
  height: 16px;
}

/* Reply section */
.reply-section {
  margin-top: 24px;
  padding-left: 56px;
  border-left: 2px solid var(--glass-border);
}

.reply-item {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

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

.reply-item .user-avatar {
  width: 32px;
  height: 32px;
  font-size: 13px;
  flex-shrink: 0;
}

.reply-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.reply-header strong {
  font-weight: 600;
  font-size: 14px;
}

.reply-header span {
  font-size: 12px;
  color: var(--muted-foreground);
}

.reply-message {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.updates-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted-foreground);
}

.updates-empty .empty-icon {
  font-size: 64px;
  margin-bottom: 24px;
  opacity: 0.6;
}

.updates-empty p {
  font-size: 16px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border);
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: var(--foreground);
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked+.toggle-slider {
  background-color: hsl(142 71% 45%);
}

.toggle-switch input:checked+.toggle-slider:before {
  transform: translateX(22px);
  background-color: white;
}

/* Creator Badge */
.creator-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: linear-gradient(135deg, hsl(271 91% 65% / 0.15), hsl(217 91% 60% / 0.15));
  border: 1px solid hsl(271 91% 65% / 0.3);
  border-radius: 10px;
}

.creator-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(271 91% 65%), hsl(217 91% 60%));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 600;
}

.creator-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

/* Theme Preview Swatches */
:root {
  --preview-dark: hsl(240 6% 6%);
  --preview-light: hsl(0 0% 98%);
  --preview-coffee: #8c735a;
  --preview-pink: #f48fb1;
  --preview-purple: #7c5fd9;
  --preview-ocean: #7db8b2;
  --preview-forest: hsl(150, 70%, 50%);
  --preview-sunset: hsl(15, 90%, 60%);
  --preview-midnight: hsl(220, 90%, 60%);
  --preview-dracula: hsl(330, 81%, 60%);
  --preview-liquid-glass: linear-gradient(135deg, #78b4ff, #b478ff);
}



/* ============================================
   PDF Viewer Overlay
   ============================================ */
.pdf-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 5000;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.pdf-viewer-container {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.pdf-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  gap: 16px;
}

.pdf-viewer-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.pdf-viewer-container iframe {
  background: white;
  border-radius: 0 0 12px 12px;
  border: 1px solid var(--border);
  border-top: none;
}

/* ============================================
   File Items
   ============================================ */
.file-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  transition: all 0.2s;
}

.file-item:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.file-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: 8px;
  flex-shrink: 0;
}

.file-icon.pdf-icon {
  background: hsla(0, 84%, 60%, 0.1);
}

.file-thumbnail {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.file-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  font-size: 12px;
  color: var(--muted-foreground);
}

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

@media (max-width: 768px) {
  .file-item {
    flex-wrap: wrap;
    gap: 12px;
  }

  .file-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .pdf-viewer-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .pdf-viewer-header h3 {
    width: 100%;
    order: -1;
  }

  .pdf-viewer-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ============================================
   Create Button & Dropdown Styles
   ============================================ */

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.create-dropdown-container {
  position: relative;
}

.create-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, hsl(217, 91%, 60%) 0%, hsl(271, 91%, 65%) 100%);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(94, 106, 210, 0.3);
}

.create-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(94, 106, 210, 0.4);
}

.create-btn .icon {
  width: 16px;
  height: 16px;
}

.create-btn .dropdown-arrow {
  width: 14px;
  height: 14px;
  margin-left: 4px;
  transition: transform 0.2s;
}

.create-dropdown-container.open .dropdown-arrow {
  transform: rotate(180deg);
}

.create-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.2s ease;
  z-index: 1000;
  overflow: hidden;
}

.create-dropdown-container.open .create-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.create-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.create-dropdown-item:hover {
  background: var(--surface-hover);
}

.create-dropdown-item .icon {
  width: 18px;
  height: 18px;
  color: var(--muted-foreground);
}

.create-dropdown-item:hover .icon {
  color: hsl(217, 91%, 60%);
}

/* ============================================
   Doc Editor Styles (ClickUp-like)
   ============================================ */

.doc-editor-overlay {
  position: fixed;
  inset: 0;
  background: var(--background);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  animation: fadeInDoc 0.25s ease-out;
}

@keyframes fadeInDoc {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.doc-editor-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.doc-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.doc-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s;
}

.doc-back-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.doc-title-input {
  font-size: 20px;
  font-weight: 700;
  background: transparent;
  border: none;
  color: var(--foreground);
  outline: none;
  width: 300px;
}

.doc-title-input::placeholder {
  color: var(--muted-foreground);
}

.doc-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-save-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: hsl(142, 71%, 45%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.doc-save-btn:hover {
  background: hsl(142, 71%, 40%);
  transform: translateY(-1px);
}

/* Doc Toolbar */
.doc-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 12px;
  border-right: 1px solid var(--border);
}

.toolbar-group:last-child {
  border-right: none;
}

.toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.toolbar-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.toolbar-btn.active {
  background: hsl(217, 91%, 60%);
  color: white;
}

.toolbar-btn .icon {
  width: 16px;
  height: 16px;
}

.toolbar-select {
  padding: 6px 12px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--foreground);
  font-size: 13px;
  cursor: pointer;
}

.color-picker-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: transform 0.15s;
}

.color-picker-btn:hover {
  transform: scale(1.1);
}

/* Doc Content Area */
.doc-content-area {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
  display: flex;
  justify-content: center;
}

.doc-editor-content {
  width: 100%;
  max-width: 800px;
  min-height: 500px;
  padding: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--foreground);
  outline: none;
}

.doc-editor-content:empty::before {
  content: "Start writing your document...";
  color: var(--muted-foreground);
}

.doc-editor-content h1 {
  font-size: 2em;
  font-weight: 700;
  margin: 0.5em 0;
}

.doc-editor-content h2 {
  font-size: 1.5em;
  font-weight: 600;
  margin: 0.5em 0;
}

.doc-editor-content h3 {
  font-size: 1.25em;
  font-weight: 600;
  margin: 0.5em 0;
}

.doc-editor-content p {
  margin: 0.5em 0;
}

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

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

.doc-editor-content blockquote {
  margin: 1em 0;
  padding-left: 1em;
  border-left: 4px solid hsl(217, 91%, 60%);
  color: var(--muted-foreground);
}

/* ============================================
   Excel Editor Styles
   ============================================ */

.excel-editor-overlay {
  position: fixed;
  inset: 0;
  background: var(--background);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  animation: fadeInDoc 0.25s ease-out;
}

.excel-editor-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.excel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.excel-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.excel-title-input {
  font-size: 18px;
  font-weight: 600;
  background: transparent;
  border: none;
  color: var(--foreground);
  outline: none;
  width: 250px;
}

.excel-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.excel-toolbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.excel-toolbar-btn:hover {
  background: var(--accent);
  color: var(--foreground);
}

.excel-content-area {
  flex: 1;
  overflow: auto;
  padding: 20px;
}

.excel-grid {
  display: grid;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card);
}

.excel-header-row {
  display: contents;
}

.excel-header-cell {
  padding: 10px 16px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  text-align: center;
  user-select: none;
}

.excel-row-header {
  padding: 8px 12px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-align: center;
  user-select: none;
}

.excel-cell {
  padding: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  min-width: 100px;
}

.excel-cell input {
  width: 100%;
  height: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--foreground);
  font-size: 14px;
  outline: none;
}

.excel-cell input:focus {
  background: var(--surface-hover);
  box-shadow: inset 0 0 0 2px hsl(217, 91%, 60%);
}

.excel-cell:last-child {
  border-right: none;
}

/* ============================================
   New Space Modal Styles
   ============================================ */

.space-icon-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.space-icon-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.15s;
}

.space-icon-option:hover {
  background: var(--surface-hover);
  border-color: var(--muted-foreground);
}

.space-icon-option.selected {
  background: hsl(217, 91%, 60%);
  border-color: hsl(217, 91%, 60%);
}

/* Custom Space Item in Sidebar - Now matches Nav Item styling */
.custom-space-item-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.custom-space-item-wrapper:hover .delete-item-btn {
  opacity: 1;
}

.custom-space-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
  text-align: left;
  width: 100%;
}

.custom-space-item:hover,
.custom-space-item.active {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Dark theme: active custom-space items should be white */
html:not([data-mode="light"]) body:not(.light) .custom-space-item.active {
  color: #ffffff;
}

/* Dark theme: custom-space item hover should be white */
html:not([data-mode="light"]) body:not(.light) .custom-space-item:hover {
  color: #ffffff;
}

/* Light theme: active/hover custom-space item colors */
html[data-mode="light"] .custom-space-item:hover,
body.light .custom-space-item:hover,
html[data-mode="light"] .custom-space-item.active,
body.light .custom-space-item.active {
  color: var(--primary);
}

.delete-item-btn {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-foreground);
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
}

.delete-item-btn:hover {
  background: hsl(0, 72%, 51%);
  border-color: hsl(0, 72%, 51%);
  color: white;
}

.delete-item-btn .icon {
  width: 14px;
  height: 14px;
}

.space-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  color: var(--muted-foreground);
}

.spaces-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 12px;
}

.spaces-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted-foreground);
  padding: 12px 10px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.spaces-section-label svg {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

/* Delete button on cards */
.delete-card-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted-foreground);
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
  z-index: 10;
}

.doc-card:hover .delete-card-btn,
.excel-card:hover .delete-card-btn {
  opacity: 1;
}

.delete-card-btn:hover {
  background: hsl(0, 72%, 51%);
  border-color: hsl(0, 72%, 51%);
  color: white;
}

.delete-card-btn .icon {
  width: 16px;
  height: 16px;
}

/* Danger button style */
.btn-danger {
  background: hsl(0, 72%, 51%);
  color: white;
  border: none;
}

.btn-danger:hover {
  background: hsl(0, 72%, 45%);
}

/* ============================================
   Themed Buttons - Match chosen theme
   ============================================ */
.btn-themed-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-themed-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* For dark mode / custom themes */
[data-theme] .btn-themed-primary,
:root .btn-themed-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.create-btn {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.create-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.doc-save-btn {
  background: var(--primary);
  color: var(--primary-foreground);
}

.doc-save-btn:hover {
  filter: brightness(1.1);
}

/* ============================================
   Enhanced Space Modal - SVG Icons & Responsiveness
   ============================================ */
.space-icon-grid-svg {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 8px;
  margin-top: 12px;
  max-height: 180px;
  overflow-y: auto;
  padding: 4px;
}

.space-icon-svg-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--muted-foreground);
}

.space-icon-svg-option svg {
  width: 20px;
  height: 20px;
}

.space-icon-svg-option:hover {
  background: var(--surface-hover);
  border-color: var(--muted-foreground);
  color: var(--foreground);
}

.space-icon-svg-option.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

/* Space Overview UI Styles - Glassmorphism Floating Container */
.space-overview-container {
  min-height: 100vh;
  padding: var(--sidebar-inset);
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.space-main-wrapper {
  flex: 1;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: containerFadeIn 0.4s ease-out;
}

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

.space-top-bar {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
}

.space-main-content {
  padding: 10px 20px;
  flex: 1;
  overflow-y: auto;
  width: 100%;
}

/* Update cards to look better inside the glass container */
.space-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.space-breadcrumb {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.breadcrumb-item:hover {
  background: var(--surface);
}

.space-top-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.space-view-tabs {
  display: flex;
  background: var(--surface);
  border-radius: 8px;
  padding: 4px;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.space-view-tabs::-webkit-scrollbar {
  height: 4px;
}

.space-view-tabs::-webkit-scrollbar-track {
  background: transparent;
}

.space-view-tabs::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 2px;
}

.space-view-tabs::-webkit-scrollbar-thumb:hover {
  background-color: var(--muted-foreground);
}

.view-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

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

.view-tab.active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.view-tab.add-view {
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
}

.space-top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.space-header-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.space-header-menu-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.space-header-menu-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border);
  color: var(--foreground);
}

.space-header-menu-btn .icon {
  width: 18px;
  height: 18px;
}

.space-header-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  padding: 6px;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px) scale(0.98);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

.space-header-menu-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.space-header-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  text-align: left;
}

.space-header-menu-item:hover {
  background: var(--surface-hover);
}

.space-header-menu-item .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted-foreground);
}

.space-header-menu-item.delete:hover {
  background: hsla(0, 84%, 60%, 0.12);
}

.space-header-menu-item.delete:hover .icon,
.space-header-menu-item.delete:hover span {
  color: hsl(0, 84%, 60%);
}

.space-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.space-action-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
  border-color: var(--border-hover);
}

/* Notification Banner */
.notification-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.banner-actions {
  display: flex;
  gap: 8px;
}

.banner-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.banner-btn.secondary {
  background: transparent;
  color: var(--muted-foreground);
}

.banner-btn.secondary:hover {
  background: var(--surface);
  color: var(--foreground);
}

.banner-btn.primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.banner-btn.primary:hover {
  background: var(--primary-hover);
}

/* Main Content Area */
.space-main-content {
  padding: 10px 20px;
  width: 100%;
  margin: 0;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 120px);
  scroll-behavior: smooth;
  /* Custom scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Webkit scrollbar styling */
.space-main-content::-webkit-scrollbar {
  width: 6px;
}

.space-main-content::-webkit-scrollbar-track {
  background: transparent;
}

.space-main-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.space-main-content::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
}

/* Cards Row */
.space-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.space-card {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.2s;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.space-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

/* Docs Card Add Button - Hover Effect */
.card-add-doc-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--muted-foreground);
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%) scale(0.9);
}

.card-add-doc-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

.docs-card-hover:hover .card-add-doc-btn {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* Excel Card Styles */
.excel-card-hover:hover .card-add-excel-btn {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.card-add-excel-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(-50%) scale(0.8);
  transition: all 0.2s;
}

.card-add-excel-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

.excel-card-hover:hover .card-add-excel-btn {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.card-add-excel-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-50%) scale(1.05);
}

.card-add-excel-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.excel-icon {
  color: var(--primary);
}

.excel-empty {
  color: var(--muted-foreground);
  opacity: 0.6;
}

/* Whiteboard Card Styles */
.whiteboard-card-hover:hover .card-add-whiteboard-btn {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.card-add-whiteboard-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(-50%) scale(0.8);
  transition: all 0.2s;
}

.card-add-whiteboard-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

.whiteboard-card-hover:hover .card-add-whiteboard-btn {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.card-add-whiteboard-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-50%) scale(1.05);
}

.card-add-whiteboard-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.whiteboard-icon {
  color: var(--primary);
}

.whiteboard-empty {
  color: var(--muted-foreground);
  opacity: 0.6;
}

.card-add-doc-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
  transform: translateY(-50%) scale(1.05);
}

.card-add-doc-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.card-content {
  padding: 16px 20px 20px;
  flex: 1;
}

.card-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 8px;
}

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

.card-item:hover {
  background: var(--surface);
}

/* Delete button for card items */
.card-item-delete {
  margin-left: auto;
  padding: 6px;
  border-radius: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
}

.card-item-delete svg {
  width: 16px;
  height: 16px;
}

.card-item:hover .card-item-delete {
  opacity: 1;
}

.card-item-delete:hover {
  background: var(--destructive);
  color: var(--destructive-foreground);
  transform: scale(1.1);
}

.item-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted-foreground);
}

.item-icon.emoji-only {
  background: transparent;
}

.item-icon svg {
  width: 16px;
  height: 16px;
}

.bookmark-icon {
  background: hsl(45, 100%, 50%);
  color: white;
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-meta {
  font-size: 12px;
  color: var(--muted-foreground);
}

/* Empty States */
.empty-state-small {
  text-align: center;
  padding: 24px 0;
}

.empty-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--muted-foreground);
}

.empty-icon svg {
  width: 20px;
  height: 20px;
}

.empty-text {
  font-size: 13px;
  color: var(--muted-foreground);
}

/* Bookmarks Card Specific */
.bookmarks-empty {
  text-align: center;
  padding: 24px 0;
}

.bookmark-large-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--muted-foreground);
}

.bookmark-large-icon svg {
  width: 24px;
  height: 24px;
}

.bookmarks-text {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-bottom: 16px;
  line-height: 1.4;
}

.add-bookmark-btn {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.add-bookmark-btn:hover {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

/* Sections */
.space-section {
  margin-bottom: 32px;
}

.section-header {
  margin-bottom: 20px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

/* Folders Section */
.folders-placeholder {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  text-align: left;
  overflow: hidden;
  transition: all 0.2s;
}

.folders-placeholder.has-folders {
  border: 1px solid var(--glass-border);
  border-style: solid;
  background: var(--glass-bg);
  padding: 0;
  text-align: left;
}

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

.folders-placeholder.has-folders .folders-placeholder-header {
  border-bottom-color: var(--glass-border);
}

.folders-placeholder-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.folders-placeholder-title {
  font-size: 14px;
  font-weight: 650;
  color: var(--foreground);
  margin: 0;
}

.folders-placeholder-body {
  padding: 14px 16px 16px;
}

.folders-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  align-items: start;
}

.folder-tile {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--foreground);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  text-align: left;
}

.folder-tile:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.16);
}

.folder-tile:active {
  background: rgba(255, 255, 255, 0.04);
}

.folder-tile-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted-foreground);
}

.folder-tile-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Inline Folder Explorer (inside Space -> Folders card) */
.inline-folder-explorer {
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.inline-folder-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.inline-folder-back {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--foreground);
  cursor: pointer;
}

.inline-folder-back svg {
  width: 16px;
  height: 16px;
}

.inline-folder-back:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.inline-folder-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.inline-folder-emoji {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.inline-folder-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-folder-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-folder-create-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s ease;
}

.inline-folder-create-btn svg {
  width: 16px;
  height: 16px;
}

.inline-folder-create-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--foreground);
}

.inline-folder-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.inline-folder-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.inline-folder-tab.active {
  color: var(--foreground);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.inline-folder-pill {
  height: 18px;
  min-width: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--foreground);
  font-size: 11px;
  font-weight: 700;
}

.inline-folder-content {
  padding: 10px 14px 14px;
}

.inline-folder-section {
  display: none;
}

.inline-folder-section.active {
  display: block;
}

.inline-folder-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inline-folder-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  text-align: left;
  color: var(--foreground);
}

.inline-folder-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
}

.inline-folder-row-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-folder-row-meta {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--muted-foreground);
}

.inline-folder-empty {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  font-size: 13px;
}

.folders-placeholder:hover {
  border-color: var(--border-hover);
  background: var(--surface);
}

.folders-placeholder.has-folders:hover {
  border-color: var(--glass-border-normal);
  background: var(--glass-bg);
}

.folder-pill-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  align-items: start;
}

.folder-pill-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  color: var(--foreground);
  height: 34px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.folder-pill-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  transform: none;
}

.folder-pill-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted-foreground);
}

.folder-pill-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
}

.folder-icon-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--muted-foreground);
}

.folder-icon-large svg {
  width: 32px;
  height: 32px;
}

.folders-text {
  font-size: 14px;
  color: var(--muted-foreground);
  margin-bottom: 16px;
  text-align: center;
}

.add-folder-btn {
  padding: 8px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.add-folder-btn:hover {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.folders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.folder-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 10px;
  align-items: center;
  transition: all 0.2s;
}

.folder-item:hover {
  border-color: var(--border-hover);
  background: var(--surface);
}

.folder-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.folder-icon svg {
  width: 18px;
  height: 18px;
}

.folder-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.folder-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.folder-action-btn:hover {
  color: var(--foreground);
  background: var(--surface-hover);
}

.folder-action-btn.delete:hover {
  background: var(--destructive);
  color: var(--destructive-foreground);
  border-color: var(--destructive);
}

.folder-action-btn svg {
  width: 14px;
  height: 14px;
}

.folder-add-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: transparent;
}

.folder-dropdown-container {
  position: relative;
  display: inline-block;
}

.folder-dropdown-form {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: min(360px, 90vw);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 1000;
}

.folder-dropdown-header {
  margin-bottom: 10px;
}

.folder-dropdown-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--foreground);
}

.folder-dropdown-subtitle {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted-foreground);
}

.folder-dropdown-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--foreground);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
}

.folder-dropdown-input:focus {
  border-color: var(--primary);
}

.folder-dropdown-error {
  margin-top: 8px;
  font-size: 12px;
  color: var(--destructive);
}

.folder-dropdown-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.folder-dropdown-btn {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
  font-weight: 600;
}

.folder-dropdown-btn:hover {
  background: var(--surface-hover);
}

.folder-dropdown-btn.create {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.folder-dropdown-btn.create:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Lists Table */
.lists-table {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1fr 40px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.table-cell {
  padding: 16px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.add-column {
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-list-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--muted-foreground);
}

.add-list-btn:hover {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.add-list-btn svg {
  width: 14px;
  height: 14px;
}

.table-placeholder {
  padding: 60px 20px;
  text-align: center;
}

.placeholder-text {
  font-size: 14px;
  color: var(--muted-foreground);
}

/* Space Overview Modern Header Styles */
.space-top-bar-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  min-height: 48px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-radius: 24px 24px 0 0;
}

.space-top-left-modern {
  display: flex;
  align-items: center;
  gap: 20px;
}

.space-breadcrumb-modern {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
}

.breadcrumb-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1; /* Purple folder icon */
}

.breadcrumb-icon svg {
  width: 14px;
  height: 14px;
}

.breadcrumb-star {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  cursor: pointer;
}

.breadcrumb-star svg {
  width: 14px;
  height: 14px;
}

.space-header-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-tab-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
}

.header-tab-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--foreground);
}

.header-tab-item.active {
  color: var(--foreground);
  background: rgba(255, 255, 255, 0.08);
}

.header-tab-item.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

.header-tab-item .tab-icon {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-tab-item .tab-icon svg {
  width: 14px;
  height: 14px;
}

.add-channel-btn {
  background: rgba(99, 102, 241, 0.1) !important;
  color: #818cf8 !important;
  font-weight: 600 !important;
}

.add-channel-btn:hover {
  background: rgba(99, 102, 241, 0.2) !important;
}

.add-view-btn {
  color: var(--muted-foreground);
}

.space-top-right-modern {
  display: flex;
  align-items: center;
}

.header-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-action-icon-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.header-action-icon-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--foreground);
}

.header-action-icon-btn svg {
  width: 14px;
  height: 14px;
}

.header-action-icon-btn.highlight {
  color: #ec4899; /* Pink color for Ask AI */
}


@media (max-width: 768px) {
  .space-cards-row {
    grid-template-columns: 1fr;
  }

  .space-top-bar {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .space-top-center {
    order: 3;
    width: 100%;
  }

  .space-view-tabs {
    width: 100%;
    justify-content: center;
  }

  .space-main-content {
    padding: 16px;
    max-height: calc(100vh - 140px);
    -webkit-overflow-scrolling: touch;
  }

  .table-header {
    grid-template-columns: 1fr 60px;
  }

  .table-cell:not(:first-child):not(.add-column) {
    display: none;
  }
}

.space-icon-svg svg {
  width: 16px;
  height: 16px;
}

.space-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar.collapsed .space-name-text {
  display: none;
}

.sidebar.collapsed .delete-item-btn {
  display: none;
}

/* Color tag on spaces */
.custom-space-item.has-color {
  border-left: 3px solid var(--space-accent);
}

/* Optional fields toggle */
.optional-fields-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  margin-bottom: 16px;
}

.optional-fields-toggle:hover {
  background: var(--surface-hover);
  border-style: solid;
  color: var(--foreground);
}

.optional-fields-toggle.expanded .optional-toggle-icon {
  transform: rotate(45deg);
}

.optional-toggle-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.optional-fields {
  margin-bottom: 16px;
  padding: 16px;
  background: var(--surface);
  border-radius: 12px;
  animation: slideDown 0.2s ease;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.team-invite-input-container {
  display: flex;
  gap: 8px;
}

.team-invite-input-container .form-input {
  flex: 1;
}

.invited-members-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.invited-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.remove-member-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  opacity: 0.7;
}

/* Enhanced Team Add People Modal Styles */
.team-add-people-modal {
  max-width: 600px;
}

.team-auth-section {
  padding: 20px;
  background: var(--surface);
  border-radius: 12px;
  margin-bottom: 24px;
}

.current-user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-avatar-large {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), hsl(271, 91%, 65%));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}

.user-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.user-name {
  font-size: 12px;
  font-weight: 300;
  color: var(--foreground);
  margin-bottom: 1px;
}

.user-email {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted-foreground);
}

.email-status.verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: hsla(142, 71%, 45%, 0.15);
  color: hsl(142, 71%, 45%);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.auth-prompt {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.google-signin-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  color: #4285F4;
  border: 1px solid #dadce0;
}

.google-signin-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.team-invite-section {
  margin-bottom: 24px;
}

.section-header {
  margin-bottom: 16px;
}

.section-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0 0 4px 0;
}

.section-description {
  font-size: 13px;
  color: var(--muted-foreground);
  margin: 0;
  line-height: 1.5;
}

.team-members-section,
.team-pending-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.team-members-list,
.pending-invitations-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.team-member-item,
.pending-invitation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border-radius: 8px;
  transition: background 0.2s;
}

.team-member-item:hover,
.pending-invitation-item:hover {
  background: var(--surface-hover);
}

.member-avatar,
.team-request-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), hsl(271, 91%, 65%));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.member-avatar img,
.team-request-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-info {
  flex: 1;
  min-width: 0;
}

.member-name,
.team-request-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 2px;
}

.member-email,
.team-request-email {
  display: block;
  font-size: 12px;
  color: var(--muted-foreground);
}

.member-status {
  flex-shrink: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-badge.active {
  background: hsla(142, 71%, 45%, 0.15);
  color: hsl(142, 71%, 45%);
}

.status-badge.pending {
  background: hsla(45, 93%, 47%, 0.15);
  color: hsl(45, 93%, 47%);
}

.invitation-info {
  flex: 1;
  min-width: 0;
}

.invitation-time,
.team-request-time {
  display: block;
  font-size: 11px;
  color: var(--muted-foreground);
  margin-top: 2px;
}

.team-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted-foreground);
}

.team-empty-state p {
  margin: 0 0 16px 0;
  font-size: 14px;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.6s linear infinite;
}

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

/* Enhanced Team Members Panel */
.team-follower-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.team-follower-status {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 2px;
}

.team-follower-email {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 2px;
}

.team-request-info {
  flex: 1;
  min-width: 0;
}

.team-request-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.btn-success {
  background: hsl(142, 71%, 45%);
  color: white;
}

.btn-success:hover {
  background: hsl(142, 71%, 40%);
}

.btn-danger {
  background: hsl(0, 84%, 60%);
  color: white;
}

.btn-danger:hover {
  background: hsl(0, 84%, 55%);
  transition: opacity 0.15s;
}

.remove-member-btn:hover {
  opacity: 1;
}

.color-tag-options {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.color-tag-option {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-tag-option:hover {
  transform: scale(1.1);
}

.color-tag-option.selected {
  box-shadow: 0 0 0 3px var(--background), 0 0 0 5px var(--primary);
}

/* ============================================
   Word-like Doc Editor Styles
   ============================================ */
.doc-editor-container.word-style {
  background: var(--background);
}

.word-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
}

.doc-title-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-saved-indicator {
  display: none;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: hsl(142, 71%, 45%);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.doc-favorite-btn,
.doc-export-btn,
.doc-print-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.doc-favorite-btn:hover,
.doc-export-btn:hover,
.doc-print-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.doc-favorite-btn.is-favorite {
  color: hsl(48, 96%, 53%);
}

/* Word-like Toolbar */
.word-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  overflow-x: auto;
}

.toolbar-section {
  display: flex;
  align-items: center;
}

.toolbar-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 8px;
  flex-shrink: 0;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

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

.toolbar-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.toolbar-btn.active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.toolbar-select {
  height: 28px;
  padding: 0 8px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--foreground);
  font-size: 12px;
  cursor: pointer;
}

.font-family-select {
  min-width: 100px;
}

.font-size-select {
  min-width: 60px;
}

.heading-select {
  min-width: 100px;
}

.color-picker-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.color-picker-container .color-picker-icon {
  font-weight: 700;
  font-size: 14px;
  color: var(--foreground);
  border-bottom: 3px solid;
  border-color: var(--foreground);
  line-height: 1;
}

.color-picker-container.highlight .color-picker-icon {
  background: hsl(48, 96%, 53%);
  padding: 2px 4px;
  border-radius: 2px;
}

.color-picker-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Paper-style content area */
.word-content-area {
  flex: 1;
  background: var(--muted);
  padding: 32px;
  overflow-y: auto;
  display: flex;
  justify-content: center;
}

.doc-paper-container {
  width: 100%;
  max-width: 850px;
}

.word-editor-content {
  min-height: 1100px;
  padding: 60px 80px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  font-size: 16px;
  line-height: 1.8;
  color: var(--foreground);
  outline: none;
}

.word-editor-content:focus {
  border-color: var(--primary);
}

.word-editor-content:empty::before {
  content: "Start typing your document...";
  color: var(--muted-foreground);
}

.word-editor-content h1 {
  font-size: 2em;
  font-weight: 700;
  margin: 0.5em 0;
}

.word-editor-content h2 {
  font-size: 1.5em;
  font-weight: 600;
  margin: 0.5em 0;
}

.word-editor-content h3 {
  font-size: 1.25em;
  font-weight: 600;
  margin: 0.5em 0;
}

.word-editor-content h4 {
  font-size: 1.1em;
  font-weight: 600;
  margin: 0.5em 0;
}

.word-editor-content p {
  margin: 0.5em 0;
}

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

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

.word-editor-content blockquote {
  margin: 1em 0;
  padding: 12px 20px;
  border-left: 4px solid var(--primary);
  background: var(--surface);
  color: var(--muted-foreground);
  font-style: italic;
}

.word-editor-content pre {
  background: var(--surface);
  padding: 16px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  overflow-x: auto;
}

.word-editor-content hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 24px 0;
}

.word-editor-content a {
  color: hsl(217, 91%, 60%);
  text-decoration: underline;
}

.word-editor-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 16px 0;
}

/* Status Bar */
.doc-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted-foreground);
}

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

.status-divider {
  color: var(--border);
}

.status-right {
  display: flex;
  align-items: center;
}

/* ============================================
   Notion-Style Minimalistic Doc Editor
   ============================================ */
.doc-editor-container.notion-style {
  background: var(--background);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

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

.doc-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted-foreground);
}

.breadcrumb-item {
  cursor: pointer;
  transition: color 0.15s;
}

.breadcrumb-item:hover {
  color: var(--foreground);
}

.breadcrumb-separator {
  color: var(--muted-foreground);
  opacity: 0.5;
}

.breadcrumb-icon {
  display: flex;
  align-items: center;
  color: hsl(217, 91%, 60%);
}

.breadcrumb-current {
  color: var(--foreground);
  font-weight: 500;
}

.doc-favorite-btn-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
  margin-left: 4px;
}

.doc-favorite-btn-mini:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.doc-favorite-btn-mini.is-favorite {
  color: hsl(48, 96%, 53%);
}

.notion-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.notion-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.notion-action-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.doc-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
  margin-left: 8px;
}

.doc-close-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

/* Notion Sidebar */
.notion-sidebar {
  position: fixed;
  left: 16px;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notion-sidebar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.notion-sidebar-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

/* Notion Right Actions */
.notion-right-actions {
  position: fixed;
  right: 24px;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notion-right-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
  gap: 2px;
}

.notion-right-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
  border-color: var(--border-strong);
}

.notion-right-label {
  font-size: 8px;
  font-weight: 600;
  line-height: 1;
}

/* Notion Content Area */
.notion-content-area {
  flex: 1;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  padding: 40px 80px 80px;
  background: var(--background);
}

.notion-page-container {
  width: 100%;
  max-width: 720px;
}

.notion-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.notion-link-task {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.notion-link-task:hover {
  color: var(--foreground);
}

.notion-add-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.notion-add-icon-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
  border-color: var(--border-strong);
}

.breadcrumb-emoji {
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.doc-icon-inline {
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-emoji-small {
  font-size: 20px;
  line-height: 1;
}

.notion-doc-icon {
  width: 72px;
  height: 72px;
  background: var(--surface);
  border: 3px solid var(--background);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin-top: 4px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.notion-doc-icon.emoji-only {
  background: transparent;
  border-color: transparent;
}

.notion-doc-icon:hover {
  background: var(--surface-hover);
}

.notion-doc-icon.emoji-only:hover {
  background: transparent;
  border-color: var(--border);
}

.notion-title-input {
  width: 100%;
  font-size: 40px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--foreground);
  padding: 0;
  margin-bottom: 12px;
  outline: none;
  line-height: 1.2;
}

.notion-title-input::placeholder {
  color: var(--muted-foreground);
  opacity: 0.6;
}

.notion-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--muted-foreground);
}

.notion-author {
  display: flex;
  align-items: center;
  gap: 6px;
}

.notion-author-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(217, 91%, 60%), hsl(271, 91%, 65%));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
}

.notion-author-avatar-img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.notion-author-name {
  font-weight: 500;
  color: var(--foreground);
}

.notion-meta-separator {
  opacity: 0.5;
}

.notion-last-updated {
  color: var(--muted-foreground);
}

/* Notion Editor Content */
.notion-editor-content {
  min-height: 400px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--foreground);
  outline: none;
}

.notion-editor-content:empty::before {
  content: "Start typing... or use **your prompt** to ask AI to write";
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-foreground);
  opacity: 0.6;
  cursor: text;
}

.notion-editor-content:focus:empty::before {
  opacity: 0.4;
}

.notion-editor-content p {
  margin: 0.5em 0;
}

.notion-editor-content h1 {
  font-size: 2em;
  font-weight: 700;
  margin: 1em 0 0.5em;
}

.notion-editor-content h2 {
  font-size: 1.5em;
  font-weight: 600;
  margin: 0.8em 0 0.4em;
}

.notion-editor-content h3 {
  font-size: 1.25em;
  font-weight: 600;
  margin: 0.6em 0 0.3em;
}

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

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

.notion-editor-content blockquote {
  margin: 1em 0;
  padding: 8px 16px;
  border-left: 3px solid var(--primary);
  background: var(--surface);
  color: var(--muted-foreground);
}

.notion-editor-content pre {
  background: var(--surface);
  padding: 16px;
  border-radius: 6px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 14px;
  overflow-x: auto;
}

.notion-editor-content a {
  color: hsl(217, 91%, 60%);
  text-decoration: underline;
}

/* Hide old doc elements when using notion style */
.doc-editor-container.notion-style .word-toolbar,
.doc-editor-container.notion-style .doc-status-bar {
  display: none;
}

/* ============================================
   Favorites Section in Sidebar
   ============================================ */
#favoritesSection {
  margin-top: auto;
  padding-top: 8px;
}

.favorite-doc-item {
  position: relative;
}

.favorite-remove-btn {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.favorite-doc-item:hover .favorite-remove-btn {
  opacity: 1;
}

.sidebar.collapsed #favoritesSection .space-name-text {
  display: none;
}

.sidebar.collapsed .favorite-remove-btn {
  display: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .create-btn span {
    display: none;
  }

  .create-btn {
    padding: 10px;
  }

  .create-btn .dropdown-arrow {
    display: none;
  }

  .doc-editor-header,
  .excel-header,
  .word-header {
    padding: 8px 12px;
  }

  .doc-toolbar,
  .word-toolbar {
    padding: 6px 12px;
    overflow-x: auto;
    gap: 2px;
  }

  .toolbar-divider {
    margin: 0 4px;
  }

  .word-content-area {
    padding: 16px;
  }

  .word-editor-content {
    padding: 24px;
    min-height: 600px;
  }

  .doc-title-input {
    width: 150px;
    font-size: 16px;
  }

  .space-icon-grid-svg {
    grid-template-columns: repeat(5, 1fr);
  }

  .optional-fields {
    padding: 12px;
  }
}

/* ============================================
   Schedule Sidebar Task Items
   ============================================ */
.sidebar-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}

.sidebar-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.sidebar-task-item:hover {
  background: var(--surface-hover);
}

.sidebar-task-item.dragging {
  opacity: 0.5;
}

.sidebar-task-main {
  flex: 1;
  min-width: 0;
}

.sidebar-task-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-task-meta {
  font-size: 11px;
  color: var(--muted-foreground);
  margin-top: 2px;
}

.recurring-mini-badge {
  font-size: 10px;
  opacity: 0.7;
}

.sidebar-task-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}

.sidebar-task-item:hover .sidebar-task-actions {
  opacity: 1;
}

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

.sidebar-task-btn:hover {
  background: var(--accent);
  color: var(--foreground);
}

.sidebar-more-hint {
  font-size: 12px;
  color: var(--muted-foreground);
  text-align: center;
  padding: 8px;
}

.task-count-badge {
  font-size: 11px;
  background: var(--surface-hover);
  color: var(--muted-foreground);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Calendar task action buttons */
.task-actions-row {
  display: flex;
  gap: 4px;
}

.task-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.task-action-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.task-action-btn.delete-btn:hover {
  background: hsla(0, 84%, 60%, 0.15);
  color: var(--destructive);
  border-color: hsla(0, 84%, 60%, 0.3);
}

.task-action-btn svg {
  width: 14px;
  height: 14px;
}

/* Excel favorite button */
.excel-favorite-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.excel-favorite-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.excel-favorite-btn.is-favorite {
  color: hsl(48, 96%, 53%);
}

/* Context Menu for Schedule Tasks */
.task-context-menu {
  position: fixed;
  z-index: 9999;
  background: var(--card, #1f1f23);
  border: 1px solid var(--border, #2e2e32);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
  min-width: 160px;
  backdrop-filter: blur(12px);
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--foreground, #fafafa);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.1s;
}

.context-menu-item:hover {
  background: var(--accent, rgba(255, 255, 255, 0.1));
}

.context-menu-item.delete {
  color: var(--foreground, #fafafa);
}

.context-menu-item.delete:hover {
  background: hsla(0, 84%, 60%, 0.15);
  color: #ef4444;
}

/* Dashboard Layout with AI Sidebar */
.dashboard-layout {
  display: flex;
  min-height: 100%;
  height: 100%;
}

/* AI Sidebar styles moved to components.css for enhanced UI/UX */

.dashboard-main {
  flex: 1;
  overflow-y: auto;
  height: 100%;
  max-height: calc(100vh - 1px);
}

/* AI Sidebar header moved to components.css */

.ai-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, hsl(217, 91%, 60%), hsl(271, 91%, 65%));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

/* AI Title moved to components.css */

/* AI Message container moved to components.css */

/* AI Message moved to components.css */

/* AI typing styles moved to components.css */

@keyframes cursorBlink {

  0%,
  40% {
    opacity: 1;
  }

  50%,
  90% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.ai-stats {
  display: flex;
  gap: 12px;
}

.ai-stat-item {
  flex: 1;
  background: var(--surface);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.ai-stat-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--foreground);
}

.ai-stat-label {
  font-size: 11px;
  color: var(--muted-foreground);
  text-transform: uppercase;
}

/* Favorites with star on left & truncated text */
.favorite-item-row .custom-space-item {
  justify-content: flex-start;
}

.favorite-with-icon-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.favorite-star-left {
  width: 14px;
  height: 14px;
  color: hsl(48, 96%, 53%);
  flex-shrink: 0;
}

.favorite-text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100px;
}

/* Favorites Scroll Container - scrollable when > 3 items */
.favorites-scroll-container {
  max-height: 132px;
  /* Approx 3 items at 44px each */
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.favorites-scroll-container::-webkit-scrollbar {
  width: 4px;
}

.favorites-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

.favorites-scroll-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ============================================
   Professional Workspace Project Cards
   ============================================ */

.workspace-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.workspace-project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.workspace-project-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.workspace-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 0;
}

.workspace-card-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: inherit;
  flex-shrink: 0;
  background: transparent;
  line-height: 1;
  padding: 0;
  margin: 0;
}

.workspace-card-icon .nav-emoji {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: inherit;
  line-height: 1;
}

.workspace-card-icon svg {
  width: 22px;
  height: 22px;
  color: white;
}

.workspace-card-title-area {
  flex: 1;
  min-width: 0;
}

.workspace-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-card-description {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.4;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.workspace-card-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.workspace-card-status.todo {
  background: hsla(215, 16%, 47%, 0.15);
  color: hsl(215, 16%, 47%);
}

.workspace-card-status.in-progress {
  background: hsla(217, 91%, 60%, 0.15);
  color: hsl(217, 91%, 60%);
}

.workspace-card-status.done {
  background: hsla(142, 71%, 45%, 0.15);
  color: hsl(142, 71%, 45%);
}

.workspace-card-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}

.workspace-project-card:hover .workspace-card-actions {
  opacity: 1;
}

.workspace-card-action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.workspace-card-action-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.workspace-card-action-btn.delete:hover {
  background: hsla(0, 84%, 60%, 0.15);
  color: var(--destructive);
}

.workspace-card-body {
  padding: 16px 20px;
}

.workspace-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 14px;
}

.workspace-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted-foreground);
}

.workspace-meta-item svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.workspace-card-progress {
  margin-bottom: 14px;
}

.workspace-progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
}

.workspace-progress-label {
  color: var(--muted-foreground);
}

.workspace-progress-value {
  font-weight: 600;
  color: var(--foreground);
}

.workspace-progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.workspace-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.workspace-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.workspace-card-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted-foreground);
}

.workspace-card-date svg {
  width: 14px;
  height: 14px;
}

.workspace-card-linked-docs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.linked-doc-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--surface-hover);
  border-radius: 12px;
  font-size: 11px;
  color: var(--muted-foreground);
}

.linked-doc-badge svg {
  width: 12px;
  height: 12px;
}

.linked-doc-badge.doc {
  color: hsl(217, 91%, 60%);
}

.linked-doc-badge.excel {
  color: hsl(142, 71%, 45%);
}

@media (max-width: 900px) {
  .dashboard-layout {
    flex-direction: column;
  }

  .dashboard-ai-sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--glass-border);
    order: 2;
  }

  .dashboard-ai-sidebar.collapsed {
    width: 0;
    min-width: 0;
    height: 0;
    border-top: none;
    overflow: hidden;
  }

  .dashboard-main {
    order: 1;
  }
}

/* ============================================
   Dashboard Header Row with Edit Toggle
   ============================================ */

.dashboard-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-header-center {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: center;
}

.dashboard-search-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 10px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 100px;
  flex: 1;
  max-width: 400px;
  transition: all 0.2s ease;
  position: relative;
}

.dashboard-search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--glass-border);
}

.dashboard-search-bar .search-icon {
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.dashboard-search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--foreground);
  font-family: inherit;
  padding: 0 0 0 8px;
  min-width: 0;
}

.dashboard-search-input::placeholder {
  color: var(--muted-foreground);
}

.dashboard-ai-chats-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--foreground);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dashboard-ai-chats-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.dashboard-ai-chats-btn .ai-drawer-model-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffedd5 0%, #fb7185 35%, #a855f7 70%, #3b82f6 100%);
  box-shadow: 0 0 0 3px var(--glass-border);
}

/* ============================================
   Dashboard Search Dropdown
   ============================================ */

.dashboard-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
  max-height: 500px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  padding: 10px;
}

.dashboard-search-dropdown::-webkit-scrollbar {
  width: 4px;
}

.dashboard-search-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-search-dropdown::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 2px;
}

.search-section {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.search-section-title {
  display: none;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  white-space: nowrap;
}

.search-result-item:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.search-result-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.search-result-icon svg {
  width: 14px;
  height: 14px;
}

.search-result-info {
  display: flex;
  align-items: center;
  gap: 4px;
}

.search-result-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}

.search-result-type {
  display: none;
}

.search-no-results {
  padding: 16px;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 12px;
}

.clear-history-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
}

.clear-history-btn:hover {
  background: var(--destructive);
  border-color: var(--destructive);
  color: var(--destructive-foreground);
}

.dashboard-ai-sidebar-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--glass-bg-primary);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.dashboard-ai-sidebar-toggle:hover {
  background: var(--glass-bg-secondary);
  border-color: var(--primary);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dashboard-ai-sidebar-toggle:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-ai-sidebar-toggle .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-ai-sidebar-toggle:hover .icon {
  transform: scale(1.1);
}

.dashboard-ai-sidebar-toggle:active .icon {
  transform: scale(0.95);
}

.dashboard-ai-sidebar-toggle .expand-icon {
  display: none;
  animation: iconSlideIn 0.3s ease-out;
}

.dashboard-ai-sidebar-toggle.sidebar-collapsed .collapse-icon {
  display: none;
  animation: iconSlideOut 0.3s ease-out;
}

.dashboard-ai-sidebar-toggle.sidebar-collapsed .expand-icon {
  display: block;
  animation: iconSlideIn 0.3s ease-out;
}

@keyframes iconSlideIn {
  from {
    opacity: 0;
    transform: translateX(-4px) rotate(-180deg);
  }

  to {
    opacity: 1;
    transform: translateX(0) rotate(0deg);
  }
}

@keyframes iconSlideOut {
  from {
    opacity: 1;
    transform: translateX(0) rotate(0deg);
  }

  to {
    opacity: 0;
    transform: translateX(4px) rotate(180deg);
  }
}

.dashboard-ai-sidebar-toggle .toggle-text {
  font-size: 13px;
  font-weight: 500;
}

.dashboard-edit-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--glass-bg-primary);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dashboard-edit-toggle:hover {
  background: var(--glass-bg-secondary);
  border-color: var(--primary);
  color: var(--foreground);
}

.dashboard-edit-toggle.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.dashboard-edit-toggle.active span::after {
  content: ' ✓';
}

.schedule-add-event-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--glass-bg-primary);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.schedule-add-event-btn:hover {
  background: var(--glass-bg-secondary);
  border-color: var(--primary);
  color: var(--foreground);
}

/* ============================================
   Enhanced Dashboard Widgets
   ============================================ */

.dashboard-widgets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* Edit mode for widgets */
.dashboard-widgets-grid.edit-mode {
  gap: 16px;
}

.dashboard-widgets-grid.edit-mode .dashboard-widget {
  cursor: grab;
  position: relative;
  border: 2px dashed var(--border);
}

 .dashboard-widget-resize-handle {
   display: none;
   position: absolute;
   opacity: 0.6;
   user-select: none;
   z-index: 100;
   background: transparent;
 }

 .dashboard-widget-resize-handle:hover {
   background: rgba(59, 130, 246, 0.1);
 }

 .dashboard-widget-resize-handle.n {
   top: 0;
   left: 15px;
   right: 15px;
   height: 6px;
   cursor: ns-resize;
 }

 .dashboard-widget-resize-handle.s {
   bottom: 0;
   left: 15px;
   right: 15px;
   height: 6px;
   cursor: ns-resize;
 }

 .dashboard-widget-resize-handle.e {
   right: 0;
   top: 15px;
   bottom: 15px;
   width: 6px;
   cursor: ew-resize;
 }

 .dashboard-widget-resize-handle.w {
   left: 0;
   top: 15px;
   bottom: 15px;
   width: 6px;
   cursor: ew-resize;
 }

 .dashboard-widget-resize-handle.ne {
   top: 0;
   right: 0;
   width: 15px;
   height: 15px;
   cursor: nesw-resize;
 }

 .dashboard-widget-resize-handle.nw {
   top: 0;
   left: 0;
   width: 15px;
   height: 15px;
   cursor: nwse-resize;
 }

 .dashboard-widget-resize-handle.se {
   right: 0;
   bottom: 0;
   width: 15px;
   height: 15px;
   cursor: nwse-resize;
   background: linear-gradient(135deg, transparent 50%, var(--muted-foreground) 50%);
   border-radius: 0 0 4px 0;
 }

 .dashboard-widget-resize-handle.sw {
   bottom: 0;
   left: 0;
   width: 15px;
   height: 15px;
   cursor: nesw-resize;
 }

 .dashboard-widget-resize-handle.n:hover { border-top: 2px solid var(--primary); }
 .dashboard-widget-resize-handle.s:hover { border-bottom: 2px solid var(--primary); }
 .dashboard-widget-resize-handle.e:hover { border-right: 2px solid var(--primary); }
 .dashboard-widget-resize-handle.w:hover { border-left: 2px solid var(--primary); }
 .dashboard-widget-resize-handle.ne:hover,
 .dashboard-widget-resize-handle.nw:hover,
 .dashboard-widget-resize-handle.se:hover,
 .dashboard-widget-resize-handle.sw:hover {
   background: rgba(59, 130, 246, 0.2);
 }

 /* Expanded widget content - hidden by default */
 .dashboard-widget .widget-expanded {
   display: none;
 }

 /* Show expanded content when widget is larger than default */
 .dashboard-widget[data-widget-span="2"] .widget-expanded,
 .dashboard-widget[data-widget-level="2"] .widget-expanded {
   display: block;
 }

 .dashboard-widget[data-widget-span="3"] .widget-expanded,
 .dashboard-widget[data-widget-level="3"] .widget-expanded {
   display: block;
 }

 /* Extra content styling for expanded widgets */
 .dashboard-widget .widget-expanded {
   margin-top: 16px;
   padding-top: 16px;
   border-top: 1px solid var(--border);
 }

 .dashboard-widget .widget-expanded-title {
   font-size: 12px;
   font-weight: 600;
   color: var(--muted-foreground);
   margin-bottom: 8px;
   text-transform: uppercase;
   letter-spacing: 0.5px;
 }

 .dashboard-widget .widget-expanded-list {
   display: flex;
   flex-direction: column;
   gap: 8px;
 }

 .dashboard-widget .widget-expanded-item {
   display: flex;
   align-items: center;
   gap: 8px;
   font-size: 13px;
   color: var(--foreground);
   padding: 6px 8px;
   background: var(--card);
   border-radius: 6px;
   border: 1px solid var(--border);
 }

 .dashboard-widget .widget-expanded-item:hover {
   background: var(--accent);
 }

 .dashboard-widget .widget-expanded-icon {
   width: 16px;
   height: 16px;
   color: var(--muted-foreground);
 }

/* ============================================
   Weekly Activity Widget - Bar Chart
   ============================================ */

.widget-stat-mini {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  background: var(--surface);
  padding: 4px 10px;
  border-radius: 12px;
}

.activity-chart-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 6px;
  height: 100px;
  padding: 8px 0;
}

.activity-bar-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.activity-bar-track {
  flex: 1;
  width: 100%;
  max-width: 28px;
  background: var(--surface);
  border-radius: 6px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.activity-bar-fill {
  width: 100%;
  border-radius: 6px;
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  min-height: 4px;
}

.activity-bar-fill.today {
  background: linear-gradient(180deg, var(--primary), color-mix(in hsl, var(--primary) 70%, black)) !important;
}

.activity-bar-value {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.activity-bar-day {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.activity-bar-day.today {
  color: var(--primary);
  font-weight: 600;
}

/* Dark mode adjustments */
[data-mode="dark"] .activity-bar-track {
  background: color-mix(in hsl, var(--surface) 60%, transparent);
}

[data-mode="dark"] .activity-bar-fill:not(.today) {
  background: var(--accent-foreground);
}

 .dashboard-widgets-grid.edit-mode .dashboard-widget .dashboard-widget-resize-handle {
   display: block;
 }

 .dashboard-widgets-grid.edit-mode .dashboard-widget.resizing {
   cursor: ew-resize;
   border-color: var(--primary);
 }

.dashboard-widgets-grid.edit-mode .dashboard-widget::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 4px;
  background: var(--muted-foreground);
  border-radius: 2px;
  opacity: 0.5;
}

.dashboard-widgets-grid.edit-mode .dashboard-widget:hover {
  border-color: var(--primary);
  background: var(--surface-hover);
}

.dashboard-widgets-grid.edit-mode .dashboard-widget.dragging {
  opacity: 0.5;
  cursor: grabbing;
  transform: scale(1.02);
  z-index: 10;
}

.dashboard-widget {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.2s;
}

.dashboard-widget:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

 .dashboard-spaces-widget {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: var(--glass-bg);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  font-family: 'Inter', sans-serif;
 }

 .dashboard-spaces-widget .widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
 }

 .dashboard-spaces-add-top {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s;
 }

 .dashboard-spaces-add-top:hover {
  background: var(--accent);
  color: var(--foreground);
 }

 .dashboard-spaces-add-top svg {
  width: 14px;
  height: 14px;
 }

 .dashboard-spaces-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
 }

 /* Rows */
 .dashboard-spaces-row-simple,
 .dashboard-spaces-row-main,
 .dashboard-spaces-child-row,
 .dashboard-spaces-new-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--muted-foreground);
  font-size: 13px;
  position: relative;
 }

 .dashboard-spaces-row-simple:hover,
 .dashboard-spaces-row-main:hover,
 .dashboard-spaces-child-row:hover,
 .dashboard-spaces-new-row:hover {
  background: var(--surface-hover);
  color: var(--foreground);
 }

 /* Active/Group styling */
 .dashboard-spaces-group.is-active .dashboard-spaces-row-main {
  background: var(--surface-hover);
  color: var(--foreground);
 }

 .dashboard-spaces-row-name {
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
 }

 .dashboard-spaces-user-suffix {
  opacity: 0.5;
  font-weight: 400;
  font-size: 12px;
 }

 /* Icons */
 .dashboard-spaces-row-icon-dim svg,
 .dashboard-spaces-child-icon svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
 }

 .dashboard-spaces-row-icon-color .dashboard-space-icon {
  width: 24px;
  height: 24px;
 }

 /* Actions */
 .dashboard-spaces-row-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.dashboard-spaces-row-main:hover .dashboard-spaces-row-actions {
  opacity: 1;
}

.dashboard-spaces-row-main.menu-open .dashboard-spaces-row-actions {
  opacity: 1;
}

 .dashboard-spaces-action-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--muted-foreground);
  cursor: pointer;
}

 .dashboard-spaces-action-btn:hover {
  background: var(--accent);
  color: var(--foreground);
 }

 .dashboard-spaces-action-btn svg {
  width: 14px;
  height: 14px;
 }

 /* Tree structure */
 .dashboard-spaces-tree-children {
  margin-left: 20px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
  margin-bottom: 4px;
 }

 .dashboard-spaces-child-row {
  padding: 6px 10px;
 }

 .dashboard-spaces-child-name {
  flex: 1;
  font-size: 13px;
 }

 .dashboard-spaces-child-count {
  font-size: 11px;
  opacity: 0.6;
 }

 .dashboard-spaces-new-row {
  margin-top: 8px;
  opacity: 0.8;
 }

 .dashboard-spaces-new-row svg {
  width: 16px;
  height: 16px;
 }

 .dashboard-spaces-empty-state {
  padding: 20px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 12px;
  margin-top: 10px;
 }

 .dashboard-spaces-empty-state p {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 12px;
 }

 /* Dashboard Space Dropdown */
 .dashboard-space-menu-container {
  position: relative;
  display: inline-flex;
 }

 .dashboard-space-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 1000;
  padding: 8px;
  display: none;
  flex-direction: column;
  margin-top: 4px;
 }

 .dashboard-space-dropdown.show {
  display: flex;
 }

 .ds-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--foreground);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
 }

 .ds-menu-item:hover {
  background: var(--accent);
  color: var(--foreground);
 }

 .ds-menu-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
 }

 .ds-menu-item .ds-chevron {
  margin-left: auto;
  width: 12px;
  height: 12px;
  opacity: 0.5;
 }

 .ds-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
 }

 .ds-subtext {
  font-size: 11px;
  color: var(--muted-foreground);
 }

 .ds-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 4px;
 }

 .ds-danger {
  color: var(--danger);
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.ds-danger:hover {
  background: var(--danger);
  color: var(--foreground);
  border-color: var(--danger);
}

.ds-danger svg {
  opacity: 1;
  color: var(--danger);
  transition: color 0.2s;
}

.ds-danger:hover svg {
  color: var(--foreground);
}

 .ds-sharing-btn {
  margin-top: 4px;
  width: 100%;
  padding: 10px;
  background: var(--surface);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
 }

 .ds-sharing-btn:hover {
  background: var(--accent);
 }

  /* Dashboard Space Icon Picker Popover */
 .ds-icon-picker-popover {
  position: absolute;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 2000;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
 }

 .ds-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 600;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
 }

 .ds-picker-actions {
  display: flex;
  align-items: center;
  gap: 8px;
 }

 .ds-color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s;
 }

 .ds-color-dot:hover {
  transform: scale(1.2);
 }

 .ds-picker-plus {
  background: none;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
 }

 .ds-picker-plus svg {
  width: 16px;
  height: 16px;
 }

 .ds-picker-search {
  position: relative;
  display: flex;
  align-items: center;
 }

 .ds-picker-search svg {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  color: var(--muted-foreground);
 }

 .ds-picker-search input {
  width: 100%;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 8px 8px 32px;
  color: var(--foreground);
  font-size: 13px;
 }

 .ds-icon-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
 }

 .ds-icon-grid::-webkit-scrollbar {
  width: 4px;
 }

 .ds-icon-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
 }

 .ds-icon-item {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  color: var(--muted-foreground);
 }

 .ds-icon-item:hover {
  background: var(--accent);
  color: var(--foreground);
 }

 .ds-icon-item.active {
  background: rgba(79, 70, 229, 0.2);
  color: #818cf8;
 }

 .ds-icon-item svg {
  width: 20px;
  height: 20px;
 }

 .ds-color-picker-overlay {
  padding-top: 8px;
  border-top: 1px solid var(--border);
 }

 .ds-color-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
 }

 .ds-color-option {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
 }

 .ds-color-option:hover {
  transform: scale(1.2);
 }

 .ds-color-option.active {
  box-shadow: 0 0 0 2px #fff;
 }

 .quick-access-form {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
  margin-bottom: 12px;
}

.quick-access-input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-primary);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--foreground);
  font-size: 13px;
  outline: none;
  transition: all 0.15s ease;
}

.quick-access-input::placeholder {
  color: var(--muted-foreground);
}

.quick-access-input:focus {
  box-shadow: 0 0 0 3px hsl(217 91% 60% / 0.18);
  border-color: hsl(217 91% 60% / 0.45);
}

.quick-access-add-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-secondary);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--foreground);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.quick-access-add-btn:hover {
  background: var(--glass-bg-primary);
  border-color: var(--primary);
}

.quick-access-empty {
  padding: 14px 12px;
  border: 1px dashed var(--glass-border);
  border-radius: 12px;
  color: var(--muted-foreground);
  font-size: 13px;
  background: color-mix(in hsl, var(--glass-bg) 60%, transparent);
}

.quick-access-sites {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-access-site {
  position: relative;
}

.quick-access-site-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.quick-access-site-btn:hover {
  background: color-mix(in hsl, var(--glass-bg) 55%, transparent);
  border-color: var(--glass-border);
  transform: translateY(-1px);
}

.quick-access-site-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px hsl(217 91% 60% / 0.22);
  border-color: hsl(217 91% 60% / 0.45);
}

.quick-access-site-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quick-access-site-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.quick-access-site-fallback {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--foreground);
}

.quick-access-site-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.quick-access-site-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  background: color-mix(in hsl, var(--glass-bg) 65%, transparent);
  color: var(--muted-foreground);
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s ease;
}

.quick-access-site:hover .quick-access-site-remove {
  opacity: 1;
}

.quick-access-site-remove:hover {
  background: color-mix(in hsl, var(--glass-bg) 85%, transparent);
  color: var(--foreground);
  border-color: var(--glass-border);
}

@media (max-width: 480px) {
  .quick-access-sites {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .quick-access-sites {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Dark mode: 60% opacity for glass background */
[data-mode="dark"] .dashboard-widget {
  background: color-mix(in hsl, var(--glass-bg) 60%, transparent);
}

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

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

.widget-title .widget-icon {
  width: 18px;
  height: 18px;
  color: var(--card-foreground);
}

.widget-action-btn {
  padding: 6px 12px;
  background: var(--glass-bg-primary);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.widget-action-btn:hover {
  background: var(--glass-bg-secondary);
  color: var(--foreground);
}

.widget-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1;
}

.widget-stat-label {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 4px;
}

.widget-progress-bar {
  height: 8px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}

/* Dark mode: 60% opacity for glass background */
[data-mode="dark"] .widget-progress-bar {
  background: color-mix(in hsl, var(--glass-bg) 60%, transparent);
}

.widget-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, hsl(217, 91%, 60%), hsl(271, 91%, 65%));
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Animated Gradient Bar for Shared Widget */
.shared-gradient-bar {
  height: 6px;
  background: linear-gradient(90deg, #a78bfa 0%, #d8b4fe 50%, #a78bfa 100%);
  background-size: 200% 100%;
  border-radius: 3px;
  animation: gradientFlow 3s ease-in-out infinite;
  margin: 12px 0;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--glass-bg-primary);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.quick-action-btn:hover {
  background: var(--glass-bg-secondary);
  color: var(--foreground);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.quick-action-btn svg {
  width: 20px;
  height: 20px;
  color: var(--card-foreground);
}

.productivity-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 100px;
  gap: 6px;
  padding-top: 12px;
}

.chart-bar {
  flex: 1;
  background: linear-gradient(to top, hsl(217, 91%, 60%), hsl(271, 91%, 65%));
  border-radius: 4px 4px 0 0;
  min-height: 8px;
  transition: height 0.3s ease;
}

.chart-bar.muted {
  background: var(--surface-hover);
}

.streak-display {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}

.streak-flame {
  font-size: 36px;
}

.streak-info {
  flex: 1;
}

.streak-count {
  font-size: 24px;
  font-weight: 700;
  color: var(--foreground);
}

.streak-label {
  font-size: 13px;
  color: var(--muted-foreground);
}

/* ============================================
   AI Summary Widget - Minimalist Clean Style
   ============================================ */

.ai-summary-widget {
  position: relative;
  overflow: hidden;
}

.ai-summary-widget .widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.ai-summary-widget .widget-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
}

.ai-widget-date {
  font-size: 11px;
  color: var(--muted-foreground);
  font-weight: 500;
}

.ai-widget-content {
  min-height: 60px;
  max-height: 150px;
  overflow-y: auto;
  padding: 4px 0;
}

.ai-widget-content::-webkit-scrollbar {
  width: 3px;
}

.ai-widget-content::-webkit-scrollbar-track {
  background: transparent;
}

.ai-widget-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.ai-summary-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--foreground);
  margin: 0;
}

/* Loading indicator */
.ai-loading-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.ai-loading-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Responsive: Single column on smaller screens */
@media (max-width: 900px) {
  .ai-summary-widget {
    grid-column: span 1;
  }
}

.goals-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.goal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
}

/* Dark mode: 60% opacity for glass background */
[data-mode="dark"] .goal-item {
  background: color-mix(in hsl, var(--glass-bg) 60%, transparent);
}

.goal-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s;
}

.goal-checkbox.completed {
  background: hsl(142, 71%, 45%);
  border-color: hsl(142, 71%, 45%);
}

.goal-text {
  flex: 1;
  font-size: 13px;
  color: var(--foreground);
}

.goal-text.completed {
  text-decoration: line-through;
  color: var(--muted-foreground);
}

/* ============================================
   ClickUp-Style Docs UI
   ============================================ */

.clickup-docs-container {
  display: flex;
  height: 100%;
  background: var(--background);
}

.docs-sidebar {
  width: 280px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.docs-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.docs-sidebar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 16px;
}

.docs-sidebar-title svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.docs-search-input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--foreground);
  font-size: 13px;
}

.docs-search-input::placeholder {
  color: var(--muted-foreground);
}

.docs-search-wrapper {
  position: relative;
}

.docs-search-wrapper svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
}

.docs-tree {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.docs-tree-section {
  margin-bottom: 24px;
}

.docs-tree-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted-foreground);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.docs-tree-add-btn {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.docs-tree-add-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.docs-tree-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--muted-foreground);
  font-size: 13px;
}

.docs-tree-item:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.docs-tree-item.active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.docs-tree-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.docs-tree-item-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-tree-item-date {
  font-size: 11px;
  color: var(--muted-foreground);
  opacity: 0.7;
}

.docs-tree-item.active .docs-tree-item-date {
  color: var(--primary-foreground);
  opacity: 0.8;
}

.docs-main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.docs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--glass-bg);
}

.docs-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.docs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted-foreground);
}

.docs-breadcrumb-item {
  cursor: pointer;
  transition: color 0.15s;
}

.docs-breadcrumb-item:hover {
  color: var(--foreground);
}

.docs-breadcrumb-separator {
  color: var(--border);
}

.docs-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.docs-action-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

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

.docs-action-btn.primary:hover {
  filter: brightness(1.1);
}

.docs-action-btn svg {
  width: 16px;
  height: 16px;
}

.docs-editor-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  justify-content: center;
}

.docs-editor-container {
  width: 100%;
  max-width: 800px;
}

.docs-title-input {
  width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 36px;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 8px;
  outline: none;
}

.docs-title-input::placeholder {
  color: var(--muted-foreground);
}

.docs-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.docs-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted-foreground);
}

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

.docs-cover-area {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, hsl(217, 91%, 60%) 0%, hsl(271, 91%, 65%) 100%);
  border-radius: 12px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.docs-cover-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.docs-cover-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.docs-emoji-icon {
  width: 72px;
  height: 72px;
  background: var(--surface);
  border: 3px solid var(--background);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-top: -36px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.docs-emoji-icon:hover {
  background: var(--surface-hover);
}

.docs-content-editor {
  min-height: 400px;
  padding: 0;
  background: transparent;
  color: var(--foreground);
  font-size: 16px;
  line-height: 1.8;
  outline: none;
}

.docs-content-editor:empty::before {
  content: "Start typing or use '/' for commands...";
  color: var(--muted-foreground);
}

.docs-slash-menu {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  min-width: 200px;
  z-index: 1000;
}

.docs-slash-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.1s;
  color: var(--foreground);
  font-size: 13px;
}

.docs-slash-item:hover {
  background: var(--surface-hover);
}

.docs-slash-item svg {
  width: 18px;
  height: 18px;
  color: var(--muted-foreground);
}

.docs-slash-item-desc {
  font-size: 11px;
  color: var(--muted-foreground);
}

.docs-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 60px 40px;
  text-align: center;
}

.docs-empty-icon {
  width: 80px;
  height: 80px;
  background: var(--surface);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.docs-empty-icon svg {
  width: 40px;
  height: 40px;
  color: var(--muted-foreground);
}

.docs-empty-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}

.docs-empty-text {
  font-size: 14px;
  color: var(--muted-foreground);
  max-width: 400px;
  margin-bottom: 24px;
}

.docs-create-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  color: var(--primary-foreground);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.docs-create-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.docs-create-btn svg {
  width: 18px;
  height: 18px;
}

/* Docs Comments Sidebar - HIDDEN */
.docs-comments-panel {
  display: none !important;
}

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

.docs-comments-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.docs-comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.docs-comment-item {
  padding: 12px;
  background: var(--surface);
  border-radius: 8px;
  margin-bottom: 12px;
}

.docs-comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.docs-comment-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(217, 91%, 60%), hsl(271, 91%, 65%));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: 600;
}

.docs-comment-author {
  font-size: 12px;
  font-weight: 500;
  color: var(--foreground);
}

.docs-comment-time {
  font-size: 11px;
  color: var(--muted-foreground);
  margin-left: auto;
}

.docs-comment-text {
  font-size: 13px;
  color: var(--foreground);
  line-height: 1.5;
}

.docs-add-comment {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.docs-comment-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--foreground);
  font-size: 13px;
  resize: none;
}

.docs-comment-input::placeholder {
  color: var(--muted-foreground);
}

@media (max-width: 1024px) {
  .docs-sidebar {
    width: 240px;
  }

  .docs-comments-panel {
    display: none;
  }
}

@media (max-width: 768px) {
  .clickup-docs-container {
    flex-direction: column;
  }

  .docs-sidebar {
    width: 100%;
    height: auto;
    max-height: 40vh;
  }

  .docs-editor-wrapper {
    padding: 16px;
  }

  .docs-title-input {
    font-size: 28px;
  }
}

/* ============================================
   Excel Editor - Notion Style
   ============================================ */

.excel-editor-container.notion-style {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--background);
  position: relative;
}

.excel-notion-content {
  padding-top: 24px !important;
}

.excel-page-container {
  max-width: 100%;
  padding: 0 60px 0 80px;
}

.excel-grid-wrapper {
  margin-top: 32px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}

.excel-editor-container.notion-style .excel-grid {
  display: grid;
  min-width: max-content;
}

.excel-editor-container.notion-style .excel-cell-header {
  background: var(--surface);
  color: var(--muted-foreground);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
}

.excel-editor-container.notion-style .excel-row-header {
  background: var(--surface);
  color: var(--muted-foreground);
  font-weight: 500;
  font-size: 12px;
  text-align: center;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  position: sticky;
  left: 0;
}

.excel-editor-container.notion-style .excel-cell-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 10px 12px;
  color: var(--foreground);
  font-size: 13px;
  outline: none;
  transition: background 0.15s;
}

.excel-editor-container.notion-style .excel-cell-input:focus {
  background: var(--surface-hover);
  box-shadow: inset 0 0 0 2px var(--primary);
}

.excel-editor-container.notion-style .excel-cell-input:hover:not(:focus) {
  background: var(--surface);
}

/* Hide old Excel toolbar */
.excel-editor-container.notion-style .excel-toolbar {
  display: none;
}

/* Hide old Excel header in favor of notion header */
.excel-editor-container.notion-style .excel-header {
  display: none;
}

/* ============================================
   Page Styles Sidebar (Right Panel)
   ============================================ */
.page-styles-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 2500;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.page-styles-overlay.show {
  opacity: 1;
  visibility: visible;
}

.page-styles-sidebar {
  position: fixed;
  right: -360px;
  top: 0;
  bottom: 0;
  width: 360px;
  background: var(--card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 2501;
  transition: right 0.25s ease;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
}

.page-styles-sidebar.show {
  right: 0;
}

.page-styles-tabs {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface);
  width: 48px;
  flex-shrink: 0;
}

.page-styles-tab {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.page-styles-tab:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.page-styles-tab.active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.page-styles-tab svg {
  width: 20px;
  height: 20px;
}

.page-styles-container {
  display: flex;
  height: 100%;
}

.page-styles-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

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

.page-styles-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
}

.page-styles-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.page-styles-close:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.page-styles-section {
  margin-bottom: 24px;
}

.page-styles-section-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 12px;
}

.page-styles-options {
  display: flex;
  gap: 8px;
}

.page-styles-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  color: var(--muted-foreground);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.page-styles-option:hover {
  border-color: var(--primary);
  color: var(--foreground);
}

.page-styles-option.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.page-styles-option span {
  font-weight: 500;
}

.page-styles-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.page-styles-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--foreground);
}

.page-styles-toggle-label svg {
  width: 18px;
  height: 18px;
  color: var(--muted-foreground);
}

.page-styles-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.page-styles-toggle.active {
  background: var(--primary);
  border-color: var(--primary);
}

.page-styles-toggle::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  background: var(--foreground);
  border-radius: 50%;
  transition: all 0.2s;
}

.page-styles-toggle.active::after {
  left: 22px;
  background: var(--primary-foreground);
}

.page-styles-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.page-styles-link-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--foreground);
}

.page-styles-link-label svg {
  width: 18px;
  height: 18px;
  color: var(--muted-foreground);
}

.page-styles-link-value {
  font-size: 13px;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.page-styles-link-value:hover {
  color: var(--foreground);
}

.page-styles-apply-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted-foreground);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 16px;
}

.page-styles-apply-btn:hover {
  border-color: var(--primary);
  color: var(--foreground);
}

/* ============================================
   Share Modal Styles
   ============================================ */
.share-modal-content {
  padding: 8px 0;
}

.share-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.share-email-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--foreground);
  font-size: 14px;
}

.share-email-input::placeholder {
  color: var(--muted-foreground);
}

.share-email-input:focus {
  outline: none;
  border-color: var(--primary);
}

.share-add-btn {
  padding: 12px 20px;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  color: var(--primary-foreground);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.share-add-btn:hover {
  filter: brightness(1.1);
}

.share-people-list {
  margin-top: 20px;
}

.share-people-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.share-person-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.share-person-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(217, 91%, 60%), hsl(271, 91%, 65%));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.share-person-info {
  flex: 1;
}

.share-person-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
}

.share-person-email {
  font-size: 12px;
  color: var(--muted-foreground);
}

.share-person-role {
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 12px;
  cursor: pointer;
}

.share-person-role:hover {
  border-color: var(--primary);
  color: var(--foreground);
}

.share-link-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.share-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.share-link-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.share-copy-btn {
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--foreground);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.share-copy-btn:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
}

/* Team Members Section in Share Panel */
.share-team-section {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.share-team-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.share-team-member {
  transition: all 0.2s ease;
}

.share-team-member:hover {
  background: var(--surface-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.share-team-add-btn {
  transition: all 0.2s ease;
}

.share-team-add-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.share-team-member:active .share-team-add-btn {
  transform: scale(0.95);
}

/* Scrollbar for team members grid */
.share-team-grid::-webkit-scrollbar {
  width: 4px;
}

.share-team-grid::-webkit-scrollbar-track {
  background: transparent;
}

.share-team-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.share-team-grid::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
}

/* Shared Avatars in Editor Headers */
.doc-shared-avatars {
  display: flex;
  align-items: center;
  position: relative;
}

.doc-shared-avatars>*:first-child {
  margin-left: 0 !important;
}

.doc-shared-avatars>* {
  transition: transform 0.2s ease, z-index 0.2s ease;
  position: relative;
}

.doc-shared-avatars>*:hover {
  transform: scale(1.1);
  z-index: 10;
}

/* Avatar tooltip styles */
.doc-shared-avatars>*[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--popover);
  color: var(--popover-foreground);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 1000;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Feature 1: Sidebar Collapsed User Info & Sign Out
   ============================================ */

/* Hide sign-out button when sidebar collapsed */
.sidebar.collapsed .sign-out-btn {
  display: none;
}

 /* User info when collapsed - show only avatar */
 .sidebar.collapsed .user-info {
  justify-content: center;
 }

 .sidebar.collapsed .user-info .user-name {
  display: none;
 }

 /* ============================================
   Feature 3: Docs Editor Checklist Sidebar
   ============================================ */

 .docs-editor-wrapper-with-sidebar {
  display: flex;
  width: 100%;
  height: 100%;
}

 .docs-editor-main {
  flex: 1;
  overflow: auto;
}

.pd-sidebar {
  width: 340px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 5;
}

.pd-sidebar.collapsed {
  width: 0;
  opacity: 0;
  border-left: none;
  pointer-events: none;
}

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

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

.checklist-title svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.checklist-add-btn {
  padding: 6px 12px;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.checklist-add-btn:hover {
  filter: brightness(1.1);
}

.checklist-add-btn svg {
  width: 14px;
  height: 14px;
}

.checklist-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.checklist-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.checklist-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.15s;
}

.checklist-item:hover {
  border-color: var(--primary);
}

.checklist-item.completed {
  opacity: 0.6;
}

.checklist-item.completed .checklist-item-text {
  text-decoration: line-through;
  color: var(--muted-foreground);
}

.checklist-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--muted-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.checklist-checkbox:hover {
  border-color: var(--primary);
}

.checklist-item.completed .checklist-checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.checklist-checkbox svg {
  width: 12px;
  height: 12px;
  color: white;
  display: none;
}

.checklist-item.completed .checklist-checkbox svg {
  display: block;
}

.checklist-item-content {
  flex: 1;
  min-width: 0;
}

.checklist-item-text {
  font-size: 13px;
  color: var(--foreground);
  word-break: break-word;
}

.checklist-item-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  opacity: 0;
  padding: 2px;
}

.checklist-item:hover .checklist-item-delete {
  opacity: 1;
}

.checklist-item-delete:hover {
  color: var(--destructive);
}

.checklist-item-delete svg {
  width: 14px;
  height: 14px;
}

.checklist-add-input-wrapper {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.checklist-add-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--foreground);
  font-size: 13px;
}

.checklist-add-input::placeholder {
  color: var(--muted-foreground);
}

.checklist-add-input:focus {
  outline: none;
  border-color: var(--primary);
}

.checklist-progress {
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.checklist-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.checklist-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.checklist-progress-text {
  font-size: 11px;
  color: var(--muted-foreground);
}

/* ============================================
   Feature 4: In-Editor Share Panel
   ============================================ */

.in-editor-share-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  background: var(--card);
  border-left: 1px solid var(--border);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.in-editor-share-panel.open {
  transform: translateX(0);
}

.in-editor-share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.in-editor-share-overlay.open {
  opacity: 1;
  visibility: visible;
}

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

.in-editor-share-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
}

.in-editor-share-close {
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: all 0.15s;
}

.in-editor-share-close:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.in-editor-share-close svg {
  width: 18px;
  height: 18px;
}

.in-editor-share-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* ============================================
   Feature 1: Space Widget Hover Actions
   ============================================ */

.clickup-style-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--foreground);
  transition: all 0.2s;
}

.clickup-style-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.clickup-style-btn.primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.clickup-style-btn.primary:hover {
  background: var(--primary-hover);
}

.card-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ============================================
   Feature 3: Minimalistic Project Detail Main
   ============================================ */
.project-detail-main {
  background: transparent !important;
}

.project-detail-main .project-detail-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.project-detail-main .project-update-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin: 20px 24px;
}

.project-detail-main .kanban-board {
  gap: 16px;
  padding: 0 24px;
}

.project-detail-main .kanban-column {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 280px;
}

.project-detail-main .section-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

/* ============================================
   Feature 4: PDF Viewer
   ============================================ */
.pdf-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-viewer-container {
  width: 90%;
  max-width: 1200px;
  height: 90vh;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.pdf-viewer-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

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

/* ============================================
   Feature 5: Task Completion Widget Flip
   ============================================ */
.task-completion-widget {
  perspective: 1000px;
  cursor: pointer;
}

.widget-flip-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 140px;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.task-completion-widget.flipped .widget-flip-container {
  transform: rotateY(180deg);
}

.widget-flip-front,
.widget-flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.widget-flip-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
}

.widget-flip-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted-foreground);
  opacity: 0.7;
}

.widget-back-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  padding: 4px;
}

.widget-backlog-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.widget-backlog-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface);
  border-radius: 6px;
  font-size: 12px;
  color: var(--foreground);
}

.widget-backlog-checkbox {
  width: 14px;
  height: 14px;
  border: 2px solid var(--muted-foreground);
  border-radius: 3px;
  cursor: pointer;
}

.widget-backlog-checkbox:hover {
  border-color: var(--primary);
}

.widget-backlog-text {
  flex: 1;
}

.widget-backlog-empty {
  text-align: center;
  padding: 20px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.widget-backlog-more {
  text-align: center;
  font-size: 11px;
  color: var(--muted-foreground);
  padding: 8px;
}

/* ============================================
   In-Doc/Excel Save Panel
   ============================================ */
.in-doc-save-panel {
  position: absolute;
  top: 60px;
  right: 60px;
  width: 280px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 3000;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.in-doc-save-panel.show {
  opacity: 1;
  transform: translateY(0);
}

.in-doc-save-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.in-doc-save-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.in-doc-save-close:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.in-doc-save-list {
  padding: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.in-doc-save-space-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.in-doc-save-space-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}

.in-doc-save-space-icon {
  width: 28px;
  height: 28px;
  background: var(--surface);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.in-doc-save-space-icon svg {
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
}

/* ============================================
   Professional Issues List View (Minimalistic)
   ============================================ */

.issues-container-modern {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 32px;
  gap: 24px;
}

/* --- Minimal Toolbar --- */
.issues-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
}

.issues-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
  letter-spacing: -0.02em;
}

.issues-count-badge {
  background: var(--surface);
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.issues-toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Search Bar */
.search-bar-minimal {
  position: relative;
  width: 240px;
  transition: width 0.2s ease;
}

.search-bar-minimal svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  pointer-events: none;
  width: 14px;
  height: 14px;
}

.search-bar-minimal input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  color: var(--foreground);
  font-size: 13px;
  transition: all 0.2s;
}

/* Dark mode: 50% opacity for glass background */
[data-mode="dark"] .search-bar-minimal input {
  background: color-mix(in hsl, var(--glass-bg) 50%, transparent);
}

.search-bar-minimal input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--ring);
  width: 280px;
}

/* Filter Group */
.filter-group-minimal {
  display: flex;
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  padding: 3px;
  border-radius: 8px;
}

/* Dark mode: 50% opacity for glass background */
[data-mode="dark"] .filter-group-minimal {
  background: color-mix(in hsl, var(--glass-bg) 50%, transparent);
}

.filter-btn-minimal {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn-minimal:hover {
  color: var(--foreground);
}

.filter-btn-minimal.active {
  background: var(--background);
  color: var(--foreground);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Primary Button */
.btn-primary-small {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--foreground);
  color: var(--background);
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  height: 36px;
}

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

/* --- List View --- */
.issues-list-wrapper {
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

/* Dark mode: 50% opacity for glass background */
[data-mode="dark"] .issues-list-wrapper {
  background: color-mix(in hsl, var(--glass-bg) 50%, transparent);
}

.issues-list-header {
  display: grid;
  grid-template-columns: 80px 140px 1fr 100px 120px 60px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted-foreground);
  letter-spacing: 0.05em;
}

/* Dark mode: 70% opacity for glass background */
[data-mode="dark"] .issues-list-header {
  background: color-mix(in hsl, var(--glass-bg) 70%, transparent);
}

.issues-list-body {
  display: flex;
  flex-direction: column;
}

.issue-list-item {
  display: grid;
  grid-template-columns: 80px 140px 1fr 100px 120px 60px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--glass-border);
  align-items: center;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 13px;
  color: var(--foreground);
}

.issue-list-item:last-child {
  border-bottom: none;
}

.issue-list-item:hover {
  background: var(--surface-hover);
}

/* Columns */
.col-id {
  font-family: 'Monaco', monospace;
  font-size: 12px;
  color: var(--muted-foreground);
}

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

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.todo {
  background: var(--status-todo);
  box-shadow: 0 0 0 2px rgba(var(--status-todo-rgb), 0.15);
}

.status-dot.in-progress {
  background: var(--status-in-progress);
  box-shadow: 0 0 0 2px rgba(var(--status-in-progress-rgb), 0.15);
}

.status-dot.review {
  background: var(--status-review);
  box-shadow: 0 0 0 2px rgba(var(--status-review-rgb), 0.15);
}

.status-dot.done {
  background: var(--status-done);
  box-shadow: 0 0 0 2px rgba(var(--status-done-rgb), 0.15);
}

.status-label {
  font-weight: 500;
  text-transform: capitalize;
}

.col-title {
  font-weight: 500;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 24px;
}

.col-priority {
  display: flex;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  border: 1px solid transparent;
}

.priority-badge.high {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
}

.priority-badge.medium {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
}

.priority-badge.low {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
}

.col-date {
  color: var(--muted-foreground);
  font-size: 12px;
}

.col-actions {
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.2s;
}

.issue-list-item:hover .col-actions {
  opacity: 1;
}

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

.action-btn-icon:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* --- Empty State --- */
.empty-state-minimal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  background: var(--surface);
  border-radius: 12px;
  border: 1px dashed var(--border);
  margin-top: 24px;
}

.empty-icon {
  color: var(--muted-foreground);
  opacity: 0.5;
  margin-bottom: 16px;
}

.empty-state-minimal h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0 0 8px 0;
}

.empty-state-minimal p {
  font-size: 13px;
  color: var(--muted-foreground);
  margin: 0 0 16px 0;
}

.btn-text {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
}

.btn-text:hover {
  text-decoration: underline;
}

/* --- Inline Create Form --- */
#inlineCreateIssueFormContainer {
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  animation: slideDown 0.2s ease-out;
  overflow: hidden;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.inline-card-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

.btn-close-minimal {
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-close-minimal:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.inline-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inline-card-title-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  padding: 0;
  outline: none;
}

.inline-card-title-input::placeholder {
  color: var(--muted-foreground);
  opacity: 0.7;
}

.inline-card-desc-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--muted-foreground);
  padding: 0;
  resize: none;
  outline: none;
  font-family: inherit;
  min-height: 40px;
}

.inline-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.inline-card-tools {
  display: flex;
  gap: 12px;
}

.select-pill-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.select-pill {
  appearance: none;
  padding: 6px 24px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.select-pill:hover {
  border-color: var(--muted-foreground);
  color: var(--foreground);
}

.inline-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-text-cancel {
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
}

.btn-text-cancel:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.btn-primary-create {
  background: var(--foreground);
  color: var(--background);
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
  .issues-container-modern {
    padding: 16px;
  }

  .issues-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .issues-toolbar-right {
    width: 100%;
    flex-wrap: wrap;
    gap: 12px;
  }

  .search-bar-minimal {
    width: 100%;
  }

  .search-bar-minimal input:focus {
    width: 100%;
  }

  .filter-group-minimal {
    flex: 1;
    overflow-x: auto;
  }

  .filter-btn-minimal {
    white-space: nowrap;
    flex: 1;
    text-align: center;
  }

  .issues-list-header {
    display: none;
  }

  .issue-list-item {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 12px;
    padding: 16px;
    height: auto;
  }

  .col-id {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .col-status {
    margin-bottom: 8px;
  }

  .col-title {
    font-size: 16px;
    white-space: normal;
    padding-right: 0;
  }

  .col-priority {
    margin-top: 8px;
  }

  .col-date {
    margin-top: 4px;
    font-size: 11px;
  }

  .col-actions {
    opacity: 1;
    justify-content: flex-start;
    margin-top: 12px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    width: 100%;
  }
}

/* Space Widget Overlay Fix */
.space-widget-overlay {
  pointer-events: auto;
}

.space-widget-overlay .space-overlay-close {
  pointer-events: auto;
  cursor: pointer;
  z-index: 10;
}

/* ============================================
   Minimalistic Project Detail Styles
   ============================================ */
.project-detail-minimal {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  padding: 24px;
  min-height: 100vh;
}

.project-detail-minimal .project-detail-main {
  max-width: 900px;
}

.project-detail-minimal .project-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.project-detail-minimal .back-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.project-detail-minimal .back-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.project-detail-minimal .project-detail-info {
  flex: 1;
}

.project-detail-minimal .project-detail-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0 0 8px 0;
  outline: none;
  border: none;
  background: transparent;
}

.project-detail-minimal .project-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.project-meta-separator {
  opacity: 0.4;
}

.project-meta-date,
.project-meta-progress {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-action-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.project-action-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Stats Bar */
.project-stats-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.project-stats-bar .stat-card {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.project-stats-bar .stat-card-action {
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--primary);
}

.project-stats-bar .stat-card-action:hover {
  border-color: var(--primary);
  background: rgba(var(--primary), 0.05);
}

.project-stats-bar .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--foreground);
}

.project-stats-bar .stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted-foreground);
  margin-top: 4px;
}

/* Collapsible Sections */
.project-section {
  margin-bottom: 24px;
}

.project-section summary {
  cursor: pointer;
  list-style: none;
}

.project-section summary::-webkit-details-marker {
  display: none;
}

.section-header,
.section-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 600;
}

.section-header-row {
  justify-content: space-between;
}

.section-header svg,
.section-header-row .section-title svg {
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
}

.section-header-row .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
}

.section-content {
  padding-top: 12px;
}

/* Minimal Kanban */
.kanban-minimal .kanban-column {
  min-width: 260px;
  max-width: 300px;
}

.kanban-minimal .checkbox-container {
  width: 16px;
  height: 16px;
}

.kanban-minimal .checkbox-custom {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.kanban-minimal .check-icon {
  width: 10px;
  height: 10px;
}

.kanban-minimal .kanban-task-delete .icon {
  width: 14px;
  height: 14px;
}

/* Minimal Sidebar */
.project-sidebar-minimal {
  width: 280px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 24px;
}

.sidebar-progress {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
}

.progress-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 6;
}

.progress-ring-fill {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.sidebar-progress .progress-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  font-weight: 700;
  color: var(--foreground);
}

.sidebar-properties {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.property-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.property-row .property-label {
  font-size: 12px;
  color: var(--muted-foreground);
}

.property-btn {
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.property-btn:hover {
  border-color: var(--primary);
}

.property-btn.priority-high {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.property-btn.priority-medium {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.property-btn.priority-low {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.team-avatars {
  display: flex;
  align-items: center;
}

.team-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 9px;
  font-weight: 600;
  margin-left: -6px;
  border: 2px solid var(--card);
}

.team-avatar:first-child {
  margin-left: 0;
}

.team-avatar-more {
  background: var(--muted);
  color: var(--muted-foreground);
}

.team-add-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  color: var(--muted-foreground);
  cursor: pointer;
  margin-left: 4px;
  transition: all 0.15s;
}

.team-add-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.team-add-btn svg {
  width: 12px;
  height: 12px;
}

@media (max-width: 900px) {
  .project-detail-minimal {
    grid-template-columns: 1fr;
  }

  .project-sidebar-minimal {
    width: 100%;
    position: static;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: center;
  }

  .sidebar-progress {
    margin: 0;
  }

  .project-stats-bar {
    flex-wrap: wrap;
  }

  .project-stats-bar .stat-card {
    min-width: calc(50% - 6px);
    flex: unset;
  }
}

/* ============================================
   MINIMALISTIC PROJECT DETAIL COMPONENTS
   Clean, modern, responsive UI
   ============================================ */

/* Project Header Card - Unified status & actions */
.project-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid var(--glass-border);
}

.project-header-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
}

.project-status-indicator .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(0.9);
  }
}

.project-status-indicator.completed {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.project-status-indicator.completed .status-dot {
  background: #22c55e;
}

.project-status-indicator.on-track {
  background: var(--primary) / 0.12;
  color: var(--primary);
}

.project-status-indicator.on-track .status-dot {
  background: var(--primary);
}

.project-status-indicator.in-progress {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}

.project-status-indicator.in-progress .status-dot {
  background: #fbbf24;
}

.project-meta-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted-foreground);
}

.meta-divider {
  opacity: 0.5;
}

/* Whiteboard Button - Clean pill style */
.whiteboard-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.whiteboard-btn:hover {
  background: var(--surface-hover);
  border-color: var(--muted-foreground);
  transform: translateY(-1px);
}

.whiteboard-btn svg {
  width: 18px;
  height: 18px;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

.whiteboard-btn:hover svg {
  color: var(--foreground);
}

/* Notes Section - Minimal clean design */
.notes-section {
  margin-bottom: 28px;
}

.notes-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-foreground);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.notes-header svg {
  width: 14px;
  height: 14px;
}

.notes-textarea {
  width: 100%;
  min-height: 80px;
  max-height: 200px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--foreground);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  transition: all 0.2s;
}

.notes-textarea::placeholder {
  color: var(--muted-foreground);
  opacity: 0.7;
}

.notes-textarea:focus {
  outline: none;
  border-color: var(--muted-foreground);
  background: var(--card);
}

/* Progress Section - Minimalistic */
.progress-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
}

.progress-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-foreground);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.progress-section-header svg {
  width: 14px;
  height: 14px;
}

/* Minimal Chart Container */
.progress-chart-minimal {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--glass-border);
}

/* Clean Minimal Chart */
.chart-minimal {
  display: flex;
  align-items: center;
  gap: 32px;
}

.chart-summary {
  text-align: center;
  min-width: 80px;
  padding-right: 24px;
  border-right: 1px solid var(--glass-border);
}

.chart-total-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1;
}

.chart-total-label {
  font-size: 11px;
  color: var(--muted-foreground);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex: 1;
  height: 100px;
}

.chart-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 8px;
}

.chart-bar-container {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.chart-bar {
  width: 100%;
  max-width: 40px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--muted-foreground) 100%);
  border-radius: 6px 6px 0 0;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
}

.chart-bar:hover {
  transform: scaleY(1.05);
  filter: brightness(1.1);
}

.chart-bar-value {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 600;
  color: var(--foreground);
  opacity: 0;
  transition: opacity 0.2s;
}

.chart-bar:hover .chart-bar-value {
  opacity: 1;
}

.chart-bar-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-foreground);
}

/* Project Detail Title - Clean */
.project-detail-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--foreground);
  outline: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
  padding: 4px 0;
}

.project-detail-title:focus {
  border-bottom-color: var(--muted-foreground);
}

/* ============================================
   Linear-Style Progress Chart (Minimalistic)
   ============================================ */
.linear-progress-chart {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  max-width: 320px;
}

/* Chart Stats Row - Horizontal Layout like Linear */
.chart-stats-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.chart-stat-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.stat-label-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-label-row .stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  flex-shrink: 0;
}

.stat-dot.scope-dot {
  background: rgba(255, 255, 255, 0.35);
}

.stat-dot.started-dot {
  background: #fbbf24;
}

.stat-dot.completed-dot {
  background: #8b5cf6;
}

.stat-label {
  font-size: 10px;
  color: var(--muted-foreground);
  font-weight: 500;
  text-transform: capitalize;
}

.stat-value-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}

.stat-number {
  font-size: 14px;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1;
}

.stat-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
}

.stat-badge.positive {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.stat-badge.negative {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.stat-percent {
  font-size: 10px;
  color: var(--muted-foreground);
}

/* SVG Container */
.chart-svg-container {
  position: relative;
  width: 100%;
}

.linear-chart-svg {
  display: block;
  overflow: visible;
}

.chart-date-label {
  font-size: 8px;
  font-weight: 500;
  fill: var(--muted-foreground);
  user-select: none;
}

/* Activity Progress Indicator */
.activity-progress-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.activity-progress-ring {
  transform: rotate(-90deg);
}

.activity-progress-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
}

/* Milestone progress styles removed */

/* Portrait Progress Chart (Legacy support) */
.portrait-progress-chart {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
  margin: 0 auto;
}

/* Chart Header */
.chart-header-portrait {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chart-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
}

.chart-completion-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  padding: 3px 8px;
  border-radius: 6px;
}

/* SVG Wrapper */
.chart-svg-wrapper {
  position: relative;
  width: 100%;
}

.portrait-chart-svg {
  display: block;
  overflow: visible;
}

/* Gradient stops - theme aware */
.chart-gradient-start {
  stop-color: var(--primary);
  stop-opacity: 0.25;
}

.chart-gradient-end {
  stop-color: var(--primary);
  stop-opacity: 0.02;
}

/* Chart area - no animation for clean look */
.chart-area {
  opacity: 1;
}

.chart-line-primary {
  stroke: var(--primary);
}

.chart-line-accent {
  stroke: var(--accent);
  opacity: 0;
  animation: chartLineFadeIn 0.5s ease-out 0.4s forwards;
}

@keyframes chartLineDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes chartLineFadeIn {
  to {
    opacity: 0.7;
  }
}

/* Chart Points - theme colors */
.chart-point-primary {
  fill: var(--primary);
  stroke: var(--card);
  stroke-width: 2;
  opacity: 0;
  transform-origin: center;
  transition: all 0.2s ease;
}

.chart-point-accent {
  fill: var(--accent);
  stroke: var(--card);
  stroke-width: 2;
  opacity: 0;
  transform-origin: center;
  transition: all 0.2s ease;
}

.chart-point-group {
  cursor: pointer;
}

.chart-point-group .chart-point-primary,
.chart-point-group .chart-point-accent {
  animation: chartPointPop 0.3s ease-out forwards;
}

.chart-point-group:nth-child(1) .chart-point-primary,
.chart-point-group:nth-child(1) .chart-point-accent {
  animation-delay: 0.5s;
}

.chart-point-group:nth-child(2) .chart-point-primary,
.chart-point-group:nth-child(2) .chart-point-accent {
  animation-delay: 0.6s;
}

.chart-point-group:nth-child(3) .chart-point-primary,
.chart-point-group:nth-child(3) .chart-point-accent {
  animation-delay: 0.7s;
}

.chart-point-group:nth-child(4) .chart-point-primary,
.chart-point-group:nth-child(4) .chart-point-accent {
  animation-delay: 0.8s;
}

.chart-point-group:nth-child(5) .chart-point-primary,
.chart-point-group:nth-child(5) .chart-point-accent {
  animation-delay: 0.9s;
}

.chart-point-group:nth-child(6) .chart-point-primary,
.chart-point-group:nth-child(6) .chart-point-accent {
  animation-delay: 1.0s;
}

.chart-point-group:nth-child(7) .chart-point-primary,
.chart-point-group:nth-child(7) .chart-point-accent {
  animation-delay: 1.1s;
}

.chart-point-group:nth-child(8) .chart-point-primary,
.chart-point-group:nth-child(8) .chart-point-accent {
  animation-delay: 1.2s;
}

@keyframes chartPointPop {
  0% {
    opacity: 0;
    transform: scale(0);
  }

  70% {
    opacity: 1;
    transform: scale(1.2);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.chart-point-group:hover .chart-point-primary {
  r: 6;
  filter: drop-shadow(0 0 6px var(--primary));
}

.chart-point-group:hover .chart-point-accent {
  r: 5;
  filter: drop-shadow(0 0 6px var(--accent));
}

/* Axis Labels */
.chart-axis-label {
  font-size: 10px;
  font-weight: 500;
  fill: var(--muted-foreground);
  user-select: none;
}

/* Stats Footer */
.chart-stats-footer {
  display: flex;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.stat-item-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
}

.stat-dot.primary {
  background: var(--primary);
}

.stat-dot.accent {
  background: var(--accent);
}

.stat-label-compact {
  font-size: 11px;
  color: var(--muted-foreground);
}

.stat-value-compact {
  font-size: 13px;
  font-weight: 700;
  color: var(--foreground);
  margin-left: auto;
}

/* Tooltip */
.chart-tooltip {
  position: absolute;
  background: var(--popover);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  min-width: 110px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.chart-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.tooltip-date {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted-foreground);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tooltip-values {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tooltip-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--foreground);
}

.tooltip-dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
}

.tooltip-dot.scope {
  background: var(--primary);
}

.tooltip-dot.completed {
  background: var(--accent);
}

.tooltip-value {
  font-weight: 700;
  margin-left: auto;
}

/* ============================================
   Linear-Style Project Detail Layout
   ============================================ */
.project-detail.linear-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  min-height: 100vh;
}

.project-detail.linear-layout .project-detail-main {
  padding: 24px 32px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

/* Linear Header */
.project-detail-header-linear {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.back-btn-minimal {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.back-btn-minimal:hover {
  background: var(--surface);
  color: var(--foreground);
}

.back-btn-minimal svg {
  width: 18px;
  height: 18px;
}

.project-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-icon-wrapper svg {
  width: 22px;
  height: 22px;
}

.project-title-section {
  flex: 1;
}

.project-name-linear {
  font-size: 24px;
  font-weight: 700;
  color: var(--foreground);
  margin: 0 0 4px 0;
  outline: none;
}

.project-summary-placeholder {
  font-size: 14px;
  color: var(--muted-foreground);
  margin: 0;
  outline: none;
}

.project-detail-delete-minimal {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-detail-delete-minimal:hover {
  background: var(--destructive);
  color: white;
}

.project-detail-delete-minimal svg {
  width: 16px;
  height: 16px;
}

/* Properties Row */
.project-properties-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.property-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--foreground);
}

.property-tag svg {
  width: 14px;
  height: 14px;
  color: var(--muted-foreground);
}

.property-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.property-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.date-arrow {
  color: var(--muted-foreground);
}

.whiteboard-btn-compact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.whiteboard-btn-compact svg {
  width: 14px;
  height: 14px;
}

/* Latest Update Card */
.latest-update-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

.update-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.update-label {
  font-size: 12px;
  color: var(--muted-foreground);
}

.new-update-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  cursor: pointer;
}

.new-update-btn svg {
  width: 14px;
  height: 14px;
}

.update-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.update-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.update-status-badge.on-track {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.update-status-badge.in-progress {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.update-status-badge.completed {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
}

.status-check {
  font-size: 10px;
}

.update-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.update-author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.update-author-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--foreground);
}

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

.update-text {
  font-size: 14px;
  color: var(--foreground);
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.update-actions {
  display: flex;
  gap: 8px;
}

.update-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.update-action-btn svg {
  width: 14px;
  height: 14px;
}

/* Section Blocks */
.section-block {
  margin-bottom: 24px;
}

.section-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 10px;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.description-textarea {
  width: 100%;
  min-height: 60px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--foreground);
  font-size: 13px;
  resize: vertical;
  outline: none;
}

/* Milestone list styles removed */

/* Linear Sidebar */
.project-sidebar-linear {
  padding: 20px;
  background: var(--card);
  overflow-y: auto;
  height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
}

.sidebar-section-header span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-add-btn {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 14px;
}

.sidebar-see-all {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 11px;
  cursor: pointer;
}

.sidebar-properties-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.sidebar-property-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-prop-label {
  font-size: 12px;
  color: var(--muted-foreground);
}

.sidebar-prop-value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--foreground);
}

.sidebar-prop-value svg {
  width: 14px;
  height: 14px;
}

.sidebar-prop-value.clickable {
  cursor: pointer;
}

.sidebar-prop-value.clickable:hover {
  color: var(--primary);
}

.sidebar-prop-value.muted {
  color: var(--muted-foreground);
}

.status-dot-mini {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.mini-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-badge {
  padding: 2px 8px;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 4px;
  font-size: 11px;
}

.sidebar-section {
  margin-bottom: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sidebar-milestones {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-milestone-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.milestone-diamond {
  color: var(--primary);
  font-size: 10px;
}

.milestone-stat {
  font-size: 11px;
  color: var(--muted-foreground);
  margin-left: auto;
}

.milestone-menu {
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 12px;
}

/* Priority Dropdown - Linear Style */
.priority-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.15s ease;
}

.priority-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.priority-dropdown-header {
  padding: 10px 12px;
  font-size: 11px;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.priority-shortcuts {
  display: flex;
  gap: 4px;
  font-size: 10px;
}

.priority-shortcuts span {
  padding: 2px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted-foreground);
}

.priority-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--foreground);
  cursor: pointer;
  transition: background 0.1s;
}

.priority-option:hover {
  background: var(--surface-hover);
}

.priority-option.selected {
  background: rgba(59, 130, 246, 0.1);
}

.priority-dots {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted-foreground);
}

.priority-icon.urgent {
  color: #ef4444;
  font-weight: bold;
  font-size: 14px;
}

.priority-bars {
  width: 16px;
  height: 16px;
  fill: var(--muted-foreground);
}

.priority-option:nth-child(3) .priority-bars {
  fill: #ef4444;
}

.priority-option:nth-child(4) .priority-bars {
  fill: #f59e0b;
}

.priority-option:nth-child(5) .priority-bars {
  fill: #22c55e;
}

.priority-check {
  margin-left: auto;
  color: var(--primary);
}

.priority-key {
  margin-left: auto;
  padding: 2px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 10px;
  color: var(--muted-foreground);
}

/* Kanban Column Delete Button Fix */
.kanban-column-delete {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: all 0.15s;
}

.kanban-column-delete:hover {
  opacity: 1;
  background: var(--destructive);
  border-color: var(--destructive);
  color: white;
}

.kanban-column-delete svg {
  width: 14px;
  height: 14px;
}

/* AI Typing Animation - Professional Smooth */
.ai-cursor {
  animation: blink 0.7s ease-in-out infinite;
  color: var(--primary);
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

/* AI typing styles moved to components.css */

/* Compact Activity Section */
.sidebar-section.activity-compact {
  padding: 12px 10px;
  margin-bottom: 16px;
}

.sidebar-section.activity-compact .sidebar-section-header {
  margin-bottom: 0;
  padding-bottom: 0;
}

.activity-progress-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.activity-progress-ring {
  transition: stroke-dashoffset 0.5s ease;
}

.activity-progress-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--foreground);
}

/* Progress Chart - Minimalistic */
.linear-progress-chart {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.chart-stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.chart-stat-block {
  flex: 1;
}

.stat-label-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.stat-dot.scope-dot {
  background: rgba(255, 255, 255, 0.4);
}

.stat-dot.started-dot {
  background: #fbbf24;
}

.stat-dot.completed-dot {
  background: #8b5cf6;
}

.stat-label {
  font-size: 10px;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.stat-number {
  font-size: 16px;
  font-weight: 700;
  color: var(--foreground);
}

.stat-badge {
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 3px;
}

.stat-badge.positive {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.stat-badge.negative {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.stat-percent {
  font-size: 11px;
  color: var(--muted-foreground);
}

.chart-svg-container {
  width: 100%;
  height: 100px;
  overflow: hidden;
}

.linear-chart-svg {
  width: 100%;
  height: 100%;
}

.chart-date-label {
  font-size: 9px;
  fill: var(--muted-foreground);
}

/* Sidebar Priority Dropdown */
.sidebar-priority-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.15s ease;
  margin-top: 4px;
}

.sidebar-priority-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sidebar-property-row {
  position: relative;
}

/* Kanban Task Delete Button Fix - Prevent Hover Glitch */
.kanban-task-delete {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--muted-foreground);
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.kanban-task:hover .kanban-task-delete {
  opacity: 1;
}

.kanban-task-delete:hover {
  color: var(--destructive);
  background: rgba(239, 68, 68, 0.1);
}

.kanban-task-delete svg,
.kanban-task-delete .icon {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 900px) {
  .project-detail.linear-layout {
    grid-template-columns: 1fr;
  }

  .project-sidebar-linear {
    height: auto;
    position: relative;
    border-top: 1px solid var(--border);
  }
}

/* ============================================
   AI View - SuperAgents Style
   ============================================ */
.ai-view {
  min-height: 100vh;
  background: var(--background);
  position: relative;
  overflow-x: hidden;
}

.ai-header-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg,
      rgba(139, 92, 246, 0.15) 0%,
      rgba(236, 72, 153, 0.1) 30%,
      rgba(59, 130, 246, 0.08) 60%,
      transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Removed ::before rainbow stripe */

.ai-content {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 24px;
}

.ai-title-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

.ai-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: #ec4899;
}

.ai-logo svg {
  width: 42px;
  height: 42px;
}

.ai-title {
  font-size: 36px;
  font-weight: 600;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

.ai-title-gradient {
  background: linear-gradient(90deg, #ec4899, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: italic;
}

/* AI Input Container */
.ai-input-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ai-input-container:focus-within {
  border-color: rgba(236, 72, 153, 0.5);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
}

.ai-main-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--foreground);
  font-size: 16px;
  line-height: 1.6;
  resize: none;
  outline: none;
  font-family: inherit;
}

.ai-main-input::placeholder {
  color: var(--muted-foreground);
}

.ai-input-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.ai-input-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.ai-input-btn svg {
  width: 18px;
  height: 18px;
}

.ai-input-btn.add-btn {
  background: var(--surface-hover);
  color: var(--muted-foreground);
}

.ai-input-btn.add-btn:hover {
  background: var(--accent);
  color: var(--foreground);
}

.ai-input-btn.send-btn {
  background: var(--muted-foreground);
  color: var(--background);
}

.ai-input-btn.send-btn:hover {
  background: var(--foreground);
}

/* Quick Agent Cards */
.ai-quick-agents {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 64px;
}

.ai-agent-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-agent-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  background: var(--surface-hover);
}

.ai-agent-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}

.ai-agent-icon svg {
  width: 18px;
  height: 18px;
  color: white;
}

.ai-agent-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ai-agent-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
}

.ai-agent-desc {
  font-size: 12px;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Superpowers Section */
.ai-superpowers-section {
  margin-top: 48px;
}

.ai-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 24px;
}

.ai-superpowers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.ai-superpower-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: linear-gradient(135deg,
      rgba(var(--card-accent, 124, 58, 237), 0.1) 0%,
      var(--card) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
}

.ai-superpower-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
      var(--card-accent, rgba(124, 58, 237, 0.2)) 0%,
      transparent 50%);
  opacity: 0.15;
  pointer-events: none;
}

.ai-superpower-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

.ai-superpower-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border-radius: 10px;
}

.ai-superpower-icon svg {
  width: 24px;
  height: 24px;
}

.ai-superpower-check {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #22c55e;
  border-radius: 50%;
}

.ai-superpower-check svg {
  width: 12px;
  height: 12px;
  color: white;
}

.ai-superpower-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-superpower-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
}

.ai-superpower-desc {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.4;
}

.ai-superpower-count {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: auto;
  padding-top: 8px;
}

/* Responsive */
@media (max-width: 900px) {
  .ai-quick-agents {
    grid-template-columns: repeat(2, 1fr);
  }

  .ai-superpowers-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ai-title {
    font-size: 28px;
  }
}

@media (max-width: 600px) {
  .ai-quick-agents {
    grid-template-columns: 1fr;
  }

  .ai-chat-input-wrapper {
    margin: 0 8px;
  }
}

/* ============================================
   AI Chat View Styles
   ============================================ */
/* ============================================
   AI Chat View - ClickUp Style Design
   ============================================ */

.ai-chat-view {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  background: var(--background);
  overflow: hidden;
}

/* ClickUp Style - Soft gradient background */
.ai-chat-view.clickup-style {
  background: linear-gradient(180deg, var(--background) 0%, hsl(from var(--background) h s calc(l + 3)) 50%, var(--background) 100%);
}

.ai-chat-view.clickup-style .ai-chat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: var(--background);
}

/* Header */
.ai-chat-header.clickup-header {
  flex-shrink: 0;
  padding: 12px 24px;
  border-bottom: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-chat-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  border-radius: 6px;
}

.ai-chat-back-btn:hover {
  color: var(--foreground);
  background: var(--muted);
}

.ai-chat-back-btn svg {
  width: 16px;
  height: 16px;
}

/* History Button */
.ai-chat-history-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--muted);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 8px;
}

.ai-chat-history-btn:hover {
  color: var(--foreground);
  background: var(--accent);
  border-color: var(--border-strong);
}

.ai-chat-history-btn svg {
  width: 16px;
  height: 16px;
}



/* History Sidebar Overlay */
.ai-history-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 998;
}

.ai-history-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* History Sidebar */
.ai-history-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 340px;
  height: 100vh;
  background: var(--card);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  display: flex;
  flex-direction: column;
}

.ai-history-sidebar.open {
  transform: translateX(0);
}

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

.ai-history-sidebar-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

.ai-history-close-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
}

.ai-history-close-btn:hover {
  background: var(--muted);
  color: var(--foreground);
}

.ai-history-close-btn svg {
  width: 18px;
  height: 18px;
}

.ai-history-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

/* History Empty State */
.ai-history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.ai-history-empty svg {
  width: 48px;
  height: 48px;
  color: var(--muted-foreground);
  opacity: 0.5;
  margin-bottom: 16px;
}

.ai-history-empty p {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
  margin: 0 0 4px;
}

.ai-history-empty span {
  font-size: 13px;
  color: var(--muted-foreground);
}

/* History Item */
.ai-history-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 4px;
}

.ai-history-item:hover {
  background: var(--muted);
}

.ai-history-item.active {
  background: var(--accent);
}

.ai-history-item-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  border-radius: 6px;
}

.ai-history-item-icon svg {
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
}

.ai-history-item-content {
  flex: 1;
  min-width: 0;
}

.ai-history-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.ai-history-item-meta {
  font-size: 12px;
  color: var(--muted-foreground);
}

.ai-history-item-delete {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  border-radius: 4px;
  opacity: 0;
  transition: all 0.15s;
}

.ai-history-item:hover .ai-history-item-delete {
  opacity: 1;
}

.ai-history-item-delete:hover {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

/* Scroll Area */
.ai-chat-scroll-area {
  flex: 1;
  overflow-y: auto;
  display: flex;
  justify-content: center;
}

/* Messages Container - Centered */
.ai-chat-messages.clickup-messages {
  width: 100%;
  max-width: 720px;
  padding: 40px 24px 120px;
  margin: 0 auto;
}

/* Empty State */
.ai-chat-empty.clickup-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: #71717a;
}

.ai-chat-empty.clickup-empty .ai-chat-empty-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  color: #52525b;
}

.ai-chat-empty.clickup-empty .ai-chat-empty-icon svg {
  width: 100%;
  height: 100%;
}

.ai-chat-empty.clickup-empty p {
  font-size: 14px;
}

/* User Message - Right aligned within centered container */
.ai-chat-message-user.clickup-user-msg {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 32px;
  width: 100%;
}

.ai-chat-bubble-user.clickup-user-bubble {
  background: var(--card);
  color: var(--foreground);
  padding: 14px 18px;
  border-radius: 16px;
  max-width: 70%;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid var(--border);
}

/* Assistant Message - Left aligned, no bubble */
.ai-chat-message-assistant.clickup-assistant-msg {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

/* Agent Header with Icon */
.ai-chat-assistant-header.clickup-assistant-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-chat-agent-icon.clickup-agent-icon {
  font-size: 20px;
}

.ai-chat-agent-name.clickup-agent-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

/* Content - No bubble, just text */
.ai-chat-content.clickup-content {
  color: var(--foreground);
  font-size: 14px;
  line-height: 1.5;
}

.ai-chat-content.clickup-content p {
  margin-bottom: 10px;
  line-height: 1.5;
}

.ai-chat-content.clickup-content p:last-child {
  margin-bottom: 0;
}

.ai-chat-content.clickup-content strong {
  font-weight: 600;
  color: var(--foreground);
}

/* Heading styles in content */
.ai-chat-content.clickup-content .ai-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #fafafa;
  margin: 24px 0 16px;
}

.ai-chat-content.clickup-content .ai-heading-icon {
  font-size: 18px;
}

/* Ordered List */
.ai-chat-content.clickup-content .ai-ordered-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.ai-chat-content.clickup-content .ai-list-item {
  padding: 10px 0;
  padding-left: 28px;
  position: relative;
}

.ai-chat-content.clickup-content .ai-list-num {
  position: absolute;
  left: 0;
  font-weight: 600;
  color: #a1a1aa;
}

.ai-chat-content.clickup-content .ai-list-title {
  font-weight: 600;
  color: #fafafa;
}

/* Action Buttons Row */
.ai-chat-actions.clickup-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
}

.ai-chat-action-btn.clickup-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #71717a;
  cursor: pointer;
  transition: all 0.15s;
}

.ai-chat-action-btn.clickup-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
}

.ai-chat-action-btn.clickup-action-btn svg {
  width: 15px;
  height: 15px;
}

/* Divider between copy and other actions */
.ai-chat-action-divider.clickup-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 4px;
}

/* Follow Ups */
.ai-chat-followups {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.ai-chat-followups-label {
  font-size: 12px;
  color: #71717a;
  margin-bottom: 4px;
}

.ai-chat-followup-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #a1a1aa;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  width: fit-content;
}

.ai-chat-followup-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fafafa;
  background: rgba(255, 255, 255, 0.03);
}

.ai-chat-followup-btn svg {
  width: 14px;
  height: 14px;
  color: #71717a;
  flex-shrink: 0;
}

/* ============================================
   Input Area - Fixed at Bottom, Centered (ClickUp Style)
   ============================================ */

.ai-chat-input-area.clickup-input-area {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 24px 28px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  background: linear-gradient(to top, var(--background) 0%, var(--background) 70%, transparent 100%);
}

.ai-chat-input-wrapper.clickup-input-wrapper {
  position: relative;
  width: 100%;
  max-width: 520px;
  pointer-events: all;
}

/* Glowing gradient border - More prominent like ClickUp */
.ai-chat-input-glow {
  position: absolute;
  inset: -3px;
  border-radius: 20px;
  background: linear-gradient(135deg,
      #7c3aed 0%,
      #8b5cf6 20%,
      #a855f7 40%,
      #c026d3 60%,
      #a855f7 80%,
      #7c3aed 100%);
  opacity: 0.85;
  z-index: 0;
}

/* Inner box with two rows */
.ai-chat-input-box.clickup-input-box {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 18px 12px;
  background: var(--card);
  border-radius: 17px;
  gap: 8px;
}

/* Row 1: Input text at top */
.ai-chat-input-row-top {
  width: 100%;
}

.ai-chat-input.clickup-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--foreground);
  font-size: 14px;
  line-height: 1.5;
  outline: none;
  font-family: inherit;
  padding: 0;
}


.ai-chat-input.clickup-input::placeholder {
  color: #c026d3;
  opacity: 0.9;
}

/* Row 2: Buttons at bottom */
.ai-chat-input-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Plus button */
.ai-chat-add-btn.clickup-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #71717a;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.ai-chat-add-btn.clickup-add-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
}

.ai-chat-add-btn.clickup-add-btn svg {
  width: 18px;
  height: 18px;
}

/* Send button */
.ai-chat-send-btn.clickup-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #71717a;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.ai-chat-send-btn.clickup-send-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
}

.ai-chat-send-btn.clickup-send-btn svg {
  width: 16px;
  height: 16px;
}

.ai-chat-send-btn.clickup-send-btn:disabled,
.ai-chat-add-btn.clickup-add-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Loading Animation */
.ai-chat-loading {
  display: flex;
  gap: 6px;
  padding: 8px 0;
}

.ai-loading-dot {
  width: 8px;
  height: 8px;
  background: #71717a;
  border-radius: 50%;
  animation: aiLoadingPulse 1.4s ease-in-out infinite;
}

.ai-loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.ai-loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes aiLoadingPulse {

  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  40% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Light mode overrides */
.light .ai-chat-view.clickup-style {
  background: #fafafa;
}

.light .ai-chat-bubble-user.clickup-user-bubble {
  background: #e4e4e7;
  color: #18181b;
  border-color: #d4d4d8;
}

.light .ai-chat-agent-name.clickup-agent-name {
  color: #18181b;
}

.light .ai-chat-content.clickup-content {
  color: #3f3f46;
}

.light .ai-chat-content.clickup-content strong {
  color: #18181b;
}

.light .ai-chat-input-area.clickup-input-area {
  background: linear-gradient(to top, #fafafa 0%, #fafafa 60%, transparent 100%);
}

.light .ai-chat-input-container.clickup-input-container {
  background: #ffffff;
  border-color: rgba(139, 92, 246, 0.4);
}

.light .ai-chat-input.clickup-input {
  color: #18181b;
}

.light .ai-chat-header.clickup-header {
  border-bottom-color: #e4e4e7;
}

.light .ai-chat-back-btn {
  color: #71717a;
}

.light .ai-chat-back-btn:hover {
  color: #18181b;
  background: rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 600px) {
  .ai-superpowers-grid {
    grid-template-columns: 1fr;
  }

  .ai-content {
    padding: 40px 16px;
  }

  .ai-title-section {
    flex-direction: column;
    gap: 12px;
  }
}

/* ============================================
   SuperAgents AI View - Modern Design System
   ============================================ */

.superagents-view {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Top Right Actions (History Button) */
.superagents-top-actions {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 10;
}

/* Background Effects */
.superagents-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.superagents-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.12;
}

.superagents-glow-1 {
  top: -200px;
  left: 20%;
  width: 600px;
  height: 600px;
  background: #8b5cf6;
}

.superagents-glow-2 {
  bottom: -200px;
  right: 20%;
  width: 500px;
  height: 500px;
  background: #3b82f6;
}

.superagents-glow-3 {
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: #06b6d4;
  opacity: 0.05;
}

.superagents-grid-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.02;
  background-image:
    linear-gradient(var(--foreground) 1px, transparent 1px),
    linear-gradient(90deg, var(--foreground) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Content */
.superagents-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  background: transparent;
  min-height: 100vh;
}

/* Hero Section */
.superagents-hero {
  text-align: center;
  margin-bottom: 40px;
}

.superagents-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 9999px;
  color: #a78bfa;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

.superagents-badge-icon {
  width: 16px;
  height: 16px;
}

.superagents-title {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}

.superagents-title-gradient {
  background: linear-gradient(135deg, #a78bfa 0%, #3b82f6 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.superagents-subtitle {
  font-size: 16px;
  color: var(--muted-foreground);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Input Container */
.superagents-input-wrapper {
  width: 100%;
  max-width: 680px;
  margin-bottom: 48px;
}

.superagents-input-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 20px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow:
    0 0 30px rgba(139, 92, 246, 0.15),
    0 8px 32px rgba(0, 0, 0, 0.2);
}

.superagents-input-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: #8b5cf6;
}

.superagents-input-icon svg {
  width: 100%;
  height: 100%;
}

.superagents-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--foreground);
  padding: 14px 0;
}

.superagents-input::placeholder {
  color: var(--muted-foreground);
}

.superagents-send-btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.superagents-send-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.superagents-send-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.superagents-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.superagents-send-btn svg {
  width: 20px;
  height: 20px;
}

/* Suggestions */
.superagents-suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.superagents-suggestion-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  color: var(--muted-foreground);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.superagents-suggestion-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--foreground);
}

.superagents-suggestion-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Feature Cards */
.superagents-features {
  width: 100%;
}

.superagents-features-title {
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-foreground);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.superagents-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}

.superagents-feature-card {
  position: relative;
  text-align: left;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.superagents-feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, transparent 100%);
  transition: opacity 0.3s ease;
}

.superagents-feature-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 10px 40px -10px rgba(139, 92, 246, 0.2);
  transform: translateY(-2px);
}

.superagents-feature-card:hover::before {
  opacity: 1;
}

.superagents-feature-icon {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 16px;
  color: white;
  transition: transform 0.3s ease;
}

.superagents-feature-card:hover .superagents-feature-icon {
  transform: scale(1.1);
}

.superagents-feature-icon svg {
  width: 24px;
  height: 24px;
}

.superagents-feature-title {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}

.superagents-feature-arrow {
  width: 16px;
  height: 16px;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.3s ease;
}

.superagents-feature-card:hover .superagents-feature-arrow {
  opacity: 1;
  transform: translateX(0);
}

.superagents-feature-desc {
  position: relative;
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.5;
  margin: 0;
}

/* Light Theme Adjustments for SuperAgents */
.light .superagents-input-container {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.1);
}

.light .superagents-feature-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

.light .superagents-suggestion-btn {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

/* Responsive */
@media (max-width: 768px) {
  .superagents-content {
    padding: 32px 16px;
  }

  .superagents-features-grid {
    grid-template-columns: 1fr;
  }

  .superagents-suggestions {
    flex-direction: column;
    align-items: center;
  }
}

/* ============================================
   AI Chat View - ClickUp Style
   ============================================ */

.ai-chat-view {
  display: flex;
  height: 100vh;
  background: #1a1a2e;
  overflow: hidden;
}

.ai-chat-view.has-generated-content .ai-chat-panel {
  width: 55%;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

/* Modern AI Chat Panel */
.ai-chat-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #0a0a14 0%, #121224 50%, #0d0d1a 100%);
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.1),
    0 20px 40px -10px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
}

.ai-chat-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.3), transparent);
  z-index: 2;
}

/* Minimal Header */
.ai-chat-header {
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  position: relative;
  z-index: 3;
}

.ai-chat-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 32px;
  right: 32px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(167, 139, 250, 0.1) 50%, rgba(255, 255, 255, 0.05) 100%);
}

.ai-chat-header-title {
  font-size: 18px;
  font-weight: 600;
  color: #e2e2e2;
  margin: 0;
  letter-spacing: -0.2px;
  background: linear-gradient(90deg, #e2e2e2, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ai-chat-header-actions {
  display: flex;
  gap: 12px;
}

.ai-chat-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-chat-back-btn:hover {
  background: rgba(167, 139, 250, 0.1);
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.2);
  transform: translateY(-1px);
}

.ai-chat-back-btn svg {
  width: 16px;
  height: 16px;
}

.ai-chat-history-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-chat-history-btn:hover {
  background: rgba(167, 139, 250, 0.1);
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.2);
  transform: translateY(-1px);
}

.ai-chat-history-btn svg {
  width: 16px;
  height: 16px;
}

/* Modern Messages Container */
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: transparent;
  position: relative;
  z-index: 2;
}

.ai-chat-messages::-webkit-scrollbar {
  width: 8px;
}

.ai-chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.ai-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 250, 0.3);
  border-radius: 4px;
}

.ai-chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(167, 139, 250, 0.5);
}

/* Empty State */
.ai-chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 16px;
  color: rgba(255, 255, 255, 0.4);
}

.ai-chat-empty-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.3);
}

.ai-chat-empty-icon svg {
  width: 32px;
  height: 32px;
}

.ai-chat-empty p {
  font-size: 14px;
}

/* Chat Messages */
.ai-chat-message {
  max-width: 85%;
}

.ai-chat-message-user {
  align-self: flex-end;
}

.ai-chat-message-assistant {
  align-self: flex-start;
  width: 100%;
  max-width: 100%;
}

/* Modern Chat Bubbles */
.ai-chat-bubble {
  padding: 24px 28px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.65;
  position: relative;
  max-width: 85%;
  transition: all 0.2s ease;
}

.ai-chat-bubble-user {
  background: linear-gradient(135deg, #252535 0%, #303045 100%);
  color: #e2e2e2;
  border-bottom-right-radius: 6px;
  align-self: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ai-chat-bubble-assistant {
  background: linear-gradient(135deg, #1a1a2a 0%, #202035 100%);
  color: #d1d1d1;
  border-bottom-left-radius: 6px;
  align-self: flex-start;
  border: 1px solid rgba(167, 139, 250, 0.08);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.ai-chat-bubble-user:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ai-chat-bubble-assistant:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(167, 139, 250, 0.1);
}

/* Minimal Agent Header */
.ai-chat-assistant-header {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-chat-agent-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.15);
  border-radius: 16px;
}

.ai-chat-agent-icon {
  font-size: 16px;
  color: #a78bff;
}

.ai-chat-agent-name {
  font-size: 14px;
  font-weight: 500;
  color: #c4b5fd;
  letter-spacing: 0.1px;
}

/* AI Response Content Formatting */
.ai-chat-content {
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.5;
  font-size: 15px;
}

.ai-chat-content p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.5;
}

.ai-chat-content p:last-child {
  margin-bottom: 0;
}

.ai-chat-content strong {
  color: #e0d6ff;
  font-weight: 600;
  background: rgba(167, 139, 250, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.ai-chat-content em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(107, 114, 128, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.ai-chat-content ul,
.ai-chat-content ol {
  margin: 8px 0;
  padding-left: 20px;
}

.ai-chat-content li {
  margin-bottom: 4px;
  line-height: 1.5;
}

.ai-chat-content code {
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Source Code Pro', monospace;
  font-size: 14px;
  color: #c4b5fd;
}

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

.ai-response-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin: 24px 0 16px;
}

.ai-response-heading:first-child {
  margin-top: 0;
}

.ai-heading-icon {
  font-size: 18px;
}

.ai-list-item {
  display: flex;
  gap: 12px;
  margin: 12px 0;
  padding-left: 4px;
}

.ai-list-number {
  flex-shrink: 0;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}

.ai-list-item strong {
  color: white;
}

/* Chat Action Buttons */
.ai-chat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-chat-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-chat-action-btn:hover {
  background: rgba(167, 139, 250, 0.15);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(167, 139, 250, 0.3);
}

.ai-chat-action-btn svg {
  width: 16px;
  height: 16px;
}

.ai-chat-action-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 4px;
}

/* Follow Ups */
.ai-chat-followups {
  margin-top: 20px;
}

.ai-chat-followups-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 10px;
}

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

.ai-chat-followup-btn {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-chat-followup-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(167, 139, 250, 0.3);
  color: white;
}

/* Modern Input Area */
.ai-chat-input-area {
  padding: 24px 32px 32px 32px;
  background: transparent;
  position: relative;
  z-index: 3;
}

.ai-chat-input-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 32px;
  right: 32px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(167, 139, 250, 0.1) 50%, rgba(255, 255, 255, 0.05) 100%);
}

.ai-chat-input-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(20, 20, 35, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ai-chat-input-container:focus-within {
  background: rgba(25, 25, 40, 0.7);
  border-color: rgba(167, 139, 250, 0.2);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(167, 139, 250, 0.1);
}

.ai-chat-input-container:focus-within {
  border-color: rgba(167, 139, 250, 0.5);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}

.ai-chat-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ai-chat-add-btn:hover {
  background: rgba(167, 139, 250, 0.15);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(167, 139, 250, 0.3);
}

.ai-chat-add-btn svg {
  width: 16px;
  height: 16px;
}

.ai-chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  color: white;
}

.ai-chat-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.ai-chat-input:disabled {
  opacity: 0.5;
}

.ai-chat-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}

.ai-chat-send-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #8b4df8 0%, #6d2bc4 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.ai-chat-send-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(124, 58, 237, 0.2);
}

.ai-chat-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ai-chat-send-btn svg {
  width: 18px;
  height: 18px;
}

/* Generated Content Panel */
.ai-generated-panel {
  width: 45%;
  display: flex;
  flex-direction: column;
  background: #12121a;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-generated-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-generated-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: white;
}

.ai-generated-title svg {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.5);
}

.ai-generated-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-generated-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-generated-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(167, 139, 250, 0.3);
}

.ai-generated-action-btn svg {
  width: 14px;
  height: 14px;
}

.ai-generated-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-generated-close-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
}

.ai-generated-close-btn svg {
  width: 18px;
  height: 18px;
}

.ai-generated-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.ai-generated-content::-webkit-scrollbar {
  width: 6px;
}

.ai-generated-content::-webkit-scrollbar-track {
  background: transparent;
}

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

/* Document Content Styles */
.ai-doc-content {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

.ai-doc-h2 {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin: 20px 0 12px;
}

.ai-doc-h2:first-child {
  margin-top: 0;
}

.ai-doc-h3 {
  font-size: 17px;
  font-weight: 600;
  color: white;
  margin: 16px 0 10px;
}

.ai-doc-h4 {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 14px 0 8px;
}

.ai-doc-paragraph {
  margin: 0 0 10px;
  line-height: 1.5;
}

.ai-doc-paragraph:last-child {
  margin-bottom: 0;
}

/* Code Styles */
.ai-generated-code {
  background: #0d0d12;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  font-family: 'Source Code Pro', 'Monaco', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.6;
}

.ai-generated-code code {
  color: #e0e0e0;
}

/* Loading State */
.ai-chat-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

.ai-chat-loading-dots {
  display: flex;
  gap: 4px;
}

.ai-chat-loading-dots span {
  width: 6px;
  height: 6px;
  background: rgba(167, 139, 250, 0.6);
  border-radius: 50%;
  animation: ai-loading-bounce 1.4s ease-in-out infinite both;
}

.ai-chat-loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.ai-chat-loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes ai-loading-bounce {

  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Light Theme for AI Chat */
.light .ai-chat-view {
  background: #f8f9fa;
}

.light .ai-chat-panel {
  background: #f8f9fa;
}

.light .ai-chat-header {
  border-color: rgba(0, 0, 0, 0.08);
}

.light .ai-chat-back-btn {
  color: rgba(0, 0, 0, 0.6);
}

.light .ai-chat-back-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.9);
}

.light .ai-chat-bubble-user {
  background: #e8e8f0;
  color: rgba(0, 0, 0, 0.85);
}

.light .ai-chat-agent-name {
  color: #7c3aed;
}

.light .ai-chat-content {
  color: rgba(0, 0, 0, 0.8);
}

.light .ai-chat-content strong {
  color: rgba(0, 0, 0, 0.9);
}

.light .ai-response-heading {
  color: rgba(0, 0, 0, 0.9);
}

.light .ai-list-number {
  color: rgba(0, 0, 0, 0.4);
}

.light .ai-chat-actions {
  border-color: rgba(0, 0, 0, 0.08);
}

.light .ai-chat-action-btn {
  color: rgba(0, 0, 0, 0.4);
}

.light .ai-chat-action-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.7);
}

.light .ai-chat-followup-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.7);
}

.light .ai-chat-followup-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.9);
}

.light .ai-chat-input-area {
  border-color: rgba(0, 0, 0, 0.08);
}

.light .ai-chat-input-container {
  background: #e8e8f0;
  border-color: rgba(0, 0, 0, 0.1);
}

.light .ai-chat-add-btn {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.5);
}

.light .ai-chat-add-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.7);
}

.light .ai-chat-input {
  color: rgba(0, 0, 0, 0.9);
}

.light .ai-chat-input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.light .ai-generated-panel {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

.light .ai-generated-header {
  border-color: rgba(0, 0, 0, 0.08);
}

.light .ai-generated-title {
  color: rgba(0, 0, 0, 0.9);
}

.light .ai-generated-action-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.8);
}

.light .ai-doc-content {
  color: rgba(0, 0, 0, 0.8);
}

.light .ai-doc-h2,
.light .ai-doc-h3 {
  color: rgba(0, 0, 0, 0.9);
}

.light .ai-generated-code {
  background: #f1f1f5;
  border-color: rgba(0, 0, 0, 0.08);
}

.light .ai-generated-code code {
  color: #1a1a2e;
}

/* Responsive AI Chat */
@media (max-width: 1024px) {
  .ai-chat-view.has-generated-content {
    flex-direction: column;
  }

  .ai-chat-view.has-generated-content .ai-chat-panel {
    width: 100%;
    height: 50%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .ai-generated-panel {
    width: 100%;
    height: 50%;
  }
}

@media (max-width: 768px) {
  .ai-chat-messages {
    padding: 16px;
  }

  .ai-chat-message {
    max-width: 95%;
  }

  .ai-chat-input-area {
    padding: 12px 16px 16px;
  }

  .ai-generated-content {
    padding: 16px;
  }
}

/* ============================================
   TODAY BUTTON & NAVIGATION ARROWS
   ============================================ */
.today-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--glass-bg);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

/* Dark mode: glass background */
[data-mode="dark"] .today-btn {
  background: var(--glass-bg);
}

.today-btn:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary) / 0.15;
}

.today-btn svg {
  width: 16px;
  height: 16px;
}

.schedule-nav-arrows {
  display: flex;
  background: var(--glass-bg);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  overflow: hidden;
}

/* Dark mode: glass background */
[data-mode="dark"] .schedule-nav-arrows {
  background: var(--glass-bg);
}

.nav-arrow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-arrow-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.nav-arrow-btn:first-child {
  border-right: 1px solid var(--border);
}

.nav-arrow-btn svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   TIMEZONE DISPLAY
   ============================================ */
.timezone-display {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--glass-bg);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

/* Dark mode: glass background */
[data-mode="dark"] .timezone-display {
  background: var(--glass-bg);
}

.timezone-display:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  color: var(--foreground);
}

.timezone-display svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.timezone-modal-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-select-large {
  padding: 12px 14px;
  font-size: 14px;
}

.form-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted-foreground);
}

.timezone-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.tz-preview-title {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tz-preview-times {
  display: flex;
  gap: 16px;
}

.tz-preview-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 16px;
  background: var(--background);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.tz-preview-item.primary {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.05);
}

.tz-label {
  font-size: 11px;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tz-time {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
}

/* ============================================
   SMART SCHEDULING MODAL
   ============================================ */
.smart-schedule-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  color: #22c55e;
  cursor: pointer;
  transition: all 0.2s ease;
}

.smart-schedule-btn:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(16, 185, 129, 0.2) 100%);
  border-color: rgba(34, 197, 94, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.smart-schedule-btn svg {
  width: 18px;
  height: 18px;
}

.smart-schedule-modal {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.smart-schedule-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.smart-schedule-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  color: #22c55e;
}

.smart-schedule-icon svg {
  width: 24px;
  height: 24px;
}

.smart-schedule-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
}

.smart-schedule-header p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted-foreground);
}

.smart-schedule-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.duration-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.duration-chip {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.duration-chip:hover {
  border-color: var(--primary);
  color: var(--foreground);
}

.duration-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.date-range-inputs,
.time-range-inputs {
  display: flex;
  align-items: center;
  gap: 12px;
}

.date-separator,
.time-separator {
  color: var(--muted-foreground);
  font-size: 13px;
}

.available-slots-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

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

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

.slots-count {
  font-size: 12px;
  color: var(--muted-foreground);
  background: var(--background);
  padding: 4px 10px;
  border-radius: 12px;
}

.available-slots-list {
  max-height: 300px;
  overflow-y: auto;
}

.slots-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--muted-foreground);
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.available-slot-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}

.available-slot-card:hover {
  background: var(--surface-hover);
}

.available-slot-card:last-child {
  border-bottom: none;
}

.slot-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 60px;
}

.slot-day-name {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted-foreground);
  letter-spacing: 0.5px;
}

.slot-day-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.2;
}

.slot-month {
  font-size: 10px;
  color: var(--muted-foreground);
}

.slot-time-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slot-time-range {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.slot-duration {
  font-size: 12px;
  color: var(--muted-foreground);
}

.slot-select-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--primary);
  border: none;
  border-radius: 6px;
  color: var(--primary-foreground);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  opacity: 0;
}

.available-slot-card:hover .slot-select-btn {
  opacity: 1;
}

.slot-select-btn:hover {
  transform: scale(1.05);
}

.slot-select-btn svg {
  width: 14px;
  height: 14px;
}

.no-slots-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  color: var(--muted-foreground);
}

.no-slots-message svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.no-slots-message p {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
  margin: 0 0 4px;
}

.no-slots-message span {
  font-size: 12px;
}

/* Light mode adjustments */
.light .today-btn {
  background: var(--surface);
  border-color: var(--border);
}

.light .smart-schedule-btn {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .schedule-header-left {
    flex-wrap: wrap;
    gap: 8px;
  }

  .today-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .today-btn span {
    display: none;
  }

  .timezone-display span {
    display: none;
  }

  .smart-schedule-btn {
    width: 32px;
    height: 32px;
  }

  .duration-chips {
    gap: 6px;
  }

  .duration-chip {
    padding: 6px 12px;
    font-size: 12px;
  }

  .date-range-inputs,
  .time-range-inputs {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .date-separator,
  .time-separator {
    text-align: center;
  }
}

/* ============================================
   ADVANCED PROJECT DETAIL - Linear-Inspired Design
   Completely Redesigned UI/UX
   ============================================ */

.project-detail-advanced {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  padding: var(--sidebar-inset);
  background: transparent;
}

.pd-inner-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  position: relative;
  animation: containerFadeIn 0.4s ease-out;
}

/* Header */
.pd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
  gap: 16px;
  z-index: 10;
}

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

.pd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-breadcrumb-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  border: none;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
}

.pd-breadcrumb-btn:hover {
  background: var(--surface-hover);
}

.pd-breadcrumb-icon {
  color: var(--primary);
}

.pd-breadcrumb-arrow {
  width: 14px;
  height: 14px;
  color: var(--muted-foreground);
}

.pd-breadcrumb-current {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--surface);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
}

.pd-project-icon-mini {
  color: var(--primary);
  font-size: 12px;
}

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

.pd-star-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.pd-star-btn svg {
  width: 16px;
  height: 16px;
}

.pd-star-btn svg[fill="currentColor"] {
  color: #fbbf24;
}

/* Tabs */
.pd-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

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

.pd-tab svg {
  width: 16px;
  height: 16px;
}

.pd-tab:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.pd-tab.active {
  background: var(--surface);
  color: var(--foreground);
}

/* Header Right Actions */
.pd-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-action-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
}

.pd-action-btn svg {
  width: 16px;
  height: 16px;
}

.pd-action-btn:hover {
  background: var(--surface-hover);
  border-color: var(--muted-foreground);
  color: var(--foreground);
}

.pd-action-btn.pd-action-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

.pd-action-btn.pd-action-warning {
  color: #f59e0b;
  border-color: #f59e0b;
}

.pd-action-btn.pd-action-warning:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  color: #f59e0b;
}

/* Layout Grid */
.pd-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  flex: 1;
  overflow: hidden;
  transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pd-layout.sidebar-collapsed {
  grid-template-columns: 1fr 0;
}

/* Main Content */
.pd-main {
  overflow-y: auto;
  background: transparent;
}

.pd-content-scroll {
  padding: 32px 40px;
  max-width: 800px;
  margin: 0 auto;
}

/* Timeline tab - full width layout */
.pd-content-scroll.timeline-full-width {
  max-width: 100%;
  padding: 32px 24px;
}

/* Title Section */
.pd-title-section {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  position: relative;
}

.pd-project-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: inherit;
  flex-shrink: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
  position: relative;
}

.pd-project-icon:hover {
  transform: scale(1.05);
  background-color: var(--muted);
}

.pd-icon-picker {
  position: fixed;
  z-index: 10050;
  width: 352px;
  max-width: calc(100vw - 24px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.pd-icon-picker .pd-emoji-picker {
  width: 100%;
  height: 420px;
}

.pd-icon-tip {
  position: absolute;
  top: 50%;
  right: calc(100% + 12px);
  transform: translateY(-50%);
  background: var(--surface);
  color: var(--foreground);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  white-space: nowrap;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 10;
}

.pd-icon-tip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid var(--border);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.pd-title-content {
  flex: 1;
  min-width: 0;
}

.pd-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--foreground);
  margin: 0 0 6px 0;
  outline: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

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

.pd-summary {
  font-size: 14px;
  color: var(--muted-foreground);
  margin: 0;
  outline: none;
}

.pd-summary:empty:before {
  content: 'Add a short summary...';
  color: var(--muted-foreground);
}

/* Properties Bar */
.pd-properties-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.pd-props-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-right: 8px;
}

.pd-prop-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.pd-prop-chip:hover {
  border-color: var(--muted-foreground);
  background: var(--surface-hover);
}

.pd-prop-chip svg {
  width: 14px;
  height: 14px;
  color: var(--muted-foreground);
}

.pd-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.pd-chip-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pd-chip-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-date-arrow {
  color: var(--muted-foreground);
  font-size: 12px;
}

.pd-team-icon {
  color: var(--primary);
}

.pd-more-props {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  border-radius: 6px;
}

.pd-more-props svg {
  width: 14px;
  height: 14px;
}

/* Priority Dropdown in prop chip */
.pd-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pd-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.pd-dropdown-header {
  padding: 10px 14px;
  font-size: 11px;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pd-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--foreground);
  cursor: pointer;
  transition: background 0.1s;
}

.pd-dropdown-item:hover {
  background: var(--surface-hover);
}

.pd-priority-icon {
  width: 18px;
  text-align: center;
  font-weight: 600;
}

.pd-priority-icon.urgent {
  color: #ef4444;
}

.pd-priority-icon.high {
  color: #f59e0b;
}

.pd-priority-icon.medium {
  color: #3b82f6;
}

.pd-priority-icon.low {
  color: #22c55e;
}

.pd-priority-icon.none {
  color: var(--muted-foreground);
}

.pd-key {
  margin-left: auto;
  padding: 2px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 10px;
  color: var(--muted-foreground);
  font-family: monospace;
}

/* Resources Section */
.pd-resources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.pd-resources-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-right: 8px;
}

.pd-add-resource {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.pd-add-resource:hover {
  border-color: var(--muted-foreground);
  background: var(--surface);
}

.pd-add-resource svg {
  width: 12px;
  height: 12px;
}

.pd-resource-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--foreground);
}

.pd-resource-item svg {
  width: 14px;
  height: 14px;
  color: var(--muted-foreground);
}

.pd-resource-remove {
  margin-left: 4px;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.pd-resource-remove:hover {
  color: #ef4444;
}

/* Inline Resource Form Container - Dropdown Style */
.pd-resource-form-container {
  position: absolute;
  top: 100%;
  left: 0;
  width: 280px;
  margin-top: 8px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: slideDown 0.2s ease-out;
  z-index: 1000;
}

/* Dropdown arrow indicator */
.pd-resource-form-container::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--border);
  z-index: 1001;
}

.pd-resource-form-container::after {
  content: '';
  position: absolute;
  top: -7px;
  left: 21px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid var(--surface);
  z-index: 1002;
}

/* Improve dropdown positioning */
.pd-resources {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pd-resource-form-container .form-group {
  margin-bottom: 16px;
}

.pd-resource-form-container .form-group:last-child {
  margin-bottom: 0;
}

.pd-resource-form-container .form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pd-resource-form-container .form-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--foreground);
  font-size: 14px;
  transition: all 0.15s;
}

.pd-resource-form-container .form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.pd-resource-form-container .form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.pd-resource-form-container .btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
}

.pd-resource-form-container .btn.btn-secondary {
  background: var(--surface);
  color: var(--foreground);
  border: 1px solid var(--border);
}

.pd-resource-form-container .btn.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--muted-foreground);
}

.pd-resource-form-container .btn.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.pd-resource-form-container .btn.btn-primary:hover {
  opacity: 0.9;
}

/* Radio button styles */
.pd-resource-form-container .radio-group {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.pd-resource-form-container .radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--foreground);
  cursor: pointer;
}

.pd-resource-form-container .radio-label input[type="radio"] {
  margin: 0;
  width: auto;
  accent-color: var(--primary);
}

/* Resource link styles */
.pd-resource-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.pd-resource-link:hover {
  text-decoration: underline;
}

/* Latest Update Card */
.pd-update-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 24px;
}

.pd-update-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.pd-update-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.pd-new-update-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.pd-new-update-btn svg {
  width: 14px;
  height: 14px;
}

.pd-new-update-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.pd-update-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.pd-update-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.pd-update-status.on-track {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.pd-update-status.in-progress {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.pd-update-status.completed {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
}

.pd-status-check {
  font-size: 10px;
}

.pd-update-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-author-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
}

.pd-update-time {
  font-size: 12px;
  color: var(--muted-foreground);
}

.pd-update-text {
  font-size: 14px;
  color: var(--foreground);
  line-height: 1.6;
  margin: 0 0 14px 0;
}

.pd-update-actions {
  display: flex;
  gap: 8px;
}

.pd-action-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.pd-action-icon svg {
  width: 16px;
  height: 16px;
}

.pd-action-icon:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

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

.pd-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-foreground);
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pd-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.pd-description-editor {
  width: 100%;
  min-height: 80px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--foreground);
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  transition: border-color 0.2s;
}

.pd-description-editor:focus {
  border-color: var(--primary);
}

.pd-description-editor:empty:before {
  content: attr(data-placeholder);
  color: var(--muted-foreground);
}

/* pd-milestone styles removed */

.pd-empty-state {
  padding: 20px;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 13px;
}

.pd-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.15s;
}

.pd-add-btn svg {
  width: 14px;
  height: 14px;
}

.pd-add-btn:hover {
  color: var(--foreground);
}

.pd-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.pd-btn-secondary svg {
  width: 14px;
  height: 14px;
}

.pd-btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--muted-foreground);
}

/* ============================================
   PREMIUM PROJECT DETAILS KANBAN BOARD
   Modern glass-morphism professional design
   ============================================ */

.pd-kanban-section {
  margin-top: 24px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--card) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.pd-kanban-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
  border-bottom: 1px solid var(--border);
}

.pd-kanban-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pd-kanban-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.pd-kanban-icon svg {
  width: 18px;
  height: 18px;
  color: #3b82f6;
}

.pd-kanban-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

.pd-kanban-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: var(--accent);
  padding: 4px 10px;
  border-radius: 12px;
}

.pd-kanban-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-kanban-add-col-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #3b82f6;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pd-kanban-add-col-btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.pd-kanban-add-col-btn svg {
  width: 14px;
  height: 14px;
}

/* Main Kanban Board */
.pd-kanban {
  display: flex;
  gap: 16px;
  padding: 24px;
  overflow-x: auto;
  min-height: 300px;
}

.pd-kanban::-webkit-scrollbar {
  height: 8px;
}

.pd-kanban::-webkit-scrollbar-track {
  background: var(--accent);
  border-radius: 4px;
}

.pd-kanban::-webkit-scrollbar-thumb {
  background: var(--muted-foreground);
  border-radius: 4px;
}

.pd-kanban::-webkit-scrollbar-thumb:hover {
  background: var(--foreground);
}

/* Kanban Column */
.pd-kanban-col {
  flex-shrink: 0;
  width: 300px;
  min-width: 280px;
  max-width: 320px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.pd-kanban-col:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.pd-kanban-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.pd-kanban-col-indicator {
  width: 4px;
  height: 24px;
  border-radius: 2px;
  flex-shrink: 0;
}

.pd-kanban-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
  flex: 1;
  outline: none;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.pd-kanban-title:focus {
  background: var(--accent);
}

.pd-kanban-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-kanban-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: var(--accent);
  padding: 2px 8px;
  border-radius: 8px;
}

.pd-kanban-col-progress {
  width: 40px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  overflow: hidden;
}

.pd-kanban-col-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.pd-kanban-del {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  border-radius: 6px;
  opacity: 0;
  transition: all 0.15s;
}

.pd-kanban-col:hover .pd-kanban-del {
  opacity: 1;
}

.pd-kanban-del:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.pd-kanban-del svg {
  width: 14px;
  height: 14px;
}

/* Tasks Container */
.pd-kanban-tasks {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  overflow-y: auto;
  max-height: 400px;
}

.pd-kanban-tasks::-webkit-scrollbar {
  width: 6px;
}

.pd-kanban-tasks::-webkit-scrollbar-track {
  background: transparent;
}

.pd-kanban-tasks::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* Task Card - Premium Style */
.pd-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: grab;
  transition: all 0.2s ease;
  position: relative;
}

.pd-task:hover {
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.pd-task:active {
  cursor: grabbing;
}

.pd-task.done {
  opacity: 0.6;
}

.pd-task.done .pd-task-title {
  text-decoration: line-through;
  color: var(--muted-foreground);
}

/* Task completer avatar */
.pd-task-completer-avatar {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--background);
  overflow: hidden;
  z-index: 1;
}

.pd-task-completer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Task Checkbox - Premium Style */
.pd-task-check {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.pd-task-check input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 1;
}

.pd-checkmark {
  position: absolute;
  inset: 0;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pd-checkmark svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  color: white;
  transition: opacity 0.15s;
}

.pd-task-check input:checked+.pd-checkmark {
  background: var(--check-color, var(--primary));
  border-color: var(--check-color, var(--primary));
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.pd-task-check input:checked+.pd-checkmark svg {
  opacity: 1;
}

/* Task Title */
.pd-task-title {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  outline: none;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s;
  line-height: 1.4;
}

.pd-task-title:focus {
  background: var(--accent);
}

/* Priority Badges */
.pd-task-priority {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.pd-priority-high {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.pd-priority-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.pd-priority-low {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

/* Task Delete Button */
.pd-task-del {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  border-radius: 6px;
  opacity: 0;
  transition: all 0.15s;
}

.pd-task:hover .pd-task-del {
  opacity: 1;
}

.pd-task-del:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.pd-task-del svg {
  width: 14px;
  height: 14px;
}

/* Add Task Button - Premium Style */
.pd-kanban-add-task {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  margin: 12px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pd-kanban-add-task:hover {
  background: var(--accent);
  border-color: var(--primary);
  color: var(--foreground);
  border-style: solid;
}

.pd-kanban-add-task svg {
  width: 14px;
  height: 14px;
}

/* Light mode adjustments */
.light .pd-kanban-section,
[data-mode="light"] .pd-kanban-section {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.light .pd-task:hover,
[data-mode="light"] .pd-task:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* ============================================
   MOBILE RESPONSIVE - Projects Workspace & Details
   ============================================ */

@media (max-width: 768px) {
  
  /* ============================================
     Projects Workspace Grid
     ============================================ */
  
  .workspace-projects-grid {
    display: flex;
    flex-direction: column;
    gap: var(--mobile-card-gap);
    padding: 0 var(--mobile-side-padding);
    padding-bottom: var(--mobile-content-padding-bottom);
  }

  .workspace-project-card {
    border-radius: 16px;
    margin: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .workspace-project-card:active {
    transform: scale(0.98);
  }

  .workspace-card-header {
    padding: 16px 16px 0;
    gap: 12px;
  }

  .workspace-card-icon {
    width: 48px;
    height: 48px;
    font-size: 32px;
  }

  .workspace-card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
  }

  .workspace-card-description {
    font-size: 12px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .workspace-card-status {
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 12px;
  }

  .workspace-card-actions {
    opacity: 1;
    gap: 6px;
  }

  .workspace-card-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .workspace-card-body {
    padding: 12px 16px 16px;
  }

  .workspace-card-meta {
    gap: 12px;
    margin-bottom: 12px;
  }

  .workspace-meta-item {
    font-size: 11px;
    gap: 4px;
  }

  .workspace-meta-item svg {
    width: 12px;
    height: 12px;
  }

  .workspace-card-progress {
    margin-bottom: 12px;
  }

  .workspace-progress-header {
    font-size: 11px;
    margin-bottom: 6px;
  }

  .workspace-progress-bar {
    height: 6px;
    border-radius: 3px;
  }

  .workspace-card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 8px;
  }

  .workspace-card-tags {
    gap: 6px;
    flex-wrap: wrap;
  }

  .workspace-tag {
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 6px;
  }

  /* ============================================
     Project Details - Premium Kanban
     ============================================ */
  
  .pd-kanban-section {
    margin-top: 16px;
    border-radius: 16px;
    margin-left: var(--mobile-side-padding);
    margin-right: var(--mobile-side-padding);
  }

  .pd-kanban-section-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    flex-wrap: wrap;
  }

  .pd-kanban-title-group {
    gap: 10px;
  }

  .pd-kanban-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .pd-kanban-icon svg {
    width: 16px;
    height: 16px;
  }

  .pd-kanban-section-title {
    font-size: 15px;
    font-weight: 600;
  }

  .pd-kanban-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  .pd-kanban-actions {
    gap: 6px;
  }

  .pd-kanban-add-col-btn {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 8px;
  }

  .pd-kanban-add-col-btn svg {
    width: 12px;
    height: 12px;
  }

  .pd-kanban {
    padding: 12px;
    gap: 10px;
    padding-bottom: calc(var(--mobile-nav-height) + 20px);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .pd-kanban::-webkit-scrollbar {
    display: none;
  }

  .pd-kanban-col {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    border-radius: 12px;
  }

  .pd-kanban-header {
    padding: 12px 14px;
    gap: 8px;
  }

  .pd-kanban-col-indicator {
    width: 3px;
    height: 20px;
  }

  .pd-kanban-title {
    font-size: 13px;
    font-weight: 600;
  }

  .pd-kanban-count {
    font-size: 10px;
    padding: 2px 6px;
  }

  .pd-kanban-col-progress {
    width: 32px;
  }

  .pd-kanban-del {
    opacity: 1;
    width: 26px;
    height: 26px;
  }

  .pd-kanban-tasks {
    padding: 10px;
    gap: 8px;
    max-height: 300px;
  }

  .pd-task {
    padding: 10px 12px;
    border-radius: 10px;
    gap: 8px;
  }

  .pd-task:active {
    transform: scale(0.98);
  }

  .pd-task-check {
    width: 18px;
    height: 18px;
  }

  .pd-checkmark {
    border-radius: 5px;
    border-width: 1.5px;
  }

  .pd-checkmark svg {
    width: 10px;
    height: 10px;
  }

  .pd-task-title {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
  }

  .pd-task-priority {
    font-size: 8px;
    padding: 2px 5px;
    border-radius: 3px;
  }

  .pd-task-del {
    opacity: 1;
    width: 24px;
    height: 24px;
  }

  .pd-kanban-add-task {
    padding: 10px 12px;
    margin: 10px;
    font-size: 12px;
    border-radius: 8px;
    gap: 6px;
  }

  .pd-kanban-add-task svg {
    width: 12px;
    height: 12px;
  }

  /* ============================================
     Project Detail Main Container
     ============================================ */
  
  .project-detail {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .project-detail-main {
    flex: 1;
    padding: var(--mobile-side-padding);
    padding-top: 16px;
    padding-bottom: var(--mobile-content-padding-bottom);
  }

  .project-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    flex-wrap: nowrap;
  }

  .back-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all 0.15s ease;
  }

  .back-btn:active {
    transform: scale(0.95);
    background: var(--surface-hover);
  }

  .back-btn svg {
    width: 18px;
    height: 18px;
  }

  .project-detail-title {
    font-size: 18px;
    font-weight: 700;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  .project-detail-sidebar {
    display: none;
  }

  /* ============================================
     Project Info Bar
     ============================================ */
  
  .project-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
    background: var(--surface);
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
  }

  .project-status-badge {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 8px;
  }

  .project-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--muted-foreground);
  }

  .project-meta-item svg {
    width: 12px;
    height: 12px;
  }

  /* ============================================
     Kanban Board - Legacy Support
     ============================================ */
  
  .kanban-board {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 4px;
    padding-bottom: var(--mobile-nav-height);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .kanban-board::-webkit-scrollbar {
    display: none;
  }

  .kanban-column {
    width: 260px;
    min-width: 260px;
    border-radius: 14px;
  }

  .kanban-column-header {
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
  }

  .kanban-column-header .column-count {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 8px;
  }

  .kanban-tasks {
    padding: 10px;
    gap: 8px;
  }

  .kanban-task {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
  }

  .kanban-task .task-title {
    font-size: 13px;
    font-weight: 500;
  }

  .kanban-add-task {
    padding: 10px 14px;
    font-size: 12px;
    margin: 8px 10px 10px;
    border-radius: 10px;
  }

  /* ============================================
     Project Actions Mobile
     ============================================ */
  
  .project-actions-mobile {
    position: fixed;
    bottom: calc(var(--mobile-total-bottom) + 12px);
    left: var(--mobile-side-padding);
    right: var(--mobile-side-padding);
    display: flex;
    gap: 10px;
    z-index: 100;
  }

  .project-actions-mobile .btn {
    flex: 1;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
  }

  /* ============================================
     Project Detail - Minimal Layout
     ============================================ */
  
  .project-detail-minimal {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .project-detail-minimal .project-detail-main {
    max-width: 100%;
    padding: var(--mobile-side-padding);
    padding-bottom: var(--mobile-content-padding-bottom);
  }

  .project-detail-minimal .project-detail-header {
    padding: 16px 0;
    margin-bottom: 12px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .project-detail-minimal .back-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .project-detail-minimal .project-detail-title {
    font-size: 18px;
    font-weight: 700;
  }

  .project-detail-minimal .project-detail-meta {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* ============================================
     Project Detail - Linear Layout
     ============================================ */
  
  .project-detail.linear-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .project-detail.linear-layout .project-detail-main {
    padding: var(--mobile-side-padding);
    padding-bottom: var(--mobile-content-padding-bottom);
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .project-detail-header-linear {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 0;
  }

  .project-detail-header-linear .project-detail-title {
    font-size: 18px;
    font-weight: 700;
  }

  /* ============================================
     Project Detail - Advanced Layout
     ============================================ */
  
  .project-detail-advanced {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .project-detail-advanced .project-detail-header {
    padding: 16px var(--mobile-side-padding);
    flex-direction: row;
    align-items: center;
  }

  .project-detail-advanced .project-detail-content {
    padding: var(--mobile-side-padding);
    padding-bottom: var(--mobile-content-padding-bottom);
  }
}

/* ============================================
   Extra Small Screens (480px and below)
   ============================================ */

@media (max-width: 480px) {
  
  /* Projects Workspace */
  .workspace-projects-grid {
    gap: 12px;
    padding: 0 14px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px) + 16px);
  }

  .workspace-card-header {
    padding: 14px 14px 0;
    gap: 10px;
  }

  .workspace-card-icon {
    width: 40px;
    height: 40px;
    font-size: 26px;
  }

  .workspace-card-title {
    font-size: 14px;
  }

  .workspace-card-description {
    font-size: 11px;
  }

  .workspace-card-status {
    padding: 3px 6px;
    font-size: 9px;
  }

  .workspace-card-action-btn {
    width: 28px;
    height: 28px;
  }

  .workspace-card-body {
    padding: 10px 14px 14px;
  }

  .workspace-card-meta {
    gap: 10px;
    margin-bottom: 10px;
  }

  .workspace-meta-item {
    font-size: 10px;
  }

  .workspace-progress-bar {
    height: 5px;
  }

  .workspace-tag {
    padding: 3px 6px;
    font-size: 9px;
  }

  /* Premium Kanban */
  .pd-kanban-section {
    margin-left: 14px;
    margin-right: 14px;
    border-radius: 14px;
  }

  .pd-kanban-section-header {
    padding: 12px 14px;
  }

  .pd-kanban-icon {
    width: 28px;
    height: 28px;
  }

  .pd-kanban-section-title {
    font-size: 14px;
  }

  .pd-kanban {
    padding: 10px;
    gap: 8px;
  }

  .pd-kanban-col {
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    border-radius: 10px;
  }

  .pd-kanban-header {
    padding: 10px 12px;
  }

  .pd-kanban-title {
    font-size: 12px;
  }

  .pd-kanban-tasks {
    padding: 8px;
    gap: 6px;
  }

  .pd-task {
    padding: 8px 10px;
    border-radius: 8px;
    gap: 6px;
  }

  .pd-task-check {
    width: 16px;
    height: 16px;
  }

  .pd-task-title {
    font-size: 11px;
  }

  .pd-task-priority {
    font-size: 7px;
    padding: 2px 4px;
  }

  .pd-task-del {
    width: 22px;
    height: 22px;
  }

  .pd-kanban-add-task {
    padding: 8px 10px;
    margin: 8px;
    font-size: 11px;
  }

  /* Project Detail */
  .project-detail-main {
    padding: 14px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px) + 16px);
  }

  .project-detail-header {
    gap: 10px;
    padding-bottom: 14px;
    margin-bottom: 14px;
  }

  .back-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .back-btn svg {
    width: 16px;
    height: 16px;
  }

  .project-detail-title {
    font-size: 16px;
  }

  .project-info-bar {
    padding: 10px 12px;
    gap: 6px;
    border-radius: 10px;
  }

  .project-status-badge {
    padding: 5px 10px;
    font-size: 10px;
  }

  /* Legacy Kanban */
  .kanban-column {
    width: 240px;
    min-width: 240px;
    border-radius: 12px;
  }

  .kanban-column-header {
    padding: 10px 12px;
    font-size: 12px;
  }

  .kanban-task {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
  }

  .kanban-add-task {
    padding: 8px 12px;
    font-size: 11px;
    margin: 6px 8px 8px;
  }

  /* Project Actions */
  .project-actions-mobile {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px) + 10px);
    left: 14px;
    right: 14px;
    gap: 8px;
  }

  .project-actions-mobile .btn {
    padding: 12px 14px;
    font-size: 13px;
    border-radius: 10px;
  }
}

/* Add Task Input - Hidden by default */
.pd-add-task {
  margin: 0 12px 12px 12px;
}

.pd-add-task input {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  outline: none;
  transition: all 0.2s ease;
}

.pd-add-task input::placeholder {
  color: var(--muted-foreground);
}

.pd-add-task input:focus {
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Sidebar */
.pd-sidebar {
  background: var(--card);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 20px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  transform: translateX(0);
  opacity: 1;
}

.pd-sidebar.collapsed {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

.pd-sidebar-section {
  margin-bottom: 24px;
}

.pd-sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.pd-sidebar-header span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pd-sidebar-expand {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  font-size: 10px;
  cursor: pointer;
}

.pd-sidebar-add,
.pd-see-all {
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s;
}

.pd-sidebar-add:hover,
.pd-see-all:hover {
  color: var(--foreground);
}

.pd-see-all {
  color: var(--primary);
}

/* Properties List in Sidebar */
.pd-props-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pd-prop-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  min-height: 44px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}

.pd-members-list {
  display: flex;
  flex-direction: row;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  flex-wrap: wrap;
  min-height: 32px;
  margin-right: 8px;
}

.pd-member-item {
  display: flex;
  align-items: center;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  margin-right: 2px;
}

.pd-member-item:hover {
  transform: translateY(-1px);
}

.pd-member-item:hover .pd-member-avatar {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(255, 255, 255, 0.9);
}

.pd-member-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: white;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}

.pd-member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.pd-member-name {
  display: none;
}

.pd-member-status {
  display: none;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
  animation: statusPulse 1.5s ease-in-out infinite;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.status-dot.offline {
  background: #6b7280;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

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

@keyframes statusPulse {

  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
    transform: scale(1.1);
  }
}

.pd-prop-label {
  font-size: 12px;
  color: var(--muted-foreground);
}

.pd-prop-value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--foreground);
  background: transparent;
  border: none;
  cursor: default;
}

.pd-prop-value svg {
  width: 14px;
  height: 14px;
  color: var(--muted-foreground);
}

.pd-prop-value.clickable {
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-weight: 500;
  /* Ensure consistent height and alignment */
  min-height: 32px;
  box-sizing: border-box;
}

.pd-prop-value.clickable:hover {
  background: var(--surface-hover);
  transform: translateY(-0.5px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border-radius: 6px;
}

.pd-prop-value.muted {
  color: var(--muted-foreground);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  /* Maintain consistent dimensions with clickable buttons */
  min-height: 32px;
  box-sizing: border-box;
}

.pd-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.pd-mini-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-team-badge {
  padding: 3px 10px;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
}

/* Sidebar Milestones - Removed */

/* Activity Feed */
.pd-activity-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.pd-activity-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pd-activity-item {
  display: flex;
  gap: 12px;
}

.pd-activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pd-activity-icon svg {
  width: 14px;
  height: 14px;
  color: var(--muted-foreground);
}

.pd-activity-icon.status svg {
  color: #f59e0b;
}

.pd-activity-icon.date svg {
  color: #3b82f6;
}

.pd-activity-icon.priority svg {
  color: #ef4444;
}

.pd-activity-icon.milestone svg {
  color: #22c55e;
}

.pd-activity-icon.task svg {
  color: #8b5cf6;
}

.pd-activity-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.pd-activity-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-activity-content {
  flex: 1;
  min-width: 0;
}

.pd-activity-text {
  font-size: 12px;
  color: var(--foreground);
  margin: 0 0 4px 0;
  line-height: 1.4;
}

.pd-activity-text strong {
  color: var(--foreground);
}

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

/* Toast */
.pd-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  font-size: 13px;
  color: var(--foreground);
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pd-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .pd-layout {
    grid-template-columns: 1fr;
  }

  .pd-sidebar {
    display: none;
  }

  .pd-tabs {
    display: none;
  }
}

@media (max-width: 768px) {
  .pd-header {
    padding: 10px 12px;
    flex-wrap: wrap;
  }

  .pd-breadcrumb {
    flex-wrap: wrap;
  }

  .pd-content-scroll {
    padding: 20px 16px;
  }

  .pd-title {
    font-size: 22px;
  }

  .pd-properties-bar {
    gap: 6px;
  }

  .pd-prop-chip {
    padding: 5px 10px;
    font-size: 11px;
  }

  .pd-kanban {
    gap: 12px;
  }

  .pd-kanban-col {
    min-width: 260px;
  }
}

/* ============================================
   LINEAR-STYLE TIMELINE - Minimalistic & Advanced
   ============================================ */

/* Timeline Header */
.tl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-shrink: 0;
}

.tl-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.tl-title svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

/* View Mode Tabs */
.tl-view-tabs {
  display: flex;
  background: var(--surface);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.tl-view-tab {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.tl-view-tab:hover {
  color: var(--foreground);
}

.tl-view-tab.active {
  background: var(--background);
  color: var(--foreground);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tl-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.tl-header-btn:hover {
  background: var(--surface);
  color: var(--foreground);
  border-color: var(--muted-foreground);
}

.tl-header-btn svg {
  width: 16px;
  height: 16px;
}


/* Timeline Navigation */
.tl-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}


.tl-today-btn {
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.tl-today-btn:hover {
  background: var(--accent);
  color: var(--foreground);
}

/* Timeline Body */
.tl-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Left Panel - Task List */
.tl-left-panel {
  width: 320px;
  min-width: 280px;
  max-width: 400px;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  resize: horizontal;
  overflow: hidden;
}

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

.tl-left-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tl-filter-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--muted-foreground);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.tl-filter-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.tl-filter-btn svg {
  width: 14px;
  height: 14px;
}

.tl-task-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

/* Task Items */
.tl-task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 4px;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.tl-task-item:hover {
  background: var(--surface);
}

.tl-task-item.selected {
  background: var(--accent);
}

.tl-task-item.critical {
  border-left: 3px solid #ef4444;
  padding-left: 9px;
}

.tl-task-status {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tl-task-content {
  flex: 1;
  min-width: 0;
}

.tl-task-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.tl-task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted-foreground);
}

.tl-task-dates {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tl-task-dates svg {
  width: 10px;
  height: 10px;
  opacity: 0.6;
}

.tl-task-priority {
  display: flex;
  align-items: center;
  gap: 3px;
}

.tl-priority-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.tl-priority-dot.urgent {
  background: #ef4444;
}

.tl-priority-dot.high {
  background: #f97316;
}

.tl-priority-dot.medium {
  background: #eab308;
}

.tl-priority-dot.low {
  background: #6b7280;
}

.tl-task-assignee {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

/* Right Panel - Gantt Chart */
.tl-right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--background);
}

/* Date Header */
.tl-date-header {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  flex-shrink: 0;
  position: relative;
}

.tl-date-header-scroll {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.tl-date-header-scroll::-webkit-scrollbar {
  display: none;
}

/* Date Column Headers - Linear Style */
.tl-date-col {
  min-width: 48px;
  flex-shrink: 0;
  padding: 8px 0 10px;
  text-align: center;
  border-right: 1px dashed rgba(255, 255, 255, 0.06);
  position: relative;
  background: transparent;
}

.tl-date-col.weekend {
  background: rgba(0, 0, 0, 0.1);
}

.tl-date-col.today {
  background: rgba(59, 130, 246, 0.08);
}

.tl-date-col.today::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #3b82f6;
  border-radius: 0 0 2px 2px;
}

.tl-date-day {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.tl-date-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-foreground);
}

.tl-date-col.today .tl-date-num {
  color: var(--primary);
  background: var(--primary) / 0.15;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

/* Month Header Row - Linear Style */
.tl-month-row {
  display: flex;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 0;
}

.tl-month-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 12px;
  white-space: nowrap;
}

.tl-month-cell {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  padding-left: 12px;
}

/* Gantt Grid - Linear Style */
.tl-gantt-wrapper {
  flex: 1;
  overflow: auto;
  position: relative;
  background: var(--background);
}

.tl-gantt-grid {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
}

/* Linear-style Gantt Rows - Swimlanes */
.tl-gantt-row {
  display: flex;
  height: 50px;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.tl-gantt-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.tl-gantt-cell {
  min-width: 48px;
  flex-shrink: 0;
  border-right: 1px dashed rgba(255, 255, 255, 0.06);
  position: relative;
}

.tl-gantt-cell.weekend {
  background: rgba(0, 0, 0, 0.08);
}

.tl-gantt-cell.today {
  background: rgba(59, 130, 246, 0.04);
}

/* Linear-style Bar Rows (Swimlanes) */
.tl-bar-row {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

/* Bar Wrapper - contains everything */
.tl-bar-wrapper {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.15s ease;
  min-height: 60px;
  /* Ensure space for label */
}

.tl-bar-wrapper:hover {
  z-index: 10;
}

.tl-bar-wrapper:hover .tl-bar-body {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

/* Quick Action Buttons on Hover */
.tl-bar-quick-actions {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.15s ease;
  z-index: 20;
}

.tl-bar-wrapper:hover .tl-bar-quick-actions {
  opacity: 1;
  visibility: visible;
}

.tl-bar-quick-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tl-bar-quick-btn svg {
  width: 14px;
  height: 14px;
}

.tl-bar-quick-btn:hover {
  background: var(--surface);
  color: var(--foreground);
  border-color: var(--muted-foreground);
  transform: scale(1.1);
}

/* Complete button hover */
.tl-bar-complete-btn:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
  color: #22c55e;
}

/* Completed state - show filled checkmark */
.tl-bar-wrapper.done .tl-bar-complete-btn,
.tl-bar-wrapper.completed .tl-bar-complete-btn {
  background: #22c55e;
  border-color: #22c55e;
  color: white;
}

/* Edit button hover */
.tl-bar-edit-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
  color: #3b82f6;
}

/* Quick Edit Modal styling */
.quick-edit-modal {
  animation: quickEditIn 0.2s ease-out;
}

@keyframes quickEditIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.quick-edit-color-btn {
  transition: transform 0.15s, box-shadow 0.15s;
}

.quick-edit-color-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.quick-edit-color-btn.active {
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px currentColor;
}

.tl-bar-wrapper.selected .tl-bar-body {
  box-shadow: 0 0 0 2px #3b82f6, 0 4px 16px rgba(59, 130, 246, 0.3);
}

/* Priority indicator line on top */
.tl-bar-priority-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
}

/* Main Bar Body - Linear style dark gray */
.tl-bar-body {
  position: relative;
  height: 36px;
  border-radius: 8px;
  background: #27272a;
  border: 1px solid #3f3f46;
  display: flex;
  align-items: center;
  padding: 0 12px;
  overflow: visible;
  transition: all 0.15s ease;
}

/* Status-based bar colors */
.tl-bar-wrapper.backlog .tl-bar-body {
  background: #1f1f23;
  border-color: #27272a;
}

.tl-bar-wrapper.todo .tl-bar-body {
  background: #27272a;
  border-color: #3f3f46;
}

.tl-bar-wrapper.in-progress .tl-bar-body,
.tl-bar-wrapper.in_progress .tl-bar-body {
  background: #1e3a5f;
  border-color: #2563eb;
}

.tl-bar-wrapper.review .tl-bar-body {
  background: #3b1f5c;
  border-color: #7c3aed;
}

.tl-bar-wrapper.done .tl-bar-body,
.tl-bar-wrapper.completed .tl-bar-body {
  background: #14532d;
  border-color: #22c55e;
  opacity: 0.8;
}

.tl-bar-wrapper.blocked .tl-bar-body {
  background: #450a0a;
  border-color: #dc2626;
}

.tl-bar-wrapper.cancelled .tl-bar-body {
  background: #1f1f23;
  border-color: #27272a;
  opacity: 0.5;
}

/* Overdue state - red gradient on right side */
.tl-bar-wrapper.overdue .tl-bar-body::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.4));
  border-radius: 0 8px 8px 0;
  pointer-events: none;
}

.tl-bar-overdue-indicator {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #dc2626;
  border-radius: 50%;
  border: 2px solid var(--background);
  animation: overdueGlow 2s ease-in-out infinite;
}

@keyframes overdueGlow {

  0%,
  100% {
    box-shadow: 0 0 4px #dc2626;
  }

  50% {
    box-shadow: 0 0 12px #dc2626;
  }
}

/* Critical path styling */
.tl-bar-wrapper.critical-path .tl-bar-body {
  border-color: #f97316;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.3);
}

/* Bar Content */
.tl-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  overflow: hidden;
  gap: 8px;
}

.tl-bar-label {
  font-size: 13px;
  font-weight: 500;
  color: #e4e4e7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: absolute;
  top: -22px;
  left: 0;
  background: rgba(24, 24, 28, 0.95);
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 5;
  min-width: 60px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Right side indicators */
.tl-bar-indicators {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}


.tl-bar-critical-icon {
  font-size: 12px;
}

.tl-bar-assignee {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: white;
}

/* Progress fill inside bar */
.tl-bar-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: rgba(34, 197, 94, 0.25);
  border-radius: 8px 0 0 8px;
  pointer-events: none;
}

/* Resize Handles - Linear style */
.tl-bar-resize {
  position: absolute;
  top: 0;
  width: 10px;
  height: 100%;
  cursor: ew-resize;
  background: transparent;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.15s;
}

.tl-bar-body:hover .tl-bar-resize {
  opacity: 1;
}

.tl-bar-resize.left {
  left: -2px;
  border-radius: 8px 0 0 8px;
}

.tl-bar-resize.right {
  right: -2px;
  border-radius: 0 8px 8px 0;
}

.tl-bar-resize:hover {
  background: rgba(59, 130, 246, 0.3);
}

/* Premium Inline Milestones on bars */
.tl-inline-milestone {
  position: absolute;
  top: -10px;
  transform: translateX(-50%);
  z-index: 30;
}

.tl-mini-diamond {
  width: 9px;
  height: 9px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(230, 230, 235, 0.95) 100%);
  border: 1.5px solid #71717a;
  transform: rotate(45deg);
  border-radius: 1px;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.3),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.5);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tl-mini-diamond:hover {
  transform: rotate(45deg) scale(1.5);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.4),
    0 0 8px rgba(113, 113, 122, 0.5);
}

/* Premium Milestone markers (standalone) */
.tl-milestone-marker {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transform: translateX(-50%);
  transition: all 0.2s ease;
}

.tl-diamond-wrap {
  position: relative;
}

.tl-diamond {
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 50%, #8b5cf6 100%);
  transform: rotate(45deg);
  border-radius: 2px;
  border: 2px solid var(--background);
  box-shadow:
    0 3px 10px rgba(139, 92, 246, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tl-diamond.critical {
  background: linear-gradient(135deg, #f97316 0%, #fb923c 50%, #f97316 100%);
  box-shadow:
    0 3px 10px rgba(249, 115, 22, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.tl-milestone-marker:hover .tl-diamond {
  transform: rotate(45deg) scale(1.3);
  box-shadow:
    0 5px 16px rgba(139, 92, 246, 0.55),
    0 0 12px rgba(139, 92, 246, 0.4);
}

.tl-milestone-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tl-milestone-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--foreground);
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-milestone-date {
  font-size: 10px;
  color: var(--muted-foreground);
}

/* Today line */
.tl-today-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #3b82f6;
  z-index: 50;
  pointer-events: none;
}

.tl-today-badge {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: #3b82f6;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tl-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

/* Grid vertical lines - dotted like Linear */
.tl-grid-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.tl-grid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  border-left: 1px dashed rgba(255, 255, 255, 0.06);
}

.tl-grid-line.weekend {
  background: rgba(0, 0, 0, 0.15);
  width: 48px;
  border-left: none;
}

/* Dragging State */
.tl-bar-wrapper.dragging .tl-bar-body {
  cursor: grabbing;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(59, 130, 246, 0.6);
  transform: scale(1.02);
  opacity: 0.95;
}

.tl-bar-wrapper.resizing .tl-bar-body {
  cursor: ew-resize;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

/* Ghost bar while dragging */
.tl-task-bar-ghost {
  position: absolute;
  height: 36px;
  border-radius: 8px;
  background: var(--accent);
  border: 2px dashed var(--border);
  opacity: 0.4;
  pointer-events: none;
}

/* Column Bar Quick Actions */
.tl-column-bar-actions {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.15s ease;
  z-index: 20;
}

.tl-task-bar.column-bar {
  overflow: visible;
}

.tl-task-bar.column-bar:hover .tl-column-bar-actions {
  opacity: 1;
  visibility: visible;
}

/* Legacy task bar styles (keeping for compatibility) */
.tl-task-bar {
  position: absolute;
  height: 28px;
  top: 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  cursor: grab;
  transition: box-shadow 0.15s, transform 0.15s;
  display: flex;
  align-items: center;
  padding: 0 10px;
  overflow: hidden;
  z-index: 1;
}

.tl-task-bar:hover {
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.tl-task-bar.milestone {
  width: 28px !important;
  height: 28px;
  border-radius: 6px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  padding: 0;
}

/* Task Bar Colors */
.tl-task-bar.color-blue {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.tl-task-bar.color-purple {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.tl-task-bar.color-pink {
  background: linear-gradient(135deg, #ec4899, #f472b6);
}

.tl-task-bar.color-red {
  background: linear-gradient(135deg, #ef4444, #f87171);
}

.tl-task-bar.color-orange {
  background: linear-gradient(135deg, #f97316, #fb923c);
}

.tl-task-bar.color-yellow {
  background: linear-gradient(135deg, #eab308, #facc15);
}

.tl-task-bar.color-green {
  background: linear-gradient(135deg, #22c55e, #4ade80);
}

.tl-task-bar.color-teal {
  background: linear-gradient(135deg, #14b8a6, #2dd4bf);
}

.tl-task-bar.color-cyan {
  background: linear-gradient(135deg, #06b6d4, #22d3ee);
}

/* Today Line */
.tl-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #3b82f6;
  z-index: 10;
  pointer-events: none;
}

.tl-today-line::before {
  content: 'Today';
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  background: #3b82f6;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}



/* Empty State */
.tl-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 48px;
  text-align: center;
}

.tl-empty-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  color: var(--muted-foreground);
  opacity: 0.4;
}

.tl-empty-icon svg {
  width: 100%;
  height: 100%;
}

.tl-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}

.tl-empty-desc {
  font-size: 13px;
  color: var(--muted-foreground);
  max-width: 280px;
  margin-bottom: 20px;
}

.tl-empty-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.tl-empty-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.tl-empty-btn svg {
  width: 16px;
  height: 16px;
}

/* Progress Overlay */
.tl-progress-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(16, 185, 129, 0.2);
  border-radius: 6px 0 0 6px;
  pointer-events: none;
}

/* Zoom Controls */
.tl-zoom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border-radius: 6px;
  padding: 2px;
}

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

.tl-zoom-btn:hover {
  background: var(--background);
  color: var(--foreground);
}

.tl-zoom-btn svg {
  width: 14px;
  height: 14px;
}

.tl-zoom-level {
  font-size: 11px;
  color: var(--muted-foreground);
  min-width: 36px;
  text-align: center;
}

/* Task Quick Add */
.tl-quick-add {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.tl-quick-add-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--foreground);
  font-size: 13px;
  outline: none;
  transition: all 0.15s;
}

.tl-quick-add-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.tl-quick-add-input::placeholder {
  color: var(--muted-foreground);
}

/* Filters Panel */
.tl-filters-panel {
  display: none;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

.tl-filters-panel.show {
  display: flex;
}

.tl-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tl-filter-label {
  font-size: 11px;
  color: var(--muted-foreground);
  font-weight: 500;
}

.tl-filter-select {
  padding: 4px 8px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--foreground);
  font-size: 11px;
  outline: none;
  cursor: pointer;
}

/* Stats Bar */
.tl-stats-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.tl-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.tl-stat-value {
  font-weight: 600;
  color: var(--foreground);
}

.tl-stat-label {
  color: var(--muted-foreground);
}

.tl-stat-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
}


/* Mobile Responsive */
@media (max-width: 768px) {
  .tl-left-panel {
    width: 100%;
    max-width: none;
    min-width: 100%;
    height: auto;
    max-height: 40vh;
    resize: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .tl-body {
    flex-direction: column;
  }

  .tl-header {
    flex-wrap: wrap;
    padding: 12px;
  }

  .tl-view-tabs {
    order: 3;
    width: 100%;
    margin-top: 8px;
  }
}

/* ============================================
   LIGHT MODE - Timeline, Schedule & Calendar
   Premium Clean Design for Light Theme
   ============================================ */

/* General Light Mode Foundations */
.light,
[data-mode="light"] {
  --schedule-bg: hsl(0, 0%, 100%);
  --schedule-surface: hsl(210, 20%, 98%);
  --schedule-surface-hover: hsl(210, 25%, 96%);
  --schedule-border: hsl(214, 20%, 91%);
  --schedule-border-subtle: hsl(214, 15%, 94%);
  --schedule-card: hsl(0, 0%, 100%);
  --schedule-muted: hsl(215, 16%, 47%);
  --schedule-text: hsl(222, 47%, 11%);
  --schedule-shadow: 0 1px 3px hsla(214, 32%, 20%, 0.06), 0 1px 2px hsla(214, 32%, 20%, 0.04);
  --schedule-shadow-lg: 0 4px 12px hsla(214, 32%, 20%, 0.08), 0 2px 4px hsla(214, 32%, 20%, 0.04);
  --timeline-grid-line: hsl(214, 15%, 93%);
  --timeline-hour-line: hsl(214, 12%, 88%);
}



/* Left Sidebar - Light Mode */
.light .schedule-left-sidebar,
[data-mode="light"] .schedule-left-sidebar {
  border-right-color: var(--schedule-border);
}

/* Calendar Selector - Light Mode */
.light .calendar-selector,
[data-mode="light"] .calendar-selector {
  background: var(--schedule-card);
  border: 1px solid var(--schedule-border-subtle);
  box-shadow: var(--schedule-shadow);
}

.light .calendar-selector:hover,
[data-mode="light"] .calendar-selector:hover {
  background: var(--schedule-surface-hover);
  border-color: var(--schedule-border);
}

.light .calendar-selector-title,
[data-mode="light"] .calendar-selector-title {
  color: var(--schedule-text);
}

.light .calendar-selector-subtitle,
[data-mode="light"] .calendar-selector-subtitle {
  color: var(--schedule-muted);
}

/* Mini Calendar - Light Mode Premium */
.light .mini-calendar-section,
[data-mode="light"] .mini-calendar-section {
  background: var(--schedule-card);
  border: 1px solid var(--schedule-border-subtle);
  box-shadow: var(--schedule-shadow);
}

.light .mini-cal-month,
[data-mode="light"] .mini-cal-month {
  color: var(--schedule-text);
}

.light .mini-cal-nav,
[data-mode="light"] .mini-cal-nav {
  color: var(--schedule-muted);
  background: transparent;
  border: 1px solid transparent;
}

.light .mini-cal-nav:hover,
[data-mode="light"] .mini-cal-nav:hover {
  background: var(--schedule-surface-hover);
  border-color: var(--schedule-border-subtle);
  color: var(--schedule-text);
}

.light .mini-cal-weekday,
[data-mode="light"] .mini-cal-weekday {
  color: var(--schedule-muted);
}

.light .mini-cal-day,
[data-mode="light"] .mini-cal-day {
  color: var(--schedule-text);
}

.light .mini-cal-day:hover,
[data-mode="light"] .mini-cal-day:hover {
  background: var(--schedule-surface-hover);
}

.light .mini-cal-day.other-month,
[data-mode="light"] .mini-cal-day.other-month {
  color: var(--schedule-muted);
  opacity: 0.5;
}

.light .mini-cal-day.today,
[data-mode="light"] .mini-cal-day.today {
  background: hsl(217, 91%, 60%);
  color: hsl(0, 0%, 100%);
  box-shadow: 0 2px 8px hsla(217, 91%, 60%, 0.3);
}

.light .mini-cal-day.selected,
[data-mode="light"] .mini-cal-day.selected {
  background: hsla(217, 91%, 60%, 0.12);
  color: hsl(217, 91%, 50%);
}

.light .mini-cal-day.in-week,
[data-mode="light"] .mini-cal-day.in-week {
  background: hsla(217, 91%, 60%, 0.06);
}

/* Schedule Filter Section - Light Mode */
.light .schedule-filter-section,
[data-mode="light"] .schedule-filter-section {
  background: var(--schedule-card);
  border: 1px solid var(--schedule-border-subtle);
  box-shadow: var(--schedule-shadow);
}

.light .filter-section-title,
[data-mode="light"] .filter-section-title {
  color: var(--schedule-text);
}

.light .filter-section-chevron,
[data-mode="light"] .filter-section-chevron {
  color: var(--schedule-muted);
}

.light .schedule-filter-item:hover,
[data-mode="light"] .schedule-filter-item:hover {
  background: var(--schedule-surface-hover);
}

.light .filter-checkbox,
[data-mode="light"] .filter-checkbox {
  border-color: var(--schedule-border);
  background: var(--schedule-card);
}

.light .filter-label,
[data-mode="light"] .filter-label {
  color: var(--schedule-text);
}

/* Main Content - Light Mode */


.light .schedule-main-title,
[data-mode="light"] .schedule-main-title {
  color: var(--foreground);
}

.light .schedule-month-selector,
[data-mode="light"] .schedule-month-selector {
  background: var(--schedule-card);
  border: 1px solid var(--schedule-border-subtle);
  box-shadow: var(--schedule-shadow);
}

.light .schedule-month-selector:hover,
[data-mode="light"] .schedule-month-selector:hover {
  background: var(--schedule-surface-hover);
  border-color: var(--schedule-border);
}

.light .month-year-text,
[data-mode="light"] .month-year-text {
  color: var(--schedule-text);
}

.light .month-chevron,
[data-mode="light"] .month-chevron {
  color: var(--schedule-muted);
}

.light .schedule-event-count,
[data-mode="light"] .schedule-event-count {
  background: hsla(142, 71%, 45%, 0.1);
  color: hsl(142, 71%, 35%);
}

/* View Toggle - Light Mode */
.light .schedule-view-toggle,
[data-mode="light"] .schedule-view-toggle {
  background: var(--schedule-surface);
  border: 1px solid var(--schedule-border-subtle);
}

.light .view-toggle-btn,
[data-mode="light"] .view-toggle-btn {
  color: var(--schedule-muted);
}

.light .view-toggle-btn:hover,
[data-mode="light"] .view-toggle-btn:hover {
  color: var(--schedule-text);
}

.light .view-toggle-btn.active,
[data-mode="light"] .view-toggle-btn.active {
  background: var(--schedule-card);
  color: var(--schedule-text);
  box-shadow: var(--schedule-shadow);
}

/* Week View Container - Light Mode Premium */
.light .week-view-container,
[data-mode="light"] .week-view-container {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  box-shadow: var(--schedule-shadow-lg);
}

/* Week Header - Light Mode */
.light .week-header,
[data-mode="light"] .week-header {
  background: var(--glass-bg);
  border-bottom-color: var(--glass-border);
}

.light .week-header-tz,
[data-mode="light"] .week-header-tz {
  color: var(--schedule-muted);
  border-right-color: var(--glass-border);
  background: var(--glass-bg);
}

.light .week-header-day,
[data-mode="light"] .week-header-day {
  border-right-color: var(--schedule-border-subtle);
}

.light .week-day-number,
[data-mode="light"] .week-day-number {
  color: var(--schedule-text);
}

.light .week-day-name,
[data-mode="light"] .week-day-name {
  color: var(--schedule-muted);
}

.light .week-header-day.today,
[data-mode="light"] .week-header-day.today {
  background: hsla(217, 91%, 60%, 0.06);
}

.light .week-header-day.today .week-day-number,
[data-mode="light"] .week-header-day.today .week-day-number {
  background: hsl(217, 91%, 60%);
  color: hsl(0, 0%, 100%);
  box-shadow: 0 2px 8px hsla(217, 91%, 60%, 0.3);
}

/* Time Labels - Light Mode */
.light .time-labels-col,
[data-mode="light"] .time-labels-col {
  background: var(--glass-bg);
  border-right-color: var(--glass-border);
}

.light .time-label,
[data-mode="light"] .time-label {
  color: var(--schedule-muted);
}

/* Week Grid & Day Columns - Light Mode */
.light .week-day-column,
[data-mode="light"] .week-day-column {
  border-right-color: var(--schedule-border-subtle);
}

.light .week-day-column.today,
[data-mode="light"] .week-day-column.today {
  background: hsla(217, 91%, 60%, 0.02);
}

.light .time-slot-line,
[data-mode="light"] .time-slot-line {
  border-bottom-color: var(--timeline-grid-line);
}

/* Current Time Indicator - Light Mode */
.light .current-time-indicator,
[data-mode="light"] .current-time-indicator {
  background: hsl(0, 84%, 60%);
}

.light .current-time-indicator::before,
[data-mode="light"] .current-time-indicator::before {
  background: hsl(0, 84%, 60%);
  box-shadow: 0 0 8px hsla(0, 84%, 60%, 0.5);
}

/* Day View - Light Mode */
.light .day-view-container,
[data-mode="light"] .day-view-container {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  box-shadow: var(--schedule-shadow-lg);
}

.light .day-view-header,
[data-mode="light"] .day-view-header {
  background: var(--glass-bg);
  border-bottom-color: var(--glass-border);
}

.light .day-view-tz,
[data-mode="light"] .day-view-tz {
  color: var(--schedule-muted);
  border-right-color: var(--schedule-border);
}

.light .day-view-number,
[data-mode="light"] .day-view-number {
  color: var(--schedule-text);
}

.light .day-view-name,
[data-mode="light"] .day-view-name {
  color: var(--schedule-muted);
}

.light .day-view-info.today,
[data-mode="light"] .day-view-info.today {
  background: hsla(217, 91%, 60%, 0.06);
}

.light .day-view-info.today .day-view-number,
[data-mode="light"] .day-view-info.today .day-view-number {
  background: hsl(217, 91%, 60%);
  color: hsl(0, 0%, 100%);
  box-shadow: 0 2px 8px hsla(217, 91%, 60%, 0.3);
}

/* Month View - Light Mode */
.light .month-view-container,
[data-mode="light"] .month-view-container {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  box-shadow: var(--schedule-shadow-lg);
}

.light .month-grid-header,
[data-mode="light"] .month-grid-header {
  background: var(--glass-bg);
  border-bottom-color: var(--glass-border);
}

.light .month-weekday,
[data-mode="light"] .month-weekday {
  color: var(--schedule-muted);
  border-right-color: var(--schedule-border-subtle);
}

.light .month-day,
[data-mode="light"] .month-day {
  border-right-color: var(--schedule-border-subtle);
  border-bottom-color: var(--schedule-border-subtle);
}

.light .month-day:hover,
[data-mode="light"] .month-day:hover {
  background: var(--schedule-surface-hover);
}

.light .month-day.today,
[data-mode="light"] .month-day.today {
  background: hsla(217, 91%, 60%, 0.04);
}

.light .month-day-number,
[data-mode="light"] .month-day-number {
  color: var(--schedule-text);
}

.light .month-day.today .month-day-number,
[data-mode="light"] .month-day.today .month-day-number {
  background: hsl(217, 91%, 60%);
  color: hsl(0, 0%, 100%);
  box-shadow: 0 2px 6px hsla(217, 91%, 60%, 0.25);
}

.light .month-more-events,
[data-mode="light"] .month-more-events {
  color: var(--schedule-muted);
}

/* Calendar Grid (Legacy) - Light Mode */
.light .calendar-grid,
[data-mode="light"] .calendar-grid {
  background: var(--schedule-card);
  border-color: var(--schedule-border);
  box-shadow: var(--schedule-shadow-lg);
}

.light .weekday-header,
[data-mode="light"] .weekday-header {
  background: var(--schedule-surface);
  color: var(--schedule-muted);
  border-bottom-color: var(--schedule-border);
  border-right-color: var(--schedule-border-subtle);
}

.light .calendar-day,
[data-mode="light"] .calendar-day {
  border-right-color: var(--schedule-border-subtle);
  border-bottom-color: var(--schedule-border-subtle);
}

.light .calendar-day:hover,
[data-mode="light"] .calendar-day:hover {
  background: var(--schedule-surface-hover);
}

.light .calendar-day.today,
[data-mode="light"] .calendar-day.today {
  background: hsla(217, 91%, 60%, 0.05);
}

.light .calendar-day .day-number,
[data-mode="light"] .calendar-day .day-number {
  color: var(--schedule-text);
}

.light .calendar-day.today .day-number,
[data-mode="light"] .calendar-day.today .day-number {
  background: hsl(217, 91%, 60%);
  color: hsl(0, 0%, 100%);
}

.light .calendar-day .day-name,
[data-mode="light"] .calendar-day .day-name {
  color: var(--schedule-muted);
}

/* Calendar Task Cards - Light Mode */
.light .calendar-task,
[data-mode="light"] .calendar-task {
  background: var(--schedule-surface);
  border-color: var(--schedule-border-subtle);
}

.light .calendar-task:hover,
[data-mode="light"] .calendar-task:hover {
  background: var(--schedule-surface-hover);
  box-shadow: var(--schedule-shadow-lg);
}

.light .task-title-mini,
[data-mode="light"] .task-title-mini {
  color: var(--schedule-text);
}

.light .task-time-mini,
[data-mode="light"] .task-time-mini {
  background: var(--schedule-card);
  border-color: var(--schedule-border-subtle);
  color: var(--schedule-muted);
}

.light .recurring-badge,
[data-mode="light"] .recurring-badge {
  background: var(--schedule-surface);
  border-color: var(--schedule-border-subtle);
  color: var(--schedule-muted);
}

/* Add Task Hint - Light Mode */
.light .add-task-hint,
[data-mode="light"] .add-task-hint {
  color: var(--schedule-muted);
}

/* Schedule Sidebar - Light Mode */
.light .schedule-sidebar,
[data-mode="light"] .schedule-sidebar {
  background: var(--schedule-surface);
  border-left-color: var(--schedule-border);
}

.light .sidebar-section,
[data-mode="light"] .sidebar-section {
  background: var(--schedule-card);
  border-color: var(--schedule-border-subtle);
  box-shadow: var(--schedule-shadow);
}

.light .sidebar-section-header h3,
[data-mode="light"] .sidebar-section-header h3 {
  color: var(--schedule-text);
}

.light .recurring-task-item,
[data-mode="light"] .recurring-task-item {
  background: var(--schedule-surface);
}

.light .recurring-task-item:hover,
[data-mode="light"] .recurring-task-item:hover {
  background: var(--schedule-surface-hover);
}

.light .recurring-task-title,
[data-mode="light"] .recurring-task-title {
  color: var(--schedule-text);
}

.light .recurring-task-meta,
[data-mode="light"] .recurring-task-meta {
  color: var(--schedule-muted);
}

.light .recurring-empty,
[data-mode="light"] .recurring-empty {
  color: var(--schedule-muted);
}

/* Stat Items - Light Mode */
.light .stat-value,
[data-mode="light"] .stat-value {
  color: var(--schedule-text);
}

.light .stat-label,
[data-mode="light"] .stat-label {
  color: var(--schedule-muted);
}

/* Sidebar Tips - Light Mode */
.light .sidebar-tips,
[data-mode="light"] .sidebar-tips {
  background: hsla(217, 91%, 60%, 0.06);
  border-color: hsla(217, 91%, 60%, 0.15);
}

.light .tip-content,
[data-mode="light"] .tip-content {
  color: var(--schedule-muted);
}

.light .tip-content strong,
[data-mode="light"] .tip-content strong {
  color: var(--schedule-text);
}

/* Breadcrumb - Light Mode */
.light .breadcrumb-item,
[data-mode="light"] .breadcrumb-item {
  color: var(--schedule-muted);
}

.light .breadcrumb-item.active,
[data-mode="light"] .breadcrumb-item.active {
  color: var(--schedule-text);
}

.light .breadcrumb-chevron,
[data-mode="light"] .breadcrumb-chevron {
  color: var(--schedule-muted);
}

/* Event Cards in Week View - Light Mode Adjustments */
.light .week-event-card,
[data-mode="light"] .week-event-card {
  box-shadow: 0 2px 6px hsla(0, 0%, 0%, 0.1);
}

.light .week-event-card:hover,
[data-mode="light"] .week-event-card:hover {
  box-shadow: 0 6px 16px hsla(0, 0%, 0%, 0.15);
}

/* Resize Time Tooltip - Light Mode */
.light .resize-time-tooltip,
[data-mode="light"] .resize-time-tooltip {
  background: var(--schedule-card);
  border-color: var(--schedule-border);
  color: var(--schedule-text);
  box-shadow: var(--schedule-shadow-lg);
}

/* Calendar Controls - Light Mode */
.light .calendar-controls,
[data-mode="light"] .calendar-controls {
  background: transparent;
}

.light .calendar-nav-btns,
[data-mode="light"] .calendar-nav-btns {
  background: var(--schedule-card);
  border-color: var(--schedule-border-subtle);
  box-shadow: var(--schedule-shadow);
}

.light .calendar-nav-btn,
[data-mode="light"] .calendar-nav-btn {
  color: var(--schedule-muted);
}

.light .calendar-nav-btn:hover,
[data-mode="light"] .calendar-nav-btn:hover {
  background: var(--schedule-surface-hover);
  color: var(--schedule-text);
}

.light .calendar-nav-btn:first-child,
[data-mode="light"] .calendar-nav-btn:first-child {
  border-right-color: var(--schedule-border-subtle);
}

/* Timeline View - Light Mode */
.light .tl-container,
[data-mode="light"] .tl-container {
  background: var(--schedule-bg);
}

.light .tl-header,
[data-mode="light"] .tl-header {
  background: var(--schedule-surface);
  border-bottom-color: var(--schedule-border);
}

.light .tl-title,
[data-mode="light"] .tl-title {
  color: var(--schedule-text);
}

.light .tl-subtitle,
[data-mode="light"] .tl-subtitle {
  color: var(--schedule-muted);
}

.light .tl-view-btn,
[data-mode="light"] .tl-view-btn {
  color: var(--schedule-muted);
  background: transparent;
}

.light .tl-view-btn:hover,
[data-mode="light"] .tl-view-btn:hover {
  background: var(--schedule-surface-hover);
  color: var(--schedule-text);
}

.light .tl-view-btn.active,
[data-mode="light"] .tl-view-btn.active {
  background: var(--schedule-card);
  color: var(--schedule-text);
  box-shadow: var(--schedule-shadow);
}

.light .tl-action-btn,
[data-mode="light"] .tl-action-btn {
  background: var(--schedule-card);
  border-color: var(--schedule-border-subtle);
  color: var(--schedule-muted);
}

.light .tl-action-btn:hover,
[data-mode="light"] .tl-action-btn:hover {
  background: var(--schedule-surface-hover);
  border-color: var(--schedule-border);
  color: var(--schedule-text);
}

.light .tl-left-panel,
[data-mode="light"] .tl-left-panel {
  background: var(--schedule-surface);
  border-right-color: var(--schedule-border);
}

.light .tl-task-list,
[data-mode="light"] .tl-task-list {
  background: var(--schedule-card);
}

.light .tl-task-item,
[data-mode="light"] .tl-task-item {
  border-bottom-color: var(--schedule-border-subtle);
}

.light .tl-task-item:hover,
[data-mode="light"] .tl-task-item:hover {
  background: var(--schedule-surface-hover);
}

.light .tl-task-title,
[data-mode="light"] .tl-task-title {
  color: var(--schedule-text);
}

.light .tl-task-meta,
[data-mode="light"] .tl-task-meta {
  color: var(--schedule-muted);
}

.light .tl-timeline-header,
[data-mode="light"] .tl-timeline-header {
  background: var(--schedule-surface);
  border-bottom-color: var(--schedule-border);
}

.light .tl-timeline-date,
[data-mode="light"] .tl-timeline-date {
  color: var(--schedule-muted);
  border-right-color: var(--schedule-border-subtle);
}

.light .tl-timeline-body,
[data-mode="light"] .tl-timeline-body {
  background: var(--schedule-card);
}

.light .tl-timeline-row,
[data-mode="light"] .tl-timeline-row {
  border-bottom-color: var(--schedule-border-subtle);
}

.light .tl-timeline-cell,
[data-mode="light"] .tl-timeline-cell {
  border-right-color: var(--schedule-border-subtle);
}

.light .tl-filters-panel,
[data-mode="light"] .tl-filters-panel {
  background: var(--schedule-surface);
  border-bottom-color: var(--schedule-border);
}

.light .tl-filter-label,
[data-mode="light"] .tl-filter-label {
  color: var(--schedule-muted);
}

.light .tl-filter-select,
[data-mode="light"] .tl-filter-select {
  background: var(--schedule-card);
  border-color: var(--schedule-border-subtle);
  color: var(--schedule-text);
}

.light .tl-stats-bar,
[data-mode="light"] .tl-stats-bar {
  background: var(--schedule-surface);
  border-bottom-color: var(--schedule-border);
}

.light .tl-stat-value,
[data-mode="light"] .tl-stat-value {
  color: var(--schedule-text);
}

.light .tl-stat-label,
[data-mode="light"] .tl-stat-label {
  color: var(--schedule-muted);
}

.light .tl-stat-divider,
[data-mode="light"] .tl-stat-divider {
  background: var(--schedule-border);
}


.light .tl-quick-add-input,
[data-mode="light"] .tl-quick-add-input {
  background: var(--schedule-card);
  border-color: var(--schedule-border-subtle);
  color: var(--schedule-text);
}

.light .tl-quick-add-input::placeholder,
[data-mode="light"] .tl-quick-add-input::placeholder {
  color: var(--schedule-muted);
}

.light .tl-quick-add-input:focus,
[data-mode="light"] .tl-quick-add-input:focus {
  border-color: hsl(217, 91%, 60%);
  box-shadow: 0 0 0 3px hsla(217, 91%, 60%, 0.12);
}

/* Drag Create Preview - Light Mode */
.light .drag-create-preview,
[data-mode="light"] .drag-create-preview {
  background: linear-gradient(135deg, hsla(217, 91%, 60%, 0.9), hsla(239, 84%, 67%, 0.9));
  border-color: hsla(0, 0%, 100%, 0.4);
  box-shadow: 0 4px 16px hsla(217, 91%, 60%, 0.35);
}

/* Dropdown Event Creation Form - Clean & Modern */
.event-dropdown-form {
  position: fixed;
  z-index: 10000;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 420px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: slideInSmooth 0.2s ease-out;
}

[data-mode="light"] .event-dropdown-form,
.light .event-dropdown-form {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.02);
}

@keyframes slideInSmooth {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.event-dropdown-form .modal-content {
  padding: 16px;
}

.event-dropdown-form .form-group {
  margin-bottom: 14px;
}

.event-dropdown-form .form-group:last-child {
  margin-bottom: 0;
}

.event-dropdown-form .form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.event-dropdown-form .form-input,
.event-dropdown-form .form-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  font-size: 14px;
  color: var(--foreground);
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.event-dropdown-form .form-input:focus,
.event-dropdown-form .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsla(239, 84%, 67%, 0.15);
  background: var(--surface);
}

.event-dropdown-form .form-input::placeholder {
  color: var(--muted-foreground);
  opacity: 0.6;
}

.event-dropdown-form .time-picker-group {
  margin: 12px 0;
  padding: 12px;
  background: var(--accent);
  border-radius: 10px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.event-dropdown-form .time-picker-group:hover {
  border-color: var(--border);
}

.event-dropdown-form .time-picker-group-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.event-dropdown-form .time-picker-group-header svg {
  display: block;
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.event-dropdown-form .time-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-dropdown-form .time-picker-label {
  font-size: 12px;
  color: var(--muted-foreground);
  min-width: 36px;
  font-weight: 500;
}

.event-dropdown-form .time-picker-select {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--foreground);
  transition: all 0.2s ease;
  cursor: pointer;
}

.event-dropdown-form .time-picker-select:hover {
  border-color: var(--muted-foreground);
}

.event-dropdown-form .time-picker-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsla(239, 84%, 67%, 0.15);
}

.event-dropdown-form .time-picker-divider {
  font-size: 12px;
  color: var(--muted-foreground);
  opacity: 0.5;
}

.event-dropdown-form .time-duration-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 10px;
  background: var(--surface);
  border-radius: 6px;
  font-size: 11px;
  color: var(--muted-foreground);
}

.event-dropdown-form .time-duration-hint svg {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

.event-dropdown-form .quick-duration-btns {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.event-dropdown-form .quick-duration-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.event-dropdown-form .quick-duration-btn:hover {
  background: var(--accent);
  color: var(--foreground);
  border-color: var(--muted-foreground);
}

.event-dropdown-form .form-group-collapsible {
  margin-top: 12px;
}

.event-dropdown-form .form-collapsible-header {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.event-dropdown-form .form-collapsible-header:hover {
  background: var(--accent);
  color: var(--foreground);
}

.event-dropdown-form .form-collapsible-header svg:first-child {
  width: 14px;
  height: 14px;
  display: block;
  opacity: 0.6;
}

.event-dropdown-form .form-collapsible-header .form-collapsible-chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
  display: block;
}

.event-dropdown-form .form-collapsible-header.collapsed .form-collapsible-chevron {
  transform: rotate(-90deg);
}

.event-dropdown-form .form-collapsible-content {
  padding: 8px 0;
}

.event-dropdown-form .form-row-triple {
  display: flex;
  gap: 8px;
}

.event-dropdown-form .form-group-inline {
  flex: 1;
}

.event-dropdown-form .form-group-inline label {
  font-size: 11px;
  margin-bottom: 4px;
  border: none;
}

.event-dropdown-form .form-group-inline .form-select {
  padding: 6px 8px;
  font-size: 12px;
}

.event-dropdown-form .form-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.event-dropdown-form .btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.event-dropdown-form .btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  box-shadow: 0 2px 8px hsla(239, 84%, 67%, 0.3);
}

.event-dropdown-form .btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px hsla(239, 84%, 67%, 0.4);
}

.event-dropdown-form .btn-primary:active {
  transform: translateY(0);
}

.event-dropdown-form .btn-secondary {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.event-dropdown-form .btn-secondary:hover {
  background: var(--accent);
  border-color: var(--muted-foreground);
}

.event-dropdown-form .required {
  color: var(--destructive);
  font-size: 11px;
  margin-left: 2px;
}

.event-dropdown-form .color-picker-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.event-dropdown-form .color-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.event-dropdown-form .color-dot:hover {
  transform: scale(1.15);
}

.event-dropdown-form .color-dot.selected {
  border-color: var(--foreground);
  box-shadow: 0 0 0 2px var(--background), 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Repeat Section Styling */
.event-dropdown-form .repeat-options-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-dropdown-form .repeat-custom-days {
  margin-top: 8px;
  display: none;
}

.event-dropdown-form .repeat-days-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.event-dropdown-form .repeat-day-chip {
  position: relative;
  cursor: pointer;
}

.event-dropdown-form .repeat-day-chip input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.event-dropdown-form .repeat-day-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.event-dropdown-form .repeat-day-chip:hover span {
  background: var(--accent);
  color: var(--foreground);
  border-color: var(--muted-foreground);
}

.event-dropdown-form .repeat-day-chip.selected span {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px hsla(239, 84%, 67%, 0.3);
}

.event-dropdown-form .repeat-end-options {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.event-dropdown-form .repeat-end-after,
.event-dropdown-form .repeat-end-on {
  margin-top: 8px;
}

.event-dropdown-form .repeat-summary-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--primary);
  color: white;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin-left: auto;
}

/* Hide meeting link join button in compact form */
.event-dropdown-form .form-group .btn-secondary:not(.form-actions .btn-secondary) {
  display: none;
}

.event-dropdown-form .form-group div[style*="flex"] {
  flex-direction: column;
  gap: 4px !important;
}

.event-dropdown-form .form-group div[style*="flex"] .form-input {
  width: 100% !important;
}

/* Schedule Header Light Mode */
.light .schedule-header,
[data-mode="light"] .schedule-header {
  border-bottom-color: var(--schedule-border);
}

.light .schedule-title-section .view-title,
[data-mode="light"] .schedule-title-section .view-title {
  color: var(--schedule-text);
}

.light .schedule-subtitle,
[data-mode="light"] .schedule-subtitle {
  color: var(--schedule-muted);
}

/* Form Inputs in Schedule - Light Mode */
.light .schedule-view .form-input,
.light .schedule-view .form-select,
.light .schedule-view .form-textarea,
[data-mode="light"] .schedule-view .form-input,
[data-mode="light"] .schedule-view .form-select,
[data-mode="light"] .schedule-view .form-textarea {
  background: var(--schedule-card);
  border-color: var(--schedule-border);
  color: var(--schedule-text);
}

.light .schedule-view .form-input:focus,
.light .schedule-view .form-select:focus,
.light .schedule-view .form-textarea:focus,
[data-mode="light"] .schedule-view .form-input:focus,
[data-mode="light"] .schedule-view .form-select:focus,
[data-mode="light"] .schedule-view .form-textarea:focus {
  border-color: hsl(217, 91%, 60%);
  box-shadow: 0 0 0 3px hsla(217, 91%, 60%, 0.12);
}

/* Settings Container in Light Mode */
.light .settings-container,
[data-mode="light"] .settings-container {
  background: transparent;
}

.light .settings-section,
[data-mode="light"] .settings-section {
  background: var(--schedule-card);
  border-color: var(--schedule-border-subtle);
  box-shadow: var(--schedule-shadow);
}

.light .section-title,
[data-mode="light"] .section-title {
  color: var(--schedule-text);
}

.light .settings-item,
[data-mode="light"] .settings-item {
  border-bottom-color: var(--schedule-border-subtle);
}

.light .settings-item:hover,
[data-mode="light"] .settings-item:hover {
  background: var(--schedule-surface-hover);
}

.light .settings-label span,
[data-mode="light"] .settings-label span {
  color: var(--schedule-text);
}

.light .settings-description,
[data-mode="light"] .settings-description {
  color: var(--schedule-muted);
}

/* ===== Timeline Gantt Grid - Premium Light Mode ===== */
.light .tl-gantt-grid,
[data-mode="light"] .tl-gantt-grid {
  background: var(--schedule-card);
  border-radius: 0 0 12px 0;
}

.light .tl-gantt-row,
[data-mode="light"] .tl-gantt-row {
  border-bottom: 1px solid var(--schedule-border);
  background: transparent;
  transition: background 0.15s ease;
}

.light .tl-gantt-row:nth-child(even),
[data-mode="light"] .tl-gantt-row:nth-child(even) {
  background: hsla(220, 20%, 97%, 0.6);
}

.light .tl-gantt-row:hover,
[data-mode="light"] .tl-gantt-row:hover {
  background: hsla(217, 91%, 60%, 0.04);
}

.light .tl-gantt-row:last-child,
[data-mode="light"] .tl-gantt-row:last-child {
  border-bottom: none;
}

.light .tl-gantt-cell,
[data-mode="light"] .tl-gantt-cell {
  border-right: 1px solid hsla(220, 13%, 91%, 0.8);
}

.light .tl-gantt-cell:last-child,
[data-mode="light"] .tl-gantt-cell:last-child {
  border-right: none;
}

.light .tl-gantt-cell.weekend,
[data-mode="light"] .tl-gantt-cell.weekend {
  background: hsla(220, 20%, 96%, 0.5);
}

.light .tl-gantt-cell.today,
[data-mode="light"] .tl-gantt-cell.today {
  background: hsla(217, 91%, 60%, 0.06);
  box-shadow: inset 0 0 0 1px hsla(217, 91%, 60%, 0.15);
}

/* Gantt Bar Enhancements - Light Mode */
.light .tl-bar-wrapper,
[data-mode="light"] .tl-bar-wrapper {
  filter: drop-shadow(0 2px 4px hsla(220, 60%, 15%, 0.08));
}

.light .tl-bar-wrapper:hover,
[data-mode="light"] .tl-bar-wrapper:hover {
  filter: drop-shadow(0 4px 12px hsla(220, 60%, 15%, 0.15));
}

/* Light Mode Bar Body - Improved Visibility */
.light .tl-bar-body,
[data-mode="light"] .tl-bar-body {
  border: 1px solid hsla(217, 80%, 45%, 0.8);
  box-shadow:
    0 2px 6px hsla(217, 80%, 40%, 0.2),
    0 1px 2px hsla(217, 80%, 40%, 0.12),
    inset 0 1px 0 hsla(0, 0%, 100%, 0.15);
}

.light .tl-bar-wrapper:hover .tl-bar-body,
[data-mode="light"] .tl-bar-wrapper:hover .tl-bar-body {
  box-shadow:
    0 6px 20px hsla(217, 80%, 40%, 0.28),
    0 2px 6px hsla(217, 80%, 40%, 0.18),
    inset 0 1px 0 hsla(0, 0%, 100%, 0.2);
}

/* Light Mode Status-based bar colors - Vibrant & Clear */
.light .tl-bar-wrapper.backlog .tl-bar-body,
[data-mode="light"] .tl-bar-wrapper.backlog .tl-bar-body {
  background: linear-gradient(180deg, hsl(220, 15%, 55%) 0%, hsl(220, 15%, 45%) 100%);
  border-color: hsl(220, 15%, 40%);
}

.light .tl-bar-wrapper.todo .tl-bar-body,
[data-mode="light"] .tl-bar-wrapper.todo .tl-bar-body {
  background: linear-gradient(180deg, hsl(220, 18%, 52%) 0%, hsl(220, 18%, 42%) 100%);
  border-color: hsl(220, 18%, 38%);
}

.light .tl-bar-wrapper.in-progress .tl-bar-body,
.light .tl-bar-wrapper.in_progress .tl-bar-body,
[data-mode="light"] .tl-bar-wrapper.in-progress .tl-bar-body,
[data-mode="light"] .tl-bar-wrapper.in_progress .tl-bar-body {
  background: linear-gradient(180deg, hsl(217, 90%, 55%) 0%, hsl(217, 85%, 45%) 100%);
  border-color: hsl(217, 80%, 42%);
}

.light .tl-bar-wrapper.review .tl-bar-body,
[data-mode="light"] .tl-bar-wrapper.review .tl-bar-body {
  background: linear-gradient(180deg, hsl(262, 80%, 58%) 0%, hsl(262, 75%, 48%) 100%);
  border-color: hsl(262, 70%, 45%);
}

.light .tl-bar-wrapper.done .tl-bar-body,
.light .tl-bar-wrapper.completed .tl-bar-body,
[data-mode="light"] .tl-bar-wrapper.done .tl-bar-body,
[data-mode="light"] .tl-bar-wrapper.completed .tl-bar-body {
  background: linear-gradient(180deg, hsl(142, 75%, 42%) 0%, hsl(142, 70%, 32%) 100%);
  border-color: hsl(142, 70%, 30%);
  opacity: 0.9;
}

.light .tl-bar-wrapper.blocked .tl-bar-body,
[data-mode="light"] .tl-bar-wrapper.blocked .tl-bar-body {
  background: linear-gradient(180deg, hsl(0, 75%, 55%) 0%, hsl(0, 70%, 45%) 100%);
  border-color: hsl(0, 70%, 42%);
}

.light .tl-bar-wrapper.cancelled .tl-bar-body,
[data-mode="light"] .tl-bar-wrapper.cancelled .tl-bar-body {
  background: linear-gradient(180deg, hsl(220, 10%, 60%) 0%, hsl(220, 10%, 50%) 100%);
  border-color: hsl(220, 10%, 45%);
  opacity: 0.6;
}

/* Light Mode Bar Label - Styled for outside bar position */
.light .tl-bar-label,
[data-mode="light"] .tl-bar-label {
  background: rgba(241, 245, 249, 0.95) !important;
  color: #1e293b !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(4px) !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  min-width: 60px !important;
  text-align: center !important;
  font-weight: 500 !important;
}

/* Light Mode Overdue bars */
.light .tl-bar-wrapper.overdue .tl-bar-body,
[data-mode="light"] .tl-bar-wrapper.overdue .tl-bar-body {
  background: linear-gradient(90deg,
      hsl(217, 85%, 55%) 0%,
      hsl(217, 80%, 50%) 40%,
      hsl(0, 75%, 55%) 70%,
      hsl(0, 80%, 50%) 100%);
  border-color: hsl(0, 75%, 48%);
}

/* ClickUp Style Gantt Rows - Light Mode */
.light .tl-gantt-row-clickup,
[data-mode="light"] .tl-gantt-row-clickup {
  border-bottom: 1px solid var(--schedule-border);
}

.light .tl-gantt-row-clickup:hover,
[data-mode="light"] .tl-gantt-row-clickup:hover {
  background: hsla(217, 91%, 60%, 0.03);
}

.light .tl-gantt-row-child,
[data-mode="light"] .tl-gantt-row-child {
  border-bottom: 1px solid hsla(220, 13%, 91%, 0.6);
}

/* Timeline Header Cells - Light Mode */
.light .tl-timeline-date-cell,
[data-mode="light"] .tl-timeline-date-cell {
  border-right: 1px solid var(--schedule-border-subtle);
  color: var(--schedule-muted);
}

.light .tl-timeline-date-cell.today,
[data-mode="light"] .tl-timeline-date-cell.today {
  background: hsla(217, 91%, 60%, 0.08);
  color: hsl(217, 91%, 50%);
  font-weight: 600;
}

.light .tl-timeline-date-cell.weekend,
[data-mode="light"] .tl-timeline-date-cell.weekend {
  background: hsla(220, 20%, 96%, 0.4);
  color: var(--schedule-muted);
}

/* ============================================
   PREMIUM MINI-MAP NAVIGATION
   Bottom bar showing full timeline overview
   ============================================ */

.tl-minimap-container {
  position: relative;
  height: 48px;
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
  z-index: 20;
}

.tl-minimap-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tl-minimap-label svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.tl-minimap-track {
  flex: 1;
  height: 28px;
  background: var(--surface);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}

.tl-minimap-track:hover {
  border-color: var(--muted-foreground);
}

/* Mini-map bars representing tasks */
.tl-minimap-bars {
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  bottom: 4px;
  pointer-events: none;
}

.tl-minimap-bar {
  position: absolute;
  height: 4px;
  background: #3b82f6;
  border-radius: 2px;
  opacity: 0.8;
}

.tl-minimap-bar.done {
  background: #22c55e;
  opacity: 0.6;
}

.tl-minimap-bar.in-progress {
  background: #3b82f6;
}

.tl-minimap-bar.overdue {
  background: #ef4444;
}

/* Today indicator on mini-map */
.tl-minimap-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #3b82f6;
  z-index: 5;
  pointer-events: none;
}

.tl-minimap-today::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: 8px;
  height: 8px;
  background: #3b82f6;
  border-radius: 50%;
  border: 2px solid var(--card);
}

/* Viewport indicator (draggable) */
.tl-minimap-viewport {
  position: absolute;
  top: 2px;
  bottom: 2px;
  background: rgba(59, 130, 246, 0.15);
  border: 2px solid rgba(59, 130, 246, 0.5);
  border-radius: 4px;
  cursor: grab;
  transition: background 0.15s, border-color 0.15s;
  z-index: 10;
}

.tl-minimap-viewport:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.7);
}

.tl-minimap-viewport.dragging {
  cursor: grabbing;
  background: rgba(59, 130, 246, 0.3);
  border-color: #3b82f6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

/* Resize handles on viewport */
.tl-minimap-viewport-handle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  background: rgba(59, 130, 246, 0.6);
  border-radius: 2px;
  cursor: ew-resize;
  opacity: 0;
  transition: opacity 0.15s;
}

.tl-minimap-viewport:hover .tl-minimap-viewport-handle {
  opacity: 1;
}

.tl-minimap-viewport-handle.left {
  left: 2px;
}

.tl-minimap-viewport-handle.right {
  right: 2px;
}

/* Date labels on mini-map */
.tl-minimap-dates {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
  pointer-events: none;
}

.tl-minimap-date-label {
  font-size: 9px;
  color: var(--muted-foreground);
  opacity: 0.7;
}

/* Quick navigation buttons */
.tl-minimap-nav {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.tl-minimap-nav-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.tl-minimap-nav-btn:hover {
  background: var(--accent);
  color: var(--foreground);
  border-color: var(--muted-foreground);
}

.tl-minimap-nav-btn svg {
  width: 14px;
  height: 14px;
}

/* Light mode styles for mini-map */
.light .tl-minimap-container,
[data-mode="light"] .tl-minimap-container {
  background: var(--schedule-card);
  border-top-color: var(--schedule-border);
}

.light .tl-minimap-track,
[data-mode="light"] .tl-minimap-track {
  background: var(--schedule-surface);
  border-color: var(--schedule-border);
}

.light .tl-minimap-viewport,
[data-mode="light"] .tl-minimap-viewport {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
}

.light .tl-minimap-viewport:hover,
[data-mode="light"] .tl-minimap-viewport:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.6);
}

.light .tl-minimap-nav-btn,
[data-mode="light"] .tl-minimap-nav-btn {
  background: var(--schedule-surface);
  border-color: var(--schedule-border);
}

/* ============================================
   PREMIUM TIMELINE KANBAN BOARD
   Modern glass-morphism professional design
   ============================================ */

.tl-kanban-section {
  margin-top: 32px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--card) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.tl-kanban-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
  border-bottom: 1px solid var(--border);
}

.tl-kanban-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tl-kanban-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.tl-kanban-icon svg {
  width: 18px;
  height: 18px;
  color: #3b82f6;
}

.tl-kanban-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

.tl-kanban-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--primary-foreground);
  background: var(--primary);
  padding: 4px 10px;
  border-radius: 12px;
}

.tl-kanban-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-kanban-add-col-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface, --muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tl-kanban-add-col-btn:hover {
  background: var(--accent);
  border-color: var(--primary);
  color: var(--foreground);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.1);
}

.tl-kanban-add-col-btn svg {
  width: 14px;
  height: 14px;
}

.tl-kanban-board {
  display: flex;
  gap: 16px;
  padding: 24px;
  overflow-x: auto;
  min-height: 300px;
}

.tl-kanban-board::-webkit-scrollbar {
  height: 8px;
}

.tl-kanban-board::-webkit-scrollbar-track {
  background: var(--accent);
  border-radius: 4px;
}

.tl-kanban-board::-webkit-scrollbar-thumb {
  background: var(--muted-foreground);
  border-radius: 4px;
}

.tl-kanban-board::-webkit-scrollbar-thumb:hover {
  background: var(--foreground);
}

.tl-kanban-column {
  flex-shrink: 0;
  width: 300px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.tl-kanban-column:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.tl-kanban-col-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.tl-kanban-col-indicator {
  width: 4px;
  height: 24px;
  border-radius: 2px;
  flex-shrink: 0;
}

.tl-kanban-col-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
  flex: 1;
  outline: none;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.tl-kanban-col-title:focus {
  background: var(--accent);
}

.tl-kanban-col-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-kanban-col-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: var(--accent);
  padding: 2px 8px;
  border-radius: 8px;
}

.tl-kanban-col-progress {
  width: 40px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  overflow: hidden;
}

.tl-kanban-col-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.tl-kanban-col-menu {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  border-radius: 6px;
  opacity: 0;
  transition: all 0.15s;
}

.tl-kanban-column:hover .tl-kanban-col-menu {
  opacity: 1;
}

.tl-kanban-col-menu:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.tl-kanban-col-menu svg {
  width: 14px;
  height: 14px;
}

.tl-kanban-col-tasks {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  overflow-y: auto;
  max-height: 400px;
}

.tl-kanban-col-tasks::-webkit-scrollbar {
  width: 6px;
}

.tl-kanban-col-tasks::-webkit-scrollbar-track {
  background: transparent;
}

.tl-kanban-col-tasks::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.tl-kanban-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: grab;
  transition: all 0.2s ease;
  position: relative;
}

.tl-kanban-task:hover {
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.tl-kanban-task:active {
  cursor: grabbing;
}

.tl-kanban-task.completed {
  opacity: 0.6;
}

.tl-kanban-task.completed .tl-kanban-task-title {
  text-decoration: line-through;
  color: var(--muted-foreground);
}

.tl-kanban-task-check {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.tl-kanban-task-check input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 1;
}

.tl-kanban-checkmark {
  position: absolute;
  inset: 0;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.tl-kanban-checkmark svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  color: white;
  transition: opacity 0.15s;
}

.tl-kanban-task-check input:checked+.tl-kanban-checkmark {
  background: var(--check-color, var(--primary));
  border-color: var(--check-color, var(--primary));
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.tl-kanban-task-check input:checked+.tl-kanban-checkmark svg {
  opacity: 1;
}

.tl-kanban-task-title {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  outline: none;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s;
  line-height: 1.4;
}

.tl-kanban-task-title:focus {
  background: var(--accent);
}

.tl-kanban-task-priority {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.tl-priority-high {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.tl-priority-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.tl-priority-low {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.tl-kanban-task-delete {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  border-radius: 6px;
  opacity: 0;
  transition: all 0.15s;
}

.tl-kanban-task:hover .tl-kanban-task-delete {
  opacity: 1;
}

.tl-kanban-task-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.tl-kanban-task-delete svg {
  width: 14px;
  height: 14px;
}

.tl-kanban-add-task {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  margin: 12px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tl-kanban-add-task:hover {
  background: var(--accent);
  border-color: var(--primary);
  color: var(--foreground);
  border-style: solid;
}

.tl-kanban-add-task svg {
  width: 14px;
  height: 14px;
}

.tl-kanban-task-input {
  width: calc(100% - 20px);
  padding: 8px;
  margin: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: var(--background);
  color: var(--foreground);
  font-size: 13px;
}

.tl-kanban-task-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

.tl-kanban-col-input {
  padding: 8px 12px;
  margin-left: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: var(--background);
  color: var(--foreground);
  font-size: 14px;
}

.tl-kanban-col-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

/* Light mode adjustments */
.light .tl-kanban-section,
[data-mode="light"] .tl-kanban-section {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.light .tl-kanban-task:hover,
[data-mode="light"] .tl-kanban-task:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.light .tl-kanban-add-col-btn,
[data-mode="light"] .tl-kanban-add-col-btn {
  background: var(--surface, --muted);
  border: 1px solid var(--border);
  color: var(--foreground);
}

.light .tl-kanban-add-col-btn:hover,
[data-mode="light"] .tl-kanban-add-col-btn:hover {
  background: var(--accent);
  border-color: var(--primary);
  color: var(--foreground);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================
   LIGHT MODE TIMELINE FIXES - All Themes
   Task count badges, column counts, progress bars
   ============================================ */

/* Task Count Badges - Light Mode */
.light .tl-task-count-badge,
[data-mode="light"] .tl-task-count-badge,
[data-theme="pink"] .tl-task-count-badge,
[data-theme="purple"] .tl-task-count-badge,
[data-theme="light"] .tl-task-count-badge,
[data-theme="ocean"] .tl-task-count-badge,
[data-theme="forest"] .tl-task-count-badge,
[data-theme="sunset"] .tl-task-count-badge,
[data-theme="midnight"] .tl-task-count-badge {
  background: var(--accent);
  color: var(--foreground);
  border: 1px solid var(--border);
}

.light .tl-task-badge,
[data-mode="light"] .tl-task-badge,
[data-theme="pink"] .tl-task-badge,
[data-theme="light"] .tl-task-badge {
  color: var(--foreground);
  opacity: 0.9;
}

/* Kanban Column Count Badge - Light Mode */
.light .tl-kanban-col-count,
[data-mode="light"] .tl-kanban-col-count,
[data-theme="pink"] .tl-kanban-col-count,
[data-theme="purple"] .tl-kanban-col-count,
[data-theme="light"] .tl-kanban-col-count,
[data-theme="ocean"] .tl-kanban-col-count,
[data-theme="forest"] .tl-kanban-col-count,
[data-theme="sunset"] .tl-kanban-col-count {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
}

.light .tl-kanban-column-count,
[data-mode="light"] .tl-kanban-column-count,
[data-theme="pink"] .tl-kanban-column-count,
[data-theme="light"] .tl-kanban-column-count {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
}

.light .kanban-column-count,
[data-mode="light"] .kanban-column-count,
[data-theme="pink"] .kanban-column-count,
[data-theme="light"] .kanban-column-count {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
}

/* Progress Bar Background - Light Mode */
.light .tl-progress-mini,
[data-mode="light"] .tl-progress-mini,
[data-theme="pink"] .tl-progress-mini,
[data-theme="light"] .tl-progress-mini {
  background: var(--border);
}

.light .tl-progress-bar-mini,
[data-mode="light"] .tl-progress-bar-mini,
[data-theme="pink"] .tl-progress-bar-mini,
[data-theme="light"] .tl-progress-bar-mini {
  background: var(--border);
}

.light .tl-kanban-col-progress,
[data-mode="light"] .tl-kanban-col-progress,
[data-theme="pink"] .tl-kanban-col-progress,
[data-theme="light"] .tl-kanban-col-progress {
  background: var(--border);
}

/* General Progress Bars - Light Mode */
.light .progress-bar,
[data-mode="light"] .progress-bar,
[data-theme="pink"] .progress-bar,
[data-theme="light"] .progress-bar {
  background: var(--border);
}

/* Timeline Header Stats - Light Mode */
.light .tl-stat-chip,
[data-mode="light"] .tl-stat-chip,
[data-theme="pink"] .tl-stat-chip,
[data-theme="light"] .tl-stat-chip {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--foreground);
}

/* Task Board Header Badge - Light Mode */
.light .task-count-badge,
[data-mode="light"] .task-count-badge,
[data-theme="pink"] .task-count-badge,
[data-theme="light"] .task-count-badge {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
}

/* Legacy task-item-clickup styles removed - using new ultra-minimal design */

/* Advanced Toolbar - Light Mode */
.light .tl-advanced-toolbar,
[data-mode="light"] .tl-advanced-toolbar,
[data-theme="pink"] .tl-advanced-toolbar,
[data-theme="light"] .tl-advanced-toolbar {
  background: linear-gradient(90deg, hsla(var(--primary), 0.05) 0%, hsla(var(--accent), 0.05) 100%);
  border-bottom: 1px solid var(--border);
}

.light .tl-adv-btn,
[data-mode="light"] .tl-adv-btn,
[data-theme="pink"] .tl-adv-btn,
[data-theme="light"] .tl-adv-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
}

.light .tl-adv-btn:hover,
[data-mode="light"] .tl-adv-btn:hover,
[data-theme="pink"] .tl-adv-btn:hover,
[data-theme="light"] .tl-adv-btn:hover {
  background: var(--accent);
  border-color: var(--primary);
  color: var(--foreground);
}

.light .tl-adv-btn .btn-badge,
[data-mode="light"] .tl-adv-btn .btn-badge,
[data-theme="pink"] .tl-adv-btn .btn-badge,
[data-theme="light"] .tl-adv-btn .btn-badge {
  background: var(--primary);
  color: var(--primary-foreground);
}

.light .tl-adv-separator,
[data-mode="light"] .tl-adv-separator,
[data-theme="pink"] .tl-adv-separator,
[data-theme="light"] .tl-adv-separator {
  background: var(--border);
}

/* Kanban Section Header Badge - Light Mode */
.light .pd-kanban-section-header,
[data-mode="light"] .pd-kanban-section-header,
[data-theme="pink"] .pd-kanban-section-header,
[data-theme="light"] .pd-kanban-section-header {
  color: var(--foreground);
}

/* Timeline Section Header - Light Mode */
.light .tl-section-header-clickup,
[data-mode="light"] .tl-section-header-clickup,
[data-theme="pink"] .tl-section-header-clickup,
[data-theme="light"] .tl-section-header-clickup {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

/* Progress Chip - Light Mode */
.light .tl-progress-chip,
[data-mode="light"] .tl-progress-chip,
[data-theme="pink"] .tl-progress-chip,
[data-theme="light"] .tl-progress-chip {
  background: var(--card);
  border: 1px solid var(--border);
}

/* Timeline Header - Light Mode */
.light .tl-header.tl-header-clickup,
[data-mode="light"] .tl-header.tl-header-clickup,
[data-theme="pink"] .tl-header.tl-header-clickup,
[data-theme="light"] .tl-header.tl-header-clickup {
  background: linear-gradient(180deg, var(--card) 0%, var(--background) 100%);
  border-bottom: 1px solid var(--border);
}

/* Kanban Card - Light Mode */
.light .tl-kanban-card,
[data-mode="light"] .tl-kanban-card,
[data-theme="pink"] .tl-kanban-card,
[data-theme="light"] .tl-kanban-card {
  background: var(--card);
  border: 1px solid var(--border);
}

.light .tl-kanban-card:hover,
[data-mode="light"] .tl-kanban-card:hover,
[data-theme="pink"] .tl-kanban-card:hover,
[data-theme="light"] .tl-kanban-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px hsla(var(--primary), 0.1);
}

/* Kanban Task Item - Light Mode */
.light .tl-kanban-task,
[data-mode="light"] .tl-kanban-task,
[data-theme="pink"] .tl-kanban-task,
[data-theme="light"] .tl-kanban-task {
  background: var(--card);
  border: 1px solid var(--border);
}

/* Kanban Column - Light Mode */
.light .tl-kanban-column,
[data-mode="light"] .tl-kanban-column,
[data-theme="pink"] .tl-kanban-column,
[data-theme="light"] .tl-kanban-column {
  background: var(--card);
  border: 1px solid var(--border);
}

.light .tl-kanban-column:hover,
[data-mode="light"] .tl-kanban-column:hover,
[data-theme="pink"] .tl-kanban-column:hover,
[data-theme="light"] .tl-kanban-column:hover {
  border-color: var(--primary);
}

/* Kanban Section - Light Mode */
.light .tl-kanban-section,
[data-mode="light"] .tl-kanban-section,
[data-theme="pink"] .tl-kanban-section,
[data-theme="light"] .tl-kanban-section {
  background: var(--card);
  border: 1px solid var(--border);
}

/* Timeline Container - Light Mode */
.light .timeline-linear.clickup-enhanced,
[data-mode="light"] .timeline-linear.clickup-enhanced,
[data-theme="pink"] .timeline-linear.clickup-enhanced,
[data-theme="light"] .timeline-linear.clickup-enhanced {
  background: linear-gradient(180deg, var(--background) 0%, var(--card) 100%);
  box-shadow: 0 8px 40px hsla(0, 0%, 0%, 0.08);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .tl-kanban-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
  }

  .tl-kanban-board {
    padding: 16px;
    gap: 12px;
  }

  .tl-kanban-column {
    width: 260px;
  }

  .tl-kanban-task {
    padding: 10px 12px;
  }
}

/* ============================================
   Advanced Space Features Styles
   ============================================ */

/* Space Agents Styles */
.space-agents-container {
  padding: 20px;
}

.agents-header {
  margin-bottom: 24px;
  text-align: center;
}

.agents-header h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}

.agents-header p {
  color: var(--muted-foreground);
  font-size: 14px;
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.agent-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.agent-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.agent-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--primary-foreground);
}

.agent-icon svg {
  width: 24px;
  height: 24px;
}

.agent-card h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}

.agent-card p {
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.agent-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.agent-status.active {
  background: var(--success-background);
  color: var(--success-foreground);
}

.agent-status.inactive {
  background: var(--muted);
  color: var(--muted-foreground);
}

.agents-actions {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Advanced Space Features - Additional Styles */

/* Bookmark Manager Styles */
.bookmark-manager {
  padding: 20px;
}

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

.bookmark-header h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

.bookmark-actions {
  display: flex;
  gap: 12px;
}

.bookmark-filters {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
}

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

.filter-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.filter-group select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
  color: var(--foreground);
  font-size: 14px;
}

.bookmark-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bookmark-item-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s ease;
}

.bookmark-item-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.bookmark-item-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.bookmark-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--primary-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bookmark-item-icon svg {
  width: 20px;
  height: 20px;
}

.bookmark-item-info {
  flex: 1;
  min-width: 0;
}

.bookmark-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 6px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.bookmark-title:hover {
  color: var(--primary);
}

.bookmark-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--muted-foreground);
}

.bookmark-type {
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.bookmark-item-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--surface);
  color: var(--foreground);
  border-color: var(--border-hover);
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

.bookmark-notes {
  background: var(--surface);
  border-left: 3px solid var(--primary);
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  color: var(--muted-foreground);
  line-height: 1.5;
}

.bookmark-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

/* Bookmark Form Styles */
.add-bookmark-form,
.edit-bookmark-form {
  padding: 20px;
}

.form-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.form-tab {
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.form-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

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

.form-tab-content.active {
  display: block;
}

.form-group {
  margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
  color: var(--foreground);
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-transparent);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

/* Bookmark Item in Space View */
.bookmark-item {
  position: relative;
}

.bookmark-remove-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s ease;
}

.bookmark-item:hover .bookmark-remove-btn {
  opacity: 1;
}

.bookmark-remove-btn:hover {
  background: var(--destructive);
  color: var(--destructive-foreground);
  border-color: var(--destructive);
}

.bookmark-remove-btn svg {
  width: 14px;
  height: 14px;
}

/* Space Agents Styles */
.space-agents-container {
  padding: 20px;
}

.agents-header {
  margin-bottom: 24px;
  text-align: center;
}

.agents-header h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}

.agents-header p {
  color: var(--muted-foreground);
  font-size: 14px;
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.agent-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.agent-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.agent-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--primary-foreground);
}

.agent-icon svg {
  width: 24px;
  height: 24px;
}

.agent-card h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}

.agent-card p {
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.agent-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.agent-status.active {
  background: var(--success-background);
  color: var(--success-foreground);
}

.agent-status.inactive {
  background: var(--muted);
  color: var(--muted-foreground);
}

.agents-actions {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Space Automation Styles */
.space-automation-container {
  padding: 20px;
}

.automation-header {
  margin-bottom: 24px;
}

.automation-header h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}

.automation-header p {
  color: var(--muted-foreground);
  font-size: 14px;
}

.automation-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.automation-filters select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
  color: var(--foreground);
}

.automation-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.automation-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.automation-item:hover {
  border-color: var(--border-hover);
  background: var(--surface);
}

.automation-item.active {
  border-color: var(--success);
}

.automation-item.paused {
  opacity: 0.7;
}

.automation-info h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 4px;
}

.automation-info p {
  color: var(--muted-foreground);
  font-size: 14px;
  margin-bottom: 12px;
}

.automation-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted-foreground);
}

.automation-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.automation-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-indicator.active {
  background: var(--success);
}

.status-indicator.paused {
  background: var(--warning);
}

.status-indicator.draft {
  background: var(--muted-foreground);
}

/* Space Ask Styles */
.space-ask-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ask-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.ask-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}

.ask-header p {
  color: var(--muted-foreground);
  font-size: 14px;
}

.ask-interface {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 0;
}

.ask-history {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ask-message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  animation: fadeInUp 0.3s ease;
}

.ask-message.user {
  align-self: flex-end;
  background: var(--primary);
  color: var(--primary-foreground);
  border-bottom-right-radius: 4px;
}

.ask-message.assistant {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.message-content {
  line-height: 1.5;
}

.ask-input-area {
  border-top: 1px solid var(--border);
  padding: 20px;
}

.ask-input-container {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

#askInput {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--background);
  color: var(--foreground);
  resize: none;
  min-height: 56px;
  max-height: 120px;
}

#askInput:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-transparent);
}

.ask-send-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ask-send-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.ask-suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.suggestion-chip {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted-foreground);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.suggestion-chip:hover {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

/* Space Share Styles */
.space-share-container {
  padding: 20px;
}

.share-header {
  margin-bottom: 24px;
  text-align: center;
}

.share-header h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}

.share-header p {
  color: var(--muted-foreground);
  font-size: 14px;
}

.share-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.share-tab {
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.share-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

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

.share-tab-content.active {
  display: block;
}

.invite-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.invite-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 16px;
}

.invite-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.invite-form input,
.invite-form select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
  color: var(--foreground);
}

.invite-form input {
  flex: 1;
}

.members-list h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 16px;
}

.member-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
}

.member-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  overflow: hidden;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-details {
  display: flex;
  flex-direction: column;
}

.member-name {
  font-weight: 500;
  color: var(--foreground);
}

.member-email {
  font-size: 13px;
  color: var(--muted-foreground);
}

.member-role select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
  color: var(--foreground);
}

.invite-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
}

.invite-email {
  flex: 1;
  font-weight: 500;
  color: var(--foreground);
}

.invite-role {
  color: var(--muted-foreground);
  font-size: 13px;
}

.invite-date {
  color: var(--muted-foreground);
  font-size: 12px;
}

.invite-actions {
  display: flex;
  gap: 8px;
}

.setting-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

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

.setting-item label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  margin-bottom: 8px;
}

.setting-description {
  color: var(--muted-foreground);
  font-size: 13px;
  margin-left: 28px;
}

.invite-link-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.invite-link-section h5 {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 12px;
}

.invite-link-container {
  display: flex;
  gap: 12px;
}

.invite-link-container input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--foreground);
  font-family: monospace;
  font-size: 13px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .agents-grid {
    grid-template-columns: 1fr;
  }

  .automation-toolbar {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .invite-form {
    flex-direction: column;
    align-items: stretch;
  }

  .member-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .invite-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .ask-message {
    max-width: 90%;
  }
}

/* Context Menu */
.context-menu {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  padding: 6px 0;
  min-width: 180px;
  z-index: 1000;
  backdrop-filter: blur(12px);
}

.context-menu-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.context-menu-user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--foreground);
  margin-bottom: 4px;
}

.context-menu-user-email {
  font-size: 12px;
  color: var(--muted-foreground);
}

.context-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.context-menu-item:hover {
  background: var(--surface-hover);
  color: var(--primary);
}

.context-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.context-menu-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.context-menu-item.disabled:hover {
  background: transparent;
  color: var(--foreground);
}

/* Tooltip arrow for avatar hover */
.pd-member-avatar[title]:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% - 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--card);
  z-index: 1002;
}

.context-menu-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.context-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* Member Avatar Context Menu Trigger */
.pd-member-avatar {
  cursor: context-menu;
}

.pd-member-avatar.context-menu-active {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}


/* ============================================
   Team Loading Animation
   ============================================ */
.team-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.team-logo-loader {
  position: relative;
  width: 64px;
  height: 64px;
  animation: logoFloat 3s ease-in-out infinite;
}

.logo-loader-animated {
  filter: drop-shadow(0 4px 12px rgba(124, 58, 237, 0.3));
}

/* Individual layer animations */
.logo-layer {
  transform-origin: center;
}

.logo-layer-1 {
  animation: layerPulse1 2s ease-in-out infinite;
}

.logo-layer-2 {
  animation: layerPulse2 2s ease-in-out infinite 0.2s;
}

.logo-layer-3 {
  animation: layerPulse3 2s ease-in-out infinite 0.4s;
}

.logo-layer-4 {
  animation: layerPulse4 2s ease-in-out infinite 0.6s;
}

.team-loading-text {
  font-size: 13px;
  color: var(--muted-foreground);
  animation: textFade 2s ease-in-out infinite;
}

/* Keyframe animations */
@keyframes logoFloat {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes layerPulse1 {

  0%,
  100% {
    opacity: 0.28;
    transform: scale(1);
  }

  50% {
    opacity: 0.45;
    transform: scale(1.05);
  }
}

@keyframes layerPulse2 {

  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }

  50% {
    opacity: 0.75;
    transform: scale(1.05);
  }
}

@keyframes layerPulse3 {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.85;
    transform: scale(1.08);
  }
}

@keyframes layerPulse4 {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.85;
    transform: scale(1.08);
  }
}

@keyframes textFade {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

/* ============================================
   AI View - Minimalistic Design
   ============================================ */

/* Main Container */
.ai-view-minimal {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--background);
  overflow-y: auto;
}

/* Main Content Area */
.ai-main-content {
  display: flex;
  flex-direction: column;
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
  min-height: 100vh;
}

/* Header */
.ai-header-minimal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}

.ai-badge-simple {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--muted-foreground);
  font-weight: 500;
}

.ai-badge-simple svg {
  color: var(--primary);
}



.ai-history-btn-minimal {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-history-btn-minimal:hover {
  background: var(--surface);
  color: var(--foreground);
  border-color: var(--border-strong);
}

.ai-history-btn-minimal svg {
  width: 16px;
  height: 16px;
}

/* Center Content */
.ai-center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  padding: 48px 0;
}

/* Title */
.ai-title-minimal {
  font-size: 32px;
  font-weight: 700;
  color: var(--foreground);
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
}

/* Subtitle */
.ai-subtitle-minimal {
  font-size: 16px;
  color: var(--muted-foreground);
  margin: 0 0 48px 0;
  font-weight: 400;
}

/* Input Card */
.ai-input-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 600px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.ai-input-card:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Input */
.ai-input-minimal {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--foreground);
  font-size: 15px;
  outline: none;
  font-family: inherit;
}

.ai-input-minimal::placeholder {
  color: var(--muted-foreground);
}

/* Send Button */
.ai-send-btn-minimal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  color: var(--primary-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ai-send-btn-minimal:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.ai-send-btn-minimal svg {
  width: 18px;
  height: 18px;
}

/* Suggestions */
.ai-suggestions-minimal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
  max-width: 600px;
}

.ai-suggestion-chip {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ai-suggestion-chip:hover {
  background: var(--accent);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}


/* Responsive Design */
@media (max-width: 768px) {
  .ai-main-content {
    padding: 16px;
  }

  .ai-header-minimal {
    margin-bottom: 32px;
  }

  .ai-title-minimal {
    font-size: 28px;
  }

  .ai-subtitle-minimal {
    font-size: 14px;
    margin-bottom: 32px;
  }

  .ai-input-card {
    padding: 12px 16px;
  }

  .ai-history-btn-minimal span {
    display: none;
  }

  .ai-history-sidebar {
    width: 280px;
  }
}

/* Light Mode Adjustments */
.light .ai-input-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.light .ai-input-card:focus-within {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

/* ============================================
   Gantt Guide Bubble
   ============================================ */

.gantt-guide-bubble {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 12px;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 12px 16px;
  border-radius: 8px;
  width: 260px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 100;
  animation: slideDownFade 0.3s ease-out;
  pointer-events: auto;
}

.gantt-guide-arrow {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--primary);
}

.gantt-guide-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.gantt-guide-text {
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
  flex: 1;
  color: var(--primary-foreground);
}

.gantt-guide-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: var(--primary-foreground);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.gantt-guide-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translate(-50%, -10px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ============================================
   Generic Guide Bubble
   ============================================ */

.guide-bubble {
  position: absolute;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 12px 16px;
  border-radius: 8px;
  width: 260px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 100;
  animation: slideDownFade 0.3s ease-out;
  pointer-events: auto;
}

.guide-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--primary);
}

.guide-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.guide-text {
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
  flex: 1;
  color: var(--primary-foreground);
}

.guide-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: var(--primary-foreground);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.guide-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Positioning Variants */
.guide-bubble.bottom-center {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 12px;
}

.guide-bubble.bottom-center .guide-arrow {
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
}

/* ============================================
   Login Page Overlay Styles
   ============================================ */

.light .login-page-overlay,
[data-mode="light"] .login-page-overlay {
  background: #f8fafc;
}

.light .login-page-container,
[data-mode="light"] .login-page-container {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.light .login-page-left,
[data-mode="light"] .login-page-left {
  background: rgba(0, 0, 0, 0.02);
  border-right-color: rgba(0, 0, 0, 0.05);
}

.light .login-title,
[data-mode="light"] .login-title {
  color: #1e293b;
}

.light .login-subtitle,
[data-mode="light"] .login-subtitle {
  color: #64748b;
}

.light .login-form-header h2,
[data-mode="light"] .login-form-header h2 {
  color: #1e293b;
}

.light .login-form-header p,
[data-mode="light"] .login-form-header p {
  color: #64748b;
}

.light .login-tabs,
[data-mode="light"] .login-tabs {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.05);
}

.light .login-tab,
[data-mode="light"] .login-tab {
  color: #64748b;
}

.light .login-tab.active,
[data-mode="light"] .login-tab.active {
  background: #ffffff;
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.light .login-form-label,
[data-mode="light"] .login-form-label {
  color: #475569;
}

.light .login-input-icon,
[data-mode="light"] .login-input-icon {
  color: #94a3b8;
}

.light .login-form-input,
[data-mode="light"] .login-form-input {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #1e293b;
}

.light .login-form-input::placeholder,
[data-mode="light"] .login-form-input::placeholder {
  color: #94a3b8;
}

.light .login-form-input:focus,
[data-mode="light"] .login-form-input:focus {
  border-color: #7c3aed;
  background: #ffffff;
}

.light .login-submit-btn,
[data-mode="light"] .login-submit-btn {
  background: #7c3aed;
  color: #ffffff;
}

.light .login-submit-btn:hover,
[data-mode="light"] .login-submit-btn:hover {
  background: #6d28d9;
}

.light .login-divider::before,
.light .login-divider::after,
[data-mode="light"] .login-divider::before,
[data-mode="light"] .login-divider::after {
  background: #e2e8f0;
}

.light .login-divider span,
[data-mode="light"] .login-divider span {
  color: #94a3b8;
}

.light .google-login-btn,
[data-mode="light"] .google-login-btn {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #475569;
}

.light .google-login-btn:hover,
[data-mode="light"] .google-login-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.login-page-overlay {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8888;
  opacity: 0;
  animation: loginFadeIn 0.6s ease-out forwards;
}


.login-page-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

@keyframes loginFadeIn {
  to {
    opacity: 1;
  }
}

.login-page-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 1200px;
  height: 80vh;
  max-height: 800px;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  position: relative;
  z-index: 1;
}

/* Left Side - Branding */
.login-page-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 40px;
  background: rgba(255, 255, 255, 0.04);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.login-branding {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.login-logo {
  margin-bottom: 8px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  width: 180px;
  height: 180px;
}

.login-logo svg {
  width: 100%;
  height: 100%;
}

.login-logo:hover {
  opacity: 1;
}

.login-title {
  font-size: 2.5rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
  letter-spacing: -0.03em;
}

.login-subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.68);
  margin: 0;
  font-weight: 400;
}

/* Right Side - Form */
.login-page-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
}

.login-form-container {
  width: 100%;
  max-width: 380px;
}

.login-form-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-form-header h2 {
  font-size: 1.5rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}

.login-form-header p {
  color: rgba(255, 255, 255, 0.68);
  margin: 0;
  font-size: 0.9rem;
  font-weight: 400;
}

.login-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.login-tab {
  flex: 1;
  padding: 10px 20px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.login-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.login-tab:hover:not(.active) {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-form-label {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.login-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.55);
  z-index: 1;
}

.login-form-input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  outline: none;
  font-family: inherit;
}

.login-form-input::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.login-form-input:focus {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 0 0 4px rgba(124, 58, 237, 0.22),
    0 10px 30px rgba(0, 0, 0, 0.25);
  background: rgba(0, 0, 0, 0.18);
}

.login-form-input:focus-visible,
.login-tab:focus-visible,
.login-submit-btn:focus-visible,
.google-login-btn:focus-visible {
  outline: none;
}

.login-error {
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  color: var(--error);
  font-size: 0.875rem;
  text-align: center;
}

.login-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  border-radius: 12px;
  color: rgba(0, 0, 0, 0.9);
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
  font-family: inherit;
}

.login-submit-btn:hover {
  background: rgba(255, 255, 255, 0.98);
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.login-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.login-submit-btn:active {
  transform: translateY(0);
}

.login-submit-btn svg {
  width: 18px;
  height: 18px;
}

.login-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 0 20px 0;
  position: relative;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.login-divider span {
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  font-weight: 500;
}

.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.20);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.google-login-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.google-login-btn:active {
  transform: translateY(0);
}

.google-login-btn svg {
  width: 18px;
  height: 18px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .login-page-container {
    grid-template-columns: 1fr;
    height: 100vh;
    max-height: none;
    border-radius: 0;
  }

  .login-page-left {
    display: none;
  }

  .login-page-right {
    padding: 40px 24px;
  }

  .login-form-container {
    max-width: none;
  }

  .login-title {
    font-size: 2rem;
  }

  .login-form-header h2 {
    font-size: 1.375rem;
  }
}

@media (max-width: 480px) {
  .login-page-right {
    padding: 32px 20px;
  }

  .login-form-header {
    margin-bottom: 28px;
  }

  .login-form-header h2 {
    font-size: 1.25rem;
  }

  .login-form-input {
    padding: 12px 12px 12px 42px;
  }

  .login-submit-btn {
    padding: 12px 18px;
  }
}

/* ============================================
   Folders Feature - Enhanced Grid & Cards
   ============================================ */

.folders-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.folders-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
}

.folders-view-toggle {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border-radius: 8px;
  padding: 4px;
}

.folders-view-toggle .view-toggle-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  transition: all 0.15s;
}

.folders-view-toggle .view-toggle-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.folders-view-toggle .view-toggle-btn.active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.folders-view-toggle .view-toggle-btn svg {
  width: 16px;
  height: 16px;
}

.folders-grid.enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.folders-grid.enhanced.list-view {
  grid-template-columns: 1fr;
}

.folder-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.folder-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--folder-color, var(--primary));
  opacity: 0;
  transition: opacity 0.2s;
}

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

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

.folder-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-ring);
}

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

.folder-emoji {
  font-size: 28px;
  line-height: 1;
}

.folder-card-menu {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  opacity: 0;
  transition: all 0.15s;
}

.folder-card:hover .folder-card-menu {
  opacity: 1;
}

.folder-card-menu:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.folder-card-menu svg {
  width: 16px;
  height: 16px;
}

.folder-card-body {
  margin-bottom: 12px;
}

.folder-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-card-description {
  font-size: 12px;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.folder-counts {
  display: flex;
  gap: 12px;
}

.folder-count {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted-foreground);
}

.folder-count svg {
  width: 14px;
  height: 14px;
}

.folder-count.docs svg {
  color: var(--primary);
}

.folder-count.quizzes svg {
  color: var(--accent);
}

.folder-updated {
  font-size: 11px;
  color: var(--muted-foreground);
}

/* Add Folder Card */
.folder-card.add-folder-card {
  border: 2px dashed var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.folder-card.add-folder-card:hover {
  border-color: var(--primary);
  background: var(--surface);
  transform: none;
  box-shadow: none;
}

.add-folder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted-foreground);
}

.add-folder-content svg {
  width: 24px;
  height: 24px;
}

.add-folder-content span {
  font-size: 13px;
  font-weight: 500;
}

/* Floating Upload Button */
.folder-upload-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
  z-index: 100;
}

.folder-upload-fab:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.folder-upload-fab svg {
  width: 20px;
  height: 20px;
}

.folder-upload-fab .fab-text {
  display: none;
}

@media (min-width: 768px) {
  .folder-upload-fab {
    width: auto;
    padding: 0 20px;
    border-radius: 12px;
  }

  .folder-upload-fab .fab-text {
    display: inline;
    font-size: 14px;
    font-weight: 600;
  }
}

/* ============================================
   Modern Folder List in Space View
   ============================================ */

.folders-section-header-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}

.folders-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.folders-section-title-modern {
  font-size: 18px;
  font-weight: 700;
  color: var(--foreground);
}

.folder-total-badge {
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
}

.btn-primary-minimal {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--foreground);
  color: var(--background);
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  height: 36px;
}

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

.folder-list-container-modern {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
}

.folder-list-header-modern {
  display: grid;
  grid-template-columns: 48px 1fr 180px 140px 120px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--glass-border);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.folder-list-row-modern {
  display: grid;
  grid-template-columns: 40px 1fr 120px 120px 80px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--glass-border-subtle);
  align-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 16px;
  min-height: 48px;
}

.folder-list-row-modern:hover {
  background: var(--glass-bg-secondary);
  border-color: var(--glass-border-normal);
}

.folder-list-row-modern:last-child {
  border-bottom: none;
}

/* Column Structure */
.col-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.col-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
}

.col-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}

.col-date {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--muted-foreground);
  font-size: 13px;
}

.col-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 60px !important;
  z-index: 5;
  opacity: 1 !important;
  visibility: visible !important;
}

.folder-row-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-row-desc {
  display: block;
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  background: var(--glass-bg-tertiary);
  border: 1px solid var(--glass-border-subtle);
  color: var(--muted-foreground);
}

.stat-pill svg {
  width: 12px;
  height: 12px;
}

.stat-pill.doc { 
  color: var(--primary); 
  background: hsl(var(--primary) / 0.1);
  border-color: hsl(var(--primary) / 0.2);
}

.stat-pill.quiz { 
  color: #f472b6; 
  background: hsl(330, 81%, 60% / 0.1);
  border-color: hsl(330, 81%, 60% / 0.2);
}

.folder-row-date {
  font-size: 12px;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.folder-row-emoji {
  font-size: 18px;
  line-height: 1;
}

/* New Action Button Design - Minimalistic & Clean */
.row-action-btn-modern {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 32px !important;
  height: 32px !important;
  border: 1px solid var(--glass-border-subtle) !important;
  border-radius: 6px;
  background: var(--glass-bg-primary) !important;
  backdrop-filter: blur(var(--glass-blur-light)) !important;
  -webkit-backdrop-filter: blur(var(--glass-blur-light)) !important;
  color: var(--muted-foreground) !important;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 10;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.row-action-btn-modern svg {
  width: 16px !important;
  height: 16px !important;
  stroke: var(--muted-foreground) !important;
  stroke-width: 1.5px !important;
  transition: stroke 0.2s ease;
}

.row-action-btn-modern:hover {
  background: var(--glass-bg-secondary) !important;
  border-color: var(--glass-border-normal) !important;
  color: var(--foreground) !important;
  transform: scale(1.02);
}

.row-action-btn-modern:hover svg {
  stroke: var(--foreground) !important;
}

.row-action-btn-modern.delete {
  /* Same style as other buttons */
  color: var(--muted-foreground) !important;
}

.row-action-btn-modern.delete svg {
  stroke: var(--muted-foreground) !important;
}

.row-action-btn-modern.delete:hover svg {
  stroke: var(--foreground) !important;
}





.folder-menu-dropdown {
  position: fixed;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 6px;
  min-width: 140px;
  z-index: 1000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-ai-menu-dropdown {
  position: fixed;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 6px;
  min-width: 180px;
  z-index: 1000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.folder-menu-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.15s;
}

.doc-ai-menu-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.15s;
}

.folder-menu-dropdown button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.doc-ai-menu-dropdown button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.folder-menu-dropdown button svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.doc-ai-menu-dropdown button svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.folder-menu-dropdown button.danger {
  color: #ef4444;
}

.folder-menu-dropdown button.danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* --- Responsive for modern list --- */
@media (max-width: 768px) {
  .folder-list-header-modern {
    display: none;
  }
  .folder-list-row-modern {
    grid-template-columns: 48px 1fr auto;
    gap: 8px;
  }
  .col-stats, .col-date {
    display: none;
  }
  .col-actions {
    grid-column: 3;
  }
}

.folder-explorer-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
  gap: 24px;
}

.folder-explorer-header-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  flex-wrap: wrap;
  gap: 16px;
}

.folder-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-btn-minimal {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s;
}

.back-btn-minimal:hover {
  background: var(--surface-hover);
  color: var(--foreground);
  border-color: var(--border-hover);
}

.folder-title-area {
  display: flex;
  flex-direction: column;
}

.folder-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.folder-emoji-small {
  font-size: 20px;
}

.folder-count-badge {
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-foreground);
}

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

.folder-content-tabs-modern {
  display: flex;
  padding: 4px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 1px solid var(--glass-border);
}

.folder-tab-modern {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.folder-tab-modern.active {
  background: var(--primary);
  color: var(--primary-foreground);
}

 .folder-actions-pills {
   flex-wrap: wrap;
   justify-content: flex-end;
   gap: 2px;
 }

 .folder-tab-modern.folder-action-pill {
   white-space: nowrap;
 }

 .folder-tab-modern.folder-action-pill:hover {
   background: rgba(255, 255, 255, 0.08);
   color: var(--foreground);
 }

 .folder-tab-modern.folder-action-pill:active {
   transform: translateY(0px);
 }

 .folder-tab-modern.folder-action-pill svg {
   width: 16px;
   height: 16px;
 }

.tab-count-pill {
  font-size: 10px;
  padding: 1px 6px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  opacity: 0.8;
}

.header-divider {
  width: 1px;
  height: 24px;
  background: var(--glass-border);
}

.btn-primary-modern {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--foreground);
  color: var(--background);
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  height: 36px;
}

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

.icon-btn-modern {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s;
}

.folder-content-wrapper-modern {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.folder-list-header {
  display: grid;
  grid-template-columns: 48px 1fr 180px 140px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--glass-border);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.folder-list-header .col-actions {
  text-align: right;
}

.folder-list-body {
  display: flex;
  flex-direction: column;
}

.folder-list-item {
  display: grid;
  grid-template-columns: 48px 1fr 180px 140px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--glass-border);
  align-items: center;
  cursor: pointer;
  transition: all 0.15s;
}

.folder-list-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.folder-list-item:last-child {
  border-bottom: none;
}

.file-icon-mini {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-icon-mini.emoji-only {
  background: transparent !important;
  color: var(--foreground) !important;
}

.file-icon-mini.doc { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.file-icon-mini.quiz { background: rgba(236, 72, 153, 0.15); color: #f472b6; }

.file-icon-mini svg { width: 16px; height: 16px; }

.item-title-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
}

.item-date-text {
  font-size: 13px;
  color: var(--muted-foreground);
}

.count-badge-minimal {
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted-foreground);
}

.row-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.folder-list-item:hover .row-action-btn {
  opacity: 1;
}

.row-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--foreground);
}

.row-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.row-action-btn svg { width: 16px; height: 16px; }

.folder-empty-state-modern {
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.empty-icon-large {
  color: var(--muted-foreground);
  opacity: 0.3;
  margin-bottom: 8px;
}

.empty-icon-large svg { width: 48px; height: 48px; }

.btn-text-modern {
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

.btn-text-modern:hover { text-decoration: underline; }

/* Column specific widths for Quizzes */
.quizzes-section .folder-list-header,
.quizzes-section .folder-list-item {
  grid-template-columns: 48px 1fr 120px 100px;
}

/* ============================================
   Folder Explorer View
   ============================================ */

.folder-explorer-container {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.folder-explorer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)) , var(--card);
  border-radius: 16px;
}

.folder-explorer-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
  flex: 1;
  min-width: 0;
}

.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.back-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.back-btn svg {
  width: 18px;
  height: 18px;
}

.folder-emoji-large {
  font-size: 34px;
  line-height: 1;
}

.folder-explorer-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.folder-hero-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.folder-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.folder-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted-foreground);
  font-size: 12px;
  user-select: none;
}

.folder-stat-label {
  font-weight: 600;
  color: var(--muted-foreground);
}

.folder-stat-value {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
}

.folder-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.folder-explorer-title {
  font-size: 18px;
  font-weight: 750;
  color: var(--foreground);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-explorer-description {
  font-size: 14px;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 68ch;
}

.folder-explorer-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.folder-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  height: 38px;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}

.folder-action-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.folder-action-btn.primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.folder-action-btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.folder-action-btn:active {
  transform: translateY(0px);
}

.folder-action-btn:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.45);
  outline-offset: 2px;
}

.folder-action-label {
  display: inline-block;
  letter-spacing: 0.01em;
}

.folder-action-btn.icon-only {
  width: 38px;
  padding: 0;
  justify-content: center;
}

.folder-action-btn.icon-only svg {
  margin: 0;
}

.folder-action-btn svg {
  width: 16px;
  height: 16px;
}

/* Content Tabs */
.folder-content-tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0 18px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.folder-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
}

.folder-tab:hover {
  color: var(--foreground);
  background: var(--surface);
}

.folder-tab.active {
  color: var(--primary);
  background: var(--primary-light);
}

.folder-tab-count {
  margin-left: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
}

.folder-tab.active .folder-tab-count {
  background: rgba(255,255,255,0.16);
  border-color: transparent;
  color: var(--primary);
}

.folder-tab svg {
  width: 16px;
  height: 16px;
}

/* Content Area */
.folder-content-area {
  min-height: 300px;
}

@media (max-width: 720px) {
  .folder-explorer-header {
    padding: 14px;
  }

  .folder-explorer-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .folder-explorer-actions .folder-action-btn.primary {
    min-width: 120px;
    justify-content: center;
  }

  .folder-hero-meta {
    display: none;
  }
}

.folder-section {
  display: none;
}

.folder-section.active {
  display: block;
}

.folder-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.folder-item-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.folder-item-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.item-icon.doc-icon {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: white;
}

.item-icon.quiz-icon {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  color: white;
}

.item-icon svg {
  width: 20px;
  height: 20px;
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.item-meta {
  font-size: 12px;
  color: var(--muted-foreground);
}

.item-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}

.folder-item-card:hover .item-actions {
  opacity: 1;
}

.item-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.item-action-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

.item-action-btn svg {
  width: 16px;
  height: 16px;
}

/* Empty Content */
.folder-empty-content {
  text-align: center;
  padding: 48px 24px;
}

.folder-empty-content .empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--muted-foreground);
}

.folder-empty-content .empty-icon svg {
  width: 32px;
  height: 32px;
}

.folder-empty-content .empty-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 4px;
}

.folder-empty-content .empty-hint {
  font-size: 13px;
  color: var(--muted-foreground);
}

.folder-empty-cta {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--foreground);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.folder-empty-cta:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.folder-empty-cta:active {
  transform: translateY(0px);
}

.folder-empty-cta:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.45);
  outline-offset: 2px;
}

.folder-empty-cta svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Upload Modal
   ============================================ */

.upload-modal-content {
  max-width: 500px;
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  transition: all 0.2s;
}

.upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--primary);
}

.upload-icon svg {
  width: 32px;
  height: 32px;
}

.upload-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}

.upload-subtitle {
  font-size: 14px;
  color: var(--muted-foreground);
  margin-bottom: 20px;
}

.upload-browse-btn {
  padding: 10px 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--foreground);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.upload-browse-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.upload-hint {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 12px;
}

/* Upload Preview */
.upload-preview {
  padding: 8px 0;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border-radius: 12px;
  margin-bottom: 20px;
}

.preview-file-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-file-icon svg {
  width: 20px;
  height: 20px;
}

.preview-file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preview-file-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.preview-file-size {
  font-size: 12px;
  color: var(--muted-foreground);
}

.preview-remove-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.preview-remove-btn:hover {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

.preview-remove-btn svg {
  width: 16px;
  height: 16px;
}

/* AI Action Cards */
.ai-action-cards {
  margin-bottom: 16px;
}

.action-cards-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 12px;
}

.ai-action-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.ai-action-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.action-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.action-card-icon.summary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
}

.action-card-icon.quiz {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
}

.action-card-icon svg {
  width: 24px;
  height: 24px;
}

.action-card-content {
  flex: 1;
}

.action-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 4px;
}

.action-card-description {
  font-size: 12px;
  color: var(--muted-foreground);
}

.action-card-arrow {
  color: var(--muted-foreground);
  transition: transform 0.2s;
}

.ai-action-card:hover .action-card-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

.action-card-arrow svg {
  width: 20px;
  height: 20px;
}

/* Quiz Options Panel */
.quiz-options-panel {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}

.quiz-options-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 12px;
}

.quiz-options-form .form-group {
  margin-bottom: 16px;
}

/* Upload Progress */
.upload-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border-radius: 12px;
  margin-top: 16px;
}

.progress-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.progress-text {
  font-size: 14px;
  color: var(--foreground);
}

/* ============================================
   Quiz Viewer
   ============================================ */

.quiz-viewer {
  max-width: 600px;
}

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

.quiz-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
}

.quiz-meta {
  font-size: 13px;
  color: var(--muted-foreground);
  background: var(--surface);
  padding: 4px 12px;
  border-radius: 20px;
}

.quiz-progress {
  height: 4px;
  background: var(--surface);
  border-radius: 2px;
  margin-bottom: 24px;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.quiz-questions {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}

.quiz-question {
  margin-bottom: 24px;
}

.question-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 12px;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  width: 100%;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--surface);
}

.quiz-option.correct {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.quiz-option.incorrect {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.quiz-option:disabled {
  cursor: default;
}

.option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
  flex-shrink: 0;
}

.quiz-option.correct .option-letter {
  background: #10b981;
  color: white;
}

.quiz-option.incorrect .option-letter {
  background: #ef4444;
  color: white;
}

.option-text {
  font-size: 14px;
  color: var(--foreground);
}

.quiz-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.quiz-score {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  padding: 24px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
  border-radius: 16px;
}

.score-content {
  text-align: center;
}

.score-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  display: block;
}

.score-label {
  font-size: 14px;
  color: var(--muted-foreground);
}

/* ============================================
   Folder Menu Dropdown
   ============================================ */

.folder-menu-dropdown {
  position: fixed;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 140px;
}

.folder-menu-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
}

.folder-menu-dropdown button:hover {
  background: var(--surface-hover);
}

.folder-menu-dropdown button.danger {
  color: var(--destructive);
}

.folder-menu-dropdown button.danger:hover {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

.folder-menu-dropdown button svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Quiz Generation Modal
   ============================================ */

.quiz-gen-modal {
  padding: 8px 0;
}

.quiz-gen-modal h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 16px;
}

/* ============================================
   Folders Empty State
   ============================================ */

.folders-empty-state {
  text-align: center;
  padding: 32px 24px;
  background: var(--card);
  border: 2px dashed var(--border);
  border-radius: 12px;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
  .folder-explorer-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .folder-explorer-actions {
    width: 100%;
  }

  .folder-action-btn {
    flex: 1;
    justify-content: center;
  }

  .folder-items-grid {
    grid-template-columns: 1fr;
  }

  .folder-card {
    padding: 12px;
  }

  .folder-emoji {
    font-size: 24px;
  }

  .folder-upload-fab {
    bottom: 16px;
    right: 16px;
  }
}

@media (max-width: 480px) {
  .folder-explorer-container {
    padding: 16px;
  }

  .folder-explorer-title {
    font-size: 20px;
  }

  .folder-content-tabs {
    flex-wrap: wrap;
  }

  .ai-action-card {
    padding: 12px;
  }

  .action-card-icon {
    width: 40px;
    height: 40px;
  }
}

/* ============================================
   Folders V2 - Rebuilt UI
   Professional glassmorphism folder cards
   ============================================ */

/* Folders Grid V2 */
.folders-grid-v2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 8px 0;
}

@media (max-width: 640px) {
  .folders-grid-v2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Folder Card V2 - Glassmorphism */
.folder-card-v2 {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.folder-card-v2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--folder-color, var(--primary));
  opacity: 0;
  transition: opacity 0.2s;
}

.folder-card-v2:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.15),
    0 0 0 1px var(--border-hover);
}

.folder-card-v2:hover::before {
  opacity: 1;
}

.folder-card-v2:active {
  transform: translateY(-2px);
}

/* Folder Card Header */
.folder-card-v2 .folder-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.folder-card-v2 .folder-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.folder-card-v2:hover .folder-icon-wrapper {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.folder-card-v2 .folder-menu-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s;
}

.folder-card-v2:hover .folder-menu-btn {
  opacity: 1;
}

.folder-card-v2 .folder-menu-btn:hover {
  background: var(--surface-hover);
  color: var(--foreground);
}

/* Folder Card Body */
.folder-card-v2 .folder-body {
  margin-bottom: 16px;
}

.folder-card-v2 .folder-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-card-v2 .folder-description {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.4;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Folder Card Footer */
.folder-card-v2 .folder-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.folder-card-v2 .folder-counts {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.folder-card-v2 .folder-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  background: var(--surface);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
}

.folder-card-v2 .folder-count-badge svg {
  width: 12px;
  height: 12px;
}

.folder-card-v2 .folder-updated {
  font-size: 11px;
  color: var(--muted-foreground);
  white-space: nowrap;
}

/* Folder Color Tag */
.folder-color-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--folder-color, var(--primary));
}

/* Add Folder Card */
.folder-card-v2.add-folder {
  border: 2px dashed var(--border);
  background: transparent;
  backdrop-filter: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  gap: 12px;
}

.folder-card-v2.add-folder:hover {
  border-color: var(--primary);
  background: var(--surface);
  transform: none;
  box-shadow: none;
}

.folder-card-v2.add-folder .add-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  transition: all 0.2s;
}

.folder-card-v2.add-folder:hover .add-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.folder-card-v2.add-folder .add-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
}

/* ============================================
   New Folder FAB Button
   ============================================ */

.new-folder-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}

.new-folder-fab:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.new-folder-fab:active {
  transform: translateY(0) scale(0.98);
}

.new-folder-fab svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 640px) {
  .new-folder-fab {
    bottom: 16px;
    right: 16px;
    padding: 12px 20px;
    border-radius: 12px;
  }
}

/* ============================================
   Folder Detail Modal
   ============================================ */

.folder-detail-modal {
  position: fixed;
  inset: 0;
  background: var(--background);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.folder-detail-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.folder-detail-back {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.folder-detail-back:hover {
  background: var(--border);
}

.folder-detail-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.folder-detail-info h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 2px;
}

.folder-detail-info p {
  font-size: 13px;
  color: var(--muted-foreground);
}

.folder-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.folder-detail-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--foreground);
}

.folder-detail-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.folder-detail-btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.folder-detail-btn.primary:hover {
  background: var(--primary-dark);
}

.folder-detail-btn svg {
  width: 16px;
  height: 16px;
}

/* Folder Detail Content */
.folder-detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.folder-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

@media (max-width: 640px) {
  .folder-items-grid {
    grid-template-columns: 1fr;
  }
}

/* Folder Item Card */
.folder-item-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.folder-item-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.folder-item-card .item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}

.folder-item-card .item-icon.doc {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.folder-item-card .item-icon.pdf {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.folder-item-card .item-icon.quiz {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
}

.folder-item-card .item-icon.summary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.folder-item-card .item-icon svg {
  width: 20px;
  height: 20px;
}

.folder-item-card .item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-item-card .item-meta {
  font-size: 12px;
  color: var(--muted-foreground);
}

.folder-item-card .item-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.folder-item-card .item-action-btn {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.folder-item-card .item-action-btn:hover {
  background: var(--surface-hover);
}

.folder-item-card .item-action-btn.ai {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  border: none;
  color: white;
}

.folder-item-card .item-action-btn.ai:hover {
  opacity: 0.9;
}

/* PDF Preview Card */
.pdf-preview-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.pdf-preview-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.pdf-preview-card .pdf-thumbnail {
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.pdf-preview-card .pdf-thumbnail svg {
  width: 48px;
  height: 48px;
  color: #dc2626;
}

.pdf-preview-card .pdf-info {
  padding: 12px;
}

.pdf-preview-card .pdf-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.pdf-preview-card .pdf-size {
  font-size: 11px;
  color: var(--muted-foreground);
}

/* AI Action Buttons Container */
.ai-actions-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.ai-actions-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 4px;
}

.ai-action-btn-large {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-action-btn-large:hover {
  border-color: var(--primary);
  background: var(--surface-hover);
  transform: translateX(4px);
}

.ai-action-btn-large .action-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: white;
}

.ai-action-btn-large .action-icon svg {
  width: 22px;
  height: 22px;
}

.ai-action-btn-large .action-content {
  flex: 1;
}

.ai-action-btn-large .action-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 2px;
}

.ai-action-btn-large .action-desc {
  font-size: 12px;
  color: var(--muted-foreground);
}

.ai-action-btn-large .action-arrow {
  color: var(--muted-foreground);
  transition: transform 0.2s;
}

.ai-action-btn-large:hover .action-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

/* ============================================
   Folder Creation Modal
   ============================================ */

.folder-create-modal {
  padding: 8px;
}

.folder-create-modal .form-group {
  margin-bottom: 20px;
}

.folder-create-modal .form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 8px;
  display: block;
}

.folder-create-modal .form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--foreground);
  font-size: 14px;
  transition: all 0.2s;
}

.folder-create-modal .form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.folder-create-modal .form-textarea {
  min-height: 80px;
  resize: vertical;
}

/* Color Picker */
.color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-picker .color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
}

.color-picker .color-swatch:hover {
  transform: scale(1.1);
}

.color-picker .color-swatch.active {
  border-color: var(--foreground);
  box-shadow: 0 0 0 2px var(--background);
}

/* Emoji Picker */
.emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.emoji-picker .emoji-option {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.emoji-picker .emoji-option:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.emoji-picker .emoji-option.active {
  background: var(--primary);
  border-color: var(--primary);
}

/* ============================================
   Upload Zone
   ============================================ */

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--surface);
}

.upload-zone .upload-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--muted-foreground);
}

.upload-zone .upload-icon svg {
  width: 32px;
  height: 32px;
}

.upload-zone .upload-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 4px;
}

.upload-zone .upload-subtitle {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-bottom: 16px;
}

.upload-zone .upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.upload-zone .upload-btn:hover {
  background: var(--primary-dark);
}

/* ============================================
   Empty States
   ============================================ */

.folders-empty-state {
  text-align: center;
  padding: 60px 24px;
}

.folders-empty-state .empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--muted-foreground);
}

.folders-empty-state .empty-icon svg {
  width: 40px;
  height: 40px;
}

.folders-empty-state .empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}

.folders-empty-state .empty-text {
  font-size: 14px;
  color: var(--muted-foreground);
  margin-bottom: 24px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.folder-items-empty {
  text-align: center;
  padding: 40px 24px;
  background: var(--surface);
  border-radius: 12px;
}

.folder-items-empty .empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  color: var(--muted-foreground);
}

.folder-items-empty .empty-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 4px;
}

.folder-items-empty .empty-hint {
  font-size: 13px;
  color: var(--muted-foreground);
}

/* ============================================
   Loading States
   ============================================ */

.folder-loading {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 0;
}

.folder-loading-skeleton {
  height: 160px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  border-radius: 16px;
  animation: shimmer 1.5s infinite;
}

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

/* ============================================
   Quiz Options Panel
   ============================================ */

.quiz-options-panel {
  padding: 20px;
  background: var(--surface);
  border-radius: 12px;
  margin-top: 16px;
}

.quiz-options-panel .quiz-options-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 16px;
}

.quiz-options-panel .question-count-input {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.quiz-options-panel .count-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.quiz-options-panel .count-btn:hover {
  background: var(--surface-hover);
}

.quiz-options-panel .count-display {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
}

/* ============================================
   Progress States
   ============================================ */

.upload-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border-radius: 12px;
  margin-top: 16px;
}

.upload-progress .progress-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.upload-progress .progress-text {
  font-size: 14px;
  color: var(--foreground);
}