/* ==========================
   Root / Theme Variablen
========================== */
:root{
  --ek4y-green: #17D68F;
  --ek4y-green-2: #15C282;
  --ek4y-green-3: #13B075;
  --sidebar-width: 16.25rem;
  --topbar-floating-reserve: 26rem;
  --crm-chrome-height: calc(env(safe-area-inset-top, 0px) + 3.1rem);
  --crm-topbar-offset: 3.625rem;
  --crm-toast-z-index: 10100;

  --muted: light-dark(#6c757d, #a7b3c2);
  --bg: light-dark(#f5f5f5, #18212c);
  --card-bg: light-dark(#fff, #131a23);
  --border: light-dark(#dee2e6, #263241);
  --shadow-1: 0 4px 8px rgba(0,0,0,.1);
  --gap: 1rem;
}

/* ==========================
   Base / Resets
========================== */
* { -webkit-tap-highlight-color: transparent; }

html, body {
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  margin: 0;
  color: var(--ds-text);
  padding-top: 0 !important;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ==========================
   App Shell / Hauptlayout
========================== */
.app {
  height: 100dvh;
  width: 100%;
  max-width: 100vw;
  margin-top: 0 !important;
  padding-top: 0 !important;
  overflow: hidden !important;
}

.main-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100dvh;
  width: 100%;
  max-width: 100%;
  margin-top: 0 !important;
  padding-top: 0 !important;
  overflow: hidden !important;
}

.main-content > .content {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  margin-top: 0 !important;
  padding-top: var(--crm-topbar-offset) !important;
  padding-right: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  overflow-anchor: none;
}

.main-content > .content > :first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.main-content > .content > .container,
.main-content > .content > .container-fluid,
.main-content > .content > .crm-header:first-child,
.main-content > .content > form:first-child,
.main-content > .content > section:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.min-w-0 { min-width: 0 !important; }
.cursor-pointer { cursor: pointer; }
/* ==========================
   Preloader
========================== */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--ds-surface);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity .25s ease;
}

#preloader.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  transition: opacity .25s ease, visibility .25s .25s;
}

.pre-spin {
  width: 48px;
  height: 48px;
  border: 4px solid var(--ds-border);
  border-top-color: #0d6efd;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

.pre-progress {
  width: min(420px, 80%);
  height: 8px;
  background: var(--ds-surface-3);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.pre-bar {
  height: 100%;
  width: 0%;
  background: #0d6efd;
  transition: width .15s ease;
}

.pre-pct { margin-top: 8px; font-size: 12px; color: var(--muted); }

.crm-global-preloader {
  position: fixed;
  inset: 0;
  z-index: 20040;
  display: none;
  align-items: center;
  justify-content: center;
  padding:
    calc(env(safe-area-inset-top, 0px) + 1rem)
    1rem
    calc(env(safe-area-inset-bottom, 0px) + 1rem);
  background: color-mix(in srgb, var(--ds-surface) 96%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.crm-global-preloader.is-visible,
.crm-global-preloader.crm-global-preloader--forced {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.crm-global-preloader-active {
  overflow: hidden;
}

.crm-global-preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .85rem;
  min-width: min(280px, 80vw);
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  background: var(--ds-surface);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .12);
}

.crm-global-preloader__spin {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(23, 214, 143, .18);
  border-top-color: #17D68F;
  border-radius: 50%;
  animation: spin .85s linear infinite;
}

.crm-global-preloader__label {
  font-size: .92rem;
  font-weight: 600;
  color: #24324a;
  color: light-dark(#24324a, #e8edf3);
  text-align: center;
}

/* ==========================
   Notification
========================== */
.notification-card {
  border-radius: 10px;
  transition: all .2s ease;
}

.notif-unread {
  background: #fef8dd;
  background: light-dark(#fef8dd, #42483c);   /* warm light pastel gelb */
  border-left: 4px solid #ffc107;
}

.notif-read {
  background: var(--ds-surface-2);
  border-left: 4px solid var(--ds-border);
  opacity: .85;
}

.notif-title {
  font-weight: 600;
  margin-bottom: 3px;
}

.notif-text {
  font-size: .9rem;
  margin-bottom: 6px;
}

.notif-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notif-btn-read i {
  color: #28a745;
  color: light-dark(#28a745, #94d3a2);
}

.notif-btn-delete i {
  color: #dc3545;
  color: light-dark(#dc3545, #ee9aa2);
}
@keyframes notifSlideIn {
  from { transform: translateY(-10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.notification-card {
  animation: notifSlideIn .25s ease;
}

.notification-card.notif-read {
  transition: background .3s ease, opacity .3s ease;
}

.notification-card.deleted {
  transition: all .3s ease;
  opacity: 0;
  transform: translateX(40px);
}

/* ==========================
   Buttons + Form Selects
========================== */
.btn,
.form-select {
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem 1rem;
  border-radius: .5rem;
  line-height: 1;
}

/* Add-Button */
.btn-add {
  background: #17d68f;
  color: #fff !important;
  border-radius: 10px;
  padding: 0.55rem 1.2rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .4rem;
  text-decoration: none !important;
}
.btn-add:hover {
  background: #13b97c !important;
}
/* -------------------------------------------
   MOBILE HEADER OPTIMIERUNG (<768px)
------------------------------------------- */
@media (max-width: 768px) {

  .sticky-top .card-body {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 12px;
      padding: 16px;
  }

  /* Icon kleiner */
  .sticky-top .card-body > div:first-child {
      width: 48px !important;
      height: 48px !important;
  }

  /* Titel + Subline 100% Breite */
  .sticky-top .flex-grow-1 {
      width: 100%;
  }

  .sticky-top h4 {
      font-size: 1.2rem;
  }

  .sticky-top small {
      font-size: 0.85rem;
      display: block;
      margin-top: 4px;
      line-height: 1.3;
  }

  /* Button unten, volle Breite */
  .btn-add {
      width: 100%;
      justify-content: center;
      font-size: 1rem;
      padding: 12px 16px;
      border-radius: 12px;
  }
}

.btn-ek4y-green {
  background: var(--ek4y-green);
  border: none;
  color: #fff;
  padding: 8px 16px;
  font-weight: 500;
  border-radius: 4px;
  transition: background-color .2s;
}
.btn-ek4y-green:hover,
.btn-ek4y-green:active { background: var(--ek4y-green-2) !important; }
.btn-ek4y-green:focus { background: var(--ek4y-green-3) !important; color: #fff !important; }

.dashb-con-dash-btn-orange {
  background: #ffb01e; color: #fff !important; border:none; padding: 8px 16px;
  font-weight:500; border-radius:4px; transition:background-color .2s;
}
.dashb-con-dash-btn-orange:hover { background:#ec9a00; }

.dashb-con-dash-btn-pink {
  background:#f0f; color:#fff; border:none; padding:8px 16px;
  font-weight:500; border-radius:4px; transition:.2s;
}
.dashb-con-dash-btn-pink:hover { background:#e700e7; }

.dropdown-toggle::after { display:none !important; }
.dropdown-toggle,
.dropdown-toggle:focus,
.dropdown-toggle:active,
.dropdown-toggle:focus-visible {
  border:none !important;
  outline:none !important;
  box-shadow:none !important;
}

/* ==========================
   Header / Sticky
========================== */
.sticky-header {
  position: sticky;
  top: 0;
  background: var(--card-bg);
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

.dashboard-title { font-size:1.2rem; font-weight:600; padding-left:20px; }
.icon-link { color:var(--ds-text); transition:color .2s; }
.icon-link:hover { color:var(--ek4y-green); }

.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.header-left {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.header-icon {
  width: 58px;
  height: 58px;
  background: #e8fff4;
  background: light-dark(#e8fff4, #37484d);
  color: #17D68F;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.header-icon i { font-size: 28px; }

.header-text {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-width: 0 !important;
}

.header-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  white-space: nowrap !important;
}

.header-sub {
  margin-top: 2px;
  font-size: .9rem;
  color: var(--ds-text-3);
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (max-width:768px) {

  .header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .header-left {
    width: 100%;
  }
  
  .header-action {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .header-title {
    font-size: 1.2rem;
  }

  .header-sub {
    font-size: .85rem;
  }
  .header-icon {
    display: none !important;
}
}

/* ==========================
   Avatar
========================== */
.header-avatar { width:40px; height:40px; position:relative; }
.avatar-initials {
  width:40px; height:40px; background:var(--ds-surface-3);
  color:var(--ds-text); border-radius:50%;
  font-weight:700; display:flex; align-items:center; justify-content:center;
}
.avatar-status-dot {
  position:absolute; bottom:0; right:0;
  width:10px; height:10px; background:var(--ek4y-green);
  border-radius:50%; border:2px solid var(--ds-surface);
}

/* ==========================
   Tabs (responsive)
========================== */
.bp-tabs {
  position: sticky;
  top: 56px;
  height: 88px;
  z-index: 1001;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.bp-tabs .ek4y-tabs {
  display:flex;
  gap:.5rem;
  flex-wrap: wrap;
  padding:.5rem 1rem;
  margin:0;
}

.bp-tabs .ek4y-tabs .nav-item { flex:0 0 auto; }
.bp-tabs .ek4y-tabs .nav-link {
  background:var(--ds-surface) !important; color:#181d27 !important;
  color:light-dark(#181d27, #e8edf3) !important; border:none !important;
  padding:.5rem .75rem; border-radius:999px;
  font-weight:500; white-space:nowrap; position:relative;
}

.bp-tabs .ek4y-tabs .nav-link.active { font-weight:600; }
.bp-tabs .ek4y-tabs .nav-link.active::after {
  content:""; position:absolute; left:10%; right:10%; bottom:-8px;
  height:3px; border-radius:3px; background:var(--ek4y-green);
}

.bp-tabs .ek4y-tabs .nav-link:hover { color:var(--ek4y-green) !important; }

@media (max-width:575.98px) {
  .bp-tabs .ek4y-tabs {
    flex-wrap:nowrap;
    overflow:auto;
    -webkit-overflow-scrolling:touch;
  }
  .bp-tabs .ek4y-tabs::-webkit-scrollbar { height:6px; }
}
/* ==========================
   Nav Tabs (card style)
========================== */
.card-container {
  border-radius: 0;
  box-shadow: var(--shadow-1);
  border: 1px solid var(--border);
  background: var(--card-bg);
  margin-bottom: 1rem;
}

.nav-tabs { border-bottom: 2px solid var(--border) !important; }

.nav-tabs .nav-link {
  background: var(--card-bg) !important;
  color:var(--ds-text) !important;
  border: 1.5px solid var(--border) !important;
  border-bottom: none !important;
  border-radius: 8px 8px 0 0 !important;
  margin-right:6px;
  font-weight:500;
  transition: .12s;
  min-width:140px;
  text-align:center;
}

.nav-tabs .nav-link.active {
  color: var(--ek4y-green) !important;
  font-weight:600;
  z-index:2;
}

.nav-tabs .nav-link:hover:not(.active) {
  color: var(--ek4y-green) !important;
  background:var(--ds-surface-2) !important;
}

@media (max-width:600px) {
  .nav-tabs {
    overflow-x:auto;
    white-space:nowrap;
    flex-wrap:nowrap !important;
  }
  .nav-tabs .nav-item { display:inline-block; }
  .nav-tabs .nav-link { min-width:120px; font-size:15px; }
}

/* ==========================
   Cards / Lists
========================== */
.card-dashboard {
  border-radius: 0;
  box-shadow: var(--shadow-1);
  border: 1px solid var(--border);
  background: var(--card-bg);
  margin-bottom:1rem;
}

.card-header,
.card-footer {
  border-bottom:1px solid var(--border);
  padding:10px;
  font-weight:700;
  background:var(--ds-surface-2);
}

.list-group-item {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 15px;
  border-bottom:1px solid var(--border);
}
.list-group-item:last-child { border-bottom:none; }

.placeholder-card {
  font-style:italic;
  color:var(--ds-text-3);
  text-align:center;
  padding:20px;
}

/* ==========================
   Formulare
========================== */
.input-group > .btn,
.input-group > .form-control,
.input-group > .form-select {
  height: 2.5rem !important;
  border: 1px solid #D5D7DA;
  border: 1px solid light-dark(#D5D7DA, #263241);
}

.dashb-h4 {
  font-size:16px;
  color:#181D27;
  color:light-dark(#181D27, #e8edf3);
  margin-bottom:15px;
  font-weight:600;
}

.form-label { font-size:14px; color:#414651;
  color:light-dark(#414651, #e8edf3); }

.form-control {
  border-radius:8px;
  padding:10px 14px;
  font-size:14px;
  height:2.5rem;
  line-height:20px;
  color:var(--ds-text);
}

/* ==========================
   Input + Copy-Button Fix
========================== */

/* Input links abrunden */
.input-group > .form-control {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

/* Button rechts abrunden */
.input-group > .btn {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  border-left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 0;
}

.form-control,
.form-select {
  height: 2.5rem;
  border-radius: 8px;
}

.dashb-form-group {
  display:flex;
  flex-direction:column;
  margin-bottom:1rem;
}

.dashb-form-group input { flex-grow:1; }

.dashb-notiz-box {
  white-space:pre-wrap;
  word-break:break-all;
  overflow-wrap:anywhere;
}

/* ==========================
   iOS Input Zoom Fix
========================== */
@media (max-width:767.98px) {
  .login-form-container .form-control,
  input[type="text"],
  input[type="password"],
  textarea,
  select {
    font-size:16px;
    -webkit-text-size-adjust:100%;
  }
}

/* ==========================
   Login
========================== */
.login-container {
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:100vh;
  padding:1rem 5px;
  background:var(--bg);
}

.login-wrap {
  background:var(--card-bg);
  border-radius:16px;
  box-shadow:0 4px 6px rgba(0,0,0,.1);
  overflow:hidden;
  max-width:450px;
  width:100%;
  display:flex;
  flex-direction:column;
}

.login-img {
  width:100%;
  background:url('../img/logo_ek4you_b.webp') center center no-repeat;
  background-size:contain;
  padding:15%;
}

.login-form-container {
  padding:1.5rem 2rem 2rem;
  display:flex;
  flex-direction:column;
  justify-content:center;
  flex-grow:1;
}

.login-form-control {
  width:100%;
  margin-bottom:1rem;
  padding:.75rem 1rem;
  font-size:1rem;
  border:1px solid var(--ds-border-strong);
  border-radius:8px;
}

.login-button {
  background:var(--ek4y-green);
  color:#fff;
  font-weight:600;
  padding:.75rem;
  border:none;
  border-radius:8px;
  cursor:pointer;
  transition:background .3s;
}
.login-button:hover { background:#13b075; }

@media (max-width:768px) {
  .login-wrap { max-width:400px; }
  .login-img { padding-top:25%; }
  .login-form-container { padding:1rem 1.5rem 1.5rem; }
}

@media (max-width:480px) {
  .login-wrap {
    background:none;
    border-radius:0;
    box-shadow:none;
    max-width:100%;
    height:100vh;
    padding:0;
  }
  .login-container { padding:0 5px; }
  .login-form-container {
    padding:1rem .5rem;
    flex-grow:1;
    display:flex;
    flex-direction:column;
    justify-content:center;
  }
}

/* ==========================
   Dashboard / Sections / Masonry
========================== */
.dashboard-section {
  width:100%;
  margin-bottom:1rem;
  padding:15px;
}

.masonry-container { column-count:1; column-gap:1rem; }
@media (max-width:1300px) { .masonry-container { column-count:2; } }
@media (min-width:1301px) { .masonry-container { column-count:3; } }

/* ==========================
   Responsive Button Groups
========================== */
.btn-group-responsive {
  display:inline-flex;
  flex-wrap:wrap;
  gap:.5rem;
}

.btn-group-responsive > * {
  flex:1 1 auto;
  min-width:150px;
  text-align:center;
  white-space:nowrap;
  padding:.6rem 1rem;
}

@media (max-width:768px) {
  .btn-group-responsive > * { flex:1 1 100%; width:100%; }
}

@media (max-width:576px) {
  .btn-group-responsive > * {
    flex:1 1 100%;
    text-align:center;
    white-space:normal;
    padding:.6rem 1rem;
  }
}

/* ==========================
   Modals (Notiz + Image Fullscreen)
========================== */
.modal-notiz .modal-dialog {
  margin:0;
  width:100vw;
  max-width:100vw;
}

@media (min-width:577px) {
  .modal-notiz .modal-dialog {
    width:auto;
    max-width:90vw;
    margin:110px auto 0;
  }
}

.modal-notiz .modal-content,
.modal-notiz .modal-body {
  padding:0 !important;
  margin:0;
  height:100vh;
  max-height:100vh;
}

.modal-image-fullscreen .modal-dialog {
  margin:0;
  max-width:100vw;
  max-height:100vh;
}

.modal-image-fullscreen .modal-content {
  display:flex;
  flex-direction:column;
  height:100vh;
}

.modal-image-fullscreen .modal-header,
.modal-image-fullscreen .modal-footer {
  flex:0 0 auto;
  background:var(--ds-surface);
  border-color:var(--ds-border-strong) !important;
  padding:.5rem 1rem;
}

.modal-image-fullscreen .modal-body {
  flex:1 1 auto;
  display:flex;
  justify-content:center;
  align-items:center;
  overflow:hidden;
  background:var(--ds-surface);
}

.modal-image-fullscreen .modal-body img {
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  cursor:zoom-in;
  transition:transform .3s;
}
.modal-image-fullscreen .modal-body img.zoomed { cursor:zoom-out; }

/* =========================================
   GLOBAL CRM HEADER SYSTEM
========================================= */
.crm-header-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Icon: einheitliche Größe */
.crm-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

/* Titel + Untertitel */
.crm-header-text .crm-header-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.crm-header-text .crm-header-sub {
  color: var(--ds-text-3);
  font-size: 0.85rem;
}

/* Aktion rechts (Desktop) */
.crm-header-action {
  white-space: nowrap;
}

/* =========================================
   ADMIN PAGE DESIGN SYSTEM
========================================= */
body.admin-context {
  background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
  background: linear-gradient(180deg, light-dark(#f8fafc, #131a23) 0%, light-dark(#eef3f8, #18212c) 100%);
}

body.admin-context .main-content,
body.admin-context .main-content > .content {
  background: transparent;
}

body.admin-context .main-content > .content {
  padding-bottom: 1.5rem;
}

body.admin-context .content .container-fluid,
body.admin-context .content .container-fluid.admin-page {
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}

body.admin-context .content .card,
body.admin-context .content .calendar-manage-hero,
body.admin-context .content .calendar-manage-card,
body.admin-context .content .crm-header.card {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

body.admin-context .content .card-header {
  background: var(--ds-surface);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  padding: 0.95rem 1.15rem;
}

body.admin-context .content .card-body {
  padding: 1.15rem;
}

body.admin-context .content .alert {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

body.admin-context .content .badge {
  border-radius: 999px;
  font-weight: 600;
}

body.admin-context .content .btn {
  border-radius: 0.8rem;
}

body.admin-context .content .form-control,
body.admin-context .content .form-select,
body.admin-context .content textarea.form-control {
  border-radius: 0.8rem;
  border-color: #d7deea;
  border-color: light-dark(#d7deea, #263241);
  box-shadow: none;
}

body.admin-context .content .form-control:focus,
body.admin-context .content .form-select:focus,
body.admin-context .content textarea.form-control:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.14);
}

body.admin-context .content .table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
}

body.admin-context .content .table > :not(caption) > * > * {
  padding: 0.85rem 0.95rem;
  vertical-align: middle;
  border-bottom-color: rgba(148, 163, 184, 0.14);
}

body.admin-context .content .table thead th {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ds-text-3);
  background: rgba(248, 250, 252, 0.9);
  background: light-dark(rgba(248, 250, 252, 0.9), #131a23e6);
}

body.admin-context .content .table-responsive {
  border-radius: 0.9rem;
}

body.admin-context .content .container-fluid > .d-flex.justify-content-between.align-items-center.mb-3,
body.admin-context .content .container-fluid > .d-flex.justify-content-between.align-items-center.mb-3.flex-wrap,
body.admin-context .content .container-fluid > .d-flex.justify-content-between.align-items-center.mb-3.flex-wrap.gap-2,
body.admin-context .content .crm-header:not(.card) {
  background: color-mix(in srgb, var(--ds-surface) 88%, transparent);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border: 1px solid light-dark(rgba(226, 232, 240, 0.9), #263241e6);
  border-radius: 1rem;
  padding: 1rem 1.15rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

body.admin-context .content .container-fluid > .d-flex.justify-content-between.align-items-center.mb-3 h3,
body.admin-context .content .crm-header .crm-header-title,
body.admin-context .content .crm-header:not(.card) h4,
body.admin-context .content .crm-header:not(.card) h3 {
  color: var(--ds-text);
}

body.admin-context .content .container-fluid > .d-flex.justify-content-between.align-items-center.mb-3 .text-muted.small,
body.admin-context .content .crm-header-sub,
body.admin-context .content .crm-header:not(.card) .text-muted {
  color: var(--ds-text-3) !important;
}

body.admin-context .content .container-fluid > .d-flex.justify-content-between.align-items-center.mb-3 .mb-1 {
  font-size: 1.45rem;
  font-weight: 700;
}

body.admin-context .content .container-fluid > .d-flex.justify-content-between.align-items-center.mb-3 > div:last-child {
  gap: 0.5rem;
}

@media (max-width: 768px) {
  body.admin-context .content .container-fluid,
  body.admin-context .content .container-fluid.admin-page {
    padding-top: 0.75rem;
    padding-bottom: 1rem;
  }

  body.admin-context .content .container-fluid > .d-flex.justify-content-between.align-items-center.mb-3,
  body.admin-context .content .container-fluid > .d-flex.justify-content-between.align-items-center.mb-3.flex-wrap,
  body.admin-context .content .container-fluid > .d-flex.justify-content-between.align-items-center.mb-3.flex-wrap.gap-2,
  body.admin-context .content .crm-header:not(.card) {
    padding: 0.9rem 1rem;
  }

  body.admin-context .content .card-body {
    padding: 1rem;
  }

  body.admin-context .content .table > :not(caption) > * > * {
    padding: 0.75rem 0.7rem;
  }
}

/* ------------------------------
 MOBILE LAYOUT
 Icon links, Text rechts
 NICHT zentriert
------------------------------ */

@media (max-width: 768px) {

  .crm-header-row {
      flex-direction: row !important;
      align-items: flex-start !important;
  }

  .crm-header-icon {
      margin-top: 4px;
  }

  .crm-header-text {
      text-align: left !important;
      flex: 1;
  }

  .crm-header-title,
  .crm-header-sub {
      text-align: left !important;
  }

  .crm-header-row {
      flex-wrap: wrap;
  }

  .crm-header-action,
  .crm-header-mobile-action {
      display: flex !important;
      flex: 1 1 100%;
      width: 100%;
      margin-top: 4px;
      justify-content: center;
      white-space: normal;
  }
}

/* ==========================
   Chat
========================== */
.chat-message {
  margin:5px 0;
  padding:5px;
  clear:both;
}

.chat-message.self {
  text-align:right;
  background:#e0ffe0;
  background:light-dark(#e0ffe0, #364843);
  border-radius:10px;
  float:right;
  max-width:80%;
}

.chat-message.other {
  text-align:left;
  background:#f0f0f0;
  background:light-dark(#f0f0f0, #18212c);
  border-radius:10px;
  float:left;
  max-width:80%;
}

.sender-name { font-weight:700; }
.timestamp { font-size:.8em; color:var(--ds-text-3); }
.clearfix::after { content:""; display:table; clear:both; }
.chat-date-separator {
  text-align:center;
  color:var(--ds-text-3);
  font-size:.8rem;
  margin:10px 0;
}

/* ==========================
   Mail List
========================== */
.mail-item {
  background:var(--card-bg);
  border-radius:5px;
  box-shadow:0 1px 3px rgba(0,0,0,.1);
  margin-bottom:20px;
}

.mail-header {
  display:flex;
  justify-content:space-between;
  padding:15px;
  border-bottom:1px solid #ddd;
  border-bottom:1px solid light-dark(#ddd, #263241);
}

.mail-date { font-size:12px; color:var(--ds-text-3); }

.mail-body { padding:15px; font-size:14px; }

/* ==========================
   Maps
========================== */
#map, #dashb-map {
  height:400px;
  width:100%;
  margin-top:20px;
  border:1px solid var(--ds-border-strong);
  border-radius:8px;
}

/* ==========================
   Contact Info
========================== */
.contact-info {
  display:flex;
  flex-wrap:wrap;
  gap:1rem;
  font-size:.85rem;
  color:var(--muted);
}

.contact-info a {
  display:flex;
  align-items:center;
  text-decoration:none;
  color:inherit;
}
.contact-info a > i { margin-right:.3rem; }

@media (max-width:576px) {
  .contact-info a { white-space:normal; }
}
/* ==========================
   Misc
========================== */
.delete-button.disabled {
  pointer-events: none;
  opacity:.3;
  border:none !important;
  background:0 0;
}

.delete-button.disabled i { color: gray; }

.nav-link.disabled {
  pointer-events:none;
  opacity:.5;
}

/* ==========================
   Desktop / Large Breakpoints Helpers
========================== */
@media (max-width:1024px) {
  .desktop-only { display:none !important; }
  .dashboard-title { font-size:1.2rem; }
  .icon-link i { font-size:1.5rem; }
  .avatar-initials { font-size:.9rem; }
  .dashboard-section { padding:10px; }
}

@media (max-width:1058px) {
  .tablet-only { display:none !important; }
}

@media (max-width:576px) {
  .dashb-form-group { gap:.25rem; }
}

/* ==========================
   Drag & Drop Helpers
========================== */
.card.dragging {
  opacity:.5;
  transition:opacity .2s;
}

.masonry-container.drag-over {
  background:rgba(23,214,143,.1);
  border:2px dashed var(--ek4y-green);
}

/* ==========================
   Accessibility / Reduced Motion
========================== */
@media (prefers-reduced-motion: reduce) {
  * {
    transition:none !important;
    animation:none !important;
  }
}

/* ==========================
   Fluid Typography
========================== */
h1 {
  font-size: clamp(1.25rem, 4vw, 2rem);
}

/* ==========================
   Modal: Offer Fullscreen (Desktop + Mobile)
========================== */
#offerFullModal .modal-dialog {
  max-width: 90vw;
  margin: 0 auto;
}

@media (max-width:991px) {
  #offerFullModal .modal-dialog {
    max-width: 95vw;
    margin: 0 auto;
  }
}

@media (max-width:767px) {
  #offerFullModal .modal-dialog {
    max-width: 100vw;
    margin: 0;
  }
}

#offerFullModal .modal-content {
  width:100%;
  border-radius:10px;
}

/* ==========================
   Notification Bell (perfect positioning)
========================== */
#notification-btn {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
}

#notification-btn i {
  font-size:1.7rem;
  line-height:1;
  position:relative;
}

.notif-badge {
  position:absolute;
  top:-2px;
  right:-6px;
  background:#dc3545;
  color:#fff;
  border-radius:50%;
  font-size:.65rem;
  font-weight:700;
  padding:2px 6px;
  min-width:18px;
  min-height:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 0 4px rgba(0,0,0,.25);
  pointer-events:none;
}

/* Mobile Optimierung */
@media (max-width:768px) {
  #notification-btn i { font-size:1.9rem; }

  .notif-badge {
    top:-4px;
    right:-4px;
    font-size:.75rem;
    padding:2px 7px;
    min-width:20px;
    min-height:20px;
  }
}

/* ==========================
   Notification Bell Shake Animation
========================== */
.notif-bell-shake {
  animation: bellShake 1.2s ease forwards;
}

@keyframes bellShake {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(-18deg); }
  30%  { transform: rotate(16deg); }
  45%  { transform: rotate(-14deg); }
  60%  { transform: rotate(12deg); }
  75%  { transform: rotate(-10deg); }
  90%  { transform: rotate(8deg); }
  100% { transform: rotate(0deg); }
}

/* ==========================
   Back Button (hide on Mobile)
========================== */
@media (max-width:768px) {
  .btn-back-desktop {
    display:none !important;
  }
}

/* ======================================================
   Styles moved from inc/layout/topbar.php
   - ACL simulation mini-styles
   - Topbar, floating toggle and login-notif modal styles
   (kept here to avoid inline CSS duplication)
====================================================== */

/* ACL simulation banner and modal */
.acl-simulation-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1405;
  padding: .65rem 1rem;
}

.acl-impersonation-banner,
.topbar-impersonation-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1410;
  padding: .55rem 1rem;
  min-height: var(--crm-acl-impersonation-strip-height, 2.75rem);
}

body.crm-acl-impersonation-active {
  --crm-acl-impersonation-strip-height: 2.75rem;
  --crm-topbar-offset: calc(3.625rem + var(--crm-acl-impersonation-strip-height));
}

body.crm-acl-impersonation-active .crm-mobile-chrome {
  top: var(--crm-acl-impersonation-strip-height);
}

body.crm-acl-impersonation-active #crmTopbar {
  top: var(--crm-acl-impersonation-strip-height);
}

body.crm-acl-impersonation-active .topbar-floating-actions {
  top: calc(env(safe-area-inset-top, 0px) + .35rem + var(--crm-acl-impersonation-strip-height));
}

@media (max-width: 1399.98px) {
  body.crm-acl-impersonation-active {
    --crm-chrome-height: calc(env(safe-area-inset-top, 0px) + 3.1rem + var(--crm-acl-impersonation-strip-height));
    --crm-topbar-offset: calc(3.625rem + var(--crm-acl-impersonation-strip-height));
  }
}

#crmPushPromptBanner {
  position: fixed;
  top: max(var(--crm-topbar-offset, 58px), var(--crm-chrome-height, 3.1rem));
  left: 0;
  right: 0;
  z-index: 1315;
  margin: 0;
  border-radius: 0;
  pointer-events: auto;
}

body.crm-push-prompt-visible {
  --crm-push-prompt-offset: 3.25rem;
}

body.crm-push-prompt-visible .main-content > .content {
  padding-top: calc(max(var(--crm-topbar-offset, 58px), var(--crm-chrome-height, 3.1rem)) + var(--crm-push-prompt-offset, 0px)) !important;
}

.acl-sim-modal .modal-dialog {
  max-width: min(1100px, calc(100vw - 2rem));
}

.acl-sim-modal .modal-content {
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
}

.acl-sim-modal .modal-header {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
  background: linear-gradient(180deg, light-dark(#fff7ed, #424746) 0%, light-dark(#ffffff, #131a23) 100%);
}

.acl-sim-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(180px, .7fr) minmax(180px, .7fr);
  gap: .75rem;
  margin-bottom: 1rem;
}

.acl-sim-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}

.acl-sim-editor-list {
  max-height: min(62vh, 720px);
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--ds-text) 8%, transparent);
  border-radius: .8rem;
  background: var(--ds-surface);
  padding: .5rem;
}

.acl-sim-modal {
  z-index: 3000;
}

.acl-sim-modal + .modal-backdrop,
.modal-backdrop.show {
  z-index: 2990;
}

.acl-sim-modal .modal-dialog {
  min-height: calc(100vh - 2rem);
}

.acl-sim-modal .drag-handle {
  cursor: grab;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  min-width: 1.75rem;
  color: var(--ds-text-3);
}

.acl-sim-modal .drag-handle:active {
  cursor: grabbing;
}

.acl-sim-modal .js-acl-nav-item.sortable-ghost {
  opacity: .45;
}

.acl-sim-modal .js-acl-nav-item.sortable-chosen {
  background: #fff7ed;
  background: light-dark(#fff7ed, #424746);
}

.acl-sim-saving-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--ds-surface) 82%, transparent);
  backdrop-filter: blur(2px);
}

.acl-sim-saving-box {
  min-width: 260px;
  padding: 22px 26px;
  border-radius: 16px;
  background: var(--ds-surface);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.acl-sim-saving-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  color: light-dark(#334155, #e8edf3);
}

.acl-sim-editor-item {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  padding: .5rem .55rem;
  border-radius: .6rem;
  border: 1px solid transparent;
}

.acl-sim-editor-item:hover {
  background: #fff7ed;
  background: light-dark(#fff7ed, #424746);
  border-color: rgba(251, 146, 60, .18);
}

.acl-sim-editor-item small {
  display: block;
  color: var(--ds-text-3);
  line-height: 1.25;
}

.acl-sim-empty {
  padding: 1rem;
  text-align: center;
  color: var(--ds-text-3);
}

@media (max-width: 767.98px) {
  .acl-sim-toolbar {
    grid-template-columns: 1fr;
  }

  .acl-sim-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Topbar and login-notifications */
:root {
  --login-notif-vh: 1vh;
}

#crmTopbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1300;
  margin: 0 !important;
  padding-top: 0 !important;
  transform: translate3d(0, 0, 0);
  transition: box-shadow .2s ease, padding .2s ease, transform .24s ease;
  will-change: transform;
}

#crmTopbar.is-collapsed {
  transform: translate3d(0, -100%, 0);
  opacity: 0;
  pointer-events: none;
}

#crmTopbar {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  pointer-events: none;
}

#crmTopbar .container-fluid,
#crmTopbar .topbar-primary-row,
#crmTopbar .topbar-left-tools,
#crmTopbar .topbar-inline-search-wrap,
#crmTopbar .topbar-inline-search,
#crmTopbar .topbar-inline-search .form-control,
#crmTopbar #search-results-inline {
  pointer-events: auto;
}

#crmTopbar .container-fluid {
  padding: 0 !important;
  padding-top: 5px !important;
  background: transparent !important;
}

/* Mobile chrome bar – unified navigation row for phone & tablet */
.crm-mobile-chrome {
  display: none;
}

.crm-mobile-chrome-btn,
.crm-mobile-chrome .topbar-mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: .32rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: var(--ds-surface) !important;
  box-shadow: none;
  touch-action: manipulation;
  line-height: 1;
  flex: 0 0 auto;
}

.crm-mobile-chrome-btn .bi,
.crm-mobile-chrome .topbar-mobile-menu-btn .bi {
  font-size: 1.05rem;
  line-height: 1;
  color: #243043;
  color: light-dark(#243043, #e8edf3);
}

.crm-mobile-chrome .topbar-floating-toggle .bi {
  color: #2f7cff;
  color: light-dark(#2f7cff, #97beff);
}

.crm-mobile-chrome__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0 .35rem;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ds-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

@media (max-width: 1399.98px) {
  .crm-mobile-chrome {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .45rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1320;
    padding:
      calc(env(safe-area-inset-top, 0px) + .35rem)
      max(.65rem, calc(env(safe-area-inset-right, 0px) + .65rem))
      .35rem
      max(.65rem, calc(env(safe-area-inset-left, 0px) + .65rem));
    pointer-events: none;
    box-sizing: border-box;
    background: color-mix(in srgb, var(--ds-surface) 97%, transparent);
    border-bottom: 1px solid rgba(148, 163, 184, .18);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .8), 0 8px 24px rgba(15, 23, 42, .06);
    backdrop-filter: blur(14px) saturate(1.05);
    -webkit-backdrop-filter: blur(14px) saturate(1.05);
  }

  .crm-mobile-chrome__start,
  .crm-mobile-chrome__center,
  .crm-mobile-chrome__end,
  .crm-mobile-chrome .topbar-mobile-menu {
    pointer-events: auto;
  }

  .crm-mobile-chrome__start {
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  .crm-mobile-chrome__center {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .35rem;
    min-width: 0;
  }

  .crm-mobile-chrome__title {
    text-align: left;
  }

  .crm-mobile-chrome__end {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .crm-mobile-chrome #burgerBtn,
  .crm-mobile-chrome .burger-btn,
  .crm-mobile-chrome .topbar-back-floating,
  .crm-mobile-chrome .topbar-floating-toggle,
  .crm-mobile-chrome .topbar-mobile-menu {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    opacity: 1 !important;
    margin: 0 !important;
  }

  .crm-mobile-chrome #burgerBtn,
  .crm-mobile-chrome .burger-btn {
    display: inline-flex !important;
  }

  .crm-mobile-chrome .topbar-mobile-menu {
    display: block !important;
  }

  .crm-mobile-chrome .topbar-back-floating[hidden] {
    display: none !important;
  }

  body.crm-page-dashboard .crm-mobile-chrome__title {
    display: none;
  }

  .main-content > .content {
    padding-top: var(--crm-chrome-height) !important;
  }

  body.crm-topbar-expanded .main-content > .content {
    overflow: hidden;
  }

  body.sidebar-open .main-content > .content {
    overflow: hidden;
  }

  #crmTopbar.is-collapsed {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: none !important;
  }

  #crmTopbar:not(.is-collapsed) {
    display: block !important;
    top: var(--crm-chrome-height);
    left: 0;
    right: 0;
    bottom: 0;
    height: auto;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: #f4f6f8 !important;
  background: light-dark(#f4f6f8, #18212c) !important;
    box-shadow: none !important;
    z-index: 1310;
  }

  #crmTopbar:not(.is-collapsed) .container-fluid {
    padding: .75rem max(.65rem, calc(env(safe-area-inset-left, 0px) + .65rem)) 1rem max(.65rem, calc(env(safe-area-inset-right, 0px) + .65rem)) !important;
    background: transparent !important;
  }

  #crmTopbar:not(.is-collapsed) .topbar-primary-row,
  #crmTopbar:not(.is-collapsed) .topbar-left-tools,
  #crmTopbar:not(.is-collapsed) .topbar-inline-search-wrap,
  #crmTopbar:not(.is-collapsed) .topbar-inline-search,
  #crmTopbar:not(.is-collapsed) .topbar-search-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  #crmTopbar:not(.is-collapsed) .topbar-inline-search {
    margin-top: 0 !important;
  }

  #crmTopbar:not(.is-collapsed) .topbar-search-panel {
    background: var(--ds-surface);
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 16px;
    padding: .75rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .06);
  }

  #crmTopbar:not(.is-collapsed) .topbar-search-input {
    min-height: 44px;
    border-radius: 14px;
    font-size: 16px;
  }

  #crmTopbar:not(.is-collapsed) .topbar-search-tool-btn {
    width: 100%;
    border-radius: 12px;
  }

  #crmTopbar:not(.is-collapsed) #search-results-inline,
  #crmTopbar:not(.is-collapsed) #search-results-inline.search-results-mobile {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    margin-top: .5rem !important;
    max-height: none !important;
    overflow-y: auto;
    border-radius: 14px !important;
    box-shadow: none !important;
    border: 1px solid rgba(148, 163, 184, .14);
    background: var(--ds-surface);
  }

  .crm-mobile-chrome .topbar-floating-toggle[aria-expanded="true"] {
    border-color: #13b075 !important;
    background: var(--ds-accent-soft) !important;
    box-shadow: inset 0 0 0 1px rgba(19, 176, 117, .18) !important;
  }
}

.crm-mobile-chrome-btn:hover,
.crm-mobile-chrome-btn:focus-visible,
.crm-mobile-chrome .topbar-mobile-menu-btn:hover,
.crm-mobile-chrome .topbar-mobile-menu-btn:focus-visible,
.crm-mobile-chrome .topbar-mobile-menu.show .topbar-mobile-menu-btn,
.crm-mobile-chrome #burgerBtn[aria-expanded="true"] {
  background: color-mix(in srgb, var(--ds-surface) 100%, transparent) !important;
  border-color: rgba(148, 163, 184, .55);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .16) !important;
}

.crm-mobile-chrome #burgerBtn[aria-expanded="true"] .bi {
  color: var(--ds-accent);
}

@media (min-width: 1400px) {
  .crm-mobile-chrome {
    display: none !important;
  }
}

.crm-scroll-top-corner {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: clamp(76px, 24vw, 128px);
  height: var(--crm-chrome-height, calc(env(safe-area-inset-top, 0px) + 3.1rem));
  z-index: 1319;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  touch-action: manipulation;
  cursor: pointer;
}

.crm-scroll-top-corner.is-active {
  display: block;
}

body.quick-menu-open .crm-scroll-top-corner {
  display: none !important;
}

.crm-mobile-chrome__end,
.crm-mobile-chrome .topbar-mobile-menu,
.crm-mobile-chrome .topbar-mobile-menu-btn {
  position: relative;
  z-index: 1321;
}

.crm-pull-refresh {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1335;
  pointer-events: none;
  transform: translateY(calc(-100% + var(--crm-ptr-offset, 0px)));
  transition: transform .18s ease;
}

.crm-pull-refresh.is-visible {
  transition: none;
}

.crm-pull-refresh.is-refreshing .crm-pull-refresh__icon {
  animation: crmPullRefreshSpin .8s linear infinite;
}

.crm-pull-refresh__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: calc(var(--crm-chrome-height, calc(env(safe-area-inset-top, 0px) + 3.1rem)) + .35rem);
  padding:
    calc(env(safe-area-inset-top, 0px) + .45rem)
    .85rem
    .35rem;
  background: color-mix(in srgb, var(--ds-surface) 97%, transparent);
  border-bottom: 1px solid rgba(148, 163, 184, .18);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ds-text-2);
  font-size: clamp(.74rem, 2.2vw + .12rem, .84rem);
  font-weight: 600;
}

.crm-pull-refresh__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: rgba(23, 214, 143, .14);
  color: #0f5132;
  color: light-dark(#0f5132, #87a899);
  transform-origin: center;
}

.crm-pull-refresh.is-ready .crm-pull-refresh__icon {
  background: rgba(23, 214, 143, .24);
}

body.crm-pull-refresh-active .main-content > .content {
  pointer-events: none;
}

@keyframes crmPullRefreshSpin {
  to { transform: rotate(360deg); }
}

.topbar-back-desktop-wrap {
  display: none;
}

.topbar-back-desktop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: .32rem .56rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: var(--ds-surface) !important;
  color: var(--ds-text);
  box-shadow: none;
}

.topbar-back-desktop:hover,
.topbar-back-desktop:focus-visible {
  background: var(--ds-surface-2) !important;
  border-color: rgba(148, 163, 184, .45);
  color: var(--ds-accent);
}

@media (min-width: 1400px) {
  #crmTopbar .topbar-primary-row {
    position: relative;
    justify-content: center;
  }

  #crmTopbar .topbar-left-tools {
    flex: 0 1 700px;
    max-width: min(700px, calc(100vw - var(--sidebar-width) - var(--topbar-floating-reserve) - 1.5rem));
  }
}

.topbar-floating-actions {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 5px);
  right: max(.75rem, calc(env(safe-area-inset-right, 0px) + .5rem));
  z-index: 1305;
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: nowrap;
}

.topbar-floating-actions > * {
  flex: 0 0 auto;
}

.topbar-floating-toggle,
.topbar-back-floating {
  border-radius: 12px;
  min-height: 40px;
  min-width: 40px;
  padding: .32rem;
  line-height: 1;
  border: 1px solid rgba(148, 163, 184, .22);
  background: var(--ds-surface) !important;
  box-shadow: none !important;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  touch-action: manipulation;
}

.topbar-floating-toggle {
  min-width: 40px;
}

.topbar-floating-toggle .bi {
  font-size: 1rem;
  color: #2f7cff;
  color: light-dark(#2f7cff, #97beff);
  line-height: 1;
}

.topbar-back-floating {
  padding: .16rem .56rem;
  color: var(--ds-text);
}

.topbar-floating-toggle:hover,
.topbar-floating-toggle:focus-visible {
  background: var(--ds-surface-2) !important;
  border-color: rgba(148, 163, 184, .45);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .08) !important;
  opacity: 1;
  transform: none;
}

.topbar-back-floating:hover,
.topbar-back-floating:focus-visible {
  background: var(--ds-surface-2) !important;
  border-color: rgba(148, 163, 184, .45);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .08) !important;
  color: var(--ds-accent);
  opacity: 1;
  transform: none;
}

