/* ============================================
   EventCos Design System - Token Definitions
   Version: 1.0.0
   Last Updated: 2025-01-06
   ============================================ */

:root {
  /* ==========================================
     Brand Colors - Türkis Palette
     ========================================== */
  --brand-primary-400: #2dd4bf;      /* Helles Türkis */
  --brand-primary-500: #14b8a6;      /* Primäres Türkis (Hauptfarbe) */
  --brand-primary-600: #0d9488;      /* Dunkles Türkis (Hauptaktion) */
  --brand-primary-700: #0f766e;      /* Sehr dunkles Türkis */
  --brand-primary-800: #115e59;      /* Extra dunkles Türkis */

  /* Neutral Grays */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --gray-950: #0f172a;

  /* Status Colors */
  --color-success: #10b981;          /* Emerald-500 */
  --color-success-dark: #059669;     /* Emerald-600 */
  --color-success-light: #34d399;    /* Emerald-400 */

  --color-warning: #f59e0b;          /* Amber-500 */
  --color-warning-dark: #d97706;     /* Amber-600 */
  --color-warning-light: #fbbf24;    /* Amber-400 */

  --color-error: #ef4444;            /* Red-500 */
  --color-error-dark: #dc2626;       /* Red-600 */
  --color-error-light: #f87171;      /* Red-400 */

  --color-info: #06b6d4;             /* Cyan-500 */
  --color-info-dark: #0891b2;        /* Cyan-600 */
  --color-info-light: #22d3ee;       /* Cyan-400 */

  /* ==========================================
     Semantic Colors - Light Mode
     ========================================== */

  /* Primary & Accent Colors - Unified System */
  --color-primary: #14b8a6;          /* Türkis (Hauptfarbe für Links, Icons) */
  --color-primary-hover: #0d9488;    /* Dunkles Türkis (Hover) */
  --color-primary-light: #2dd4bf;    /* Helles Türkis (Highlights) */
  --color-primary-bg: #ccfbf1;       /* Türkis Background (sehr hell) */

  --color-accent: #f59e0b;           /* Amber (CTAs, wichtige Aktionen) */
  --color-accent-hover: #d97706;     /* Dunkles Amber (Hover) */
  --color-accent-light: #fbbf24;     /* Helles Amber */
  --color-accent-bg: #fef3c7;        /* Amber Background (sehr hell) */

  /* Backgrounds */
  --bg-primary: #ffffff;             /* Weiß (Haupthintergrund) */
  --bg-secondary: #f8fafc;           /* Sehr helles Grau (Sekundärer Bereich) */
  --bg-tertiary: #f1f5f9;            /* Helles Grau (Tertiärer Bereich) */
  --bg-elevated: #ffffff;            /* Weiß (Erhöhte Karten/Modals) */
  --bg-overlay: rgba(0, 0, 0, 0.5);  /* Overlay für Modals */

  /* Text Colors */
  --text-primary: #0f172a;           /* Sehr dunkles Grau (Haupttext) */
  --text-secondary: #475569;         /* Dunkles Grau (Sekundärtext) */
  --text-tertiary: #64748b;          /* Mittelgrau (Tertiärtext) */
  --text-muted: #94a3b8;             /* Helles Grau (Gedämpfter Text) */
  --text-inverse: #ffffff;           /* Weiß (Inverse Text auf dunklem Hintergrund) */

  /* Links */
  --text-link: var(--color-primary);              /* Türkis (Links) */
  --text-link-hover: var(--color-primary-hover);  /* Dunkles Türkis (Links Hover) */
  --text-link-visited: #115e59;                   /* Extra dunkles Türkis (Besuchte Links) */

  /* Borders */
  --border-primary: #e2e8f0;         /* Helles Grau (Primäre Umrandung) */
  --border-secondary: #cbd5e1;       /* Mittelgrau (Sekundäre Umrandung) */
  --border-strong: #94a3b8;          /* Dunkles Grau (Starke Umrandung) */
  --border-focus: var(--color-primary);           /* Türkis (Focus Ring) */

  /* Interactive States */
  --state-hover: #f1f5f9;            /* Hover-Zustand */
  --state-active: #e2e8f0;           /* Active-Zustand */
  --state-focus: var(--color-primary-bg);         /* Focus-Zustand (Türkis Tint) */
  --state-disabled-bg: #f1f5f9;      /* Disabled Background */
  --state-disabled-text: #94a3b8;    /* Disabled Text */

  /* ==========================================
     Typography
     ========================================== */

  /* Font Families - Locally Hosted (no external connections) */
  --font-heading: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "Consolas", "Monaco", "Liberation Mono", "Courier New", monospace;

  /* Font Sizes (Fluid Typography mit clamp()) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.15vw, 0.813rem);       /* 12px → 13px */
  --text-sm: clamp(0.875rem, 0.82rem + 0.2vw, 0.938rem);      /* 14px → 15px */
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.063rem);       /* 16px → 17px */
  --text-lg: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);       /* 18px → 20px */
  --text-xl: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);         /* 20px → 24px */
  --text-2xl: clamp(1.5rem, 1.35rem + 0.6vw, 1.875rem);       /* 24px → 30px */
  --text-3xl: clamp(1.875rem, 1.65rem + 0.9vw, 2.25rem);      /* 30px → 36px */
  --text-4xl: clamp(2.25rem, 1.95rem + 1.2vw, 3rem);          /* 36px → 48px */
  --text-5xl: clamp(3rem, 2.5rem + 2vw, 4rem);                /* 48px → 64px */

  /* Font Weights */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ==========================================
     Spacing Scale (0.25rem = 4px basis)
     ========================================== */
  --space-0: 0;
  --space-px: 1px;
  --space-0_5: 0.125rem;    /* 2px */
  --space-1: 0.25rem;       /* 4px */
  --space-1_5: 0.375rem;    /* 6px */
  --space-2: 0.5rem;        /* 8px */
  --space-2_5: 0.625rem;    /* 10px */
  --space-3: 0.75rem;       /* 12px */
  --space-3_5: 0.875rem;    /* 14px */
  --space-4: 1rem;          /* 16px */
  --space-5: 1.25rem;       /* 20px */
  --space-6: 1.5rem;        /* 24px */
  --space-7: 1.75rem;       /* 28px */
  --space-8: 2rem;          /* 32px */
  --space-9: 2.25rem;       /* 36px */
  --space-10: 2.5rem;       /* 40px */
  --space-11: 2.75rem;      /* 44px */
  --space-12: 3rem;         /* 48px */
  --space-14: 3.5rem;       /* 56px */
  --space-16: 4rem;         /* 64px */
  --space-20: 5rem;         /* 80px */
  --space-24: 6rem;         /* 96px */
  --space-28: 7rem;         /* 112px */
  --space-32: 8rem;         /* 128px */

  /* ==========================================
     Border Radius
     ========================================== */
  --radius-none: 0;
  --radius-sm: 0.125rem;    /* 2px */
  --radius-base: 0.25rem;   /* 4px */
  --radius-md: 0.375rem;    /* 6px */
  --radius-lg: 0.5rem;      /* 8px */
  --radius-xl: 0.75rem;     /* 12px */
  --radius-2xl: 1rem;       /* 16px */
  --radius-3xl: 1.5rem;     /* 24px */
  --radius-full: 9999px;    /* Vollständig rund */

  /* ==========================================
     Shadows
     ========================================== */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-2xl: 0 35px 60px -15px rgba(0, 0, 0, 0.3);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  --shadow-none: 0 0 #0000;

  /* Focus Shadows (Türkis) */
  --shadow-focus: 0 0 0 3px rgba(20, 184, 166, 0.1);
  --shadow-focus-strong: 0 0 0 3px rgba(20, 184, 166, 0.2);

  /* ==========================================
     Transitions & Easing
     ========================================== */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* ==========================================
     Z-Index Scale
     ========================================== */
  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-offcanvas: 1045;
  --z-modal-backdrop: 1050;
  --z-modal: 1055;
  --z-popover: 1070;
  --z-tooltip: 1080;
  --z-toast: 1090;

  /* ==========================================
     Portal Variables (Light Mode)
     Für Dropdowns, Tooltips, Popovers, Context Menus
     ========================================== */
  --portal-bg: #ffffff;
  --portal-bg-hover: #f5f5f5;
  --portal-bg-active: #e6f7ff;
  --portal-text: #262626;
  --portal-text-secondary: #595959;
  --portal-text-muted: #8c8c8c;
  --portal-border: #d9d9d9;
  --portal-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08),
                   0 3px 6px -4px rgba(0, 0, 0, 0.12),
                   0 9px 28px 8px rgba(0, 0, 0, 0.05);
}

