/* Modern Dark Design System */
:root {
  /* Modern Dark Palette */
  --bg-primary: #1a1a1a;
  --bg-secondary: #242424;
  --bg-tertiary: #2d2d2d;

  /* Modern Accent Colors */
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;

  /* Container Colors */
  --container-primary: rgba(45, 45, 45, 0.95);
  --container-secondary: rgba(36, 36, 36, 0.9);
  --container-hover: rgba(55, 55, 55, 0.95);

  /* Sidebar Colors */
  --sidebar-bg: #1f1f1f;
  --nav-hover: rgba(99, 102, 241, 0.15);
  --nav-active: rgba(99, 102, 241, 0.25);
  --nav-border: rgba(255, 255, 255, 0.08);

  /* Text Colors */
  --text-primary: #f5f5f5;
  --text-secondary: #a1a1a1;
  --text-muted: #6b7280;
  --text-inverse: #1a1a1a;

  /* Border & Shadows */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.12);
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-elevated: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-modal: 0 8px 32px rgba(0, 0, 0, 0.5);

  /* Spacing */
  --sidebar-width: 260px;
  --gap-large: 16px;
  --gap-medium: 16px;
  --gap-small: 8px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
}

/* Global Styles */
body, table, th, td, div, span, a, button, input, select, textarea {
  user-select: none;
}

/* Modern Dark Body */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;

    /* Smooth scrolling */
    scroll-behavior: smooth;

    /* Always visible - no loading states */
    opacity: 1;
    transform: none;
}

/* Error Messages */
.error-message {
  color: var(--accent-danger);
  background: rgba(239, 68, 68, 0.1);
  padding: var(--gap-medium);
  border-radius: var(--radius-md);
  margin-top: var(--gap-medium);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Desktop Layout System */
.app-layout {
  display: flex;
  flex-direction: row;
  width: 100vw;
  height: 100vh;
  gap: 0;
  padding: 0;
  margin: 0;
}

/* Modern Sidebar Navigation */
.sidebar {
  width: 270px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-subtle);
  padding: 0;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-elevated);
  display: flex;
  flex-direction: column;
  gap: var(--gap-large);
  overflow: hidden;
  height: 100vh;
}

.sidebar-header {
  padding: 0;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0;
  padding-bottom: var(--gap-medium);
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: var(--gap-medium);
  transition: all var(--transition-normal);
}

.logo-container:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-subtle);
}

.logo-container img {
  max-width: 140px;
  height: auto;
  object-fit: contain;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--gap-large);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 var(--gap-small);
}

.nav-group {
  padding: 0 var(--gap-small);
}

.nav-group-title {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: var(--gap-small);
  font-weight: 600;
  padding: 0 12px;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-md);
  margin-bottom: 2px;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
}
  .nav-item .nav-icon {
    font-size: 1.2rem;
    opacity: 0.8;
    transition: all var(--transition-fast);
  }


.nav-item:hover {
  background: var(--nav-hover);
  border-left-color: var(--accent-primary);
  transform: translateX(2px);
}

.nav-item:hover .nav-icon {
  opacity: 1;
  transform: scale(1.1);
}

.nav-item.active {
  background: var(--nav-active);
  color: var(--text-primary);
  border-left-color: var(--accent-primary);
  font-weight: 600;
  box-shadow: var(--shadow-subtle);
}

.nav-item.active .nav-icon {
  opacity: 1;
}

.nav-item.logout-btn {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-danger);
  border-left-color: var(--accent-danger);
  margin-top: var(--gap-medium);
}

.nav-item.logout-btn .nav-icon {
  opacity: 0.7;
}

.nav-item.logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-left-color: var(--accent-danger);
  transform: translateX(2px);
}

/* Quick Access Items - Minimal Highlight */
.nav-item.quick-access {
  font-weight: 600;
}

/* Navigation Item Icons */
.nav-item span {
  flex: 1;
  margin-right: 12px;
}

.nav-item-icon {
  width: 16px;
  height: 16px;
  opacity: 0.6;
  transition: all var(--transition-fast);
}

.nav-item:hover .nav-item-icon {
  opacity: 0.9;
}

.nav-item.active .nav-item-icon {
  opacity: 1;
}

/* Sidebar Footer for Logout */
.sidebar-footer {
  margin-top: auto;
  padding: var(--gap-medium);
  border-top: 1px solid var(--border-subtle);
}

.sidebar-footer .nav-item {
  justify-content: flex-start;
  padding-left: var(--gap-medium);
}

/* Sidebar Scrollbar Styling */
.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Hide desktop layout on mobile */
/* Mobile Layout - Hide Sidebar but show content */
@media (max-width: 1023px) {
  .app-layout {
    display: flex !important;
    flex-direction: column;
  }

  .sidebar {
    display: none !important;
  }

  .main-content {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    width: 100%;
    padding: 0;
    overflow: hidden;
  }

  #DashboardContainerOverride {
    display: none !important;
  }
}

 /* Enable desktop layout on desktop */
 @media (min-width: 1024px) {
   .app-layout {
     display: flex !important;
     flex-direction: row;
   }

   .sidebar {
     display: flex !important;
   }

   .main-content {
     display: flex !important;
     flex-direction: column;
     overflow: hidden;
   }

   #DashboardContainerOverride {
     display: none !important;
   }

   body {
     display: block;
     margin: 0;
     padding: 0;
     background-color: var(--bg-secondary);
     overflow: hidden;
   }

   /* Desktop Scroll Behavior - Only Main Content */
   .app-layout {
     overflow: hidden;
   }

   .sidebar {
     overflow: hidden;
   }

   .content-area {
     overflow: hidden;
   }
 }

