/**
 * Calendar Components - Shadcn/ui Style
 * Modern calendar-specific components and layout
 */

/* Layout Grid System - Modern SaaS Style */
.app-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas: 
    "sidebar header"
    "sidebar main";
  min-height: 100vh;
  gap: 0;
  background: linear-gradient(135deg, hsl(var(--background)) 0%, hsl(var(--muted) / 0.2) 100%);
}

.app-header {
  grid-area: header;
  background-color: hsl(var(--background));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border) / 0.8);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.app-sidebar {
  grid-area: sidebar;
  background-color: hsl(var(--card));
  border-right: 1px solid hsl(var(--border) / 0.8);
  padding: 1.5rem;
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: inset -1px 0 0 hsl(var(--border) / 0.5);
}

.app-main {
  grid-area: main;
  padding: 1.5rem;
  overflow-y: auto;
}

/* Calendar Grid Component - Enhanced SaaS Style */
.calendar-container {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border) / 0.6);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 500px;
  width: 100%;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  transition: box-shadow 0.3s ease;
}

.calendar-container:hover {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.calendar-header {
  padding: 1.5rem;
  border-bottom: 1px solid hsl(var(--border) / 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, hsl(var(--muted) / 0.3) 0%, hsl(var(--muted) / 0.1) 100%);
  backdrop-filter: blur(8px);
}

.calendar-navigation {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.calendar-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin: 0;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.1);
}

.calendar-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border) / 0.8);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.calendar-nav-btn:hover {
  background-color: hsl(var(--accent));
  border-color: hsl(var(--ring));
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  transform: translateY(-1px);
}

.calendar-view-selector {
  display: flex;
  background-color: hsl(var(--muted) / 0.8);
  border-radius: calc(var(--radius) - 2px);
  padding: 0.25rem;
  border: 1px solid hsl(var(--border) / 0.4);
  backdrop-filter: blur(4px);
}

.calendar-view-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  border-radius: calc(var(--radius) - 4px);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.calendar-view-btn:hover {
  color: hsl(var(--foreground));
}

.calendar-view-btn.active {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  box-shadow: 0 2px 4px 0 rgb(0 0 0 / 0.1), 0 1px 2px 0 rgb(0 0 0 / 0.06);
  border: 1px solid hsl(var(--border) / 0.6);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background-color: hsl(var(--background));
}

.calendar-day-header {
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, hsl(var(--muted) / 0.6) 0%, hsl(var(--muted) / 0.4) 100%);
  border-bottom: 1px solid hsl(var(--border) / 0.6);
  position: relative;
}

.calendar-day-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, hsl(var(--border)) 20%, hsl(var(--border)) 80%, transparent 100%);
}

.calendar-day {
  min-height: 120px;
  padding: 0.75rem 0.5rem;
  border-right: 1px solid hsl(var(--border) / 0.6);
  border-bottom: 1px solid hsl(var(--border) / 0.6);
  background-color: hsl(var(--background));
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-day:hover {
  background-color: hsl(var(--muted) / 0.3);
  box-shadow: inset 0 1px 0 hsl(var(--border) / 0.2);
}

.calendar-day.other-month {
  background-color: hsl(var(--muted) / 0.2);
  color: hsl(var(--muted-foreground));
  opacity: 0.7;
}

.calendar-day.today {
  background: linear-gradient(135deg, hsl(var(--primary) / 0.15) 0%, hsl(var(--primary) / 0.05) 100%);
  border-color: hsl(var(--primary) / 0.8);
  box-shadow: inset 0 1px 0 hsl(var(--primary) / 0.2), 0 1px 3px hsl(var(--primary) / 0.1);
}

.calendar-day.selected {
  background: linear-gradient(135deg, hsl(var(--primary) / 0.25) 0%, hsl(var(--primary) / 0.1) 100%);
  border-color: hsl(var(--primary));
  box-shadow: inset 0 1px 0 hsl(var(--primary) / 0.3), 0 2px 4px hsl(var(--primary) / 0.15);
}

.day-number {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.day-number.today {
  color: hsl(var(--primary));
  text-shadow: 0 1px 2px hsl(var(--primary) / 0.3);
}

.day-events {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 80px;
  overflow: hidden;
}

/* Event Components - Enhanced Modern Style */
.event-item {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: calc(var(--radius) - 4px);
  line-height: 1.2;
  cursor: pointer;
  border-left: 3px solid;
  transition: all 0.2s ease;
  background-color: hsl(var(--accent) / 0.8);
  color: hsl(var(--accent-foreground));
  border-left-color: hsl(var(--primary));
  position: relative;
  backdrop-filter: blur(4px);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.event-item:hover {
  background-color: hsl(var(--accent));
  transform: translateX(2px) translateY(-1px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.event-item.google {
  border-left-color: #4285f4;
  background: linear-gradient(135deg, hsl(221.2 83.2% 53.3% / 0.15) 0%, hsl(221.2 83.2% 53.3% / 0.05) 100%);
  color: hsl(221.2 83.2% 53.3%);
  border: 1px solid hsl(221.2 83.2% 53.3% / 0.2);
  border-left: 3px solid #4285f4;
}

.event-item.ics {
  border-left-color: #9c27b0;
  background: linear-gradient(135deg, hsl(291.3 72.4% 42.2% / 0.15) 0%, hsl(291.3 72.4% 42.2% / 0.05) 100%);
  color: hsl(291.3 72.4% 42.2%);
  border: 1px solid hsl(291.3 72.4% 42.2% / 0.2);
  border-left: 3px solid #9c27b0;
}

.event-item.all-day {
  border-left-width: 4px;
  font-weight: 500;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.2) 0%, hsl(var(--primary) / 0.1) 100%);
}

.event-more {
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
  padding: 0.125rem 0.25rem;
  text-align: center;
  cursor: pointer;
  border-radius: calc(var(--radius) - 4px);
  transition: all 0.2s ease;
  border: 1px solid hsl(var(--border) / 0.3);
  background: linear-gradient(135deg, hsl(var(--muted) / 0.5) 0%, hsl(var(--muted) / 0.2) 100%);
}

.event-more:hover {
  background: linear-gradient(135deg, hsl(var(--muted)) 0%, hsl(var(--muted) / 0.8) 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px 0 rgb(0 0 0 / 0.1);
}

/* Event Detail Modal - Enhanced Modern Style */
.event-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background-color: rgb(0 0 0 / 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.event-modal-content {
  background: linear-gradient(135deg, hsl(var(--background)) 0%, hsl(var(--card)) 100%);
  border: 1px solid hsl(var(--border) / 0.6);
  border-radius: var(--radius);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25), 0 0 0 1px hsl(var(--border) / 0.05);
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  backdrop-filter: blur(8px);
}

.event-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.event-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.event-modal-close {
  width: 2rem;
  height: 2rem;
  border-radius: calc(var(--radius) - 2px);
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.event-modal-close:hover {
  background-color: hsl(var(--muted));
}

.event-modal-body {
  padding: 1.5rem;
}

/* Sidebar Components - Enhanced Modern Style */
.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  padding-bottom: 0.5rem;
}

.sidebar-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2rem;
  height: 2px;
  background: linear-gradient(90deg, hsl(var(--primary)) 0%, transparent 100%);
  border-radius: 1px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  position: relative;
}

.sidebar-nav-item:hover {
  background-color: hsl(var(--accent) / 0.8);
  color: hsl(var(--accent-foreground));
  transform: translateX(2px);
}

.sidebar-nav-item.active {
  background: linear-gradient(135deg, hsl(var(--accent)) 0%, hsl(var(--accent) / 0.8) 100%);
  color: hsl(var(--accent-foreground));
  font-weight: 500;
  box-shadow: 0 2px 4px 0 rgb(0 0 0 / 0.1);
}

.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: hsl(var(--primary));
  border-radius: 0 2px 2px 0;
}

.sidebar-nav-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Stats Cards - Enhanced Modern Style */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: linear-gradient(135deg, hsl(var(--card)) 0%, hsl(var(--muted) / 0.1) 100%);
  border: 1px solid hsl(var(--border) / 0.6);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  border-color: hsl(var(--border));
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.stat-card-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.stat-card-icon {
  width: 1rem;
  height: 1rem;
  color: hsl(var(--muted-foreground));
  opacity: 0.7;
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  line-height: 1;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.1);
}

.stat-card-description {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.25rem;
}

/* Calendar Source Toggle - Enhanced Modern Style */
.calendar-sources {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calendar-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border) / 0.6);
  background: linear-gradient(135deg, hsl(var(--card)) 0%, hsl(var(--muted) / 0.05) 100%);
  transition: all 0.2s ease;
  position: relative;
  backdrop-filter: blur(4px);
}