/* ==========================================
   Dark Mode - Vollständiger Dark Mode
   ========================================== */
[data-theme="dark"] {
  /* Primary & Accent Colors bleiben gleich */
  --color-primary: #2dd4bf;          /* Helles Türkis für Dark Mode */
  --color-primary-hover: #5eead4;    /* Sehr helles Türkis */
  --color-primary-light: #99f6e4;    /* Extra helles Türkis */
  --color-primary-bg: rgba(45, 212, 191, 0.1);

  --color-accent: #fbbf24;           /* Helles Amber */
  --color-accent-hover: #fcd34d;     /* Sehr helles Amber */
  --color-accent-light: #fde68a;     /* Extra helles Amber */
  --color-accent-bg: rgba(251, 191, 36, 0.1);

  /* Dark Backgrounds */
  --bg-primary: #0f172a;             /* Sehr dunkel (Haupthintergrund) */
  --bg-secondary: #1e293b;           /* Dunkelgrau (Sekundärer Bereich) */
  --bg-tertiary: #334155;            /* Mittelgrau (Tertiärer Bereich) */
  --bg-elevated: #1e293b;            /* Dunkelgrau (Erhöhte Karten/Modals) */
  --bg-overlay: rgba(0, 0, 0, 0.7);  /* Dunkles Overlay */

  /* Dark Text Colors */
  --text-primary: #f8fafc;           /* Sehr hell (Haupttext) */
  --text-secondary: #cbd5e1;         /* Hell (Sekundärtext) */
  --text-tertiary: #94a3b8;          /* Mittelgrau (Tertiärtext) */
  --text-muted: #64748b;             /* Gedämpfter Text */
  --text-inverse: #0f172a;           /* Dunkel (Inverse Text auf hellem Hintergrund) */

  /* Dark Links */
  --text-link: var(--color-primary);              /* Helles Türkis */
  --text-link-hover: var(--color-primary-hover);  /* Sehr helles Türkis */
  --text-link-visited: #5eead4;                   /* Sehr helles Türkis */

  /* Dark Borders */
  --border-primary: #334155;         /* Dunkelgrau */
  --border-secondary: #475569;       /* Mittelgrau */
  --border-strong: #64748b;          /* Helleres Grau */
  --border-focus: var(--color-primary);

  /* Dark Interactive States */
  --state-hover: #1e293b;            /* Hover */
  --state-active: #334155;           /* Active */
  --state-focus: rgba(45, 212, 191, 0.15);  /* Focus (Türkis Tint) */
  --state-disabled-bg: #1e293b;      /* Disabled Background */
  --state-disabled-text: #64748b;    /* Disabled Text */

  /* Component-specific Dark (für Navbar, Sidebar, etc.) */
  --component-bg-dark: #1a1a1a;      /* Extra dunkel für Komponenten */
  --component-bg-darker: #0a0a0a;    /* Sehr dunkel für Dropdowns */
  --component-bg-elevated: #262626;  /* Erhöhte Komponenten */
  --component-border-dark: rgba(255, 255, 255, 0.08);
  --component-text-primary: #f5f5f5;
  --component-text-secondary: #d4d4d4;
  --component-text-muted: #a3a3a3;
  --component-link: var(--color-primary);
  --component-link-hover: var(--color-primary-hover);
  --component-hover: rgba(255, 255, 255, 0.05);
  --component-active: rgba(255, 255, 255, 0.1);

  /* Dark Shadows (subtiler) */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.4);
  --shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  --shadow-2xl: 0 35px 60px -15px rgba(0, 0, 0, 0.8);

  /* Dark Portal Variables */
  --portal-bg: #1f1f1f;
  --portal-bg-hover: #2d2d2d;
  --portal-bg-active: rgba(24, 144, 255, 0.15);
  --portal-text: #f5f5f5;
  --portal-text-secondary: #d9d9d9;
  --portal-text-muted: #8c8c8c;
  --portal-border: #424242;
  --portal-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.32),
                   0 3px 6px -4px rgba(0, 0, 0, 0.48),
                   0 9px 28px 8px rgba(0, 0, 0, 0.2);
}