.sidebar-header {
  padding: 0 var(--gap-medium);
  text-align: center;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--yellow-primary);
  border-radius: 12px;
  padding: var(--gap-medium);
}

.logo-container img {
  max-width: 120px;
  height: auto;
  object-fit: contain;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--gap-large);
  overflow-y: auto;
  padding: 0 10px;
}

.nav-group {
  padding: 0 var(--gap-medium);
}

.nav-group-title {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--gap-small);
  font-weight: 600;
  padding: 0 10px;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: block;
  padding: 14px 18px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 10px;
  margin-bottom: 2px;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-item:hover {
  background: var(--nav-hover);
  border-left-color: var(--yellow-accent);
  transform: translateX(3px);
  box-shadow: var(--shadow-subtle);
}

.nav-item.active {
  background: var(--nav-active);
  color: #2c2416;
  border-left-color: #2c2416;
  font-weight: 600;
  box-shadow: var(--shadow-subtle);
}

.nav-item.logout-btn {
  background: rgba(237, 28, 36, 0.1);
  color: #ed1c24;
  border-left-color: #ed1c24;
  margin-top: var(--gap-small);
}

.nav-item.logout-btn:hover {
  background: rgba(237, 28, 36, 0.2);
  border-left-color: #ed1c24;
  transform: translateX(3px);
}

/* Modern Main Content Area */
.main-content {
  flex: 1;
  padding: 0;
  overflow: hidden;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
}

.content-area {
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: var(--gap-large);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Modern Headings */
h1, h2, h3 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--gap-medium) 0;
}

h1 {
  font-size: 1.8rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.2rem;
}

/* Title Container */
.title-container {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--gap-medium) var(--gap-large);
  margin-bottom: var(--gap-large);
  display: inline-block;
  box-shadow: var(--shadow-subtle);
}

.title-container h1 {
  margin: 0;
  font-size: 1.5rem;
}

/* Desktop Breakpoint - Enable Sidebar Layout */
@media (min-width: 1024px) {
  .sidebar {
    display: flex !important;
  }

  .main-content {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    margin: 0;
    padding: 0;
    min-height: 0;
  }

  .content-area {
    max-width: 1600px;
    margin: 0 auto;
    padding: var(--gap-large);
    height: 100%;
    flex: 1;
    min-height: 0;
  }

  #DashboardContainerOverride {
    display: none !important;
  }

  body {
    display: block;
    margin: 0;
    padding: 0;
    background-color: var(--bg-secondary);
    overflow: hidden;
  }
}

/* Orphaned block removed */

/* Mobile Layout - Duplicate removed */

