/* Funky splash bundle - generated Sun Dec 21 22:02:46 2025 */
/* css/fonts.css */
/* ==========================================================================
   Local Font Definitions - Inter & JetBrains Mono
   ========================================================================== */

/* Inter - UI Font
   Weights: 300 (Light), 400 (Regular), 500 (Medium), 600 (SemiBold), 700 (Bold)
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/inter/Inter-Light.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter/Inter-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter/Inter-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter/Inter-Bold.woff2') format('woff2');
}

/* JetBrains Mono - Monospace Font for Tabular Data
   Weights: 400 (Regular), 500 (Medium), 600 (SemiBold)
   ========================================================================== */

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono/JetBrainsMono-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono/JetBrainsMono-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/jetbrains-mono/JetBrainsMono-SemiBold.woff2') format('woff2');
}

/* css/spa.css */
/* ============================================
   SPA.CSS - Single Page Application Styles
   Loading indicators, transitions, skeletons
   ============================================ */

/* ============================================
   SPA LOADING INDICATOR
   ============================================ */

/* Top progress bar - spans full viewport width */
.spa-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.spa-progress-bar.active {
  opacity: 1;
}

.spa-progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--user-accent, var(--pro-accent-primary)), var(--pro-accent-info));
  border-radius: 0 2px 2px 0;
  transition: width 0.2s ease;
}

.spa-progress-bar.active::before {
  animation: spa-progress 2s ease-in-out forwards;
}

.spa-progress-bar.complete::before {
  width: 100%;
  transition: width 0.1s ease;
}

@keyframes spa-progress {
  0% { width: 0%; }
  20% { width: 30%; }
  50% { width: 60%; }
  80% { width: 80%; }
  100% { width: 90%; }
}

/* Pulsing glow effect on progress bar */
.spa-progress-bar.active::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--pro-shimmer-color, rgba(255, 255, 255, 0.3)), transparent);
  animation: spa-progress-glow 1s ease-in-out infinite;
}

@keyframes spa-progress-glow {
  0%, 100% {
    opacity: 0;
    transform: translateX(-100px);
  }
  50% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Full overlay - used for longer loads */
.spa-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--pro-overlay-bg, rgba(0, 0, 0, 0.5));
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

/* Initial load overlay - solid background to hide layout flash */
.spa-loading-overlay.initial-load {
  background: var(--pro-bg-primary, #1a1a2e);
  backdrop-filter: none;
}

.spa-loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.spinner-ring {
  width: 48px;
  height: 48px;
  border: 3px solid var(--pro-border-color);
  border-top-color: var(--user-accent, var(--pro-accent-primary));
  border-radius: 50%;
  animation: spa-spin 0.8s linear infinite;
}

.spinner-text {
  color: var(--pro-text-primary);
  font-size: var(--pro-font-size-sm);
  font-weight: 500;
}

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

/* SPA loading state - disable interactions */
body.spa-loading {
  pointer-events: none;
}

body.spa-loading .main-wrapper {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

/* ============================================
   SPA PAGE TRANSITIONS
   Smooth animations when navigating between pages
   ============================================ */

/* Content container transitions */
#spaContent {
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

/* Fade out state - applied before content swap */
#spaContent.spa-transitioning-out {
  opacity: 0;
  transform: translateY(-8px);
}

/* Fade in state - applied after content swap */
#spaContent.spa-transitioning-in {
  opacity: 0;
  transform: translateY(8px);
}

/* Animate to visible state */
#spaContent.spa-content-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Skeleton loading placeholders for content */
.spa-skeleton {
  background: linear-gradient(
    90deg,
    var(--pro-bg-tertiary) 25%,
    var(--pro-bg-elevated) 50%,
    var(--pro-bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: spa-skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.spa-skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
  width: 100%;
}

.spa-skeleton-text:last-child {
  width: 70%;
}

.spa-skeleton-title {
  height: 1.5em;
  width: 40%;
  margin-bottom: 1em;
}

.spa-skeleton-card {
  height: 120px;
  margin-bottom: 1em;
}

.spa-skeleton-table {
  height: 300px;
}

@keyframes spa-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Stagger animation for child elements */
#spaContent.spa-content-visible > .card,
#spaContent.spa-content-visible > .row > .col > .card,
#spaContent.spa-content-visible > .row > [class*="col-"] > .card,
#spaContent.spa-content-visible > .container > .card,
#spaContent.spa-content-visible > .container-fluid > .card {
  animation: spa-fade-in-up 0.25s ease-out backwards;
}

#spaContent.spa-content-visible > .card:nth-child(1),
#spaContent.spa-content-visible > .row > .col:nth-child(1) > .card,
#spaContent.spa-content-visible > .row > [class*="col-"]:nth-child(1) > .card {
  animation-delay: 0s;
}

#spaContent.spa-content-visible > .card:nth-child(2),
#spaContent.spa-content-visible > .row > .col:nth-child(2) > .card,
#spaContent.spa-content-visible > .row > [class*="col-"]:nth-child(2) > .card {
  animation-delay: 0.05s;
}

#spaContent.spa-content-visible > .card:nth-child(3),
#spaContent.spa-content-visible > .row > .col:nth-child(3) > .card,
#spaContent.spa-content-visible > .row > [class*="col-"]:nth-child(3) > .card {
  animation-delay: 0.1s;
}

#spaContent.spa-content-visible > .card:nth-child(4),
#spaContent.spa-content-visible > .row > .col:nth-child(4) > .card,
#spaContent.spa-content-visible > .row > [class*="col-"]:nth-child(4) > .card {
  animation-delay: 0.15s;
}

@keyframes spa-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  #spaContent,
  #spaContent.spa-transitioning-out,
  #spaContent.spa-transitioning-in,
  #spaContent.spa-content-visible {
    transition: none;
    transform: none;
    animation: none;
  }
  
  #spaContent.spa-content-visible > .card,
  #spaContent.spa-content-visible > .row > .col > .card,
  #spaContent.spa-content-visible > .row > [class*="col-"] > .card {
    animation: none;
  }
  
  .spa-skeleton {
    animation: none;
  }
}

/* css/layout.css */
/* ============================================
   LAYOUT.CSS - Page Layout & Structure
   Sidebar, main wrapper, top header, content
   ============================================ */

/* ============================================
   COLLAPSIBLE SIDEBAR SYSTEM
   ============================================ */

:root {
  --sidebar-width-expanded: 260px;
  --sidebar-width-collapsed: 56px;
  --sidebar-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Navigation Position System */
  --nav-height-horizontal: 56px;
  --nav-position: left; /* left | top | right | bottom */
}

/* ============================================
   SIDEBAR BASE STYLES (Default: Left Position)
   ============================================ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width-expanded);
  height: 100vh;
  background: var(--pro-bg-secondary);
  border-right: 1px solid var(--pro-border-color);
  padding: 0;
  z-index: 1030; /* Below modal backdrop (1040) and modal (1050) */
  transition: width var(--sidebar-transition), transform 0.3s ease, opacity 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

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

.sidebar.collapsed .sidebar-logo-text,
.sidebar.sidebar-collapsed .sidebar-logo-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
  display: none;
}

.sidebar.collapsed .sidebar-header,
.sidebar.sidebar-collapsed .sidebar-header {
  padding: 15px 8px;
  display: flex;
  justify-content: center;
  padding-left: 12px;
}

.sidebar.collapsed .vinyl-record,
.sidebar.sidebar-collapsed .vinyl-record {
  width: 32px;
  height: 32px;
}

.sidebar.collapsed .vinyl-record::before,
.sidebar.sidebar-collapsed .vinyl-record::before {
  width: 8px;
  height: 8px;
}

.sidebar.collapsed .record-label,
.sidebar.sidebar-collapsed .record-label {
  font-size: 5px;
}

.sidebar.collapsed .nav-section-title,
.sidebar.sidebar-collapsed .nav-section-title {
  opacity: 0;
  height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}



/* Sidebar Header */
.sidebar-header {
  padding: 25px 20px;
  background: var(--pro-bg-tertiary);
  border-bottom: 1px solid var(--pro-border-color);
}

.sidebar-logo {
  font-size: 24px;
  font-weight: 800;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.sidebar-logo-text {
  transition: opacity var(--sidebar-transition), width var(--sidebar-transition);
  white-space: nowrap;
}

/* Vinyl Record Logo */
.sidebar-logo .vinyl-record {
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, #1a1a1a 0%, #1a1a1a 30%, white 30%, white 32%, #1a1a1a 32%, #1a1a1a 100%);
  border-radius: 50%;
  position: relative;
  animation: vinylSpin 3s linear infinite;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.sidebar-logo .vinyl-record::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.5);
}

.sidebar-logo .record-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 6px;
  color: var(--pro-text-inverse, #1a1a1a);
  font-weight: bold;
  text-align: center;
  line-height: 1;
}

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

/* CSS Tooltips for Collapsed Sidebar */
.sidebar.sidebar-collapsed .nav-link {
  position: relative;
}

.sidebar.sidebar-collapsed .nav-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--pro-bg-elevated);
  color: var(--pro-text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1001;
  box-shadow: var(--pro-shadow-lg);
  pointer-events: none;
}

.sidebar.sidebar-collapsed .nav-link::before {
  content: '';
  position: absolute;
  left: calc(100% + 4px);
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: var(--pro-bg-elevated);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sidebar.sidebar-collapsed .nav-link:hover::after,
.sidebar.sidebar-collapsed .nav-link:hover::before {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   MAIN CONTENT WRAPPER
   ============================================ */
.main-wrapper {
  margin-left: var(--sidebar-width-expanded);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--sidebar-transition);
  position: relative;
}

.main-wrapper.sidebar-collapsed,
.sidebar-collapsed ~ .main-wrapper,
body.sidebar-is-collapsed .main-wrapper {
  margin-left: var(--sidebar-width-collapsed);
}

/* Top Header */
.top-header {
  background: var(--pro-bg-secondary);
  border-bottom: 1px solid var(--pro-border-color);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(10px);
}

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

.page-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--pro-text-primary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pro-accent-success, #10b981);
  animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--user-accent, var(--pro-accent-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: white;
}

/* Header Right - consistent spacing */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Header Badge - matching height */
.header-badge {
  height: 36px;
  padding: 0 12px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  font-size: 12px;
  color: var(--pro-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* User Menu - matching height */
.user-menu {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-menu:hover {
  border-color: var(--user-accent, var(--pro-accent-primary));
  transform: translateY(-2px);
}

.user-menu.active {
  border-color: var(--user-accent, var(--pro-accent-primary));
  background: var(--pro-bg-secondary);
}

.user-menu-avatar {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--pro-accent-primary) 0%, var(--pro-accent-purple) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
}

.user-menu-name {
  font-weight: 500;
  font-size: 14px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-arrow {
  font-size: 10px;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.user-menu.active .user-menu-arrow {
  transform: rotate(180deg);
}

/* User Menu Dropdown */
.user-menu-dropdown {
  position: fixed;
  top: 60px;
  right: 20px;
  width: 260px;
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}

.user-menu-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.user-menu-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--pro-bg-elevated);
}

.user-menu-dropdown-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--pro-accent-primary) 0%, var(--pro-accent-purple) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
}

.user-menu-dropdown-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.user-menu-dropdown-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--pro-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.user-menu-dropdown-divider {
  height: 1px;
  background: var(--pro-border-color);
  margin: 0;
}

.user-menu-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--pro-text-primary);
  text-decoration: none;
  transition: background 0.15s ease;
  cursor: pointer;
}

.user-menu-dropdown-item:hover {
  background: var(--pro-bg-elevated);
  color: var(--pro-text-primary);
  text-decoration: none;
}

.user-menu-dropdown-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--pro-text-secondary);
}

.user-menu-dropdown-item:hover i {
  color: var(--user-accent, var(--pro-accent-primary));
}

.user-menu-dropdown-item span {
  font-size: 14px;
}

.user-menu-dropdown-item-danger {
  color: var(--pro-status-error);
}

.user-menu-dropdown-item-danger i {
  color: var(--pro-status-error);
}

.user-menu-dropdown-item-danger:hover {
  background: rgba(248, 81, 73, 0.1);
  color: var(--pro-status-error);
}

.user-menu-dropdown-item-danger:hover i {
  color: var(--pro-status-error);
}

/* Main Content Area */
.main-content {
  padding: 1em;
  flex: 1;
  animation: fadeIn 0.5s ease-out;
}

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

/* ============================================
   NAVIGATION POSITION SYSTEM
   Supports: left (default), top, right, bottom
   ============================================ */

/* ============================================
   RIGHT NAVIGATION POSITION
   Mirror of left sidebar, but on right side
   ============================================ */
[data-nav-position="right"] .sidebar {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid var(--pro-border-color);
}

[data-nav-position="right"] .main-wrapper {
  margin-left: 0;
  margin-right: var(--sidebar-width-expanded);
}

[data-nav-position="right"] .main-wrapper.sidebar-collapsed,
[data-nav-position="right"] .sidebar-collapsed ~ .main-wrapper,
[data-nav-position="right"].sidebar-is-collapsed .main-wrapper {
  margin-right: var(--sidebar-width-collapsed);
}

/* Right sidebar toggle button position */
[data-nav-position="right"] .sidebar-toggle {
  right: auto;
}

[data-nav-position="right"] .sidebar-toggle .toggle-icon {
  transform: rotate(180deg);
}

[data-nav-position="right"] .sidebar.collapsed .sidebar-toggle .toggle-icon,
[data-nav-position="right"] .sidebar.sidebar-collapsed .sidebar-toggle .toggle-icon {
  transform: rotate(0deg);
}

/* Flyout positioning for right sidebar */
[data-nav-position="right"] .nav-flyout {
  left: auto;
  right: calc(100% + 8px);
  transform-origin: right center;
  transform: translateX(4px) scale(0.98);
}

/* Flyout visible state for right sidebar */
[data-nav-position="right"] .sidebar.collapsed .nav-group:hover .nav-flyout,
[data-nav-position="right"] .sidebar.collapsed .nav-standalone:hover .nav-flyout {
  transform: translateX(0) scale(1);
}

/* Flyout arrow for right sidebar */
[data-nav-position="right"] .nav-flyout::before {
  left: auto;
  right: -6px;
  border-right-color: transparent;
  border-left-color: var(--pro-border-color);
  border-right: none;
  border-left: 6px solid var(--pro-border-color);
}

[data-nav-position="right"] .nav-flyout::after {
  left: auto;
  right: -4px;
  border-right-color: transparent;
  border-left-color: var(--pro-bg-elevated);
  border-right: none;
  border-left: 5px solid var(--pro-bg-elevated);
}

/* Invisible bridge for right sidebar - positioned on right side */
[data-nav-position="right"] .sidebar.collapsed .nav-group::after,
[data-nav-position="right"] .sidebar.collapsed .nav-standalone::after {
  left: auto;
  right: 40px;
  width: calc(var(--sidebar-width-collapsed, 56px) - 40px + 8px);
}

[data-nav-position="right"] .sidebar.sidebar-collapsed .nav-link::after {
  left: auto;
  right: calc(100% + 10px);
}

[data-nav-position="right"] .sidebar.sidebar-collapsed .nav-link::before {
  left: auto;
  right: calc(100% + 4px);
  border-right-color: transparent;
  border-left-color: var(--pro-bg-elevated);
}

/* ============================================
   TOP NAVIGATION POSITION
   Horizontal navigation bar at top
   ============================================ */
[data-nav-position="top"] .sidebar {
  left: 0;
  top: 0;
  right: 0;
  bottom: auto;
  width: 100%;
  height: var(--nav-height-horizontal);
  flex-direction: row;
  border-right: none;
  border-bottom: 1px solid var(--pro-border-color);
  overflow: visible;
  z-index: 1000;
}

[data-nav-position="top"] .sidebar-header {
  padding: 0 20px;
  border-bottom: none;
  border-right: 1px solid var(--pro-border-color);
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
  width: auto;
}

[data-nav-position="top"] .sidebar-logo {
  gap: 8px;
}

[data-nav-position="top"] .sidebar-logo .vinyl-record {
  width: 32px;
  height: 32px;
}

[data-nav-position="top"] .sidebar-logo-text {
  font-size: 18px;
}

[data-nav-position="top"] .sidebar-nav {
  flex: 1;
  flex-direction: row;
  padding: 0 12px;
  overflow-x: auto;
  overflow-y: visible;
  align-items: center;
  gap: 4px;
}

[data-nav-position="top"] .sidebar-nav::-webkit-scrollbar {
  height: 4px;
}

[data-nav-position="top"] .nav-group {
  margin: 0;
  position: relative;
}

[data-nav-position="top"] .nav-group-header {
  height: calc(var(--nav-height-horizontal) - 16px);
  white-space: nowrap;
  padding: 0 12px;
}

[data-nav-position="top"] .nav-group-header-content {
  gap: 6px;
}

[data-nav-position="top"] .nav-group-chevron {
  transform: rotate(90deg);
}

[data-nav-position="top"] .nav-group.expanded .nav-group-chevron {
  transform: rotate(-90deg);
}

[data-nav-position="top"] .nav-group-items {
  /* Reset from vertical collapsible to dropdown */
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-lg);
  padding: 8px;
  z-index: 1200;
  /* Reset all vertical nav collapsible styles */
  max-height: none !important;
  opacity: 1 !important;
  margin: 0 !important;
  overflow: visible;
  flex-direction: column;
  transform: none;
  transition: none;
}

/* Dropdown nav items styling for horizontal nav */
[data-nav-position="top"] .nav-group-items .nav-item {
  list-style: none;
  margin: 0;
}

[data-nav-position="top"] .nav-group-items .nav-link {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  margin: 2px 0;
  border-radius: 6px;
  color: var(--pro-text-secondary);
  text-decoration: none;
  font-size: 13px;
  border-left: none;
  transition: 
    background 0.15s ease,
    color 0.15s ease;
}

[data-nav-position="top"] .nav-group-items .nav-link:hover {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-primary);
  border-left: none;
}

[data-nav-position="top"] .nav-group-items .nav-link.active {
  background: var(--user-accent-muted, var(--pro-accent-primary-muted));
  color: var(--user-accent, var(--pro-accent-primary));
  font-weight: 500;
}

[data-nav-position="top"] .nav-group-items .nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0.7;
  margin-right: 10px;
  flex-shrink: 0;
}

[data-nav-position="top"] .nav-group-items .nav-link:hover .nav-icon,
[data-nav-position="top"] .nav-group-items .nav-link.active .nav-icon {
  opacity: 1;
}

[data-nav-position="top"] .nav-group-items .nav-text {
  flex: 1;
  white-space: nowrap;
}

/* Show dropdown when expanded */
[data-nav-position="top"] .nav-group.expanded .nav-group-items,
[data-nav-position="top"] .nav-group.open .nav-group-items {
  display: flex;
}

[data-nav-position="top"] .nav-standalone {
  list-style: none;
}

[data-nav-position="top"] .nav-standalone .nav-link {
  height: calc(var(--nav-height-horizontal) - 16px);
  white-space: nowrap;
  padding: 0 12px;
}

/* Always hide flyout in top nav - use dropdown instead */
[data-nav-position="top"] .nav-flyout,
[data-nav-position="top"] .sidebar.collapsed .nav-flyout,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-flyout,
[data-nav-position="top"] .sidebar.collapsed .nav-group:hover .nav-flyout,
[data-nav-position="top"] .sidebar.collapsed .nav-standalone:hover .nav-flyout {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Collapsed state for top nav - icons only with click dropdowns */
[data-nav-position="top"] .sidebar.collapsed,
[data-nav-position="top"] .sidebar.sidebar-collapsed {
  width: 100%; /* Keep full width */
  overflow: visible !important;
}

/* Ensure overflow visible for dropdown to show */
[data-nav-position="top"] .sidebar.collapsed .sidebar-nav,
[data-nav-position="top"] .sidebar.sidebar-collapsed .sidebar-nav {
  overflow: visible !important;
}

[data-nav-position="top"] .sidebar.collapsed .nav-group,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-group {
  overflow: visible;
}

[data-nav-position="top"] .sidebar.collapsed .nav-text,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-text {
  display: none;
}

[data-nav-position="top"] .sidebar.collapsed .nav-group-header,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-group-header {
  padding: 0 12px;
  min-width: 44px;
  height: calc(var(--nav-height-horizontal) - 16px);
}

[data-nav-position="top"] .sidebar.collapsed .nav-standalone .nav-link,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-standalone .nav-link {
  padding: 0 12px;
  min-width: 44px;
}

/* Override navigation.css collapsed rules - use dropdown not flyout */
[data-nav-position="top"] .sidebar.collapsed .nav-group-items,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-group-items {
  /* Reset from vertical collapsible to dropdown */
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-lg);
  padding: 8px;
  z-index: 1200;
  max-height: none !important;
  opacity: 1 !important;
  margin: 0 !important;
  overflow: visible !important;
}

/* Show collapsed dropdown when expanded */
[data-nav-position="top"] .sidebar.collapsed .nav-group.expanded .nav-group-items,
[data-nav-position="top"] .sidebar.collapsed .nav-group.open .nav-group-items,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-group.expanded .nav-group-items,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-group.open .nav-group-items {
  display: flex !important;
  flex-direction: column;
}

/* Show text in collapsed dropdown items */
[data-nav-position="top"] .sidebar.collapsed .nav-group-items .nav-text,
[data-nav-position="top"] .sidebar.sidebar-collapsed .nav-group-items .nav-text {
  display: inline !important;
}

/* Sidebar toggle for top nav - positioned at end of nav, vertically centered */
[data-nav-position="top"] .sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  margin-left: auto;
  margin-right: 12px;
  width: 32px;
  height: 32px;
  align-self: center;
}

/* Main wrapper adjustment for top nav */
[data-nav-position="top"] .main-wrapper {
  margin-left: 0;
  margin-top: var(--nav-height-horizontal);
}

[data-nav-position="top"] .main-wrapper.sidebar-collapsed {
  margin-left: 0;
  margin-top: var(--nav-height-horizontal);
}

/* ============================================
   BOTTOM NAVIGATION POSITION
   Horizontal navigation bar at bottom
   ============================================ */
[data-nav-position="bottom"] .sidebar {
  left: 0;
  top: auto;
  right: 0;
  bottom: 0;
  width: 100%;
  height: var(--nav-height-horizontal);
  flex-direction: row;
  border-right: none;
  border-top: 1px solid var(--pro-border-color);
  overflow: visible;
  z-index: 1000;
}

[data-nav-position="bottom"] .sidebar-header {
  padding: 0 20px;
  border-bottom: none;
  border-right: 1px solid var(--pro-border-color);
  display: flex;
  align-items: center;
  height: 100%;
}

[data-nav-position="bottom"] .sidebar-logo {
  gap: 8px;
}

[data-nav-position="bottom"] .sidebar-logo .vinyl-record {
  width: 32px;
  height: 32px;
}

[data-nav-position="bottom"] .sidebar-logo-text {
  font-size: 18px;
}

[data-nav-position="bottom"] .sidebar-nav {
  flex-direction: row;
  padding: 0 12px;
  overflow-x: auto;
  overflow-y: visible;
  align-items: center;
  gap: 4px;
}

[data-nav-position="bottom"] .sidebar-nav::-webkit-scrollbar {
  height: 4px;
}

[data-nav-position="bottom"] .nav-group {
  margin: 0;
  position: relative;
}

[data-nav-position="bottom"] .nav-group-header {
  height: calc(var(--nav-height-horizontal) - 16px);
  white-space: nowrap;
  padding: 0 12px;
}

[data-nav-position="bottom"] .nav-group-header-content {
  gap: 6px;
}

[data-nav-position="bottom"] .nav-group-chevron {
  transform: rotate(-90deg);
}

[data-nav-position="bottom"] .nav-group.expanded .nav-group-chevron {
  transform: rotate(90deg);
}

[data-nav-position="bottom"] .nav-group-items {
  /* Reset from vertical collapsible to dropdown */
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  min-width: 200px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-lg);
  padding: 8px;
  z-index: 1200;
  /* Reset all vertical nav collapsible styles */
  max-height: none !important;
  opacity: 1 !important;
  margin: 0 !important;
  overflow: visible;
  flex-direction: column;
  transform: none;
  transition: none;
}

/* Dropdown nav items styling for horizontal nav */
[data-nav-position="bottom"] .nav-group-items .nav-item {
  list-style: none;
  margin: 0;
}

[data-nav-position="bottom"] .nav-group-items .nav-link {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  margin: 2px 0;
  border-radius: 6px;
  color: var(--pro-text-secondary);
  text-decoration: none;
  font-size: 13px;
  border-left: none;
  transition: 
    background 0.15s ease,
    color 0.15s ease;
}

[data-nav-position="bottom"] .nav-group-items .nav-link:hover {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-primary);
  border-left: none;
}

[data-nav-position="bottom"] .nav-group-items .nav-link.active {
  background: var(--user-accent-muted, var(--pro-accent-primary-muted));
  color: var(--user-accent, var(--pro-accent-primary));
  font-weight: 500;
}

[data-nav-position="bottom"] .nav-group-items .nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0.7;
  margin-right: 10px;
  flex-shrink: 0;
}

[data-nav-position="bottom"] .nav-group-items .nav-link:hover .nav-icon,
[data-nav-position="bottom"] .nav-group-items .nav-link.active .nav-icon {
  opacity: 1;
}

[data-nav-position="bottom"] .nav-group-items .nav-text {
  flex: 1;
  white-space: nowrap;
}

/* Show dropdown when expanded */
[data-nav-position="bottom"] .nav-group.expanded .nav-group-items,
[data-nav-position="bottom"] .nav-group.open .nav-group-items {
  display: flex;
}

[data-nav-position="bottom"] .nav-standalone {
  list-style: none;
}

[data-nav-position="bottom"] .nav-standalone .nav-link {
  height: calc(var(--nav-height-horizontal) - 16px);
  white-space: nowrap;
  padding: 0 12px;
}

/* Always hide flyout in bottom nav - use dropdown instead */
[data-nav-position="bottom"] .nav-flyout,
[data-nav-position="bottom"] .sidebar.collapsed .nav-flyout,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-flyout,
[data-nav-position="bottom"] .sidebar.collapsed .nav-group:hover .nav-flyout,
[data-nav-position="bottom"] .sidebar.collapsed .nav-standalone:hover .nav-flyout {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Collapsed state for bottom nav - icons only with click dropdowns */
[data-nav-position="bottom"] .sidebar.collapsed,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed {
  width: 100%; /* Keep full width */
  overflow: visible !important;
}

/* Ensure overflow visible for dropdown to show */
[data-nav-position="bottom"] .sidebar.collapsed .sidebar-nav,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .sidebar-nav {
  overflow: visible !important;
}

[data-nav-position="bottom"] .sidebar.collapsed .nav-group,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-group {
  overflow: visible;
}

[data-nav-position="bottom"] .sidebar.collapsed .nav-text,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-text {
  display: none;
}

[data-nav-position="bottom"] .sidebar.collapsed .nav-group-header,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-group-header {
  padding: 0 12px;
  min-width: 44px;
  height: calc(var(--nav-height-horizontal) - 16px);
}

[data-nav-position="bottom"] .sidebar.collapsed .nav-standalone .nav-link,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-standalone .nav-link {
  padding: 0 12px;
  min-width: 44px;
}

/* Override navigation.css collapsed rules - use dropdown not flyout */
[data-nav-position="bottom"] .sidebar.collapsed .nav-group-items,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-group-items {
  /* Reset from vertical collapsible to dropdown */
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  min-width: 200px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-lg);
  padding: 8px;
  z-index: 1200;
  max-height: none !important;
  opacity: 1 !important;
  margin: 0 !important;
  overflow: visible !important;
}

/* Show collapsed dropdown when expanded */
[data-nav-position="bottom"] .sidebar.collapsed .nav-group.expanded .nav-group-items,
[data-nav-position="bottom"] .sidebar.collapsed .nav-group.open .nav-group-items,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-group.expanded .nav-group-items,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-group.open .nav-group-items {
  display: flex !important;
  flex-direction: column;
}