/* ============================================================================
   GLOBAL PORTAL COMPONENTS - Dropdowns, Tooltips, Popovers, Context Menus
   Diese Komponenten werden außerhalb des normalen DOM-Baums (in body) gerendert
   und benötigen explizites Theming basierend auf dem data-theme Attribut
   ============================================================================ */

/* Ant Design Dropdown / Select Dropdown */
.ant-dropdown,
.ant-select-dropdown,
.ant-picker-dropdown,
.ant-cascader-dropdown {
  background-color: var(--portal-bg) !important;
  border: 1px solid var(--portal-border) !important;
  box-shadow: var(--portal-shadow) !important;
  border-radius: 8px !important;
}

.ant-dropdown-menu {
  background-color: var(--portal-bg) !important;
  border: none !important;
  box-shadow: none !important;
}

.ant-dropdown-menu-item,
.ant-dropdown-menu-submenu-title {
  color: var(--portal-text) !important;
  background-color: transparent !important;
}

.ant-dropdown-menu-item:hover,
.ant-dropdown-menu-submenu-title:hover {
  background-color: var(--portal-bg-hover) !important;
}

.ant-dropdown-menu-item-active,
.ant-dropdown-menu-item-selected {
  background-color: var(--portal-bg-active) !important;
}

.ant-dropdown-menu-item-disabled {
  color: var(--portal-text-muted) !important;
  cursor: not-allowed;
}