/* Hide existing dashboard-container for desktop view */
@media (min-width: 1024px) {
  .dashboard-container {
    display: none;
  }

  /* Show desktop layout instead */
  body:not(.mobile-view):not(:has(#loginContainer)) > .container,
  body:not(.mobile-view) > .dashboard-container {
    display: none;
  }

  body:not(.mobile-view) .app-layout {
    display: flex;
  }
}

/* Remove all page transition states */
body.page-loaded,
body.page-exiting {
    opacity: 1;
    transform: none;
    transition: none;
}

/* Minimal loading indicator */
.minimal-loader {
    display: inline-block;
    color: #666;
    font-size: 14px;
    padding: 5px;
}

/* Content is always visible - no transitions */

.content-loaded {
    opacity: 1;
}

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

/* Modern Container System */
.container {
  background: var(--container-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
  backdrop-filter: blur(20px);

  width: calc(100% - 32px);
  max-width: none;
  margin: 16px;
  padding: var(--gap-large);
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;

  transition: all var(--transition-normal);
}

/* Containers with tables or scrollable form sections: lock height */
.container:has(.tableContainer),
.container:has(.event-creation-wrapper),
.container:has(.revenue-report-wrapper) {
  overflow: hidden;
}

.container:hover {
  background: var(--container-hover);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}
  
  /* Dashboard override removed */
  
  /* Modern Inner Container */
  .innerContainer {
    background: var(--container-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-subtle);
    backdrop-filter: blur(12px);

    width: 100%;
    padding: var(--gap-large);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1;
    min-height: 0;

    transition: all var(--transition-normal);
  }
  
  /* Center headings and search */
  .innerContainer > h1,
  .innerContainer > .search-wrapper {
    align-self: center;
  }

  .innerContainer:has(.tableContainer) {
    overflow: hidden;
  }

  .innerContainer:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }




  /* Header & Footer */
  header, footer {
    width: 100%;
    text-align: center;
    background-color: rgba(252, 192, 0, 0.58);
    padding: 10px 0;
  }


  /* Login Page - Responsive Layout - All screen sizes */
  body:has(#loginContainer) {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 20px !important;
  }

  body:has(#loginContainer) .container {
    width: min(100% - 40px, 450px) !important; /* Responsive width up to 450px */
    margin: 0 !important;
    min-height: auto !important;
    height: auto !important;
    padding: 16px !important; /* Consistent padding */
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    max-width: 450px !important; /* Wider for desktop */
  }

  body:has(#loginContainer) .innerContainer {
    padding: 20px !important; /* More horizontal padding */
    min-height: auto !important;
    height: auto !important;
    justify-content: center !important; /* Center content */
    align-items: center !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    gap: var(--gap-medium) !important;
  }

  body:has(#loginContainer) #apphuesliLogo {
    max-width: 280px !important; /* Larger logo for desktop */
    margin: 0 auto 16px auto !important;
    display: block !important;
  }

  #loginContainer {
    width: 100%;
  }

  #loginContainer h1 {
    margin-bottom: var(--gap-large) !important;
  }

  #loginContainer form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--gap-medium);
  }

  #loginContainer input {
    width: 100%;
    padding: 14px 16px !important;
    font-size: 1rem;
  }

  #loginContainer button {
    width: 100%;
    padding: 14px 20px !important;
    font-size: 1rem;
    margin-top: var(--gap-small);
  }

  /* Mobile adjustment for login */
  @media (max-width: 480px) {
    body:has(#loginContainer) .container {
      max-width: 100% !important;
      padding: 16px !important;
    }

    body:has(#loginContainer) .innerContainer {
      padding: 12px !important;
    }

    body:has(#loginContainer) #apphuesliLogo {
      max-width: 200px !important;
      margin: 0 auto 16px auto !important;
    }
  }

  /* Revenue Report Page - removed narrow constraint for desktop redesign */

  /* Past Events - Transparent text but normal dropdown */
  .past-event td:not(:has(.custom-status-dropdown)) {
    opacity: 0.6;
  }

  .past-event .custom-status-dropdown {
    opacity: 1 !important; /* Keep dropdown fully visible */
  }

  /* Universal fix for translation flash */
  body:not(.translations-loaded) {
    visibility: hidden;
  }

  /* Login Container */
  body:has(#loginContainer) #loginContainer {
    width: 100%;
    max-width: 300px; /* Smaller form width for horizontal layout */
    margin: 0 0 12px 0 !important; /* Only bottom margin for spacing */
    flex-shrink: 0;
  }

  #loginContainer h1 {
    text-align: center;
    margin: 0 0 5px 0 !important; /* Even less margin */
    font-size: 1.2em !important; /* Smaller heading */
  }

  #loginContainer form {
    display: flex;
    flex-direction: column;
    gap: 5px !important; /* Extremely tight spacing */
    margin: 0 !important; /* No margins */
  }

  #loginContainer input {
    padding: 8px !important; /* Less padding */
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px !important; /* Smaller font */
  }

  #loginContainer button {
    padding: 8px !important; /* Less padding */
    background-color: #1976d2;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px !important; /* Smaller font */
    cursor: pointer;
    transition: background-color 0.2s;
  }

  #loginContainer button:hover {
    background-color: #1565c0;
  }

  body:has(#loginContainer) #loginError {
    color: #d32f2f;
    text-align: center;
    margin: 8px 0 0 0 !important; /* Only small top margin, no bottom margin */
    font-size: 14px;
  }



  /* Base styling for the logo */
  #apphuesliLogo {
    width: 100%;
    max-width: 400px; /* Maximum size on larger screens */
    height: auto;
    display: block;
    margin: 20px auto 0;
  }

  /* Responsive adjustments */
  @media (max-width: 768px) {
    #apphuesliLogo {
      max-width: 300px; /* Fix typo and adjust for mobile */
      margin: 10px auto;
    }
    
    body {
      padding: 5px;
      min-height: 100vh;
    }
    
    /* Mobile-specific border radius adjustment */
    .container, .innerContainer {
      border-radius: clamp(8px, 2vw, 15px);
    }
    
    /* Make navigation stack vertically on mobile */
    nav ul {
      flex-direction: column;
      gap: 10px;
    }
    
    /* Adjust main container for mobile */
    main {
      margin: 10px auto;
      padding: 15px;
      border-radius: 10px;
    }
  }

  /* Only hide filters on very small mobile screens */
  @media (max-width: 480px) {
    /* Hide regular filter row on small mobile, show mobile dropdown */
    .filterRow {
      display: none;
    }
    
    .mobile-filter-container {
      display: block;
    }
    
    /* Stack top row items on mobile */
    .topRow {
      flex-direction: column;
      gap: 10px;
    }
    
    .topRow > div {
      margin-right: 0;
      margin-bottom: 10px;
    }
    
    /* Adjust field groups for mobile */
    .fieldRow {
      flex-direction: column;
      align-items: stretch;
      gap: 5px;
    }
    
    .fieldRow label {
      min-width: auto;
      margin-bottom: 5px;
    }
    
    /* Stack action buttons on mobile */
    .action-buttons {
      flex-direction: column;
      gap: 10px;
    }
    
    .action-buttons .dashboardBtn {
      margin-right: 0;
      margin-bottom: 10px;
    }
    
    /* Adjust dashboard buttons for mobile */
    .dashboardBtn {
      height: 60px;
      font-size: 0.9em;
    }
    
    .dashboardBtn img.dashboardButtonIcon {
      width: 35px;
      height: 35px;
    }
  }


  
  /* Navigation */
  nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
  }
  nav ul li a {
    text-decoration: none;
    color: #000;
    font-weight: bold;
  }
  nav ul li a.active {
    color: #ed1c24;
  }
  
  /* Main Container (for pages that use a different structure) */
  main {
    width: 100%;
    max-width: 2000px;
    margin: 20px auto;
    padding: 20px;
    background: rgba(252, 192, 0, 0.58);
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  /* Modern Form & Input Styles */
  input, select, textarea {
    width: 100%;
    padding: 12px var(--gap-medium);
    margin-top: 5px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: all var(--transition-fast);
  }

  input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: var(--bg-secondary);
  }

  input::placeholder, textarea::placeholder {
    color: var(--text-muted);
  }

  /* Select Dropdown Arrow */
  select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a1a1a1' d='M6 8L2 4h8L6 8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
  }

  .login-container, .search-wrapper {
    max-width: 500px;
    margin: 20px auto;
  }

  /* Modern Button System */
  button {
    width: 100%;
    padding: 12px var(--gap-medium);
    background: var(--accent-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-top: var(--gap-small);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-subtle);
  }

  /* File Button Override (Toolbar) */
  .file-btn {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    white-space: nowrap;
    margin: 0 !important;
    width: auto !important;
    color: var(--text-primary);
    position: relative;
    z-index: 100;
    pointer-events: auto;
  }

  .file-btn:hover:not(:disabled) {
    background: var(--bg-hover, rgba(255,255,255,0.1));
    border-color: var(--primary, #6366f1);
  }

  .file-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  button:hover {
    transform: translateY(-1px);
  }

  button:active {
    transform: translateY(0);
  }

  button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
  }

  /* Button Variants – Subtle Dark Theme */
  .greenButton {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
  }
  .greenButton:hover {
    background: rgba(16, 185, 129, 0.25);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
  }

  .blueButton {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
  }
  .blueButton:hover {
    background: rgba(99, 102, 241, 0.25);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
  }

  .redButton {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
  }
  .redButton:hover {
    background: rgba(239, 68, 68, 0.25);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
  }

  .yellowButton {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
  }
  .yellowButton:hover {
    background: rgba(245, 158, 11, 0.25);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
  }

  .infoButton {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.3);
  }
  .infoButton:hover {
    background: rgba(56, 189, 248, 0.25);
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.2);
  }

  .grayButton {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
  }
  .grayButton:hover {
    background: rgba(148, 163, 184, 0.25);
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.2);
  }
  
  /* Dashboard width override removed */

  /* Modern Dashboard Button System */
  .dashboardBtn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    height: 48px;
    margin-top: 0;
    margin-bottom: var(--gap-medium);
    padding: 0 var(--gap-large);
    font-size: 0.95rem;
    font-weight: 500;
    background: var(--accent-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-subtle);
    transition: all var(--transition-fast);
  }

  .dashboardBtn:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
  }

  .dashboardBtn:active {
    transform: translateY(0);
  }

  .dashboardBtn img.dashboardButtonIcon {
    position: absolute;
    right: var(--gap-medium);
    width: 24px;
    height: 24px;
    opacity: 0.6;
    filter: grayscale(0.5);
    transition: all var(--transition-fast);
  }

  .dashboardBtn:hover img.dashboardButtonIcon {
    opacity: 0.9;
    filter: grayscale(0);
  }

  /* Dashboard */
  .innerContainer h1 {
    text-align: center;
    margin-bottom: 0; /* Margin is now on the new title-container */
  }
  
  /* Dashboard sections spacing (stacks removed) */
  
  
  /* Utility Classes */
  .hidden {
    display: none;
  }
  .error-message {
    color: red;
    text-align: center;
  }
  
  /* Tab Navigation */
  .tab-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }
  .tab-button {
    padding: 10px 20px;
    margin: 0 5px;
    border: none;
    background: #ed1c24;
    color: white;
    cursor: pointer;
    border-radius: 5px;
  }
  .tab-button.active {
    background: #5c191c;
  }
  
  /* Action Buttons & Back Container */
  .action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
  }
  .back-container {
    margin-top: 20px;
    text-align: center;
    flex-shrink: 0;
  }
  
  /* Consistent spacing between responsive buttons and back button */
  .responsive-action-buttons + .back-container,
  .responsive-action-buttons + button {
    margin-top: 20px;
  }
  
  /* Button Variants */

  /* Base button styling */
  .buttonBase {
    border: none;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  /* Button duplicate definitions removed – see unified Button Variants above */



  input[readonly] {
    background-color: #6d6d6d;
    color: #ffffff;
  }
  
  #worker,
  #marketName,
  #additionalWorkers {
    background-color: #6c757d;  /* Dark gray background */
    color: #fff;                /* Bright white text */
    border: 1px solid #6c757d;  /* Same as background */
    padding: 10px;
    font-size: 1em;
    cursor: not-allowed;        /* Indicate non-editable */
  }
  
  
  .fieldGroup {
    margin-bottom: 20px; /* Increase space between groups */
  }
  
  .fieldGroup label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
  }

  .fieldRow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px; /* More space between rows */
  }
  
  .fieldRow label {
    min-width: 120px;
  }
  

  