.calendar-source:hover {
  border-color: hsl(var(--border));
  box-shadow: 0 2px 4px 0 rgb(0 0 0 / 0.1);
  transform: translateY(-1px);
}

.calendar-source-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.calendar-source-color {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.1);
}

.calendar-source-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
}

.calendar-source-type {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

/* Switch/Toggle Component - Enhanced Modern Style */
.switch {
  position: relative;
  display: inline-flex;
  height: 1.5rem;
  width: 2.75rem;
  cursor: pointer;
  align-items: center;
  border-radius: 9999px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  background-color: hsl(var(--input));
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.1);
}

.switch:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.switch[data-state="checked"] {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary) / 0.8) 100%);
  box-shadow: 0 2px 4px hsl(var(--primary) / 0.3), inset 0 1px 0 hsl(var(--primary) / 0.2);
}

.switch-thumb {
  pointer-events: none;
  display: block;
  height: 1.25rem;
  width: 1.25rem;
  border-radius: 9999px;
  background-color: hsl(var(--background));
  box-shadow: 0 2px 4px 0 rgb(0 0 0 / 0.2), 0 0 0 1px rgb(0 0 0 / 0.05);
  transition: all 0.2s ease;
  transform: translateX(0);
  will-change: transform;
}

.switch[data-state="checked"] .switch-thumb {
  transform: translateX(1.25rem);
  box-shadow: 0 2px 6px 0 rgb(0 0 0 / 0.3), 0 0 0 1px rgb(0 0 0 / 0.1);
}

/* Loading States - Enhanced Modern Animations */
.loading-skeleton {
  background: linear-gradient(90deg, 
    hsl(var(--muted) / 0.8) 25%, 
    hsl(var(--muted) / 0.4) 50%, 
    hsl(var(--muted) / 0.8) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
  border-radius: calc(var(--radius) - 2px);
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-calendar-day {
  height: 120px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border) / 0.3);
}

.skeleton-event {
  height: 1rem;
  border-radius: calc(var(--radius) - 4px);
  margin-bottom: 0.25rem;
}

