/* Kooperationspartner Styling */
.partner-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.partner-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.partner-item-info {
  flex: 1;
}

.partner-item-name {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.partner-item-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.partner-item-details span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.partner-item-details i {
  color: #f58060;
}

.partner-item-meta {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.partner-item-actions {
  display: flex;
  gap: 0.5rem;
}

.partner-item-actions .btn-small {
  padding: 0.5rem;
  min-width: auto;
}

.edit-partner-btn {
  background-color: #4CAF50 !important;
  color: white !important;
}

.edit-partner-btn:hover {
  background-color: #45a049 !important;
}

.delete-partner-btn {
  background-color: #f44336 !important;
  color: white !important;
}

.delete-partner-btn:hover {
  background-color: #da190b !important;
}

/* Form Styling */
.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-group input:focus {
  outline: none;
  border-color: #f58060;
  box-shadow: 0 0 0 2px rgba(245, 128, 96, 0.2);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* Basis */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Design Tokens */
:root {
  --radius-panel: 16px;
  --radius-btn: 10px;
  --radius-input: 10px;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.22);
  --glass-shadow: 0 10px 24px rgba(0,0,0,0.08);
  --text: #2c2c2c;
  --muted: #666;
  --accent: #f58060;
  --accent-contrast: #ffffff;
  --panel-padding: 1.5rem;
  --input-bg: rgba(255,255,255,0.7);
  --input-border: rgba(0,0,0,0.06);
  --focus-ring: 0 0 0 3px rgba(247,128,96,0.25);
}

/* Dark mode variable overrides */
body.dark, .dark body {
  --glass-bg: rgba(24,27,33,0.78);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-shadow: 0 10px 24px rgba(0,0,0,0.4);
  --text: #e6e6e6;
  --muted: #aaa;
  --input-bg: rgba(255,255,255,0.06);
  --input-border: rgba(255,255,255,0.12);
}

body {
  font-family: 'Quicksand', sans-serif;
  background: linear-gradient(145deg, #ece9f1, #f5f5f7);
  color: var(--text);
}

/* Dark mode */
.dark body, body.dark {
  background: linear-gradient(145deg, #0f1115, #1b1e24);
  color: #e6e6e6;
}

/* Dienstleistungsvertrag-System Styles */
.status-draft {
  background-color: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
}

.status-sent {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-signed {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-completed {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.status-expired {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status-declined {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.contract-item {
  transition: all 0.3s ease;
}

.contract-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.contract-actions button {
  transition: all 0.2s ease;
}

.contract-actions button:hover {
  transform: scale(1.05);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row label {
  font-weight: 600;
  color: var(--muted);
}

.detail-row span {
  color: var(--text);
}

.dark .sidebar, body.dark .sidebar,
.dark .kpi-card, body.dark .kpi-card,
.dark .kpi-score, body.dark .kpi-score,
.dark .top-performance, body.dark .top-performance,
.dark .team, body.dark .team,
.dark .team-notes, body.dark .team-notes,
.dark .working-format, body.dark .working-format,
.dark .team-card, body.dark .team-card,
.dark .gmail-pane, body.dark .gmail-pane {
  background: var(--glass-bg);
  color: var(--text);
}

.dark .sidebar .nav li.active, body.dark .sidebar .nav li.active,
.dark .sidebar .nav li:hover, body.dark .sidebar .nav li:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

.dark .working-format a, body.dark .working-format a,
.dark .working-format strong, body.dark .working-format strong {
  color: #e6e6e6;
}

.dark .message, body.dark .message {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.dark .team-note-meta, body.dark .team-note-meta { color: #aaa; }
.dark .team-card-role, body.dark .team-card-role { color: #bbb; }
.dark .team-card-email, body.dark .team-card-email { color: #ccc; }

/* Dark mode: hover states, borders, svg tints */
.dark .working-format li:hover, body.dark .working-format li:hover { background: rgba(255,255,255,0.08); }
.dark .glass, body.dark .glass { border-color: rgba(255,255,255,0.14); box-shadow: 0 10px 24px rgba(0,0,0,0.4); }
.dark .btn-small, body.dark .btn-small { background: var(--accent); color: #111 !important; }
.dark .bcg path, body.dark .bcg path { fill: rgba(247,128,96,0.06) !important; }

/* SVG Hintergrund */
.bcg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
}

.logo {
  display: flex;
  justify-content: center;
}

/* Layout */
.dashboard-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  padding: 2rem 1rem;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

/* Sidebar Gmail Bereich */
.sidebar-gmail { 
  margin-top: 1rem; 
  display: flex; 
  flex-direction: column; 
  gap: 0.5rem; 
  
}
.sidebar-gmail-header { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 0.5rem; 
}
.sidebar-gmail-title { 
  font-weight: 700; 
}
.sidebar-gmail-actions { 
  display: flex; 
  gap: 0.4rem; 
}
.sidebar-gmail-actions .btn-small { 
  padding: 0.25rem 0.5rem; 
  border-radius: 8px; 
}
/* Kontoliste mit Badges */
.mail-accounts { list-style: none; padding: 0; margin-top: 0.5rem; display: grid; gap: 6px; }
.mail-account { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; cursor: pointer; user-select: none; }
.mail-account[draggable="true"] { cursor: grab; }
.mail-account[draggable="true"]:active { cursor: grabbing; }
.mail-account:hover, .mail-account.active { background: rgba(0,0,0,0.05); }
.dark .mail-account:hover, body.dark .mail-account:hover, .dark .mail-account.active, body.dark .mail-account.active { background: rgba(255,255,255,0.08); }
.mail-account-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-account-badge { min-width: 24px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-contrast); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; }

.sidebar img {
  width: 120px;
  margin-bottom: 1rem;
}

.sidebar .profile {
  text-align: center;
}

.sidebar .profile img {
  width: 50px;
  border-radius: 50%;
  margin-top: 0.5rem;
}

.sidebar .profile span {
  display: block;
  margin-top: 0.4rem;
  font-weight: 600;
}

.sidebar .nav {
  list-style: none;
  padding: 0;
}

.sidebar .nav li {
  padding: 0.6rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #333;
  transition: background 0.3s;
}

.sidebar .nav li.active,
.sidebar .nav li:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.main-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

/* Topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: var(--panel-padding);
}

/* KPI Cards */
.kpis {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.kpi-card {
  flex: 1;
  background: var(--glass-bg);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-panel);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  text-align: center;
  border: 1px solid var(--glass-border);
}

.kpi-card h4 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.kpi-card p {
  font-size: 2rem;
  font-weight: 800;
}

.message {
  margin-bottom: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.75);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  border: 1px solid var(--glass-border);
}

.message small {
  color: #666;
  font-size: 0.8em;
}

.einsaetze {
  background: var(--glass-bg);
  color: var(--text);
  padding: var(--panel-padding);
  border-radius: var(--radius-panel);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--glass-border);
}

.meeting-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 12px;
}

/* Equal middle-row panels with scrollable interior */
.middle-row > .glass { display: flex; flex-direction: column; height: var(--mid-panel-h, 380px); }
#einsatzList { overflow-y: auto; flex: 1; }
#whatsapp-box { display: flex; flex-direction: column; }
#whatsapp-messages { overflow-y: auto; flex: 1; }
.team-notes { display: flex; flex-direction: column; margin-top: 0; }
.team-notes-list { overflow-y: auto; flex: 1; }
/* Chat UI */
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.chat-item { display: flex; }
.chat-item.mine { justify-content: flex-end; }
.chat-item .bubble { max-width: 72%; background: rgba(255,255,255,0.8); border: 1px solid var(--glass-border); border-radius: 14px; padding: 8px 10px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.chat-item.mine .bubble { background: rgba(247,128,96,0.15); border-color: rgba(247,128,96,0.35); }
.chat-item .meta { font-size: 0.78rem; color: var(--muted); margin-bottom: 2px; }
.chat-item .text { white-space: pre-wrap; word-break: break-word; }
.chat-item .edited { font-size: 0.75rem; color: var(--muted); }
.chat-item .atts { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.chat-item .att img { max-width: 160px; max-height: 120px; border-radius: 8px; border: 1px solid var(--glass-border); display: block; }
.chat-item .actions { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; }
.chat-item .reactions { display: flex; gap: 4px; flex-wrap: wrap; }
.react-btn { background: rgba(0,0,0,0.06); border: none; border-radius: 999px; padding: 2px 8px; cursor: pointer; }
.chat-item .more { display: flex; gap: 6px; }
.chat-item .more button { background: transparent; border: none; cursor: pointer; }
.reply-ref { font-size: 0.8rem; color: var(--muted); margin-bottom: 4px; }

/* Kontextmenü für Chat */
.chat-context { position: fixed; z-index: 99999; display: none; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: 4px; }
.chat-context .ctx-item { display:block; width:100%; text-align:left; background: transparent; border: none; padding: 8px 12px; cursor: pointer; border-radius: 6px; }
.chat-context .ctx-item:hover { background: rgba(0,0,0,0.06); }

.chat-composer { display: flex; gap: 8px; align-items: stretch; margin-top: 8px; }
.chat-composer textarea { flex: 1; resize: none; min-height: 40px; max-height: 120px; }
.btn-ghost { background: transparent; border: 1px solid var(--glass-border); border-radius: var(--radius-btn); padding: 0.45rem 0.6rem; cursor: pointer; }
.file-label { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; }
.chat-composer.replying { outline: 2px dashed rgba(0,0,0,0.1); border-radius: 10px; padding: 6px; }
/* PDFs: scrollbarer Bereich und schmalere Einträge */
#pdf-box { display:flex; flex-direction: column; }
#pdf-list { overflow-y: auto; flex: 1; max-height: 300px; padding-right: 4px; }
#pdf-list .message { max-width: 100%; overflow: hidden; }
.pdf-item-actions .pdf-delete { 
  transition: transform .1s ease, color .15s ease; 
  opacity: 1;
  visibility: visible;
  background: transparent !important;
  color: #f58060 !important;
}
.pdf-item-actions .pdf-delete:hover { transform: scale(1.2); color: #f58060; }

/* Mittelblock */
.middle-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Outlook-ähnliches Mail-Layout */
.mail-layout { margin-bottom: 2rem; }
.mail-columns { display: grid; grid-template-columns: 360px 1fr; gap: 1rem; min-height: 360px; }
.mail-list { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-panel); overflow: auto; }
.mail-preview { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-panel); padding: 0.75rem; overflow: auto; }
.mail-list-empty, .mail-preview-empty { padding: 1rem; color: var(--muted); }
.mail-item { padding: 10px 12px; border-bottom: 1px solid rgba(0,0,0,0.06); cursor: pointer; }
.mail-item:last-child { border-bottom: none; }
.mail-item.active { background: rgba(0,0,0,0.05); }
.dark .mail-item.active, body.dark .mail-item.active { background: rgba(255,255,255,0.08); }
.mail-item.unread .mail-item-from, .mail-item.unread .mail-item-subject { font-weight: 800; }
.mail-item.unread { border-left: 3px solid var(--accent); background: rgba(247,128,96,0.06); }
.mail-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mail-item-from { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item-time { color: var(--muted); font-size: 0.85rem; }
.mail-item-subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item-snippet { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.preview-from { font-weight: 800; }
.preview-time { color: var(--muted); }
.preview-subject { font-weight: 700; margin-bottom: 6px; }
.preview-body { white-space: pre-wrap; word-wrap: break-word; overflow: visible; max-height: none; line-height: 1.5; }
.preview-actions { margin-top: 10px; }

.kpi-score,
.top-performance {
  background: var(--glass-bg);
  padding: var(--panel-padding);
  border-radius: var(--radius-panel);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--glass-border);
}

.kpi-score .score {
  font-size: 2.2rem;
  font-weight: bold;
  margin: 0.5rem 0;
}

.kpi-score .change {
  color: #d35b5b;
}

.top-performance ul {
  list-style: none;
  margin-top: 1rem;
}

.top-performance li {
  margin-bottom: 0.5rem;
}

/* Notizen Editor */
#notizenEditor {
  width: 100%;
  height: 160px;
  padding: 1rem;
  border-radius: 12px;
  border: none;
  resize: vertical;
  font-family: "Quicksand", sans-serif;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

#saveNote {
  margin-top: 0.8rem;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 10px;
  background-color: #f78060;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

#saveNote:hover {
  background-color: #e46a4e;
}

/* Gmail */
.working-format {
  background: var(--glass-bg);
  padding: var(--panel-padding);
  border-radius: var(--radius-panel);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--glass-border);
}

.working-format ul {
  list-style: none;
  margin-top: 1rem;
  padding-left: 0;
}

.working-format li {
  margin-bottom: 0.8rem;
  padding: 0.5rem;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.working-format li:hover {
  background: #f0f0f0;
}

.working-format a {
  text-decoration: none;
  color: var(--text);
  display: block;
}

.working-format strong { color: var(--text); }

/* Gmail 3-pane layout */
.gmail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.gmail-pane {
  background: var(--glass-bg);
  border-radius: var(--radius-panel);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  max-height: 380px;
  border: 1px solid var(--glass-border);
}

.gmail-pane-header {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.gmail-pane ul {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  flex: 1;
}

.gmail-pane li { margin-bottom: 0.6rem; }

/* Team */
.team {
  background: var(--glass-bg);
  padding: var(--panel-padding);
  border-radius: var(--radius-panel);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  border: 1px solid var(--glass-border);
}

.team-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.add-user-form {
  display: flex;
  gap: 0.5rem;
}

.add-user-form input {
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.7);
}

.add-user-form button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 10px;
  background-color: #4CAF50;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.team-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.team-card {
  background: var(--glass-bg);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--glass-border);
}

.team-card img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.team-card-body {
  display: grid;
}

.team-card-name {
  font-weight: 700;
}

.team-card-role {
  font-size: 0.9rem;
  color: #666;
}

.team-card-email {
  font-size: 0.9rem;
  color: #444;
}

/* Teamnotizen */
.team-notes {
  background: var(--glass-bg);
  padding: var(--panel-padding);
  border-radius: var(--radius-panel);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--glass-border);
}

.team-notes-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.team-note-form {
  display: flex;
  gap: 0.5rem;
}

.team-note-form input {
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.7);
  min-width: 280px;
}

.team-note-form button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 10px;
  background-color: #4fc3f7;
  color: #000;
  font-weight: bold;
  cursor: pointer;
}

.team-notes-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.chat-composer { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; margin-top: 0.75rem; }
.chat-composer input { padding: 0.6rem 0.8rem; border-radius: 10px; border: 1px solid var(--input-border); background: var(--input-bg); }

.team-note-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--glass-border);
}

/* Chat UI */
.chat-list { display: block; }
.chat-item { display: block; margin-bottom: 10px; }
.chat-item.me { text-align: right; }
.chat-bubble { display: inline-block; max-width: 75%; padding: 8px 12px; border-radius: 14px; background: rgba(255,255,255,0.85); border: 1px solid var(--glass-border); color: #111; }
.chat-item.me .chat-bubble { background: #e8f7f0; border-color: rgba(0,0,0,0.06); }
.chat-meta { font-size: 0.8rem; color: #111; margin-top: 2px; }
.chat-reactions { background: rgba(0,0,0,0.05); padding: 2px 6px; border-radius: 999px; }
.chat-menu { position: fixed; display:none; left:0; top:0; z-index: 99999; background: #ffffff; color:#111; border:1px solid rgba(0,0,0,0.12); border-radius: 10px; padding: 8px; box-shadow: 0 10px 24px rgba(0,0,0,0.18); }
.chat-menu button { background: #f6f7f9; color:#111; border: 1px solid rgba(0,0,0,0.08); text-align: left; padding: 8px 10px; cursor: pointer; border-radius: 8px; }
.chat-menu button:hover { background: #eef0f3; }
.dark .chat-menu, body.dark .chat-menu { background:#161a1f; color:#e6e6e6; border-color: rgba(255,255,255,0.14); box-shadow: 0 10px 24px rgba(0,0,0,0.7); }
.dark .chat-menu button, body.dark .chat-menu button { background:#232a31; color:#e6e6e6; border-color: rgba(255,255,255,0.12); }
.dark .chat-menu button:hover, body.dark .chat-menu button:hover { background:#2c3440; }

/* Reply-Vorschau in der Bubble */
.chat-bubble .reply-ref { font-size: 0.85rem; color: var(--muted); border-left: 3px solid var(--accent); padding-left: 8px; margin-bottom: 6px; opacity: 0.9; }
.chat-bubble .reply-ref strong { color: inherit; }

/* Kundenverwaltung */
.customers-section { margin-top: 1rem; }
.customers-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }

/* Kundenverwaltung spezifisch: Header mit Filter-Buttons */
#customers-modal .customers-header {
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}
.customers-controls { display: flex; gap: 0.75rem; align-items: center; }
.customers-controls input { padding: 0.5rem; border: 1px solid var(--glass-border); border-radius: 6px; background: rgba(255,255,255,0.1); color: #111; }
.customers-controls input::placeholder { color: #666; }

/* Kategorien-Filter Buttons */
.customer-category-filters { 
  display: flex; 
  gap: 0.5rem; 
  flex-wrap: wrap;
  align-items: center;
}

.category-filter-btn,
button.category-filter-btn,
.customer-category-filters button,
.customer-category-filters .category-filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  color: #2c2c2c !important;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.category-filter-btn:hover,
button.category-filter-btn:hover,
.customer-category-filters button:hover,
.customer-category-filters .category-filter-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--accent, #f58060);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  color: #2c2c2c !important;
}

.category-filter-btn.active,
button.category-filter-btn.active,
.customer-category-filters button.active,
.customer-category-filters .category-filter-btn.active {
  background: linear-gradient(135deg, rgba(245, 128, 96, 0.2) 0%, rgba(245, 128, 96, 0.1) 100%);
  border-color: var(--accent, #f58060);
  color: #2c2c2c !important;
  font-weight: 600;
  box-shadow: 
    0 2px 8px rgba(245, 128, 96, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Dark Mode für Filter-Buttons */
.dark .category-filter-btn,
body.dark .category-filter-btn {
  background: rgba(255,255,255,0.05);
  color: #2c2c2c !important;
  border-color: rgba(255,255,255,0.1);
}

.dark .category-filter-btn:hover,
body.dark .category-filter-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--accent, #f58060);
  color: #2c2c2c !important;
}

.dark .category-filter-btn.active,
body.dark .category-filter-btn.active {
  background: linear-gradient(135deg, rgba(245, 128, 96, 0.25) 0%, rgba(245, 128, 96, 0.15) 100%);
  border-color: var(--accent, #f58060);
  color: #2c2c2c !important;
}

.customers-content { display: flex; gap: 1rem; height: 70vh; }
.customers-sidebar { width: 300px; flex-shrink: 0; }
.customers-list { display: flex; flex-direction: column; gap: 0.5rem; height: 100%; overflow-y: auto; }
.customer-item { padding: 0.75rem; border-radius: 8px; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); cursor: pointer; transition: all 0.2s; }
.customer-item:hover { background: rgba(255,255,255,0.1); }
.customer-item.active { background: rgba(255,255,255,0.15); border-color: var(--accent); }
.customer-item-info { display: flex; flex-direction: column; gap: 0.25rem; position: relative; z-index: 1; }
.customer-item-name { font-weight: 600; color: #111; margin-bottom: 0.25rem; }
.customer-item-details { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.5rem; }
.customer-item-details span { display: flex; align-items: center; gap: 0.25rem; font-size: 0.85rem; color: #666; }
.customer-item-details i { color: var(--accent); }
.customer-item-details a { color: inherit; text-decoration: none; transition: color 0.2s; }
.customer-item-details a:hover { color: var(--accent); text-decoration: underline; }
.customer-item-meta { font-size: 0.75rem; color: #888; }

/* Kundenstatus-basierte Hervorhebung - Apple Liquid Glass Look mit Pastellfarben */
.customer-item.status-aktiv,
.customer-item.status-im-einsatz {
  background: linear-gradient(135deg, 
    rgba(168, 230, 207, 0.25) 0%, 
    rgba(184, 230, 184, 0.15) 50%,
    rgba(255, 255, 255, 0.1) 100%) !important;
  border-color: rgba(168, 230, 207, 0.4) !important;
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  box-shadow: 
    0 2px 8px rgba(168, 230, 207, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(168, 230, 207, 0.1);
}


.customer-item.status-inaktiv,
.customer-item.status-angebot-versendet {
  background: linear-gradient(135deg, 
    rgba(255, 229, 180, 0.25) 0%, 
    rgba(255, 244, 224, 0.15) 50%,
    rgba(255, 255, 255, 0.1) 100%) !important;
  border-color: rgba(255, 229, 180, 0.4) !important;
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  box-shadow: 
    0 2px 8px rgba(255, 229, 180, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(255, 229, 180, 0.1);
}


.customer-item.status-abgesagt {
  background: linear-gradient(135deg, 
    rgba(255, 179, 186, 0.25) 0%, 
    rgba(255, 204, 203, 0.15) 50%,
    rgba(255, 255, 255, 0.1) 100%) !important;
  border-color: rgba(255, 179, 186, 0.4) !important;
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  box-shadow: 
    0 2px 8px rgba(255, 179, 186, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(255, 179, 186, 0.1);
}


.customer-item.status-verstorben {
  background: linear-gradient(135deg, 
    rgba(255, 182, 193, 0.25) 0%, 
    rgba(255, 192, 203, 0.15) 50%,
    rgba(255, 255, 255, 0.1) 100%) !important;
  border-color: rgba(255, 182, 193, 0.4) !important;
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  box-shadow: 
    0 2px 8px rgba(255, 182, 193, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(255, 182, 193, 0.1);
}


/* Hover-Effekte für Status-Items */
.customer-item.status-aktiv:hover,
.customer-item.status-im-einsatz:hover {
  background: linear-gradient(135deg, 
    rgba(168, 230, 207, 0.35) 0%, 
    rgba(184, 230, 184, 0.22) 50%,
    rgba(255, 255, 255, 0.15) 100%) !important;
  box-shadow: 
    0 2px 10px rgba(168, 230, 207, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 0 0 1px rgba(168, 230, 207, 0.15);
}

.customer-item.status-inaktiv:hover,
.customer-item.status-angebot-versendet:hover {
  background: linear-gradient(135deg, 
    rgba(255, 229, 180, 0.35) 0%, 
    rgba(255, 244, 224, 0.22) 50%,
    rgba(255, 255, 255, 0.15) 100%) !important;
  box-shadow: 
    0 2px 10px rgba(255, 229, 180, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 0 0 1px rgba(255, 229, 180, 0.15);
}

.customer-item.status-abgesagt:hover {
  background: linear-gradient(135deg, 
    rgba(255, 179, 186, 0.35) 0%, 
    rgba(255, 204, 203, 0.22) 50%,
    rgba(255, 255, 255, 0.15) 100%) !important;
  box-shadow: 
    0 2px 10px rgba(255, 179, 186, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 0 0 1px rgba(255, 179, 186, 0.15);
}

.customer-item.status-verstorben:hover {
  background: linear-gradient(135deg, 
    rgba(255, 182, 193, 0.35) 0%, 
    rgba(255, 192, 203, 0.22) 50%,
    rgba(255, 255, 255, 0.15) 100%) !important;
  box-shadow: 
    0 2px 10px rgba(255, 182, 193, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 0 0 1px rgba(255, 182, 193, 0.15);
}

/* Dark Mode Anpassungen für Status-Items mit Pastellfarben */
.dark .customer-item.status-aktiv,
.dark .customer-item.status-im-einsatz,
body.dark .customer-item.status-aktiv,
body.dark .customer-item.status-im-einsatz {
  background: linear-gradient(135deg, 
    rgba(168, 230, 207, 0.2) 0%, 
    rgba(184, 230, 184, 0.12) 50%,
    rgba(255, 255, 255, 0.04) 100%);
  border-color: rgba(168, 230, 207, 0.45);
  box-shadow: 
    0 4px 16px rgba(168, 230, 207, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(168, 230, 207, 0.25);
}

.dark .customer-item.status-inaktiv,
.dark .customer-item.status-angebot-versendet,
body.dark .customer-item.status-inaktiv,
body.dark .customer-item.status-angebot-versendet {
  background: linear-gradient(135deg, 
    rgba(255, 229, 180, 0.2) 0%, 
    rgba(255, 244, 224, 0.12) 50%,
    rgba(255, 255, 255, 0.04) 100%);
  border-color: rgba(255, 229, 180, 0.45);
  box-shadow: 
    0 4px 16px rgba(255, 229, 180, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(255, 229, 180, 0.25);
}

.dark .customer-item.status-abgesagt,
body.dark .customer-item.status-abgesagt {
  background: linear-gradient(135deg, 
    rgba(255, 179, 186, 0.2) 0%, 
    rgba(255, 204, 203, 0.12) 50%,
    rgba(255, 255, 255, 0.04) 100%);
  border-color: rgba(255, 179, 186, 0.45);
  box-shadow: 
    0 4px 16px rgba(255, 179, 186, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(255, 179, 186, 0.25);
}

.dark .customer-item.status-verstorben,
body.dark .customer-item.status-verstorben {
  background: linear-gradient(135deg, 
    rgba(255, 182, 193, 0.2) 0%, 
    rgba(255, 192, 203, 0.12) 50%,
    rgba(255, 255, 255, 0.04) 100%);
  border-color: rgba(255, 182, 193, 0.45);
  box-shadow: 
    0 4px 16px rgba(255, 182, 193, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(255, 182, 193, 0.25);
}

.customer-profile { flex: 1; background: rgba(255,255,255,0.05); border-radius: 10px; border: 1px solid var(--glass-border); overflow: hidden; }
.customer-profile-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: #666; }
.customer-profile-empty i { font-size: 4rem; margin-bottom: 1rem; opacity: 0.5; }
.customer-profile-empty h4 { margin-bottom: 0.5rem; color: #111; }

.customer-profile-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem; border-bottom: 1px solid var(--glass-border); background: rgba(255,255,255,0.05); }
.customer-profile-title h2 { margin: 0 0 0.5rem 0; color: #111; }
.customer-profile-meta { display: flex; flex-wrap: wrap; gap: 1rem; }
.customer-profile-meta span { display: flex; align-items: center; gap: 0.25rem; font-size: 0.9rem; color: #666; }
.customer-profile-meta i { color: var(--accent); }
.customer-profile-meta a { color: inherit; text-decoration: none; transition: color 0.2s; }
.customer-profile-meta a:hover { color: var(--accent); text-decoration: underline; }
.profile-item a { color: inherit; text-decoration: none; transition: color 0.2s; }
.profile-item a:hover { color: var(--accent); text-decoration: underline; }
.customer-profile-actions { display: flex; gap: 0.5rem; }

.customer-profile-content { height: calc(100% - 80px); }
.customer-profile-tabs { display: flex; border-bottom: 1px solid var(--glass-border); background: rgba(255,255,255,0.05); }
.customer-profile-tabs .tab-btn { padding: 1rem 1.5rem; border: none; background: transparent; color: #000 !important; font-family: 'Quicksand', sans-serif; cursor: pointer; transition: all 0.2s; }
.customer-profile-tabs .tab-btn:hover { background: rgba(255,255,255,0.05); color: #000 !important; }
.customer-profile-tabs .tab-btn.active { background: rgba(255,255,255,0.1); color: #000 !important; border-bottom: 2px solid var(--accent); }

.customer-profile-tab-content { height: calc(100% - 50px); overflow-y: auto; }
.tab-panel { display: none; padding: 1.5rem; }
.tab-panel.active { display: block; }

.profile-section { margin-bottom: 2rem; }
.profile-section h3 { margin-bottom: 1rem; color: #111; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.profile-item { display: flex; flex-direction: column; gap: 0.25rem; }
.profile-item label { font-weight: 600; color: #666; font-size: 0.9rem; }
.profile-item span { color: #111; }
.profile-notes { background: rgba(255,255,255,0.05); padding: 1rem; border-radius: 8px; border: 1px solid var(--glass-border); color: #111; }

.data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.data-item { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.75rem; background: rgba(255,255,255,0.05); border-radius: 6px; border: 1px solid var(--glass-border); }
.data-item.full-width { grid-column: 1 / -1; }
.data-item label { font-weight: 600; color: #666; font-size: 0.85rem; }
.data-item span { color: #111; }

.pdf-display { margin-top: 1rem; }
.pdf-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
.btn-coral { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.5rem 1rem; background: #ff6b35; color: white; text-decoration: none; border-radius: 6px; font-size: 0.875rem; transition: background-color 0.2s; }
.btn-coral:hover { background: #e55a2b; }

/* Kooperationspartner Styles */
.partners-header { margin-bottom: 1rem; }
.partners-controls { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.partners-controls input { flex: 1; min-width: 200px; }
.partners-content { margin-top: 1rem; }
.partners-list { max-height: 400px; overflow-y: auto; }
.partner-item { padding: 1rem; background: rgba(255,255,255,0.05); border-radius: 8px; border: 1px solid var(--glass-border); margin-bottom: 0.5rem; cursor: pointer; transition: background-color 0.2s; }

/* Tab Navigation Styles */
.tab-navigation { display: flex; gap: 0.5rem; border-bottom: 1px solid var(--glass-border); }
.tab-btn { padding: 0.75rem 1rem; background: transparent; border: none; border-bottom: 2px solid transparent; cursor: pointer; color: #666; transition: all 0.2s; }
.tab-btn:hover { color: #333; background: rgba(255,255,255,0.05); }
.tab-btn.active { color: #f58060; border-bottom-color: #f58060; background: rgba(245,128,96,0.1); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Email Reminder Styles */
.email-reminder-form { padding: 1rem 0; }
.email-reminder-form .form-group { margin-bottom: 1rem; }
.email-reminder-form label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: #333; }
.partner-checkbox { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem; border-bottom: 1px solid #eee; }
.partner-checkbox:last-child { border-bottom: none; }
.partner-checkbox input[type="checkbox"] { margin: 0; }
.partner-checkbox label { margin: 0; font-weight: normal; cursor: pointer; }
#partner-selection { max-height: 120px !important; overflow-y: auto; border: 1px solid #ddd; border-radius: 4px; padding: 10px; }
.partner-item:hover { background: rgba(255,255,255,0.1); }
.partner-item-info { display: flex; flex-direction: column; gap: 0.25rem; }
.partner-item-name { font-weight: 600; color: #111; font-size: 1rem; }
.partner-item-details { display: flex; flex-direction: column; gap: 0.25rem; }
.partner-item-details span { color: #666; font-size: 0.9rem; }
.partner-item-meta { margin-top: 0.5rem; }
.partner-item-meta small { color: #888; font-size: 0.8rem; }

.history-list { display: flex; flex-direction: column; gap: 0.75rem; }
.history-item { padding: 1rem; background: rgba(255,255,255,0.05); border-radius: 8px; border: 1px solid var(--glass-border); }
.history-type { font-weight: 600; color: #111; margin-bottom: 0.25rem; }
.history-time { font-size: 0.85rem; color: #666; margin-bottom: 0.5rem; }
.history-details { font-size: 0.9rem; color: #111; background: rgba(255,255,255,0.05); padding: 0.5rem; border-radius: 4px; }

/* Responsive */
@media (max-width: 768px) {
  .customers-header { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .customers-controls { flex-direction: column; }
  .customers-content { flex-direction: column; height: auto; }
  .customers-sidebar { width: 100%; height: 300px; }
  .customer-profile { height: 500px; }
  .customer-profile-header { flex-direction: column; align-items: stretch; gap: 1rem; }
  .customer-profile-meta { flex-direction: column; gap: 0.5rem; }
  .profile-grid { grid-template-columns: 1fr; }
  .data-grid { grid-template-columns: 1fr; }
}

/* Befragungsbogen-Modal */
.befragungsbogen-controls { display: flex; gap: 0.75rem; align-items: center; }
.customer-selection { display: flex; align-items: center; gap: 0.5rem; }
.customer-selection label { font-weight: 600; color: #111; }
.customer-selection select { padding: 0.5rem; border: 1px solid var(--glass-border); border-radius: 6px; background: rgba(255,255,255,0.1); color: #111; min-width: 250px; }

/* Modal-Header mit Controls */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.team-note-content {
  font-weight: 600;
}

.team-note-meta {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  color: #666;
}

.team-note-delete {
  border: none;
  background: transparent;
  color: #f58060;
  border-radius: var(--radius-btn);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-weight: 600;
}

/* Anfrage Lösch-Buttons */
.anfrage-delete {
  background: transparent !important;
  color: #f58060 !important;
  border: none;
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: transform .1s ease, color .15s ease;
}

.anfrage-delete:hover {
  transform: scale(1.2);
  color: #f58060;
}

/* Responsive */
@media (max-width: 1200px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .gmail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .middle-row {
    grid-template-columns: 1fr;
  }
  .mail-columns { grid-template-columns: 1fr; }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .dashboard-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
  }
  .sidebar-gmail { display: none; }
  .mail-columns { grid-template-columns: 1fr; }
  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* Utility Glass + Helpers (keeps original colors) */
.glass {
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  background: var(--glass-bg);
  border-radius: var(--radius-panel);
}

.muted { color: var(--muted); }
.date-gradient { color: inherit; }

.btn-small {
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-btn);
  text-decoration: none;
  background: var(--accent);
  color: var(--accent-contrast) !important;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: filter .15s ease, transform .05s ease;
}
button.btn-small, button, .btn-small { background: var(--accent); color: var(--accent-contrast) !important; }

/* Ensure anchor buttons keep correct text color */
.working-format a.btn-small { color: var(--accent-contrast) !important; }
.dark .working-format a.btn-small, body.dark .working-format a.btn-small { color: #111 !important; }
.btn-small:hover { filter: brightness(0.95); }
.btn-small:active { transform: translateY(1px); }
.btn-small:focus-visible { outline: none; box-shadow: var(--focus-ring); }

input[type="text"], input[type="email"], input[type="file"],
textarea, select {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-input);
  padding: 0.6rem 0.8rem;
  color: var(--text);
}
#pdfUploadForm input[type="file"] {
  position: relative;
  background: var(--input-bg);
  border: 1px dashed var(--input-border);
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-input);
}

#pdfUploadForm input[type="file"]::-webkit-file-upload-button {
  visibility: hidden;
}
#pdfUploadForm input[type="file"]::before {
  content: 'Datei wählen';
  display: inline-block;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: var(--radius-btn);
  padding: 0.45rem 0.8rem;
  margin-right: 0.6rem;
  cursor: pointer;
}
#pdfUploadForm input[type="file"]:hover::before { filter: brightness(0.95); }
#pdfUploadForm input[type="file"]:active::before { transform: translateY(1px); }
input[type="text"]:focus, input[type="email"]:focus, input[type="file"]:focus,
textarea:focus, select:focus { outline: none; box-shadow: var(--focus-ring); }

/* Scrollbar polishing */
#einsatzList, #pdf-list, .team-notes-list, .gmail-pane ul {
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.2) transparent;
}
#einsatzList::-webkit-scrollbar, #pdf-list::-webkit-scrollbar, .team-notes-list::-webkit-scrollbar, .gmail-pane ul::-webkit-scrollbar { height: 8px; width: 8px; }
#einsatzList::-webkit-scrollbar-thumb, #pdf-list::-webkit-scrollbar-thumb, .team-notes-list::-webkit-scrollbar-thumb, .gmail-pane ul::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 999px; }
#einsatzList::-webkit-scrollbar-track, #pdf-list::-webkit-scrollbar-track, .team-notes-list::-webkit-scrollbar-track, .gmail-pane ul::-webkit-scrollbar-track { background: transparent; }

/* Sidebar Dark Mode text forced to white */
.dark .sidebar, body.dark .sidebar { color: #fff; }
.dark .sidebar .nav li { color: #fff; }

/* Modal basic styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 9999;
}

.modal-content {
  width: min(100%, 1100px);
  max-height: 95vh;
  border-radius: var(--radius-panel);
  background: var(--glass-bg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid var(--glass-border);
}

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

.rich-editor {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.editor-toolbar button {
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.04);
  color: inherit;
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.editor-toolbar button:hover {
  background: rgba(0, 0, 0, 0.08);
}

.editor-toolbar button[data-command="bold"] {
  font-weight: 700;
}

.editor-toolbar button[data-command="italic"] {
  font-style: italic;
}

.editor-toolbar button[data-command="underline"] {
  text-decoration: underline;
}

.editor-content {
  border: 1px solid #ddd;
  border-radius: 10px;
  background: white;
  min-height: 320px;
  padding: 0.75rem;
  overflow-y: auto;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
}

.editor-html-source {
  display: none;
  border: 1px solid #ddd;
  border-radius: 10px;
  min-height: 320px;
  padding: 0.75rem;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
}

.editor-preview {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 1rem;
  background: white;
  overflow-y: auto;
}

/* Dark mode modal */
.dark .modal-content, body.dark .modal-content { background: var(--glass-bg); }