.topbar-back-floating .bi {
  font-size: 1rem;
  line-height: 1;
}

.topbar-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: .32rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: color-mix(in srgb, var(--ds-surface) 18%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
  opacity: .45;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease, transform .15s ease, color .15s ease;
}

.topbar-action-btn:hover,
.topbar-action-btn:focus-visible,
.topbar-floating-actions .dropdown.show > .topbar-action-btn {
  background: color-mix(in srgb, var(--ds-surface) 95%, transparent);
  border-color: rgba(148, 163, 184, .55);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .16);
  opacity: 1;
  transform: translateY(1px);
}

.topbar-action-btn .bi {
  color: #243043;
  color: light-dark(#243043, #e8edf3);
}

.topbar-action-btn:hover .bi,
.topbar-action-btn:focus-visible .bi,
.topbar-floating-actions .dropdown.show > .topbar-action-btn .bi {
  color: var(--ds-accent);
}

.topbar-profile-floating .header-avatar,
.topbar-profile-floating .avatar-initials {
  width: 34px;
  height: 34px;
}

.topbar-profile-floating .avatar-initials {
  background: rgba(245, 247, 250, .95);
  background: light-dark(rgba(245, 247, 250, .95), #18212cf2);
  color: #243043;
  color: light-dark(#243043, #e8edf3);
}

.topbar-profile-floating:hover .avatar-initials,
.topbar-profile-floating:focus-visible .avatar-initials,
.topbar-floating-actions .dropdown.show > .topbar-profile-floating .avatar-initials {
  background: var(--ds-surface);
  color: var(--ds-accent);
}

#topbarToggleBtn[aria-expanded="true"] .bi {
  color: var(--ds-accent);
}

#crmTopbar .topbar-primary-row {
  min-height: 52px;
}

#crmTopbar .topbar-actions {
  gap: .25rem;
}