/* Quick Actions - Enhanced Modern Style */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border) / 0.6);
  background: linear-gradient(135deg, hsl(var(--card)) 0%, hsl(var(--muted) / 0.05) 100%);
  color: hsl(var(--card-foreground));
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  backdrop-filter: blur(4px);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.quick-action:hover {
  background: linear-gradient(135deg, hsl(var(--accent)) 0%, hsl(var(--accent) / 0.8) 100%);
  border-color: hsl(var(--ring));
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.quick-action-icon {
  width: 1rem;
  height: 1rem;
  opacity: 0.8;
}

/* Responsive Layout */
@media (max-width: 1024px) {
  .app-layout {
    grid-template-columns: 1fr;
    grid-template-areas: 
      "header"
      "main";
  }
  
  .app-sidebar {
    display: none;
  }
  
  .app-main {
    padding: 1rem;
  }
  
  .calendar-day {
    min-height: 80px;
    padding: 0.5rem 0.25rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .app-header {
    padding: 1rem;
  }
  
  .app-main {
    padding: 0.75rem;
  }
  
  .calendar-header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .calendar-navigation {
    justify-content: space-between;
  }
  
  .calendar-day {
    min-height: 60px;
    padding: 0.25rem;
  }
  
  .day-number {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
  }
  
  .event-item {
    font-size: 0.6875rem;
    padding: 0.125rem 0.25rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .quick-actions {
    grid-template-columns: 1fr;
  }
}

/* Print Styles */
@media print {
  .app-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "main";
  }
  
  .app-header,
  .app-sidebar {
    display: none;
  }
  
  .calendar-container {
    box-shadow: none;
    border: 1px solid #000;
  }
  
  .calendar-day {
    break-inside: avoid;
  }
}

/* Additional Styles for New Views and Components */

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    background-color: rgb(0 0 0 / 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.loading-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Switch Styles */
.switch {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.switch[data-state="checked"] {
    background-color: #3b82f6;
}

.switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 10px;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch[data-state="checked"] .switch-thumb {
    transform: translateX(20px);
}

/* Calendar source styles */
.calendar-source {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.calendar-source:last-child {
    border-bottom: none;
}

.calendar-source-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.calendar-source-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.calendar-source-name {
    font-weight: 500;
    color: #111827;
    font-size: 0.875rem;
}

.calendar-source-type {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Week View Styles */
.calendar-grid-week {
    display: flex;
    flex-direction: column;
    background: white !important;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-height: 600px;
    width: 100%;
}

/* Week Title Header */
.week-title-header {
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 2px solid #e5e7eb;
}

.week-title-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
}

.week-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    background-color: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.week-header-row .week-header {
    padding: 16px 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-align: center;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.week-header-row .week-header:last-child {
    border-right: none;
}

.week-header-row .week-header.today {
    background-color: #3b82f6;
    color: white;
}

.week-day-name {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.week-day-date {
    font-size: 1.125rem;
    font-weight: 700;
}

.week-content-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    flex: 1;
    min-height: 400px;
}

.week-day {
    background: white;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    position: relative;
}

.week-day:last-child {
    border-right: none;
}

.week-day.today {
    background-color: #fef7cd;
}

.week-day-header {
    padding: 12px 8px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    background-color: #f8fafc;
}

.week-day-header .day-number {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
}

.week-day-header .day-number.today {
    color: white;
    background-color: #3b82f6;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.week-events {
    padding: 8px;
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
}

.week-event {
    margin-bottom: 4px;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1.3;
    cursor: pointer;
    border-left: 3px solid transparent;
    background-color: #f3f4f6;
    transition: all 0.2s ease;
}

.week-event:hover {
    background-color: #e5e7eb;
    transform: translateY(-1px);
}

.week-event.google {
    border-left-color: #3b82f6;
    background-color: #dbeafe;
}

.week-event.ics {
    border-left-color: #ef4444;
    background-color: #fee2e2;
}

.week-event .event-time {
    font-weight: 600;
    margin-bottom: 2px;
    color: #6b7280;
    font-size: 0.625rem;
}

.week-event .event-title {
    color: #374151;
    font-weight: 500;
    line-height: 1.3;
}

.week-more-events {
    margin-top: 8px;
    padding: 4px 8px;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.week-more-events:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Day View Styles */
.calendar-grid-day {
    background: white !important;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-height: 700px;
    width: 100%;
}

/* Day Timeline Improvements */
.day-timeline-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.timeline-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.event-count {
    background: #3b82f6;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Day View - Full Width Layout */
.calendar-grid-day {
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: 1fr !important;
}

.day-view-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.day-view-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8fafc;
    width: 100%;
}

.day-view-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
}

.today-badge {
    background-color: #3b82f6;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* All Day Section */
.all-day-section {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background-color: #fafafa;
}

.all-day-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
}

.all-day-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.all-day-events .event-item {
    padding: 8px 12px;
    border-radius: 6px;
    background-color: #e5e7eb;
    border-left: 3px solid #3b82f6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.all-day-events .event-item:hover {
    background-color: #d1d5db;
    transform: translateX(2px);
}

.all-day-events .event-item.google {
    border-left-color: #3b82f6;
    background-color: #dbeafe;
}

.all-day-events .event-item.ics {
    border-left-color: #ef4444;
    background-color: #fee2e2;
}

/* Day Timeline - Optimized: No Scrolling, Compact Design */
.day-timeline {
    flex: 1;
    padding: 0 20px 20px 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: none;
    overflow: visible;
}

.day-timeline-container {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.timeline-slot {
    display: flex;
    align-items: flex-start;
    border-bottom: 1px solid #f1f5f9;
    min-height: 45px;
    height: auto;
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

.time-label {
    width: 80px;
    min-width: 80px;
    padding: 8px 16px 8px 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    border-right: 2px solid #e5e7eb;
    text-align: right;
}

.time-content {
    flex: 1;
    padding: 8px 0 8px 24px;
    position: relative;
    width: calc(100% - 124px);
}

.event-item.day-event.timed {
    margin-bottom: 8px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.event-item.day-event.timed:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.event-time-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.start-time {
    color: #3b82f6;
}

.end-time {
    color: #6b7280;
}

/* Optimized Day View - No Scrolling Design */
.calendar-grid-day {
    height: auto !important;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
}

.day-view-container {
    display: flex;
    flex-direction: column;
    height: auto;
    width: 100%;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 12px 20px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 8px;
}

.timeline-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 1.125rem;
    font-weight: 600;
}

.event-count {
    background: #3b82f6;
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Responsive optimizations */
@media (max-width: 768px) {
    .time-label {
        width: 60px;
        min-width: 60px;
        font-size: 0.75rem;
        padding: 6px 12px 6px 0;
    }
    
    .time-content {
        padding: 6px 0 6px 16px;
        width: calc(100% - 76px);
    }
    
    .timeline-slot {
        min-height: 40px;
    }
    
    .timeline-header {
        padding: 12px 16px 8px 16px;
    }
}

@media (max-width: 480px) {
    .day-timeline {
        padding: 0 12px 12px 12px;
    }
    
    .time-label {
        width: 50px;
        min-width: 50px;
        font-size: 0.7rem;
    }
    
    .event-item.day-event.timed {
        padding: 8px 12px;
        margin-bottom: 6px;
    }
    
    .timeline-header h4 {
        font-size: 1rem;
    }
}

.time-separator {
    color: #9ca3af;
}

.duration {
    color: #9ca3af;
    font-weight: 400;
    font-style: italic;
}

.event-item.day-event .event-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    margin-bottom: 4px;
}

.event-item.day-event .event-description {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}

.event-item.day-event.google {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(135deg, #dbeafe 0%, #f0f9ff 100%);
}

.event-item.day-event.ics {
    border-left: 4px solid #ef4444;
    background: linear-gradient(135deg, #fee2e2 0%, #fef2f2 100%);
}

.timeline-hour {
    display: flex;
    border-bottom: 1px solid #f3f4f6;
    min-height: 60px;
}

.hour-label {
    width: 80px;
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-align: right;
    border-right: 1px solid #f3f4f6;
    background-color: #f8fafc;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.hour-content {
    flex: 1;
    padding: 8px 12px;
    position: relative;
}

.hour-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hour-empty {
    min-height: 44px;
}

.day-event.timed {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    background-color: #f3f4f6;
}

.day-event.timed:hover {
    background-color: #e5e7eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.day-event.timed.google {
    border-left-color: #3b82f6;
    background-color: #dbeafe;
}

.day-event.timed.ics {
    border-left-color: #ef4444;
    background-color: #fee2e2;
}

.day-event .event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.day-event .event-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}

.day-event .event-title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 2px;
}

.day-event .event-description {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.3;
}

/* Force visibility for Week and Day Views */
.calendar-grid-week,
.calendar-grid-day {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 400px !important;
}

/* Force main content visibility */
.app-main {
    display: block !important;
    visibility: visible !important;
    background: white !important;
    padding: 1.5rem !important;
}

/* Debug styles for troubleshooting */
.calendar-grid-week::before {
    display: block;
    background: #10b981;
    color: white;
    padding: 5px 10px;
    text-align: center;
    font-weight: bold;
    font-size: 0.75rem;
}

/* DAY VIEW ACTIVE removed - no longer needed */

.day-event.timed:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.day-event .event-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.day-event .event-title {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.day-event .event-description {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
}

/* ================================
   DARK MODE OVERRIDES
   ================================ */

.dark .switch {
    background-color: hsl(var(--muted));
}

.dark .switch[data-state="checked"] {
    background-color: hsl(var(--primary));
}

.dark .switch-thumb {
    background: hsl(var(--background));
}

/* Calendar Source Colors in Dark Mode */
.dark .calendar-source {
    background-color: hsl(var(--card));
    border-color: hsl(var(--border));
}

.dark .calendar-source:hover {
    background-color: hsl(var(--muted));
}

.dark .calendar-source-name {
    color: hsl(var(--foreground));
}

.dark .calendar-source-type {
    color: hsl(var(--muted-foreground));
}

/* Event Cards in Dark Mode */
.dark .event-card {
    background-color: hsl(var(--card));
    border-color: hsl(var(--border));
}

.dark .event-card:hover {
    background-color: hsl(var(--muted));
}

.dark .event-title {
    color: hsl(var(--foreground));
}

.dark .event-time {
    color: hsl(var(--muted-foreground));
}

/* Quick Actions in Dark Mode */
.dark .quick-action {
    background-color: hsl(var(--card));
    color: hsl(var(--foreground));
    border-color: hsl(var(--border));
}

.dark .quick-action:hover {
    background-color: hsl(var(--muted));
}

/* Week View Dark Mode - Enhanced */
.dark .week-title-header {
    background: linear-gradient(135deg, hsl(var(--card)) 0%, hsl(var(--muted)) 100%);
    border-color: hsl(var(--border));
}

.dark .week-title-header h3 {
    color: hsl(var(--foreground));
}

.dark .week-header-row {
    background-color: hsl(var(--card));
    border-color: hsl(var(--border));
}

.dark .week-header-row .week-header {
    color: hsl(var(--foreground)) !important;
    border-color: hsl(var(--border));
    font-weight: 600;
}

.dark .week-header-row .week-header.today {
    background-color: hsl(var(--primary)) !important;
    color: hsl(var(--primary-foreground)) !important;
}

.dark .week-day-name {
    color: hsl(var(--foreground)) !important;
    opacity: 0.9;
}

.dark .week-day-number {
    color: hsl(var(--foreground)) !important;
}

.dark .week-more-events {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

.dark .week-more-events:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

/* Day View Dark Mode - Enhanced */
.dark .day-view-header {
    background-color: hsl(var(--card)) !important;
    border-color: hsl(var(--border)) !important;
}

.dark .day-view-header h2 {
    color: hsl(var(--foreground)) !important;
}

.dark .today-badge {
    background-color: hsl(var(--primary)) !important;
    color: hsl(var(--primary-foreground)) !important;
}

.dark .all-day-section {
    background-color: hsl(var(--card));
    border-color: hsl(var(--border));
}

.dark .all-day-label {
    color: hsl(var(--foreground));
}

.dark .all-day-events .event-item {
    background-color: hsl(var(--muted)) !important;
    border-color: hsl(var(--primary)) !important;
    color: hsl(var(--foreground)) !important;
}

.dark .timeline-header {
    background: hsl(var(--card)) !important;
    border-color: hsl(var(--border));
}

.dark .timeline-header h4 {
    color: hsl(var(--foreground));
}

.dark .event-count {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.dark .day-timeline {
    background-color: hsl(var(--background));
}

.dark .timeline-slot {
    border-color: hsl(var(--border));
    background-color: hsl(var(--background));
}

.dark .time-label {
    color: hsl(var(--muted-foreground));
    border-color: hsl(var(--border));
    background-color: hsl(var(--background));
}

.dark .time-content {
    background-color: hsl(var(--background));
}

.dark .event-item.day-event.timed {
    background: hsl(var(--card)) !important;
    border-color: hsl(var(--border)) !important;
    color: hsl(var(--foreground)) !important;
}

.dark .event-item.day-event.timed:hover {
    background: hsl(var(--muted)) !important;
}

.dark .event-item.day-event .event-title {
    color: hsl(var(--foreground)) !important;
}

.dark .event-item.day-event .event-description {
    color: hsl(var(--muted-foreground)) !important;
}

.dark .event-time-header {
    color: hsl(var(--primary)) !important;
}

.dark .start-time, .dark .end-time {
    color: hsl(var(--primary)) !important;
}

.dark .hour-empty {
    background-color: transparent;
}

.dark .event-item.day-event .event-description {
    color: hsl(var(--muted-foreground));
}

.dark .start-time {
    color: hsl(var(--primary));
}

.dark .end-time,
.dark .time-separator,
.dark .duration {
    color: hsl(var(--muted-foreground));
}

/* Stat Cards in Dark Mode */
.dark .stat-card {
    background-color: hsl(var(--card));
    border-color: hsl(var(--border));
}

.dark .stat-card-title {
    color: hsl(var(--muted-foreground));
}

.dark .stat-card-value {
    color: hsl(var(--foreground));
}

.dark .stat-card-description {
    color: hsl(var(--muted-foreground));
}

/* Navigation Buttons in Dark Mode */
.dark .calendar-nav-btn {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    border-color: hsl(var(--border));
}

.dark .calendar-nav-btn:hover {
    background-color: hsl(var(--accent));
}

/* View Buttons in Dark Mode */
.dark .calendar-view-btn {
    background-color: transparent;
    color: hsl(var(--muted-foreground));
}

.dark .calendar-view-btn.active,
.dark .calendar-view-btn:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

/* Calendar Days in Dark Mode */
.dark .calendar-day {
    background-color: hsl(var(--background));
    border-color: hsl(var(--border));
}

.dark .calendar-day:hover {
    background-color: hsl(var(--muted));
}

.dark .calendar-day.today {
    background-color: hsl(var(--accent));
}

.dark .calendar-day.other-month {
    color: hsl(var(--muted-foreground));
    background-color: hsl(var(--muted) / 0.5);
}

.dark .day-number {
    color: hsl(var(--foreground));
}

.dark .day-number.today {
    color: hsl(var(--accent-foreground));
}

/* Fix all hardcoded background colors */
.dark .calendar-source,
.dark .event-card,
.dark .quick-action,
.dark .stat-card,
.dark .sidebar-section,
.dark .calendar-container,
.dark .calendar-day,
.dark .event-modal,
.dark .event-modal-content {
    background-color: hsl(var(--card)) !important;
    color: hsl(var(--card-foreground)) !important;
    border-color: hsl(var(--border)) !important;
}

.dark .app-layout {
    background-color: hsl(var(--background)) !important;
}

.dark .app-sidebar {
    background-color: hsl(var(--card)) !important;
    border-color: hsl(var(--border)) !important;
}

.dark .app-header {
    background-color: hsl(var(--background)) !important;
    border-color: hsl(var(--border)) !important;
}

.dark .calendar-header {
    background-color: hsl(var(--muted) / 0.5) !important;
    border-color: hsl(var(--border)) !important;
}

/* Dark Mode: Override ALL hardcoded light backgrounds */

.dark [style*="background: white"],
.dark [style*="background-color: white"],
.dark [style*="background-color: #fff"],
.dark [style*="background-color: #ffffff"],
.dark [style*="background-color: #f"],
.dark [style*="background-color: #e"] {
    background-color: hsl(var(--card)) !important;
}

/* Specific hardcoded background overrides for Dark Mode */
.dark .switch {
    background-color: hsl(var(--muted)) !important;
}

.dark .switch[data-state="unchecked"] {
    background-color: hsl(var(--muted)) !important;
}

.dark .modal-backdrop,
.dark .event-modal,
.dark .event-modal-content {
    background: hsl(var(--background)) !important;
}

.dark .app-main,
.dark .main-content {
    background-color: hsl(var(--background)) !important;
}

.dark .calendar-day,
.dark .calendar-grid,
.dark .calendar-container {
    background-color: hsl(var(--card)) !important;
    border-color: hsl(var(--border)) !important;
}

.dark .calendar-container {
    background-color: hsl(var(--card)) !important;
}

.dark .sidebar-section,
.dark .calendar-source,
.dark .event-card,
.dark .stat-card,
.dark .quick-action {
    background: hsl(var(--card)) !important;
    background-color: hsl(var(--card)) !important;
}

/* Dark Mode: Override specific hardcoded white backgrounds */
.dark .calendar-grid-week,
.dark .calendar-grid-day,
.dark .time-slot,
.dark .event-timeline {
    background: hsl(var(--card)) !important;
    background-color: hsl(var(--card)) !important;
    border-color: hsl(var(--border)) !important;
}

/* Dark Mode: Force override ALL white backgrounds */
.dark * {
    --background-primary: hsl(var(--background));
    --background-card: hsl(var(--card));
    --background-elevated: hsl(var(--card));
}

.dark .calendar-day:hover {
    background-color: hsl(var(--muted) / 0.5) !important;
}

.dark .calendar-day.today {
    background-color: hsl(var(--accent)) !important;
}

.dark .calendar-day.other-month {
    background-color: hsl(var(--muted) / 0.3) !important;
}

.dark .day-events {
    background: transparent !important;
}

.dark .event-item {
    background-color: hsl(var(--accent) / 0.8) !important;
}

.dark .event-item:hover {
    background-color: hsl(var(--accent)) !important;
}

.dark .calendar-nav-btn,
.dark .calendar-view-btn {
    background-color: hsl(var(--secondary)) !important;
}

.dark .calendar-view-btn.active {
    background-color: hsl(var(--primary)) !important;
}

.dark .btn,
.dark .btn-primary,
.dark .btn-secondary {
    background-color: hsl(var(--primary)) !important;
}

.dark .btn:hover,
.dark .btn-primary:hover {
    background-color: hsl(var(--primary) / 0.8) !important;
}

.dark .btn-secondary {
    background-color: hsl(var(--secondary)) !important;
}

.dark .btn-secondary:hover {
    background-color: hsl(var(--secondary) / 0.8) !important;
}

/* ============================================
   MODERN TOAST NOTIFICATIONS
   ============================================ */

/* Toast Viewport Container - Unten Rechts */
.toast-viewport {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    top: auto !important;
    left: auto !important;
    z-index: 100000 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    max-width: 420px !important;
    width: 100% !important;
    max-width: min(420px, calc(100vw - 40px)) !important;
    pointer-events: none !important;
}

/* Toast Base Styles */
.toast {
    position: relative !important;
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 2px solid rgba(200, 200, 200, 1) !important;
    border-radius: 6px !important;
    padding: 16px 20px !important;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.1),
        0 4px 10px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    min-width: 300px !important;
    max-width: 100% !important;
    pointer-events: auto !important;
    transform: translateX(100%) !important;
    animation: slideInToast 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Toast Content */
.toast-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
}

.toast-message {
    color: rgba(0, 0, 0, 0.85) !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    flex: 1 !important;
}

.toast-close {
    background: rgba(0, 0, 0, 0.05) !important;
    border: none !important;
    border-radius: 3px !important;
    color: rgba(0, 0, 0, 0.5) !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 4px 6px !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    color: rgba(0, 0, 0, 0.7) !important;
    transform: scale(1.1) !important;
}

/* Toast Type Variations */
.toast-success {
    background: rgba(34, 197, 94, 0.6) !important;
    border: 2px solid rgb(34, 197, 94) !important;
    box-shadow: 
        0 10px 25px rgba(34, 197, 94, 0.2),
        0 4px 10px rgba(34, 197, 94, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.toast-success .toast-message {
    color: rgba(255, 255, 255, 0.95) !important;
}

.toast-success .toast-close {
    background: rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.toast-success .toast-close:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    color: rgba(255, 255, 255, 1) !important;
}

.toast-error {
    background: rgba(239, 68, 68, 0.6) !important;
    border: 2px solid rgb(239, 68, 68) !important;
    box-shadow: 
        0 10px 25px rgba(239, 68, 68, 0.2),
        0 4px 10px rgba(239, 68, 68, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.toast-error .toast-message {
    color: rgba(255, 255, 255, 0.95) !important;
}

.toast-error .toast-close {
    background: rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.toast-error .toast-close:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    color: rgba(255, 255, 255, 1) !important;
}

.toast-info {
    background: rgba(59, 130, 246, 0.6) !important;
    border: 2px solid rgb(59, 130, 246) !important;
    box-shadow: 
        0 10px 25px rgba(59, 130, 246, 0.2),
        0 4px 10px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.toast-info .toast-message {
    color: rgba(255, 255, 255, 0.95) !important;
}

.toast-info .toast-close {
    background: rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.toast-info .toast-close:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    color: rgba(255, 255, 255, 1) !important;
}

.toast-warning {
    background: rgba(245, 158, 11, 0.6) !important;
    border: 2px solid rgb(245, 158, 11) !important;
    box-shadow: 
        0 10px 25px rgba(245, 158, 11, 0.2),
        0 4px 10px rgba(245, 158, 11, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.toast-warning .toast-message {
    color: rgba(255, 255, 255, 0.95) !important;
}

.toast-warning .toast-close {
    background: rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.toast-warning .toast-close:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    color: rgba(255, 255, 255, 1) !important;
}

/* Dark Mode Toast Styles */
.dark .toast {
    background: rgba(30, 30, 30, 0.6) !important;
    border: 2px solid rgba(160, 160, 160, 1) !important;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.3),
        0 4px 10px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.dark .toast-message {
    color: rgba(255, 255, 255, 0.9) !important;
}

.dark .toast-close {
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

.dark .toast-close:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Dark Mode Type Variations */
.dark .toast-success {
    background: rgba(34, 197, 94, 0.6) !important;
    border: 2px solid rgb(34, 197, 94) !important;
}

.dark .toast-error {
    background: rgba(239, 68, 68, 0.6) !important;
    border: 2px solid rgb(239, 68, 68) !important;
}

.dark .toast-info {
    background: rgba(59, 130, 246, 0.6) !important;
    border: 2px solid rgb(59, 130, 246) !important;
}

.dark .toast-warning {
    background: rgba(245, 158, 11, 0.6) !important;
    border: 2px solid rgb(245, 158, 11) !important;
}

/* Toast Animations */
@keyframes slideInToast {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToast {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-exit {
    animation: slideOutToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .toast-viewport {
        bottom: 10px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
    }
    
    .toast {
        min-width: auto !important;
        margin: 0 !important;
    }
}

/* Calendar Source Toggle Styles */
.calendar-source {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.calendar-source:hover {
    background-color: hsl(var(--accent) / 0.5);
}

.calendar-source.disabled {
    opacity: 0.6;
    background-color: hsl(var(--muted));
}

.calendar-source.disabled .calendar-source-name {
    color: hsl(var(--muted-foreground));
    text-decoration: line-through;
}

.calendar-source-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.calendar-source-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.calendar-source-name {
    font-weight: 500;
    color: hsl(var(--foreground));
    font-size: 0.875rem;
}

.calendar-source-type {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    font-weight: 500;
}

.calendar-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: hsl(var(--muted));
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: 2px solid transparent;
}

.calendar-toggle-switch:hover {
    background-color: hsl(var(--muted) / 0.8);
}

.calendar-toggle-switch[data-state="checked"] {
    background-color: hsl(var(--primary));
}

.calendar-toggle-switch[data-state="checked"]:hover {
    background-color: hsl(var(--primary) / 0.9);
}

.switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.calendar-toggle-switch[data-state="checked"] .switch-thumb {
    transform: translateX(20px);
}

.calendar-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background-color: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

.calendar-status.not-authorized {
    background-color: hsl(var(--destructive) / 0.1);
    color: hsl(var(--destructive));
}

/* Dark Mode Overrides for Calendar Sources */
.dark .calendar-source {
    background-color: hsl(var(--card));
    border-color: hsl(var(--border));
}

.dark .calendar-source.disabled {
    background-color: hsl(var(--muted));
}

.dark .calendar-toggle-switch {
    background-color: hsl(217.2 32.6% 17.5%);
}

.dark .calendar-toggle-switch[data-state="checked"] {
    background-color: hsl(var(--primary));
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    .toast {
        animation: none !important;
        transform: translateX(0) !important;
    }
    
    .toast-exit {
        animation: none !important;
        opacity: 0 !important;
    }
    
    .calendar-toggle-switch,
    .switch-thumb {
        transition: none !important;
    }
}

/* Custom Scrollbar für Sidebar - Moderne, schöne Gestaltung */
.app-sidebar::-webkit-scrollbar {
    width: 8px;
}

.app-sidebar::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
    margin: 8px 0;
}

.app-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, 
        hsl(var(--primary) / 0.6) 0%, 
        hsl(var(--primary) / 0.8) 50%, 
        hsl(var(--primary) / 0.6) 100%);
    border-radius: 10px;
    border: 1px solid hsl(var(--border) / 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, 
        hsl(var(--primary) / 0.8) 0%, 
        hsl(var(--primary)) 50%, 
        hsl(var(--primary) / 0.8) 100%);
    border-color: hsl(var(--primary) / 0.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: scaleX(1.1);
}

.app-sidebar::-webkit-scrollbar-thumb:active {
    background: hsl(var(--primary) / 0.9);
    transform: scaleX(1.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Dark Mode Anpassungen für Sidebar Scrollbar */
.dark .app-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, 
        hsl(var(--primary) / 0.5) 0%, 
        hsl(var(--primary) / 0.7) 50%, 
        hsl(var(--primary) / 0.5) 100%);
    border-color: hsl(var(--border) / 0.4);
}

.dark .app-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, 
        hsl(var(--primary) / 0.7) 0%, 
        hsl(var(--primary) / 0.9) 50%, 
        hsl(var(--primary) / 0.7) 100%);
    border-color: hsl(var(--primary) / 0.6);
}

/* Für Firefox - Fallback Scrollbar Styling */
.app-sidebar {
    scrollbar-width: thin;
    scrollbar-color: hsl(var(--primary) / 0.6) transparent;
}

.dark .app-sidebar {
    scrollbar-color: hsl(var(--primary) / 0.5) transparent;
}

/* Context Menu - Modern & Elegant */
.context-menu {
    position: fixed;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    min-width: 200px;
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: scale(0.95) translateY(-5px);
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.context-menu.show {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    color: hsl(var(--foreground));
    transition: all 0.15s ease;
    position: relative;
}

.context-menu-item:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.context-menu-item.danger:hover {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

.context-menu-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.context-menu-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.context-menu-divider {
    height: 1px;
    background: hsl(var(--border));
    margin: 4px 8px;
}

/* Dark Mode Context Menu */
.dark .context-menu {
    background: hsl(var(--card));
    border-color: hsl(var(--border));
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Event Management States */
.calendar-day.droppable {
    background: hsl(var(--primary) / 0.1);
    border: 2px dashed hsl(var(--primary) / 0.3);
    border-radius: 6px;
}

.event-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg) scale(1.05);
    z-index: 100;
    cursor: grabbing;
}

.event-item.draggable {
    cursor: grab;
    transition: all 0.2s ease;
}

.event-item.draggable:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Event Form Modal - Modern & Beautiful */
.event-form-modal {
    max-width: 550px;
    width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.event-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 16px;
    align-items: end;
}

.form-row:has(.checkbox-group) {
    align-items: center;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 500;
    font-size: 14px;
    color: hsl(var(--foreground));
    margin-bottom: 2px;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 16px;
    border: 1px solid hsl(var(--border));
    border-radius: 6px;
    background: hsl(var(--background));
    color: hsl(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: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: hsl(var(--primary));
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.time-inputs {
    transition: all 0.3s ease;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid hsl(var(--border));
}

/* Responsive Event Form */
@media (max-width: 640px) {
    .form-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .form-row:has(.checkbox-group) {
        flex-direction: row;
        align-items: center;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Dark Mode Event Form */
.dark .form-group input,
.dark .form-group textarea,
.dark .form-group select {
    background: hsl(var(--card));
    border-color: hsl(var(--border));
    color: hsl(var(--card-foreground));
}

.dark .form-group input:focus,
.dark .form-group textarea:focus,
.dark .form-group select:focus {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.2);
}

/* ==========================================================================
   MODAL SYSTEM - Event Creation & Management
   ========================================================================== */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modalFadeIn 0.2s ease-out;
    padding: 1rem;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

/* Modal Content Container */
.modal-content {
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
    position: relative;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Modal Header */
.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, 
        hsl(var(--background)), 
        hsl(var(--muted)/0.3)
    );
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
    transform: scale(1.1);
}

/* Modal Body */
.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* Event Form Modal Specific Styles */
.event-form-modal {
    max-width: 600px;
    width: 100%;
}

.event-form-modal .modal-body {
    padding: 0;
}

.event-form {
    padding: 1.5rem;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid hsl(var(--border));
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0.5rem;
    }
    
    .event-form-modal {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .event-form {
        padding: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Dark Mode Modal Styles */
.dark .modal-overlay {
    background: rgba(0, 0, 0, 0.8);
}

.dark .modal-content {
    background: hsl(var(--card));
    border-color: hsl(var(--border));
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.dark .modal-header {
    background: linear-gradient(135deg, 
        hsl(var(--card)), 
        hsl(var(--muted)/0.2)
    );
    border-bottom-color: hsl(var(--border));
}

.dark .modal-close:hover {
    background: hsl(var(--muted));
    color: hsl(var(--card-foreground));
}

/* ===== DRAG & DROP STYLES ===== */

/* Draggable Event Styling */
.event-item[draggable="true"] {
    cursor: grab !important;
    transition: all 0.2s ease;
}

.event-item[draggable="true"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Dragging State */
.event-item.dragging {
    opacity: 0.5 !important;
    transform: rotate(5deg) scale(0.95);
    z-index: 1000;
    cursor: grabbing !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Drop Zone Styling */
.drop-zone-active {
    background: linear-gradient(135deg, 
        hsl(var(--primary) / 0.1), 
        hsl(var(--primary) / 0.05)
    ) !important;
    border: 2px dashed hsl(var(--primary) / 0.4) !important;
    border-radius: 8px;
    transform: scale(1.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 
        inset 0 0 0 1px hsl(var(--primary) / 0.2),
        0 4px 20px hsl(var(--primary) / 0.1);
}

.drop-zone-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 40%, 
        hsl(var(--primary) / 0.1) 50%, 
        transparent 60%
    );
    background-size: 20px 20px;
    animation: shimmer 2s infinite linear;
    border-radius: 6px;
    pointer-events: none;
}

@keyframes shimmer {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

/* Drag Cursor States */
.event-item[draggable="true"]:active {
    cursor: grabbing !important;
}

body.dragging {
    cursor: grabbing !important;
}

body.dragging * {
    cursor: grabbing !important;
}

/* Drop Zone Hover Effects for Different Views */
.month-view .calendar-day.drop-zone-active {
    background: linear-gradient(135deg, 
        hsl(var(--primary) / 0.08), 
        hsl(var(--primary) / 0.03)
    ) !important;
}

.week-view .calendar-day.drop-zone-active {
    background: linear-gradient(135deg, 
        hsl(var(--primary) / 0.08), 
        hsl(var(--primary) / 0.03)
    ) !important;
}

.day-view .day-view-container.drop-zone-active {
    background: linear-gradient(135deg, 
        hsl(var(--primary) / 0.05), 
        hsl(var(--primary) / 0.02)
    ) !important;
}

/* Enhanced Visual Feedback */
.drop-zone-active .events {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

/* Dark Mode Drag & Drop */
.dark .event-item[draggable="true"]:hover {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.dark .event-item.dragging {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.dark .drop-zone-active {
    background: linear-gradient(135deg, 
        hsl(var(--primary) / 0.15), 
        hsl(var(--primary) / 0.08)
    ) !important;
    box-shadow: 
        inset 0 0 0 1px hsl(var(--primary) / 0.3),
        0 4px 20px hsl(var(--primary) / 0.2);
}

/* Mobile Drag & Drop Adjustments */
@media (max-width: 768px) {
    .event-item[draggable="true"] {
        cursor: pointer;
    }
    
    .drop-zone-active {
        transform: scale(1.01);
        border-width: 1px;
    }
    
    .event-item.dragging {
        transform: scale(0.9);
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .event-item[draggable="true"],
    .drop-zone-active,
    .event-item.dragging {
        transition: none;
        transform: none;
    }
    
    .drop-zone-active::before {
        animation: none;
    }
}

/* =============================================
   EVENT FILTERS SYSTEM - MODERN DESIGN
   ============================================= */

.event-filters {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.event-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border) / 0.6);
  background: linear-gradient(135deg, hsl(var(--card)) 0%, hsl(var(--muted) / 0.05) 100%);
  transition: all 0.2s ease;
  position: relative;
  backdrop-filter: blur(4px);
}

.event-filter:hover {
  border-color: hsl(var(--border));
  box-shadow: 0 2px 4px 0 rgb(0 0 0 / 0.1);
  transform: translateY(-1px);
}

.event-filter.disabled {
  opacity: 0.6;
  background: linear-gradient(135deg, hsl(var(--muted) / 0.3) 0%, hsl(var(--muted) / 0.1) 100%);
}

.event-filter-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.event-filter-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  line-height: 1.2;
}

.event-filter-keyword {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.event-filter-keyword code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem;
  color: hsl(var(--foreground));
  background: hsl(var(--muted) / 0.5);
  padding: 0.125rem 0.375rem;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid hsl(var(--border) / 0.3);
}

.filter-match-type {
  font-size: 0.625rem;
  color: hsl(var(--muted-foreground));
  text-transform: lowercase;
  font-style: italic;
}

/* Dark Mode für Event Filters */
.dark .event-filter {
  background: linear-gradient(135deg, hsl(var(--card)) 0%, hsl(var(--muted) / 0.1) 100%);
  border-color: hsl(var(--border) / 0.4);
}

.dark .event-filter:hover {
  border-color: hsl(var(--border) / 0.6);
  box-shadow: 0 2px 8px 0 rgb(0 0 0 / 0.3);
}

.dark .event-filter.disabled {
  background: linear-gradient(135deg, hsl(var(--muted) / 0.2) 0%, hsl(var(--muted) / 0.05) 100%);
}

.dark .event-filter-keyword code {
  background: hsl(var(--muted) / 0.3);
  border-color: hsl(var(--border) / 0.2);
  color: hsl(var(--foreground) / 0.9);
}

/* Filter Icon Animations */
.event-filter::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  right: 3.5rem;
  width: 0.75rem;
  height: 0.75rem;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z'/%3e%3c/svg%3e") no-repeat center;
  background-size: contain;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.event-filter:hover::before {
  opacity: 0.6;
}

.dark .event-filter::before {
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z'/%3e%3c/svg%3e") no-repeat center;
  background-size: contain;
}