/* Select Dropdown Items */
.ant-select-item {
  color: var(--portal-text) !important;
  background-color: transparent !important;
}

.ant-select-item:hover,
.ant-select-item-option-active {
  background-color: var(--portal-bg-hover) !important;
}

.ant-select-item-option-selected {
  background-color: var(--portal-bg-active) !important;
  font-weight: 600;
}

.ant-select-item-option-disabled {
  color: var(--portal-text-muted) !important;
}

/* DatePicker / TimePicker Panel */
.ant-picker-panel {
  background-color: var(--portal-bg) !important;
  border-color: var(--portal-border) !important;
}

.ant-picker-header {
  color: var(--portal-text) !important;
  border-color: var(--portal-border) !important;
}

.ant-picker-header button {
  color: var(--portal-text-secondary) !important;
}

.ant-picker-header button:hover {
  color: var(--portal-text) !important;
}

.ant-picker-content th,
.ant-picker-content td {
  color: var(--portal-text) !important;
}

.ant-picker-cell {
  color: var(--portal-text-secondary) !important;
}

.ant-picker-cell:hover .ant-picker-cell-inner {
  background-color: var(--portal-bg-hover) !important;
}

.ant-picker-cell-selected .ant-picker-cell-inner {
  background-color: #1890ff !important;
  color: #fff !important;
}

.ant-picker-cell-today .ant-picker-cell-inner::before {
  border-color: #1890ff !important;
}

.ant-picker-footer {
  border-color: var(--portal-border) !important;
}

/* ============================================================================
   ANT DESIGN TOOLTIP - GLOBALE STYLES (Theme-Aware)
   Light Mode: Weißer Hintergrund, Dark Mode: Dunkler Hintergrund
   Nutzt --portal-* CSS Variablen für automatische Theme-Anpassung
   ============================================================================ */