#crmTopbar .topbar-actions > .icon-link,
#crmTopbar #notificationBell,
#crmTopbar .dropup > a[data-bs-toggle="dropdown"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: .32rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: color-mix(in srgb, var(--ds-surface) 18%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
  opacity: .45;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease, transform .15s ease, color .15s ease;
}

#crmTopbar .topbar-actions > .icon-link:hover,
#crmTopbar .topbar-actions > .icon-link:focus-visible,
#crmTopbar #notificationBell:hover,
#crmTopbar #notificationBell:focus-visible,
#crmTopbar .dropup > a[data-bs-toggle="dropdown"]:hover,
#crmTopbar .dropup > a[data-bs-toggle="dropdown"]:focus-visible,
#crmTopbar .dropup.show > a[data-bs-toggle="dropdown"],
#crmTopbar .dropdown.show > #notificationBell {
  background: color-mix(in srgb, var(--ds-surface) 95%, transparent);
  border-color: rgba(148, 163, 184, .55);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .16);
  opacity: 1;
  transform: translateY(1px);
}

#crmTopbar .topbar-actions > .icon-link .bi,
#crmTopbar #notificationBell .bi {
  color: #243043;
  color: light-dark(#243043, #e8edf3);
}

#crmTopbar .topbar-actions > .icon-link:hover .bi,
#crmTopbar .topbar-actions > .icon-link:focus-visible .bi,
#crmTopbar #notificationBell:hover .bi,
#crmTopbar #notificationBell:focus-visible .bi,
#crmTopbar .dropdown.show > #notificationBell .bi {
  color: var(--ds-accent);
}