/* Highlight reported rows in light red */
tr.reportedRow {
  background-color: #f8d7da;
}

/* Highlight paid rows in light yellow */
tr.paidRow {
  background-color: #fff3cd;
}

/* Market Base Row Status Colors - Muted */
.row-status-erfasst {
  background-color: #f8f9fa !important; /* Very light gray */
}

.row-status-angemeldet {
  background-color: #fff3e0 !important; /* Very light orange */
}

.row-status-bestätigt {
  background-color: #e8f5e8 !important; /* Very light green */
}

.row-status-canceled {
  background-color: rgba(220, 53, 69, 0.1) !important;
}

.row-status-anmeldung_fällig {
  background-color: #f3e5f5 !important; /* Very light purple */
}

/* Enhanced selected styling for status rows */
.row-status-erfasst.selected,
.row-status-angemeldet.selected,
.row-status-bestätigt.selected,
.row-status-canceled.selected,
.row-status-anmeldung_fällig.selected {
  outline: 2px solid #333;
  outline-offset: -2px;
}

/* Custom Status Dropdown - Fully Rounded */
.custom-status-dropdown {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 110px;
}

.status-dropdown-trigger {
  border: 1px solid var(--border-medium);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 0.85em;
  padding: 6px 10px;
  border-radius: 25px;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.status-dropdown-trigger:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.status-dropdown-trigger.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.dropdown-arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--text-secondary);
  transition: transform 0.2s ease;
}