/* Tooltip Container - Theme-aware Pfeilfarbe */
.ant-tooltip {
  --antd-arrow-background-color: var(--portal-bg) !important;
}

/* Tooltip Inner - Theme-aware Farben */
.ant-tooltip .ant-tooltip-inner,
.ant-tooltip-inner,
.ant-tooltip-content .ant-tooltip-inner {
  background-color: var(--portal-bg) !important;
  background: var(--portal-bg) !important;
  color: var(--portal-text) !important;
  border: 1px solid var(--portal-border) !important;
  box-shadow: var(--portal-shadow) !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  padding: 8px 12px !important;
  max-width: 320px !important;
  line-height: 1.5 !important;
}

/* Tooltip Arrow - Pfeil muss gleiche Farbe haben */
.ant-tooltip .ant-tooltip-arrow::before,
.ant-tooltip .ant-tooltip-arrow::after,
.ant-tooltip-arrow::before,
.ant-tooltip-arrow::after,
.ant-tooltip-arrow-content {
  background-color: var(--portal-bg) !important;
  background: var(--portal-bg) !important;
  border-color: var(--portal-bg) !important;
}

/* CSS Custom Property Override für Ant Design v5/v6 */
.ant-tooltip,
.ant-tooltip-content {
  --ant-tooltip-bg: var(--portal-bg) !important;
  --ant-tooltip-color: var(--portal-text) !important;
}

/* Ant Design Popover */
.ant-popover .ant-popover-inner {
  background-color: var(--portal-bg) !important;
  box-shadow: var(--portal-shadow) !important;
  border: 1px solid var(--portal-border) !important;
}

.ant-popover .ant-popover-title {
  color: var(--portal-text) !important;
  border-bottom-color: var(--portal-border) !important;
}

.ant-popover .ant-popover-inner-content {
  color: var(--portal-text) !important;
}

.ant-popover .ant-popover-arrow::before {
  background-color: var(--portal-bg) !important;
}

/* Ant Design Popconfirm */
.ant-popconfirm .ant-popconfirm-message {
  color: var(--portal-text) !important;
}

.ant-popconfirm .ant-popconfirm-description {
  color: var(--portal-text-secondary) !important;
}

/* Ant Design Modal */
.ant-modal .ant-modal-content {
  background-color: var(--portal-bg) !important;
  box-shadow: var(--portal-shadow) !important;
}

.ant-modal .ant-modal-header {
  background-color: var(--portal-bg) !important;
  border-bottom-color: var(--portal-border) !important;
}

.ant-modal .ant-modal-title {
  color: var(--portal-text) !important;
}

.ant-modal .ant-modal-body {
  color: var(--portal-text) !important;
}

.ant-modal .ant-modal-footer {
  background-color: var(--portal-bg) !important;
  border-top-color: var(--portal-border) !important;
}

.ant-modal .ant-modal-close {
  color: var(--portal-text-secondary) !important;
}

.ant-modal .ant-modal-close:hover {
  color: var(--portal-text) !important;
}

.ant-modal-mask {
  background-color: rgba(0, 0, 0, 0.45) !important;
}

[data-theme="dark"] .ant-modal-mask {
  background-color: rgba(0, 0, 0, 0.65) !important;
}

/* Ant Design Drawer */
.ant-drawer .ant-drawer-content {
  background-color: var(--portal-bg) !important;
}

.ant-drawer .ant-drawer-header {
  background-color: var(--portal-bg) !important;
  border-bottom-color: var(--portal-border) !important;
}

.ant-drawer .ant-drawer-title {
  color: var(--portal-text) !important;
}

.ant-drawer .ant-drawer-body {
  color: var(--portal-text) !important;
}

.ant-drawer .ant-drawer-footer {
  background-color: var(--portal-bg) !important;
  border-top-color: var(--portal-border) !important;
}

.ant-drawer .ant-drawer-close {
  color: var(--portal-text-secondary) !important;
}

.ant-drawer .ant-drawer-close:hover {
  color: var(--portal-text) !important;
}