#crmTopbar .dropup > a[data-bs-toggle="dropdown"] {
  text-decoration: none;
}

#crmTopbar .dropup > a[data-bs-toggle="dropdown"] .header-avatar {
  width: 34px;
  height: 34px;
}

#crmTopbar .dropup > a[data-bs-toggle="dropdown"] .avatar-initials {
  width: 34px;
  height: 34px;
  background: rgba(245, 247, 250, .95);
  background: light-dark(rgba(245, 247, 250, .95), #18212cf2);
  color: #243043;
  color: light-dark(#243043, #e8edf3);
}

#crmTopbar .dropup > a[data-bs-toggle="dropdown"]:hover .avatar-initials,
#crmTopbar .dropup > a[data-bs-toggle="dropdown"]:focus-visible .avatar-initials,
#crmTopbar .dropup.show > a[data-bs-toggle="dropdown"] .avatar-initials {
  background: var(--ds-surface);
  color: var(--ds-accent);
}

.topbar-notification-menu {
  width: min(94vw, 380px);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 14px;
  overflow: hidden;
}

#notifList .notif-dropdown-item {
  display: block;
  padding: .7rem .9rem;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  text-decoration: none;
  color: inherit;
}

#notifList .notif-dropdown-item:last-child {
  border-bottom: 0;
}