.status-dropdown-trigger.active .dropdown-arrow {
  transform: rotate(180deg);
}

.status-dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: auto;
  width: 160px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  z-index: 9999;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease;
  opacity: 0;
  margin-top: 4px;
}

/* Dropdown opens upward when near bottom */
.status-dropdown-options.open-upward {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 4px;
}

.status-dropdown-options.open {
  max-height: 320px;
  opacity: 1;
}

.status-option {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-option:first-child {
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.status-option:last-child {
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  border-bottom: none;
}

.status-option:hover {
  background-color: var(--nav-hover);
}

/* Scope Flyout – slides out right of hovered status option */
.status-option {
  position: relative;
}

.scope-flyout {
  position: fixed;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  z-index: 10001;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  overflow: hidden;
}

.scope-flyout.visible {
  opacity: 1;
  pointer-events: auto;
}

.scope-flyout-option {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.85em;
  font-weight: 500;
  color: var(--text-primary);
  transition: background-color 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.scope-flyout-option:first-child {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.scope-flyout-option:last-child {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.scope-flyout-option:not(:last-child) {
  border-bottom: 1px solid var(--border-subtle);
}

.scope-flyout-option:hover {
  background-color: var(--accent-primary);
  color: #fff;
}

.scope-flyout-option i {
  font-size: 0.9em;
  width: 16px;
  text-align: center;
}

/* Status-specific colors for options */
.status-option[data-value="created"] {
  background-color: rgba(108, 117, 125, 0.2);
  color: #adb5bd;
}

.status-option[data-value="registered"] {
  background-color: rgba(230, 81, 0, 0.2);
  color: #ffab91;
}

.status-option[data-value="confirmed"] {
  background-color: rgba(40, 167, 69, 0.2);
  color: #7dd3a0;
}

.status-option[data-value="confirmation_due"] {
  background-color: rgba(255, 193, 7, 0.2);
  color: #ffd54f;
}

.status-option[data-value="accepted"] {
  background-color: rgba(33, 150, 243, 0.2);
  color: #64b5f6;
}

.status-option[data-value="canceled"] {
  background-color: rgba(220, 53, 69, 0.2);
  color: #f5a3a9;
}

.status-option[data-value="registration_due"] {
  background-color: rgba(111, 66, 193, 0.2);
  color: #c9a8e8;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .custom-status-dropdown {
    max-width: 90px;
  }
  
  .status-dropdown-trigger {
    padding: 4px 8px;
    font-size: 0.8em;
    border-radius: 20px;
  }
  
  .status-dropdown-options {
    border-radius: 12px;
    width: 140px; /* Slightly smaller on mobile but still wide enough */
  }
  
  .status-option {
    padding: 8px 12px;
    font-size: 0.85em;
  }
  
  .status-option:first-child {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
  }
  
  .status-option:last-child {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
  }
}

/* Optional: Ensure that when rows are selected, the font remains normal weight */
tr.selected {
  font-weight: normal;
  outline: 2px solid #333;
  outline-offset: -2px;
}

/* Notes Event Creation */
.fieldGroup textarea {

  font-size: 1.2em;           /* Match font size with other fields (adjust if needed) */
  padding: 8px;             /* Same padding as your other fields */
  border: 1px solid #ccc;   /* Match the border style */
  border-radius: 8px;       /* Optional: same border radius */
  width: 100%;              /* Ensure it fills the container like other fields */
  box-sizing: border-box;   /* Make sure padding is included in the width */
}

.fieldGroup textarea {
  overflow: hidden;
  resize: none;
}



/* Filter row: all filters on one line */
.filterRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filterRow > div {
  flex: 1;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center; /* Center label and dropdown */
}
.filterRow select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
  width: 100%;
}
.filterRow label {
  font-weight: bold;
  margin-right: 5px;
}

/* Animated Filter Dropdown */
.filter-dropdown {
  position: relative;
  margin-bottom: 20px;
}

.filter-dropdown-toggle {
  width: 100%;
  padding: 12px 15px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.filter-dropdown-toggle:hover {
  background: #0056b3;
}

.filter-dropdown-toggle .arrow {
  transition: transform 0.3s ease;
  font-size: 0.8em;
}

.filter-dropdown-toggle.active .arrow {
  transform: rotate(180deg);
}

.filter-dropdown-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  margin-top: 5px;
  padding: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              padding 0.3s ease,
              box-shadow 0.3s ease;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.filter-dropdown-content.open {
  max-height: 500px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-dropdown-content .filterRow {
  margin-bottom: 0;
}

.filter-dropdown-content .filterRow > div {
  margin-bottom: 15px;
}

.filter-dropdown-content .filterRow > div:last-child {
  margin-bottom: 0;
}

/* Hide filter dropdown on desktop by default */
.filter-dropdown {
  display: none;
}

/* Simple Mobile Filter Dropdown */
.mobile-filter-container {
  display: none;
  margin-bottom: 20px;
}

.mobile-filter-toggle {
  width: 100%;
  padding: 12px 15px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.mobile-filter-toggle:hover {
  background: #0056b3;
}

.mobile-filter-toggle.active {
  background: #0056b3;
}

.filter-arrow {
  transition: transform 0.3s ease;
  font-size: 0.8em;
}

.mobile-filter-content {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-top: 5px;
  padding: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.mobile-filter-content.open {
  max-height: 500px;
  padding: 20px;
}

.mobile-filter-content .filterRow {
  flex-direction: column;
  gap: 15px;
  margin-bottom: 0;
}

.mobile-filter-content .filterRow > div {
  min-width: 100%;
  margin-bottom: 10px;
}

.mobile-filter-content .filterRow > div:last-child {
  margin-bottom: 0;
}

.mobile-filter-content select {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

.mobile-filter-content label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #333;
}

/* Improve filter dropdown content layout */
.filter-dropdown-content .filterRow {
  flex-direction: column;
  gap: 15px;
}

.filter-dropdown-content .filterRow > div {
  min-width: 100%;
}

.filter-dropdown-content select {
  width: 100%;
  padding: 10px;
  font-size: 16px; /* Prevent zoom on iOS */
}

.filter-dropdown-content label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #333;
}


/* Top row: search field and view-mode toggle button on one line */
.topRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  margin-left: 0;
  margin-right: 0;
  padding: 0;
}
.topRow input.search-input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
  box-sizing: border-box;
}

.cameraIcon {
  display: inline-block;
  margin-left: 10px;
  cursor: pointer;
  font-size: 1.5em;
  color: #333;
}

/* Inline checkbox label alignment for modals and forms */
label > input[type="checkbox"] {
  vertical-align: middle;
  margin-right: 6px;
  position: relative;
  top: -1px;
}
label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.action-buttons .dashboardBtn {
  margin-bottom: 0;
  margin-right: 10px;
}
.action-buttons .dashboardBtn:last-child {
  margin-right: 0;
}

/* Table Responsive Styles - Simple horizontal scroll for most tables */

@media (max-width: 768px) {
  /* Default: All tables get horizontal scroll on mobile */
  table {
    width: 100%;
    overflow-x: auto;
    display: block;
    font-size: 0.85em;
  }
  
  table thead, table tbody {
    display: table;
    width: 100%;
  }
  
  table tr {
    display: table-row;
  }
  
  table th, table td {
    display: table-cell;
    padding: 8px 4px;
    min-width: 60px;
    white-space: nowrap;
  }
  
  /* Library table keeps its special styling */
  .library-table {
    display: table;
    font-size: 0.8em;
  }
  
  .library-table th, .library-table td {
    padding: 6px 4px;
    word-break: break-word;
    white-space: normal;
  }
}

/* Tablet responsive styles - minimal adjustments for smooth transitions */
@media (min-width: 769px) and (max-width: 1024px) {
  main {
    max-width: min(90%, 900px);
    padding: clamp(15px, 2.5vw, 25px);
  }
  
  .filterRow {
    gap: 20px;
  }
  
  .action-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  table {
    font-size: 0.95em;
  }
  
  .dashboardBtn {
    height: 55px;
    font-size: 0.95em;
  }
  
  .dashboardBtn img.dashboardButtonIcon {
    width: 40px;
    height: 40px;
  }
  
  /* Show filter dropdown on tablets too if screen is getting cramped */
  .filterRow {
    gap: 10px;
  }
  
  .filterRow > div {
    min-width: 140px;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  body {
    padding: 2px;
  }
  
  /* Small mobile uses the fluid clamp() values from base styles */
  
  input, select, textarea {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 12px;
  }
  
  button, .buttonBase {
    padding: 12px 10px;
    font-size: 0.9em;
    min-height: 44px; /* Touch target size */
  }
  
  .dashboardBtn {
    height: 50px;
    font-size: 0.85em;
    margin-bottom: 8px;
  }
  
  .dashboardBtn img.dashboardButtonIcon {
    width: 30px;
    height: 30px;
  }
  
  .fieldGroup {
    margin-bottom: 15px;
  }
  
  .cameraIcon {
    font-size: 1.3em;
    margin-left: 8px;
  }
  
  /* Improve modal responsiveness */
  .modalBackdrop .modalContent {
    width: 95% !important;
    max-width: 95% !important;
    margin: 10px !important;
    padding: 15px !important;
  }
  
  /* Revenue form specific responsiveness */
  .fieldGroupRow {
    flex-direction: column;
    gap: 10px;
  }
  
  .fieldGroupRow .fieldGroup {
    width: 100%;
  }
  
  /* Camera icon adjustments for mobile */
  .cameraIcon {
    position: static;
    display: block;
    text-align: center;
    margin: 5px 0;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
  }
  
  /* Filter dropdown adjustments for small mobile */
  .filter-dropdown-toggle {
    padding: 10px 12px;
    font-size: 0.9em;
  }
  
  .filter-dropdown-content {
    padding: 15px;
  }
  
  .filter-dropdown-content select {
    padding: 8px;
  }
}

/* Responsive Action Buttons */
.responsive-action-buttons {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: clamp(8px, 1.5vw, 12px); /* Smooth gap scaling */
  margin: 20px auto 0 auto;
  text-align: center;
  flex-shrink: 0;
  width: 100%;
  max-width: none;
  
  /* Sticky at bottom */
  flex-shrink: 0;
  background: var(--container-secondary);
  padding: var(--gap-medium) 0 0 0;
  
  /* Smooth transitions */
  transition: gap 0.3s ease;
}

.responsive-action-buttons .buttonBase {
  width: 100%;
  text-align: center;
  padding: clamp(8px, 1.2vw, 15px) clamp(10px, 2vw, 15px);
  min-height: 44px;
  font-size: clamp(0.85em, 1.5vw, 1em);
  
  /* Smooth transitions */
  transition: padding 0.3s ease, font-size 0.3s ease;
}

/* Fallback for very narrow screens */
@media (max-width: 400px) {
  .responsive-action-buttons {
    grid-template-columns: 1fr;
  }
}

/* Large screen optimization */
@media (min-width: 1200px) {
  .container {
    max-width: none;
  }
  
  /* Dashboard width override removed */
  
  main {
    max-width: none;
  }
  
  /* Allow side-by-side layout for larger screens */
  .fieldGroupRow {
    display: flex;
    gap: 20px;
  }
  
  .fieldGroupRow .fieldGroup {
    flex: 1;
  }
  
  .filterRow {
    display: flex;
    gap: 25px;
  }
  
  .action-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
  }
}

/* FINAL DASHBOARD OVERRIDE - REMOVED */

/* Modern Desktop Dashboard Styles */
@media (min-width: 1024px) {
  /* Modern Filter Row */
  .filterRow {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-medium);
    justify-content: center;
    align-items: flex-end;
    margin-bottom: var(--gap-large);
    padding: var(--gap-medium);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
  }

  .filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--gap-small);
  }

  .filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 2px;
  }

  /* Modern Search Wrapper */
  .search-wrapper {
    margin-bottom: var(--gap-large);
    text-align: center;
  }

  .search-input {
    width: 100%;
    max-width: 600px;
    padding: 12px var(--gap-medium);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
  }

  .search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: var(--bg-secondary);
  }

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

  .dashboardBtn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
  }

  .dashboardBtn img.dashboardButtonIcon {
    width: 20px;
    height: 20px;
    filter: brightness(0.8);
  }

  .dashboardBtn:hover img.dashboardButtonIcon {
    filter: brightness(1.2);
  }

  /* Desktop Welcome Message */
  .desktop-welcome {
    text-align: center;
    margin: var(--gap-large) 0;
    padding: var(--gap-large);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--radius-md);
  }

  .desktop-welcome p {
    margin: var(--gap-small) 0;
}