/* Show text in collapsed dropdown items */
[data-nav-position="bottom"] .sidebar.collapsed .nav-group-items .nav-text,
[data-nav-position="bottom"] .sidebar.sidebar-collapsed .nav-group-items .nav-text {
  display: inline !important;
}

/* Sidebar toggle for bottom nav - positioned at end of nav, vertically centered */
[data-nav-position="bottom"] .sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  margin-left: auto;
  margin-right: 12px;
  width: 32px;
  height: 32px;
  align-self: center;
}

/* Main wrapper adjustment for bottom nav */
[data-nav-position="bottom"] .main-wrapper {
  margin-left: 0;
  margin-bottom: var(--nav-height-horizontal);
  min-height: calc(100vh - var(--nav-height-horizontal));
}

[data-nav-position="bottom"] .main-wrapper.sidebar-collapsed {
  margin-left: 0;
  margin-bottom: var(--nav-height-horizontal);
}

/* Sidebar footer for horizontal nav positions */
[data-nav-position="top"] .sidebar-footer,
[data-nav-position="bottom"] .sidebar-footer {
  margin-top: auto;
  padding: 6px 8px;
  border-top: 1px solid var(--pro-border-color, #30363d);
}

/* Adjust sticky header for bottom nav */
[data-nav-position="bottom"] .top-header {
  position: sticky;
  top: 0;
}

/* ============================================
   NAVIGATION POSITION TRANSITIONS
   ============================================ */
.sidebar,
.main-wrapper {
  transition: 
    width var(--sidebar-transition),
    height var(--sidebar-transition),
    margin var(--sidebar-transition),
    transform var(--sidebar-transition),
    left var(--sidebar-transition),
    right var(--sidebar-transition),
    top var(--sidebar-transition),
    bottom var(--sidebar-transition);
}

/* Mobile Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Mobile Hamburger Button */
.mobile-menu-btn {
  display: none;
  background: var(--pro-bg-tertiary);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  color: var(--pro-text-primary);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
  background: var(--pro-bg-elevated);
  border-color: var(--user-accent, var(--pro-accent-primary));
}

/* ============================================
   RESPONSIVE - Mobile
   Force default left sidebar layout on mobile
   regardless of nav-position preference
   ============================================ */
@media (max-width: 768px) {
  /* Reset all nav positions to default left sidebar on mobile */
  [data-nav-position="top"] .sidebar,
  [data-nav-position="right"] .sidebar,
  [data-nav-position="bottom"] .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    bottom: 0;
    width: var(--sidebar-width-expanded) !important;
    height: 100vh;
    flex-direction: column;
    border-right: 1px solid var(--pro-border-color);
    border-left: none;
    border-top: none;
    border-bottom: none;
    transform: translateX(-100%);
    z-index: 1001;
  }
  
  [data-nav-position="top"] .sidebar.open,
  [data-nav-position="top"] .sidebar.mobile-open,
  [data-nav-position="right"] .sidebar.open,
  [data-nav-position="right"] .sidebar.mobile-open,
  [data-nav-position="bottom"] .sidebar.open,
  [data-nav-position="bottom"] .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  /* Reset main wrapper for all positions */
  [data-nav-position="top"] .main-wrapper,
  [data-nav-position="right"] .main-wrapper,
  [data-nav-position="bottom"] .main-wrapper {
    margin: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
  }
  
  /* Reset sidebar header for horizontal navs */
  [data-nav-position="top"] .sidebar-header,
  [data-nav-position="bottom"] .sidebar-header {
    flex-direction: row;
    padding: 1.5rem;
    justify-content: space-between;
    border-bottom: 1px solid var(--pro-border-color);
    height: auto;
    flex-shrink: 0;
    width: 100%;
    border-right: none;
  }
  
  /* Reset sidebar nav for horizontal navs */
  [data-nav-position="top"] #sidebarNav,
  [data-nav-position="bottom"] #sidebarNav {
    flex-direction: column;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    gap: 0;
  }
  
  /* Reset nav groups for horizontal navs */
  [data-nav-position="top"] .nav-group,
  [data-nav-position="bottom"] .nav-group,
  [data-nav-position="top"] .nav-standalone,
  [data-nav-position="bottom"] .nav-standalone {
    position: relative;
    flex-direction: column;
  }
  
  [data-nav-position="top"] .nav-group-header,
  [data-nav-position="bottom"] .nav-group-header {
    padding: 12px 14px;
    justify-content: flex-start;
    width: 100%;
  }
  
  [data-nav-position="top"] .nav-group-items,
  [data-nav-position="bottom"] .nav-group-items {
    position: static;
    display: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    min-width: auto;
    z-index: auto;
  }
  
  [data-nav-position="top"] .nav-group.expanded .nav-group-items,
  [data-nav-position="bottom"] .nav-group.expanded .nav-group-items {
    display: block;
    padding-left: 1rem;
  }
  
  /* Reset chevron rotation */
  [data-nav-position="top"] .nav-group-chevron,
  [data-nav-position="bottom"] .nav-group-chevron {
    transform: rotate(0);
  }
  
  [data-nav-position="top"] .nav-group.expanded .nav-group-chevron,
  [data-nav-position="bottom"] .nav-group.expanded .nav-group-chevron {
    transform: rotate(90deg);
  }
  
  /* Show logo text on mobile */
  [data-nav-position="top"] .sidebar-logo-text,
  [data-nav-position="bottom"] .sidebar-logo-text {
    display: block;
  }
  
  /* Default sidebar styles */
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width-expanded) !important;
    z-index: 1001;
  }
  
  .sidebar.open,
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .sidebar.collapsed,
  .sidebar.sidebar-collapsed {
    width: var(--sidebar-width-expanded) !important;
    transform: translateX(-100%);
  }
  
  .sidebar.collapsed.open,
  .sidebar.collapsed.mobile-open,
  .sidebar.sidebar-collapsed.mobile-open {
    transform: translateX(0);
  }

  .main-wrapper,
  .main-wrapper.sidebar-collapsed {
    margin-left: 0 !important;
  }

  .top-header {
    padding: 15px;
  }

  .main-content {
    padding: 1em;
  }

  .timezone-select {
    min-width: 120px;
    font-size: 12px;
  }

  .header-badge {
    font-size: 12px;
    padding: 4px 8px;
  }
  
  .mobile-menu-btn {
    display: block;
  }
}

/* css/navigation.css */
/* ============================================
   NAVIGATION SYSTEM - Professional Sidebar Navigation
   Inspired by Bloomberg Terminal, GitHub, VS Code
   ============================================ */

/* ============================================
   CSS VARIABLES FOR NAVIGATION
   ============================================ */
:root {
  --nav-item-height: 36px;
  --nav-item-radius: 6px;
  --nav-icon-size: 18px;
  --nav-font-size: 13px;
  --nav-group-gap: 4px;
  --nav-indent: 32px;
  --nav-transition-fast: 0.15s ease;
  --nav-transition-normal: 0.2s ease;
  --nav-transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   SIDEBAR NAVIGATION CONTAINER
   ============================================ */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--pro-border-color) transparent;
}

/* Allow flyouts to overflow when sidebar is collapsed */
.sidebar.collapsed .sidebar-nav {
  overflow: visible;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

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

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

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: var(--pro-border-emphasis);
}

/* ============================================
   NAVIGATION SECTIONS
   ============================================ */
.nav-section {
  margin-bottom: 8px;
}

.nav-section-title {
  display: flex;
  align-items: center;
  padding: 8px 16px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pro-text-muted);
  user-select: none;
}

.sidebar.collapsed .nav-section-title {
  opacity: 0;
  height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

/* ============================================
   NAVIGATION GROUP (Expandable)
   ============================================ */
.nav-group {
  position: relative;
  margin: 0 8px var(--nav-group-gap);
}

/* Group Header - Clickable */
.nav-group-header {
  display: flex;
  align-items: center;
  height: var(--nav-item-height);
  padding: 0 12px;
  border-radius: var(--nav-item-radius);
  color: var(--pro-text-secondary);
  cursor: pointer;
  user-select: none;
  transition: 
    background var(--nav-transition-fast),
    color var(--nav-transition-fast);
}

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

.nav-group-header:active {
  background: var(--pro-bg-elevated);
}

/* Focus styles for keyboard navigation */
.nav-group-header:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--user-accent, var(--pro-accent-primary));
}

/* Header Content Layout */
.nav-group-header-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

/* Group Icon */
.nav-group-header .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  opacity: 0.7;
  transition: opacity var(--nav-transition-fast);
}

.nav-group-header:hover .nav-icon {
  opacity: 1;
}

/* Group Text */
.nav-group-header .nav-text {
  flex: 1;
  font-size: var(--nav-font-size);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--nav-transition-slow);
}

/* Expand/Collapse Chevron */
.nav-group-chevron {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  opacity: 0.4;
  transition: 
    transform var(--nav-transition-normal),
    opacity var(--nav-transition-fast);
  flex-shrink: 0;
}

.nav-group-header:hover .nav-group-chevron {
  opacity: 0.7;
}

.nav-group.expanded .nav-group-chevron {
  transform: rotate(90deg);
  opacity: 0.7;
}

/* ============================================
   GROUP ITEMS CONTAINER (Collapsible)
   ============================================ */
.nav-group-items {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: 
    max-height var(--nav-transition-slow),
    opacity var(--nav-transition-normal),
    margin var(--nav-transition-normal);
}

.nav-group.expanded .nav-group-items {
  max-height: 500px;
  opacity: 1;
  margin-top: 2px;
  margin-bottom: 4px;
}

/* Child Nav Items */
.nav-group-items .nav-item {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-group-items .nav-link {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 12px 0 20px;
  margin: 1px 8px;
  border-radius: var(--nav-item-radius);
  color: var(--pro-text-muted);
  text-decoration: none;
  font-size: var(--nav-font-size);
  position: relative;
  transition: 
    background var(--nav-transition-fast),
    color var(--nav-transition-fast),
    border-color var(--nav-transition-fast);
  border-left: 2px solid transparent;
}

.nav-group-items .nav-link:hover {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-primary);
  border-left-color: var(--pro-border-emphasis);
}

.nav-group-items .nav-link:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--user-accent, var(--pro-accent-primary));
}

/* Child Item Icon */
.nav-group-items .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0.6;
  margin-right: 8px;
  flex-shrink: 0;
  transition: opacity var(--nav-transition-fast);
}

.nav-group-items .nav-link:hover .nav-icon {
  opacity: 0.9;
}

/* Child Item Text */
.nav-group-items .nav-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
   ACTIVE STATES
   ============================================ */

/* Active child item */
.nav-group-items .nav-link.active {
  background: var(--user-accent-muted, var(--pro-accent-primary-muted));
  color: var(--user-accent, var(--pro-accent-primary));
  font-weight: 500;
  border-left-color: var(--user-accent, var(--pro-accent-primary));
}

.nav-group-items .nav-link.active .nav-icon {
  opacity: 1;
}

/* Parent group with active child */
.nav-group.has-active > .nav-group-header {
  color: var(--user-accent, var(--pro-accent-primary));
}

.nav-group.has-active > .nav-group-header .nav-icon {
  opacity: 1;
}

.nav-group.has-active > .nav-group-header .nav-group-chevron {
  opacity: 0.8;
}

/* Expanded group header with active child */
.nav-group.has-active.expanded > .nav-group-header {
  background: var(--user-accent-muted, var(--pro-accent-primary-muted));
}

/* ============================================
   STANDALONE NAV ITEMS (No submenu)
   ============================================ */
.nav-standalone {
  position: relative;
  margin: 0 8px var(--nav-group-gap);
  list-style: none;
}

.nav-standalone .nav-link {
  display: flex;
  align-items: center;
  height: var(--nav-item-height);
  padding: 0 12px;
  border-radius: var(--nav-item-radius);
  color: var(--pro-text-secondary);
  text-decoration: none;
  transition: 
    background var(--nav-transition-fast),
    color var(--nav-transition-fast);
}

.nav-standalone .nav-link:hover {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-primary);
}

.nav-standalone .nav-link:active {
  background: var(--pro-bg-elevated);
}

.nav-standalone .nav-link:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--user-accent, var(--pro-accent-primary));
}

.nav-standalone .nav-link.active {
  background: var(--user-accent-muted, var(--pro-accent-primary-muted));
  color: var(--user-accent, var(--pro-accent-primary));
  font-weight: 500;
}

.nav-standalone .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  opacity: 0.7;
  margin-right: 10px;
  flex-shrink: 0;
  transition: opacity var(--nav-transition-fast);
}

.nav-standalone .nav-link:hover .nav-icon,
.nav-standalone .nav-link.active .nav-icon {
  opacity: 1;
}

.nav-standalone .nav-text {
  flex: 1;
  font-size: var(--nav-font-size);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--nav-transition-slow);
}

/* ============================================
   NAVIGATION DIVIDER
   ============================================ */
.nav-divider {
  height: 1px;
  margin: 8px 16px;
  background: var(--pro-border-muted);
}

/* ============================================
   COLLAPSED SIDEBAR - Navigation Styles
   ============================================ */
.sidebar.collapsed .nav-group-header .nav-text,
.sidebar.collapsed .nav-group-header .nav-group-chevron,
.sidebar.collapsed .nav-standalone .nav-text {
  display: none;
}

.sidebar.collapsed .nav-group-header-content {
  flex: none;
  gap: 0;
}

.sidebar.collapsed .nav-group-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  height: 40px;
  width: 40px;
  margin: 0 auto;
  border-radius: 8px;
}

.sidebar.collapsed .nav-standalone .nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  height: 40px;
  width: 40px;
  margin: 0 auto;
  border-radius: 8px;
}

.sidebar.collapsed .nav-group {
  margin: 0 0 var(--nav-group-gap);
  position: relative;
}

.sidebar.collapsed .nav-standalone {
  margin: 0 0 var(--nav-group-gap);
  position: relative;
}

.sidebar.collapsed .nav-group-header .nav-icon,
.sidebar.collapsed .nav-standalone .nav-icon {
  margin: 0;
}

/* Active state for collapsed sidebar - show accent ring around icon */
.sidebar.collapsed .nav-group.has-active > .nav-group-header {
  background: var(--user-accent-muted, var(--pro-accent-primary-muted));
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px var(--user-accent, var(--pro-accent-primary));
}

.sidebar.collapsed .nav-group.has-active > .nav-group-header .nav-icon {
  color: var(--user-accent, var(--pro-accent-primary));
}

.sidebar.collapsed .nav-standalone .nav-link.active {
  background: var(--user-accent-muted, var(--pro-accent-primary-muted));
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px var(--user-accent, var(--pro-accent-primary));
}

.sidebar.collapsed .nav-standalone .nav-link.active .nav-icon {
  color: var(--user-accent, var(--pro-accent-primary));
}

.sidebar.collapsed .nav-group-items {
  max-height: 0 !important;
  opacity: 0;
  margin: 0;
  padding: 0;
}

/* ============================================
   FLYOUT MENU (Collapsed Sidebar Hover)
   ============================================ */

/* Hide flyout when sidebar is expanded */
.sidebar:not(.collapsed) .nav-flyout {
  display: none;
}

.nav-flyout {
  position: absolute;
  left: var(--sidebar-width-collapsed, 56px);
  top: 0;
  min-width: 180px;
  max-width: 240px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-lg);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-4px) scale(0.98);
  transform-origin: left center;
  transition: 
    opacity var(--nav-transition-fast),
    visibility var(--nav-transition-fast),
    transform var(--nav-transition-normal);
  z-index: 1200; /* Above top-header (999) and content */
  pointer-events: none;
}

/* Arrow pointer */
.nav-flyout::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 14px;
  border: 6px solid transparent;
  border-right-color: var(--pro-border-color);
  border-left: none;
}

.nav-flyout::after {
  content: '';
  position: absolute;
  left: -4px;
  top: 15px;
  border: 5px solid transparent;
  border-right-color: var(--pro-bg-elevated);
  border-left: none;
}

/* Flyout Title */
.nav-flyout-title {
  padding: 6px 10px 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pro-text-muted);
  border-bottom: 1px solid var(--pro-border-muted);
  margin-bottom: 4px;
}

/* Flyout Links */
.nav-flyout .nav-link {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--nav-item-radius);
  color: var(--pro-text-secondary);
  text-decoration: none;
  font-size: var(--nav-font-size);
  transition: 
    background var(--nav-transition-fast),
    color var(--nav-transition-fast);
}

.nav-flyout .nav-link:hover {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-primary);
}

.nav-flyout .nav-link.active {
  background: var(--user-accent-muted, var(--pro-accent-primary-muted));
  color: var(--user-accent, var(--pro-accent-primary));
  font-weight: 500;
  border-left: 2px solid var(--user-accent, var(--pro-accent-primary));
  padding-left: 10px;
}

.nav-flyout .nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0.7;
  margin-right: 8px;
  flex-shrink: 0;
}

.nav-flyout .nav-link:hover .nav-icon,
.nav-flyout .nav-link.active .nav-icon {
  opacity: 1;
}

/* Enable flyout display in collapsed mode */
.sidebar.collapsed .nav-flyout {
  display: block;
}

/* Show flyout on hover */
.sidebar.collapsed .nav-group:hover .nav-flyout,
.sidebar.collapsed .nav-standalone:hover .nav-flyout {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

/* Invisible bridge to prevent flyout closing */
.sidebar.collapsed .nav-group::after,
.sidebar.collapsed .nav-standalone::after {
  content: '';
  position: absolute;
  left: 40px;
  top: 0;
  width: calc(var(--sidebar-width-collapsed, 56px) - 40px + 4px);
  height: 100%;
  pointer-events: auto;
}

/* ============================================
   TOOLTIP (Standalone items in collapsed mode)
   ============================================ */
.sidebar.collapsed .nav-standalone .nav-link:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: var(--sidebar-width-collapsed, 56px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--pro-bg-elevated);
  color: var(--pro-text-primary);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--pro-shadow-md);
  border: 1px solid var(--pro-border-color);
  z-index: 1100;
}

/* ============================================
   MOBILE NAVIGATION STYLES
   ============================================ */

/* ============================================
   SIDEBAR TOGGLE BUTTON (Desktop collapse)
   ============================================ */
.sidebar-toggle {
  position: absolute;
  bottom: 60px; /* Above the install button footer */
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  background: var(--pro-bg-tertiary);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  color: var(--pro-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--nav-transition-normal);
  z-index: 10;
}

.sidebar-toggle:hover {
  background: var(--user-accent, var(--pro-accent-primary));
  color: white;
  border-color: var(--user-accent, var(--pro-accent-primary));
}

.sidebar-toggle .toggle-icon {
  font-size: 12px;
  transition: transform var(--nav-transition-slow);
}

/* Rotate icon when sidebar is collapsed */
.sidebar.collapsed .sidebar-toggle .toggle-icon {
  transform: rotate(180deg);
}

/* ============================================
   HAMBURGER MENU BUTTON (Mobile)
   ============================================ */
.hamburger-menu {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  cursor: pointer;
  gap: 5px;
  transition: all var(--nav-transition-normal);
}

.hamburger-menu:hover {
  background: var(--pro-bg-tertiary);
  border-color: var(--pro-border-emphasis);
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--pro-text-secondary);
  border-radius: 1px;
  transition: all var(--nav-transition-normal);
}

/* Animate to X when active */
.hamburger-menu.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  /* Show hamburger on mobile */
  .hamburger-menu {
    display: flex;
  }
  
  /* Hide sidebar toggle on mobile */
  .sidebar-toggle {
    display: none;
  }
  
  .sidebar-nav {
    padding: 8px 0;
  }

  .nav-section-title {
    padding: 12px 16px 8px;
  }

  /* Hide flyouts on mobile */
  .nav-flyout {
    display: none !important;
  }
}

/* ============================================
   THEME OVERRIDES - Light Theme
   ============================================ */