#notifList .notif-dropdown-item:hover {
  background: rgba(13, 110, 253, .05);
}

#notifList .notif-dropdown-title {
  display: block;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: .2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#notifList .notif-dropdown-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-size: .78rem;
  color: var(--ds-text-3);
  min-width: 0;
}

#notifList .notif-dot {
  width: .5rem;
  height: .5rem;
  border-radius: 999px;
  background: #dc3545;
  flex: 0 0 auto;
}

#crmTopbar .topbar-left-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
}

#crmTopbar .topbar-inline-search-wrap {
  display: flex;
  align-items: center;
  position: relative;
  flex: 1 1 auto;
  overflow: visible;
  min-width: 0;
  justify-content: center;
}

#crmTopbar .topbar-inline-search {
  position: relative;
  width: 100%;
  max-width: min(620px, 100%);
  overflow: visible;
  pointer-events: auto;
  z-index: 1310;
}

#crmTopbar .topbar-inline-search .form-control {
  min-width: 0;
  width: 100%;
  background: color-mix(in srgb, var(--ds-surface) 94%, transparent);
  border: 1px solid rgba(148, 163, 184, .18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
}

#crmTopbar .topbar-search-panel {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  width: 100%;
}

#crmTopbar .topbar-search-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
  width: 100%;
}

