    /* Default Light Mode (Authentic WhatsApp Web) */
    :root,
    [data-theme="light"] {
      --bg-primary: #efeae2;
      /* WhatsApp Chat-Hintergrund Light */
      --bg-secondary: #f0f2f5;
      /* WhatsApp Header & Toolbar Light */
      --bg-sidebar: #ffffff;
      /* WhatsApp Sidebar Weiß */
      --bg-card: #f0f2f5;
      /* WhatsApp Kacheln & Suche */
      --text-main: #111b21;
      /* WhatsApp Text Schwarz */
      --text-muted: #667781;
      /* WhatsApp Sekundärtext Grau */
      --accent: #00a884;
      /* WhatsApp Green Signature */
      --accent-hover: #008f6f;
      --accent-soft: rgba(0, 168, 132, 0.12);
      --online-green: #25d366;
      --offline-red: #ea4335;
      --border: #e9edef;
      /* WhatsApp Trennlinien */
      --code-bg: #e2dfd7;

      /* WhatsApp-Style Chat-Blasen (Light Mode) */
      --bubble-out-bg: #d9fdd3;
      /* Original WhatsApp Grün für eigene Nachrichten */
      --bubble-out-text: #111b21;
      --bubble-in-bg: #ffffff;
      /* Original WhatsApp Weiß für fremde Nachrichten */
      --bubble-in-text: #111b21;
      --chat-pattern-opacity: 0.08;
    }

    /* Dark Mode (Authentic WhatsApp Web Dark) */
    [data-theme="dark"] {
      --bg-primary: #0b141a;
      /* WhatsApp Chat-Hintergrund Dark */
      --bg-secondary: #202c33;
      /* WhatsApp Header & Toolbar Dark */
      --bg-sidebar: #111b21;
      /* WhatsApp Sidebar Dunkel */
      --bg-card: #202c33;
      --text-main: #e9edef;
      /* WhatsApp Text Hell */
      --text-muted: #8696a0;
      /* WhatsApp Sekundärtext Hellgrau */
      --accent: #00a884;
      /* WhatsApp Green */
      --accent-hover: #02906f;
      --accent-soft: rgba(0, 168, 132, 0.16);
      --online-green: #25d366;
      --offline-red: #ef4444;
      --border: #222d34;
      /* WhatsApp Dark Borders */
      --code-bg: #090d15;

      /* WhatsApp-Style Chat-Blasen (Dark Mode) */
      --bubble-out-bg: #005c4b;
      /* Original WhatsApp Dunkelgrün */
      --bubble-out-text: #e9edef;
      --bubble-in-bg: #202c33;
      /* Original WhatsApp Dunkelgrau */
      --bubble-in-text: #e9edef;
      --chat-pattern-opacity: 0.04;
    }

    html {
      font-size: 15px;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", "Android Emoji", sans-serif;
    }

    body {
      background-color: var(--bg-primary);
      color: var(--text-main);
      height: 100vh;
      display: flex;
      flex-direction: column;
      font-size: 1rem;
      overflow: hidden;
      transition: background-color 0.2s ease, color 0.2s ease;
    }

    header {
      background-color: var(--bg-secondary);
      padding: 8px 20px;
      border-bottom: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
      transition: background-color 0.2s ease, border-color 0.2s ease;
    }

    .logo-container {
      display: flex;
      align-items: center;
      gap: 10px;
      cursor: pointer;
      user-select: none;
      transition: opacity 0.15s ease;
    }

    .logo-container:hover {
      opacity: 0.88;
    }

    .brand-logo {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      object-fit: cover;
      box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
      transition: transform 0.15s ease;
    }

    .logo-container:hover .brand-logo {
      transform: scale(1.08);
    }

    .brand-logo-large {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      object-fit: cover;
    }

    .logo-title {
      font-weight: 700;
      font-size: 1.2rem;
      letter-spacing: -0.3px;
    }

    .badge-e2ee {
      background: var(--accent-soft);
      color: var(--accent);
      border: 1px solid var(--accent);
      padding: 2px 8px;
      border-radius: 9999px;
      font-size: 0.75rem;
      font-weight: 600;
    }

    .header-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .user-pill {
      font-size: 0.85rem;
      background: var(--bg-card);
      padding: 4px 10px;
      border-radius: 20px;
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      transition: all 0.15s;
    }

    .user-pill:hover {
      background: var(--border);
    }

    .header-avatar {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      object-fit: cover;
    }

    .status-indicator {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 0.74rem;
      color: var(--text-muted);
      opacity: 0.85;
      padding: 3px 8px;
      border-radius: 12px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      user-select: none;
    }

    .status-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background-color: var(--offline-red);
      transition: background-color 0.2s;
      flex-shrink: 0;
    }

    .status-dot.online {
      background-color: var(--online-green);
    }

    .btn-action {
      background: var(--bg-card);
      border: 1px solid var(--border);
      color: var(--text-main);
      padding: 6px 12px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 0.82rem;
      font-weight: 500;
      transition: all 0.15s;
    }

    .btn-action:hover {
      background: var(--border);
    }

    /* Kleiner, eleganter Dark/Light Button */
    .btn-theme-toggle-compact {
      background: var(--bg-card);
      border: 1px solid var(--border);
      color: var(--text-main);
      width: 32px;
      height: 32px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 0.95rem;
      transition: all 0.15s ease;
      padding: 0;
      flex-shrink: 0;
    }

    .btn-theme-toggle-compact:hover {
      background: var(--border);
      transform: scale(1.08);
    }

    .app-layout {
      display: flex;
      flex: 1;
      overflow: hidden;
      position: relative;
    }

    .sidebar {
      width: 380px;
      min-width: 320px;
      max-width: 440px;
      background-color: var(--bg-sidebar);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      transition: background-color 0.2s ease, border-color 0.2s ease;
    }

    .sidebar-top-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background-color: var(--bg-secondary);
      padding: 6px 12px;
      border-bottom: 1px solid var(--border);
      min-height: 52px;
    }

    .sidebar-top-bar .sidebar-tabs {
      display: flex;
      border-bottom: none;
      background: transparent;
      flex: 1;
      gap: 4px;
    }

    .tab-btn {
      padding: 8px 10px;
      background: none;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      font-weight: 600;
      font-size: 0.88rem;
      transition: all 0.15s;
      border-bottom: 3px solid transparent;
      white-space: nowrap;
    }

    .tab-btn.active {
      color: var(--accent);
      border-bottom: 3px solid var(--accent);
      background: transparent;
    }

    .sidebar-top-actions {
      display: flex;
      align-items: center;
      gap: 4px;
      margin-left: 6px;
    }

    .whatsapp-header-icon-btn {
      background: transparent;
      border: none;
      color: var(--text-muted);
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background-color 0.15s, color 0.15s;
      flex-shrink: 0;
      position: relative;
    }

    .whatsapp-header-icon-btn:hover {
      background-color: rgba(134, 150, 160, 0.18);
      color: var(--text-main);
    }

    .sidebar-search-row {
      padding: 8px 12px;
      background-color: var(--bg-sidebar);
      border-bottom: 1px solid var(--border);
    }

    .whatsapp-search-pill {
      display: flex;
      align-items: center;
      background-color: var(--bg-secondary);
      border-radius: 8px;
      padding: 0 12px;
      height: 36px;
      border: 1px solid transparent;
      transition: border-color 0.15s, background-color 0.15s;
    }

    .whatsapp-search-pill:focus-within {
      border-color: var(--accent);
      background-color: var(--bg-sidebar);
    }

    .whatsapp-search-pill .search-icon {
      color: var(--text-muted);
      font-size: 0.85rem;
      margin-right: 8px;
      display: flex;
      align-items: center;
    }

    .whatsapp-search-pill .search-input {
      flex: 1;
      background: transparent;
      border: none;
      color: var(--text-main);
      font-size: 0.88rem;
      outline: none;
      padding: 0;
      width: 100%;
    }

    /* WhatsApp Web Style Filter Pills */
    .chat-filter-pills {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 8px;
      overflow-x: auto;
      scrollbar-width: none;
      -ms-overflow-style: none;
      padding-bottom: 2px;
    }
    .chat-filter-pills::-webkit-scrollbar {
      display: none;
    }

    .chat-filter-pill {
      background: var(--bg-card);
      color: var(--text-muted);
      border: 1px solid var(--border);
      border-radius: 9999px;
      padding: 5px 13px;
      font-size: 0.82rem;
      font-weight: 500;
      cursor: pointer;
      white-space: nowrap;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: all 0.15s ease;
      user-select: none;
      line-height: 1.2;
    }

    .chat-filter-pill:hover {
      background: var(--border);
      color: var(--text-main);
    }

    /* Aktiver Filter: Passt sich dynamisch dem eingestellten Theme / Akzent an */
    .chat-filter-pill.active {
      background: var(--accent-soft);
      color: var(--accent);
      border-color: var(--accent);
      font-weight: 600;
    }

    .filter-pill-badge {
      background: var(--accent);
      color: #ffffff;
      border-radius: 9999px;
      font-size: 0.70rem;
      font-weight: 700;
      padding: 1px 6px;
      line-height: 1.2;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    /* Gruppen-Mitglieder Einladung */
    .group-member-list {
      max-height: 180px;
      overflow-y: auto;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg-secondary);
      padding: 4px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      margin-top: 6px;
    }

    .group-member-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 6px 10px;
      border-radius: 6px;
      background: var(--bg-sidebar);
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s;
      border: 1px solid transparent;
      user-select: none;
    }

    .group-member-item:hover {
      background: var(--bg-card);
    }

    .group-member-item.selected {
      background: var(--accent-soft);
      border-color: var(--accent);
    }

    .group-member-avatar {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--accent);
      color: #ffffff;
      font-size: 0.72rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    /* WhatsApp Web Style Gruppen-Header & Info */
    .room-header-clickable {
      cursor: pointer;
      border-radius: 8px;
      padding: 4px 8px;
      margin: -4px -8px;
      transition: background-color 0.15s;
    }

    .room-header-clickable:hover {
      background-color: rgba(134, 150, 160, 0.12);
    }

    /* Gruppeneinladungs-Banner */
    .group-invite-banner {
      background-color: var(--bg-card);
      border-bottom: 1px solid var(--border);
      padding: 10px 18px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      z-index: 9;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    }

    .group-invite-banner-locked {
      background-color: var(--bg-secondary);
      color: var(--text-muted);
      padding: 14px;
      text-align: center;
      font-size: 0.88rem;
      border-top: 1px solid var(--border);
    }

    /* Status- und Rollen-Badges für Gruppenmitglieder */
    .member-badge-active {
      background: rgba(37, 211, 102, 0.15);
      color: var(--online-green);
      padding: 2px 8px;
      border-radius: 12px;
      font-size: 0.72rem;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .member-badge-invited {
      background: rgba(234, 179, 8, 0.15);
      color: #d97706;
      padding: 2px 8px;
      border-radius: 12px;
      font-size: 0.72rem;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .member-badge-owner {
      background: rgba(0, 168, 132, 0.15);
      color: var(--accent);
      padding: 2px 8px;
      border-radius: 12px;
      font-size: 0.72rem;
      font-weight: 600;
    }

    .member-badge-admin {
      background: rgba(59, 130, 246, 0.15);
      color: #3b82f6;
      padding: 2px 8px;
      border-radius: 12px;
      font-size: 0.72rem;
      font-weight: 600;
    }

    .group-info-stats-row {
      display: flex;
      gap: 8px;
      margin: 10px 0;
    }

    .group-info-stat-pill {
      flex: 1;
      padding: 8px;
      border-radius: 8px;
      background: var(--bg-secondary);
      border: 1px solid var(--border);
      text-align: center;
      font-size: 0.8rem;
      font-weight: 600;
    }

    .group-info-tab-bar {
      display: flex;
      gap: 6px;
      border-bottom: 1px solid var(--border);
      margin-bottom: 10px;
      padding-bottom: 6px;
    }

    .group-info-tab {
      background: transparent;
      border: none;
      padding: 6px 12px;
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-muted);
      cursor: pointer;
      border-radius: 6px;
      transition: all 0.15s;
    }

    .group-info-tab.active {
      background: var(--accent-soft);
      color: var(--accent);
    }

    .btn-primary-action {
      flex: 1;
      background: var(--accent);
      color: #ffffff;
      border: none;
      padding: 8px 12px;
      border-radius: 8px;
      cursor: pointer;
      font-weight: 600;
      font-size: 0.82rem;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      transition: background 0.15s;
    }

    .btn-primary-action:hover {
      background: var(--accent-hover);
    }

    .btn-secondary-action {
      background: var(--bg-card);
      border: 1px solid var(--border);
      color: var(--text-main);
      padding: 8px 12px;
      border-radius: 8px;
      cursor: pointer;
      font-weight: 500;
      font-size: 0.82rem;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      transition: all 0.15s;
    }

    .btn-secondary-action:hover {
      background: var(--border);
    }

    .share-channel-btn {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 14px;
      border-radius: 10px;
      cursor: pointer;
      border: 1px solid var(--border);
      background: var(--bg-card);
      text-align: left;
      transition: all 0.15s ease-in-out;
      user-select: none;
    }

    .share-channel-btn:hover {
      transform: translateY(-1px);
      filter: brightness(1.05);
      box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

    .share-channel-btn:active {
      transform: translateY(0);
    }

    .search-input {
      width: 100%;
      background-color: var(--bg-secondary);
      border: 1px solid transparent;
      color: var(--text-main);
      padding: 8px 14px;
      border-radius: 8px;
      outline: none;
      font-size: 0.88rem;
      transition: border-color 0.15s;
    }

    .search-input:focus {
      border-color: var(--accent);
      background-color: var(--bg-card);
    }

    .list-container {
      flex: 1;
      overflow-y: auto;
      list-style: none;
    }

    .sidebar-divider {
      height: 1px;
      background: var(--border);
      margin: 4px 16px;
      opacity: 0.8;
    }

    .sidebar-section-header {
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: var(--text-muted);
      padding: 8px 16px 4px 16px;
    }

    /* WhatsApp Authentic Chat Item */
    .chat-item,
    .user-item {
      padding: 0 16px;
      height: 72px;
      border-bottom: 1px solid var(--border);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 14px;
      transition: background 0.12s ease;
      position: relative;
    }

    .chat-item:hover,
    .user-item:hover {
      background-color: var(--bg-secondary);
    }

    .btn-remove-contact {
      background: transparent;
      border: none;
      color: var(--text-muted);
      width: 26px;
      height: 26px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 0.82rem;
      cursor: pointer;
      opacity: 0;
      transition: all 0.15s ease;
      margin-left: auto;
      flex-shrink: 0;
    }

    .user-item:hover .btn-remove-contact {
      opacity: 0.75;
    }

    .btn-remove-contact:hover {
      opacity: 1 !important;
      background: rgba(239, 68, 68, 0.12);
      color: var(--offline-red);
      transform: scale(1.1);
    }

    /* 3-Punkte Kontext-Menü für Kontakte */
    .btn-item-more {
      background: transparent;
      border: none;
      color: var(--text-muted);
      width: 26px;
      height: 26px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 1.15rem;
      cursor: pointer;
      opacity: 0.7;
      transition: all 0.15s ease;
      line-height: 1;
      padding: 0;
      flex-shrink: 0;
    }

    .btn-item-more:hover {
      opacity: 1;
      background: var(--bg-hover);
      color: var(--text-main);
    }

    .contact-dropdown-menu {
      position: fixed;
      z-index: 10000;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 10px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
      min-width: 215px;
      padding: 5px;
      display: flex;
      flex-direction: column;
      gap: 2px;
      animation: fadeInDropdown 0.12s ease-out;
    }

    @keyframes fadeInDropdown {
      from { opacity: 0; transform: translateY(-4px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .contact-dropdown-item {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      padding: 8px 12px;
      font-size: 0.84rem;
      font-weight: 500;
      background: transparent;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      color: var(--text-main);
      text-align: left;
      transition: background 0.12s ease, color 0.12s ease;
      user-select: none;
    }

    .contact-dropdown-item:hover {
      background: var(--bg-hover);
    }

    .contact-dropdown-item.danger {
      color: var(--offline-red);
    }

    .contact-dropdown-item.danger:hover {
      background: rgba(234, 67, 53, 0.12);
    }

    .contact-dropdown-divider {
      height: 1px;
      background: var(--border);
      margin: 4px 0;
    }

    .chat-item.active {
      background-color: var(--bg-secondary);
    }

    /* =========================================================================
       EMPTY STATE DASHBOARD (WhatsApp Web Style)
       ========================================================================= */
    .empty-state-dashboard {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      background-color: var(--bg-primary);
      padding: 30px 20px;
      overflow-y: auto;
      text-align: center;
      user-select: none;
      width: 100%;
      height: 100%;
    }

    .dash-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      max-width: 480px;
      width: 100%;
      animation: fadeInDashboard 0.22s ease-out;
    }

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

    /* 1. Profil-Kopfzeile oben drüber */
    .dash-profile-card {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-bottom: 22px;
    }

    .dash-avatar-wrapper {
      position: relative;
      cursor: pointer;
      margin-bottom: 10px;
      transition: transform 0.18s ease;
    }

    .dash-avatar-wrapper:hover {
      transform: scale(1.04);
    }

    .dash-avatar-img {
      width: 84px;
      height: 84px;
      border-radius: 50%;
      object-fit: cover;
      border: 3px solid var(--accent);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
      display: block;
    }

    .dash-avatar-edit-badge {
      position: absolute;
      bottom: 2px;
      right: 2px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 50%;
      width: 26px;
      height: 26px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.80rem;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    }

    .dash-user-name-row {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .dash-user-name {
      font-size: 1.35rem;
      font-weight: 700;
      color: var(--text-main);
      margin: 0;
    }

    .dash-edit-name-btn {
      background: none;
      border: none;
      cursor: pointer;
      font-size: 1.05rem;
      padding: 2px 4px;
      opacity: 0.75;
      transition: opacity 0.15s ease, transform 0.15s ease;
    }

    .dash-edit-name-btn:hover {
      opacity: 1;
      transform: scale(1.15);
    }

    .dash-user-email {
      font-size: 0.85rem;
      color: var(--text-muted);
      margin-top: 3px;
    }

    .dash-user-status {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 0.76rem;
      color: var(--accent);
      background: var(--accent-soft);
      padding: 3px 10px;
      border-radius: 12px;
      margin-top: 8px;
      font-weight: 500;
    }

    /* 2. Mittige WhatsApp-Karte */
    .dash-feature-card {
      background: var(--bg-secondary);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 26px 24px;
      width: 100%;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .dash-illu-icon-circle {
      width: 66px;
      height: 66px;
      border-radius: 50%;
      background: var(--accent-soft);
      color: var(--accent);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 12px;
    }

    .dash-feature-title {
      font-size: 1.15rem;
      font-weight: 700;
      color: var(--text-main);
      margin: 0 0 8px 0;
    }

    .dash-feature-desc {
      font-size: 0.85rem;
      color: var(--text-muted);
      line-height: 1.45;
      margin: 0 0 18px 0;
      max-width: 360px;
    }

    .dash-feature-btn {
      background: var(--accent);
      color: #ffffff;
      border: none;
      border-radius: 24px;
      padding: 9px 24px;
      font-size: 0.88rem;
      font-weight: 600;
      cursor: pointer;
      box-shadow: 0 3px 8px rgba(0, 168, 132, 0.35);
      transition: background 0.15s ease, transform 0.15s ease;
    }

    .dash-feature-btn:hover {
      background: var(--accent-hover);
      transform: translateY(-1px);
    }

    /* 3. Untere runde Schnellaktions-Buttons */
    .dash-quick-actions-row {
      display: flex;
      align-items: flex-start;
      justify-content: center;
      gap: 20px;
      margin-top: 24px;
      flex-wrap: wrap;
    }

    .dash-action-btn {
      background: none;
      border: none;
      display: flex;
      flex-direction: column;
      align-items: center;
      cursor: pointer;
      width: 80px;
      transition: transform 0.15s ease;
    }

    .dash-action-btn:hover {
      transform: translateY(-2px);
    }

    .dash-action-icon-circle {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: var(--bg-card);
      border: 1px solid var(--border);
      color: var(--text-main);
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    }

    .dash-action-btn:hover .dash-action-icon-circle {
      background: var(--accent);
      color: #ffffff;
      border-color: var(--accent);
    }

    .dash-action-label {
      font-size: 0.74rem;
      color: var(--text-muted);
      margin-top: 8px;
      line-height: 1.25;
      text-align: center;
      font-weight: 500;
      transition: color 0.15s ease;
    }

    .dash-action-btn:hover .dash-action-label {
      color: var(--text-main);
    }

    .new-chat-action-row:hover,
    .new-chat-contact-item:hover {
      background-color: var(--accent-soft) !important;
    }

    .avatar-wrapper {
      position: relative;
      flex-shrink: 0;
    }

    .avatar-img-circle {
      width: 49px;
      height: 49px;
      border-radius: 50%;
      object-fit: cover;
      display: block;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    }

    .avatar-dot {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      position: absolute;
      bottom: 1px;
      right: 1px;
      border: 2px solid var(--bg-sidebar);
      background-color: var(--offline-red);
    }

    .avatar-dot.online {
      background-color: var(--online-green);
    }

    .item-info {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .item-name {
      font-weight: 500;
      font-size: 16px;
      color: var(--text-main);
      display: flex;
      justify-content: space-between;
      align-items: center;
      line-height: 21px;
    }

    .chat-tag {
      font-size: 0.65rem;
      font-weight: 600;
      padding: 1px 6px;
      border-radius: 4px;
      background: rgba(0, 0, 0, 0.06);
      color: var(--text-muted);
      margin-left: 6px;
    }

    [data-theme="dark"] .chat-tag {
      background: rgba(255, 255, 255, 0.08);
    }

    .item-sub-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 3px;
    }

    .item-sub {
      font-size: 13.5px;
      color: var(--text-muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      flex: 1;
      line-height: 18px;
    }

    /* Signal Red Unread Badge */
    .unread-badge {
      background-color: var(--offline-red, #ef4444);
      color: #ffffff;
      font-size: 11px;
      font-weight: 700;
      padding: 0 6px;
      height: 20px;
      min-width: 20px;
      border-radius: 10px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-left: 6px;
      box-shadow: 0 1px 3px rgba(234, 67, 53, 0.4);
    }

    .chat-area {
      flex: 1;
      display: flex;
      flex-direction: column;
      background-color: var(--bg-primary);
      position: relative;
      transition: background-color 0.2s ease;
    }

    .room-header {
      height: 60px;
      padding: 0 16px;
      background-color: var(--bg-secondary);
      border-bottom: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
      transition: background-color 0.2s ease, border-color 0.2s ease;
      z-index: 10;
    }

    .room-header h3 {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-main);
      line-height: 20px;
    }

    .btn-mobile-back {
      display: none;
      background: transparent;
      border: 1px solid var(--border);
      color: var(--text-main);
      padding: 6px 12px;
      border-radius: 20px;
      cursor: pointer;
      font-size: 0.82rem;
      font-weight: 600;
      align-items: center;
      gap: 4px;
    }

    .room-tools {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .typing-status-text {
      font-size: 0.78rem;
      color: var(--accent);
      font-style: italic;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .typing-dots span {
      animation: blink-dot 1.4s infinite both;
      display: inline-block;
      font-size: 0.7rem;
    }

    .typing-dots span:nth-child(2) {
      animation-delay: 0.2s;
    }

    .typing-dots span:nth-child(3) {
      animation-delay: 0.4s;
    }

    @keyframes blink-dot {

      0%,
      80%,
      100% {
        opacity: 0.2;
        transform: scale(0.8);
      }

      40% {
        opacity: 1;
        transform: scale(1.15);
      }
    }

    /* Floating Sprung-Button für 1. ungelesene Nachricht */
    .jump-unread-container {
      position: absolute;
      top: 68px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 100;
      pointer-events: auto;
    }

    .btn-jump-unread {
      background: #ffffff;
      color: var(--accent);
      border: 1px solid var(--border);
      padding: 6px 16px;
      border-radius: 9999px;
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
      display: flex;
      align-items: center;
      gap: 6px;
      transition: all 0.2s ease;
    }

    [data-theme="dark"] .btn-jump-unread {
      background: #202c33;
      color: #53bdeb;
      border-color: #222d34;
    }

    .btn-jump-unread:hover {
      background: var(--bg-card);
      transform: scale(1.04);
    }

    .btn-scroll-bottom {
      position: absolute;
      bottom: 75px;
      right: 24px;
      width: 42px;
      height: 42px;
      background: var(--bg-secondary);
      border: 1px solid var(--border);
      color: var(--text-main);
      padding: 0;
      border-radius: 50%;
      font-size: 1.15rem;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 50;
      transition: all 0.15s ease;
    }

    .btn-scroll-bottom:hover {
      background: var(--border);
      transform: scale(1.08);
    }

    .scroll-unread-badge {
      position: absolute;
      top: -6px;
      right: -4px;
      background: var(--accent);
      color: #ffffff;
      font-size: 0.72rem;
      font-weight: 700;
      min-width: 18px;
      height: 18px;
      border-radius: 9px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 4px;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    }

    /* WhatsApp-Style Trenner für Datumsangaben & ungelesene Nachrichten */
    .unread-divider,
    .date-divider {
      display: flex;
      justify-content: center;
      align-items: center;
      margin: 12px 0;
      width: 100%;
      clear: both;
      pointer-events: none;
    }

    .unread-divider span,
    .date-divider span {
      background: var(--bg-card);
      color: var(--text-muted);
      font-size: 0.75rem;
      font-weight: 600;
      padding: 4px 12px;
      border-radius: 9999px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
      border: 1px solid var(--border);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .unread-divider span {
      color: var(--accent);
      border-color: rgba(0, 168, 132, 0.35);
      background: rgba(0, 168, 132, 0.08);
      font-weight: 700;
      text-transform: none;
      letter-spacing: normal;
    }

    [data-theme="dark"] .unread-divider span,
    [data-theme="dark"] .date-divider span {
      background-color: #182229;
      color: #8696a0;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    }

    .highlight-pulse {
      animation: highlight-pulse-anim 2s ease;
    }

    @keyframes highlight-pulse-anim {

      0%,
      100% {
        box-shadow: 0 0 0 rgba(0, 168, 132, 0);
      }

      30%,
      70% {
        box-shadow: 0 0 12px var(--accent);
      }
    }

    /* WhatsApp-Style Nachrichten-Layout mit Doodle Wallpaper */
    .messages-container {
      position: relative;
      flex: 1;
      padding: 16px 28px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 5px;
      background-color: var(--bg-primary);
      background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 20 L15 14 L21 20 M15 14 L15 28 M35 15 C33 13 30 13 28 15 C26 17 26 20 28 22 L35 29 L42 22 C44 20 44 17 42 15 C40 13 37 13 35 15 Z M60 16 A6 6 0 1 0 60 28 A6 6 0 1 0 60 16 Z M85 14 L95 14 L95 24 L85 24 Z M105 18 C108 14 114 14 117 18 L111 26 Z M10 50 A5 5 0 0 1 20 50 A5 5 0 0 1 10 50 Z M40 45 L50 55 M50 45 L40 55 M75 48 C72 45 68 45 65 48 C62 51 62 55 65 58 L75 68 L85 58 C88 55 88 51 85 48 C82 45 78 45 75 48 Z M100 46 L112 46 L106 58 Z M20 80 L30 72 L30 88 Z M55 76 A7 7 0 1 0 55 90 A7 7 0 1 0 55 76 Z M80 75 L90 85 M80 85 L90 75 M105 80 L115 80 L115 90 L105 90 Z M15 105 L25 115 M25 105 L15 115 M45 102 C42 100 38 100 35 102 C32 104 32 108 35 110 L45 120 L55 110 C58 108 58 104 55 102 C52 100 48 100 45 102 Z M75 104 A6 6 0 1 0 75 116 A6 6 0 1 0 75 104 Z M100 105 L110 98 L110 112 Z' fill='%23000000' fill-opacity='0.045' fill-rule='evenodd'/%3E%3C/svg%3E");
    }

    [data-theme="dark"] .messages-container {
      background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 20 L15 14 L21 20 M15 14 L15 28 M35 15 C33 13 30 13 28 15 C26 17 26 20 28 22 L35 29 L42 22 C44 20 44 17 42 15 C40 13 37 13 35 15 Z M60 16 A6 6 0 1 0 60 28 A6 6 0 1 0 60 16 Z M85 14 L95 14 L95 24 L85 24 Z M105 18 C108 14 114 14 117 18 L111 26 Z M10 50 A5 5 0 0 1 20 50 A5 5 0 0 1 10 50 Z M40 45 L50 55 M50 45 L40 55 M75 48 C72 45 68 45 65 48 C62 51 62 55 65 58 L75 68 L85 58 C88 55 88 51 85 48 C82 45 78 45 75 48 Z M100 46 L112 46 L106 58 Z M20 80 L30 72 L30 88 Z M55 76 A7 7 0 1 0 55 90 A7 7 0 1 0 55 76 Z M80 75 L90 85 M80 85 L90 75 M105 80 L115 80 L115 90 L105 90 Z M15 105 L25 115 M25 105 L15 115 M45 102 C42 100 38 100 35 102 C32 104 32 108 35 110 L45 120 L55 110 C58 108 58 104 55 102 C52 100 48 100 45 102 Z M75 104 A6 6 0 1 0 75 116 A6 6 0 1 0 75 104 Z M100 105 L110 98 L110 112 Z' fill='%23ffffff' fill-opacity='0.035' fill-rule='evenodd'/%3E%3C/svg%3E");
    }

    .message-row {
      display: flex;
      width: 100%;
      margin-bottom: 2px;
    }

    .message-row.outgoing {
      justify-content: flex-end;
    }

    .message-row.incoming {
      justify-content: flex-start;
    }

    /* WhatsApp Original Message Bubbles mit Corner Tails */
    .message-bubble {
      max-width: 65%;
      min-width: 85px;
      padding: 6px 9px 6px 11px;
      line-height: 1.42;
      font-size: 14.2px;
      position: relative;
      word-break: break-word;
      transition: opacity 0.2s ease;
      box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
    }

    .message-bubble.incoming {
      background-color: var(--bubble-in-bg);
      color: var(--bubble-in-text);
      border-radius: 0px 8px 8px 8px;
      margin-right: auto;
      margin-left: 8px;
      border: none;
    }

    .message-bubble.incoming::before {
      content: "";
      position: absolute;
      top: 0;
      left: -8px;
      width: 0;
      height: 0;
      border-top: 10px solid var(--bubble-in-bg);
      border-left: 8px solid transparent;
    }

    .message-bubble.outgoing {
      background-color: var(--bubble-out-bg);
      color: var(--bubble-out-text);
      border-radius: 8px 0px 8px 8px;
      margin-left: auto;
      margin-right: 8px;
      border: none;
    }

    .message-bubble.outgoing::before {
      content: "";
      position: absolute;
      top: 0;
      right: -8px;
      width: 0;
      height: 0;
      border-top: 10px solid var(--bubble-out-bg);
      border-right: 8px solid transparent;
    }

    .msg-large-emoji {
      font-size: 2.2rem !important;
      line-height: 1.25 !important;
      display: inline-block;
      padding: 4px 2px;
      font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
    }

    .message-author {
      font-size: 12.8px;
      font-weight: 600;
      color: #1f9c87;
      margin-bottom: 2px;
    }

    [data-theme="dark"] .message-author {
      color: #53bdeb;
    }

    .msg-body {
      display: inline;
    }

    .message-meta {
      font-size: 11px;
      color: #667781;
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 3px;
      float: right;
      margin-left: 8px;
      margin-top: 4px;
      user-select: none;
      vertical-align: bottom;
      white-space: nowrap;
      line-height: 1;
      height: 15px;
    }

    [data-theme="dark"] .message-meta {
      color: #8696a0;
    }

    .msg-time {
      font-size: 11px;
      line-height: 1;
      white-space: nowrap;
    }

    /* WhatsApp Checkmarks: Exakt 16x11px SVG Häkchen mit stroke */
    .receipt-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 11px;
      line-height: 1;
      flex-shrink: 0;
      vertical-align: middle;
      text-align: right;
    }

    .receipt-icon.sent svg path {
      stroke: #8696a0;
    }

    .receipt-icon.delivered svg path {
      stroke: #8696a0;
    }

    .receipt-icon.read svg path {
      stroke: #53bdeb !important;
    }

    [data-theme="dark"] .receipt-icon.delivered svg path {
      stroke: #8696a0;
    }

    [data-theme="dark"] .receipt-icon.read svg path {
      stroke: #53bdeb !important;
    }

    /* Aktions-Buttons: Erscheinen sanft im Meta-Bereich beim Hover über die Bubble */
    .msg-actions {
      display: none;
      align-items: center;
      gap: 3px;
      margin-left: 4px;
    }

    .message-bubble:hover .msg-actions {
      display: inline-flex;
    }

    .msg-btn-icon {
      background: transparent !important;
      border: none !important;
      outline: none !important;
      color: inherit;
      cursor: pointer;
      font-size: 0.82rem;
      padding: 0 1px;
      line-height: 1;
      opacity: 0.7;
      transition: opacity 0.15s ease, transform 0.15s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    [data-theme="dark"] .msg-btn-icon {
      background: transparent !important;
      color: var(--text-main);
    }

    .msg-btn-icon:hover {
      opacity: 1;
      transform: scale(1.25);
      background: transparent !important;
    }

    [data-theme="dark"] .msg-btn-icon:hover {
      background: transparent !important;
    }

    .msg-btn-icon.copied {
      opacity: 1;
      color: var(--online-green);
    }

    /* Markdown Styles (WhatsApp & Classic) */
    .md-code-block {
      background: rgba(0, 0, 0, 0.1);
      padding: 8px 12px;
      border-radius: 6px;
      font-family: Consolas, Monaco, "Courier New", monospace;
      font-size: 0.88rem;
      overflow-x: auto;
      margin: 6px 0;
      white-space: pre-wrap;
    }

    [data-theme="dark"] .md-code-block {
      background: rgba(0, 0, 0, 0.35);
    }

    .md-inline-code {
      background: rgba(0, 0, 0, 0.08);
      padding: 2px 5px;
      border-radius: 4px;
      font-family: Consolas, Monaco, "Courier New", monospace;
      font-size: 0.88rem;
    }

    [data-theme="dark"] .md-inline-code {
      background: rgba(255, 255, 255, 0.12);
    }

    .md-quote {
      border-left: 3px solid var(--accent);
      padding-left: 8px;
      margin: 4px 0;
      opacity: 0.85;
      font-style: italic;
    }

    .md-list {
      margin: 4px 0 4px 18px;
      padding: 0;
    }

    .md-link {
      color: var(--accent);
      text-decoration: underline;
      word-break: break-all;
    }

    .md-h {
      margin: 6px 0 2px 0;
      font-weight: 700;
    }


    .search-highlight {
      background-color: #facc15;
      color: #000000;
      padding: 1px 3px;
      border-radius: 3px;
      font-weight: 600;
      scroll-margin: 120px 0;
      transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s;
    }

    .search-highlight.search-highlight-active {
      background-color: #ff6b00 !important;
      color: #ffffff !important;
      box-shadow: 0 0 0 2px #ff9800, 0 0 10px rgba(255, 107, 0, 0.75);
      border-radius: 3px;
      font-weight: 700;
      animation: searchMatchPulse 1.4s infinite ease-in-out;
    }

    @keyframes searchMatchPulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.12); }
    }

    .chat-search-wrapper {
      display: flex;
      align-items: center;
      background: var(--bg-primary);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 2px 8px;
      gap: 4px;
      transition: all 0.2s ease;
      min-width: 0;
    }

    .chat-search-wrapper:focus-within {
      border-color: var(--accent) !important;
      box-shadow: 0 0 0 2px var(--accent-soft);
    }

    .chat-search-wrapper.has-query {
      border-color: var(--accent);
    }

    .chat-search-wrapper.has-no-match {
      border-color: rgba(239, 68, 68, 0.7) !important;
    }

    .btn-search-nav {
      background: transparent;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      padding: 3px 5px;
      border-radius: 4px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
      transition: background-color 0.15s, color 0.15s;
    }

    .btn-search-nav:hover:not(:disabled) {
      background: var(--bg-hover, rgba(255, 255, 255, 0.1));
      color: var(--text-main);
    }

    .btn-search-nav:disabled {
      opacity: 0.35;
      cursor: not-allowed;
    }

    .btn-search-clear:hover {
      color: var(--offline-red, #ef4444) !important;
    }

    /* Bildvorschau Thumbnail */
    .attachment-preview-box {
      margin-top: 6px;
      max-width: 280px;
      max-height: 220px;
      border-radius: 8px;
      overflow: hidden;
      border: 1px solid var(--border);
      background: rgba(0, 0, 0, 0.08);
    }

    .attachment-img {
      width: 100%;
      height: 100%;
      max-height: 220px;
      object-fit: cover;
      display: block;
      cursor: pointer;
      transition: transform 0.2s ease;
    }

    .attachment-img:hover {
      transform: scale(1.03);
    }

    /* Inline Editor im Chat */
    .inline-editor {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-top: 4px;
    }

    .inline-textarea {
      width: 100%;
      min-height: 60px;
      background: var(--bg-primary);
      border: 1px solid var(--accent);
      color: var(--text-main);
      padding: 8px 10px;
      border-radius: 6px;
      font-size: 1rem;
      outline: none;
      resize: vertical;
      font-family: inherit;
    }

    .inline-btn-row {
      display: flex;
      justify-content: flex-end;
      gap: 6px;
    }

    .inline-btn-save {
      background: var(--online-green);
      color: #ffffff;
      border: none;
      padding: 4px 10px;
      border-radius: 4px;
      font-weight: 600;
      font-size: 0.78rem;
      cursor: pointer;
    }

    .inline-btn-cancel {
      background: var(--bg-card);
      border: 1px solid var(--border);
      color: var(--text-main);
      padding: 4px 10px;
      border-radius: 4px;
      font-size: 0.78rem;
      cursor: pointer;
    }

    /* Dateianhang Card */
    .attachment-card {
      background: var(--bg-primary);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 10px 14px;
      margin-top: 6px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .attachment-info {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .attachment-icon {
      font-size: 1.5rem;
    }

    .attachment-details {
      min-width: 0;
    }

    .attachment-filename {
      font-weight: 600;
      font-size: 0.9rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .attachment-size {
      font-size: 0.75rem;
      color: var(--text-muted);
    }

    .btn-download-att {
      background: var(--accent);
      color: #ffffff;
      border: none;
      padding: 6px 12px;
      border-radius: 6px;
      font-weight: 600;
      font-size: 0.8rem;
      cursor: pointer;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      gap: 4px;
      transition: background 0.15s;
    }

    .btn-download-att:hover {
      background: var(--accent-hover);
    }

    .code-block {
      background: var(--code-bg);
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 10px 12px;
      margin-top: 6px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      font-size: 0.9rem;
      white-space: pre-wrap;
      overflow-x: auto;
    }

    .input-area {
      padding: 12px 20px;
      background-color: var(--bg-secondary);
      border-top: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      gap: 6px;
      position: relative;
      transition: background-color 0.2s ease, border-color 0.2s ease;
    }

    .readonly-banner {
      background: var(--bg-card);
      border: 1px solid var(--border);
      padding: 14px 16px;
      border-radius: 8px;
      color: var(--text-muted);
      font-size: 0.9rem;
      text-align: center;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .input-toolbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.8rem;
    }

    .input-tools {
      display: flex;
      gap: 6px;
      align-items: center;
      flex-wrap: wrap;
    }

    .tool-btn {
      background: transparent;
      border: none;
      color: var(--text-muted);
      padding: 4px 8px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 0.85rem;
      transition: all 0.15s;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .tool-btn:hover {
      color: var(--text-main);
      background: rgba(0, 0, 0, 0.06);
    }

    [data-theme="dark"] .tool-btn:hover {
      background: rgba(255, 255, 255, 0.08);
    }

    .tool-btn.active {
      background: var(--accent);
      color: #ffffff;
    }

    .tool-btn.recording {
      background: #dc2626;
      color: #fff;
      animation: pulse 1.2s infinite;
    }

    @keyframes pulse {

      0%,
      100% {
        opacity: 1;
      }

      50% {
        opacity: 0.6;
      }
    }

    .char-counter {
      color: var(--text-muted);
      font-size: 0.75rem;
    }

    .char-counter.warning {
      color: #f59e0b;
      font-weight: 600;
    }

    .char-counter.error {
      color: var(--offline-red);
      font-weight: 700;
    }

    .input-row {
      display: flex;
      gap: 10px;
      align-items: flex-end;
    }

    .chat-textarea {
      flex: 1;
      background-color: var(--bg-primary);
      border: 1px solid var(--border);
      color: var(--text-main);
      padding: 10px 14px;
      border-radius: 8px;
      resize: vertical;
      min-height: 52px;
      max-height: 260px;
      outline: none;
      font-size: 1rem;
      line-height: 1.4;
      font-family: inherit;
    }

    .chat-textarea:focus {
      border-color: var(--accent);
    }

    .btn-send {
      background-color: var(--accent);
      color: #ffffff;
      border: none;
      padding: 0 20px;
      border-radius: 8px;
      font-weight: 600;
      cursor: pointer;
      height: 52px;
      transition: background 0.15s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      font-size: 0.95rem;
    }

    .btn-send:hover {
      background-color: var(--accent-hover);
    }

    /* WhatsApp Authentic Input Row */
    .whatsapp-input-row {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
    }

    .whatsapp-icon-btn {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      background: transparent;
      border: none;
      color: var(--text-muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 1.35rem;
      cursor: pointer;
      transition: all 0.15s ease;
      flex-shrink: 0;
      padding: 0;
      user-select: none;
    }

    .whatsapp-icon-btn:hover {
      background: rgba(0, 0, 0, 0.06);
      color: var(--text-main);
      transform: scale(1.08);
    }

    [data-theme="dark"] .whatsapp-icon-btn:hover {
      background: rgba(255, 255, 255, 0.08);
      color: var(--text-main);
    }

    .whatsapp-icon-btn:active {
      transform: scale(0.95);
    }

    .whatsapp-icon-btn.active {
      color: var(--accent);
      background: var(--accent-soft);
    }

    .whatsapp-input-pill {
      flex: 1;
      display: flex;
      align-items: center;
      background-color: #ffffff;
      border-radius: 8px;
      padding: 9px 14px;
      box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
      border: none;
      min-height: 42px;
      position: relative;
    }

    [data-theme="dark"] .whatsapp-input-pill {
      background-color: #2a3942;
      box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.35);
    }

    .whatsapp-input-pill textarea {
      flex: 1;
      background: transparent;
      border: none;
      outline: none;
      color: var(--text-main);
      padding: 0;
      resize: none;
      font-size: 15px;
      line-height: 20px;
      font-family: inherit;
      min-height: 20px;
      max-height: 120px;
    }

    /* Live Voice Recording UI in WhatsApp Input Pill */
    .recording-container {
      display: flex;
      align-items: center;
      gap: 12px;
      width: 100%;
      padding: 2px 0;
      animation: fadeIn 0.2s ease;
    }

    .recording-pulse-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background-color: var(--offline-red);
      animation: pulse-record 1s infinite alternate;
      flex-shrink: 0;
    }

    @keyframes pulse-record {
      from {
        transform: scale(0.85);
        opacity: 0.7;
      }

      to {
        transform: scale(1.25);
        opacity: 1;
      }
    }

    .recording-timer {
      font-size: 15px;
      font-weight: 600;
      color: var(--offline-red);
      font-variant-numeric: tabular-nums;
    }

    .recording-label {
      font-size: 14px;
      color: var(--text-muted);
      flex: 1;
    }

    .btn-cancel-recording {
      background: transparent;
      border: none;
      cursor: pointer;
      font-size: 1.25rem;
      padding: 4px 8px;
      border-radius: 6px;
      color: var(--text-muted);
      transition: all 0.15s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .btn-cancel-recording:hover {
      background: rgba(234, 67, 53, 0.12);
      color: var(--offline-red);
      transform: scale(1.15);
    }

    .btn-send-whatsapp {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: #00a884;
      border: none;
      color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;
      cursor: pointer;
      box-shadow: 0 2px 6px rgba(0, 168, 132, 0.3);
      transition: all 0.15s ease;
      flex-shrink: 0;
    }

    .btn-send-whatsapp:hover {
      background: #02906f;
      transform: scale(1.05);
    }

    .btn-send-whatsapp:active {
      transform: scale(0.95);
    }

    .btn-send-whatsapp.is-mic {
      background: transparent;
      color: var(--text-muted);
      box-shadow: none;
      font-size: 1.35rem;
    }

    .btn-send-whatsapp.is-mic:hover {
      background: rgba(0, 0, 0, 0.06);
      transform: scale(1.08);
      color: var(--text-main);
    }

    [data-theme="dark"] .btn-send-whatsapp.is-mic:hover {
      background: rgba(255, 255, 255, 0.08);
    }

    .btn-send-whatsapp.is-recording-send {
      background: var(--offline-red);
      animation: pulse-send-record 1.2s infinite;
      box-shadow: 0 2px 8px rgba(234, 67, 53, 0.5);
    }

    @keyframes pulse-send-record {

      0%,
      100% {
        transform: scale(1);
        box-shadow: 0 2px 6px rgba(234, 67, 53, 0.4);
      }

      50% {
        transform: scale(1.08);
        box-shadow: 0 3px 12px rgba(234, 67, 53, 0.8);
      }
    }

    /* =========================================================================
       EMOJI PICKER PANEL (WhatsApp / Slack Style)
       ========================================================================= */
    .emoji-picker-panel {
      position: absolute;
      bottom: 65px;
      left: 16px;
      width: 360px;
      max-width: calc(100% - 32px);
      height: 350px;
      background: var(--bg-secondary);
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
      display: flex;
      flex-direction: column;
      z-index: 500;
      overflow: hidden;
      animation: emoji-popup 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes emoji-popup {
      0% {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
      }

      100% {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .emoji-picker-header {
      padding: 8px 10px;
      background: var(--bg-card);
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .emoji-search-input {
      flex: 1;
      background: var(--bg-primary);
      border: 1px solid var(--border);
      color: var(--text-main);
      padding: 6px 10px;
      border-radius: 6px;
      font-size: 0.84rem;
      outline: none;
    }

    .emoji-search-input:focus {
      border-color: var(--accent);
    }

    .emoji-close-btn {
      background: none;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      font-size: 0.95rem;
      width: 26px;
      height: 26px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 4px;
      transition: background 0.15s;
    }

    .emoji-close-btn:hover {
      background: var(--border);
      color: var(--text-main);
    }

    .emoji-quick-bar {
      display: flex;
      align-items: center;
      gap: 3px;
      padding: 6px 10px;
      background: var(--bg-secondary);
      border-bottom: 1px solid var(--border);
      overflow-x: auto;
      scrollbar-width: none;
    }

    .emoji-quick-bar::-webkit-scrollbar {
      display: none;
    }

    .emoji-quick-chip {
      font-size: 1.15rem;
      padding: 2px 5px;
      border-radius: 6px;
      cursor: pointer;
      user-select: none;
      font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
      transition: transform 0.12s, background 0.12s;
    }

    .emoji-quick-chip:hover {
      background: var(--bg-card);
      transform: scale(1.22);
    }

    .emoji-tabs {
      display: flex;
      background: var(--bg-card);
      border-bottom: 1px solid var(--border);
      padding: 0 4px;
    }

    .emoji-tab-btn {
      flex: 1;
      background: none;
      border: none;
      padding: 6px 0;
      font-size: 1.05rem;
      cursor: pointer;
      opacity: 0.6;
      border-bottom: 2px solid transparent;
      transition: all 0.15s;
      text-align: center;
      font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
    }

    .emoji-tab-btn.active,
    .emoji-tab-btn:hover {
      opacity: 1;
      border-bottom-color: var(--accent);
    }

    .emoji-grid-container {
      flex: 1;
      overflow-y: auto;
      padding: 8px 10px;
      display: grid;
      grid-template-columns: repeat(8, 1fr);
      gap: 4px;
      align-content: start;
    }

    .emoji-item-btn {
      background: none;
      border: none;
      font-size: 1.35rem;
      height: 34px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 6px;
      cursor: pointer;
      user-select: none;
      font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
      transition: transform 0.12s, background 0.12s;
    }

    .emoji-item-btn:hover {
      background: var(--bg-card);
      transform: scale(1.25);
    }

    /* In-App Toast Benachrichtigungen */
    .toast-container {
      position: fixed;
      top: 60px;
      right: 20px;
      z-index: 150000;
      display: flex;
      flex-direction: column;
      gap: 10px;
      pointer-events: none;
      max-width: calc(100vw - 32px);
    }

    .toast-card {
      pointer-events: auto;
      background: var(--bg-secondary);
      border: 1px solid var(--accent);
      color: var(--text-main);
      padding: 12px 16px;
      border-radius: 10px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
      display: flex;
      align-items: flex-start;
      gap: 12px;
      cursor: pointer;
      transition: all 0.2s ease;
      animation: slide-in 0.3s ease;
      width: 400px;
      max-width: 100%;
      box-sizing: border-box;
    }

    .toast-card:hover {
      transform: translateY(-2px);
      background: var(--bg-card);
    }

    @keyframes slide-in {
      from {
        transform: translateX(100%);
        opacity: 0;
      }

      to {
        transform: translateX(0);
        opacity: 1;
      }
    }

    /* Modale */
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.7);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
    }

    .modal-card {
      background: var(--bg-secondary);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 24px;
      width: 520px;
      max-width: 92%;
      max-height: 88vh;
      overflow-y: auto;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    }

    .form-group {
      margin-bottom: 12px;
    }

    .form-group label {
      display: block;
      font-size: 0.82rem;
      margin-bottom: 4px;
      color: var(--text-muted);
    }

    .form-input,
    .form-select {
      width: 100%;
      padding: 9px 12px;
      background: var(--bg-primary);
      border: 1px solid var(--border);
      color: var(--text-main);
      border-radius: 6px;
      outline: none;
      font-size: 0.92rem;
    }

    /* Theme Presets Box */
    .theme-presets-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
      gap: 8px;
      margin-bottom: 14px;
    }

    .theme-preset-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 8px;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      gap: 6px;
      transition: all 0.15s;
    }

    .theme-preset-card:hover {
      border-color: var(--accent);
      transform: translateY(-2px);
    }

    .theme-preview-dots {
      display: flex;
      gap: 4px;
    }

    .theme-preview-dot {
      width: 14px;
      height: 14px;
      border-radius: 50%;
      border: 1px solid rgba(0, 0, 0, 0.2);
    }

    .color-picker-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .color-picker-item {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .color-picker-item label {
      font-size: 0.75rem;
      color: var(--text-muted);
    }

    .color-picker-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .color-picker-input {
      width: 36px;
      height: 30px;
      border: 1px solid var(--border);
      border-radius: 6px;
      cursor: pointer;
      background: none;
      padding: 2px;
    }

    .quick-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
      margin-top: 8px;
    }

    .quick-btn {
      background: var(--bg-card);
      border: 1px solid var(--border);
      color: var(--text-main);
      padding: 6px 10px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 0.8rem;
      text-align: left;
      transition: all 0.15s;
    }

    .quick-btn:hover {
      background: var(--border);
      border-color: var(--accent);
    }

    .quick-btn small {
      display: block;
      color: var(--text-muted);
      font-size: 0.7rem;
    }

    .profile-avatar-preview-box {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 14px;
      padding: 12px;
      background: var(--bg-card);
      border-radius: 8px;
      border: 1px solid var(--border);
    }

    .profile-avatar-large {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      object-fit: cover;
      border: 2px solid var(--accent);
    }

    .forward-room-list {
      max-height: 260px;
      overflow-y: auto;
      list-style: none;
      border: 1px solid var(--border);
      border-radius: 8px;
      margin-top: 8px;
    }

    .forward-room-item {
      padding: 10px 14px;
      border-bottom: 1px solid var(--border);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 10px;
      transition: background 0.15s;
    }

    .forward-room-item:hover {
      background: var(--bg-card);
    }

    .rule-item {
      transition: color 0.15s ease;
    }

    .rule-item.valid {
      color: var(--online-green);
      font-weight: 600;
    }

    .btn-close-modal {
      background: rgba(0, 0, 0, 0.05);
      border: 1px solid var(--border);
      color: var(--text-muted);
      cursor: pointer;
      font-size: 1.05rem;
      width: 32px;
      height: 32px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 6px;
      transition: all 0.15s ease;
      flex-shrink: 0;
    }

    [data-theme="dark"] .btn-close-modal {
      background: rgba(255, 255, 255, 0.06);
    }

    .btn-close-modal:hover {
      background: var(--border);
      color: var(--text-main);
      transform: scale(1.08);
    }

    @media (max-width: 768px) {
      .sidebar {
        width: 100%;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 10;
      }

      .sidebar.hide-mobile {
        display: none;
      }

      .btn-mobile-back {
        display: inline-flex;
      }

      .emoji-picker-panel {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: 85px;
      }
    }

    /* Minimalistischer Messenger Komponenten */
    .quick-add-contact-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 7px 16px;
      margin: 18px auto 20px auto;
      max-width: calc(100% - 48px);
      width: fit-content;
      background: transparent;
      color: var(--text-muted);
      border: 1px dashed var(--border);
      border-radius: 20px;
      font-size: 0.80rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.15s ease;
      user-select: none;
      text-align: center;
    }

    .quick-add-contact-btn:hover {
      background: var(--bg-card);
      color: var(--accent);
      border-color: var(--accent);
      transform: translateY(-1px);
    }

    .btn-favorite-star {
      background: none;
      border: none;
      font-size: 1.15rem;
      cursor: pointer;
      padding: 2px 6px;
      line-height: 1;
      border-radius: 4px;
      transition: transform 0.15s ease, opacity 0.15s ease;
      opacity: 0.75;
    }

    .btn-favorite-star:hover {
      opacity: 1;
      transform: scale(1.2);
    }

    .btn-favorite-star.active {
      opacity: 1;
      filter: drop-shadow(0 0 2px rgba(234, 179, 8, 0.5));
    }

    .auth-tabs {
      display: flex;
      gap: 6px;
      border-bottom: 2px solid var(--border);
      margin-bottom: 14px;
    }

    .auth-tabs .tab-btn {
      flex: 1;
      padding: 8px 10px;
      font-weight: 600;
      font-size: 0.85rem;
    }

    /* ========================================== */
    /* WebRTC 1:1 Calling & Overlay Styles        */
    /* ========================================== */
    .call-overlay-fullscreen {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: #0b141a;
      z-index: 10040;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      user-select: none;
    }

    .call-top-bar {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 64px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 24px;
      background: linear-gradient(180deg, rgba(11, 20, 26, 0.85) 0%, rgba(11, 20, 26, 0) 100%);
      z-index: 10;
    }

    .call-mini-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      object-fit: cover;
      border: 2px solid rgba(255, 255, 255, 0.2);
    }

    .call-top-btn {
      background: rgba(255, 255, 255, 0.12);
      border: 1px solid rgba(255, 255, 255, 0.2);
      color: #ffffff;
      padding: 8px 12px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 0.95rem;
      transition: background 0.15s ease;
    }

    .call-top-btn:hover {
      background: rgba(255, 255, 255, 0.22);
    }

    .call-stage {
      flex: 1;
      width: 100%;
      height: 100%;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #111b21;
    }

    .remote-video-feed {
      width: 100%;
      height: 100%;
      object-fit: cover;
      background: #111b21;
    }

    .call-audio-stage {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 28px;
    }

    /* Pulsing Avatar Animations */
    .call-avatar-pulse-container {
      position: relative;
      width: 100px;
      height: 100px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto;
    }

    .call-avatar-pulse-container.large {
      width: 150px;
      height: 150px;
    }

    .call-pulse-avatar {
      width: 90px;
      height: 90px;
      border-radius: 50%;
      object-fit: cover;
      z-index: 3;
      border: 3px solid var(--accent);
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }

    .call-pulse-avatar.large {
      width: 130px;
      height: 130px;
    }

    .pulse-ring {
      position: absolute;
      border-radius: 50%;
      border: 2px solid var(--accent);
      opacity: 0;
      animation: callPulseAnim 2.2s infinite ease-out;
      pointer-events: none;
    }

    .pulse-ring.ring-1 { width: 100%; height: 100%; animation-delay: 0s; }
    .pulse-ring.ring-2 { width: 100%; height: 100%; animation-delay: 0.7s; }
    .pulse-ring.ring-3 { width: 100%; height: 100%; animation-delay: 1.4s; }

    @keyframes callPulseAnim {
      0% {
        transform: scale(0.85);
        opacity: 0.8;
      }
      100% {
        transform: scale(2.2);
        opacity: 0;
      }
    }

    /* Waveform visualizer bars */
    .audio-wave-bars {
      display: flex;
      align-items: center;
      gap: 6px;
      height: 36px;
    }

    .wave-bar {
      width: 5px;
      background: var(--accent);
      border-radius: 3px;
      animation: waveBarAnim 1.2s infinite ease-in-out;
    }

    .wave-bar:nth-child(1) { height: 16px; animation-delay: 0.1s; }
    .wave-bar:nth-child(2) { height: 28px; animation-delay: 0.3s; }
    .wave-bar:nth-child(3) { height: 36px; animation-delay: 0.2s; }
    .wave-bar:nth-child(4) { height: 24px; animation-delay: 0.4s; }
    .wave-bar:nth-child(5) { height: 14px; animation-delay: 0.15s; }

    @keyframes waveBarAnim {
      0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
      50% { transform: scaleY(1); opacity: 1; }
    }

    /* Local Draggable PiP Container */
    .call-pip-container {
      position: absolute;
      bottom: 100px;
      right: 24px;
      width: 180px;
      height: 120px;
      background: #202c33;
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
      border: 2px solid rgba(255, 255, 255, 0.18);
      cursor: grab;
      z-index: 20;
      transition: box-shadow 0.2s ease;
    }

    .call-pip-container:active {
      cursor: grabbing;
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8);
    }

    .local-video-feed {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transform: scaleX(-1);
    }

    .local-video-muted-label {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #111b21;
      color: #8696a0;
      font-size: 0.75rem;
      font-weight: 500;
    }

    /* Call Bottom Control Bar */
    .call-bottom-bar {
      position: absolute;
      bottom: 24px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 10px 20px;
      background: rgba(32, 44, 51, 0.92);
      backdrop-filter: blur(12px);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 40px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
      z-index: 30;
    }

    .call-circle-btn {
      width: 52px;
      height: 52px;
      border-radius: 50%;
      border: none;
      background: #2a3942;
      color: #ffffff;
      font-size: 1.15rem;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
      position: relative;
    }

    .call-circle-btn:hover {
      background: #374953;
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
    }

    .call-circle-btn:active {
      transform: scale(0.94);
    }

    /* Kamera oder Screen aktiv: Sauberes Smaragdgrün */
    .call-circle-btn.btn-state-active {
      background: #00a884 !important;
      color: #ffffff !important;
      box-shadow: 0 0 16px rgba(0, 168, 132, 0.5) !important;
    }

    /* Mikrofon stummgeschaltet: Klares Warn-Rot */
    .call-circle-btn.btn-state-muted {
      background: #dc2626 !important;
      color: #ffffff !important;
      box-shadow: 0 0 14px rgba(220, 38, 38, 0.5) !important;
    }

    /* Kamera aus: Normaler neutraler dunkler Button (NICHT ROT!), mit durchgestrichenem Kamera-SVG */
    .call-circle-btn.btn-state-cam-off {
      background: #2a3942;
      color: #94a3b8;
    }

    /* Moderner Call Hangup / Auflegen Button: Elegante Kreisform, klares Apple/WhatsApp Rot */
    .call-circle-btn.btn-hangup {
      width: 52px;
      height: 52px;
      border-radius: 50%;
      background: #ea4335 !important;
      color: #ffffff !important;
      box-shadow: 0 4px 14px rgba(234, 67, 53, 0.45) !important;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .call-circle-btn.btn-hangup:hover {
      background: #d93025 !important;
      transform: translateY(-2px) scale(1.08);
      box-shadow: 0 6px 20px rgba(234, 67, 53, 0.65) !important;
    }

    /* Moderner Call Accept / Annehmen Button: Elegante Kreisform, WhatsApp Grün */
    .call-circle-btn.btn-accept {
      width: 52px;
      height: 52px;
      border-radius: 50%;
      background: #25d366 !important;
      color: #ffffff !important;
      box-shadow: 0 4px 14px rgba(37, 211, 102, 0.45) !important;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .call-circle-btn.btn-accept:hover {
      background: #20ba5a !important;
      transform: translateY(-2px) scale(1.08);
      box-shadow: 0 6px 20px rgba(37, 211, 102, 0.65) !important;
    }

    /* Device Popup */
    .call-device-popup {
      position: absolute;
      bottom: 95px;
      left: 50%;
      transform: translateX(-50%);
      width: 280px;
      background: #202c33;
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 12px;
      padding: 16px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
      z-index: 35;
    }

    /* Incoming & Outgoing Call Cards */
    .call-incoming-card,
    .call-outgoing-card {
      background: #202c33 !important;
      color: #e9edef !important;
      text-align: center;
      padding: 32px 24px;
      border-radius: 20px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    }

    /* ========================================== */
    /* Minimiertes Anruf-Fenster (Floating PiP)   */
    /* Ermöglicht freies Multitasking in Chats    */
    /* ========================================== */
    .call-overlay-fullscreen.call-overlay-minimized {
      position: fixed !important;
      top: auto !important;
      left: auto !important;
      bottom: 24px !important;
      right: 24px !important;
      width: 360px !important;
      height: 240px !important;
      border-radius: 16px !important;
      box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75), 0 0 0 1.5px rgba(0, 168, 132, 0.45) !important;
      z-index: 9995 !important;
      border: 1px solid rgba(255, 255, 255, 0.15) !important;
      overflow: hidden !important;
      transition: width 0.2s cubic-bezier(0.2, 0, 0, 1), height 0.2s cubic-bezier(0.2, 0, 0, 1), border-radius 0.2s ease, box-shadow 0.2s ease;
    }

    .call-overlay-minimized .call-top-bar {
      height: 44px;
      padding: 0 12px;
      background: linear-gradient(180deg, rgba(11, 20, 26, 0.95) 0%, rgba(11, 20, 26, 0.4) 100%);
      cursor: grab;
    }

    .call-overlay-minimized .call-top-bar:active {
      cursor: grabbing;
    }

    .call-overlay-minimized .call-mini-avatar {
      width: 26px;
      height: 26px;
    }

    .call-overlay-minimized #callActivePartnerName {
      font-size: 0.8rem;
      max-width: 120px;
    }

    .call-overlay-minimized #callDurationTimer {
      font-size: 0.72rem;
    }

    .call-overlay-minimized .call-minimize-label,
    .call-overlay-minimized .call-chat-label {
      display: none !important;
    }

    .call-overlay-minimized #btnMinimizeCallOverlay,
    .call-overlay-minimized #btnOpenChatDuringCall,
    .call-overlay-minimized #btnToggleCallFullscreen {
      display: none !important;
    }

    .call-overlay-minimized #btnRestoreCallOverlay {
      display: inline-flex !important;
    }

    .call-overlay-minimized .call-top-btn {
      padding: 4px 7px;
      font-size: 0.8rem;
      border-radius: 6px;
    }

    .call-overlay-minimized .call-stage {
      flex: 1;
      height: 100%;
    }

    .call-overlay-minimized .call-avatar-pulse-container.large {
      width: 80px;
      height: 80px;
    }

    .call-overlay-minimized .call-pulse-avatar.large {
      width: 65px;
      height: 65px;
    }

    .call-overlay-minimized .audio-wave-bars {
      height: 18px;
      gap: 3px;
    }

    .call-overlay-minimized .wave-bar {
      width: 4px;
    }

    .call-overlay-minimized .call-pip-container {
      width: 80px;
      height: 56px;
      bottom: 48px;
      right: 10px;
      border-radius: 8px;
      border-width: 1px;
    }

    .call-overlay-minimized .call-bottom-bar {
      bottom: 8px;
      padding: 4px 10px;
      gap: 8px;
      border-radius: 30px;
      background: rgba(20, 28, 34, 0.92);
      backdrop-filter: blur(8px);
    }

    .call-overlay-minimized .call-circle-btn {
      width: 34px;
      height: 34px;
      font-size: 0.85rem;
    }

    .call-overlay-minimized .call-circle-btn svg {
      width: 16px;
      height: 16px;
    }

    .call-overlay-minimized #btnCallShareScreen,
    .call-overlay-minimized #btnCallDeviceSettings {
      display: none !important;
    }

    @media (max-width: 600px) {
      .call-overlay-fullscreen.call-overlay-minimized {
        width: 280px !important;
        height: 190px !important;
        bottom: 16px !important;
        right: 16px !important;
      }
    }

    /* ========================================== */
    /* QR Scanner Modal & Viewfinder              */
    /* ========================================== */
    .qr-scanner-viewfinder {
      position: relative;
      width: 100%;
      height: 280px;
      background: #000000;
      border-radius: 12px;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .qr-scanner-viewfinder video {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .qr-scan-line {
      position: absolute;
      left: 10%;
      right: 10%;
      height: 2px;
      background: var(--accent);
      box-shadow: 0 0 10px 2px var(--accent);
      animation: qrScanAnim 2.5s infinite ease-in-out;
      pointer-events: none;
    }

    @keyframes qrScanAnim {
      0% { top: 12%; }
      50% { top: 86%; }
      100% { top: 12%; }
    }

    .qr-corners {
      position: absolute;
      inset: 20px;
      pointer-events: none;
    }

    .qr-corner {
      position: absolute;
      width: 24px;
      height: 24px;
      border-color: var(--accent);
      border-style: solid;
    }

    .qr-corner.top-left { top: 0; left: 0; border-width: 3px 0 0 3px; border-top-left-radius: 6px; }
    .qr-corner.top-right { top: 0; right: 0; border-width: 3px 3px 0 0; border-top-right-radius: 6px; }
    .qr-corner.bottom-left { bottom: 0; left: 0; border-width: 0 0 3px 3px; border-bottom-left-radius: 6px; }
    .qr-corner.bottom-right { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-bottom-right-radius: 6px; }

    /* ========================================== */
    /* Chat Bubbles: Contact Card & Call Logs     */
    /* ========================================== */
    .contact-card-bubble {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 12px;
      min-width: 240px;
      margin: 4px 0;
    }

    .contact-card-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 10px;
    }

    .contact-card-avatar {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      object-fit: cover;
      border: 1px solid var(--border);
    }

    .contact-card-name {
      font-weight: 600;
      font-size: 0.92rem;
      color: var(--text-main);
    }

    .contact-card-sub {
      font-size: 0.75rem;
      color: var(--text-muted);
      word-break: break-all;
    }

    .contact-card-actions {
      display: flex;
      gap: 6px;
      border-top: 1px solid var(--border);
      padding-top: 8px;
    }

    .call-log-bubble {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 8px 12px;
      border-radius: 8px;
      background: rgba(0, 0, 0, 0.04);
      min-width: 220px;
    }

    [data-theme="dark"] .call-log-bubble {
      background: rgba(255, 255, 255, 0.05);
    }

    .call-log-bubble.call-log-missed .call-log-icon {
      color: #ef4444;
    }

    .call-log-icon {
      font-size: 1.4rem;
    }

    .call-log-title {
      font-weight: 600;
      font-size: 0.88rem;
    }

    .call-log-subtitle {
      font-size: 0.75rem;
      color: var(--text-muted);
    }

    .call-log-btn {
      margin-left: auto;
      background: var(--accent);
      color: #ffffff;
      border: none;
      padding: 5px 12px;
      border-radius: 6px;
      font-size: 0.78rem;
      cursor: pointer;
      font-weight: 600;
    }

    /* Call-Link Bubble (WhatsApp Web Style) */
    .call-link-bubble {
      background: rgba(0, 168, 132, 0.08);
      border: 1px solid rgba(0, 168, 132, 0.25);
      border-radius: 12px;
      padding: 12px;
      min-width: 250px;
      max-width: 320px;
    }

    [data-theme="dark"] .call-link-bubble {
      background: rgba(0, 168, 132, 0.12);
      border-color: rgba(0, 168, 132, 0.35);
    }

    /* ========================================================= */
    /* WhatsApp Authentic Left Navigation Rail (Image 2)         */
    /* ========================================================= */
    .whatsapp-nav-rail {
      width: 64px;
      min-width: 64px;
      background-color: var(--bg-secondary);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: center;
      padding: 12px 0 16px 0;
      z-index: 15;
      flex-shrink: 0;
      user-select: none;
      transition: background-color 0.2s ease, border-color 0.2s ease;
    }

    .nav-rail-top,
    .nav-rail-bottom {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      width: 100%;
    }

    .nav-rail-btn {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      border: none;
      background: transparent;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      position: relative;
      transition: all 0.18s ease;
    }

    .nav-rail-btn:hover {
      background: rgba(134, 150, 160, 0.15);
      color: var(--text-main);
    }

    .nav-rail-btn.active {
      background: rgba(134, 150, 160, 0.28);
      color: var(--text-main);
    }

    [data-theme="dark"] .nav-rail-btn.active {
      background: rgba(255, 255, 255, 0.12);
      color: #ffffff;
    }

    .nav-rail-badge {
      position: absolute;
      top: 3px;
      right: 3px;
      background: var(--online-green);
      color: #ffffff;
      font-size: 0.65rem;
      font-weight: 700;
      min-width: 17px;
      height: 17px;
      border-radius: 9px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0 4px;
      border: 2px solid var(--bg-secondary);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }

    .nav-rail-badge.missed {
      background: var(--offline-red);
    }

    .nav-rail-avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      object-fit: cover;
      cursor: pointer;
      border: 1px solid var(--border);
      transition: transform 0.15s ease;
    }

    .nav-rail-avatar:hover {
      transform: scale(1.08);
    }

    /* ========================================================= */
    /* Calls Sidebar & Dashboard (Image 1)                       */
    /* ========================================================= */
    .calls-sidebar {
      width: 380px;
      min-width: 320px;
      max-width: 440px;
      background-color: var(--bg-sidebar);
      border-right: 1px solid var(--border);
      display: none;
      flex-direction: column;
      overflow: hidden;
      flex-shrink: 0;
      transition: background-color 0.2s ease, border-color 0.2s ease;
    }

    .calls-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background-color: var(--bg-secondary);
      padding: 8px 16px;
      min-height: 52px;
      border-bottom: 1px solid var(--border);
    }

    .calls-header-title {
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--text-main);
      margin: 0;
    }

    .calls-section-title {
      font-size: 0.88rem;
      font-weight: 700;
      color: var(--text-main);
      padding: 14px 16px 8px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .calls-section-link {
      font-size: 0.78rem;
      color: var(--accent);
      cursor: pointer;
      background: none;
      border: none;
      font-weight: 600;
    }

    .calls-favorites-list {
      display: flex;
      flex-direction: column;
      padding: 0 8px;
    }

    .calls-fav-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 12px;
      border-radius: 8px;
      transition: background 0.15s;
    }

    .calls-fav-item:hover {
      background: var(--bg-secondary);
    }

    .calls-fav-user {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
      cursor: pointer;
    }

    .calls-fav-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      object-fit: cover;
      background: #374151;
      flex-shrink: 0;
    }

    .calls-fav-name {
      font-weight: 600;
      font-size: 0.92rem;
      color: var(--text-main);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .calls-fav-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .calls-action-circle-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: none;
      background: transparent;
      color: var(--text-muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.15s;
    }

    .calls-action-circle-btn:hover {
      background: rgba(134, 150, 160, 0.2);
      color: var(--accent);
      transform: scale(1.08);
    }

    .calls-history-list {
      flex: 1;
      overflow-y: auto;
      padding: 0 8px 16px 8px;
    }

    .call-log-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 12px;
      border-radius: 8px;
      cursor: pointer;
      transition: background 0.15s;
    }

    .call-log-row:hover {
      background: var(--bg-secondary);
    }

    .call-log-info {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .call-log-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      object-fit: cover;
      background: #374151;
      flex-shrink: 0;
    }

    .call-log-meta {
      display: flex;
      flex-direction: column;
      gap: 3px;
      min-width: 0;
    }

    .call-log-name {
      font-weight: 600;
      font-size: 0.92rem;
      color: var(--text-main);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .call-log-status {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 0.78rem;
      color: var(--text-muted);
    }

    .call-log-status.missed {
      color: var(--offline-red);
      font-weight: 600;
    }

    .call-log-date {
      font-size: 0.75rem;
      color: var(--text-muted);
      white-space: nowrap;
      text-align: right;
    }

    /* Calls Main Dashboard (Image 1 Right Side) */
    .calls-main-dashboard {
      flex: 1;
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: space-between;
      background-color: var(--bg-primary);
      padding: 48px 24px 24px 24px;
      position: relative;
    }

    .calls-dash-cards-wrap {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      flex: 1;
      gap: 32px;
      max-width: 480px;
      width: 100%;
    }

    .calls-dash-row {
      display: flex;
      gap: 36px;
      justify-content: center;
      width: 100%;
    }

    .calls-dash-card {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      cursor: pointer;
      user-select: none;
      transition: transform 0.15s ease;
    }

    .calls-dash-card-icon {
      width: 80px;
      height: 80px;
      border-radius: 20px;
      background-color: var(--bg-secondary);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.8rem;
      color: var(--text-muted);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
      transition: all 0.2s ease;
      border: 1px solid var(--border);
    }

    .calls-dash-card:hover .calls-dash-card-icon {
      transform: translateY(-4px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
      background-color: var(--accent-soft);
      border-color: var(--accent);
      color: var(--accent);
    }

    .calls-dash-card-title {
      font-size: 0.88rem;
      font-weight: 600;
      color: var(--text-main);
      text-align: center;
    }

    .calls-dash-e2ee-banner {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.82rem;
      color: var(--text-muted);
      padding: 12px;
      user-select: none;
    }

    /* ========================================================= */
    /* WhatsApp Authentic Attachment Popup Menu (Image 3)        */
    /* ========================================================= */
    .attachment-popup-menu {
      position: absolute;
      bottom: 70px;
      left: 12px;
      background: #233138;
      border-radius: 16px;
      padding: 8px;
      box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
      display: none;
      flex-direction: column;
      gap: 4px;
      z-index: 50;
      width: 220px;
      animation: popupSlideUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
      border: 1px solid rgba(255, 255, 255, 0.08);
      user-select: none;
    }

    [data-theme="light"] .attachment-popup-menu {
      background: #ffffff;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
      border: 1px solid var(--border);
    }

    @keyframes popupSlideUp {
      from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .attachment-popup-item {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 10px 14px;
      border-radius: 10px;
      border: none;
      background: transparent;
      color: var(--text-main);
      font-size: 0.92rem;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.15s;
      width: 100%;
      text-align: left;
    }

    [data-theme="dark"] .attachment-popup-item {
      color: #e9edef;
    }

    .attachment-popup-item:hover {
      background: rgba(134, 150, 160, 0.18);
    }

    .attachment-icon-pill {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      flex-shrink: 0;
    }

    .attachment-icon-pill.doc {
      background: #7f66ff;
      color: #fff;
    }

    .attachment-icon-pill.media {
      background: #007bfc;
      color: #fff;
    }

    .attachment-icon-pill.camera {
      background: #ec407a;
      color: #fff;
    }

    .attachment-icon-pill.contact {
      background: #00a884;
      color: #fff;
    }

    /* ========================================================= */
    /* Camera Snapshot Modal                                     */
    /* ========================================================= */
    .camera-snap-modal {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.85);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 10030;
      backdrop-filter: blur(4px);
    }

    .camera-snap-card {
      background: #111b21;
      color: #e9edef;
      border-radius: 16px;
      width: 90%;
      max-width: 520px;
      padding: 18px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 14px;
      box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
      border: 1px solid #222d34;
    }

    .camera-snap-header {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .camera-snap-viewport {
      width: 100%;
      height: 360px;
      background: #000;
      border-radius: 12px;
      overflow: hidden;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .camera-snap-video,
    .camera-snap-preview {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .camera-snap-controls {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-top: 6px;
    }

    .btn-camera-shutter {
      width: 58px;
      height: 58px;
      border-radius: 50%;
      background: #ffffff;
      border: 4px solid var(--accent);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5rem;
      transition: transform 0.15s;
    }

    .btn-camera-shutter:hover {
      transform: scale(1.08);
    }

    .btn-camera-shutter:active {
      transform: scale(0.92);
    }

/* ========================================================================= */
/* MODULAR FIXES: App Container Lockdown & Mobile 100dvh                     */
/* ========================================================================= */
#appContainer {
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}