/* Ant Design Message / Notification */
.ant-message .ant-message-notice-content {
  background-color: var(--portal-bg) !important;
  color: var(--portal-text) !important;
  box-shadow: var(--portal-shadow) !important;
  border: 1px solid var(--portal-border) !important;
}

.ant-notification .ant-notification-notice {
  background-color: var(--portal-bg) !important;
  box-shadow: var(--portal-shadow) !important;
  border: 1px solid var(--portal-border) !important;
}

.ant-notification .ant-notification-notice-message {
  color: var(--portal-text) !important;
}

.ant-notification .ant-notification-notice-description {
  color: var(--portal-text-secondary) !important;
}

.ant-notification .ant-notification-notice-close {
  color: var(--portal-text-secondary) !important;
}

.ant-notification .ant-notification-notice-close:hover {
  color: var(--portal-text) !important;
}

/* Mobiscroll Popups (Context Menu, Tooltip, etc.) */
.mbsc-popup,
.mbsc-popup-body {
  background-color: var(--portal-bg) !important;
  color: var(--portal-text) !important;
  border: 1px solid var(--portal-border) !important;
  box-shadow: var(--portal-shadow) !important;
}

.mbsc-popup-header {
  background-color: var(--portal-bg) !important;
  color: var(--portal-text) !important;
  border-bottom-color: var(--portal-border) !important;
}

.mbsc-popup-content {
  color: var(--portal-text) !important;
}

.mbsc-popup-buttons {
  background-color: var(--portal-bg) !important;
  border-top-color: var(--portal-border) !important;
}

/* Mobiscroll Menu Items */
.mbsc-menu,
.mbsc-menu-item {
  background-color: var(--portal-bg) !important;
  color: var(--portal-text) !important;
}

.mbsc-menu-item:hover {
  background-color: var(--portal-bg-hover) !important;
}

.mbsc-menu-item.mbsc-active,
.mbsc-menu-item.mbsc-selected {
  background-color: var(--portal-bg-active) !important;
}

/* Mobiscroll Event Tooltip */
.mbsc-schedule-event-tooltip,
.mbsc-eventcalendar-tooltip {
  background-color: var(--portal-bg) !important;
  color: var(--portal-text) !important;
  border: 1px solid var(--portal-border) !important;
  box-shadow: var(--portal-shadow) !important;
}

/* Generic Context Menu Styling */
[role="menu"],
[role="listbox"] {
  background-color: var(--portal-bg) !important;
  border: 1px solid var(--portal-border) !important;
  box-shadow: var(--portal-shadow) !important;
  border-radius: 8px !important;
}

[role="menuitem"],
[role="option"] {
  color: var(--portal-text) !important;
}

[role="menuitem"]:hover,
[role="menuitem"]:focus,
[role="option"]:hover,
[role="option"]:focus {
  background-color: var(--portal-bg-hover) !important;
}

[role="menuitem"][aria-selected="true"],
[role="menuitem"][aria-checked="true"],
[role="option"][aria-selected="true"],
[role="option"][aria-checked="true"] {
  background-color: var(--portal-bg-active) !important;
}

[role="menuitem"][aria-disabled="true"],
[role="option"][aria-disabled="true"] {
  color: var(--portal-text-muted) !important;
  cursor: not-allowed;
}

/* Form Inputs in Portals */
.ant-select-dropdown .ant-input,
.ant-picker-dropdown .ant-input,
.ant-cascader-dropdown .ant-input,
.ant-select-dropdown .ant-input-affix-wrapper,
.ant-picker-dropdown .ant-input-affix-wrapper,
.ant-cascader-dropdown .ant-input-affix-wrapper {
  background-color: var(--portal-bg) !important;
  border-color: var(--portal-border) !important;
  color: var(--portal-text) !important;
}

.ant-select-dropdown .ant-input::placeholder,
.ant-picker-dropdown .ant-input::placeholder,
.ant-cascader-dropdown .ant-input::placeholder {
  color: var(--portal-text-muted) !important;
}