#crmTopbar .topbar-search-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 40px;
  padding: .45rem .65rem;
  font-size: .82rem;
  line-height: 1.1;
  white-space: nowrap;
}

#crmTopbar .topbar-search-tool-btn .bi {
  flex: 0 0 auto;
  font-size: .95rem;
}

#crmTopbar .topbar-search-tool-label {
  font-weight: 700;
}

#crmTopbar .topbar-search-tool-btn .crm-ai-beta-badge {
  margin-left: .1rem;
  font-size: .58rem;
  padding: .08rem .32rem;
}

@media (min-width: 1400px) {
  #crmTopbar .topbar-search-panel {
    flex-direction: row;
    align-items: center;
    gap: .55rem;
  }

  #crmTopbar .topbar-search-tools {
    display: inline-flex;
    grid-template-columns: none;
    flex: 0 0 auto;
    width: auto;
  }

  #crmTopbar .topbar-search-tool-btn {
    min-width: auto;
  }
}

@media (max-width: 1399.98px) {
  #crmTopbar:not(.is-collapsed) .topbar-search-tool-btn {
    width: 100%;
    border-radius: 12px;
  }
}

#crmTopbar #search-results-inline {
  left: 0;
  right: 0;
  top: calc(100% + .25rem);
  z-index: 1080;
}