.dashboard-container:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Modern Title Container */
.title-container {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--gap-medium) var(--gap-large);
  margin-bottom: var(--gap-large);
  display: inline-block;
  box-sizing: border-box;
  box-shadow: var(--shadow-subtle);
}

.title-container h1 {
  margin: 0;
  padding: 0;
  font-size: 1.5rem;
  color: var(--text-primary);
}

/* Page H1 */
.innerContainer h1 {
  color: var(--text-primary);
  font-size: 2rem;
  margin-bottom: var(--gap-large);
  text-align: center;
}

/* --- Multi-select Dropdown --- */
.multiselect-dropdown {
  position: relative;
  display: inline-block;
  width: 100%;
  border: none; 
}

.multiselect-dropdown-trigger {
  border: 1px solid var(--border-medium);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 0.85em;
  padding: 6px 12px;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
  font-weight: 500;
  user-select: none;
  text-align: left;
}

.multiselect-dropdown-trigger:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.multiselect-dropdown.open .multiselect-dropdown-trigger {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.multiselect-dropdown-trigger::after {
  content: '▼';
  float: right;
  margin-left: 10px;
  font-size: 0.8em;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.multiselect-dropdown.open .multiselect-dropdown-trigger::after {
    transform: rotate(180deg);
}

.multiselect-dropdown-options {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  width: max-content; /* Let the content define the width */
  min-width: 100%; /* Ensure it's at least as wide as the trigger */
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  z-index: 1000;
  margin-top: 4px;
  
  /* New Animation Style */
  opacity: 0;
  visibility: hidden;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
}

.multiselect-dropdown.open .multiselect-dropdown-options {
  opacity: 1;
  visibility: visible;
  transform: scaleY(1);
}

.multiselect-dropdown-options label {
  display: grid;
  grid-template-columns: auto 1fr;
  width: 100%;
  box-sizing: border-box; /* Include padding in width calculation */
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.multiselect-dropdown-options label:hover {
  background-color: var(--bg-hover, rgba(255,255,255,0.1));
}

.multiselect-dropdown-options label:last-child {
    border-bottom: none;
}

.multiselect-dropdown-options input[type="checkbox"] {
  margin-right: 0; /* Gap is handled by grid */
  vertical-align: middle;
}

.multiselect-dropdown-divider {
  height: 1px;
  background-color: var(--border-medium);
  margin: 5px 0;
}

/* Status-specific colors for multi-select options */
.multiselect-dropdown-options label[data-i18n-label*="created"] {
  background-color: rgba(108, 117, 125, 0.2);
  color: #adb5bd;
}
.multiselect-dropdown-options label[data-i18n-label*="registered"] {
  background-color: rgba(230, 81, 0, 0.2);
  color: #ffab91;
}
.multiselect-dropdown-options label[data-i18n-label*="confirmed"] {
  background-color: rgba(40, 167, 69, 0.2);
  color: #7dd3a0;
}
.multiselect-dropdown-options label[data-i18n-label*="canceled"] {
  background-color: rgba(220, 53, 69, 0.2);
  color: #f5a3a9;
}
.multiselect-dropdown-options label[data-i18n-label*="registrationDue"] {
  background-color: rgba(111, 66, 193, 0.2);
  color: #c9a8e8;
}

/* Hide back to dashboard buttons on desktop */
@media (min-width: 1024px) {
  .back-container {
    display: none !important;
  }

  /* Also hide any back button with ID containing 'backToDashboard' */
  button[id*='backToDashboard'] {
    display: none !important;
  }

  /* Hide onclick back to dashboard buttons */
  button[onclick*='dashboard.html'] {
    display: none !important;
  }
}
/* FINAL MOBILE FIX - Must be at end of file */
@media (max-width: 1023px) {
  .sidebar {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }
}

/* Dashboard Logo Fix */
.dashboard-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  width: 100%;
}

.dashboard-logo img {
  max-width: 180px;
  height: auto;
  object-fit: contain;
}

@media (max-width: 768px) {
  .dashboard-logo img {
    max-width: 120px;
  }
}

/* Mobile Dashboard Menu */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 Columns on mobile */
  gap: 15px;
  margin-top: 20px;
}

@media (min-width: 769px) {
  .quick-actions {
    display: none !important;
  }
  .desktop-welcome {
     /* display: none; Let's keep welcome message for now, or hide it? */
  }
}

/* Toast Notification System */
#toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: min(400px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md, 10px);
  background: var(--bg-secondary, #242424);
  border: 1px solid var(--border-medium, rgba(255,255,255,0.12));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  color: var(--text-primary, #f5f5f5);
  font-size: 0.9rem;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.toast-enter {
  opacity: 1;
  transform: translateX(0);
}

.toast.toast-exit {
  opacity: 0;
  transform: translateX(40px);
}

.toast-icon {
  font-size: 1.1em;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  line-height: 1.4;
}

.toast-close {
  background: none !important;
  border: none !important;
  color: var(--text-muted, #6b7280);
  font-size: 1.2em;
  cursor: pointer;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  min-height: auto !important;
  box-shadow: none !important;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s ease;
  transform: none !important;
}

.toast-close:hover {
  opacity: 1;
  transform: none !important;
  box-shadow: none !important;
}

.toast-success {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), var(--bg-secondary, #242424));
}
.toast-success .toast-icon { color: #6ee7b7; }

.toast-error {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), var(--bg-secondary, #242424));
}
.toast-error .toast-icon { color: #fca5a5; }

.toast-warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), var(--bg-secondary, #242424));
}
.toast-warning .toast-icon { color: #fcd34d; }

.toast-info {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), var(--bg-secondary, #242424));
}
.toast-info .toast-icon { color: #a5b4fc; }

@media (max-width: 480px) {
  #toast-container {
    top: 8px;
    right: 8px;
    left: 8px;
    max-width: none;
  }
}