.ant-select-dropdown .ant-input:hover,
.ant-picker-dropdown .ant-input:hover,
.ant-cascader-dropdown .ant-input:hover,
.ant-select-dropdown .ant-input-affix-wrapper:hover,
.ant-picker-dropdown .ant-input-affix-wrapper:hover,
.ant-cascader-dropdown .ant-input-affix-wrapper:hover {
  border-color: #40a9ff !important;
}

.ant-select-dropdown .ant-input:focus,
.ant-picker-dropdown .ant-input:focus,
.ant-cascader-dropdown .ant-input:focus,
.ant-select-dropdown .ant-input-affix-wrapper:focus,
.ant-picker-dropdown .ant-input-affix-wrapper:focus,
.ant-cascader-dropdown .ant-input-affix-wrapper:focus {
  border-color: #40a9ff !important;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2) !important;
}

/* ============================================================================
   SIDEBAR MENU - STRIPE-STYLE CLEAN DESIGN
   Minimales Design ohne Umrandungen - klar und modern
   ============================================================================ */

/* Sidebar Container - Kein Border, sauberer Hintergrund */
.ant-layout-sider,
.ant-pro-sider,
[class*="sidebar"],
[class*="Sidebar"],
aside[role="complementary"] {
  background: var(--bg-primary) !important;
  border: none !important;
  border-right: none !important;
  box-shadow: none !important;
}

[data-theme="dark"] .ant-layout-sider,
[data-theme="dark"] .ant-pro-sider,
[data-theme="dark"] [class*="sidebar"],
[data-theme="dark"] [class*="Sidebar"],
[data-theme="dark"] aside[role="complementary"] {
  background: #0f1117 !important;
  border: none !important;
  border-right: none !important;
}

/* Menu Container - Komplett transparent */
.ant-menu,
[role="menu"] {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Menu Items - Base: Sauber und minimal */
.ant-menu-item,
.ant-menu-submenu-title,
[role="menuitem"] {
  margin: 1px 0 !important;
  padding: 8px 16px !important;
  border: none !important;
  border-radius: 0 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: var(--text-secondary) !important;
  background: transparent !important;
  transition: color 0.15s ease, background-color 0.15s ease !important;
}

[data-theme="dark"] .ant-menu-item,
[data-theme="dark"] .ant-menu-submenu-title,
[data-theme="dark"] [role="menuitem"] {
  color: #a1a1aa !important;
}

/* Menu Items - Hover: Dezent */
.ant-menu-item:hover,
.ant-menu-submenu-title:hover,
[role="menuitem"]:hover {
  background-color: rgba(0, 0, 0, 0.04) !important;
  color: var(--text-primary) !important;
  border: none !important;
}

[data-theme="dark"] .ant-menu-item:hover,
[data-theme="dark"] .ant-menu-submenu-title:hover,
[data-theme="dark"] [role="menuitem"]:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: #f4f4f5 !important;
}

/* Menu Items - Active/Selected: Nur Textfarbe, kein Border */
.ant-menu-item-selected,
.ant-menu-item-active,
.ant-menu-item.active,
[role="menuitem"][aria-selected="true"],
[role="menuitem"].active {
  background-color: transparent !important;
  color: var(--color-primary) !important;
  font-weight: 500 !important;
  border: none !important;
  border-left: none !important;
  margin-left: 0 !important;
}

[data-theme="dark"] .ant-menu-item-selected,
[data-theme="dark"] .ant-menu-item-active,
[data-theme="dark"] .ant-menu-item.active,
[data-theme="dark"] [role="menuitem"][aria-selected="true"],
[data-theme="dark"] [role="menuitem"].active {
  background-color: transparent !important;
  color: #2dd4bf !important;
  border: none !important;
}

/* Submenu Container */
.ant-menu-submenu > .ant-menu,
[role="menu"][aria-hidden="false"] {
  background: transparent !important;
  padding-left: 0 !important;
  border: none !important;
}

/* Submenu Items - Eingerückt */
.ant-menu-submenu .ant-menu-item,
[role="menu"] [role="menuitem"] {
  padding-left: 32px !important;
  font-size: 13px !important;
  border: none !important;
}