#crmTopbar .topbar-expandable {
  max-height: 180px;
  opacity: 1;
  overflow: hidden;
  transition: max-height .28s ease, opacity .2s ease, margin-top .2s ease;
}

#crmTopbar.is-collapsed .topbar-expandable {
  max-height: 0;
  opacity: 0;
  margin-top: 0 !important;
  pointer-events: none;
}

@media (max-width: 768px) {
  #crmTopbar:not(.is-collapsed) .topbar-inline-search {
    margin-top: 0 !important;
  }
}

#crmTopbar .topbar-expand-toggle i {
  transition: transform .2s ease;
}

.topbar-floating-actions #notificationBell {
  position: relative;
  gap: .5rem;
}

.topbar-floating-actions #notificationBell .notification-bell-wrap {
  width: 1.6rem;
  height: 1.6rem;
}

.topbar-floating-actions #notificationBell .notification-bell-wrap .notif-badge {
  position: absolute;
  top: .1rem !important;
  right: .08rem !important;
  transform: none !important;
  z-index: 2;
}

#crmTopbar.is-collapsed .topbar-expand-toggle i {
  transform: rotate(-180deg);
}

.notif-user-initials {
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
  margin-left: .5rem;
  opacity: .78;
  letter-spacing: .02em;
}

@keyframes notifPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.2); }
  70% { transform: scale(.95); }
  100% { transform: scale(1); }
}

.notif-badge-animated {
  animation: notifPulse 1.2s ease-in-out infinite;
}

/* Toasts / Hinweise – Desktop rechts oben, Mobile als Banner ganz oben */
#crmUiToastHost,
.crm-ui-toast-host {
  --bs-toast-zindex: var(--crm-toast-z-index, 10100);
  position: fixed !important;
  top: calc(max(var(--crm-topbar-offset, 58px), var(--crm-chrome-height, 3.1rem)) + 0.75rem) !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  z-index: var(--crm-toast-z-index, 10100) !important;
  pointer-events: none;
}

#crmUiToastHost .toast,
.crm-ui-toast-host .toast {
  pointer-events: auto;
}

@media (max-width: 1399.98px) {
  #crmUiToastHost,
  .crm-ui-toast-host,
  .crm-ui-toast-host.crm-ui-toast-host--mobile {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding:
      env(safe-area-inset-top, 0px)
      0
      0 !important;
    z-index: var(--crm-toast-z-index, 10100) !important;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  #crmUiToastHost .toast,
  .crm-ui-toast-host .toast {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
  }

  #crmUiToastHost .toast .d-flex,
  .crm-ui-toast-host .toast .d-flex {
    align-items: center;
    min-height: 44px;
  }

  #crmUiToastHost .toast-body,
  .crm-ui-toast-host .toast-body {
    flex: 1 1 auto;
    padding: 0.72rem 1rem;
    font-size: clamp(0.84rem, 2.4vw + 0.2rem, 0.92rem);
    font-weight: 600;
    line-height: 1.35;
  }

  #crmUiToastHost .toast .btn-close,
  .crm-ui-toast-host .toast .btn-close {
    flex-shrink: 0;
    margin-right: 0.75rem !important;
  }
}

.login-notif-modal-dialog {
  width: min(96vw, 900px);
  max-width: 96vw;
  max-height: calc((var(--login-notif-vh, 1vh) * 100) - 1rem);
  max-height: calc(100dvh - 1rem);
  margin: .5rem auto;
}

#loginNotificationsModal {
  z-index: 20040;
}

#crmHomescreenInstallModal {
  z-index: 20050;
}

#crmMandatoryProfileModal {
  z-index: 20100;
}

