/* =============================================================================
   LEADO Kinetic Curator — APEX Theme Override
   =============================================================================
   Überschreibt das APEX Universal Theme mit dem Kinetic Curator Design System.

   Einbindung in APEX:
     Shared Components > User Interface Attributes > CSS > File URLs:
     #APP_FILES#leado-kinetic.css
   ============================================================================= */

   @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&family=Manrope:wght@400;500;600;700&display=swap');

   /* ── Design Tokens als CSS Variables ──────────────────────────────────────── */
   
   :root {
    --ld-brand: #4546e7;
    --ld-brand-dark: #7848a7;
     --ld-brand-light: #eef0ff;
     --ld-brand-rgb: 69, 70, 231;
   
     --ld-hell-violett: #CC99FF;
     --ld-dunkel-violett: #d8d8ff;
     --ld-secondary-container: #f0dbff;
     --ld-hell-blau: #6DB6E5;
     --ld-hell-tuerkis: #99FFCC;
     --ld-dunkel-tuerkis: #b1f1e8;
     --ld-rosa: #ffede9;
     --ld-hell-grau: #f2f6f9;
     --ld-dunkel-grau: #dfe8ee;
   
    --ld-surface: #f6fafd;
    --ld-surf-low: #eff4f8;
    --ld-surf-high: #dae4ea;
   
     --ld-on-surface: #2a3438;
     --ld-on-surface-var: #576165;
     --ld-outline-var: #aab3b9;
   
     --ld-success: #34D399;
     --ld-success-bg: #94fac7;
     --ld-warning: #F59E0B;
     --ld-warning-bg: #fff3d0;
     --ld-danger: #f76a80;
     --ld-danger-bg: #ffe0e5;
   
   --ld-ring:       0 0 0 1px rgba(69, 70, 231, 0.10);
   --ld-ring-sm:    0 0 0 1px rgba(69, 70, 231, 0.07);
   --ld-shadow:     0px 8px 28px rgba(69, 70, 231, 0.12), var(--ld-ring);
   --ld-shadow-sm:  0px 3px 14px rgba(69, 70, 231, 0.09), var(--ld-ring-sm);
    --ld-radius: 16px;
    --ld-radius-lg: 20px;
    --ld-radius-btn: 24px;
    --ld-grad: linear-gradient(135deg, #4546e7, #7848a7);
   }
   
  /* ── Global Reset & Base ──────────────────────────────────────────────────── */

  /* Verhindert weissen Browser-Flash beim Seitenwechsel */
  html {
    background: #f6fafd !important;
  }

  body {
    font-family: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    background: var(--ld-surface) !important;
    color: var(--ld-on-surface) !important;
  }

  /* ── Page Transition ─────────────────────────────────────────────────────── */

  @keyframes ld-page-fadein {
    from {
      opacity: 0;
      transform: translateY(5px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .t-Body-main {
    animation: ld-page-fadein 0.18s ease forwards;
  }

  /* Fade-out Zustand kurz vor Navigation (via JS gesetzt) */
  .ld-page-leaving .t-Body-main {
    opacity: 0;
    transform: translateY(-3px);
    transition: opacity 0.1s ease, transform 0.1s ease;
    pointer-events: none;
  }
   
   /* ══════════════════════════════════════════════════════════════════════════
      Lead Engine Sidebar — #ld-sidebar (injiziert direkt in document.body)
      Kein Konflikt mit APEX's widget.treeView.js oder leftSideCol()
      ══════════════════════════════════════════════════════════════════════════ */

  /* ── Sidebar Container ───────────────────────────────────────────────────── */

  #ld-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    z-index: 9999;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(75, 77, 237, 0.08);
    transition: width 0.22s ease;
    overflow: hidden;
    font-family: 'Manrope', sans-serif;
  }

  /* ── Logo / Branding ─────────────────────────────────────────────────────── */

  .ldsb-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 16px 16px;
    background: linear-gradient(135deg, var(--ld-brand), var(--ld-hell-violett));
    flex-shrink: 0;
    position: relative;
  }

  .ldsb-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
    font-size: 14px;
  }

  .ldsb-logo-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
    white-space: nowrap;
    flex: 1;
  }

  .ldsb-toggle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 10px;
    flex-shrink: 0;
    transition: background 0.15s ease;
  }

  .ldsb-toggle:hover {
    background: rgba(255, 255, 255, 0.35);
  }

  /* ── Nav Container ───────────────────────────────────────────────────────── */

  .ldsb-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
  }

  /* ── Section Labels ──────────────────────────────────────────────────────── */

  .ldsb-section {
    pointer-events: none;
    user-select: none;
    margin-top: 6px;
  }

  .ldsb-section-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: var(--ld-brand);
    letter-spacing: 1.8px;
    text-transform: uppercase;
    padding: 14px 18px 5px;
    opacity: 0.65;
  }

  /* ── Nav Items: native <a> Tags — Browser-Navigation ohne JS-Overhead ────── */

  .ldsb-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: calc(100% - 16px) !important;
    margin: 2px 8px !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    color: var(--ld-on-surface-var) !important;
    font-family: 'Manrope', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    background: transparent !important;
    min-height: 40px !important;
    box-sizing: border-box !important;
  }

  .ldsb-item:hover {
    background: var(--ld-surf-low) !important;
    color: var(--ld-on-surface) !important;
    text-decoration: none !important;
  }

  .ldsb-item:hover .ldsb-icon {
    color: var(--ld-brand) !important;
    opacity: 1 !important;
  }

  .ldsb-item--active {
    background: var(--ld-grad) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 3px 10px rgba(75, 77, 237, 0.18) !important;
  }

  .ldsb-item--active .ldsb-icon,
  .ldsb-item--active .ldsb-label {
    color: #ffffff !important;
    opacity: 1 !important;
  }

  .ldsb-item--active:hover {
    background: var(--ld-grad) !important;
    color: #ffffff !important;
  }

  /* ── Icon + Label ────────────────────────────────────────────────────────── */

  .ldsb-icon {
    width: 18px !important;
    min-width: 18px !important;
    font-size: 13px !important;
    text-align: center !important;
    color: var(--ld-on-surface-var) !important;
    opacity: 0.7 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .ldsb-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
  }

  /* ── Spacer ──────────────────────────────────────────────────────────────── */

  .ldsb-spacer {
    flex: 1;
    min-height: 8px;
  }

  /* ── Admin Panel ─────────────────────────────────────────────────────────── */

  .ldsb-admin {
    flex-shrink: 0;
    padding: 0 10px 14px;
    box-shadow: 0 -1px 0 rgba(69, 70, 231, 0.08);
  }

  .ldsb-admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px 8px;
  }

  .ldsb-admin-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    background: var(--ld-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
  }

  .ldsb-admin-info {
    overflow: hidden;
    flex: 1;
  }

  .ldsb-admin-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--ld-on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ldsb-admin-role {
    font-size: 10px;
    color: var(--ld-on-surface-var);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ldsb-logout {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px 0;
    border-radius: 24px;
    border: none;
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626 !important;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none !important;
    box-sizing: border-box;
  }

  .ldsb-logout:hover {
    background: rgba(220, 38, 38, 0.15) !important;
    text-decoration: none !important;
    color: #dc2626 !important;
  }

  /* ── Impersonation Banner ─────────────────────────────────────────────────── */

  .ldsb-impersonate {
    flex-shrink: 0;
    padding: 12px 12px 10px;
    background: linear-gradient(135deg, rgba(75, 77, 237, 0.08), rgba(204, 153, 255, 0.08));
  }

  .ldsb-imp-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
  }

  .ldsb-imp-icon {
    font-size: 11px;
    color: var(--ld-brand);
    opacity: 0.8;
  }

  .ldsb-imp-title {
    font-size: 10px;
    font-weight: 800;
    color: var(--ld-brand);
    letter-spacing: 0.8px;
    text-transform: uppercase;
  }

  .ldsb-imp-select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 12px;
    border: none;
    background: #ffffff;
    color: var(--ld-on-surface);
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(75, 77, 237, 0.10);
    cursor: pointer;
    appearance: auto;
    margin-bottom: 8px;
    box-sizing: border-box;
  }

  .ldsb-imp-select:hover {
    box-shadow: 0 2px 12px rgba(75, 77, 237, 0.18);
  }

  .ldsb-imp-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(75, 77, 237, 0.3), 0 2px 8px rgba(75, 77, 237, 0.12);
  }

  .ldsb-imp-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--ld-on-surface);
    padding: 2px 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ldsb-imp-back {
    display: flex !important;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 7px 12px;
    border-radius: 20px;
    background: var(--ld-brand);
    color: #ffffff !important;
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
    box-sizing: border-box;
    justify-content: center;
  }

  .ldsb-imp-back:hover {
    background: var(--ld-brand-dark) !important;
    text-decoration: none !important;
    color: #ffffff !important;
  }

  .ldsb-imp-back .fa {
    font-size: 10px;
    flex-shrink: 0;
  }

  /* ── Collapsed State ─────────────────────────────────────────────────────── */

  .ld-nav-collapsed #ld-sidebar {
    width: 64px;
  }

  .ld-nav-collapsed .ldsb-logo-text,
  .ld-nav-collapsed .ldsb-section-label,
  .ld-nav-collapsed .ldsb-label,
  .ld-nav-collapsed .ldsb-admin-info,
  .ld-nav-collapsed .ldsb-logout .ldsb-label {
    display: none !important;
  }

  .ld-nav-collapsed .ldsb-imp-title,
  .ld-nav-collapsed .ldsb-imp-select,
  .ld-nav-collapsed .ldsb-imp-name {
    display: none !important;
  }

  .ld-nav-collapsed .ldsb-impersonate {
    padding: 8px 6px;
    text-align: center;
  }

  .ld-nav-collapsed .ldsb-imp-header {
    justify-content: center;
  }

  .ld-nav-collapsed .ldsb-imp-back {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    margin: 4px auto 0;
  }

  .ld-nav-collapsed .ldsb-imp-back .ldsb-label {
    display: none !important;
  }

  .ld-nav-collapsed .ldsb-logo {
    justify-content: center;
    padding: 16px 8px;
    gap: 0;
  }

  .ld-nav-collapsed .ldsb-logo-icon {
    margin: 0;
  }

  .ld-nav-collapsed .ldsb-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
  }

  .ld-nav-collapsed .ldsb-item {
    justify-content: center !important;
    padding: 10px 0 !important;
    margin: 2px 6px !important;
    gap: 0 !important;
    width: calc(100% - 12px) !important;
  }

  .ld-nav-collapsed .ldsb-icon {
    margin: 0 !important;
    font-size: 16px !important;
    opacity: 0.8 !important;
  }

  .ld-nav-collapsed .ldsb-admin-profile {
    justify-content: center;
    padding: 8px 0;
  }

  .ld-nav-collapsed .ldsb-logout {
    width: 36px;
    height: 36px;
    margin: 0 auto;
    padding: 0;
    border-radius: 50%;
    font-size: 14px;
  }

  /* ── APEX nav + Layout komplett überschreiben ──────────────────────────── */

  #t_Body_nav,
  .t-Body-nav,
  .t-TreeNav,
  #t_TreeNav,
  .t-Body-side,
  #t_Body_side,
  .t-Body-actions,
  #t_Body_actions {
    display: none !important;
  }

  .t-Body > *:not(.t-Body-main):not(.t-Body-inlineDialogs):not(script) {
    display: none !important;
  }

  body .t-Body,
  body.t-PageBody .t-Body,
  body.t-PageBody--leftNav .t-Body,
  #t_PageBody .t-Body,
  .t-PageBody--leftNav .t-Body,
  .t-Body {
    display: block !important;
    flex-direction: unset !important;
    flex-wrap: unset !important;
    gap: 0 !important;
    column-gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
  }

  body .t-Body .t-Body-main,
  body.t-PageBody .t-Body .t-Body-main,
  body.t-PageBody--leftNav .t-Body .t-Body-main,
  body.t-PageBody--leftNav .t-Body-main,
  .t-PageBody--leftNav .t-Body-main,
  .t-Body-main {
    margin-left: 252px !important;
    padding-left: 0 !important;
    width: auto !important;
    float: none !important;
    left: 0 !important;
    position: relative !important;
    flex: unset !important;
  }

  .ld-nav-collapsed .t-Body-main,
  body.ld-nav-collapsed .t-Body .t-Body-main,
  body.ld-nav-collapsed.t-PageBody--leftNav .t-Body-main {
    margin-left: 76px !important;
  }

   /* ── APEX Navigation Override ─────────────────────────────────────────────── */
   
   .t-Body-nav,
   .t-TreeNav {
     display: none !important;
   }
   
   /* Navigation Links -- Default */
   .t-TreeNav .a-TreeView-node .a-TreeView-content .a-TreeView-label {
     font-family: 'Manrope', sans-serif !important;
     font-weight: 500 !important;
     color: var(--ld-on-surface-var) !important;
     font-size: 13px !important;
   }
   
   /* APEX TreeView Row -- Reset Default Backgrounds */
   #t_TreeNav .a-TreeView-row {
     background: transparent !important;
   }
   
   #t_TreeNav .a-TreeView-content {
     background: transparent !important;
   }
   
   /* -- Hover: APEX default schwarze Farbe überschreiben -- */
   #t_TreeNav .a-TreeView-row:hover,
   #t_TreeNav .a-TreeView-content:hover .a-TreeView-row,
   .t-TreeNav .a-TreeView-node .a-TreeView-content .a-TreeView-row:hover,
   .t-TreeNav .a-TreeView-node .a-TreeView-content:hover .a-TreeView-row {
     background: var(--ld-surf-low) !important;
     border-radius: 12px !important;
   }
   
   #t_TreeNav .a-TreeView-row:hover .a-TreeView-label,
   #t_TreeNav .a-TreeView-content:hover .a-TreeView-label,
   .t-TreeNav .a-TreeView-node .a-TreeView-row:hover .a-TreeView-label,
   .t-TreeNav .a-TreeView-node .a-TreeView-content:hover .a-TreeView-label {
     color: var(--ld-on-surface) !important;
   }
   
   /* -- Active/Selected: Gradient, kein weisser Hintergrund -- */
   #t_TreeNav .a-TreeView-node.is-selected > .a-TreeView-content,
   #t_TreeNav .a-TreeView-node.is-current > .a-TreeView-content,
   .t-TreeNav .a-TreeView-node.is-selected > .a-TreeView-content,
   .t-TreeNav .a-TreeView-node.is-current > .a-TreeView-content {
     background: var(--ld-grad) !important;
     border-radius: 12px !important;
     box-shadow: 0 3px 10px rgba(75, 77, 237, 0.16) !important;
   }
   
   #t_TreeNav .a-TreeView-node.is-selected > .a-TreeView-content .a-TreeView-row,
   #t_TreeNav .a-TreeView-node.is-current > .a-TreeView-content .a-TreeView-row,
   .t-TreeNav .a-TreeView-node.is-selected > .a-TreeView-content .a-TreeView-row,
   .t-TreeNav .a-TreeView-node.is-current > .a-TreeView-content .a-TreeView-row {
     background: transparent !important;
     box-shadow: none !important;
   }
   
   #t_TreeNav .a-TreeView-node.is-selected > .a-TreeView-content .a-TreeView-row:hover,
   #t_TreeNav .a-TreeView-node.is-current > .a-TreeView-content .a-TreeView-row:hover {
     background: rgba(255, 255, 255, 0.12) !important;
   }
   
   #t_TreeNav .a-TreeView-node.is-selected .a-TreeView-label,
   #t_TreeNav .a-TreeView-node.is-current .a-TreeView-label,
   .t-TreeNav .a-TreeView-node.is-selected .a-TreeView-label,
   .t-TreeNav .a-TreeView-node.is-current .a-TreeView-label {
     color: #ffffff !important;
     font-weight: 600 !important;
   }
   
  #t_TreeNav .a-TreeView-node.is-selected .ld-nav-icon,
  #t_TreeNav .a-TreeView-node.is-current .ld-nav-icon {
    color: #ffffff !important;
    opacity: 1 !important;
  }

  /* Bug-3 Fix: li statt .a-TreeView-node — robuster gegen APEX-interne Klassenmanipulation */
  #t_TreeNav li.is-current .ld-nav-icon,
  #t_TreeNav li.is-selected .ld-nav-icon {
    color: #ffffff !important;
    opacity: 1 !important;
  }
   
   /* -- Focused State: kein schwarzer Outline -- */
   #t_TreeNav .a-TreeView-content.is-focused .a-TreeView-row,
   #t_TreeNav .a-TreeView-content:focus .a-TreeView-row {
     outline: none !important;
     box-shadow: none !important;
   }
   
   #t_TreeNav .a-TreeView-content.is-focused .a-TreeView-label,
   #t_TreeNav .a-TreeView-content:focus .a-TreeView-label {
     color: var(--ld-on-surface-var) !important;
   }
   
   #t_TreeNav .a-TreeView-node.is-selected .a-TreeView-content.is-focused .a-TreeView-label,
   #t_TreeNav .a-TreeView-node.is-current .a-TreeView-content.is-focused .a-TreeView-label {
     color: #ffffff !important;
   }
   
   /* ── Header Badges (Rolle + Mandant, injiziert von nav.js) ────────────────── */
   
   .ld-header-badges {
     display: flex;
     align-items: center;
     gap: 6px;
     margin-right: 8px;
   }
   
   .ld-header-badge {
     padding: 4px 12px;
     border-radius: 16px;
     font-size: 11px;
     font-weight: 600;
     font-family: 'Manrope', sans-serif;
     white-space: nowrap;
     background: var(--ld-surf-low);
     color: var(--ld-on-surface-var);
   }
   
   .ld-header-badge--mandant {
     background: var(--ld-dunkel-violett);
     color: var(--ld-brand);
   }
   
   .ld-header-badge--role[data-role="admin"] {
     background: var(--ld-rosa);
     color: var(--ld-danger);
   }
   
   .ld-header-badge--role[data-role="mandant"] {
     background: var(--ld-surf-low);
     color: var(--ld-on-surface-var);
   }
   
  /* ── Login-Seite: Sidebar und Overrides deaktivieren ─────────────────────── */

  .t-PageBody--login #ld-sidebar,
  body.t-PageBody--login #ld-sidebar {
    display: none !important;
  }

  .t-PageBody--login .t-Body-main,
  .t-PageBody--login.t-PageBody--leftNav .t-Body-main {
    margin-left: 0 !important;
  }

  .t-PageBody--login .t-Header {
    display: flex !important;
  }

  .t-PageBody--login #t_Body_nav {
    display: none !important;
  }

  /* ── APEX Header + Body-Layout ───────────────────────────────────────────── */

  #wwvFlowForm {
    padding: 0 !important;
    margin: 0 !important;
  }

  .t-Header {
    display: none !important;
  }

  .t-Body {
    padding-top: 0 !important;
  }

  .t-Body-main {
    top: 0 !important;
  }
   
   /* APEX Breadcrumb, Hero, Title-Bar Regionen komplett ausblenden
      (unsere Seiten rendern eigene Titel via JS) */
   .t-BreadcrumbRegion,
   .t-Breadcrumb,
   .t-Breadcrumb-title,
   .t-Body-title,
   .t-Body-info,
   .t-HeroRegion,
   .t-Hero,
   .t-Hero-wrap,
   .t-BreadcrumbRegion--useBreadcrumbTitle,
   .t-ContentBlock--title,
   .t-Alert--page,
   .t-Body-content-inner > .t-Region:first-child:not(:has(.ld2-page-container)) {
     display: none !important;
   }
   
   /* ── Content Body ─────────────────────────────────────────────────────────── */
   
   .t-Body-content {
     background: var(--ld-surface) !important;
     padding: 20px 24px !important;
     margin: 0 !important;
   }
   
   .t-Body-contentInner {
     max-width: none !important;
     padding: 0 !important;
     margin: 0 !important;
   }
   
   /* ── APEX Region Overrides (No-Line Rule) ─────────────────────────────────── */
   
   /* Entferne alle Region-Borders */
   .t-Region,
   .t-Region--noBorder {
     border: none !important;
     box-shadow: var(--ld-shadow-sm) !important;
     border-radius: var(--ld-radius-lg) !important;
     background: #ffffff !important;
     overflow: hidden !important;
   }

   /* JS-gerenderte Regionen: overflow erlauben damit Inhalte nicht abgeschnitten werden */
   .t-Region:has(.ld2-page-container) {
     overflow: visible !important;
     box-shadow: none !important;
     background: transparent !important;
   }
   .t-Region:has(.ld2-page-container) > .t-Region-body {
     padding: 0 !important;
   }
   
   .t-Region-header {
     border-bottom: none !important;
     padding: 16px 20px !important;
   }
   
   .t-Region-headerItems--title .t-Region-title {
     font-family: 'Manrope', sans-serif !important;
     font-weight: 700 !important;
     font-size: 14px !important;
     color: var(--ld-on-surface) !important;
   }
   
   .t-Region-body {
     padding: 0 20px 20px !important;
   }
   
   /* ── Buttons (Gradient CTAs) ──────────────────────────────────────────────── */
   
   .t-Button--hot,
   .t-Button.t-Button--primary {
     background: var(--ld-grad) !important;
     border: none !important;
     border-radius: var(--ld-radius-btn) !important;
     box-shadow: 0 2px 8px rgba(75, 77, 237, 0.18) !important;
     font-weight: 600 !important;
     transition: all 0.15s !important;
   }
   
   .t-Button--hot:hover {
     box-shadow: 0 4px 14px rgba(75, 77, 237, 0.28) !important;
     transform: translateY(-1px) !important;
   }
   
   .t-Button {
     border-radius: var(--ld-radius-btn) !important;
     font-weight: 600 !important;
     font-family: 'Manrope', sans-serif !important;
   }
   
   /* ── Interactive Report / Grid Overrides ───────────────────────────────────── */
   
   /* Remove grid lines → use alternating row backgrounds */
   .a-IRR-table td,
   .a-IRR-table th,
   .a-GV-table td,
   .a-GV-table th {
     border: none !important;
   }
   
   .a-IRR-table tr:nth-child(even),
   .a-GV-table tr:nth-child(even) {
     background: var(--ld-surf-low) !important;
   }
   
   .a-IRR-table tr:hover,
   .a-GV-table tr:hover {
     background: var(--ld-brand-light) !important;
   }
   
   .a-IRR-table th,
   .a-GV-table th {
     background: var(--ld-surf-low) !important;
     font-weight: 600 !important;
     color: var(--ld-on-surface-var) !important;
     text-transform: uppercase !important;
     font-size: 10px !important;
     letter-spacing: 0.8px !important;
   }
   
   /* ── Form Items ───────────────────────────────────────────────────────────── */
   
   .apex-item-text,
   .apex-item-select,
   .apex-item-textarea {
     border: none !important;
     background: var(--ld-surf-low) !important;
     /* Sichtbarer Ring statt border — hält die No-Line Rule ein */
     box-shadow: 0 0 0 1.5px rgba(75, 77, 237, 0.13), 0 1px 4px rgba(0,0,0,0.05) !important;
     border-radius: 12px !important;
     padding: 10px 14px !important;
     font-family: 'Manrope', sans-serif !important;
     color: var(--ld-on-surface) !important;
     transition: all 0.15s !important;
   }
   
   .apex-item-text:hover,
   .apex-item-select:hover,
   .apex-item-textarea:hover {
     box-shadow: 0 0 0 1.5px rgba(75, 77, 237, 0.22), 0 2px 6px rgba(0,0,0,0.07) !important;
   }

   .apex-item-text:focus,
   .apex-item-select:focus,
   .apex-item-textarea:focus {
     background: #ffffff !important;
     box-shadow: 0 0 0 2.5px rgba(75, 77, 237, 0.28), 0 2px 8px rgba(75,77,237,0.10) !important;
     outline: none !important;
   }
   
   /* ── Pulse Animation für StatusDots ───────────────────────────────────────── */
   
   @keyframes ld2-pulse {
     0%, 100% { opacity: 1; }
     50% { opacity: 0.4; }
   }
   
   /* ── Custom Scrollbar ─────────────────────────────────────────────────────── */
   
   *::-webkit-scrollbar { width: 6px; }
   *::-webkit-scrollbar-thumb { background: var(--ld-outline-var); border-radius: 3px; }
   *::-webkit-scrollbar-track { background: transparent; }
   
   /* ── JS-gerenderte Container ──────────────────────────────────────────────── */
   
   /* Container-Div für JS-gerenderte Seiteninhalte */
   .ld2-page-container {
     display: flex;
     flex-direction: column;
     gap: 28px;
     padding: 8px 0;
     box-sizing: border-box;
   }

   .ld2-page-container > * {
     min-width: 0;
   }
   
   .ld2-page-container .ld2-card {
     transition: box-shadow 0.15s, transform 0.15s;
   }
   
   .ld2-page-container .ld2-card:hover {
     box-shadow: var(--ld-shadow);
     transform: translateY(-1px);
   }

   /* JS-gerenderte Textareas (z.B. E-Mail-Editor in Review) */
   .ld2-page-container textarea,
   .ld2-page-container input[type="text"],
   .ld2-page-container select {
     box-shadow: 0 0 0 1.5px rgba(75, 77, 237, 0.13), 0 1px 4px rgba(0,0,0,0.05) !important;
     border: none !important;
     transition: box-shadow 0.15s !important;
   }

   .ld2-page-container textarea:hover,
   .ld2-page-container input[type="text"]:hover,
   .ld2-page-container select:hover {
     box-shadow: 0 0 0 1.5px rgba(75, 77, 237, 0.22), 0 2px 6px rgba(0,0,0,0.07) !important;
   }

   .ld2-page-container textarea:focus,
   .ld2-page-container input[type="text"]:focus,
   .ld2-page-container select:focus {
     box-shadow: 0 0 0 2.5px rgba(75, 77, 237, 0.28) !important;
     outline: none !important;
   }
   
   /* KPI Grid Standard */
   .ld2-kpi-grid {
     display: grid;
     gap: 16px;
   }
   
   .ld2-kpi-grid--4 { grid-template-columns: repeat(4, 1fr); }
   .ld2-kpi-grid--5 { grid-template-columns: repeat(5, 1fr); }
   .ld2-kpi-grid--3 { grid-template-columns: repeat(3, 1fr); }
   
   /* ── Modal Dialog Override ────────────────────────────────────────────────── */
   
   .ui-dialog {
     border: none !important;
     border-radius: var(--ld-radius-lg) !important;
     box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15) !important;
     overflow: hidden !important;
   }
   
   .ui-dialog .ui-dialog-titlebar {
     background: #ffffff !important;
     border-bottom: none !important;
     font-family: 'Manrope', sans-serif !important;
   }
   
   /* ── Responsive ───────────────────────────────────────────────────────────── */
   
   @media (max-width: 1024px) {
     .ld2-kpi-grid--5 { grid-template-columns: repeat(3, 1fr); }
     .ld2-kpi-grid--4 { grid-template-columns: repeat(2, 1fr); }
   }
   
   @media (max-width: 640px) {
     .ld2-kpi-grid--5,
     .ld2-kpi-grid--4,
     .ld2-kpi-grid--3 { grid-template-columns: 1fr; }
   }
   
   /* ============================================================================
      LEADO Navigation System (Top + Side + NavBar)
      ============================================================================
      Erzwingt konsistenten Look fuer beide APEX-Navigationsmodi:
      - Left Navigation (Tree)
      - Top Navigation (MenuBar)
      - Right Navigation Bar (User / Sign Out)
      ========================================================================== */
   
   /* ── Top Navigation (Desktop Navigation Menu) ────────────────────────────── */
   .t-Header-nav {
     background: #ffffff !important;
     border-bottom: none !important;
     box-shadow: 0 1px 12px rgba(75, 77, 237, 0.06) !important;
   }
   
   .t-Header-nav .a-MenuBar {
     background: transparent !important;
     border: none !important;
     box-shadow: none !important;
   }
   
   .t-Header-nav .a-MenuBar-item {
     background: transparent !important;
     border: none !important;
   }
   
   .t-Header-nav .a-MenuBar-label {
     font-family: "Manrope", sans-serif !important;
     font-size: 13px !important;
     font-weight: 600 !important;
     color: var(--ld-on-surface-var) !important;
     border-radius: 999px !important;
     padding: 6px 12px !important;
   }
   
   .t-Header-nav .a-MenuBar-item:hover .a-MenuBar-label {
     color: var(--ld-brand) !important;
     background: var(--ld-surf-low) !important;
   }
   
   .t-Header-nav .a-MenuBar-item.is-current .a-MenuBar-label,
   .t-Header-nav .a-MenuBar-item.is-active .a-MenuBar-label {
     color: #ffffff !important;
     background: var(--ld-grad) !important;
     box-shadow: 0 4px 12px rgba(75, 77, 237, 0.24) !important;
   }
   
   /* Top-Nav Dropdowns */
   .t-Header-nav .a-Menu,
   .t-Header-nav .a-Menu-content {
     border: none !important;
     border-radius: 12px !important;
     box-shadow: 0 12px 28px rgba(75, 77, 237, 0.12) !important;
   }
   
   .t-Header-nav .a-Menu .a-Menu-label {
     font-family: "Manrope", sans-serif !important;
     font-size: 12px !important;
     color: var(--ld-on-surface) !important;
   }
   
   /* ── Right Navigation Bar (User menu) ───────────────────────────────────── */
   .t-Header-navBar,
   .t-NavigationBar {
     background: transparent !important;
     border: none !important;
   }
   
   .t-NavigationBar-item a,
   .t-NavigationBar-item button,
   .t-NavigationBar .a-Button,
   .t-NavigationBar .t-Button {
     border: none !important;
     border-radius: 999px !important;
     background: var(--ld-surf-low) !important;
     color: var(--ld-on-surface) !important;
     font-family: "Manrope", sans-serif !important;
     font-weight: 600 !important;
   }
   
   .t-NavigationBar-item a:hover,
   .t-NavigationBar-item button:hover,
   .t-NavigationBar .a-Button:hover,
   .t-NavigationBar .t-Button:hover {
     background: var(--ld-brand-light) !important;
     color: var(--ld-brand) !important;
   }
   
   /* ── Loading Animations ───────────────────────────────────────────────── */

   @keyframes ld2-skeleton {
     0%, 100% { opacity: 0.6; }
     50% { opacity: 0.3; }
   }

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

   /* ── Lead Card Hover (Review Queue + Leads) ─────────────────────────── */

   .ldr-lead-card:hover,
   .ldl-lead-card:hover {
     box-shadow: var(--ld-shadow) !important;
     transform: translateY(-2px);
   }

   .ldl-row:hover {
     background: var(--ld-surf-low) !important;
   }

   .ldr-row:hover {
     background: var(--ld-surf-low) !important;
   }

   .ldc-campaign-card:hover {
     transform: translateY(-2px);
     box-shadow: var(--ld-shadow) !important;
   }

   /* ── Dashboard KPI Responsive ──────────────────────────────────────── */

   @media (max-width: 900px) {
     #ld2-zone-kpis > div {
       grid-template-columns: repeat(2, 1fr) !important;
     }
   }

   @media (max-width: 640px) {
     #ld2-zone-kpis > div {
       grid-template-columns: 1fr !important;
     }
   }

   /* ============================================================================
      FINAL HARD OVERRIDES (APEX 18/UT states)
      ============================================================================
      Diese Regeln adressieren explizit UT-Klassen, die je nach Template/Version
      unterschiedliche 