[data-theme="light"] .nav-group-header:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .nav-group-header:active {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .nav-group-items .nav-link:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .nav-standalone .nav-link:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .nav-standalone .nav-link:active {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .nav-flyout {
  background: var(--pro-bg-elevated);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .nav-flyout::after {
  border-right-color: var(--pro-bg-elevated);
}

[data-theme="light"] .nav-flyout .nav-link:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* ============================================
   THEME OVERRIDES - Even Funkier Theme
   ============================================ */
[data-theme="even-funkyer"] .nav-group-header:hover {
  background: var(--pro-accent-primary-muted);
  color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .nav-group.has-active > .nav-group-header {
  color: var(--pro-accent-secondary);
  background: var(--pro-accent-secondary-muted);
}

[data-theme="even-funkyer"] .nav-group-items .nav-link:hover {
  background: var(--pro-accent-primary-muted);
  color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .nav-group-items .nav-link.active {
  background: var(--pro-accent-secondary-muted);
  color: var(--pro-accent-secondary);
  border-left-color: var(--pro-accent-secondary);
  box-shadow: inset 3px 0 8px rgba(0, 255, 255, 0.3);
}

[data-theme="even-funkyer"] .nav-standalone .nav-link:hover {
  background: var(--pro-accent-primary-muted);
  color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .nav-standalone .nav-link.active {
  background: var(--pro-accent-secondary-muted);
  color: var(--pro-accent-secondary);
}

/* Even Funkier - Collapsed sidebar active states */
[data-theme="even-funkyer"] .sidebar.collapsed .nav-group.has-active > .nav-group-header {
  background: var(--pro-accent-secondary-muted);
  box-shadow: inset 0 0 0 2px var(--pro-accent-secondary), 0 0 8px rgba(0, 255, 255, 0.3);
}

[data-theme="even-funkyer"] .sidebar.collapsed .nav-group.has-active > .nav-group-header .nav-icon {
  color: var(--pro-accent-secondary);
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

[data-theme="even-funkyer"] .sidebar.collapsed .nav-standalone .nav-link.active {
  background: var(--pro-accent-secondary-muted);
  box-shadow: inset 0 0 0 2px var(--pro-accent-secondary), 0 0 8px rgba(0, 255, 255, 0.3);
}

[data-theme="even-funkyer"] .nav-flyout {
  background: var(--pro-bg-secondary);
  border-color: var(--pro-accent-primary);
  box-shadow: 
    0 0 20px rgba(255, 0, 255, 0.3),
    0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="even-funkyer"] .nav-flyout::before {
  border-right-color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .nav-flyout::after {
  border-right-color: var(--pro-bg-secondary);
}

[data-theme="even-funkyer"] .nav-flyout .nav-link:hover {
  background: var(--pro-accent-primary-muted);
  color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .nav-flyout .nav-link.active {
  background: var(--pro-accent-secondary-muted);
  color: var(--pro-accent-secondary);
  border-left-color: var(--pro-accent-secondary);
  box-shadow: inset 3px 0 8px rgba(0, 255, 255, 0.3);
}

/* ============================================
   ACCESSIBILITY - Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .nav-group-header,
  .nav-group-items,
  .nav-group-items .nav-link,
  .nav-standalone .nav-link,
  .nav-group-chevron,
  .nav-flyout {
    transition: none !important;
  }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */
@media (prefers-contrast: high) {
  .nav-group-header:focus-visible,
  .nav-group-items .nav-link:focus-visible,
  .nav-standalone .nav-link:focus-visible {
    box-shadow: inset 0 0 0 3px var(--user-accent, var(--pro-accent-primary));
  }

  .nav-group-items .nav-link.active,
  .nav-standalone .nav-link.active {
    border: 2px solid var(--user-accent, var(--pro-accent-primary));
  }
}

/* css/buttons.css */
/* ============================================
   BUTTONS.CSS - Funky Button System
   Phase 3C: Consolidated button styles
   ============================================ */

/* ============================================
   CSS VARIABLES - Button Theming
   Note: --btn-height-* and --btn-padding-* are defined in themes.css
   under [data-density] selectors to support compact/comfortable/spacious modes
   ============================================ */
:root {
  /* Button Font Sizes */
  --btn-font-xs: 11px;
  --btn-font-sm: 12px;
  --btn-font-md: 13px;
  --btn-font-lg: 14px;
  
  /* Button Border Radius */
  --btn-radius: 6px;
  --btn-radius-sm: 4px;
  --btn-radius-lg: 8px;
  --btn-radius-round: 9999px;
}

/* ============================================
   BASE BUTTON RESET
   ============================================ */
.btn-funky,
.btn-funky-primary,
.btn-funky-secondary,
.btn-funky-outline,
.btn-funky-warning,
.btn-funky-danger,
.btn-funky-success,
.btn-icon {
  /* Reset */
  margin: 0;
  border: none;
  background: none;
  font-family: inherit;
  
  /* Consistent box model */
  box-sizing: border-box;
  
  /* Flexbox alignment - fixes height issues */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  
  /* Typography */
  font-weight: 500;
  font-size: var(--btn-font-md);
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  
  /* Interaction */
  cursor: pointer;
  user-select: none;
  
  /* Transitions */
  transition: all 0.15s ease;
  
  /* Default sizing */
  height: var(--btn-height-md);
  padding: var(--btn-padding-md);
  border-radius: var(--btn-radius);
}

/* ============================================
   BUTTON SIZE VARIANTS
   ============================================ */
.btn-xs {
  height: var(--btn-height-xs);
  padding: var(--btn-padding-xs);
  font-size: var(--btn-font-xs);
  border-radius: var(--btn-radius-sm);
  gap: 4px;
}

.btn-sm {
  height: var(--btn-height-sm);
  padding: var(--btn-padding-sm);
  font-size: var(--btn-font-sm);
  border-radius: var(--btn-radius-sm);
  gap: 4px;
}

.btn-md {
  height: var(--btn-height-md);
  padding: var(--btn-padding-md);
  font-size: var(--btn-font-md);
}

.btn-lg {
  height: var(--btn-height-lg);
  padding: var(--btn-padding-lg);
  font-size: var(--btn-font-lg);
  border-radius: var(--btn-radius-lg);
  font-weight: 600;
  gap: 8px;
}

/* ============================================
   PRIMARY BUTTON (.btn-funky, .btn-funky-primary)
   Uses user accent color with fallback to default
   ============================================ */
.btn-funky,
.btn-funky-primary {
  background: var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
  color: white;
  border: 1px solid transparent;
}

.btn-funky:hover,
.btn-funky-primary:hover {
  background: var(--user-accent-hover, var(--pro-accent-primary-hover, #58a6ff));
  box-shadow: 0 2px 8px rgba(var(--user-accent-rgb, 47, 129, 247), 0.3);
  color: white;
}

.btn-funky:active,
.btn-funky-primary:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* ============================================
   SECONDARY BUTTON
   ============================================ */
.btn-funky-secondary {
  background: var(--pro-bg-tertiary, #21262d);
  color: var(--pro-text-primary, #e6edf3);
  border: 1px solid var(--pro-border-color, #30363d);
}

.btn-funky-secondary:hover {
  background: var(--pro-bg-hover, #30363d);
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  color: var(--pro-text-primary, #e6edf3);
}

/* ============================================
   OUTLINE BUTTON
   ============================================ */
.btn-funky-outline {
  background: transparent;
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  border: 1px solid var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

.btn-funky-outline:hover {
  background: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  color: white;
}

/* ============================================
   SEMANTIC BUTTON VARIANTS
   ============================================ */
.btn-funky-success {
  background: var(--pro-accent-success, #3fb950);
  color: white;
  border: 1px solid transparent;
}

.btn-funky-success:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px var(--pro-accent-success-muted, rgba(63, 185, 80, 0.3));
}

.btn-funky-warning {
  background: var(--pro-accent-warning, #d29922);
  color: white;
  border: 1px solid transparent;
}

.btn-funky-warning:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px var(--pro-accent-warning-muted, rgba(210, 153, 34, 0.3));
}

.btn-funky-danger {
  background: var(--pro-accent-danger, #f85149);
  color: white;
  border: 1px solid transparent;
}

.btn-funky-danger:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px var(--pro-accent-danger-muted, rgba(248, 81, 73, 0.3));
}

.btn-funky-info {
  background: var(--pro-accent-info, #0ea5e9);
  color: white;
  border: 1px solid transparent;
}

.btn-funky-info:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px var(--pro-accent-info-muted, rgba(14, 165, 233, 0.3));
}

.btn-funky-purple {
  background: var(--pro-accent-purple, #8b5cf6);
  color: white;
  border: 1px solid transparent;
}

.btn-funky-purple:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px var(--pro-accent-purple-muted, rgba(139, 92, 246, 0.3));
}

/* ============================================
   ICON BUTTON (Square action buttons)
   ============================================ */
.btn-icon {
  width: var(--btn-height-sm);
  height: var(--btn-height-sm);
  padding: 0;
  border-radius: var(--btn-radius-sm);
  font-size: 14px;
  background: var(--pro-bg-tertiary, #21262d);
  color: var(--pro-text-secondary, #8b949e);
  border: 1px solid var(--pro-border-color, #30363d);
}

.btn-icon:hover {
  color: var(--pro-text-primary, #e6edf3);
  border-color: var(--pro-text-secondary, #8b949e);
}

/* ============================================
   ACTION BUTTON VARIANTS (View, Edit, Delete, etc.)
   ============================================ */
.btn-view {
  background: var(--pro-accent-info-muted, rgba(88, 166, 255, 0.15));
  color: var(--pro-accent-info, #58a6ff);
  border-color: transparent;
}

.btn-view:hover {
  background: var(--pro-accent-info-muted-hover, rgba(88, 166, 255, 0.3));
  color: var(--pro-accent-info, #58a6ff);
}

.btn-edit {
  background: var(--pro-accent-purple-muted);
  color: var(--pro-accent-purple);
  border-color: transparent;
}

.btn-edit:hover {
  background: var(--pro-accent-purple-muted-hover, rgba(139, 92, 246, 0.3));
  color: var(--pro-accent-purple);
}

.btn-delete {
  background: var(--pro-accent-danger-muted, rgba(248, 81, 73, 0.15));
  color: var(--pro-accent-danger, #f85149);
  border-color: transparent;
}

.btn-delete:hover {
  background: var(--pro-accent-danger-muted-hover, rgba(248, 81, 73, 0.3));
  color: var(--pro-accent-danger, #f85149);
}

.btn-clone {
  background: var(--pro-accent-success-muted, rgba(63, 185, 80, 0.15));
  color: var(--pro-accent-success, #3fb950);
  border-color: transparent;
}

.btn-clone:hover {
  background: var(--pro-accent-success-muted-hover, rgba(63, 185, 80, 0.3));
  color: var(--pro-accent-success, #3fb950);
}

.btn-history {
  background: var(--pro-accent-purple-muted);
  color: var(--pro-accent-purple);
  border-color: transparent;
  text-decoration: none;
}

.btn-history:hover {
  background: rgba(139, 92, 246, 0.3);
  color: var(--pro-accent-purple);
}

/* ============================================
   BUTTON GROUPS
   ============================================ */
.btn-group {
  display: inline-flex;
  align-items: stretch; /* Ensures equal heights */
  gap: 0;
}

.btn-group > .btn-funky,
.btn-group > .btn-funky-primary,
.btn-group > .btn-funky-secondary,
.btn-group > .btn-icon,
.btn-group > button {
  border-radius: 0;
  margin: 0;
}

.btn-group > :first-child {
  border-radius: var(--btn-radius) 0 0 var(--btn-radius);
}

.btn-group > :last-child {
  border-radius: 0 var(--btn-radius) var(--btn-radius) 0;
}

.btn-group > :only-child {
  border-radius: var(--btn-radius);
}

/* Spaced button group */
.btn-group-spaced {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-group-spaced > * {
  border-radius: var(--btn-radius) !important;
}

/* Action buttons group (in tables) */
.action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ============================================
   FOCUS STATES (Accessibility)
   ============================================ */
.btn-funky:focus-visible,
.btn-funky-primary:focus-visible,
.btn-funky-secondary:focus-visible,
.btn-funky-outline:focus-visible,
.btn-funky-warning:focus-visible,
.btn-funky-danger:focus-visible,
.btn-funky-success:focus-visible,
.btn-icon:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--user-accent-rgb, 47, 129, 247), 0.4);
}

/* Remove default focus outline */
.btn-funky:focus,
.btn-funky-primary:focus,
.btn-funky-secondary:focus,
.btn-icon:focus {
  outline: none;
}

/* ============================================
   DISABLED STATE
   ============================================ */
.btn-funky:disabled,
.btn-funky-primary:disabled,
.btn-funky-secondary:disabled,
.btn-funky-outline:disabled,
.btn-funky-warning:disabled,
.btn-funky-danger:disabled,
.btn-funky-success:disabled,
.btn-icon:disabled,
.btn-funky.disabled,
.btn-icon.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================
   LOADING STATE
   ============================================ */
.btn-funky.loading,
.btn-icon.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn-funky.loading::after,
.btn-icon.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}

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

/* ============================================
   ICON ANIMATIONS
   ============================================ */
.btn-icon .fa-sync-alt:hover,
.btn-funky .fa-sync-alt:hover,
.btn-icon:hover .fa-sync-alt,
.btn-funky:hover .fa-sync-alt {
  animation: spin-once 0.5s ease;
}

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

/* ============================================
   TOUCH TARGET SIZING (Mobile)
   Uses density variables with 44px fallback for accessibility
   ============================================ */
@media (pointer: coarse) {
  .btn-icon {
    min-width: var(--btn-height-md, 44px);
    min-height: var(--btn-height-md, 44px);
    width: var(--btn-height-md, 44px);
    height: var(--btn-height-md, 44px);
    font-size: 16px;
  }
  
  .btn-funky,
  .btn-funky-primary,
  .btn-funky-secondary {
    min-height: var(--btn-height-md, 44px);
  }
}

/* ============================================
   LIGHT THEME OVERRIDES
   ============================================ */
[data-theme="light"] .btn-funky,
[data-theme="light"] .btn-funky-primary {
  background: var(--user-accent, #0969da);
  color: white;
  border-color: var(--user-accent, #0969da);
}

[data-theme="light"] .btn-funky:hover,
[data-theme="light"] .btn-funky-primary:hover {
  background: var(--user-accent-hover, #0550ae);
  box-shadow: 0 2px 8px rgba(var(--user-accent-rgb, 9, 105, 218), 0.3);
}

[data-theme="light"] .btn-funky-secondary {
  background: var(--pro-bg-secondary);
  color: var(--pro-text-primary);
  border-color: var(--pro-border-color);
}

[data-theme="light"] .btn-funky-secondary:hover {
  background: var(--pro-bg-tertiary);
  border-color: var(--pro-accent-primary);
}

[data-theme="light"] .btn-funky-outline {
  color: var(--pro-accent-primary);
  border-color: var(--pro-accent-primary);
  background: transparent;
}

[data-theme="light"] .btn-funky-outline:hover {
  background: var(--pro-accent-primary);
  color: var(--pro-text-inverse);
}

[data-theme="light"] .btn-funky-success {
  background: var(--pro-accent-success);
}

[data-theme="light"] .btn-funky-success:hover {
  background: var(--pro-accent-success-text);
  box-shadow: 0 2px 8px var(--pro-accent-success-muted);
}

[data-theme="light"] .btn-funky-warning {
  background: var(--pro-accent-warning);
}

[data-theme="light"] .btn-funky-warning:hover {
  background: var(--pro-accent-warning-text);
  box-shadow: 0 2px 8px var(--pro-accent-warning-muted);
}

[data-theme="light"] .btn-funky-danger {
  background: var(--pro-accent-danger);
}

[data-theme="light"] .btn-funky-danger:hover {
  background: var(--pro-accent-danger-text);
  box-shadow: 0 2px 8px var(--pro-accent-danger-muted);
}

/* Light theme icon buttons */
[data-theme="light"] .btn-icon {
  background: var(--pro-bg-secondary);
  color: var(--pro-text-secondary);
  border-color: var(--pro-border-color);
}

[data-theme="light"] .btn-icon:hover {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-primary);
  border-color: var(--pro-border-emphasis);
}

[data-theme="light"] .btn-view {
  background: var(--pro-accent-info-muted);
  color: var(--pro-accent-info);
}

[data-theme="light"] .btn-view:hover {
  background: var(--pro-accent-info-bg);
  color: var(--pro-accent-info-text);
}

[data-theme="light"] .btn-edit {
  background: var(--pro-accent-purple-muted);
  color: var(--pro-accent-purple);
}

[data-theme="light"] .btn-edit:hover {
  background: var(--pro-accent-purple-bg);
  color: var(--pro-accent-purple-text);
}

[data-theme="light"] .btn-delete {
  background: var(--pro-accent-danger-muted);
  color: var(--pro-accent-danger);
}

[data-theme="light"] .btn-delete:hover {
  background: var(--pro-accent-danger-bg);
  color: var(--pro-accent-danger-text);
}

[data-theme="light"] .btn-clone {
  background: var(--pro-accent-success-muted);
  color: var(--pro-accent-success);
}

[data-theme="light"] .btn-clone:hover {
  background: var(--pro-accent-success-bg);
  color: var(--pro-accent-success-text);
}

[data-theme="light"] .btn-history {
  background: var(--pro-accent-purple-muted);
  color: var(--pro-accent-purple);
}

[data-theme="light"] .btn-history:hover {
  background: var(--pro-accent-purple-bg);
  color: var(--pro-accent-purple-text);
}

/* ============================================
   EVEN-FUNKYER THEME OVERRIDES
   ============================================ */
[data-theme="even-funkyer"] .btn-funky,
[data-theme="even-funkyer"] .btn-funky-primary {
  background: linear-gradient(135deg, var(--user-accent, #ff00ff), #00ffff);
  color: white;
  border: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="even-funkyer"] .btn-funky:hover,
[data-theme="even-funkyer"] .btn-funky-primary:hover {
  box-shadow: 
    0 0 20px rgba(var(--user-accent-rgb, 255, 0, 255), 0.5),
    0 0 40px rgba(0, 255, 255, 0.3);
  filter: brightness(1.1);
}

[data-theme="even-funkyer"] .btn-funky-secondary {
  background: var(--pro-accent-primary-muted);
  border: 1px solid rgba(255, 0, 255, 0.4);
  color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .btn-funky-secondary:hover {
  background: rgba(255, 0, 255, 0.2);
  border-color: var(--pro-accent-primary);
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] .btn-funky-outline {
  border-color: var(--pro-accent-primary);
  color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .btn-funky-outline:hover {
  background: linear-gradient(135deg, #ff00ff, #00ffff);
  color: white;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

[data-theme="even-funkyer"] .btn-icon {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 0, 255, 0.3);
  color: var(--pro-accent-secondary);
}

[data-theme="even-funkyer"] .btn-icon:hover {
  background: var(--pro-accent-primary-muted);
  border-color: var(--pro-accent-primary);
  color: var(--pro-accent-primary);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.4);
}

[data-theme="even-funkyer"] .btn-view {
  background: var(--pro-accent-secondary-muted);
  color: var(--pro-accent-secondary);
}

[data-theme="even-funkyer"] .btn-view:hover {
  background: rgba(0, 255, 255, 0.3);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

[data-theme="even-funkyer"] .btn-edit {
  background: var(--pro-accent-primary-muted);
  color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .btn-edit:hover {
  background: rgba(255, 0, 255, 0.3);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.4);
}

[data-theme="even-funkyer"] .btn-delete {
  background: var(--pro-accent-danger-muted);
  color: var(--pro-accent-danger);
}

[data-theme="even-funkyer"] .btn-delete:hover {
  background: rgba(255, 0, 102, 0.3);
  box-shadow: 0 0 10px var(--pro-accent-danger-muted);
}

[data-theme="even-funkyer"] .btn-clone {
  background: var(--pro-accent-success-muted);
  color: var(--pro-accent-success);
}

[data-theme="even-funkyer"] .btn-clone:hover {
  background: rgba(0, 255, 136, 0.3);
  box-shadow: 0 0 10px var(--pro-accent-success-muted);
}

[data-theme="even-funkyer"] .btn-history {
  background: var(--pro-accent-purple-muted);
  color: var(--pro-accent-purple);
}

[data-theme="even-funkyer"] .btn-history:hover {
  background: var(--pro-accent-purple-bg);
  box-shadow: 0 0 10px var(--pro-accent-purple-muted);
}

/* ============================================
   SPECIAL BUTTON CONTEXTS
   ============================================ */

/* Toolbar buttons (smaller, inline) */
.toolbar .btn-funky,
.toolbar .btn-icon {
  height: var(--btn-height-sm);
  padding: var(--btn-padding-sm);
  font-size: var(--btn-font-sm);
}

/* Modal footer buttons */
.modal-footer .btn-funky,
.modal-footer .btn-funky-primary,
.modal-footer .btn-funky-secondary {
  min-width: 80px;
}

/* Card action buttons */
.card-actions .btn-icon {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

/* Header buttons */
.header-actions .btn-funky {
  height: var(--btn-height-sm);
  padding: var(--btn-padding-sm);
}

/* Table action column buttons */
td .btn-icon,
.dataTables_wrapper .btn-icon {
  width: var(--btn-height-sm);
  height: var(--btn-height-sm);
}

/* ============================================
   FORMAT RULES BUTTON
   ============================================ */
.btn-format-rules {
  /* Match standard button sizing */
  height: var(--btn-height-md);
  padding: var(--btn-padding-md);
  font-size: var(--btn-font-md);
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: var(--btn-radius);
  color: var(--pro-text-secondary, #8b949e);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
}

.btn-format-rules:hover {
  background: var(--pro-bg-tertiary, #21262d);
  border-color: var(--pro-border-emphasis, #484f58);
  color: var(--pro-text-primary, #e6edf3);
}

.btn-format-rules.has-rules {
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

.btn-format-rules .rule-count {
  background: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  color: white;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 10px;
  min-width: 1rem;
  text-align: center;
}

/* Even Funkier theme override */
[data-theme="even-funkyer"] .btn-format-rules.has-rules {
  border-color: var(--funkier-neon-pink, #ff00ff);
  color: var(--funkier-neon-pink, #ff00ff);
  text-shadow: 0 0 5px rgba(255, 0, 255, 0.5);
}

/* ============================================
   BUTTON ROW / HEADER ACTIONS - Responsive
   ============================================ */
.btn-row,
.button-row,
.btn-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Funky Header Actions - Primary responsive layout */
.funky-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

/* Allow items to shrink slightly but prefer wrapping */
.funky-header-actions > * {
  flex-shrink: 1;
  min-width: 0;
}

/* Ensure all buttons in header actions have consistent height */
.funky-header-actions .btn-funky,
.funky-header-actions .btn-funky-primary,
.funky-header-actions .btn-funky-secondary,
.funky-header-actions .btn-funky-warning,
.funky-header-actions .btn-funky-danger,
.funky-header-actions .btn-funky-success,
.funky-header-actions .btn-funky-outline,
.funky-header-actions .btn-format-rules,
.funky-header-actions > button {
  height: var(--btn-height-md);
  flex-shrink: 0;
  /* Override .btn-sm when used in header actions */
}

.funky-header-actions .btn-sm {
  height: var(--btn-height-md) !important;
  padding: var(--btn-padding-md) !important;
  font-size: var(--btn-font-md) !important;
}

/* Search box takes remaining space on larger screens */
.funky-header-actions .funky-search-box {
  flex: 1 1 200px;
  min-width: 200px;
  max-width: 400px;
}

/* Filter dropdowns have consistent sizing */
.funky-header-actions .funky-date-filter,
.funky-header-actions .funky-client-filter,
.funky-header-actions .funky-date-range {
  flex: 0 1 auto;
  min-width: 140px;
}

/* Select2 in header actions - match button height */
.funky-header-actions .select2-container {
  height: var(--btn-height-md);
}

.funky-header-actions .select2-container .select2-selection {
  height: var(--btn-height-md) !important;
  min-height: var(--btn-height-md) !important;
  display: flex !important;
  align-items: center !important;
}

.funky-header-actions .select2-container .select2-selection__rendered {
  line-height: 1 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.funky-header-actions .select2-container .select2-selection__arrow {
  height: var(--btn-height-md) !important;
  top: 0 !important;
}

/* Form controls in header actions */
.funky-header-actions .form-control,
.funky-header-actions .form-select {
  height: var(--btn-height-md);
}

/* DataTables buttons container in header actions */
.funky-header-actions .dt-buttons,
.funky-header-actions .dataTables_wrapper .dt-buttons {
  display: flex !important;
  align-items: center !important;
  gap: 6px;
}

.funky-header-actions .dt-buttons .btn-funky,
.funky-header-actions .dt-buttons .dt-button {
  height: var(--btn-height-md) !important;
  align-self: center !important;
}

/* ============================================
   RESPONSIVE BREAKPOINTS FOR BUTTONS
   ============================================ */

/* Common selector for all buttons in header actions */
.funky-header-actions .btn-funky,
.funky-header-actions .btn-funky-primary,
.funky-header-actions .btn-funky-secondary,
.funky-header-actions .btn-funky-warning,
.funky-header-actions .btn-funky-danger,
.funky-header-actions .btn-funky-success,
.funky-header-actions .btn-format-rules,
.funky-header-actions > button {
  /* Base responsive values - override in media queries */
  flex: var(--header-btn-flex, 0 1 auto);
  min-width: var(--header-btn-min-width, auto);
  white-space: nowrap;
  justify-content: center;
}

/* Large screens (1200px+) - Prefer single row but allow wrap */
@media (min-width: 1200px) {
  .funky-header-actions {
    --header-btn-flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .funky-header-actions .funky-search-box {
    max-width: 500px;
  }
}

/* Medium screens (992px - 1199px) - Allow wrapping */
@media (max-width: 1199px) {
  .funky-header-actions {
    gap: 10px;
  }
  
  .funky-header-actions .funky-search-box {
    flex: 1 1 250px;
    max-width: 350px;
  }
}

/* Tablet (768px - 991px) - Two row layout */
@media (max-width: 991px) {
  .funky-header-actions {
    gap: 8px;
  }
  
  .funky-header-actions .funky-search-box {
    flex: 1 1 100%;
    max-width: 100%;
    order: -1;
  }
  
  .funky-header-actions .funky-date-filter,
  .funky-header-actions .funky-client-filter,
  .funky-header-actions .funky-date-range {
    flex: 1 1 calc(33.33% - 6px);
    min-width: 120px;
  }
}

/* Mobile landscape (576px - 767px) - Flex wrap with compact buttons */
@media (max-width: 767px) {
  .funky-header-actions {
    --header-btn-flex: 1 1 auto;
    --header-btn-min-width: 0;
    gap: 8px;
  }
  
  .funky-header-actions .funky-search-box {
    flex: 1 1 100%;
    max-width: 100%;
    order: -1;
  }
  
  .funky-header-actions .funky-date-filter,
  .funky-header-actions .funky-client-filter,
  .funky-header-actions .funky-date-range {
    flex: 1 1 auto;
    min-width: 120px;
  }
}

/* Mobile portrait (< 576px) - Buttons share row */
@media (max-width: 575px) {
  .funky-header-actions {
    --header-btn-flex: 1 1 auto;
    --header-btn-min-width: 0;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .funky-header-actions .funky-search-box {
    flex: 1 1 100%;
    max-width: 100%;
    order: -1;
  }
  
  .funky-header-actions .funky-date-filter,
  .funky-header-actions .funky-client-filter,
  .funky-header-actions .funky-date-range {
    flex: 1 1 100%;
    min-width: 0;
  }
  
  /* Smaller font/padding on mobile */
  .funky-header-actions .btn-funky,
  .funky-header-actions .btn-funky-primary,
  .funky-header-actions .btn-funky-secondary,
  .funky-header-actions .btn-funky-warning,
  .funky-header-actions .btn-funky-danger,
  .funky-header-actions .btn-funky-success,
  .funky-header-actions .btn-format-rules,
  .funky-header-actions > button {
    height: var(--btn-height-md, 36px);
    min-height: var(--btn-height-md, 36px);
    font-size: var(--btn-font-sm, 0.75rem);
    padding: 0 var(--pro-spacing-sm, 0.75rem);
  }
}

/* Touch devices - larger touch targets */
@media (pointer: coarse) {
  .funky-header-actions .btn-funky,
  .funky-header-actions .btn-funky-primary,
  .funky-header-actions .btn-funky-secondary,
  .funky-header-actions .btn-funky-warning,
  .funky-header-actions .btn-funky-danger,
  .funky-header-actions .btn-funky-success,
  .funky-header-actions .btn-format-rules,
  .funky-header-actions > button {
    min-height: var(--btn-height-md, 36px);
  }
}

/* ============================================
   USER ACCENT COLOR OVERRIDES
   When user has set a custom accent color via preferences,
   these rules apply it to primary buttons and links
   ============================================ */
:root {
  /* Primary buttons use user accent when set */
  --btn-primary-bg: var(--user-accent, var(--pro-accent-primary));
  --btn-primary-hover: var(--user-accent-hover, var(--pro-accent-primary-hover));
}

.btn-funky.use-accent,
.btn-funky-primary.use-accent,
.btn-user-accent {
  background: var(--user-accent, var(--pro-accent-primary));
  border-color: var(--user-accent, var(--pro-accent-primary));
}

.btn-funky.use-accent:hover,
.btn-funky-primary.use-accent:hover,
.btn-user-accent:hover {
  background: var(--user-accent-hover, var(--pro-accent-primary-hover));
  border-color: var(--user-accent-hover, var(--pro-accent-primary-hover));
  box-shadow: 0 2px 8px rgba(var(--user-accent-rgb, 47, 129, 247), 0.3);
}

/* Links with user accent */
a.use-accent,
.link-accent {
  color: var(--user-accent, var(--pro-accent-primary));
}

a.use-accent:hover,
.link-accent:hover {
  color: var(--user-accent-hover, var(--pro-accent-primary-hover));
}

/* Progress bars with user accent */
.progress-bar.use-accent {
  background-color: var(--user-accent, var(--pro-accent-primary));
}

/* Nav items with user accent */
.nav-link.active.use-accent,
.nav-tabs .nav-link.active.use-accent {
  border-bottom-color: var(--user-accent, var(--pro-accent-primary));
  color: var(--user-accent, var(--pro-accent-primary));
}

/* Sidebar active item with user accent */
.sidebar-item.active.use-accent {
  border-left-color: var(--user-accent, var(--pro-accent-primary));
  background: rgba(var(--user-accent-rgb, 47, 129, 247), 0.1);
}

/* Focus rings with user accent */
.use-accent:focus-visible {
  outline-color: var(--user-accent, var(--pro-accent-primary));
  box-shadow: 0 0 0 3px rgba(var(--user-accent-rgb, 47, 129, 247), 0.4);
}

/* css/cards.css */
/* ============================================
   CARDS.CSS - Card Components
   Funky cards, table cards, stat cards
   ============================================ */

/* ============================================
   FUNKY CARDS
   ============================================ */
.funky-card {
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  transition: all 0.3s ease;
  position: relative;
  overflow: visible;
  animation: cardSlideIn 0.7s ease-out;
}

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

.funky-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--user-accent, var(--pro-accent-primary));
  border-radius: 15px 15px 0 0;
  display: none; /* Only show in even-funkyer theme */
}

/* ============================================
   TABLE CARD VARIANT
   Edge-to-edge tables with no padding
   ============================================ */
.funky-card.table-card {
  padding: 0;
  overflow: hidden;
}

.funky-card.table-card::before {
  display: none;
}

.funky-card.table-card .funky-header-actions {
  padding: 16px 20px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--pro-border-color);
  background: var(--pro-bg-secondary);
}

.funky-card.table-card .dataTables_wrapper {
  padding: 0;
}

.funky-card.table-card table.dataTable {
  margin: 0 !important;
  border-radius: 0;
}

.funky-card.table-card table.dataTable thead th:first-child {
  border-top-left-radius: 0;
}

.funky-card.table-card table.dataTable thead th:last-child {
  border-top-right-radius: 0;
}

.funky-card.table-card .dataTables_info,
.funky-card.table-card .dataTables_paginate,
.funky-card.table-card .dataTables_length {
  padding: 12px 20px;
  background: var(--pro-bg-secondary);
  border-top: 1px solid var(--pro-border-color);
}

/* DataTable footer row layout */
.funky-card.table-card .dataTables_wrapper > div:last-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 20px;
  background: var(--pro-bg-secondary);
  border-top: 1px solid var(--pro-border-color);
}

/* ============================================
   DATATABLE BUTTONS ROW INSIDE FUNKY-CARD
   Styles the buttons row generated by DataTables dom
   ============================================ */
.funky-card .dataTables_wrapper > .row:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  margin: 0;
  background: var(--pro-bg-secondary);
  border-bottom: 1px solid var(--pro-border-color);
}

.funky-card .dataTables_wrapper > .row:first-child > [class*="col-"] {
  flex: 0 0 auto;
  width: auto;
  padding: 0;
}

.funky-card .dataTables_wrapper > .row:first-child .dt-buttons {
  display: flex !important;
  gap: 8px;
  align-items: center;
}

.funky-card .dataTables_wrapper > .row:first-child .dataTables_length {
  display: flex;
  align-items: center;
  gap: 8px;
}

.funky-card .dataTables_wrapper > .row:first-child .dataTables_length label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--pro-text-secondary);
  font-size: 13px;
}

.funky-card .dataTables_wrapper > .row:first-child .dataTables_length select {
  background: var(--pro-bg-tertiary);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  color: var(--pro-text-primary);
  padding: 6px 28px 6px 12px;
  font-size: 13px;
  height: 32px;
  min-width: 70px;
}

.funky-card .dataTables_wrapper > .row:first-child .dataTables_length select:focus {
  border-color: var(--pro-accent-primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--pro-accent-primary-muted);
}

/* Card Header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--pro-border-color);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--pro-text-primary);
  margin: 0;
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
  animation: statsFadeInUp 0.6s ease-out;
}

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

.stat-card {
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 15px;
  padding: 20px;
  position: relative;
  overflow: visible;
  transition: all 0.3s ease;
  cursor: default;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--user-accent, var(--pro-accent-primary));
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--user-accent, var(--pro-accent-primary)), var(--pro-accent-info), var(--pro-accent-primary));
  background-size: 200% 100%;
  animation: gradientShift 3s ease infinite;
  border-radius: 15px 15px 0 0;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--user-accent-muted, rgba(47, 129, 247, 0.15)) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.stat-icon {
  font-size: 42px;
  margin-bottom: 12px;
  display: block;
  animation: statFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px var(--pro-shadow-color, rgba(0, 0, 0, 0.2)));
  position: relative;
  z-index: 1;
}

@keyframes statFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.stat-label {
  font-size: 13px;
  color: var(--pro-text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-weight: 600;
  display: block;
  position: relative;
  z-index: 1;
}

.stat-value {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--pro-accent-info));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  display: block;
  position: relative;
  z-index: 1;
}

.stat-change {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.stat-change.positive {
  color: var(--pro-accent-success, #10b981);
}

.stat-change.negative {
  color: var(--pro-accent-danger, #ef4444);
}

/* ============================================
   DETAIL ROWS (Modal details)
   ============================================ */
.security-details-grid,
.client-details-grid {
  display: grid;
  gap: 15px;
}

.detail-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 15px;
  padding: 12px;
  background: var(--pro-bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--pro-border-color);
}

.detail-label {
  font-weight: 600;
  color: var(--user-accent, var(--pro-accent-primary));
}

.detail-value {
  color: var(--pro-text-primary);
  word-break: break-word;
}

/* Full width detail row for config */
.detail-row.full-width {
  grid-template-columns: 1fr;
}

.detail-row.full-width .detail-label {
  margin-bottom: 10px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-row {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-icon {
    font-size: 36px;
  }
  
  .stat-value {
    font-size: 30px;
  }
}

/* Mobile (768px) */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .stat-card {
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
  }
  
  .stat-card::after {
    display: none;
  }
  
  .stat-card::before {
    animation: none;
    background: linear-gradient(90deg, var(--user-accent, var(--pro-accent-primary)), var(--pro-accent-info));
  }
  
  .stat-icon {
    font-size: 32px;
    margin-bottom: 0;
    animation: none;
    flex-shrink: 0;
  }
  
  .stat-content {
    flex: 1;
  }
  
  .stat-label {
    font-size: 11px;
    margin-bottom: 5px;
  }
  
  .stat-value {
    font-size: 26px;
  }
  
  .funky-card {
    padding: 18px;
    border-radius: 12px;
    animation-duration: 0.4s;
  }
}

/* Mobile Portrait (0 - 576px) */
@media (max-width: 576px) {
  .stats-row {
    gap: 10px;
    margin-bottom: 15px;
  }
  
  .stat-card {
    padding: 15px;
    border-radius: 12px;
  }
  
  .stat-icon {
    font-size: 28px;
  }
  
  .stat-label {
    font-size: 10px;
    letter-spacing: 0.5px;
  }
  
  .stat-value {
    font-size: 22px;
  }
  
  .funky-card {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
  }
}

/* Ultra-wide screens (1400px+) */
@media (min-width: 1400px) {
  .stats-row {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
  }
  
  .stat-card {
    padding: 30px;
  }
  
  .stat-icon {
    font-size: 48px;
  }
  
  .stat-value {
    font-size: 42px;
  }
}

/* Focus styles for keyboard navigation */
.stat-card:focus-visible {
  outline: 3px solid var(--user-accent, var(--pro-accent-primary));
  outline-offset: 3px;
}

/* ============================================
   WELCOME BANNER
   Theme-aware gradient banner for dashboard
   ============================================ */
.welcome-banner {
  background: linear-gradient(135deg, var(--pro-accent-primary) 0%, var(--pro-accent-purple) 100%);
  color: white;
  margin-bottom: 2rem;
}

.welcome-banner .welcome-content {
  padding: 2rem;
}

.welcome-banner h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  color: white;
}

.welcome-banner p {
  margin: 0;
  opacity: 0.9;
  font-size: 1.1rem;
  color: white;
}

/* Print styles */
@media print {
  .stats-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    page-break-inside: avoid;
  }
  
  .stat-card {
    border: 1px solid var(--pro-border-color);
    box-shadow: none;
    animation: none;
  }
  
  .stat-card::before,
  .stat-card::after {
    display: none;
  }
}

/* css/forms.css */
/* ============================================
   FORMS.CSS - Form Controls & Inputs
   Forms, checkboxes, inputs, selects, JSON editor
   ============================================ */

/* ============================================
   GLOBAL CARET COLOR FOR ALL INPUTS
   ============================================ */
input,
textarea,
[contenteditable="true"] {
  caret-color: var(--user-accent, var(--pro-accent-primary));
}

/* ============================================
   FORM CONTROLS BASE
   ============================================ */
input.form-control,
textarea.form-control,
select.form-control,
select.form-select,
.je-object__container input:not([type="checkbox"]),
.je-object__container textarea,
.je-object__container select {
  background: var(--pro-bg-secondary) !important;
  border: 1px solid var(--pro-border-color) !important;
  color: var(--pro-text-primary) !important;
  border-radius: 8px !important;
  padding: var(--form-control-padding, 0.375rem 0.75rem) !important;
  width: 100% !important;
  height: var(--form-control-height, 38px);
  font-size: var(--btn-font-md, 0.875rem);
  caret-color: var(--user-accent, var(--pro-accent-primary)) !important;
}

textarea.form-control,
.je-object__container textarea {
  min-height: 80px !important;
  height: auto;
  resize: vertical !important;
}

input.form-control:focus,
textarea.form-control:focus,
select.form-control:focus,
.je-object__container input:focus,
.je-object__container textarea:focus,
.je-object__container select:focus {
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.1)) !important;
  outline: none !important;
}

select.form-select {
  padding: var(--form-control-padding, 0.375rem 0.625rem);
  height: var(--form-control-height, 38px);
  font-size: var(--btn-font-sm, 0.75rem);
  border-radius: 6px;
  border: 1px solid var(--pro-border-color);
  background: var(--pro-bg-secondary);
  color: var(--pro-text-primary);
}

select.form-select:focus {
  border-color: var(--user-accent, var(--pro-accent-primary));
  outline: none;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.1));
}

/* Form groups spacing */
.form-group,
.je-indented-panel,
.je-child-editor-holder {
  margin-bottom: 20px !important;
}

/* Labels */
label,
.je-form-input-label {
  color: var(--pro-text-primary) !important;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

.form-text,
.je-form-input-hint {
  color: var(--pro-text-secondary) !important;
  opacity: 0.7;
  font-size: 12px !important;
}

/* Required field indicator */
label.required::after,
.je-form-input-label.required::after {
  content: " *";
  color: var(--user-accent, var(--pro-accent-primary));
}

/* ============================================
   CHECKBOX STYLING
   ============================================ */
.je-checkbox-control {
  display: flex;
  align-items: center;
  padding: 10px 0;
  background: transparent !important;
}

.je-checkbox-control input[type="checkbox"],
#jsonEditorContainer input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  height: 20px !important;
  border: 2px solid var(--pro-border-color);
  border-radius: 4px;
  background: var(--pro-bg-secondary) !important;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  margin: 0 10px 0 0 !important;
  padding: 0 !important;
  flex-shrink: 0;
  flex-grow: 0;
}

.je-checkbox-control input[type="checkbox"]:checked,
#jsonEditorContainer input[type="checkbox"]:checked {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  border-color: var(--user-accent, var(--pro-accent-primary));
}

.je-checkbox-control input[type="checkbox"]:checked::after,
#jsonEditorContainer input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.je-checkbox-control input[type="checkbox"]:focus,
#jsonEditorContainer input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.2));
}

.je-checkbox-control label {
  margin: 0 !important;
  padding: 0 !important;
}

/* Label styling for checkboxes */
.je-checkbox-control label,
.checkbox label,
label.form-check-label,
.form-check label {
  color: var(--pro-text-primary) !important;
  cursor: pointer;
  font-weight: 500 !important;
}

/* Override Bootstrap checkbox classes */
.form-check {
  background: transparent !important;
  padding: 10px 0 !important;
  padding-left: 0 !important;  /* Align with other form fields */
  margin-left: 0 !important;
}

.form-check-input {
  appearance: none !important;
  -webkit-appearance: none !important;
  margin-left: 0 !important;
  float: none !important;
}

.form-check-label {
  margin-left: 8px !important;
  display: inline !important;
}

/* Fix form-switch alignment in modals */
.form-check.form-switch {
  padding-left: 0 !important;
}

.form-check.form-switch .form-check-input {
  margin-left: 0 !important;
  float: none !important;
}

.form-check.form-switch .form-check-label {
  margin-left: 8px !important;
}

/* ============================================
   ERROR STYLING
   ============================================ */
.has-error input,
.has-error textarea,
.has-error select,
.je-child-editor-holder.has-error input,
.je-child-editor-holder.has-error textarea,
.je-child-editor-holder.has-error select {
  border-color: var(--pro-accent-danger) !important;
  background: var(--pro-accent-danger-muted) !important;
}

.error-message,
.je-error {
  color: var(--pro-accent-danger) !important;
  font-size: 12px !important;
  margin-top: 5px !important;
  display: block !important;
  font-weight: 500 !important;
}

.invalid-feedback {
  color: var(--pro-accent-danger) !important;
  font-size: 12px !important;
  display: block !important;
  margin-top: 5px !important;
}

/* ============================================
   JSON EDITOR CONTAINER
   ============================================ */
#jsonEditorContainer {
  background: var(--pro-bg-elevated);
  padding: 25px;
  border-radius: 12px;
  min-height: 350px;
}

/* Override Bootstrap bg-light class */
#jsonEditorContainer .bg-light,
.je-object__container.bg-light,
.je-indented-panel.bg-light {
  background: transparent !important;
}

.je-object__container,
.je-indented-panel {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Form field containers */
.je-child-editor-holder > div {
  margin-bottom: 20px;
}

.je-form-input-label {
  color: var(--pro-text-primary) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  margin-bottom: 8px !important;
  display: block !important;
}

.je-object__title {
  color: var(--user-accent, var(--pro-accent-primary)) !important;
  font-weight: 700 !important;
  margin-bottom: 20px;
  display: none; /* Hide root object title */
}

.je-switcher {
  background: var(--pro-bg-elevated) !important;
  border-color: var(--pro-border-color) !important;
  color: var(--pro-text-primary) !important;
}

.je-switcher:hover {
  background: var(--pro-bg-secondary) !important;
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
}

/* Button styling for JSON Editor controls */
.json-editor-btn-add,
.json-editor-btn-delete,
.json-editor-btn-move {
  background: var(--pro-bg-elevated) !important;
  border: 1px solid var(--pro-border-color) !important;
  color: var(--pro-text-primary) !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  transition: all 0.2s ease !important;
}

.json-editor-btn-add:hover {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  color: white !important;
}

.json-editor-btn-delete:hover {
  background: var(--pro-accent-danger) !important;
  border-color: var(--pro-accent-danger) !important;
  color: white !important;
}

/* ============================================
   SEARCH BOX STYLES
   ============================================ */
.funky-search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.funky-search-box input {
  width: 100%;
  padding: var(--form-control-padding, 0.375rem 0.75rem);
  padding-left: calc(var(--pro-spacing-md, 1rem) + 1rem); /* room for icon */
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  color: var(--pro-text-primary);
  font-size: var(--btn-font-sm, 0.75rem);
  height: var(--form-control-height, 38px);
  transition: all 0.2s ease;
  caret-color: var(--user-accent, var(--pro-accent-primary));
}

.funky-search-box input:focus {
  outline: none;
  border-color: var(--user-accent, var(--pro-accent-primary));
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.1));
}

.funky-search-box::before {
  content: '🔍';
  position: absolute;
  left: var(--pro-spacing-xs, 0.5rem);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--btn-font-md, 0.875rem);
  pointer-events: none;
}

.funky-search-box input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--user-accent-muted, rgba(47, 129, 247, 0.3));
}

/* ============================================
   SELECT2 INTEGRATION
   ============================================ */
.select2-container--default .select2-selection--single {
  background: var(--pro-bg-secondary) !important;
  border: 1px solid var(--pro-border-color) !important;
  border-radius: 8px !important;
  height: 38px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--pro-text-primary) !important;
  line-height: 36px !important;
}

.select2-dropdown {
  background: var(--pro-bg-elevated) !important;
  border: 1px solid var(--pro-border-color) !important;
  border-radius: 8px !important;
}

.select2-results__option {
  color: var(--pro-text-primary) !important;
}

.select2-results__option--highlighted {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
}

/* Select2 Bootstrap 5 Theme Overrides */
.select2-container--bootstrap-5 .select2-selection {
  background: var(--pro-bg-secondary) !important;
  border: 1px solid var(--pro-border-color) !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
  height: 38px !important;
  min-height: 38px !important;
  transition: all 0.2s ease !important;
}

/* Modal form Select2 - match Bootstrap form controls */
.modal .select2-container--bootstrap-5 .select2-selection {
  border-radius: 0.375rem !important;
  padding: 0.375rem 0.75rem !important;
  height: 38px !important;
  min-height: 38px !important;
  border-width: 1px !important;
}

.modal .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  line-height: 1.5 !important;
  padding-left: 0 !important;
}

.modal .select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
  height: 36px !important;
  right: 8px !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  color: var(--pro-text-primary) !important;
  padding-left: 0 !important;
  line-height: 26px !important;
  font-size: 12px !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
  color: var(--pro-text-secondary) !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.1)) !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
  height: 36px !important;
  right: 10px !important;
}

.select2-container--bootstrap-5 .select2-dropdown {
  background: var(--pro-bg-elevated) !important;
  border: 1px solid var(--user-accent, var(--pro-accent-primary)) !important;
  border-radius: 8px !important;
  box-shadow: var(--pro-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.3)) !important;
  z-index: 9999 !important;
}

.select2-container--bootstrap-5 .select2-results__option {
  padding: 8px 12px !important;
  color: var(--pro-text-primary) !important;
  font-size: 12px !important;
  transition: all 0.2s ease !important;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
  background: var(--pro-bg-secondary) !important;
  color: var(--user-accent, var(--pro-accent-primary)) !important;
}

.select2-container--bootstrap-5 .select2-results__option--selected {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  color: white !important;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
  background: var(--pro-bg-secondary) !important;
  border: 1px solid var(--pro-border-color) !important;
  border-radius: 6px !important;
  color: var(--pro-text-primary) !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
  height: 32px !important;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  outline: none !important;
}

.select2-container--bootstrap-5 .select2-selection__clear {
  color: var(--pro-text-secondary) !important;
  font-size: 16px !important;
  margin-right: 8px !important;
  transition: color 0.2s ease !important;
}

.select2-container--bootstrap-5 .select2-selection__clear:hover {
  color: var(--user-accent, var(--pro-accent-primary)) !important;
}

/* Multi-select Select2 */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
  background-color: var(--user-accent, var(--pro-accent-primary)) !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 2px 8px !important;
  color: white !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  margin: 2px 3px 2px 0 !important;
  line-height: 1.3 !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
  color: white !important;
  opacity: 0.8 !important;
  font-weight: bold !important;
  margin-right: 4px !important;
  font-size: 0.7rem !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
  opacity: 1 !important;
}

/* Client Filter Container */
.funky-client-filter {
  display: inline-block;
  vertical-align: top;
}

.funky-client-filter select {
  width: 200px;
  height: 36px;
  font-size: 12px;
}

/* Date Filter Containers */
.funky-date-filter {
  display: inline-block;
  vertical-align: top;
}

.funky-date-filter select {
  width: 150px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  color: var(--pro-text-primary);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  height: 36px;
}

.funky-date-range {
  display: inline-block;
  vertical-align: top;
}

.funky-date-range input {
  width: 240px;
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  color: var(--pro-text-primary);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  height: 36px;
  cursor: pointer;
}

.funky-date-range input:hover,
.funky-date-range input:focus {
  border-color: var(--user-accent, var(--pro-accent-primary));
  outline: none;
}

/* ============================================
   TIMEZONE SELECTOR STYLES
   ============================================ */

/* Timezone Selector Base */
#globalTimezoneSelector {
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  color: var(--pro-text-primary);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  outline: none;
  min-width: 180px;
  transition: all 0.2s ease;
  height: 36px;
}

#globalTimezoneSelector:hover {
  border-color: var(--user-accent, var(--pro-accent-primary));
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(255, 109, 0, 0.1));
}

#globalTimezoneSelector:focus {
  outline: none;
  border-color: var(--user-accent, var(--pro-accent-primary));
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(255, 109, 0, 0.15));
}

/* Select2 Container for Timezone */
.select2-container--timezone {
  height: 36px;
}

/* Select2 Selection Box for Timezone */
.select2-container--timezone .select2-selection {
  background: var(--pro-bg-elevated) !important;
  border: 1px solid var(--pro-border-color) !important;
  border-radius: 6px !important;
  height: 36px !important;
  padding: 0 12px !important;
  display: flex !important;
  align-items: center !important;
  transition: all 0.2s ease !important;
}

.select2-container--timezone .select2-selection:hover {
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(255, 109, 0, 0.1)) !important;
}

.select2-container--timezone.select2-container--focus .select2-selection,
.select2-container--timezone.select2-container--open .select2-selection {
  border-color: var(--user-accent, var(--pro-accent-primary)) !important;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(255, 109, 0, 0.15)) !important;
}

.select2-container--timezone .select2-selection__rendered {
  color: var(--pro-text-primary) !important;
  padding: 0 !important;
  line-height: 36px !important;
  font-weight: 500 !important;
  font-size: 12px !important;
}

.select2-container--timezone .select2-selection__arrow {
  height: 36px !important;
  right: 10px !important;
  width: 18px !important;
  top: 0 !important;
  display: flex !important;
  align-items: center !important;
}

.select2-container--timezone .select2-selection__arrow b {
  border-color: var(--pro-text-secondary) transparent transparent transparent !important;
  border-width: 5px 4px 0 4px !important;
  margin: 0 !important;
}

.select2-container--timezone.select2-container--open .select2-selection__arrow b {
  border-color: transparent transparent var(--user-accent, var(--pro-accent-primary)) transparent !important;
  border-width: 0 4px 5px 4px !important;
}

/* Select2 Dropdown for Timezone */
.select2-container--timezone .select2-dropdown {
  background: var(--pro-bg-elevated);
  border: 1px solid var(--user-accent, var(--pro-accent-primary));
  border-radius: 12px;
  box-shadow: var(--pro-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.4));
  margin-top: 8px;
  overflow: hidden;
  min-width: 320px !important;
}

/* Search Field for Timezone */
.select2-container--timezone .select2-search--dropdown {
  padding: 12px;
  background: var(--pro-bg-elevated);
  border-bottom: 1px solid var(--pro-border-color);
}

.select2-container--timezone .select2-search--dropdown .select2-search__field {
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  color: var(--pro-text-primary);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  width: 100%;
  transition: all 0.2s ease;
}

.select2-container--timezone .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--user-accent, var(--pro-accent-primary));
  outline: none;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(255, 109, 0, 0.1));
}

.select2-container--timezone .select2-search--dropdown .select2-search__field::placeholder {
  color: var(--pro-text-secondary);
}

/* Results Container for Timezone */
.select2-container--timezone .select2-results {
  max-height: 400px;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.select2-container--timezone .select2-results__options {
  padding: 8px 0;
}

/* Group Headers for Timezone */
.select2-container--timezone .select2-results__group {
  color: var(--user-accent, var(--pro-accent-primary));
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 16px 6px;
  margin-top: 8px;
  background: var(--pro-bg-secondary);
  border-left: 3px solid var(--user-accent, var(--pro-accent-primary));
}

.select2-container--timezone .select2-results__group:first-child {
  margin-top: 0;
}

/* Group option containers need padding adjustment */
.select2-container--timezone .select2-results__option.select2-results__option--group {
  padding: 0 !important;
}

/* Options for Timezone */
.select2-container--timezone .select2-results__option {
  color: var(--pro-text-primary);
  padding: 11px 20px;
  font-size: 13px;
  transition: all 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}

.select2-container--timezone .select2-results__option--highlighted {
  background: var(--user-accent, var(--pro-accent-primary)) !important;
  color: white !important;
}

.select2-container--timezone .select2-results__option[aria-selected="true"] {
  background: var(--user-accent-muted, rgba(255, 109, 0, 0.12)) !important;
  color: var(--user-accent, var(--pro-accent-primary)) !important;
  font-weight: 600 !important;
  position: relative;
}

.select2-container--timezone .select2-results__option[aria-selected="true"]::before {
  content: "✓";
  position: absolute;
  left: 6px;
  font-weight: bold;
  font-size: 14px;
}

.select2-container--timezone .select2-results__option[aria-selected="true"]:not(.select2-results__option--highlighted) {
  padding-left: 28px;
}

/* Scrollbar for timezone dropdown */
.select2-container--timezone .select2-results::-webkit-scrollbar {
  width: 10px;
}

.select2-container--timezone .select2-results::-webkit-scrollbar-track {
  background: var(--pro-bg-secondary);
  border-radius: 0 10px 10px 0;
}

.select2-container--timezone .select2-results::-webkit-scrollbar-thumb {
  background: var(--pro-border-color);
  border-radius: 10px;
  border: 2px solid var(--pro-bg-secondary);
}

.select2-container--timezone .select2-results::-webkit-scrollbar-thumb:hover {
  background: var(--user-accent, var(--pro-accent-primary));
}

/* css/modals.css */
/**
 * ==========================================================================
 * MODALS.CSS - Enterprise Trading Platform Modal Styles
 * ==========================================================================
 * 
 * This file contains all modal-related styles including:
 * - Base modal z-index and backdrop handling
 * - Slide-in panel modals (new Phase 3B feature)
 * - Modal headers, bodies, and footers
 * - Form styling within modals
 * - Specific modal overrides (wizards, filters, etc.)
 * - Theme variations (light, even-funkyer)
 * 
 * ==========================================================================
 */

/* ==========================================================================
   1. BASE MODAL Z-INDEX & BACKDROP
   ========================================================================== */

/* 
 * FIX: Bootstrap 5 appends modal-backdrop to END of body AFTER the modal,
 * so it appears on top due to DOM order. We must use significantly higher
 * z-index on modal elements to overcome this.
 * 
 * Bootstrap defaults: backdrop=1050, modal=1055
 * Our fix: backdrop=1040, modal-dialog=1060
 */

/* Base backdrop - keep at lower z-index */
.modal-backdrop,
.modal-backdrop.fade,
.modal-backdrop.show {
  z-index: 1040 !important;
}

/* Modal container - needs to be above backdrop */
.modal,
.modal.fade,
.modal.show {
  z-index: 1050 !important;
}

/* Modal dialog - the key fix: significantly higher than backdrop */
.modal-dialog {
  position: relative;
  z-index: 1060 !important;
  pointer-events: auto !important;
}

/* Modal content - ensure clickable and above everything */
.modal-content {
  position: relative;
  z-index: 1061 !important;
  pointer-events: auto !important;
  background: var(--pro-bg-secondary, #161b22);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 12px;
  box-shadow: var(--pro-shadow-lg, 0 16px 48px rgba(0, 0, 0, 0.4));
}

/* Force body-level modals to have correct stacking */
body > .modal.show {
  z-index: 1050 !important;
}

body > .modal.show .modal-dialog {
  z-index: 1060 !important;
}

body > .modal.show .modal-content {
  z-index: 1061 !important;
}

body > .modal-backdrop.show {
  z-index: 1040 !important;
}

/* Ensure nested modals stack correctly */
.modal ~ .modal-backdrop {
  z-index: 1070 !important;
}

.modal ~ .modal {
  z-index: 1075 !important;
}

.modal ~ .modal .modal-dialog {
  z-index: 1080 !important;
}

.modal ~ .modal .modal-content {
  z-index: 1081 !important;
}

/* ==========================================================================
   2. SLIDE-IN PANEL MODALS (Phase 3B)
   ========================================================================== */

/* Slide-in animation keyframes */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

@keyframes slideInTop {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutTop {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}

@keyframes slideInBottom {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutBottom {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

/* Base slide-in panel class */
.modal-slide-panel {
  --slide-panel-width: 600px;
}

.modal-slide-panel .modal-dialog {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  width: var(--slide-panel-width);
  max-width: 100vw;
  height: 100%;
  max-height: 100vh;
  transform: translateX(0);
  animation: slideInRight 0.3s ease-out;
}

.modal-slide-panel.fade .modal-dialog {
  transform: translateX(100%);
  transition: transform 0.3s ease-out;
}

.modal-slide-panel.show .modal-dialog {
  transform: translateX(0);
}

.modal-slide-panel .modal-content {
  height: 100%;
  border-radius: 0;
  border-right: none;
  border-top: none;
  border-bottom: none;
  border-left: 1px solid var(--pro-border-color, #30363d);
  display: flex;
  flex-direction: column;
}

/* Slide-in panel size variants */
.modal-slide-panel-lg {
  --slide-panel-width: 800px;
}

.modal-slide-panel-xl {
  --slide-panel-width: 1000px;
}

.modal-slide-panel-full {
  --slide-panel-width: calc(100vw - 80px);
}

/* ==========================================================================
   2A-2. MODAL FULLSCREEN MODE
   Toggle modals to fullscreen with expand/collapse button
   ========================================================================== */

/* Fullscreen toggle button in modal header */
.modal-fullscreen-toggle {
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 6px;
  color: var(--pro-text-secondary, #8b949e);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-right: 8px;
}

.modal-fullscreen-toggle:hover {
  background: var(--pro-bg-tertiary, #21262d);
  color: var(--pro-text-primary, #e6edf3);
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

.modal-fullscreen-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(47, 129, 247, 0.3);
}

.modal-fullscreen-toggle .fa-compress {
  display: none;
}

.modal-fullscreen-mode .modal-fullscreen-toggle .fa-expand {
  display: none;
}

.modal-fullscreen-mode .modal-fullscreen-toggle .fa-compress {
  display: inline;
}

/* Fullscreen modal styling */
.modal-slide-panel.modal-fullscreen-mode .modal-dialog {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  margin: 0 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

.modal-slide-panel.modal-fullscreen-mode.show .modal-dialog {
  transform: none !important;
}

.modal-slide-panel.modal-fullscreen-mode .modal-content {
  border: none !important;
  border-radius: 0 !important;
  height: 100vh !important;
  max-height: 100vh !important;
}

/* Responsive: Full width on mobile */
@media (max-width: 767.98px) {
  .modal-slide-panel,
  .modal-slide-panel-lg,
  .modal-slide-panel-xl {
    --slide-panel-width: 100vw;
  }
  
  .modal-slide-panel .modal-content {
    border-left: none;
  }
}

@media (max-width: 991.98px) {
  .modal-slide-panel-xl {
    --slide-panel-width: 100vw;
  }
}

/* ==========================================================================
   2B. SLIDE DIRECTION VARIANTS
   ========================================================================== */

/* Slide from Left */
.modal-slide-panel.modal-slide-left .modal-dialog,
[data-modal-slide="left"] .modal-slide-panel .modal-dialog {
  right: auto;
  left: 0;
  animation: slideInLeft 0.3s ease-out;
}

.modal-slide-panel.modal-slide-left.fade .modal-dialog,
[data-modal-slide="left"] .modal-slide-panel.fade .modal-dialog {
  transform: translateX(-100%);
}

.modal-slide-panel.modal-slide-left.show .modal-dialog,
[data-modal-slide="left"] .modal-slide-panel.show .modal-dialog {
  transform: translateX(0);
}

.modal-slide-panel.modal-slide-left .modal-content,
[data-modal-slide="left"] .modal-slide-panel .modal-content {
  border-left: none;
  border-right: 1px solid var(--pro-border-color, #30363d);
}

/* Slide from Top */
.modal-slide-panel.modal-slide-top .modal-dialog,
[data-modal-slide="top"] .modal-slide-panel .modal-dialog {
  top: 0;
  right: 0;
  bottom: auto;
  left: 0;
  width: 100%;
  height: auto;
  max-height: 80vh;
  animation: slideInTop 0.3s ease-out;
}

.modal-slide-panel.modal-slide-top.fade .modal-dialog,
[data-modal-slide="top"] .modal-slide-panel.fade .modal-dialog {
  transform: translateY(-100%);
}

.modal-slide-panel.modal-slide-top.show .modal-dialog,
[data-modal-slide="top"] .modal-slide-panel.show .modal-dialog {
  transform: translateY(0);
}

.modal-slide-panel.modal-slide-top .modal-content,
[data-modal-slide="top"] .modal-slide-panel .modal-content {
  height: auto;
  max-height: 80vh;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1px solid var(--pro-border-color, #30363d);
  border-radius: 0 0 12px 12px;
}

/* Slide from Bottom */
.modal-slide-panel.modal-slide-bottom .modal-dialog,
[data-modal-slide="bottom"] .modal-slide-panel .modal-dialog {
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  max-height: 80vh;
  animation: slideInBottom 0.3s ease-out;
}

.modal-slide-panel.modal-slide-bottom.fade .modal-dialog,
[data-modal-slide="bottom"] .modal-slide-panel.fade .modal-dialog {
  transform: translateY(100%);
}

.modal-slide-panel.modal-slide-bottom.show .modal-dialog,
[data-modal-slide="bottom"] .modal-slide-panel.show .modal-dialog {
  transform: translateY(0);
}

.modal-slide-panel.modal-slide-bottom .modal-content,
[data-modal-slide="bottom"] .modal-slide-panel .modal-content {
  height: auto;
  max-height: 80vh;
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-top: 1px solid var(--pro-border-color, #30363d);
  border-radius: 12px 12px 0 0;
}

/* ==========================================================================
   2C. NAV-POSITION-AWARE MODAL DEFAULTS
   When nav is on right, modals slide from left by default (and vice versa)
   ========================================================================== */

/* Right nav -> modals slide from left */
[data-nav-position="right"] .modal-slide-panel .modal-dialog {
  right: auto;
  left: 0;
  animation: slideInLeft 0.3s ease-out;
}

[data-nav-position="right"] .modal-slide-panel.fade .modal-dialog {
  transform: translateX(-100%);
}

[data-nav-position="right"] .modal-slide-panel.show .modal-dialog {
  transform: translateX(0);
}

[data-nav-position="right"] .modal-slide-panel .modal-content {
  border-left: none;
  border-right: 1px solid var(--pro-border-color, #30363d);
}

/* Top/Bottom nav -> modals slide from right (default, no change needed) */

/* ==========================================================================
   2D. EXPLICIT DATA-MODAL-SLIDE OVERRIDE
   data-modal-slide on body takes precedence over nav-position defaults
   ========================================================================== */

/* Explicit right override (reset to default right slide) */
[data-modal-slide="right"] .modal-slide-panel .modal-dialog {
  right: 0;
  left: auto;
  animation: slideInRight 0.3s ease-out;
}

[data-modal-slide="right"] .modal-slide-panel.fade .modal-dialog {
  transform: translateX(100%);
}

[data-modal-slide="right"] .modal-slide-panel.show .modal-dialog {
  transform: translateX(0);
}

[data-modal-slide="right"] .modal-slide-panel .modal-content {
  border-right: none;
  border-left: 1px solid var(--pro-border-color, #30363d);
}

/* ==========================================================================
   3. MODAL HEADER STYLING
   ========================================================================== */

.modal-header {
  background: var(--pro-bg-tertiary, #1c2128);
  border-bottom: 1px solid var(--pro-border-color, #30363d);
  padding: 16px 24px;
  flex-shrink: 0;
}

.modal-slide-panel .modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: var(--pro-bg-tertiary, #1c2128);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--pro-text-primary, #e6edf3);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title i,
.modal-title .fas,
.modal-title .far,
.modal-title .fab {
  color: var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
  font-size: 1.1rem;
}

/* Modal subtitle for additional context */
.modal-subtitle {
  font-size: 0.875rem;
  color: var(--pro-text-secondary, #8b949e);
  margin-top: 4px;
  font-weight: 400;
}

/* Close button styling */
.modal-header .btn-close {
  filter: brightness(0.8) invert(1);
  opacity: 0.7;
  padding: 12px;
  margin: -8px -8px -8px auto;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.modal-header .btn-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.modal-header .btn-close:focus {
  outline: 2px solid var(--user-accent, var(--pro-accent-primary, #2f81f7));
  outline-offset: 2px;
  box-shadow: none;
}

/* Header action buttons area */
.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 16px;
}

/* Gradient header variant (for wizards and important modals) */
.modal-header-gradient {
  background: linear-gradient(135deg, var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7))), var(--primary-dark, #1a4d8c));
  border-bottom: none;
}

.modal-header-gradient .modal-title {
  color: white;
}

.modal-header-gradient .modal-title i {
  color: rgba(255, 255, 255, 0.9);
}

.modal-header-gradient .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.modal-header-gradient .btn-close:hover {
  opacity: 1;
}

/* ==========================================================================
   4. MODAL BODY STYLING
   ========================================================================== */

.modal-body {
  background: var(--pro-bg-secondary, #161b22);
  padding: 24px;
  flex: 1 1 auto;
  overflow-y: auto;
}

.modal-slide-panel .modal-body {
  padding: 24px;
}

/* Flush variant for edge-to-edge content (tables, editors) */
.modal-body-flush {
  padding: 0;
}

/* Modal sections for organizing content */
.modal-section {
  margin-bottom: 24px;
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pro-text-secondary, #8b949e);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--pro-border-color, #30363d);
}

/* Section divider */
.modal-section-divider {
  height: 1px;
  background: var(--pro-border-color, #30363d);
  margin: 24px 0;
}

/* Custom scrollbar for modal body */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: var(--pro-bg-primary, #0d1117);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--pro-border-color, #30363d);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--pro-border-emphasis, #484f58);
}

/* ==========================================================================
   5. MODAL FOOTER STYLING
   ========================================================================== */

.modal-footer {
  background: var(--pro-bg-tertiary, #1c2128);
  border-top: 1px solid var(--pro-border-color, #30363d);
  padding: 16px 24px;
  flex-shrink: 0;
  gap: 12px;
}

.modal-slide-panel .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: var(--pro-bg-tertiary, #1c2128);
}

/* Footer with left and right sections */
.modal-footer-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.modal-footer-left {
  display: flex;
  gap: 12px;
}

.modal-footer-right {
  display: flex;
  gap: 12px;
}

/* ==========================================================================
   6. FORM STYLING WITHIN MODALS (.form-pro)
   ========================================================================== */

.form-pro {
  /* Container for enhanced form styling */
}

.form-pro .form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--pro-text-primary, #e6edf3);
  margin-bottom: 6px;
}

.form-pro .form-label.required::after {
  content: ' *';
  color: var(--pro-accent-danger, #f85149);
}

.form-pro .form-control,
.form-pro .form-select {
  background: var(--pro-bg-primary, #0d1117);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 6px;
  color: var(--pro-text-primary, #e6edf3);
  padding: 10px 14px;
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-pro .form-control::placeholder {
  color: var(--pro-text-muted, #6e7681);
}

.form-pro .form-control:focus,
.form-pro .form-select:focus {
  background: var(--pro-bg-primary, #0d1117);
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.2));
  color: var(--pro-text-primary, #e6edf3);
  outline: none;
}

.form-pro .form-select option {
  background: var(--pro-bg-secondary, #161b22);
  color: var(--pro-text-primary, #e6edf3);
}

/* Inline form row */
.form-row-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.form-row-inline .form-label {
  margin-bottom: 0;
  min-width: 120px;
  flex-shrink: 0;
}

.form-row-inline .form-control,
.form-row-inline .form-select {
  flex: 1;
}

/* Compact form group for long forms */
.form-group-compact {
  margin-bottom: 12px;
}

.form-group-compact .form-label {
  margin-bottom: 4px;
  font-size: 0.8125rem;
}

.form-group-compact .form-control,
.form-group-compact .form-select {
  padding: 8px 12px;
  font-size: 0.875rem;
}

/* Form hint text */
.form-hint {
  font-size: 0.75rem;
  color: var(--pro-text-muted, #6e7681);
  margin-top: 4px;
}

/* Character counter */
.form-char-count {
  font-size: 0.75rem;
  color: var(--pro-text-muted, #6e7681);
  text-align: right;
  margin-top: 4px;
}

.form-char-count.warning {
  color: var(--pro-accent-warning, #d29922);
}

.form-char-count.danger {
  color: var(--pro-accent-danger, #f85149);
}

/* ==========================================================================
   7. FORM VALIDATION STATES
   ========================================================================== */

/* Valid state */
.form-pro .form-control.is-valid,
.form-pro .form-select.is-valid {
  border-color: var(--pro-accent-success, #3fb950);
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%233fb950' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-pro .form-control.is-valid:focus {
  border-color: var(--pro-accent-success, #3fb950);
  box-shadow: 0 0 0 3px var(--pro-accent-success-muted, rgba(63, 185, 80, 0.2));
}

/* Invalid state */
.form-pro .form-control.is-invalid,
.form-pro .form-select.is-invalid {
  border-color: var(--pro-accent-danger, #f85149);
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23f85149'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23f85149' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
  animation: shake 0.3s ease;
}

.form-pro .form-control.is-invalid:focus {
  border-color: var(--pro-accent-danger, #f85149);
  box-shadow: 0 0 0 3px var(--pro-accent-danger-muted, rgba(248, 81, 73, 0.2));
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Feedback messages */
.valid-feedback {
  display: none;
  color: var(--pro-accent-success, #3fb950);
  font-size: 0.8125rem;
  margin-top: 4px;
  animation: fadeIn 0.2s ease;
}

.invalid-feedback {
  display: none;
  color: var(--pro-accent-danger, #f85149);
  font-size: 0.8125rem;
  margin-top: 4px;
  animation: fadeIn 0.2s ease;
}

.is-valid ~ .valid-feedback,
.is-invalid ~ .invalid-feedback {
  display: block;
}

/* ==========================================================================
   8. JSONEDITOR THEME INTEGRATION
   ========================================================================== */

/* JSONEditor container */
.je-container,
[id*="EditorContainer"] {
  background: var(--pro-bg-secondary, #161b22);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 8px;
  padding: 16px;
}

/* JSONEditor navigation/menu */
.je-object__container,
.je-indented-panel {
  border: none !important;
  background: transparent !important;
  padding: 8px 0 !important;
  margin: 0 !important;
}

/* Override bg-light in JSONEditor - comprehensive selectors */
.je-object__container.bg-light,
.je-indented-panel.bg-light,
[id*="EditorContainer"] .bg-light,
.form-modal-editor .bg-light,
.form-modal-editor .card.bg-light,
.modal-body .je-object__container.bg-light,
.modal-body .card.bg-light {
  background: var(--pro-bg-tertiary, #1c2128) !important;
  border-color: var(--pro-border-color, #30363d) !important;
}

/* Card styling within modals */
.modal-body .card,
.form-modal-editor .card {
  background: var(--pro-bg-tertiary, #1c2128) !important;
  border: 1px solid var(--pro-border-color, #30363d) !important;
  border-radius: 8px !important;
}

.modal-body .card-body,
.form-modal-editor .card-body {
  color: var(--pro-text-primary, #e6edf3) !important;
}

/* JSONEditor input fields */
.je-form-input-label,
[id*="EditorContainer"] label {
  color: var(--pro-text-primary, #e6edf3) !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  margin-bottom: 6px !important;
}

[id*="EditorContainer"] input.form-control,
[id*="EditorContainer"] textarea.form-control,
[id*="EditorContainer"] select.form-control,
.je-form-control {
  background: var(--pro-bg-primary, #0d1117) !important;
  border: 1px solid var(--pro-border-color, #30363d) !important;
  border-radius: 6px !important;
  color: var(--pro-text-primary, #e6edf3) !important;
  padding: 8px 12px !important;
}

[id*="EditorContainer"] input.form-control:focus,
[id*="EditorContainer"] textarea.form-control:focus,
[id*="EditorContainer"] select.form-control:focus {
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7)) !important;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.2)) !important;
  outline: none !important;
}

/* JSONEditor buttons */
.je-btn,
[id*="EditorContainer"] .btn {
  background: var(--pro-bg-tertiary, #1c2128) !important;
  border: 1px solid var(--pro-border-color, #30363d) !important;
  color: var(--pro-text-primary, #e6edf3) !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
  font-size: 0.8125rem !important;
  transition: all 0.15s ease !important;
}

.je-btn:hover,
[id*="EditorContainer"] .btn:hover {
  background: var(--pro-bg-primary, #0d1117) !important;
  border-color: var(--pro-border-emphasis, #484f58) !important;
}

/* JSONEditor tree view */
.je-object__title {
  color: var(--pro-text-primary, #e6edf3) !important;
  font-weight: 600 !important;
}

/* JSONEditor checkboxes */
[id*="EditorContainer"] input[type="checkbox"] {
  width: 18px;
  height: 18px;
  appearance: none;
  background: var(--pro-bg-primary, #0d1117);
  border: 2px solid var(--pro-border-color, #30363d);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

[id*="EditorContainer"] input[type="checkbox"]:checked {
  background: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

[id*="EditorContainer"] input[type="checkbox"]:checked::after {
  content: '✓';
  display: block;
  color: white;
  font-size: 12px;
  text-align: center;
  line-height: 14px;
}

[id*="EditorContainer"] input[type="checkbox"]:focus {
  outline: 2px solid var(--user-accent, var(--pro-accent-primary, #2f81f7));
  outline-offset: 2px;
}

/* JSONEditor scrollbar */
.je-container::-webkit-scrollbar,
[id*="EditorContainer"]::-webkit-scrollbar {
  width: 8px;
}

.je-container::-webkit-scrollbar-track,
[id*="EditorContainer"]::-webkit-scrollbar-track {
  background: var(--pro-bg-primary, #0d1117);
}

.je-container::-webkit-scrollbar-thumb,
[id*="EditorContainer"]::-webkit-scrollbar-thumb {
  background: var(--pro-border-color, #30363d);
  border-radius: 4px;
}

/* ==========================================================================
   9. SPECIFIC MODAL OVERRIDES
   ========================================================================== */

/* --- Relationship Modal --- */
#relationshipsModal,
#relationshipFormModal,
#relationshipImportModal,
#relationshipImportResultsModal {
  z-index: 1050 !important;
}

#relationshipFormModal .modal-dialog {
  max-width: 800px;
}

#relationshipFormModal .modal-content {
  border-radius: 16px;
  box-shadow: var(--pro-shadow-xl, 0 20px 60px rgba(0, 0, 0, 0.5));
}

#relationshipFormModal .modal-header {
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--primary-dark, #1a4d8c));
  color: white;
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  padding: 20px 30px;
}

#relationshipFormModal .modal-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: white;
}

#relationshipFormModal .modal-body {
  padding: 30px;
}

#relationshipFormModal .modal-footer {
  background: var(--pro-bg-tertiary, #1c2128);
  border-radius: 0 0 14px 14px;
  padding: 20px 30px;
}

/* --- Template Wizard Modal --- */
#templateWizardModal .modal-dialog {
  max-width: 900px;
}

#templateWizardModal .modal-content {
  border-radius: 16px;
  box-shadow: var(--pro-shadow-xl, 0 20px 60px rgba(0, 0, 0, 0.5));
  min-height: 600px;
}

#templateWizardModal .modal-header {
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--primary-dark, #1a4d8c));
  color: white;
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  padding: 20px 30px;
}

#templateWizardModal .modal-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: white;
}

#templateWizardModal .modal-body {
  padding: 30px;
  min-height: 400px;
}

#templateWizardModal .modal-footer {
  background: var(--pro-bg-tertiary, #1c2128);
  border-radius: 0 0 14px 14px;
  padding: 20px 30px;
}

@media (max-width: 991.98px) {
  #templateWizardModal .modal-dialog {
    max-width: 100%;
    margin: 0;
  }
}

/* --- Trade Wizard Modal --- */
#tradeWizardModal .modal-dialog {
  max-width: 900px;
}

#tradeWizardModal .modal-content {
  min-height: 500px;
}

#tradeWizardModal .modal-header {
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--primary-dark, #1a4d8c));
  color: white;
  border-bottom: none;
}

#tradeWizardModal .modal-body {
  padding: 24px;
}

#tradeWizardModal .modal-footer {
  background: var(--pro-bg-tertiary, #1c2128);
}

#tradeWizardModal .form-label {
  color: var(--pro-text-primary, #e6edf3);
  font-weight: 500;
}

#tradeWizardModal .form-control,
#tradeWizardModal .form-select {
  background: var(--pro-bg-primary, #0d1117);
  border-color: var(--pro-border-color, #30363d);
  color: var(--pro-text-primary, #e6edf3);
}

#tradeWizardModal .form-control:focus,
#tradeWizardModal .form-select:focus {
  border-color: var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.2));
}

#tradeWizardModal .alert-info {
  background: var(--pro-accent-info-muted, rgba(59, 130, 246, 0.1));
  border-color: var(--pro-accent-info-border, rgba(59, 130, 246, 0.3));
  color: var(--pro-text-primary, #e6edf3);
}

/* Trade Wizard responsive */
@media (max-width: 767.98px) {
  #tradeWizardModal .modal-dialog {
    max-width: 100%;
    margin: 0;
    height: 100%;
  }
  
  #tradeWizardModal .modal-content {
    height: 100%;
    border-radius: 0;
  }
  
  #tradeWizardModal .modal-body {
    padding: 16px;
  }
}

@media (max-width: 575.98px) {
  #tradeWizardModal .modal-header,
  #tradeWizardModal .modal-footer {
    padding: 12px 16px;
  }
  
  #tradeWizardModal .modal-footer .btn {
    padding: 8px 16px;
    font-size: 0.875rem;
  }
}

/* --- Bulk Actions Modal --- */
#bulkActionsModal .modal-header {
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--pro-accent-info, #58a6ff));
  color: white;
  border-bottom: none;
}

#bulkActionsModal .modal-header .btn-close {
  filter: brightness(0) invert(1);
}

#bulkActionsModal .modal-body {
  background: var(--pro-bg-secondary, #161b22);
}

#bulkActionsModal .table {
  color: var(--pro-text-primary, #e6edf3);
  margin-bottom: 0;
}

#bulkActionsModal .table thead th {
  background: var(--pro-bg-tertiary, #1c2128) !important;
  color: var(--pro-text-primary, #e6edf3) !important;
  font-weight: 600;
  border-bottom: 2px solid var(--user-accent, var(--user-accent, var(--pro-accent-primary, #2f81f7)));
  padding: 0.75rem;
}

#bulkActionsModal .table tbody td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--pro-border-color, #30363d);
}

#bulkActionsModal .table-hover tbody tr:hover {
  background: var(--user-accent-muted, rgba(47, 129, 247, 0.05));
}

#bulkActionsModal .alert-info {
  background: var(--pro-accent-info-muted, rgba(59, 130, 246, 0.1));
  border-color: var(--pro-accent-info-border, rgba(59, 130, 246, 0.3));
  color: var(--pro-text-primary, #e6edf3);
}

#bulkActionsModal .alert-warning {
  background: var(--pro-accent-warning-muted, rgba(245, 158, 11, 0.1));
  border-color: var(--pro-accent-warning-border, rgba(245, 158, 11, 0.3));
  color: var(--pro-text-primary, #e6edf3);
}

/* --- Advanced Filter Modal --- */
#advancedFilterModal .modal-dialog {
  max-width: 1200px;
}

#advancedFilterModal .filter-section {
  animation: fadeIn 0.3s ease;
}

/* Filter responsive */
@media (max-width: 767.98px) {
  #advancedFilterModal .modal-dialog {
    max-width: 100%;
    margin: 0;
  }
  
  #advancedFilterModal .modal-content {
    border-radius: 0;
    height: 100vh;
  }
}

/* --- Format Rules Modal --- */
.format-rules-modal .modal-dialog {
  max-width: 700px;
}

.format-rules-modal .modal-content {
  background: var(--pro-bg-secondary, #161b22);
  border: 1px solid var(--pro-border-color, #30363d);
}

.format-rules-modal .modal-header {
  border-bottom-color: var(--pro-border-color, #30363d);
  padding: 1rem 1.25rem;
}

.format-rules-modal .modal-body {
  padding: 1rem 1.25rem;
  max-height: 60vh;
  overflow-y: auto;
}

.format-rules-modal .modal-footer {
  border-top-color: var(--pro-border-color, #30363d);
  padding: 0.75rem 1.25rem;
}

/* --- Column Profile Modal --- */
.column-profile-modal .modal-content {
  background: var(--pro-bg-secondary, #161b22);
  border: 1px solid var(--pro-border-color, #30363d);
}

/* ==========================================================================
   10. SELECT2 IN MODALS
   ========================================================================== */

.modal .select2-container--bootstrap-5 .select2-selection {
  background-color: var(--pro-bg-primary, #0d1117) !important;
  border-color: var(--pro-border-color, #30363d) !important;
  color: var(--pro-text-primary, #e6edf3) !important;
  min-height: 38px;
}

.modal .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  color: var(--pro-text-primary, #e6edf3) !important;
  padding: 6px 12px;
}

.modal .select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
  height: 36px;
}

.modal .select2-container--bootstrap-5.select2-container--focus .select2-selection {
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7)) !important;
  box-shadow: 0 0 0 3px var(--user-accent-muted, rgba(47, 129, 247, 0.2)) !important;
}

/* ==========================================================================
   11. LIGHT THEME OVERRIDES
   ========================================================================== */

[data-theme="light"] .modal-content {
  background: var(--pro-bg-elevated);
  border-color: var(--pro-border-color);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .modal-header {
  background: var(--pro-bg-secondary);
  border-bottom-color: var(--pro-border-color);
}

[data-theme="light"] .modal-slide-panel .modal-header {
  background: rgba(246, 248, 250, 0.95);
}

[data-theme="light"] .modal-title {
  color: var(--pro-text-primary);
}

[data-theme="light"] .modal-title i {
  color: var(--pro-accent-primary);
}

[data-theme="light"] .modal-header .btn-close {
  filter: none;
  opacity: 0.6;
}

[data-theme="light"] .modal-header .btn-close:hover {
  opacity: 1;
}

[data-theme="light"] .modal-body {
  background: var(--pro-bg-elevated);
}

[data-theme="light"] .modal-footer {
  background: var(--pro-bg-secondary);
  border-top-color: var(--pro-border-color);
}

[data-theme="light"] .modal-slide-panel .modal-footer {
  background: rgba(246, 248, 250, 0.95);
}

[data-theme="light"] .modal-slide-panel .modal-content {
  border-left-color: var(--pro-border-color);
}

[data-theme="light"] .modal-section-title {
  color: var(--pro-text-secondary);
  border-bottom-color: var(--pro-border-color);
}

/* Light theme form styling */
[data-theme="light"] .form-pro .form-label {
  color: var(--pro-text-primary);
}

[data-theme="light"] .form-pro .form-control,
[data-theme="light"] .form-pro .form-select {
  background: var(--pro-bg-elevated);
  border-color: var(--pro-border-color);
  color: var(--pro-text-primary);
}

[data-theme="light"] .form-pro .form-control::placeholder {
  color: var(--pro-text-muted);
}

[data-theme="light"] .form-pro .form-control:focus,
[data-theme="light"] .form-pro .form-select:focus {
  background: var(--pro-bg-elevated);
  border-color: var(--pro-accent-primary);
  box-shadow: 0 0 0 3px var(--pro-accent-primary-muted);
}

[data-theme="light"] .form-hint,
[data-theme="light"] .form-char-count {
  color: var(--pro-text-muted);
}

/* Light theme JSONEditor */
[data-theme="light"] .je-container,
[data-theme="light"] [id*="EditorContainer"] {
  background: var(--pro-bg-secondary);
  border-color: var(--pro-border-color);
}

[data-theme="light"] [id*="EditorContainer"] input.form-control,
[data-theme="light"] [id*="EditorContainer"] textarea.form-control,
[data-theme="light"] [id*="EditorContainer"] select.form-control {
  background: var(--pro-bg-elevated) !important;
  border-color: var(--pro-border-color) !important;
  color: var(--pro-text-primary) !important;
}

[data-theme="light"] [id*="EditorContainer"] label {
  color: var(--pro-text-primary) !important;
}

/* Light theme column profile modal */
[data-theme="light"] .column-profile-modal .modal-content {
  background: var(--pro-bg-elevated);
  border-color: var(--pro-border-color);
}

/* ==========================================================================
   12. EVEN-FUNKYER THEME OVERRIDES
   ========================================================================== */

[data-theme="even-funkyer"] .modal-content {
  background: rgba(10, 10, 20, 0.95);
  border: 1px solid rgba(255, 0, 255, 0.3);
  box-shadow: 
    0 0 30px rgba(255, 0, 255, 0.2),
    0 16px 48px rgba(0, 0, 0, 0.5),
    inset 0 0 60px rgba(255, 0, 255, 0.05);
}

[data-theme="even-funkyer"] .modal-slide-panel .modal-content {
  border-left: 2px solid;
  border-image: linear-gradient(180deg, var(--pro-accent-primary), var(--pro-accent-secondary), var(--pro-accent-primary)) 1;
}

[data-theme="even-funkyer"] .modal-header {
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.2), rgba(0, 255, 255, 0.1));
  border-bottom: 1px solid rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] .modal-slide-panel .modal-header {
  background: rgba(10, 10, 20, 0.95);
  backdrop-filter: blur(10px);
}

[data-theme="even-funkyer"] .modal-title {
  color: var(--pro-text-inverse);
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

[data-theme="even-funkyer"] .modal-title i {
  color: var(--pro-accent-primary);
  filter: drop-shadow(0 0 5px var(--pro-accent-primary));
}

[data-theme="even-funkyer"] .modal-body {
  background: rgba(10, 10, 20, 0.9);
}

[data-theme="even-funkyer"] .modal-footer {
  background: rgba(15, 15, 25, 0.95);
  border-top: 1px solid rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] .modal-section-title {
  color: var(--pro-accent-secondary);
  border-bottom-color: rgba(0, 255, 255, 0.3);
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

/* Even-funkyer form styling */
[data-theme="even-funkyer"] .form-pro .form-label {
  color: var(--pro-text-inverse);
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

[data-theme="even-funkyer"] .form-pro .form-control,
[data-theme="even-funkyer"] .form-pro .form-select {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--pro-border-muted);
  color: var(--pro-text-inverse);
}

[data-theme="even-funkyer"] .form-pro .form-control:focus,
[data-theme="even-funkyer"] .form-pro .form-select:focus {
  border-color: var(--pro-accent-primary);
  box-shadow: 
    0 0 0 3px var(--pro-accent-primary-muted),
    0 0 15px rgba(255, 0, 255, 0.3);
}

/* Even-funkyer validation states */
[data-theme="even-funkyer"] .form-pro .form-control.is-valid {
  border-color: var(--pro-accent-success);
  box-shadow: 0 0 10px var(--pro-accent-success-muted);
}

[data-theme="even-funkyer"] .form-pro .form-control.is-invalid {
  border-color: var(--pro-accent-danger);
  box-shadow: 0 0 10px var(--pro-accent-danger-muted);
}

[data-theme="even-funkyer"] .valid-feedback {
  color: var(--pro-accent-success);
  text-shadow: 0 0 5px var(--pro-accent-success-muted);
}

[data-theme="even-funkyer"] .invalid-feedback {
  color: var(--pro-accent-danger);
  text-shadow: 0 0 5px var(--pro-accent-danger-muted);
}

/* Even-funkyer JSONEditor */
[data-theme="even-funkyer"] .je-container,
[data-theme="even-funkyer"] [id*="EditorContainer"] {
  background: rgba(10, 10, 20, 0.8);
  border-color: rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] [id*="EditorContainer"] input.form-control,
[data-theme="even-funkyer"] [id*="EditorContainer"] textarea.form-control,
[data-theme="even-funkyer"] [id*="EditorContainer"] select.form-control {
  background: rgba(0, 0, 0, 0.5) !important;
  border-color: rgba(0, 255, 255, 0.3) !important;
  color: var(--pro-text-inverse) !important;
}

[data-theme="even-funkyer"] [id*="EditorContainer"] input.form-control:focus,
[data-theme="even-funkyer"] [id*="EditorContainer"] textarea.form-control:focus,
[data-theme="even-funkyer"] [id*="EditorContainer"] select.form-control:focus {
  border-color: var(--pro-accent-secondary) !important;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3) !important;
}

[data-theme="even-funkyer"] [id*="EditorContainer"] label {
  color: var(--pro-accent-secondary) !important;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

/* Even-funkyer column profile modal */
[data-theme="even-funkyer"] .column-profile-modal .modal-content {
  background: rgba(10, 10, 20, 0.95);
  border-color: rgba(255, 0, 255, 0.3);
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.2);
}

/* ==========================================================================
   13. WIZARD COMPONENTS (Shared)
   ========================================================================== */

/* Wizard Progress Bar */
.wizard-progress {
  margin-bottom: 30px;
  padding: 0;
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
}

.wizard-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pro-bg-tertiary, #1c2128);
  border: 2px solid var(--pro-border-color, #30363d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--pro-text-secondary, #8b949e);
  transition: all 0.3s ease;
  z-index: 1;
}

.wizard-step.active .wizard-step-number {
  background: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  color: white;
  box-shadow: 0 0 15px var(--user-accent-muted, rgba(47, 129, 247, 0.4));
}

.wizard-step.completed .wizard-step-number {
  background: var(--pro-accent-success, #3fb950);
  border-color: var(--pro-accent-success, #3fb950);
  color: white;
}

.wizard-step-label {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--pro-text-secondary, #8b949e);
  text-align: center;
}

.wizard-step.active .wizard-step-label {
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  font-weight: 500;
}

.wizard-step.completed .wizard-step-label {
  color: var(--pro-accent-success, #3fb950);
}

/* Wizard connector line */
.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: calc(50% + 25px);
  width: calc(100% - 50px);
  height: 2px;
  background: var(--pro-border-color, #30363d);
  z-index: 0;
}

.wizard-step.completed:not(:last-child)::after {
  background: var(--pro-accent-success, #3fb950);
}

/* ==========================================================================
   14. LOADING & EMPTY STATES
   ========================================================================== */

.modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--pro-text-secondary, #8b949e);
}

.modal-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--pro-border-color, #30363d);
  border-top-color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

.modal-loading-text {
  font-size: 0.9375rem;
}

.modal-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.modal-empty-icon {
  font-size: 3rem;
  color: var(--pro-text-muted, #6e7681);
  margin-bottom: 16px;
}

.modal-empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--pro-text-primary, #e6edf3);
  margin-bottom: 8px;
}

.modal-empty-description {
  font-size: 0.9375rem;
  color: var(--pro-text-secondary, #8b949e);
  max-width: 300px;
}

/* ==========================================================================
   15. ACCESSIBILITY
   ========================================================================== */

/* Focus trap indicator */
.modal:focus {
  outline: none;
}

.modal-dialog:focus {
  outline: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .modal-slide-panel .modal-dialog {
    animation: none;
  }
  
  .modal-slide-panel.fade .modal-dialog {
    transition: none;
  }
  
  .form-pro .form-control.is-invalid {
    animation: none;
  }
  
  .wizard-step-number {
    transition: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .modal-content {
    border-width: 2px;
  }
  
  .form-pro .form-control:focus,
  .form-pro .form-select:focus {
    outline: 3px solid;
    outline-offset: 2px;
  }
}

/* ==========================================================================
   THEME CUSTOMIZER MODAL
   Quick-access theme switcher from header
   ========================================================================== */

.theme-customizer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--pro-overlay-bg, rgba(0, 0, 0, 0.5));
  z-index: 1080;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  backdrop-filter: blur(2px);
}

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

.theme-customizer-modal {
  position: fixed;
  top: 70px;
  right: 20px;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  border-radius: 12px;
  box-shadow: var(--pro-shadow-xl);
  z-index: 1090;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.theme-customizer-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

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

.theme-customizer-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--pro-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-customizer-header h3 i {
  color: var(--user-accent, var(--pro-accent-primary));
}

.theme-customizer-close {
  background: transparent;
  border: none;
  color: var(--pro-text-secondary);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.theme-customizer-close:hover {
  background: var(--pro-bg-tertiary);
  color: var(--pro-text-primary);
}

.theme-customizer-body {
  padding: 16px 20px;
}

.theme-customizer-section {
  margin-bottom: 16px;
}

.theme-customizer-section:last-child {
  margin-bottom: 0;
}

.theme-customizer-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pro-text-muted);
  margin-bottom: 10px;
}

/* Theme Mode Buttons */
.theme-mode-options {
  display: flex;
  gap: 8px;
}

.theme-mode-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--pro-bg-tertiary);
  border: 2px solid var(--pro-border-color);
  border-radius: 8px;
  color: var(--pro-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-mode-btn i {
  font-size: 18px;
}

.theme-mode-btn span {
  font-size: 11px;
  font-weight: 500;
}

.theme-mode-btn:hover {
  background: var(--pro-bg-elevated);
  border-color: var(--pro-border-emphasis);
  color: var(--pro-text-primary);
}

.theme-mode-btn.active {
  background: var(--user-accent-muted, rgba(47, 129, 247, 0.15));
  border-color: var(--user-accent, var(--pro-accent-primary));
  color: var(--user-accent, var(--pro-accent-primary));
}

/* Accent Color Buttons */
.accent-color-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.accent-color-btn {
  width: 32px;
  height: 32px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.accent-color-btn:hover {
  transform: scale(1.15);
  box-shadow: var(--pro-shadow-md, 0 2px 8px rgba(0, 0, 0, 0.3));
}

.accent-color-btn.active {
  border-color: var(--pro-text-primary);
  box-shadow: 0 0 0 2px var(--pro-bg-secondary), 0 0 0 4px currentColor;
}

.accent-color-btn.active::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
  text-shadow: var(--pro-text-shadow, 0 1px 2px rgba(0, 0, 0, 0.5));
}

/* Navigation Position Buttons */
.nav-position-options {
  display: flex;
  gap: 8px;
}

.nav-position-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: var(--pro-bg-tertiary);
  border: 2px solid var(--pro-border-color);
  border-radius: 8px;
  color: var(--pro-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-position-btn i {
  font-size: 16px;
}

.nav-position-btn:hover {
  background: var(--pro-bg-elevated);
  border-color: var(--pro-border-emphasis);
  color: var(--pro-text-primary);
}

.nav-position-btn.active {
  background: var(--user-accent-muted, rgba(47, 129, 247, 0.15));
  border-color: var(--user-accent, var(--pro-accent-primary));
  color: var(--user-accent, var(--pro-accent-primary));
}

/* Modal Slide Direction Buttons */
.modal-slide-options {
  display: flex;
  gap: 6px;
}

.modal-slide-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: var(--pro-bg-tertiary);
  border: 2px solid var(--pro-border-color);
  border-radius: 6px;
  color: var(--pro-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-slide-btn i {
  font-size: 14px;
}

.modal-slide-btn:hover {
  background: var(--pro-bg-elevated);
  border-color: var(--pro-border-emphasis);
  color: var(--pro-text-primary);
}

.modal-slide-btn.active {
  background: var(--user-accent-muted, rgba(47, 129, 247, 0.15));
  border-color: var(--user-accent, var(--pro-accent-primary));
  color: var(--user-accent, var(--pro-accent-primary));
}

/* Fullscreen Toggle Button */
.fullscreen-toggle-row {
  display: flex;
}

.fullscreen-toggle-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--pro-bg-tertiary);
  border: 2px solid var(--pro-border-color);
  border-radius: 8px;
  color: var(--pro-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
  font-weight: 500;
}

.fullscreen-toggle-btn i {
  font-size: 16px;
}

.fullscreen-toggle-btn:hover {
  background: var(--pro-bg-elevated);
  border-color: var(--pro-border-emphasis);
  color: var(--pro-text-primary);
}

.fullscreen-toggle-btn.active {
  background: var(--user-accent-muted, rgba(47, 129, 247, 0.15));
  border-color: var(--user-accent, var(--pro-accent-primary));
  color: var(--user-accent, var(--pro-accent-primary));
}

/* Footer */
.theme-customizer-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--pro-border-color);
  text-align: center;
}

.theme-customizer-settings-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pro-text-secondary);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.theme-customizer-settings-link:hover {
  color: var(--user-accent, var(--pro-accent-primary));
}

/* Nav Position: Right - Modal appears on right side (near the nav) */
body[data-nav-position="right"] .theme-customizer-modal {
  left: auto;
  right: 280px; /* Position next to the right sidebar */
  transform: translateY(-10px) translateX(10px) scale(0.95);
}

body[data-nav-position="right"] .theme-customizer-modal.active {
  transform: translateY(0) translateX(0) scale(1);
}

/* Nav Position: Top - Modal slides from top-right */
body[data-nav-position="top"] .theme-customizer-modal {
  top: 80px;
}

/* Nav Position: Bottom - Toggle is still at top, so modal stays at top-right */
/* No positioning changes needed - uses default top: 70px, right: 20px */

/* Mobile adjustments */
@media (max-width: 768px) {
  .theme-customizer-modal {
    top: auto;
    bottom: 20px;
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
  }
  
  /* Reset nav-position specific styles on mobile */
  body[data-nav-position="right"] .theme-customizer-modal {
    right: 10px;
    left: 10px;
    transform: translateY(10px) scale(0.95);
  }
  
  body[data-nav-position="right"] .theme-customizer-modal.active {
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   IMPORT DROPZONE STYLING
   ========================================================================== */

.import-dropzone {
  background: var(--pro-bg-tertiary, #1c2128);
  border: 2px dashed var(--pro-border-color, #30363d) !important;
  border-radius: 12px !important;
  transition: all 0.2s ease;
  cursor: pointer;
}

.import-dropzone:hover,
.import-dropzone.dragover {
  border-color: var(--user-accent, var(--pro-accent-primary, #2f81f7)) !important;
  background: var(--pro-bg-secondary, #161b22);
}

.import-dropzone.dragover {
  transform: scale(1.01);
  box-shadow: 0 0 20px var(--user-accent-muted, rgba(47, 129, 247, 0.2));
}

.import-dropzone i.fa-cloud-upload-alt {
  color: var(--pro-text-secondary, #8b949e);
  transition: color 0.2s ease;
}

.import-dropzone:hover i.fa-cloud-upload-alt,
.import-dropzone.dragover i.fa-cloud-upload-alt {
  color: var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

.import-file-info {
  background: var(--pro-bg-tertiary, #1c2128);
  border: 1px solid var(--pro-border-color, #30363d);
  border-radius: 8px;
  padding: 12px 16px;
}

.import-file-name {
  color: var(--pro-text-primary, #e6edf3);
}

.import-file-size {
  color: var(--pro-text-secondary, #8b949e);
}

.import-results-summary.alert-success {
  background: rgba(35, 134, 54, 0.15);
  border-color: #238636;
  color: #3fb950;
}

.import-results-summary.alert-warning {
  background: rgba(187, 128, 9, 0.15);
  border-color: #bb8009;
  color: #d29922;
}

.import-results-summary.alert-danger {
  background: rgba(248, 81, 73, 0.15);
  border-color: #f85149;
  color: #f85149;
}

.import-instructions h6 {
  color: var(--pro-text-primary, #e6edf3);
  margin-bottom: 8px;
}

.import-instructions ul {
  padding-left: 20px;
}

.import-instructions li {
  margin-bottom: 4px;
}

.import-progress .progress {
  height: 8px;
  background: var(--pro-bg-tertiary, #1c2128);
  border-radius: 4px;
  overflow: hidden;
}

.import-progress .progress-bar {
  background: var(--user-accent, var(--pro-accent-primary, #2f81f7));
}

/* css/toasts.css */
/* ============================================
   TOASTS.CSS - Toast Notifications
   Bootstrap 5 toast styling for dark theme
   ============================================ */

/* Toast container */
#funky-toast-container {
  z-index: 9999;
}

/* Base toast styling */
.funky-toast {
  min-width: 300px;
  max-width: 400px;
  border: 1px solid var(--pro-border-muted, rgba(255, 255, 255, 0.1));
  box-shadow: var(--pro-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.3));
}

.funky-toast .toast-header {
  border-bottom: 1px solid var(--pro-border-muted, rgba(255, 255, 255, 0.1));
  font-weight: 600;
}

.funky-toast .toast-header i {
  font-size: 1.1em;
}

.funky-toast .toast-body {
  font-size: 0.95em;
}

/* Success toast */
.funky-toast-success {
  background-color: var(--pro-accent-success-bg, #1e4d2b);
  color: var(--pro-accent-success-text, #d4edda);
}

.funky-toast-success .toast-header {
  background-color: var(--pro-accent-success, #3fb950);
  color: var(--pro-text-inverse);
}

.funky-toast-success .toast-header i {
  color: var(--pro-accent-success-text, #d4edda);
}

.funky-toast-success .btn-close {
  filter: brightness(0) invert(1);
}

/* Error toast */
.funky-toast-error {
  background-color: var(--pro-accent-danger-bg, #5c1f1f);
  color: var(--pro-accent-danger-text, #f8d7da);
}

.funky-toast-error .toast-header {
  background-color: var(--pro-accent-danger, #f85149);
  color: var(--pro-text-inverse);
}

.funky-toast-error .toast-header i {
  color: var(--pro-accent-danger-text, #f8d7da);
}

.funky-toast-error .btn-close {
  filter: brightness(0) invert(1);
}

/* Warning toast */
.funky-toast-warning {
  background-color: var(--pro-accent-warning-bg, #664d03);
  color: var(--pro-accent-warning-text, #fff3cd);
}

.funky-toast-warning .toast-header {
  background-color: var(--pro-accent-warning, #d29922);
  color: var(--pro-text-inverse);
}

.funky-toast-warning .toast-header i {
  color: var(--pro-text-inverse);
}

.funky-toast-warning .btn-close {
  filter: brightness(0);
}

/* Info toast */
.funky-toast-info {
  background-color: var(--pro-accent-info-bg, #0c4a6e);
  color: var(--pro-accent-info-text, #cfe2ff);
}

.funky-toast-info .toast-header {
  background-color: var(--pro-accent-info, #58a6ff);
  color: var(--pro-text-inverse);
}

.funky-toast-info .toast-header i {
  color: var(--pro-text-inverse);
}

.funky-toast-info .btn-close {
  filter: brightness(0);
}

/* Confirmation toast */
.funky-toast-confirm {
  background-color: var(--pro-accent-warning-alt-bg, #3d2a1f);
  color: var(--pro-accent-warning-text, #fff3cd);
  min-width: 350px;
}

.funky-toast-confirm .toast-header {
  background-color: var(--pro-accent-warning-alt, #fd7e14);
  color: var(--pro-text-inverse);
}

.funky-toast-confirm .toast-header i {
  color: var(--pro-text-inverse);
}

.funky-toast-confirm .btn-close {
  filter: brightness(0);
}

.funky-toast-confirm .toast-body {
  padding: 1rem;
}

.funky-toast-confirm .toast-body .btn {
  font-weight: 500;
}

/* css/sidenav.css */
/**
 * Funky.SideNav Styles
 * Searchable sidebar navigation component
 * 
 * Supports density modes: compact, comfortable, spacious
 * Uses CSS variables from themes.css for consistent spacing
 */

/* Container */
.funky-sidenav {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Header - contains search and sort toggle */
.sidenav-header {
  display: flex;
  align-items: center;
  gap: var(--pro-spacing-sm, 8px);
  padding: var(--pro-spacing-md, 12px);
  border-bottom: 1px solid var(--pro-border-color);
}

.sidenav-header .sidenav-search-wrapper {
  flex: 1;
  padding: 0;
  border-bottom: none;
}

/* Sort Toggle Button - uses form control height for consistency */
.sidenav-sort-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--form-control-height, 36px);
  height: var(--form-control-height, 36px);
  padding: 0;
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  background: var(--pro-bg-secondary);
  color: var(--pro-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.sidenav-sort-toggle:hover {
  background: var(--pro-bg-hover);
  color: var(--pro-text-primary);
  border-color: var(--pro-accent-primary);
}

.sidenav-sort-toggle:focus {
  outline: none;
  border-color: var(--pro-accent-primary);
  box-shadow: 0 0 0 3px rgba(var(--pro-accent-primary-rgb), 0.15);
}

.sidenav-sort-toggle i {
  font-size: var(--btn-font-sm, 12px);
}

/* Search - standalone (when no header) */
.funky-sidenav > .sidenav-search-wrapper {
  padding: var(--pro-spacing-md, 12px);
  border-bottom: 1px solid var(--pro-border-color);
}

/* Search */
.sidenav-search-wrapper {
  position: relative;
}

.sidenav-search {
  width: 100%;
  height: var(--form-control-height, 36px);
  padding: var(--form-control-padding, 8px 12px);
  padding-left: 36px;
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  background: var(--pro-bg-secondary);
  color: var(--pro-text-primary);
  font-size: var(--btn-font-md, 13px);
  transition: all 0.15s ease;
}

.sidenav-search:focus {
  outline: none;
  border-color: var(--pro-accent-primary);
  box-shadow: 0 0 0 3px rgba(var(--pro-accent-primary-rgb), 0.15);
}

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

.sidenav-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pro-text-muted);
  font-size: var(--btn-font-sm, 12px);
  pointer-events: none;
}

/* List */
.sidenav-list {
  flex: 1;
  list-style: none;
  margin: 0;
  padding: var(--pro-spacing-xs, 8px);
  overflow-y: auto;
}

/* Item - uses nav-item-padding for density support */
.sidenav-item {
  display: flex;
  align-items: center;
  gap: var(--pro-spacing-sm, 10px);
  padding: var(--nav-item-padding, 10px 12px);
  border-radius: 6px;
  cursor: pointer;
  font-size: var(--btn-font-md, 13px);
  color: var(--pro-text-secondary);
  transition: all 0.15s ease;
}

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

.sidenav-item.active {
  background: var(--pro-accent-muted);
  color: var(--pro-accent-primary);
}

.sidenav-item.focused {
  outline: 2px solid var(--pro-accent-primary);
  outline-offset: -2px;
}

.sidenav-item .sidenav-icon {
  width: 20px;
  text-align: center;
  color: var(--pro-text-muted);
  flex-shrink: 0;
}

.sidenav-item.active .sidenav-icon {
  color: var(--pro-accent-primary);
}

.sidenav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Badge */
.sidenav-badge {
  font-size: var(--btn-font-xs, 10px);
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--pro-accent-muted);
  color: var(--pro-accent-primary);
  font-weight: 600;
  flex-shrink: 0;
}

/* Group */
.sidenav-group {
  list-style: none;
  margin-bottom: var(--pro-spacing-xs, 4px);
}

.sidenav-group-header {
  display: flex;
  align-items: center;
  gap: var(--pro-spacing-sm, 10px);
  padding: var(--nav-item-padding, 10px 12px);
  border-radius: 6px;
  cursor: pointer;
  font-size: var(--btn-font-sm, 12px);
  font-weight: 600;
  color: var(--pro-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
}

.sidenav-group-header:hover {
  background: var(--pro-bg-hover);
  color: var(--pro-text-primary);
}

.sidenav-group-header .sidenav-icon {
  width: 20px;
  text-align: center;
  color: var(--pro-text-muted);
  flex-shrink: 0;
}

.sidenav-chevron {
  margin-left: auto;
  color: var(--pro-text-muted);
  font-size: var(--btn-font-xs, 10px);
  transition: transform 0.2s ease;
}

.sidenav-group.collapsed .sidenav-chevron {
  transform: rotate(-90deg);
}

/* Group items */
.sidenav-group-items {
  list-style: none;
  margin: 0;
  padding: 0 0 0 var(--pro-spacing-md, 16px);
  overflow: hidden;
  max-height: 1000px;
  transition: max-height 0.2s ease, opacity 0.2s ease;
}

.sidenav-group.collapsed .sidenav-group-items {
  max-height: 0;
  opacity: 0;
}

/* Nested item styling */
.sidenav-group-items .sidenav-item {
  padding-left: var(--pro-spacing-lg, 20px);
}

/* Empty state */
.sidenav-empty {
  padding: var(--pro-spacing-lg, 20px);
  text-align: center;
  color: var(--pro-text-muted);
  font-size: var(--btn-font-md, 13px);
}

/* Scrollbar styling */
.sidenav-list::-webkit-scrollbar {
  width: 6px;
}

.sidenav-list::-webkit-scrollbar-track {
  background: transparent;
}

.sidenav-list::-webkit-scrollbar-thumb {
  background: var(--pro-border-color);
  border-radius: 3px;
}

.sidenav-list::-webkit-scrollbar-thumb:hover {
  background: var(--pro-text-muted);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .funky-sidenav > .sidenav-search-wrapper {
    padding: var(--pro-spacing-sm, 10px);
  }
  
  .sidenav-search {
    padding-left: 36px;
    font-size: 14px;
  }
  
  .sidenav-item {
    padding: var(--pro-spacing-sm, 12px) var(--pro-spacing-md, 14px);
    font-size: 14px;
  }
  
  .sidenav-group-header {
    padding: var(--pro-spacing-sm, 12px) var(--pro-spacing-md, 14px);
    font-size: 13px;
  }
  
  .sidenav-group-items .sidenav-item {
    padding-left: var(--pro-spacing-lg, 24px);
  }
}

/* Collapsed/icons-only mode */
.funky-sidenav.collapsed {
  width: 60px;
}

.funky-sidenav.collapsed .sidenav-search-wrapper,
.funky-sidenav.collapsed .sidenav-header {
  display: none;
}

.funky-sidenav.collapsed .sidenav-label,
.funky-sidenav.collapsed .sidenav-badge,
.funky-sidenav.collapsed .sidenav-chevron,
.funky-sidenav.collapsed .sidenav-group-header .sidenav-label {
  display: none;
}

.funky-sidenav.collapsed .sidenav-item,
.funky-sidenav.collapsed .sidenav-group-header {
  justify-content: center;
  padding: var(--pro-spacing-sm, 12px);
}

.funky-sidenav.collapsed .sidenav-icon {
  width: auto;
  font-size: var(--btn-font-lg, 16px);
}

.funky-sidenav.collapsed .sidenav-group-items {
  padding-left: 0;
}

.funky-sidenav.collapsed .sidenav-group-items .sidenav-item {
  padding-left: var(--pro-spacing-sm, 12px);
}

/* Touch-friendly mode */
@media (pointer: coarse) {
  .sidenav-item,
  .sidenav-group-header {
    min-height: 44px;
  }
}

/* ==========================================================================
   SideNavPanel - Content Panels
   ========================================================================== */

/* Panels container */
.sidenav-panels {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--pro-bg-primary);
}

/* Individual panel */
.sidenav-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  padding: var(--card-padding, 20px);
  background: var(--pro-bg-primary);
}

.sidenav-panel:not(.active) {
  display: none;
}

/* Fade animation */
.sidenav-panels--fade .sidenav-panel {
  transition: opacity 0.2s ease;
}

/* Slide animation */
.sidenav-panels--slide .sidenav-panel {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* No animation */
.sidenav-panels--none .sidenav-panel {
  transition: none;
}

/* Panel scrollbar styling */
.sidenav-panel::-webkit-scrollbar {
  width: 8px;
}

.sidenav-panel::-webkit-scrollbar-track {
  background: var(--pro-bg-secondary);
}

.sidenav-panel::-webkit-scrollbar-thumb {
  background: var(--pro-border-color);
  border-radius: 4px;
}

.sidenav-panel::-webkit-scrollbar-thumb:hover {
  background: var(--pro-text-muted);
}

/* ==========================================================================
   SideNavPanel Layout - Side by side
   ========================================================================== */

.sidenav-panel-layout {
  display: flex;
  height: 100%;
  overflow: hidden;
}

.sidenav-panel-layout .funky-sidenav {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--pro-border-color);
  background: var(--pro-bg-primary);
}

.sidenav-panel-layout .sidenav-panels {
  flex: 1;
  min-width: 0;
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
  .sidenav-panel-layout {
    flex-direction: column;
  }
  
  .sidenav-panel-layout .funky-sidenav {
    width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--pro-border-color);
  }
  
  .sidenav-panel-layout .sidenav-panels {
    flex: 1;
  }
  
  .sidenav-panel {
    padding: var(--pro-spacing-md, 16px);
  }
}

/* Responsive: Drawer mode on small screens */
@media (max-width: 576px) {
  .sidenav-panel-layout.drawer-mode .funky-sidenav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-height: none;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
  }
  
  .sidenav-panel-layout.drawer-mode .funky-sidenav.open {
    transform: translateX(0);
  }
  
  .sidenav-panel-layout.drawer-mode .sidenav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  
  .sidenav-panel-layout.drawer-mode .funky-sidenav.open + .sidenav-overlay {
    opacity: 1;
    visibility: visible;
  }
}


/* css/docs.css */
/**
 * Funky Documentation Browser Styles
 * Provides styling for the documentation system including
 * sidebar navigation, markdown content, and code highlighting
 * 
 * Uses Funky theme system variables (--pro-*) for consistent theming
 * across light, dark, and even-funkyer themes
 */

/* ========================================
   Prism Code Theme (theme-aware)
   ======================================== */

code[class*="language-"],
pre[class*="language-"] {
  color: var(--pro-text-primary);
  background: none;
  font-family: var(--pro-font-mono, 'SF Mono', 'Fira Code', Consolas, Monaco, monospace);
  font-size: 0.9em;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.5;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

pre[class*="language-"] {
  padding: 1em;
  margin: .5em 0;
  overflow: auto;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
  background: var(--pro-bg-elevated);
}

:not(pre) > code[class*="language-"] {
  padding: .1em;
  border-radius: .3em;
  white-space: normal;
}

.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: var(--pro-text-muted);
}

.token.punctuation {
  color: var(--pro-text-secondary);
}

.token.tag,
.token.attr-name,
.token.namespace,
.token.deleted {
  color: var(--pro-accent-primary);
}

.token.function-name {
  color: var(--pro-accent-secondary);
}

.token.boolean,
.token.number,
.token.function {
  color: var(--pro-accent-secondary);
}

.token.property,
.token.class-name,
.token.constant,
.token.symbol {
  color: var(--pro-accent-primary);
}

.token.selector,
.token.important,
.token.atrule,
.token.keyword,
.token.builtin {
  color: var(--pro-accent-secondary);
}

.token.string,
.token.char,
.token.attr-value,
.token.regex,
.token.variable {
  color: var(--pro-accent-primary);
}

.token.operator,
.token.entity,
.token.url {
  color: var(--pro-accent-secondary);
}

.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}

.token.inserted {
  color: green;
}

/* Layout - Uses .sidenav-panel-layout from sidenav.css for responsive sidebar */

.docs-browser {
  min-height: calc(100vh - 120px);
}

/* Full-page docs loader - centered at top */
.docs-page-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding-top: 4rem;
  z-index: 10;
}

.docs-page-loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 3rem;
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  border-radius: var(--pro-border-radius-lg, 8px);
  box-shadow: var(--pro-shadow-lg);
}

.docs-page-loader-content span {
  color: var(--pro-text-secondary);
  font-size: 0.9rem;
}

.docs-loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--pro-border-color);
  border-top-color: var(--pro-accent-primary);
  border-radius: 50%;
  animation: docs-spin 0.8s linear infinite;
}

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

.docs-page-loader.hidden {
  display: none;
}

/* Content area loader - centered in content panel */
.docs-content-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 2rem;
  color: var(--pro-text-secondary);
}

.docs-content-loader span {
  font-size: 0.9rem;
}

/* Legacy docs loader (kept for compatibility) */
.docs-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 1rem;
  color: var(--pro-text-muted);
  font-size: 0.875rem;
}

.docs-loader i {
  font-size: 1.5rem;
  color: var(--pro-accent-primary);
}

/* Docs-specific layout overrides for sidenav-panel-layout */
.docs-layout.sidenav-panel-layout {
  min-height: 600px;
  gap: 1.5rem;
  height: auto;
  overflow: visible;
}

.docs-layout.sidenav-panel-layout .funky-sidenav {
  width: 280px;
  padding: 1rem;
  background: var(--pro-bg-secondary);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-sm);
  border: 1px solid var(--pro-border-color);
  border-right: 1px solid var(--pro-border-color);
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 120px);
}

.docs-layout.sidenav-panel-layout .sidenav-panels {
  flex: 1;
  min-width: 0;
}

/* Page Header with Search */
.docs-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  background: var(--pro-bg-secondary);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-sm);
  border: 1px solid var(--pro-border-color);
}

.docs-header-content h1 {
  margin: 0 0 0.25rem 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--pro-text-primary);
}

.docs-header-content h1 i {
  margin-right: 0.5rem;
  color: var(--pro-accent-primary);
}

.docs-header-content p {
  margin: 0;
  color: var(--pro-text-secondary);
  font-size: 0.875rem;
}

.docs-search-wrapper {
  position: relative;
  flex: 0 0 auto;
  min-width: 220px;
  max-width: 300px;
}

.docs-search-wrapper i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pro-text-muted);
  font-size: 0.875rem;
  pointer-events: none;
}

.docs-search-wrapper input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  font-size: 0.875rem;
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  background: var(--pro-bg-secondary);
  color: var(--pro-text-primary);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.docs-search-wrapper input:focus {
  outline: none;
  border-color: var(--pro-accent-primary);
  box-shadow: var(--pro-focus-ring);
}

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

/* Legacy header support */
.docs-header {
  padding: 1rem 0;
}

.docs-header h1 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--pro-text-primary);
}

.docs-header h1 i {
  margin-right: 0.5rem;
  color: var(--pro-accent-primary);
}

.docs-header .description {
  margin: 0;
  color: var(--pro-text-secondary);
  font-size: 0.95rem;
}

/* ========================================
   Sidebar - Legacy styles for custom sidebar
   (New implementation uses sidenav-panel-layout)
   ======================================== */

.docs-sidebar {
  flex: 0 0 280px;
  min-width: 280px;
}

.docs-sidebar-inner {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 1rem;
  background: var(--pro-bg-secondary);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-sm);
  border: 1px solid var(--pro-border-color);
}

.docs-category {
  margin-bottom: 1rem;
}

.docs-category.collapsed .category-items {
  display: none;
}

.docs-category.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--pro-text-primary);
  cursor: pointer;
  border-radius: 4px;
  user-select: none;
  transition: background 0.2s ease;
}

.category-header:hover {
  background: var(--pro-bg-elevated);
}

.category-header i:first-child {
  width: 16px;
  text-align: center;
  color: var(--pro-accent-primary);
}

.category-header span {
  flex: 1;
}

.category-header .toggle-icon {
  font-size: 0.7rem;
  color: var(--pro-text-muted);
  transition: transform 0.2s ease;
}

.category-items {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.5rem;
}

.doc-item {
  margin: 2px 0;
}

.doc-item a {
  display: block;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  color: var(--pro-text-secondary);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

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

.doc-item.active a {
  color: var(--pro-accent-primary);
  background: var(--pro-accent-primary-muted);
  border-left-color: var(--pro-accent-primary);
  font-weight: 500;
}

/* ========================================
   Main Content
   ======================================== */

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

.docs-content-wrapper {
  background: var(--pro-bg-secondary);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-sm);
  border: 1px solid var(--pro-border-color);
  min-height: 500px;
}

.docs-content-inner {
  padding: 1.5rem 2rem;
}

/* Welcome Screen */
.docs-welcome {
  text-align: center;
  padding: 3rem 1rem;
}

.docs-welcome .welcome-icon {
  font-size: 4rem;
  color: var(--pro-accent-primary);
  opacity: 0.6;
  margin-bottom: 1.5rem;
}

.docs-welcome h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  color: var(--pro-text-primary);
}

.docs-welcome p {
  color: var(--pro-text-secondary);
  margin: 0 0 2rem 0;
}

.quick-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--pro-bg-elevated);
  border-radius: 8px;
  color: var(--pro-text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
  min-width: 140px;
  border: 1px solid var(--pro-border-color);
}

.quick-link:hover {
  background: var(--pro-accent-primary-muted);
  color: var(--pro-accent-primary);
  transform: translateY(-2px);
  border-color: var(--pro-accent-primary);
}

.quick-link i {
  font-size: 1.5rem;
  color: var(--pro-accent-primary);
}

.quick-link span {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Loading & Error States */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
  color: var(--pro-text-secondary);
}

.loading-spinner i {
  color: var(--pro-accent-primary);
}

.error-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
  color: var(--pro-accent-danger);
  background: var(--pro-accent-danger-muted);
  border-radius: 6px;
  margin: 1rem;
}

/* ========================================
   Markdown Content
   ======================================== */

.markdown-body {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--pro-text-primary);
}

.markdown-body h1 {
  font-size: 1.8rem;
  font-weight: 700;
  border-bottom: 2px solid var(--pro-accent-primary);
  padding-bottom: 0.5rem;
  margin: 0 0 1.5rem 0;
  color: var(--pro-text-primary);
}

.markdown-body h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 2rem 0 1rem 0;
  color: var(--pro-text-primary);
  border-bottom: 1px solid var(--pro-border-color);
  padding-bottom: 0.25rem;
}

.markdown-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem 0;
  color: var(--pro-text-primary);
}

.markdown-body h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem 0;
  color: var(--pro-text-secondary);
}

.markdown-body p {
  margin: 0 0 1rem 0;
}

.markdown-body a {
  color: var(--pro-text-link);
  text-decoration: none;
}

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

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.5rem;
  margin: 0 0 1rem 0;
}

.markdown-body li {
  margin: 0.25rem 0;
}

.markdown-body li > ul,
.markdown-body li > ol {
  margin: 0.25rem 0;
}

.markdown-body code {
  font-family: var(--pro-font-mono, 'SF Mono', 'Fira Code', 'Monaco', monospace);
  font-size: 0.85em;
  background: var(--pro-bg-elevated);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  color: var(--pro-accent-primary);
  border: 1px solid var(--pro-border-muted);
}

.markdown-body pre {
  margin: 0 0 1rem 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--pro-border-color);
}

.markdown-body pre code {
  display: block;
  padding: 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-x: auto;
  background: var(--pro-bg-elevated);
  color: var(--pro-text-primary);
  border: none;
}

.markdown-body blockquote {
  margin: 0 0 1rem 0;
  padding: 0.5rem 1rem;
  border-left: 4px solid var(--pro-accent-primary);
  background: var(--pro-bg-elevated);
  color: var(--pro-text-secondary);
}

.markdown-body blockquote p {
  margin: 0;
}

.markdown-body table,
.markdown-body .docs-table {
  width: 100%;
  margin: 0 0 1rem 0;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.markdown-body th,
.markdown-body td,
.docs-table th,
.docs-table td {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--pro-border-color);
  text-align: left;
}

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

.markdown-body tr:nth-child(even) td {
  background: var(--pro-table-row-even);
}

.markdown-body hr {
  border: none;
  border-top: 1px solid var(--pro-border-color);
  margin: 2rem 0;
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.markdown-body strong {
  font-weight: 600;
}

/* ========================================
   Responsive - Docs-specific overrides
   Relies on sidenav-panel-layout for layout responsiveness
   ======================================== */

@media (max-width: 1024px) {
  /* Override sidenav-panel-layout sticky positioning */
  .docs-layout.sidenav-panel-layout .funky-sidenav {
    position: static;
    max-height: 300px;
  }
}

@media (max-width: 768px) {
  .docs-layout.sidenav-panel-layout .funky-sidenav {
    width: 100%;
    border-radius: 8px;
    max-height: 250px;
  }
  
  .docs-content-inner {
    padding: 1rem;
  }
  
  .quick-links {
    flex-direction: column;
    align-items: center;
  }
  
  .quick-link {
    width: 100%;
    max-width: 200px;
  }
  
  .markdown-body pre code {
    font-size: 0.8rem;
  }
}

/* ========================================
   Even Funkier Theme Enhancements
   ======================================== */

[data-theme="even-funkyer"] .docs-page-header,
[data-theme="even-funkyer"] .docs-sidebar-inner,
[data-theme="even-funkyer"] .docs-content-wrapper {
  border-color: var(--pro-accent-primary);
  box-shadow: var(--pro-shadow-md);
}

[data-theme="even-funkyer"] .docs-header-content h1,
[data-theme="even-funkyer"] .docs-welcome h2,
[data-theme="even-funkyer"] .markdown-body h1 {
  background: linear-gradient(90deg, var(--pro-accent-primary), var(--pro-accent-secondary, #00ffff));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="even-funkyer"] .quick-link {
  border-color: var(--pro-accent-primary);
}

[data-theme="even-funkyer"] .quick-link:hover {
  box-shadow: var(--pro-shadow-md);
}

[data-theme="even-funkyer"] .doc-item.active a {
  box-shadow: 0 0 10px var(--pro-accent-primary-muted);
}

[data-theme="even-funkyer"] .markdown-body pre {
  border-color: var(--pro-accent-primary);
  box-shadow: var(--pro-shadow-sm);
}

[data-theme="even-funkyer"] .markdown-body blockquote {
  border-left-color: var(--pro-accent-secondary, #00ffff);
  box-shadow: inset 0 0 20px var(--pro-accent-primary-muted);
}

/* css/playground.css */
/**
 * Component Playground Styles
 * Developer testing environment for Funky components
 */

/* Main Container - 3 column layout */
.playground-container {
  display: grid;
  grid-template-columns: 240px 1fr 320px;
  height: calc(100vh - var(--header-height, 60px) - var(--nav-height-horizontal, 0px));
  gap: 0;
  background: var(--pro-bg-secondary);
}

/* Left Sidebar */
.playground-sidebar {
  background: var(--pro-bg-primary);
  border-right: 1px solid var(--pro-border-color);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.playground-section {
  padding: var(--card-padding, 16px);
  border-bottom: 1px solid var(--pro-border-color);
}

.playground-section-title {
  font-size: var(--btn-font-xs, 11px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pro-text-muted);
  margin: 0 0 var(--pro-spacing-sm, 12px) 0;
}

/* SideNav integration */
.playground-sidebar .funky-sidenav {
  flex: 1;
  min-height: 0;
  border-bottom: 1px solid var(--pro-border-color);
}

.playground-select {
  width: 100%;
  height: var(--form-control-height, 36px);
  padding: var(--form-control-padding, 8px 12px);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  background: var(--pro-bg-secondary);
  color: var(--pro-text-primary);
  font-size: var(--btn-font-md, 13px);
  cursor: pointer;
}

/* Main Canvas Area */
.playground-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Toolbar */
.playground-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--pro-spacing-sm, 12px) var(--card-padding, 16px);
  background: var(--pro-bg-primary);
  border-bottom: 1px solid var(--pro-border-color);
  gap: var(--pro-spacing-md, 16px);
}

.toolbar-left,
.toolbar-center,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--pro-spacing-xs, 8px);
}

.current-component {
  font-weight: 600;
  color: var(--pro-text-primary);
}

.viewport-controls {
  display: flex;
  background: var(--pro-bg-secondary);
  border-radius: 6px;
  padding: 2px;
}

.viewport-btn {
  padding: var(--btn-padding-sm, 6px 12px);
  border: none;
  background: transparent;
  color: var(--pro-text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
}

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

.viewport-btn.active {
  background: var(--pro-bg-elevated);
  color: var(--pro-accent-primary);
  box-shadow: var(--pro-shadow-sm);
}

.toolbar-btn {
  display: flex;
  align-items: center;
  gap: var(--pro-spacing-xs, 6px);
  height: var(--btn-height-md, 36px);
  padding: var(--btn-padding-md, 8px 12px);
  border: 1px solid var(--pro-border-color);
  background: var(--pro-bg-secondary);
  color: var(--pro-text-primary);
  border-radius: 6px;
  cursor: pointer;
  font-size: var(--btn-font-md, 13px);
  transition: all 0.15s ease;
}

.toolbar-btn:hover {
  background: var(--pro-bg-hover);
  border-color: var(--pro-accent-primary);
}

/* Canvas Wrapper */
.playground-canvas-wrapper {
  flex: 1;
  padding: var(--pro-spacing-lg, 24px);
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.playground-canvas {
  background: var(--pro-bg-primary);
  border: 1px solid var(--pro-border-color);
  border-radius: 8px;
  box-shadow: var(--pro-shadow-lg);
  overflow: hidden;
  transition: width 0.3s ease, height 0.3s ease;
  width: 100%;
  height: 100%;
}

.playground-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Viewport sizes */
.playground-canvas[data-viewport="mobile"] {
  width: 375px;
  height: 667px;
}

.playground-canvas[data-viewport="tablet"] {
  width: 768px;
  height: 600px;
}

.playground-canvas[data-viewport="desktop"] {
  width: 1280px;
  height: 600px;
}

.playground-canvas[data-viewport="full"] {
  width: 100%;
  height: 100%;
}

/* Right Panel */
.playground-panel {
  background: var(--pro-bg-primary);
  border-left: 1px solid var(--pro-border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--pro-border-color);
  padding: 0 var(--pro-spacing-xs, 8px);
}

.panel-tab {
  padding: var(--nav-item-padding, 12px 16px);
  border: none;
  background: transparent;
  color: var(--pro-text-muted);
  font-size: var(--btn-font-md, 13px);
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s ease;
}

.panel-tab:hover {
  color: var(--pro-text-primary);
}

.panel-tab.active {
  color: var(--pro-accent-primary);
  border-bottom-color: var(--pro-accent-primary);
}

.panel-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--pro-spacing-sm, 12px) var(--card-padding, 16px);
  border-bottom: 1px solid var(--pro-border-color);
  font-size: var(--btn-font-sm, 12px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pro-text-muted);
}

.panel-btn {
  padding: var(--btn-padding-xs, 4px 8px);
  border: none;
  background: transparent;
  color: var(--pro-text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.panel-btn:hover {
  background: var(--pro-bg-hover);
  color: var(--pro-text-primary);
}

/* Props Editor */
.props-editor {
  flex: 1;
  overflow-y: auto;
  padding: var(--card-padding, 16px);
}

/* Props Form - Component Configuration */
.props-form {
  display: flex;
  flex-direction: column;
  gap: var(--pro-spacing-md, 16px);
}

.prop-field {
  display: flex;
  flex-direction: column;
  gap: var(--pro-spacing-xs, 6px);
}

.prop-label {
  font-size: var(--btn-font-sm, 12px);
  font-weight: 500;
  color: var(--pro-text-secondary);
  text-transform: capitalize;
}

.prop-input,
.prop-select,
.prop-textarea {
  width: 100%;
  height: var(--form-control-height, 36px);
  padding: var(--form-control-padding, 8px 12px);
  font-size: var(--btn-font-md, 13px);
  color: var(--pro-text-primary);
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  border-radius: 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.prop-input:focus,
.prop-select:focus,
.prop-textarea:focus {
  outline: none;
  border-color: var(--pro-accent-primary);
  box-shadow: 0 0 0 3px var(--pro-accent-muted, rgba(59, 130, 246, 0.15));
}

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

.prop-input[type="number"] {
  -moz-appearance: textfield;
}

.prop-input[type="number"]::-webkit-outer-spin-button,
.prop-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.prop-select {
  cursor: pointer;
  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='%236b7280' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.prop-textarea {
  height: auto;
  min-height: calc(var(--form-control-height, 36px) * 2);
  resize: vertical;
  font-family: var(--pro-font-mono, 'Monaco', 'Consolas', monospace);
  line-height: 1.5;
}

/* Checkbox styling */
.prop-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--pro-accent-primary);
  border-radius: 4px;
}

/* Checkbox field layout - horizontal */
.prop-field:has(.prop-checkbox) {
  flex-direction: row;
  align-items: center;
  gap: var(--pro-spacing-sm, 10px);
}

.prop-field:has(.prop-checkbox) .prop-label {
  order: 2;
  margin: 0;
}

.prop-field:has(.prop-checkbox) .prop-checkbox {
  order: 1;
}

.panel-actions {
  padding: var(--pro-spacing-sm, 12px) var(--card-padding, 16px);
  border-top: 1px solid var(--pro-border-color);
}

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

/* Events Log */
.events-log {
  flex: 1;
  overflow-y: auto;
  padding: var(--pro-spacing-xs, 8px);
  font-family: var(--pro-font-mono);
  font-size: var(--btn-font-sm, 12px);
}

.event-entry {
  padding: var(--pro-spacing-xs, 8px) var(--pro-spacing-sm, 12px);
  border-radius: 6px;
  margin-bottom: var(--pro-spacing-xs, 4px);
  background: var(--pro-bg-secondary);
}

.event-entry .event-time {
  color: var(--pro-text-muted);
  margin-right: var(--pro-spacing-xs, 8px);
}

.event-entry .event-name {
  color: var(--pro-accent-primary);
  font-weight: 500;
}

.event-entry .event-data {
  color: var(--pro-text-secondary);
  margin-top: 4px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Code Example */
.code-example {
  flex: 1;
  overflow: auto;
  margin: 0;
  padding: var(--card-padding, 16px);
  background: var(--pro-bg-secondary);
  font-family: var(--pro-font-mono);
  font-size: var(--btn-font-sm, 12px);
  line-height: 1.6;
}

.code-example code {
  color: var(--pro-text-primary);
}

/* Empty State */
.empty-state {
  color: var(--pro-text-muted);
  text-align: center;
  padding: var(--pro-spacing-lg, 24px);
  font-size: var(--btn-font-md, 13px);
}

/* Responsive */
@media (max-width: 1200px) {
  .playground-container {
    grid-template-columns: 200px 1fr 280px;
  }
}

@media (max-width: 992px) {
  .playground-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }
  
  .playground-sidebar {
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid var(--pro-border-color);
    overflow-x: auto;
    max-height: 200px;
  }
  
  .playground-sidebar .funky-sidenav {
    min-width: 250px;
    border-bottom: none;
    border-right: 1px solid var(--pro-border-color);
  }
  
  .playground-section {
    border-bottom: none;
    border-right: 1px solid var(--pro-border-color);
    min-width: 200px;
  }
  
  .playground-panel {
    border-left: none;
    border-top: 1px solid var(--pro-border-color);
    max-height: 300px;
  }
}

/* Small mobile - stack everything */
@media (max-width: 576px) {
  .playground-sidebar {
    flex-direction: column;
    max-height: none;
    overflow-x: visible;
  }
  
  .playground-sidebar .funky-sidenav {
    min-width: 0;
    max-height: 250px;
    border-right: none;
    border-bottom: 1px solid var(--pro-border-color);
  }
  
  .playground-section {
    min-width: 0;
    border-right: none;
  }
}

/* css/video.css */
/**
 * Funky Video Component Styles
 * Minimal overlay controls with hover reveal
 * @version 1.0.0
 */

/* ========================================
   Container & Video Element
   ======================================== */

.funky-video {
  position: relative;
  width: 100%;
  max-width: 100%;
  background: var(--pro-bg-tertiary, #000);
  border-radius: var(--pro-border-radius, 8px);
  overflow: hidden;
  outline: none;
}

.funky-video:focus {
  box-shadow: 0 0 0 3px var(--pro-focus-ring, rgba(13, 110, 253, 0.25));
}

.funky-video-element {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ========================================
   Controls Overlay
   ======================================== */

.funky-video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.funky-video:hover .funky-video-controls,
.funky-video:focus .funky-video-controls,
.funky-video:focus-within .funky-video-controls {
  opacity: 1;
}

/* Always show controls when paused */
.funky-video.paused .funky-video-controls {
  opacity: 1;
}

/* ========================================
   Control Buttons
   ======================================== */

.funky-video-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.funky-video-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.funky-video-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.funky-video-btn:active {
  transform: scale(0.95);
}

.funky-video-play {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1rem;
}

/* ========================================
   Progress Bar
   ======================================== */

.funky-video-progress-container {
  flex: 1;
  height: 1.5rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0.5rem 0;
}

.funky-video-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
  transition: height 0.15s ease;
}

.funky-video-progress-container:hover .funky-video-progress {
  height: 6px;
}

.funky-video-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--pro-primary, #0d6efd);
  border-radius: 2px;
  transition: width 0.1s linear;
}

/* ========================================
   Time Display
   ======================================== */

.funky-video-time {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  font-family: var(--pro-font-mono, monospace);
  white-space: nowrap;
  min-width: 5rem;
  text-align: center;
}

/* ========================================
   Center Play Button Overlay (when paused)
   ======================================== */

.funky-video::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4rem;
  height: 4rem;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.funky-video::after {
  content: '\f04b';
  font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', sans-serif;
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-45%, -50%);
  font-size: 1.5rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.funky-video.paused::before,
.funky-video.paused::after {
  opacity: 1;
}

.funky-video.paused:hover::before,
.funky-video.paused:hover::after {
  opacity: 0.7;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 576px) {
  .funky-video-controls {
    gap: 0.25rem;
    padding: 0.5rem;
  }

  .funky-video-btn {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
  }

  .funky-video-play {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.875rem;
  }

  .funky-video-time {
    font-size: 0.625rem;
    min-width: 4rem;
  }

  .funky-video::before {
    width: 3rem;
    height: 3rem;
  }

  .funky-video::after {
    font-size: 1rem;
  }
}

/* ========================================
   Theme Integration
   ======================================== */

/* Dark theme adjustments */
[data-theme="dark"] .funky-video {
  background: var(--pro-bg-tertiary, #1a1a1a);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .funky-video-controls,
  .funky-video-btn,
  .funky-video-progress,
  .funky-video::before,
  .funky-video::after {
    transition: none;
  }
}

/* css/splash.css */
/**
 * Splash Page Styles
 * Styles for public-facing splash pages: About, Docs, Playground, Login
 * 
 * Uses Funky theme system variables (--pro-*) for consistent theming
 */

/* ========================================
   Smooth Scrolling for Anchor Links
   ======================================== */
html {
  scroll-behavior: smooth;
}

/* Offset for fixed header when navigating to anchors */
:target {
  scroll-margin-top: calc(var(--nav-height-horizontal, 56px) + 1rem);
}

/* ========================================
   CSS Variables - Spacing & Sizing
   Consistent values used throughout splash pages
   ======================================== */
:root {
  /* Border Radius Scale */
  --splash-radius-sm: 6px;
  --splash-radius-md: 8px;
  --splash-radius-lg: 12px;
  
  /* Spacing Scale */
  --splash-spacing-xs: 0.25rem;   /* 4px */
  --splash-spacing-sm: 0.5rem;    /* 8px */
  --splash-spacing-md: 0.75rem;   /* 12px */
  --splash-spacing-lg: 1rem;      /* 16px */
  --splash-spacing-xl: 1.5rem;    /* 24px */
  --splash-spacing-2xl: 2rem;     /* 32px */
  --splash-spacing-3xl: 3rem;     /* 48px */
  
  /* Map to pro-* variables for compatibility */
  --pro-border-radius: var(--splash-radius-md);
  --pro-border-radius-sm: var(--splash-radius-sm);
  --pro-border-radius-lg: var(--splash-radius-lg);
  
  --pro-spacing-xs: var(--splash-spacing-xs);
  --pro-spacing-sm: var(--splash-spacing-sm);
  --pro-spacing-md: var(--splash-spacing-md);
  --pro-spacing-lg: var(--splash-spacing-lg);
  --pro-spacing-xl: var(--splash-spacing-xl);
}

/* ========================================
   Shared Components
   Reusable across all splash pages
   ======================================== */

/* Top header should not be sticky in splash */
.top-header {
  position: relative;
}

/* Hero Section */
.splash-hero {
  text-align: center;
  padding: var(--splash-spacing-3xl) var(--splash-spacing-xl);
  margin-bottom: var(--splash-spacing-2xl);
  background: linear-gradient(135deg, var(--pro-bg-secondary) 0%, var(--pro-bg-primary) 100%);
  border-radius: var(--splash-radius-lg);
  border: 1px solid var(--pro-border-color);
}

.splash-hero h1 {
  font-size: var(--pro-font-size-4xl);
  font-weight: var(--pro-font-weight-bold);
  margin-bottom: var(--splash-spacing-lg);
  background: linear-gradient(135deg, var(--pro-accent-primary), var(--pro-accent-info));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.splash-hero .tagline {
  font-size: var(--pro-font-size-2xl);
  color: var(--pro-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-weight: var(--pro-font-weight-light);
  letter-spacing: 0.05em;
}

.splash-hero .tagline-sub {
  font-size: var(--pro-font-size-md);
  color: var(--pro-text-tertiary);
  max-width: 600px;
  margin: var(--splash-spacing-lg) auto 0;
}

/* Content Card */
.splash-card {
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  border-radius: var(--splash-radius-lg);
  padding: var(--splash-spacing-xl);
  margin-bottom: var(--splash-spacing-2xl);
}

/* Section */
.splash-section {
  margin-bottom: var(--splash-spacing-2xl);
  padding-top: var(--splash-spacing-lg);
}

.splash-section h2 {
  font-size: var(--pro-font-size-2xl);
  font-weight: var(--pro-font-weight-semibold);
  color: var(--pro-text-primary);
  margin-bottom: var(--splash-spacing-xl);
  padding-bottom: var(--splash-spacing-sm);
  border-bottom: 2px solid var(--pro-accent-primary);
}

.splash-section h3 {
  font-size: var(--pro-font-size-lg);
  font-weight: var(--pro-font-weight-semibold);
  color: var(--pro-text-primary);
  margin: var(--splash-spacing-xl) 0 var(--splash-spacing-md);
}

.splash-section h4 {
  font-size: var(--pro-font-size-base);
  font-weight: var(--pro-font-weight-semibold);
  color: var(--pro-text-secondary);
  margin: var(--splash-spacing-xl) 0 var(--splash-spacing-sm);
}

.splash-section p {
  margin-bottom: var(--splash-spacing-md);
  color: var(--pro-text-secondary);
  line-height: var(--pro-line-height-relaxed);
}

/* Callout */
.splash-callout {
  background: var(--pro-bg-secondary);
  border-left: 4px solid var(--pro-accent-primary);
  padding: var(--splash-spacing-md) var(--splash-spacing-lg);
  margin: var(--splash-spacing-xl) 0;
  border-radius: 0 var(--splash-radius-md) var(--splash-radius-md) 0;
}

.splash-callout.success {
  border-left-color: var(--pro-accent-success);
}

.splash-callout.warning {
  border-left-color: var(--pro-accent-warning);
}

.splash-callout.info {
  border-left-color: var(--pro-accent-info);
}

.splash-callout p {
  margin: 0;
}

/* Code Block */
.splash-pre {
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: var(--splash-radius-md);
  padding: var(--splash-spacing-md);
  overflow-x: auto;
  margin: var(--splash-spacing-md) 0;
}

.splash-pre code {
  background: none;
  padding: 0;
  color: var(--pro-text-primary);
  font-size: var(--pro-font-size-sm);
  line-height: var(--pro-line-height-normal);
  font-family: var(--pro-font-mono);
}

/* Code Syntax Highlighting */
.code-comment { color: var(--pro-text-muted); }
.code-keyword { color: var(--pro-accent-info); }
.code-string { color: var(--pro-accent-success); }
.code-function { color: var(--pro-accent-primary); }
.code-variable { color: var(--pro-accent-purple); }

/* Diagram/ASCII Art Block */
.splash-diagram {
  background: var(--pro-bg-elevated);
  border: 1px solid var(--pro-border-color);
  border-radius: var(--splash-radius-md);
  padding: var(--splash-spacing-lg);
  margin: var(--splash-spacing-lg) 0;
  overflow-x: auto;
  font-family: var(--pro-font-mono);
  font-size: var(--pro-font-size-xs);
  line-height: 1.4;
  color: var(--pro-text-secondary);
  white-space: pre;
}

/* Table */
.splash-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--splash-spacing-md) 0;
  font-size: var(--pro-font-size-sm);
}

.splash-table th,
.splash-table td {
  padding: var(--splash-spacing-sm) var(--splash-spacing-md);
  text-align: left;
  border: 1px solid var(--pro-border-color);
}

.splash-table th {
  background: var(--pro-bg-tertiary);
  font-weight: var(--pro-font-weight-semibold);
  color: var(--pro-text-primary);
}

.splash-table td {
  background: var(--pro-bg-secondary);
  color: var(--pro-text-secondary);
}

/* Grid */
.splash-grid {
  display: grid;
  gap: var(--splash-spacing-xl);
  margin: var(--splash-spacing-xl) 0;
}

.splash-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.splash-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Footer */
.splash-footer {
  text-align: center;
  padding: var(--splash-spacing-2xl) var(--splash-spacing-xl);
  border-top: 1px solid var(--pro-border-color);
  color: var(--pro-text-muted);
  font-size: var(--pro-font-size-sm);
  margin-top: var(--splash-spacing-2xl);
}

.splash-footer .quote {
  font-style: italic;
  color: var(--pro-text-secondary);
  font-size: var(--pro-font-size-base);
  margin-bottom: var(--splash-spacing-md);
}

/* ========================================
   About Page Specific
   ======================================== */

/* TOC Navigation */
.about-toc {
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  border-radius: var(--splash-radius-lg);
  padding: var(--splash-spacing-xl);
  margin-bottom: var(--splash-spacing-2xl);
}

.about-toc h2 {
  font-size: var(--pro-font-size-sm);
  color: var(--pro-text-secondary);
  margin-bottom: var(--splash-spacing-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: none;
  padding-bottom: 0;
}

.about-toc-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--splash-spacing-sm);
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-toc-list a {
  color: var(--pro-accent-info);
  text-decoration: none;
  font-size: var(--pro-font-size-sm);
  padding: var(--splash-spacing-xs) 0;
  display: block;
  transition: color 0.2s;
}

.about-toc-list a:hover {
  color: var(--pro-accent-primary);
}

/* Principles Cards */
.about-principles {
  display: grid;
  gap: var(--splash-spacing-xl);
  margin: var(--splash-spacing-xl) 0;
  overflow: hidden;
}

.about-principle {
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  border-radius: var(--splash-radius-lg);
  padding: var(--splash-spacing-xl);
  overflow: hidden;
  min-width: 0;
  margin-bottom: var(--splash-spacing-xl);
}

/* Remove bottom margin when inside a grid (gap handles spacing) */
.about-principles .about-principle {
  margin-bottom: 0;
}

.about-principle h4 {
  color: var(--pro-accent-primary);
  margin-top: 0;
  margin-bottom: var(--splash-spacing-md);
}

/* Comparison Boxes */
.about-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--splash-spacing-md);
  margin-bottom: var(--splash-spacing-xl);
}

.about-comparison-box {
  background: var(--pro-bg-secondary);
  border: 1px solid var(--pro-border-color);
  border-radius: var(--splash-radius-md);
  padding: var(--splash-spacing-md);
}

.about-comparison-box.bad {
  border-color: var(--pro-accent-danger);
}

.about-comparison-box.good {
  border-color: var(--pro-accent-success);
}

.about-comparison-box h5 {
  font-size: var(--pro-font-size-sm);
  margin-bottom: var(--splash-spacing-sm);
}

.about-comparison-box.bad h5 {
  color: var(--pro-accent-danger);
}

.about-comparison-box.good h5 {
  color: var(--pro-accent-success);
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
  .splash-hero h1 {
    font-size: var(--pro-font-size-2xl);
  }
  
  .splash-hero .tagline {
    font-size: var(--pro-font-size-base);
  }
  
  .about-comparison {
    grid-template-columns: 1fr;
  }
  
  .splash-diagram {
    font-size: 0.65rem;
  }
  
  /* Reset horizontal nav items to vertical on mobile */
  [data-nav-position="top"] .nav-group,
  [data-nav-position="bottom"] .nav-group,
  [data-nav-position="top"] .nav-standalone,
  [data-nav-position="bottom"] .nav-standalone {
    position: relative;
    flex-direction: column;
    width: 100%;
  }
}

/* css/themes.css */
/* ============================================
   THEMES.CSS - Professional Theme System
   Three themes: Dark (default), Light, Even Funkier
   ============================================ */

/* ============================================
   TYPOGRAPHY VARIABLES
   ============================================ */
:root {
  /* Font Families */
  --pro-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --pro-font-mono: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', Consolas, monospace;
  
  /* Font Sizes - Typographic Scale */
  --pro-font-size-xs: 0.75rem;    /* 12px */
  --pro-font-size-sm: 0.875rem;   /* 14px */
  --pro-font-size-base: 1rem;     /* 16px */
  --pro-font-size-lg: 1.125rem;   /* 18px */
  --pro-font-size-xl: 1.25rem;    /* 20px */
  --pro-font-size-2xl: 1.5rem;    /* 24px */
  --pro-font-size-3xl: 1.875rem;  /* 30px */
  --pro-font-size-4xl: 2.25rem;   /* 36px */
  
  /* Font Weights */
  --pro-font-weight-light: 300;
  --pro-font-weight-normal: 400;
  --pro-font-weight-medium: 500;
  --pro-font-weight-semibold: 600;
  --pro-font-weight-bold: 700;
  
  /* Line Heights */
  --pro-line-height-tight: 1.25;
  --pro-line-height-normal: 1.5;
  --pro-line-height-relaxed: 1.75;
  
  /* Letter Spacing */
  --pro-tracking-tight: -0.025em;
  --pro-tracking-normal: 0;
  --pro-tracking-wide: 0.025em;
}

/* ============================================
   DARK THEME (Default) - Bloomberg/GitHub Dark Style
   ============================================ */
:root,
[data-theme="dark"],
[data-theme="funky"] {
  /* Background Colors - User overrides take precedence */
  --pro-bg-primary: var(--user-bg-primary, #0d1117);
  --pro-bg-secondary: var(--user-bg-secondary, #161b22);
  --pro-bg-tertiary: var(--user-bg-tertiary, #21262d);
  --pro-bg-elevated: var(--user-bg-elevated, #2d333b);
  --pro-bg-overlay: rgba(0, 0, 0, 0.5);
  
  /* Font scale - User override */
  font-size: calc(16px * var(--user-font-scale, 1));
  
  /* Border Colors - User overrides take precedence */
  --pro-border-color: var(--user-border-color, #30363d);
  --pro-border-muted: var(--user-border-muted, #21262d);
  --pro-border-emphasis: var(--user-border-emphasis, #484f58);
  
  /* Text Colors - with user override support */
  --pro-text-primary: var(--user-text-primary, #e6edf3);
  --pro-text-secondary: var(--user-text-secondary, #8b949e);
  --pro-text-muted: #6e7681;
  --pro-text-link: var(--user-link-color, #58a6ff);
  --pro-text-link-hover: var(--user-link-hover, #79b8ff);
  --pro-text-inverse: #0d1117;
  
  /* Accent Colors - Professional Blue (Bloomberg style) - User accent overrides */
  --pro-accent-primary: var(--user-accent, #2f81f7);
  --pro-accent-primary-hover: var(--user-accent-hover, #388bfd);
  --pro-accent-primary-muted: rgba(47, 129, 247, 0.15);
  
  /* Semantic Colors */
  --pro-accent-success: #3fb950;
  --pro-accent-success-muted: rgba(63, 185, 80, 0.15);
  --pro-accent-success-bg: #1e4d2b;
  --pro-accent-success-text: #d4edda;
  --pro-accent-warning: #d29922;
  --pro-accent-warning-muted: rgba(210, 153, 34, 0.15);
  --pro-accent-warning-bg: #664d03;
  --pro-accent-warning-text: #fff3cd;
  --pro-accent-warning-alt: #fd7e14;
  --pro-accent-warning-alt-bg: #3d2a1f;
  --pro-accent-danger: #f85149;
  --pro-accent-danger-muted: rgba(248, 81, 73, 0.15);
  --pro-accent-danger-bg: #5c1f1f;
  --pro-accent-danger-text: #f8d7da;
  --pro-accent-info: #58a6ff;
  --pro-accent-info-muted: rgba(88, 166, 255, 0.15);
  --pro-accent-info-bg: #0c4a6e;
  --pro-accent-info-text: #cfe2ff;
  --pro-accent-purple: #a78bfa;
  --pro-accent-purple-muted: rgba(139, 92, 246, 0.15);
  --pro-accent-purple-bg: #4c1d95;
  --pro-accent-purple-text: #c4b5fd;
  
  /* Legacy Variable Mappings (for backwards compatibility) */
  --dark-bg: var(--pro-bg-primary);
  --darker-bg: var(--pro-bg-secondary);
  --card-bg: var(--pro-bg-tertiary);
  --border-color: var(--pro-border-color);
  --text-primary: var(--pro-text-primary);
  --text-secondary: var(--pro-text-secondary);
  
  /* Shadow Colors */
  --pro-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --pro-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
  --pro-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --pro-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  
  /* Focus Ring */
  --pro-focus-ring: 0 0 0 3px rgba(47, 129, 247, 0.4);
  
  /* Table Colors */
  --pro-table-row-even: var(--pro-bg-secondary);
  --pro-table-row-odd: var(--pro-bg-primary);
  --pro-table-row-hover: var(--pro-bg-tertiary);
  --pro-table-header-bg: var(--pro-bg-tertiary);
}

/* ============================================
   LIGHT THEME - Clean Professional Style
   ============================================ */
[data-theme="light"] {
  /* Background Colors - User overrides take precedence */
  --pro-bg-primary: var(--user-bg-primary, #ffffff);
  --pro-bg-secondary: var(--user-bg-secondary, #f6f8fa);
  --pro-bg-tertiary: var(--user-bg-tertiary, #eaeef2);
  --pro-bg-elevated: var(--user-bg-elevated, #ffffff);
  --pro-bg-overlay: rgba(0, 0, 0, 0.3);
  
  /* Border Colors - User overrides take precedence */
  --pro-border-color: var(--user-border-color, #d0d7de);
  --pro-border-muted: var(--user-border-muted, #e6e8eb);
  --pro-border-emphasis: var(--user-border-emphasis, #8c959f);
  
  /* Text Colors - with user override support */
  --pro-text-primary: var(--user-text-primary, #1f2328);
  --pro-text-secondary: var(--user-text-secondary, #656d76);
  --pro-text-muted: #8c959f;
  --pro-text-link: var(--user-link-color, #0969da);
  --pro-text-link-hover: var(--user-link-hover, #0550ae);
  --pro-text-inverse: #ffffff;
  
  /* Accent Colors - Professional Blue - User accent overrides */
  --pro-accent-primary: var(--user-accent, #0969da);
  --pro-accent-primary-hover: var(--user-accent-hover, #0550ae);
  --pro-accent-primary-muted: rgba(9, 105, 218, 0.1);
  
  /* Semantic Colors */
  --pro-accent-success: #1a7f37;
  --pro-accent-success-muted: rgba(26, 127, 55, 0.1);
  --pro-accent-success-bg: #dafbe1;
  --pro-accent-success-text: #116329;
  --pro-accent-warning: #9a6700;
  --pro-accent-warning-muted: rgba(154, 103, 0, 0.1);
  --pro-accent-warning-bg: #fff8c5;
  --pro-accent-warning-text: #4d2d00;
  --pro-accent-warning-alt: #bf8700;
  --pro-accent-warning-alt-bg: #fff1d2;
  --pro-accent-danger: #cf222e;
  --pro-accent-danger-muted: rgba(207, 34, 46, 0.1);
  --pro-accent-danger-bg: #ffebe9;
  --pro-accent-danger-text: #82071e;
  --pro-accent-info: #0969da;
  --pro-accent-info-muted: rgba(9, 105, 218, 0.1);
  --pro-accent-info-bg: #ddf4ff;
  --pro-accent-info-text: #0550ae;
  --pro-accent-purple: #8250df;
  --pro-accent-purple-muted: rgba(130, 80, 223, 0.1);
  --pro-accent-purple-bg: #fbefff;
  --pro-accent-purple-text: #6639ba;
  
  /* Legacy Variable Mappings */
  --dark-bg: var(--pro-bg-primary);
  --darker-bg: var(--pro-bg-secondary);
  --card-bg: var(--pro-bg-tertiary);
  --border-color: var(--pro-border-color);
  --text-primary: var(--pro-text-primary);
  --text-secondary: var(--pro-text-secondary);
  
  /* Shadow Colors */
  --pro-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --pro-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
  --pro-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --pro-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
  
  /* Focus Ring */
  --pro-focus-ring: 0 0 0 3px rgba(9, 105, 218, 0.3);
  
  /* Table Colors */
  --pro-table-row-even: var(--pro-bg-secondary);
  --pro-table-row-odd: var(--pro-bg-primary);
  --pro-table-row-hover: var(--pro-bg-tertiary);
  --pro-table-header-bg: var(--pro-bg-tertiary);
}

/* Light Theme Overrides for Gradient Elements */
[data-theme="light"] .sidebar-header {
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--user-accent-hover, var(--pro-accent-primary-hover)));
}

[data-theme="light"] .page-title {
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--user-accent-hover, var(--pro-accent-primary-hover)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   EVEN FUNKIER THEME - Variable Aliases
   The full theme is in even-funkyer.css, these are
   compatibility mappings for new --pro-* variables
   ============================================ */
[data-theme="even-funkyer"] {
  /* Map --pro-* variables to Even Funkier equivalents - User overrides take precedence */
  --pro-bg-primary: var(--user-bg-primary, var(--bg-color, #0a0015));
  --pro-bg-secondary: var(--user-bg-secondary, #1a0033);
  --pro-bg-tertiary: var(--user-bg-tertiary, #150026);
  --pro-bg-elevated: var(--user-bg-elevated, #200040);
  --pro-bg-overlay: rgba(10, 0, 21, 0.8);
  
  /* Border Colors - User overrides take precedence */
  --pro-border-color: var(--user-border-color, var(--border-color, #ff00ff));
  --pro-border-muted: var(--user-border-muted, rgba(255, 0, 255, 0.3));
  --pro-border-emphasis: var(--user-border-emphasis, #ff33ff);
  
  /* Text Colors - with user override support */
  --pro-text-primary: var(--user-text-primary, var(--text-color, #ffffff));
  --pro-text-secondary: var(--user-text-secondary, var(--text-muted, #cc99ff));
  --pro-text-muted: var(--text-secondary, #99ccff);
  --pro-text-link: var(--user-link-color, #00ffff);
  --pro-text-link-hover: var(--user-link-hover, #33ffff);
  --pro-text-inverse: #0a0015;
  
  /* Accent Colors - User accent blends with neon theme */
  --pro-accent-primary: var(--user-accent, var(--primary-color, #ff00ff));
  --pro-accent-primary-hover: var(--user-accent-hover, var(--primary-hover, #ff33ff));
  --pro-accent-primary-muted: rgba(255, 0, 255, 0.2);
  
  /* Secondary accent (cyan) for active/selected states */
  --pro-accent-secondary: var(--secondary-color, #00ffff);
  --pro-accent-secondary-hover: #33ffff;
  --pro-accent-secondary-muted: rgba(0, 255, 255, 0.15);
  
  --pro-accent-success: var(--success-color, #00ff00);
  --pro-accent-success-muted: rgba(0, 255, 0, 0.2);
  --pro-accent-success-bg: rgba(0, 255, 0, 0.15);
  --pro-accent-success-text: #66ff66;
  --pro-accent-warning: var(--warning-color, #ffaa00);
  --pro-accent-warning-muted: rgba(255, 170, 0, 0.2);
  --pro-accent-warning-bg: rgba(255, 170, 0, 0.15);
  --pro-accent-warning-text: #ffcc66;
  --pro-accent-warning-alt: #ff6600;
  --pro-accent-warning-alt-bg: rgba(255, 102, 0, 0.15);
  --pro-accent-danger: var(--danger-color, #ff0066);
  --pro-accent-danger-muted: rgba(255, 0, 102, 0.2);
  --pro-accent-danger-bg: rgba(255, 0, 102, 0.15);
  --pro-accent-danger-text: #ff6699;
  --pro-accent-info: var(--info-color, #00ccff);
  --pro-accent-info-muted: rgba(0, 204, 255, 0.2);
  --pro-accent-info-bg: rgba(0, 204, 255, 0.15);
  --pro-accent-info-text: #66ddff;
  --pro-accent-purple: #8800ff;
  --pro-accent-purple-muted: rgba(136, 0, 255, 0.2);
  --pro-accent-purple-bg: rgba(136, 0, 255, 0.15);
  --pro-accent-purple-text: #bb66ff;
  
  --pro-shadow-sm: 0 0 10px rgba(255, 0, 255, 0.2);
  --pro-shadow-md: 0 0 20px rgba(255, 0, 255, 0.3);
  --pro-shadow-lg: 0 0 30px rgba(255, 0, 255, 0.4), 0 0 60px rgba(0, 255, 255, 0.2);
  --pro-shadow-xl: 0 0 40px rgba(255, 0, 255, 0.5), 0 0 80px rgba(0, 255, 255, 0.3);
  
  --pro-focus-ring: 0 0 0 3px rgba(255, 0, 255, 0.5), 0 0 15px rgba(0, 255, 255, 0.3);
  
  --pro-table-row-even: rgba(26, 0, 51, 0.8);
  --pro-table-row-odd: rgba(10, 0, 21, 0.8);
  --pro-table-row-hover: rgba(255, 0, 255, 0.1);
  --pro-table-header-bg: rgba(32, 0, 64, 0.9);
}

/* Show funky-card accent bar only in even-funkyer theme */
[data-theme="even-funkyer"] .funky-card::before {
  display: block;
  background: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff);
  background-size: 200% 100%;
  animation: funky-gradient 3s ease infinite;
}

@keyframes funky-gradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ============================================
   THEME SWITCHER
   ============================================ */
.theme-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 15px;
  background: linear-gradient(135deg, var(--user-accent, var(--pro-accent-primary)), var(--primary-dark));
  border: 2px solid var(--user-accent, var(--pro-accent-primary));
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(255, 110, 30, 0.3);
}

.theme-switcher:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 4px 16px rgba(255, 110, 30, 0.5);
}

.theme-switcher:active {
  transform: scale(0.95);
}

.theme-icon {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.3s ease;
}

.theme-switcher:hover .theme-icon {
  transform: rotate(180deg);
}

button#themeSwitcher {
  margin: 0;
}

/* Animated record for Even Funkyer mode */
[data-theme="even-funkyer"] .theme-switcher {
  animation: recordSpin 2s linear infinite, recordColorFlash 1s ease-in-out infinite;
  background: linear-gradient(135deg, #ff00ff, #00ffff, #ffff00);
  background-size: 300% 300%;
  border-color: #ff00ff;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.6), 0 0 40px rgba(0, 255, 255, 0.4);
}

[data-theme="even-funkyer"] .theme-switcher:hover {
  animation: recordSpin 0.5s linear infinite, recordColorFlash 0.5s ease-in-out infinite;
  transform: scale(1.2);
}

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

@keyframes recordColorFlash {
  0%, 100% {
    background-position: 0% 50%;
    filter: hue-rotate(0deg) brightness(1);
  }
  50% {
    background-position: 100% 50%;
    filter: hue-rotate(180deg) brightness(1.3);
  }
}

/* Theme transition animation */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

* {
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

/* ============================================
   ACCESSIBILITY - Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   ACCESSIBILITY - Focus Visible Styles
   ============================================ */
:focus-visible {
  outline: 2px solid var(--user-accent, var(--pro-accent-primary));
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--user-accent, var(--pro-accent-primary));
  outline-offset: 2px;
  box-shadow: var(--pro-focus-ring);
}

/* Remove default focus outline when using focus-visible */
:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================
   BASE TYPOGRAPHY STYLES
   ============================================ */
body {
  font-family: var(--pro-font-family);
  font-size: var(--pro-font-size-base);
  font-weight: var(--pro-font-weight-normal);
  line-height: var(--pro-line-height-normal);
  color: var(--pro-text-primary);
  background-color: var(--pro-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Utility class for monospace/tabular numbers */
.font-mono,
.tabular-nums {
  font-family: var(--pro-font-mono);
  font-variant-numeric: tabular-nums;
}

/* Heading styles */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--pro-font-family);
  font-weight: var(--pro-font-weight-semibold);
  line-height: var(--pro-line-height-tight);
  color: var(--pro-text-primary);
  letter-spacing: var(--pro-tracking-tight);
}

h1 { font-size: var(--pro-font-size-4xl); }
h2 { font-size: var(--pro-font-size-3xl); }
h3 { font-size: var(--pro-font-size-2xl); }
h4 { font-size: var(--pro-font-size-xl); }
h5 { font-size: var(--pro-font-size-lg); }
h6 { font-size: var(--pro-font-size-base); }

/* ============================================
   CSS RESET & BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

/* ============================================
   ANIMATED BACKGROUND - Dark Theme (Subtle)
   ============================================ */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(47, 129, 247, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(88, 166, 255, 0.05) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

/* Hide animated background in light theme */
[data-theme="light"] body::before,
html[data-theme="light"] body::before {
  opacity: 0 !important;
  display: none;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--pro-bg-secondary);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--user-accent, var(--pro-accent-primary));
}

/* ============================================
   NAV TABS - Theme-aware Tab Styling
   ============================================ */
.nav-tabs {
  border-bottom: 1px solid var(--pro-border-color);
  gap: 4px;
}

.nav-tabs .nav-item {
  margin-bottom: -1px;
}

.nav-tabs .nav-link {
  color: var(--pro-text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px 6px 0 0;
  padding: 10px 16px;
  font-weight: 500;
  font-size: var(--pro-font-size-sm);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tabs .nav-link i {
  font-size: 0.9em;
  opacity: 0.8;
}

.nav-tabs .nav-link:hover {
  color: var(--pro-text-primary);
  background: var(--pro-bg-tertiary);
  border-color: var(--pro-border-muted) var(--pro-border-muted) transparent;
}

.nav-tabs .nav-link:focus-visible {
  outline: none;
  box-shadow: var(--pro-focus-ring);
}

.nav-tabs .nav-link.active {
  color: var(--user-accent, var(--pro-accent-primary));
  background: var(--pro-bg-primary);
  border-color: var(--pro-border-color) var(--pro-border-color) var(--pro-bg-primary);
  font-weight: 600;
}

.nav-tabs .nav-link.active i {
  opacity: 1;
}

/* Dark Theme Specific */
[data-theme="dark"] .nav-tabs .nav-link.active,
:root .nav-tabs .nav-link.active {
  background: var(--pro-bg-secondary);
  border-color: var(--pro-border-color) var(--pro-border-color) var(--pro-bg-secondary);
}

/* Light Theme Specific */
[data-theme="light"] .nav-tabs {
  border-bottom-color: var(--pro-border-color);
}

[data-theme="light"] .nav-tabs .nav-link {
  color: var(--pro-text-secondary);
}

[data-theme="light"] .nav-tabs .nav-link:hover {
  color: var(--pro-text-primary);
  background: var(--pro-bg-tertiary);
}

[data-theme="light"] .nav-tabs .nav-link.active {
  color: var(--user-accent, var(--pro-accent-primary));
  background: var(--pro-bg-primary);
  border-color: var(--pro-border-color) var(--pro-border-color) var(--pro-bg-primary);
}

/* Even Funkyer Theme - Neon Glow Tabs */
[data-theme="even-funkyer"] .nav-tabs {
  border-bottom-color: rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] .nav-tabs .nav-link {
  color: var(--pro-text-secondary);
  border-color: transparent;
}

[data-theme="even-funkyer"] .nav-tabs .nav-link:hover {
  color: #00ffff;
  background: rgba(255, 0, 255, 0.1);
  border-color: rgba(255, 0, 255, 0.3) rgba(255, 0, 255, 0.3) transparent;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

[data-theme="even-funkyer"] .nav-tabs .nav-link.active {
  color: #ff00ff;
  background: var(--pro-bg-secondary);
  border-color: rgba(255, 0, 255, 0.5) rgba(255, 0, 255, 0.5) var(--pro-bg-secondary);
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.8);
  box-shadow: 0 -2px 10px rgba(255, 0, 255, 0.3);
}

[data-theme="even-funkyer"] .nav-tabs .nav-link.active i {
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.8);
  color: #00ffff;
}

/* ============================================
   LOADING SPINNER (Global)
   ============================================ */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--user-accent-muted, var(--pro-accent-primary-muted));
  border-top-color: var(--user-accent, var(--pro-accent-primary));
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ============================================
   DENSITY SETTINGS
   Adjusts spacing, button heights, and padding
   ============================================ */

/* Compact: Tighter spacing for data-heavy views */
[data-density="compact"] {
  --btn-height-xs: 20px;
  --btn-height-sm: 24px;
  --btn-height-md: 30px;
  --btn-height-lg: 38px;
  --btn-padding-xs: 2px 6px;
  --btn-padding-sm: 4px 8px;
  --btn-padding-md: 6px 12px;
  --btn-padding-lg: 8px 16px;
  --btn-font-xs: 10px;
  --btn-font-sm: 11px;
  --btn-font-md: 12px;
  --btn-font-lg: 13px;
  --pro-spacing-xs: 4px;
  --pro-spacing-sm: 8px;
  --pro-spacing-md: 12px;
  --pro-spacing-lg: 16px;
  --form-control-height: 30px;
  --form-control-padding: 4px 8px;
  --table-cell-padding: 6px 8px;
  --nav-item-padding: 6px 10px;
  --card-padding: 12px;
}

/* Comfortable: Default balanced spacing */
[data-density="comfortable"] {
  --btn-height-xs: 24px;
  --btn-height-sm: 28px;
  --btn-height-md: 36px;
  --btn-height-lg: 44px;
  --btn-padding-xs: 4px 8px;
  --btn-padding-sm: 6px 12px;
  --btn-padding-md: 8px 16px;
  --btn-padding-lg: 12px 24px;
  --btn-font-xs: 11px;
  --btn-font-sm: 12px;
  --btn-font-md: 13px;
  --btn-font-lg: 14px;
  --pro-spacing-xs: 6px;
  --pro-spacing-sm: 12px;
  --pro-spacing-md: 16px;
  --pro-spacing-lg: 24px;
  --form-control-height: 38px;
  --form-control-padding: 8px 12px;
  --table-cell-padding: 10px 12px;
  --nav-item-padding: 10px 14px;
  --card-padding: 16px;
}

/* Spacious: More room for accessibility */
[data-density="spacious"] {
  --btn-height-xs: 28px;
  --btn-height-sm: 34px;
  --btn-height-md: 42px;
  --btn-height-lg: 52px;
  --btn-padding-xs: 6px 10px;
  --btn-padding-sm: 8px 14px;
  --btn-padding-md: 10px 20px;
  --btn-padding-lg: 14px 28px;
  --btn-font-xs: 12px;
  --btn-font-sm: 13px;
  --btn-font-md: 14px;
  --btn-font-lg: 16px;
  --pro-spacing-xs: 8px;
  --pro-spacing-sm: 16px;
  --pro-spacing-md: 24px;
  --pro-spacing-lg: 32px;
  --form-control-height: 46px;
  --form-control-padding: 12px 16px;
  --table-cell-padding: 14px 16px;
  --nav-item-padding: 14px 18px;
  --card-padding: 24px;
}

/* ============================================
   DENSITY COMPONENT OVERRIDES
   Direct styles for components affected by density
   ============================================ */

/* Form Controls */
[data-density] .form-control,
[data-density] .form-select {
  height: var(--form-control-height);
  padding: var(--form-control-padding);
}

[data-density] textarea.form-control {
  height: auto;
  min-height: calc(var(--form-control-height) * 2);
}

/* Buttons - ensure they use the density variables */
[data-density] .btn {
  height: var(--btn-height-md);
  padding: var(--btn-padding-md);
}

[data-density] .btn-sm {
  height: var(--btn-height-sm);
  padding: var(--btn-padding-sm);
}

[data-density] .btn-lg {
  height: var(--btn-height-lg);
  padding: var(--btn-padding-lg);
}

/* Table Cells */
[data-density] .table td,
[data-density] .table th {
  padding: var(--table-cell-padding);
}

/* DataTables */
[data-density] table.dataTable td,
[data-density] table.dataTable th {
  padding: var(--table-cell-padding);
}

/* Navigation Items */
[data-density] .nav-link {
  padding: var(--nav-item-padding);
}

[data-density] .nav-group-items .nav-link {
  padding: var(--nav-item-padding);
}

/* Cards */
[data-density] .card-body {
  padding: var(--card-padding);
}

[data-density] .card-header,
[data-density] .card-footer {
  padding: calc(var(--card-padding) * 0.75) var(--card-padding);
}

/* Dropdowns */
[data-density] .dropdown-item {
  padding: var(--nav-item-padding);
}

/* List Groups */
[data-density] .list-group-item {
  padding: var(--nav-item-padding);
}

/* Funky Buttons - ensure they use density variables */
[data-density] .btn-funky,
[data-density] .btn-funky-primary,
[data-density] .btn-funky-secondary,
[data-density] .btn-funky-warning,
[data-density] .btn-funky-danger,
[data-density] .btn-funky-success,
[data-density] .btn-funky-outline,
[data-density] .btn-format-rules {
  height: var(--btn-height-md);
  padding: var(--btn-padding-md);
  font-size: var(--btn-font-md, 13px);
}

[data-density] .btn-funky.btn-sm,
[data-density] .btn-funky-primary.btn-sm,
[data-density] .btn-funky-secondary.btn-sm,
[data-density] .btn-funky-warning.btn-sm,
[data-density] .btn-funky-danger.btn-sm,
[data-density] .btn-funky-success.btn-sm {
  height: var(--btn-height-sm);
  padding: var(--btn-padding-sm);
  font-size: var(--btn-font-sm, 12px);
}

[data-density] .btn-funky.btn-lg,
[data-density] .btn-funky-primary.btn-lg,
[data-density] .btn-funky-secondary.btn-lg,
[data-density] .btn-funky-warning.btn-lg,
[data-density] .btn-funky-danger.btn-lg,
[data-density] .btn-funky-success.btn-lg {
  height: var(--btn-height-lg);
  padding: var(--btn-padding-lg);
  font-size: var(--btn-font-lg, 15px);
}

/* Header Actions with density */
[data-density] .funky-header-actions {
  gap: var(--pro-spacing-sm);
  margin-bottom: var(--pro-spacing-md);
}

[data-density] .funky-header-actions .funky-search-box input,
[data-density] .funky-header-actions .form-control,
[data-density] .funky-header-actions .form-select {
  height: var(--btn-height-md);
}

[data-density] .funky-header-actions .select2-container .select2-selection {
  height: var(--btn-height-md) !important;
  min-height: var(--btn-height-md) !important;
}