/* Menu Icons - Dezent */
.ant-menu-item .anticon,
.ant-menu-submenu-title .anticon,
[role="menuitem"] svg,
[role="menuitem"] i {
  font-size: 15px !important;
  width: 18px !important;
  min-width: 18px !important;
  opacity: 0.6 !important;
  margin-right: 10px !important;
}

.ant-menu-item:hover .anticon,
.ant-menu-submenu-title:hover .anticon,
[role="menuitem"]:hover svg,
[role="menuitem"]:hover i,
.ant-menu-item-selected .anticon,
[role="menuitem"][aria-selected="true"] svg {
  opacity: 1 !important;
}

/* Expand Arrow - Klein und dezent */
.ant-menu-submenu-arrow,
[role="menuitem"][aria-expanded] .ant-menu-submenu-arrow {
  color: var(--text-muted) !important;
  font-size: 10px !important;
  opacity: 0.5 !important;
}

/* ============================================================================
   HELP ICON STYLES (? und ! Icons mit Tooltips)
   Umrandete Icons für Erklärungstexte
   ============================================================================ */

/* Question Circle und Info Circle Icons */
.anticon-question-circle,
.anticon-info-circle,
.anticon-exclamation-circle,
[class*="question-circle"],
[class*="info-circle"],
span[aria-label="question-circle"],
span[aria-label="info-circle"] {
  color: var(--text-muted) !important;
  font-size: 14px !important;
  cursor: help !important;
  transition: all 0.2s ease !important;
  opacity: 0.7 !important;
  margin-left: 4px !important;
  vertical-align: middle !important;
}

.anticon-question-circle:hover,
.anticon-info-circle:hover,
.anticon-exclamation-circle:hover,
[class*="question-circle"]:hover,
[class*="info-circle"]:hover,
span[aria-label="question-circle"]:hover,
span[aria-label="info-circle"]:hover {
  color: var(--color-primary) !important;
  opacity: 1 !important;
  transform: scale(1.1) !important;
}

[data-theme="dark"] .anticon-question-circle,
[data-theme="dark"] .anticon-info-circle,
[data-theme="dark"] .anticon-exclamation-circle,
[data-theme="dark"] [class*="question-circle"],
[data-theme="dark"] [class*="info-circle"],
[data-theme="dark"] span[aria-label="question-circle"],
[data-theme="dark"] span[aria-label="info-circle"] {
  color: #94a3b8 !important;
}

[data-theme="dark"] .anticon-question-circle:hover,
[data-theme="dark"] .anticon-info-circle:hover,
[data-theme="dark"] .anticon-exclamation-circle:hover,
[data-theme="dark"] [class*="question-circle"]:hover,
[data-theme="dark"] [class*="info-circle"]:hover,
[data-theme="dark"] span[aria-label="question-circle"]:hover,
[data-theme="dark"] span[aria-label="info-circle"]:hover {
  color: #2dd4bf !important;
}

/* Umrandete Help Icons (für spezielle Fälle) */
.help-icon-bordered,
.info-icon-bordered {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  border: 1.5px solid currentColor !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
  cursor: help !important;
  transition: all 0.2s ease !important;
}

.help-icon-bordered:hover,
.info-icon-bordered:hover {
  border-color: var(--color-primary) !important;
  color: var(--color-primary) !important;
  background-color: var(--color-primary-bg) !important;
}

[data-theme="dark"] .help-icon-bordered,
[data-theme="dark"] .info-icon-bordered {
  color: #94a3b8 !important;
}

[data-theme="dark"] .help-icon-bordered:hover,
[data-theme="dark"] .info-icon-bordered:hover {
  border-color: #2dd4bf !important;
  color: #2dd4bf !important;
  background-color: rgba(45, 212, 191, 0.1) !important;
}

/* Form Label Help Icons - Bessere Positionierung */
.ant-form-item-label .anticon-question-circle,
.ant-form-item-label .anticon-info-circle,
label .anticon-question-circle,
label .anticon-info-circle {
  margin-left: 6px !important;
  font-size: 13px !important;
}