body.crm-mandatory-profile-lock #crmMandatoryProfileModal.show {
  z-index: 20100 !important;
}

body.crm-mandatory-profile-lock .modal-backdrop.show {
  z-index: 20095 !important;
}

body.crm-mandatory-profile-lock .app,
body.crm-mandatory-profile-lock .crm-mandatory-profile-backdrop-block {
  pointer-events: none;
}

body.crm-mandatory-profile-lock #crmMandatoryProfileModal,
body.crm-mandatory-profile-lock #crmMandatoryProfileModal * {
  pointer-events: auto;
}

.crm-mandatory-profile-dialog {
  width: min(96vw, 760px);
  max-width: 96vw;
}

#crmMandatoryProfileModal .modal-content {
  border-radius: 14px;
}

#crmHomescreenInstallModal {
  z-index: 20110;
}

#crmHomescreenInstallModal.show {
  display: block;
}

.crm-homescreen-install-dialog {
  width: min(96vw, 520px);
  max-width: 96vw;
}

.crm-homescreen-url-box {
  padding: .85rem .95rem;
  border-radius: .85rem;
  background: var(--ds-surface-2);
  border: 1px solid rgba(148, 163, 184, .22);
}

.crm-homescreen-url {
  font-size: .82rem;
  word-break: break-all;
  color: var(--ds-text);
  background: var(--ds-surface);
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: .5rem;
  padding: .35rem .55rem;
}

.crm-homescreen-steps {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.crm-homescreen-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .75rem;
  align-items: start;
  padding: .85rem .95rem;
  border-radius: .85rem;
  background: var(--ds-surface-2);
  border: 1px solid rgba(148, 163, 184, .22);
}

.crm-homescreen-step__num {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #17D68F;
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  flex-shrink: 0;
}

.crm-homescreen-step__icon {
  font-size: 1.35rem;
  color: var(--ds-accent);
  margin-top: .1rem;
}

#loginNotificationsModal.show {
  display: block;
}

.modal-backdrop.show {
  z-index: 1000;
}

/* Manuelle Terminbestätigung: native Dialog-Ebene, damit die Frage
   über dem Kalender- und Kunden-Modal liegt. */
.crm-ui-confirm-dialog {
  border: 0;
  padding: 0;
  margin: auto;
  background: transparent;
  width: min(42rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  color: inherit;
}

.crm-ui-confirm-dialog::backdrop {
  background: rgba(32, 33, 36, 0.46);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.crm-ui-confirm-dialog .modal-content {
  border-radius: 14px;
}

.crm-ui-confirm-dialog .modal-footer {
  flex-wrap: nowrap;
  gap: 0.5rem;
}

@media (max-width: 640px) {
  .crm-ui-confirm-dialog .modal-footer {
    flex-wrap: wrap;
  }

  .crm-ui-confirm-dialog .modal-footer .btn {
    flex: 1 1 100%;
  }
}

.crm-ui-confirm-dialog .modal-footer .btn {
  white-space: normal;
}

#loginNotificationsModal .modal-content {
  max-height: calc((var(--login-notif-vh, 1vh) * 100) - 1rem);
  max-height: calc(100dvh - 1rem);
  border-radius: 14px;
}

#loginNotificationsModal .modal-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  max-height: calc((var(--login-notif-vh, 1vh) * 100) - 10.5rem);
  max-height: calc(100dvh - 10.5rem);
}

@media (max-width: 1399.98px) {
  body.crm-page-dashboard .topbar-back-floating {
    display: none !important;
  }
}

@media (min-width: 1400px) {
  #crmTopbar {
    pointer-events: auto;
  }
}

@media (max-width: 991.98px) {
  #crmTopbar {
    padding: .35rem !important;
  }

  #crmTopbar .topbar-primary-row {
    flex-wrap: wrap;
    min-height: 48px;
  }

  #crmTopbar .topbar-expandable {
    max-height: 230px;
  }

  #crmTopbar .crm-search {
    width: 100%;
  }

  #crmTopbar .topbar-left-tools {
    order: -1;
    width: 100%;
    flex: 0 0 100%;
    margin-bottom: 0;
  }

  #crmTopbar .topbar-inline-search-wrap,
  #crmTopbar .topbar-inline-search {
    width: 100%;
    min-width: 0;
  }

  #crmTopbar .topbar-inline-search {
    max-width: calc(100vw - 1rem);
  }

  .topbar-floating-actions .dropdown-menu,
  #crmTopbar .dropdown-menu {
    width: min(92vw, 360px) !important;
  }
}

@media (min-width: 1400px) {
  .topbar-floating-toggle {
    display: none !important;
  }

  #crmTopbar {
    transform: translate3d(0, 0, 0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  #crmTopbar .container-fluid {
    display: flex;
    justify-content: center;
  }

  #crmTopbar .topbar-primary-row {
    width: 100%;
    justify-content: center;
  }

  #crmTopbar .topbar-left-tools {
    flex: 0 1 700px;
    max-width: min(700px, calc(100vw - var(--sidebar-width) - var(--topbar-floating-reserve) - 1.5rem));
  }

  #crmTopbar .topbar-inline-search-wrap,
  #crmTopbar .topbar-inline-search {
    min-width: 0;
    width: 100%;
  }
}

@media (min-width: 1400px) and (max-width: 1760px) {
  :root {
    --topbar-floating-reserve: 20rem;
  }

  .topbar-floating-actions {
    gap: .22rem;
  }

  #crmTopbar .topbar-search-tool-label,
  #crmTopbar .topbar-search-tool-btn .crm-ai-beta-badge {
    display: none;
  }

  #crmTopbar .topbar-search-tool-btn {
    min-width: 40px;
    width: 40px;
    padding-inline: 0;
    justify-content: center;
  }

  .topbar-cache-reload-floating {
    min-width: 40px;
    padding-inline: .32rem;
  }

  .topbar-cache-reload-floating .crm-cache-reload-badge {
    display: none;
  }

  .topbar-cache-reload-floating .crm-cache-reload-icon {
    display: inline-flex;
    font-size: 1rem;
    color: #243043;
  color: light-dark(#243043, #e8edf3);
  }

  .topbar-floating-actions .crm-action-badge {
    top: -3px;
    right: -3px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: .62rem;
  }
}

@media (min-width: 1761px) {
  .topbar-cache-reload-floating .crm-cache-reload-icon {
    display: none;
  }
}

@media (min-width: 1200px) {
  .topbar-back-floating {
    left: auto;
  }
}

@media (max-width: 575.98px) {
  #crmTopbar .container-fluid {
    padding-left: .35rem;
    padding-right: .35rem;
  }

  #crmTopbar .topbar-primary-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    justify-content: flex-start;
  }

  #crmTopbar .topbar-left-tools {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    padding-left: 0;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
  }

  #crmTopbar .topbar-inline-search-wrap {
    flex: 1 1 100%;
    width: 100%;
    justify-content: stretch;
  }

  #crmTopbar .topbar-inline-search {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  #crmTopbar .topbar-inline-search .form-control {
    min-height: 40px;
    padding-left: .9rem;
    padding-right: .9rem;
    border-radius: 14px;
  }
}

@media (max-width: 767.98px) {
  #crmTopbar #search-results-inline:not(.search-results-mobile) {
    position: absolute;
    left: 0;
    top: calc(100% + .25rem);
    width: 100%;
    max-height: min(60vh, calc(100dvh - 220px));
    right: 0;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
    border-radius: 14px;
    z-index: 1400;
    background: var(--ds-surface);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: 0;
  }

  #crmTopbar #search-results-inline .list-group-item {
    width: 100%;
    max-width: 100%;
    border-radius: 0 !important;
  }

  #crmTopbar #search-results-inline:empty {
    display: none;
  }
}

@supports (-webkit-touch-callout: none) {
  #loginNotificationsModal .modal-body {
    padding-bottom: max(.75rem, env(safe-area-inset-bottom));
  }
}

