* {
  box-sizing: border-box;
}

:root {
  --color-primary: #03045E;
  --color-bg: #EFF0F5;
  --color-accent: #0077B6;
  --color-white: #fff;
  --color-text: #333;
  --color-muted: #555;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 9999px;
  --shadow-card: 0 2px 12px rgba(3, 4, 94, 0.08);
  --shadow-card-hover: 0 8px 24px rgba(3, 4, 94, 0.12);
  --transition-fast: 0.2s ease;
  --sidebar-width: 240px;
  --gap-cell: 0.5rem;
  --color-background-hover: #f8fafc;
  --color-border: rgba(3, 4, 94, 0.2);
}

/* Globale Tastatur-Fokusanzeige (nur bei :focus-visible, z. B. Tab/Arrow) */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  padding: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
}

body:has(.app-layout) {
  padding: 0;
}

.app-layout {
  min-height: 100vh;
  display: flex;
  position: relative;
}

/* Container – mobile-first */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Site header – Nordloom style */
.site-header {
  background: var(--color-white);
  padding: 0.75rem 0;
  margin: -1rem -1rem 0;
  box-shadow: 0 1px 0 rgba(3, 4, 94, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .site-header {
    margin: -1rem -1rem 0;
    padding: 1rem 0;
  }
  .header-inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.site-logo {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

.site-logo:hover {
  text-decoration: none;
  opacity: 0.85;
}

.site-logo .site-logo-img {
  display: block;
  max-height: 36px;
  width: auto;
  vertical-align: middle;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons – einheitlich im gesamten Hub (inkl. CRM-Aliasse) */
.btn-primary,
.btn-crm-primary,
a.btn-primary,
a.btn-crm-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 1.25rem;
  min-height: 44px;
  min-width: 0;
  background: var(--color-accent);
  color: var(--color-white);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), opacity var(--transition-fast);
}

.btn-primary:hover:not(:disabled),
.btn-crm-primary:hover:not(:disabled),
a.btn-primary:hover,
a.btn-crm-primary:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:disabled,
.btn-crm-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-secondary,
.btn-crm-outline,
a.btn-secondary,
a.btn-crm-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 1.25rem;
  min-height: 44px;
  min-width: 0;
  background: var(--color-white);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.btn-secondary:hover,
.btn-crm-outline:hover,
a.btn-secondary:hover,
a.btn-crm-outline:hover {
  background: var(--color-bg);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Card base */
.card {
  background: var(--color-white);
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* Eyebrow */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0 0 0.5rem;
}

/* Grid background for hero areas */
.bg-grid {
  background-color: var(--color-bg);
  background-image:
    linear-gradient(rgba(3, 4, 94, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(3, 4, 94, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Base typography – mobile-first */
h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--color-primary);
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--color-primary);
}

@media (min-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.5rem;
  }
}

p {
  margin: 0;
  color: var(--color-muted);
}

a {
  color: var(--color-accent);
}

a:hover {
  text-decoration: underline;
}

.user-info {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* ---------- Admin Dashboard Layout ---------- */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--color-accent);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0;
  transition: transform 0.2s ease;
}

.sidebar-logo {
  display: block;
  text-decoration: none;
  padding: 0 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1rem;
}

.sidebar-logo:hover {
  text-decoration: none;
}

.sidebar-logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 52px;
  object-fit: contain;
}

.sidebar-nav {
  padding: 0 0.75rem;
}

.sidebar-nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
  border-radius: 8px;
}

.sidebar-nav a.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  border-radius: 8px;
  font-weight: 600;
}

.sidebar-nav .nav-icon {
  display: inline-flex;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.sidebar-nav .nav-icon svg {
  display: block;
}

.sidebar-nav [data-lucide] {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}

.sidebar-nav a.active [data-lucide] {
  color: #ffffff;
}

/* Accordion Toggle Button */
.nav-accordion-toggle {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-accordion-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-accordion.open .nav-accordion-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Chevron-Rotation */
.nav-chevron {
  margin-left: auto;
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
  opacity: 0.55;
}

.nav-accordion.open .nav-chevron {
  transform: rotate(90deg);
  opacity: 1;
}

/* Submenu */
.nav-submenu {
  list-style: none;
  padding: 2px 0 4px 0;
  margin: 0;
  display: none;
  flex-direction: column;
  gap: 1px;
}

.nav-accordion.open .nav-submenu {
  display: flex;
}

/* Sublinks */
.nav-sublink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 36px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-sublink:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.nav-sublink.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 600;
}

/* Kleines Icon in Sublinks */
.nav-icon-sm {
  width: 13px;
  height: 13px;
  opacity: 0.7;
}

.nav-sublink.active .nav-icon-sm {
  opacity: 1;
}

.sidebar-nav-projects {
  margin-top: 1.5rem;
}

.sidebar-nav-projects-title {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 99;
}

.sidebar--open + .sidebar-overlay {
  display: block;
}

.app-body {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  transition: margin-left 0.2s ease;
  min-width: 0;
}

/* Sidebar auf allen Viewports ausblendbar (Desktop) */
@media (min-width: 768px) {
  body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
  }
  body.sidebar-collapsed .app-body {
    margin-left: 0;
  }
  body.sidebar-collapsed .sidebar-overlay {
    display: none;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 56px;
  padding: 0 1.5rem;
  background: var(--color-white);
  box-shadow: 0 1px 0 rgba(3, 4, 94, 0.06);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-left: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar-search {
  display: flex;
  align-items: center;
  position: relative;
}

.topbar-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
  pointer-events: none;
}

.topbar-search-input {
  width: 180px;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  font-size: 0.875rem;
  border: 1px solid rgba(3, 4, 94, 0.12);
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition-fast);
}

.topbar-search-input::placeholder {
  color: var(--color-muted);
}

.topbar-search-input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.project-list-header .topbar-search-input {
  width: 240px;
}

.project-list-error {
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: #dc2626;
  margin-bottom: 0.5rem;
}

.topbar-notify {
  position: relative;
}

.topbar-notify-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.topbar-notify-btn:hover {
  color: var(--color-primary);
  background: var(--color-bg);
}

.notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  border: 2px solid var(--color-white);
}

.topbar-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: #dc2626;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.topbar-logout-btn:hover {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.08);
}

.topbar-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-md);
}

.topbar-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
}

.main-content {
  flex: 1;
  padding: 1.5rem 1.5rem 2rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  min-width: 0;
}

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

.main-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
}

.btn-new-project {
  text-decoration: none;
  white-space: nowrap;
}

.btn-new-project:hover {
  text-decoration: none;
}

/* Projekt-Modal / alle Portal-Popups: einheitlich als Panel von rechts */
.project-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 94, 0.35);
  z-index: 1000;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
}

.project-modal-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.project-modal {
  background: var(--color-white);
  border-radius: 0;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18);
  border-left: 1px solid #e5e7eb;
  width: min(560px, 100%);
  max-width: min(560px, 100%);
  height: 100%;
  max-height: none;
  margin: 0;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.2s ease;
}

.project-modal-overlay[aria-hidden="false"] .project-modal {
  transform: translateX(0);
}

/* Optional: zusätzliche .open-Klasse (z. B. tasks.js) – gleiche Zielposition */
.project-modal.open {
  transform: translateX(0);
}

.project-modal .project-modal-field input,
.project-modal .project-modal-field select,
.project-modal .project-modal-field textarea {
  border-radius: 0;
}

.project-modal .project-modal-close {
  border-radius: 0;
}

.project-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(3, 4, 94, 0.08);
}

.project-modal-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-primary);
}

.project-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.project-modal-close:hover {
  background: var(--color-bg);
  color: var(--color-primary);
}

.project-modal-close:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.project-modal-form {
  padding: 1.5rem;
}

.project-modal-field {
  margin-bottom: 1.25rem;
}

.project-modal-field:last-of-type {
  margin-bottom: 1.5rem;
}

.project-modal-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.35rem;
}

.project-modal-field input,
.project-modal-field select,
.project-modal-field textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font: inherit;
  color: var(--color-text);
  background: var(--color-white);
}

.project-modal-field input:focus,
.project-modal-field select:focus,
.project-modal-field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(0, 119, 182, 0.2);
}

.project-modal-field .crm-deal-value-frequency {
  margin-top: 6px;
}

.project-modal-field .crm-deal-freq-label input[type='radio'] {
  width: auto;
}

.project-modal-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.user-modal-avatar-field {
  margin-bottom: 1.25rem;
}

.user-modal-avatar-label {
  display: block;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.user-modal-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.user-modal-avatar-preview {
  width: 80px;
  height: 80px;
  min-width: 80px;
  min-height: 80px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-modal-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-modal-avatar-initials {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-muted);
}

.user-modal-avatar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-modal-avatar-btn {
  flex-shrink: 0;
}

.user-modal-avatar-input {
  font-size: 0.875rem;
  max-width: 100%;
}

.user-modal-password-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.user-modal-password-row input {
  flex: 1;
  min-width: 12rem;
}

.user-modal-password-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Kompakte Variante – nur zusammen mit .btn-primary / .btn-secondary / CRM-Aliassen */
.btn-primary.btn-small,
.btn-secondary.btn-small,
.btn-crm-primary.btn-small,
.btn-crm-outline.btn-small,
a.btn-primary.btn-small,
a.btn-secondary.btn-small,
a.btn-crm-primary.btn-small,
a.btn-crm-outline.btn-small {
  min-height: 36px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.btn-small {
  white-space: nowrap;
}

.user-modal-password-copied {
  font-size: 0.8125rem;
  color: var(--color-accent);
  font-weight: 500;
}

.meeting-modal-field-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.project-modal-field textarea {
  resize: vertical;
  min-height: 4rem;
}

@media (max-width: 480px) {
  .meeting-modal-field-row-3 {
    grid-template-columns: 1fr;
  }
}

.project-modal-team-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 0.5rem;
}
.project-modal-team-section-title:not(:first-child) {
  margin-top: 1rem;
}
.project-modal-customer-placeholder {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin: 0;
  font-style: italic;
}
.project-modal-team-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.project-modal-team-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-white);
}

.project-modal-team-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(3, 4, 94, 0.06);
  transition: background var(--transition-fast);
}

.project-modal-team-item:last-child {
  border-bottom: none;
}

.project-modal-team-item:hover {
  background: var(--color-background-hover);
}

.project-modal-team-item label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  cursor: pointer;
  margin: 0;
  font-weight: 400;
}

.project-modal-team-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-accent);
  flex-shrink: 0;
  overflow: hidden;
}

.project-modal-team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-modal-team-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.task-visible-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.task-visible-label {
  font-size: 0.875rem;
  color: var(--color-text);
}

.project-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.project-modal-body {
  padding: 1.5rem;
}

.edit-team-modal-intro {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.edit-team-modal-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  max-height: 16rem;
  overflow-y: auto;
}

.edit-team-modal-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.edit-team-modal-item:hover {
  background: var(--color-background-hover);
}

.edit-team-modal-cb {
  flex-shrink: 0;
}

.edit-team-modal-item-name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
}

/* Projekt-Detail: Breadcrumb & Header */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.breadcrumb a {
  color: var(--color-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb-sep {
  color: var(--color-muted);
  opacity: 0.8;
}

.breadcrumb-current {
  color: var(--color-muted);
}

.project-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.project-detail-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* Kundenansicht-Toggle */
.view-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.view-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
}

.view-toggle-icon svg {
  display: block;
}

#view-toggle-cb,
.toggle-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  clip-path: inset(50%);
}

.view-toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 9999px;
  background: var(--color-bg);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.view-toggle-switch:hover {
  background: #e2e8f0;
}

.view-toggle-slider {
  position: absolute;
  left: 2px;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transform: translateY(-50%);
  transition: transform var(--transition-fast);
}

#view-toggle-cb:checked + .view-toggle-switch,
.toggle-input:checked + .view-toggle-switch {
  background: var(--color-accent);
}

#view-toggle-cb:checked + .view-toggle-switch:hover,
.toggle-input:checked + .view-toggle-switch:hover {
  background: var(--color-primary);
}

#view-toggle-cb:checked + .view-toggle-switch .view-toggle-slider,
.toggle-input:checked + .view-toggle-switch .view-toggle-slider {
  transform: translateX(18px) translateY(-50%);
}

.view-toggle-label.is-active {
  color: var(--color-accent);
  font-weight: 500;
}

.project-detail-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
}

@media (min-width: 768px) {
  .project-detail-title {
    font-size: 1.75rem;
  }
}

/* Card title (shared) */
.card-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* Project detail tabs */
.project-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(3, 4, 94, 0.1);
}

.project-tab {
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.project-tab:hover {
  color: var(--color-primary);
}

.project-tab.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* Tab content panels */
.tab-content {
  display: block;
}

.tab-placeholder {
  margin: 0;
  padding: 1.5rem 0;
  color: var(--color-muted);
  font-size: 0.9375rem;
}

/* Files tab: upload zone */
.file-upload-zone {
  border: 2px dashed var(--color-border);
  background: var(--color-bg);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.file-upload-zone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 120px;
}

.file-upload-icon {
  color: var(--color-muted);
  opacity: 0.8;
}

.file-upload-text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-muted);
}

/* Files list */
.files-list-card .card-title {
  margin-bottom: 1rem;
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.files-list-row {
  display: grid;
  grid-template-columns: 1fr 80px 120px 1fr 44px;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(3, 4, 94, 0.06);
}

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

.files-list-row.files-list-head {
  background: var(--color-bg);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-muted);
  padding: 0.625rem 0;
}

.files-list-row:not(.files-list-head) {
  transition: background-color var(--transition-fast);
}

.files-list-row:not(.files-list-head):hover {
  background-color: var(--color-background-hover);
}

.files-list-cell {
  min-width: 0;
}

.files-list-actions {
  display: flex;
  justify-content: flex-end;
}

.files-list-card .kebab-wrap {
  flex-shrink: 0;
}

/* Projektdateien (Drive) – Dateien-Tab */
.files-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.files-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-primary, #111827);
}

.files-list-drive {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.files-list-drive .file-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 14px 18px;
}

.files-list-drive .file-icon {
  width: 20px;
  height: 20px;
  color: #6B7280;
  flex-shrink: 0;
}

.files-list-drive .file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.files-list-drive .file-name {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

.files-list-drive .file-meta {
  font-size: 12px;
  color: #9CA3AF;
}

.files-list-drive .btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #4F46E5;
  color: #ffffff;
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.files-list-drive .btn-download:hover {
  background: #4338CA;
}

.files-empty {
  color: #9CA3AF;
  font-size: 14px;
  margin-top: 24px;
  text-align: center;
}

.drive-folder-setting {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

.drive-folder-setting input {
  border: 1px solid #D1D5DB;
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 13px;
  width: 280px;
}

.drive-folder-setting button {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 7px;
  background: #4F46E5;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.drive-folder-setting button:hover {
  background: #4338CA;
}

/* Button mit Icon (global für Dateien-Tab u. a.) */
.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-icon-sm {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Drive-Link-Card (Dateien-Tab) */
.drive-link-card {
  margin-bottom: 1.5rem;
}

.drive-link-card-header {
  margin-bottom: 0.25rem;
}

.drive-link-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.drive-link-card-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--color-primary, #03045E);
}

.drive-link-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.drive-link-current-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.drive-link-current-icon {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

.drive-link-card-desc {
  color: var(--color-muted, #6B7280);
  font-size: 0.9375rem;
  margin: 0 0 1rem;
  line-height: 1.4;
}

.drive-link-card-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.drive-link-card-input-wrap .drive-link-input {
  flex: 1;
  min-width: 200px;
  max-width: 100%;
  border: 1px solid #D1D5DB;
  border-radius: var(--radius-md, 8px);
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
}

.drive-link-current-wrap {
  font-size: 0.875rem;
  color: var(--color-muted, #6B7280);
}

.drive-link-current-label {
  margin-right: 0.35rem;
}

.drive-link-current-link {
  color: var(--color-primary, #03045E);
  text-decoration: none;
  font-weight: 500;
}

.drive-link-current-link:hover {
  text-decoration: underline;
}

/* Projektdateien Abschnitt */
.files-section-card {
  margin-top: 0;
}

.files-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.files-section-header .card-title,
.files-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
}

.files-section-title-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--color-primary, #03045E);
}

.files-view-toggle {
  display: flex;
  gap: 0.25rem;
}

.files-view-toggle .crm-view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.files-toggle-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Kundenansicht: "In Drive"-Link nicht anzeigen */
body[data-role="client"] .file-action-in-drive {
  display: none !important;
}

/* Empty State */
.files-empty-state {
  text-align: center;
  padding: 2rem 1rem;
}

.files-empty-state-icon-wrap {
  margin-bottom: 0.75rem;
}

.files-empty-state-icon {
  width: 3rem;
  height: 3rem;
  color: var(--color-muted, #9CA3AF);
  opacity: 0.8;
}

.files-empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-primary, #111827);
  margin: 0 0 0.25rem;
}

.files-empty-state-text {
  font-size: 0.9375rem;
  color: var(--color-muted, #9CA3AF);
  margin: 0 0 1rem;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.files-empty-state .btn-primary {
  margin-top: 0.5rem;
}

/* Files Table */
.files-list-wrap {
  margin-top: 0;
}

.files-table-wrap {
  overflow-x: auto;
}

.files-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.files-table th,
.files-table td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(3, 4, 94, 0.08);
}

.files-table th {
  font-weight: 600;
  color: var(--color-muted, #6B7280);
  font-size: 0.8125rem;
}

.files-td-icon {
  width: 44px;
  vertical-align: middle;
}

.file-type-icon {
  width: 20px;
  height: 20px;
  color: #6B7280;
  display: inline-block;
  vertical-align: middle;
}

.files-td-name {
  max-width: 0;
  min-width: 180px;
}

.file-name-cell {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.files-td-size {
  color: var(--color-muted, #6B7280);
  white-space: nowrap;
}

.files-td-actions {
  white-space: nowrap;
}

.files-td-actions .btn-small {
  margin-right: 0.25rem;
}

/* Files Grid */
.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.file-card {
  background: var(--color-bg, #F9FAFB);
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-lg, 10px);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-card-icon {
  margin-bottom: 0.25rem;
}

.file-card-icon .file-type-icon {
  width: 24px;
  height: 24px;
}

.file-card-name {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-primary, #111827);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card-meta {
  font-size: 0.8125rem;
  color: var(--color-muted, #9CA3AF);
}

.file-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
}

@media (max-width: 768px) {
  .files-table .files-th-size,
  .files-table .files-td-size {
    display: none;
  }
  .files-td-name {
    min-width: 120px;
  }
  .files-list-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
  }

  .files-list-row .files-list-name { grid-column: 1 / -1; }
  .files-list-row .files-list-type { grid-column: 1; }
  .files-list-row .files-list-date { grid-column: 2; }
  .files-list-row .files-list-by { grid-column: 1 / -1; }
  .files-list-row .files-list-actions { grid-column: 2; justify-self: end; }

  .files-list-row.files-list-head .files-list-name,
  .files-list-row.files-list-head .files-list-type,
  .files-list-row.files-list-head .files-list-date,
  .files-list-row.files-list-head .files-list-by,
  .files-list-row.files-list-head .files-list-actions {
    grid-column: 1 / -1;
  }
}

/* Overview layout: 65% / 35% */
.project-detail-overview {
  display: grid;
  grid-template-columns: 65% 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .project-detail-overview {
    grid-template-columns: 1fr;
  }
}

.project-detail-overview__main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-detail-overview__side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Project progress card */
.project-progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.project-progress-bar-wrap .progress-bar {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.project-progress-pct {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
  flex-shrink: 0;
}

.project-progress-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.project-progress-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text);
}

.project-progress-date-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--color-muted);
}

.project-progress-date-icon svg {
  display: block;
}

/* Milestone stepper */
.milestone-stepper {
  list-style: none;
  margin: 0;
  padding: 0;
}

.milestone-step {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.milestone-step:last-child {
  padding-bottom: 0;
}

.milestone-step::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 24px;
  bottom: 0;
  width: 2px;
  background: rgba(3, 4, 94, 0.08);
}

.milestone-step:last-child::after {
  display: none;
}

.milestone-step__icon {
  position: absolute;
  left: 0;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #94a3b8;
  color: var(--color-white);
}

.milestone-step__icon svg {
  width: 10px;
  height: 10px;
}

.milestone-step--done .milestone-step__icon {
  background: #10b981;
}

.milestone-step--done .milestone-step__icon svg {
  display: block;
}

.milestone-step--active .milestone-step__icon {
  background: var(--color-accent);
  width: 14px;
  height: 14px;
  top: 3px;
}

.milestone-step--pending .milestone-step__icon {
  background: #94a3b8;
}

.milestone-step__label {
  font-size: 0.9375rem;
  line-height: 1.4;
}

.milestone-step--done .milestone-step__label {
  color: var(--color-muted);
}

.milestone-step--active .milestone-step__label {
  font-weight: 600;
  color: var(--color-primary);
}

.milestone-step--pending .milestone-step__label {
  color: var(--color-muted);
}

.milestone-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.milestone-card-header .card-title {
  margin-bottom: 0;
}

.milestone-card-edit-link {
  font-size: 0.8125rem;
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: none;
  color: var(--color-accent);
  cursor: pointer;
  border-radius: 0;
}

.milestone-card-edit-link:hover {
  text-decoration: underline;
}

.edit-milestones-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.edit-milestones-item {
  display: grid;
  grid-template-columns: 20px 1fr 140px 32px;
  gap: 0.5rem;
  align-items: center;
}

.edit-milestones-handle {
  cursor: grab;
  font-size: 0.9rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.edit-milestones-item.dragging .edit-milestones-handle {
  cursor: grabbing;
}

.edit-milestones-item.dragging {
  opacity: 0.7;
}

.edit-milestones-item.drop-before {
  border-top: 2px solid var(--color-accent);
}

.edit-milestones-item.drop-after {
  border-bottom: 2px solid var(--color-accent);
}

.edit-milestones-title {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  padding: 0.4rem 0.6rem;
  font-size: 0.875rem;
}

.edit-milestones-status {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  padding: 0.4rem 0.6rem;
  font-size: 0.8125rem;
  background: var(--color-white);
}

.edit-milestones-delete-btn {
  border: none;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-muted);
}

.edit-milestones-delete-btn:hover {
  color: #dc2626;
}

.edit-milestones-actions-top {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 0.75rem;
}

/* Tasks card (Aktuelle Aufgaben) */
.tasks-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.tasks-card-header .card-title {
  margin-bottom: 0;
}

/* Entspricht kompaktem Sekundär-Button (Hub-Einheitlichkeit) */
.btn-task-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  background: var(--color-white);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  box-sizing: border-box;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.btn-task-add:hover {
  background: var(--color-bg);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.tasks-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(3, 4, 94, 0.06);
  transition: opacity 0.2s ease;
}

.task-item:last-child {
  border-bottom: none;
}

.completed-tasks-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-muted);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.task--completed {
  opacity: 0.6;
}

.task--completed .task-title {
  text-decoration: line-through;
}

.task--completed .badge {
  background: var(--color-bg);
  color: var(--color-muted);
}

.task--completed .badge::before {
  background: #94a3b8;
}

.task-checkbox {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 4px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.task-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.task-title {
  font-size: 0.9375rem;
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-word;
  width: 100%;
}

.task-item-desc-preview {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.35;
  width: 100%;
  max-height: 4.5em;
  overflow: hidden;
}

.task-desc-format {
  margin: 0;
}

.task-desc-p {
  margin: 0 0 0.25em 0;
}

.task-desc-p:last-child {
  margin-bottom: 0;
}

.task-desc-ul {
  margin: 0.15em 0 0.35em 1.1em;
  padding-left: 0.5em;
  list-style: disc;
}

.task-desc-ul:last-child {
  margin-bottom: 0;
}

.task-desc-ul li {
  margin: 0.08em 0;
}

.task-item-subtasks-meta {
  font-size: 0.72rem;
  color: #64748b;
}

.task-item-subtasks-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.15rem;
}

.task-subtask-row {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--color-text);
  cursor: pointer;
}

.task-subtask-row .task-subtask-cb {
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--color-accent);
}

.task-subtask-title {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.35;
}

.task-due {
  font-size: 0.8125rem;
  color: var(--color-muted);
  flex-shrink: 0;
}

.task-due--overdue {
  color: #dc2626;
}

.task-visibility {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-muted);
}

.task-visibility svg {
  display: block;
}

.tasks-card .kebab-wrap {
  flex-shrink: 0;
}

/* ---------- Projekt-Chat-Karte ---------- */
.chat-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.chat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 0.75rem;
}

.chat-card-header .card-title {
  margin-bottom: 0;
}

.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-muted);
}

.chat-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.chat-messages {
  max-height: 400px;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}

.chat-message {
  display: flex;
  max-width: 85%;
}

.chat-message--incoming {
  align-self: flex-start;
}

.chat-message--outgoing {
  align-self: flex-end;
}

.chat-bubble {
  padding: 0.65rem 1rem;
  border-radius: 14px;
  position: relative;
}

.chat-message--incoming .chat-bubble {
  background: #f1f5f9;
  color: var(--color-text);
  border-bottom-left-radius: 4px;
}

.chat-message--outgoing .chat-bubble {
  background: var(--color-primary);
  color: var(--color-white);
  border-bottom-right-radius: 4px;
}

.chat-bubble-text {
  margin: 0 0 0.25rem;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.chat-message--outgoing .chat-bubble-text {
  color: var(--color-white);
}

.chat-meta {
  font-size: 0.75rem;
  color: var(--color-muted);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem;
  line-height: 1.4;
}

.chat-message--outgoing .chat-meta {
  color: rgba(255, 255, 255, 0.85);
}

.chat-edit-btn.link-style,
.chat-delete-btn.link-style {
  background: none;
  border: none;
  padding: 0.2rem;
  font-size: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  margin-left: 0.35rem;
  opacity: 0.95;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  min-width: 22px;
  min-height: 22px;
}

.chat-message--outgoing .chat-edit-btn.link-style,
.chat-message--outgoing .chat-delete-btn.link-style {
  color: rgba(255, 255, 255, 0.95);
}

.chat-message--outgoing .chat-edit-btn.link-style:hover,
.chat-message--outgoing .chat-delete-btn.link-style:hover {
  color: #fff;
}

.chat-edit-btn.link-style:hover,
.chat-delete-btn.link-style:hover {
  opacity: 1;
}

.chat-action-icon-btn svg {
  display: block;
  flex-shrink: 0;
}

.chat-edit-textarea {
  width: 100%;
  min-height: 60px;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  font: inherit;
  font-size: 0.9375rem;
  resize: vertical;
  box-sizing: border-box;
}

.chat-message--outgoing .chat-bubble .chat-edit-textarea {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.1);
  color: var(--color-white);
}

.chat-edit-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chat-clear-history-btn {
  margin-left: auto;
}

.chat-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(3, 4, 94, 0.08);
  background: var(--color-white);
}

.chat-input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 1rem;
  font-size: 0.9375rem;
  border: 1px solid rgba(3, 4, 94, 0.12);
  border-radius: 20px;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  transition: border-color var(--transition-fast);
}

.chat-input::placeholder {
  color: var(--color-muted);
}

.chat-input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.chat-send-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.chat-send-btn:hover:not(:disabled) {
  background: var(--color-primary);
}

.chat-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.chat-send-btn svg {
  display: block;
}

.badge--kunde {
  background: rgba(234, 88, 12, 0.15);
  color: #c2410c;
}

.badge--kunde::before {
  background: #ea580c;
}

.badge--intern {
  background: var(--color-bg);
  color: var(--color-muted);
}

.badge--intern::before {
  background: #94a3b8;
}

.badge--general {
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
}

.badge--general::before {
  background: #94a3b8;
}

/* Trello-Klon: Aufgaben-Board */
.tasks-board {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  align-items: flex-start;
  height: calc(100vh - 150px);
  padding-bottom: 1rem;
}

.tasks-board-column {
  min-width: 320px;
  max-width: 320px;
  background: #f4f5f7;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  max-height: 100%;
  padding: 0.75rem;
  flex-shrink: 0;
}

.tasks-board-column--completed {
  background: #e8eaed;
}

.tasks-board-column-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.tasks-board-column-count {
  background: rgba(0, 0, 0, 0.12);
  color: var(--color-primary);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.tasks-dropzone {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  min-height: 50px;
  border-radius: 6px;
}

.tasks-dropzone .task-card {
  margin-bottom: 0.5rem;
}

.tasks-dropzone .task-card:last-child {
  margin-bottom: 0;
}

.task-card {
  cursor: grab;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.task-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.task-card:active {
  cursor: grabbing;
}

.task-card.sortable-ghost {
  opacity: 0.4;
  background: #e0e0e0;
}

.task-card--completed .task-card-title {
  text-decoration: line-through;
  opacity: 0.7;
}

.task-card--p1 {
  border-left: 3px solid #dc2626;
}

.task-card--p2 {
  border-left: 3px solid #ea580c;
}

.task-card--p3 {
  border-left: 3px solid #2563eb;
}

.task-card--fade-out {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.task-card-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.task-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

.task-card-checkbox {
  flex-shrink: 0;
  margin-top: 0.15rem;
  accent-color: var(--color-accent);
  cursor: pointer;
  pointer-events: auto;
}

.task-card-title {
  flex: 1;
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.task-card-extras {
  padding-left: 1.75rem;
  width: 100%;
  box-sizing: border-box;
}

.task-card-desc-preview {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.35;
  display: block;
  max-height: 4.5em;
  overflow: hidden;
}

.task-card-subtasks-meta {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.task-modal-title-textarea {
  width: 100%;
  min-height: 2.75rem;
  resize: vertical;
  font: inherit;
  line-height: 1.4;
}

.task-modal-subtasks-field .project-modal-label-row {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
}

.task-modal-subtasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.task-modal-subtask-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.task-modal-subtask-check-label {
  flex-shrink: 0;
  padding-top: 0.35rem;
}

.task-modal-subtask-title {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  resize: vertical;
}

.task-modal-subtask-remove {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
}

.task-modal-subtask-remove:hover {
  color: #64748b;
}

.tasks-list-title-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
}

.tasks-list-title-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.tasks-list-meta-line {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
}

.tasks-list-desc-preview {
  display: block;
  max-width: 100%;
  max-height: 3.6em;
  overflow: hidden;
}

.tasks-list-meta-sep {
  margin: 0 0.25rem;
  opacity: 0.7;
}

.task-card-row2 {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.task-card-prio-flag {
  flex-shrink: 0;
  color: #dc2626;
  line-height: 1;
}

.task-card-project-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  color: var(--color-muted);
  background: var(--color-bg);
  border-radius: var(--radius-pill);
}

.task-card-project-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-muted);
}

.task-card-row3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.task-card-header .task-card-kebab {
  flex-shrink: 0;
  margin-left: auto;
  margin-top: -0.25rem;
  margin-right: -0.25rem;
}

.task-card-meta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0;
}

.task-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.task-card-due-wrap,
.task-due-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.task-card-due-icon,
.task-due-icon {
  flex-shrink: 0;
  color: var(--color-muted);
}

.task-card-meta-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.task-card-due {
  font-size: 0.75rem;
  color: var(--color-muted);
  flex-shrink: 0;
}

.task-card-due.task-due--overdue,
.task-due.task-due--overdue {
  color: #dc2626;
}

.task-card-due-icon + .task-card-due.task-due--overdue,
.task-due-icon + .task-due.task-due--overdue {
  color: #dc2626;
}

.task-card-assignee {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--color-text);
}

.task-card-assignee--empty {
  color: var(--color-muted);
  font-style: italic;
}

.task-card-assignee-name {
  max-width: 6rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-card-assignee-avatar,
.task-item-assignee-avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  background: var(--color-bg-secondary, #e5e7eb);
  color: var(--color-text);
  flex-shrink: 0;
}

.task-card-assignee-avatar img,
.task-item-assignee-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.task-card-assignee .task-card-assignee-avatar {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  font-size: 0.6rem;
}

.task-item-assignee {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.task-card .kebab-wrap {
  flex-shrink: 0;
}

.task-card .kebab-dropdown {
  z-index: 100;
}

.task-card-recurrence,
.task-item-recurrence {
  font-size: 0.7rem;
  opacity: 0.9;
}

.tasks-quick-add {
  padding: 0.5rem 0;
  margin-top: 0.25rem;
}

.tasks-quick-add-btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* Aufgaben: Header – Segmented Controls (Pill) */
.tasks-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tasks-pill-segment {
  display: inline-flex;
  align-items: center;
  background: var(--color-bg);
  padding: 4px;
  border-radius: var(--radius-pill);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.tasks-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--color-muted);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.tasks-pill-btn:hover {
  color: var(--color-primary);
}

.tasks-pill-btn.active {
  background: var(--color-accent);
  color: var(--color-white);
}

.tasks-pill-icon {
  flex-shrink: 0;
}

.tasks-btn-new-pill {
  flex-shrink: 0;
}

.tasks-dropzone-empty {
  font-size: 0.8125rem;
  color: var(--color-muted);
  padding: 0.75rem 0.5rem;
  text-align: center;
}

/* Sichtbarkeit Board vs. Kalender je nach View */
#tasks-main.view-calendar .tasks-board {
  display: none !important;
}
#tasks-main.view-calendar .tasks-calendar-wrapper {
  display: block !important;
}
#tasks-main.view-board .tasks-calendar-wrapper,
#tasks-main.view-list .tasks-calendar-wrapper {
  display: none !important;
}

.tasks-calendar-wrapper {
  display: none;
  height: calc(100vh - 150px);
  min-height: 480px;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.tasks-calendar-inner {
  height: 100%;
  min-height: 0;
}

.tasks-calendar-inner .fc {
  height: 100% !important;
  --fc-border-color: var(--color-border);
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: var(--color-bg);
  --fc-today-bg-color: rgba(0, 119, 182, 0.08);
  --fc-list-event-hover-bg-color: var(--color-bg);
}

/* Moderne Toolbar */
.tasks-calendar-inner .fc-toolbar {
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.tasks-calendar-inner .fc-toolbar-title {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-text);
}

.tasks-calendar-inner .fc-button {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text);
  text-transform: none;
}

.tasks-calendar-inner .fc-button:hover {
  background: var(--color-bg);
  border-color: var(--color-border);
}

.tasks-calendar-inner .fc-button-primary:not(:disabled).fc-button-active,
.tasks-calendar-inner .fc-today-button:hover,
.tasks-calendar-inner .fc-today-button:focus {
  background: var(--color-primary, #0077B6) !important;
  border-color: var(--color-primary, #0077B6) !important;
  color: #fff !important;
}

.tasks-calendar-inner .fc-button:focus {
  box-shadow: 0 0 0 2px rgba(0, 119, 182, 0.25);
}

/* Monats-Grid: Kopfzeile Wochentage */
.tasks-calendar-inner .fc-col-header-cell {
  padding: 0.5rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.tasks-calendar-inner .fc-scrollgrid {
  border-radius: 8px;
  overflow: hidden;
}

.tasks-calendar-inner .fc-daygrid-day {
  cursor: default;
}

.tasks-calendar-inner .fc-daygrid-day-number {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  border-radius: 50%;
  margin: 0.25rem;
}

.tasks-calendar-inner .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
  background: var(--color-primary, #0077B6);
  color: #fff;
}

.tasks-calendar-inner .fc-daygrid-day:hover .fc-daygrid-day-number {
  background: var(--color-bg);
}

.tasks-calendar-inner .fc-daygrid-day.fc-day-today:hover .fc-daygrid-day-number {
  background: var(--color-primary, #0077B6);
  color: #fff;
}

.tasks-calendar-inner .fc-daygrid-day-frame {
  min-height: 6rem;
}

.tasks-calendar-inner .fc-daygrid-day-events {
  margin: 0.25rem 0.25rem 0 0;
  min-height: 0;
}

.tasks-calendar-inner .fc-daygrid-event-harness {
  margin-bottom: 0.25rem;
}

/* FullCalendar Events – Karten-Design */
.tasks-calendar-wrapper .fc-event {
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 6px 8px;
  background: var(--color-white) !important;
  color: var(--color-text);
}

.tasks-calendar-wrapper .fc-event:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.tasks-calendar-wrapper .fc-event .fc-event-main-frame {
  flex-direction: column;
  align-items: stretch;
}

.tasks-calendar-wrapper .fc-event .task-cal-event-title {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--color-text);
}

.tasks-calendar-wrapper .fc-event .task-cal-event-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: var(--color-muted);
  margin-top: 2px;
}

.tasks-calendar-wrapper .fc-event .task-cal-event-row3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.7rem;
  color: var(--color-muted);
}

.tasks-calendar-wrapper .fc-event .task-cal-event-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-bg);
  flex-shrink: 0;
}

.tasks-calendar-wrapper .fc-event .task-cal-event-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* CRM – Navigation & Layout */
.crm-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.crm-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--color-bg);
  padding: 4px;
  border-radius: var(--radius-pill);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.crm-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.crm-tab:hover {
  color: var(--color-primary);
}

.crm-tab.active {
  background: var(--color-accent);
  color: var(--color-white);
}

.crm-view {
  margin-top: 1rem;
}

.crm-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 1rem;
}

@media (max-width: 960px) {
  .crm-dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.crm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .crm-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.crm-kpi-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow-card);
}

.crm-kpi-label {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.crm-kpi-value {
  margin-top: 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
}

.crm-pipeline-bar {
  display: flex;
  border-radius: var(--radius-pill);
  overflow: hidden;
  height: 0.75rem;
  background: var(--color-bg);
  margin-top: 0.75rem;
}

.crm-pipeline-bar-segment {
  height: 100%;
}

.crm-upcoming-list {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.crm-upcoming-item {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.crm-upcoming-title {
  font-weight: 500;
}

.crm-upcoming-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.crm-toolbar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  align-items: center;
  position: relative;
  z-index: 60;
}

/* CRM-Toolbar: Suche = gleiche Komponente wie im Hub (.topbar-search) */
.crm-toolbar .topbar-search {
  flex: 1 1 220px;
  max-width: min(320px, 100%);
  min-width: 0;
}

.crm-toolbar .topbar-search-input {
  width: 100%;
  min-width: 0;
}

.crm-toolbar select {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid rgba(3, 4, 94, 0.12);
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  min-width: 140px;
  transition: border-color var(--transition-fast);
}

.crm-toolbar select:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* CRM Kontakte – SaaS Page Layout */
.crm-contacts-page {
  max-width: 1440px;
  margin: 0 auto;
}

.crm-contacts-hero {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(3, 4, 94, 0.06);
  margin-bottom: 1rem;
  overflow: hidden;
  position: relative;
}

.crm-contacts-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 50%, #60a5fa 100%);
}

.crm-contacts-hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.35rem 1.5rem 1.5rem;
}

.crm-contacts-hero-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.crm-contacts-hero-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.crm-contacts-hero-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-primary);
}

.crm-contacts-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  background: linear-gradient(135deg, rgba(0, 119, 182, 0.12) 0%, rgba(3, 4, 94, 0.08) 100%);
  border: 1px solid rgba(3, 4, 94, 0.1);
  border-radius: var(--radius-pill);
}

.crm-contacts-hero-desc {
  margin: 0.5rem 0 0;
  max-width: 42rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #64748b;
}

.crm-contacts-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.crm-btn-plus {
  margin-right: 0.15rem;
  font-weight: 700;
  opacity: 0.9;
}

.crm-contacts-toolbar-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(3, 4, 94, 0.06);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.crm-contacts-toolbar-card .crm-toolbar-contacts {
  margin-bottom: 0;
}

.crm-contacts-search-wrap {
  flex: 1 1 260px;
  max-width: min(400px, 100%);
}

.crm-toolbar-contacts--search-only {
  justify-content: stretch;
}

.crm-toolbar-contacts--search-only .crm-contacts-search-wrap {
  flex: 1 1 100%;
  max-width: 100%;
}

.crm-toolbar-companies-hub {
  align-items: center;
}

.crm-toolbar-companies-hub .crm-contacts-search-wrap {
  flex: 1 1 200px;
  min-width: 0;
}

.crm-companies-stage-filter-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.crm-companies-stage-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.crm-companies-stage-select {
  min-width: 11rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fafbfc;
  font: inherit;
  color: #0f172a;
}

.crm-companies-stage-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.12);
}

.crm-toolbar-contacts {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.crm-toolbar-contacts .crm-toolbar-right {
  display: flex;
  gap: 0.65rem;
  align-items: flex-end;
}

.crm-contacts-toolbar-card .topbar-search-input {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fafbfc;
  padding: 0.55rem 0.75rem 0.55rem 2.25rem;
}

.crm-contacts-toolbar-card .topbar-search-input:focus {
  background: var(--color-white);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.12);
}

.crm-contacts-table-shell {
  background: linear-gradient(165deg, #eef2f7 0%, #f4f6fb 40%, #f8fafc 100%);
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 40px -12px rgba(3, 4, 94, 0.1);
  border: 1px solid rgba(3, 4, 94, 0.07);
  overflow: hidden;
}

.crm-contacts-table-shell .crm-contacts-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.crm-contacts-table {
  width: 100%;
}

.crm-contacts-table-inner {
  padding: 0.65rem 0.65rem 0.85rem;
  min-width: min(1200px, 100%);
}

.crm-contacts-table-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.crm-contacts-header-row,
.crm-contacts-row {
  display: grid;
  grid-template-columns:
    minmax(0, 2fr)
    minmax(0, 1.35fr)
    minmax(6.25rem, 1.2fr)
    minmax(0, 1.45fr)
    minmax(0, 1.55fr)
    minmax(0, 1.15fr)
    minmax(0, 1fr)
    minmax(0, 1.05fr)
    minmax(0, 76px)
    minmax(0, 52px);
  gap: 0.55rem 0.5rem;
  align-items: center;
  padding: 0.55rem 1rem;
  min-width: min(1180px, 100%);
}

.crm-contacts-header-row {
  position: sticky;
  top: 0;
  z-index: 3;
  margin-bottom: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.crm-contacts-table-header {
  cursor: default;
}

.crm-contacts-table-header .crm-list-sort {
  cursor: pointer;
}

.crm-list-sort {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
  padding: 0.2rem 0;
  text-align: left;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.crm-list-sort-text {
  border-bottom: 1px dashed transparent;
}

.crm-list-sort:hover {
  color: var(--color-primary);
  background: rgba(3, 4, 94, 0.04);
}

.crm-list-sort:hover .crm-list-sort-text {
  border-bottom-color: rgba(3, 4, 94, 0.2);
}

.crm-list-sort--active {
  color: var(--color-accent);
}

.crm-list-sort--active .crm-list-sort-text {
  border-bottom-color: rgba(0, 119, 182, 0.4);
}

.crm-sort-caret {
  display: inline-flex;
  font-size: 0.85em;
  font-weight: 800;
  opacity: 0.85;
  color: var(--color-accent);
}

.crm-contacts-col-head-muted {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.crm-contacts-col-actions-head {
  /* Platzhalter für Kebab-Spalte */
  min-height: 1rem;
}

.crm-deals-actions {
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
}

.crm-deals-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}

.crm-deals-action-btn:hover {
  background: #f9fafb;
}

.crm-contacts-row {
  background: var(--color-white);
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
  border-bottom: 1px solid #f1f5f9;
  transition: background var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.crm-contacts-row.crm-contacts-table-header {
  cursor: default;
  border-bottom: none;
}

.crm-contacts-table .crm-contacts-row:last-child {
  border-bottom: none;
}

.crm-contacts-row:hover:not(.crm-contacts-table-header):not(.crm-contacts-row--card) {
  background: linear-gradient(90deg, rgba(0, 119, 182, 0.04) 0%, rgba(3, 4, 94, 0.02) 100%);
}

/* Kontaktliste: Zeilen als moderne Cards */
.crm-contacts-row--card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.65rem 1rem;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.crm-contacts-row--card:hover {
  border-color: rgba(0, 119, 182, 0.45);
  box-shadow:
    0 4px 20px rgba(3, 4, 94, 0.08),
    0 0 0 1px rgba(0, 119, 182, 0.12);
  transform: translateY(-2px);
  background: #fff;
}

.crm-contacts-col-name {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.crm-contacts-name-text {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-contacts-col-name .crm-avatar-circle {
  flex-shrink: 0;
}

.crm-avatar-circle--lg {
  width: 36px;
  height: 36px;
  font-size: 0.85rem;
  margin-right: 0;
  background: linear-gradient(145deg, rgba(3, 4, 94, 0.1) 0%, rgba(0, 119, 182, 0.2) 100%);
  color: var(--color-primary);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(3, 4, 94, 0.12);
}

.crm-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.7rem 0.3rem 0.45rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 9999px;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  vertical-align: middle;
}

.crm-type-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
}

.crm-type-pill-label {
  line-height: 1.15;
}

.crm-type-pill--lead {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e3a8a;
  border-color: rgba(59, 130, 246, 0.35);
}

.crm-type-pill--lead .crm-type-pill-dot {
  background: linear-gradient(145deg, #60a5fa, #2563eb);
}

/* Kontakt „Typ“ gemappt auf Pipeline-Stage Qualifiziert (DB: prospect) */
.crm-type-pill--qualified {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.4);
}

.crm-type-pill--qualified .crm-type-pill-dot {
  background: linear-gradient(145deg, #fbbf24, #d97706);
}

/* Kontakt „Typ“ gemappt auf Pipeline-Stage Gewonnen (DB: customer) */
.crm-type-pill--won {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.35);
}

.crm-type-pill--won .crm-type-pill-dot {
  background: linear-gradient(145deg, #34d399, #059669);
}

.crm-type-pill--prospect {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.4);
}

.crm-type-pill--prospect .crm-type-pill-dot {
  background: linear-gradient(145deg, #fbbf24, #d97706);
}

.crm-type-pill--customer {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.35);
}

.crm-type-pill--customer .crm-type-pill-dot {
  background: linear-gradient(145deg, #34d399, #059669);
}

.crm-type-pill--partner {
  background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%);
  color: #6b21a8;
  border-color: rgba(168, 85, 247, 0.35);
}

.crm-type-pill--partner .crm-type-pill-dot {
  background: linear-gradient(145deg, #c084fc, #9333ea);
}

/* Pipeline-Stage: Verloren (Kontakttyp lost) */
.crm-type-pill--lost {
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.35);
}

.crm-type-pill--lost .crm-type-pill-dot {
  background: linear-gradient(145deg, #f87171, #dc2626);
}

.crm-contacts-col-type {
  min-width: 0;
}

.crm-contacts-col-type .crm-type-pill {
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
  hyphens: auto;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.65rem;
  padding: 0.28rem 0.55rem 0.28rem 0.42rem;
}

.crm-type-pill--intern {
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #334155;
  border-color: rgba(71, 85, 105, 0.35);
}

.crm-type-pill--intern .crm-type-pill-dot {
  background: linear-gradient(145deg, #64748b, #475569);
}

.crm-contacts-col-company {
  color: #475569;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.crm-contacts-link-subtle {
  color: #0369a1;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.crm-contacts-link-subtle:hover {
  color: var(--color-primary);
  border-bottom-color: rgba(3, 4, 94, 0.35);
}

.crm-contacts-dash {
  color: #cbd5e1;
  font-size: 0.9rem;
}

.crm-contacts-mono {
  font-size: 0.8125rem;
  color: #475569;
  font-variant-numeric: tabular-nums;
}

.crm-contacts-source-tag {
  display: inline-block;
  max-width: 100%;
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
  background: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-contacts-date {
  font-size: 0.8125rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.crm-contacts-video-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.38rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: linear-gradient(135deg, rgba(0, 119, 182, 0.12) 0%, rgba(3, 4, 94, 0.06) 100%);
  border: 1px solid rgba(0, 119, 182, 0.28);
  border-radius: 9999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.crm-contacts-video-pill:hover {
  background: linear-gradient(135deg, rgba(0, 119, 182, 0.2) 0%, rgba(3, 4, 94, 0.1) 100%);
  border-color: rgba(0, 119, 182, 0.45);
  transform: scale(1.02);
}

.crm-contacts-video-pill-icon {
  display: flex;
  opacity: 0.9;
  color: var(--color-accent);
}

.crm-contacts-col-email a:not(.crm-contacts-link-subtle) {
  color: var(--color-accent);
  text-decoration: none;
}

.crm-contacts-col-email a:not(.crm-contacts-link-subtle):hover {
  text-decoration: underline;
}

.crm-contacts-empty-state {
  padding: 3rem 1.5rem 3.25rem;
  text-align: center;
  min-width: 100%;
  margin-top: 0.15rem;
  border-radius: 14px;
  border: 1px dashed #cbd5e1;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(6px);
}

.crm-contacts-empty-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--color-accent);
  opacity: 0.85;
}

.crm-contacts-empty-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
}

.crm-contacts-empty-hint {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: #64748b;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

/* Deal-Listen & Aufgaben-Liste: 7 bzw. 6 Spalten (nicht das 10er-Kontakt-Grid) */
.crm-deals-table-inner .crm-deals-list-grid {
  grid-template-columns:
    minmax(0, 2fr)
    minmax(0, 1.35fr)
    minmax(6.5rem, 1fr)
    minmax(0, 1.05fr)
    minmax(0, 1.1fr)
    minmax(0, 1.15fr)
    minmax(0, 52px);
  min-width: min(960px, 100%);
}

.tasks-hub-list .tasks-hub-list-grid {
  grid-template-columns:
    minmax(0, 2fr)
    minmax(0, 1.35fr)
    minmax(6.5rem, 0.95fr)
    minmax(0, 1.1fr)
    minmax(0, 1.2fr)
    minmax(0, 52px);
  min-width: min(960px, 100%);
}

.tasks-list-col-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.tasks-list-col-title .task-list-checkbox {
  flex-shrink: 0;
}

.tasks-hub-list .crm-contacts-date.task-due--overdue {
  color: #dc2626;
  font-weight: 600;
}

.crm-type-pill--proposal {
  background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%);
  color: #6b21a8;
  border: 1px solid rgba(107, 33, 168, 0.2);
}

.crm-type-pill--proposal .crm-type-pill-dot {
  background: #7c3aed;
}

.crm-type-pill--negotiation {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  color: #047857;
  border: 1px solid rgba(4, 120, 87, 0.22);
}

.crm-type-pill--negotiation .crm-type-pill-dot {
  background: #059669;
}

/* Deal-Listenansicht & Forecast nutzen dieselbe Tabellenkopf-Klasse – kein Sticky dort */
.crm-deals-list-header.crm-contacts-header-row,
#crm-forecast .crm-contacts-header-row {
  position: relative;
  top: auto;
  z-index: 1;
  background: #f8fafc;
  box-shadow: none;
}

@media (max-width: 900px) {
  .crm-contacts-hero-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-contacts-hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .crm-contacts-hero-actions .btn-crm-outline,
  .crm-contacts-hero-actions .btn-crm-primary {
    width: 100%;
    justify-content: center;
  }
}

.crm-contacts-col-video-head {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  text-align: center;
}

.crm-contacts-col-video {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.crm-contacts-video-link {
  white-space: nowrap;
}

.crm-contacts-video-placeholder {
  color: #d1d5db;
  font-size: 0.85rem;
}

.crm-contacts-col-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  min-width: 0;
}

.crm-contacts-labels-empty {
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 500;
}

.crm-label-chip-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  padding: 0.24rem 0.6rem 0.24rem 0.42rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  border-radius: 9999px;
  border: 1px solid color-mix(in srgb, var(--crm-label-bg, #03045e) 32%, #e2e8f0);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--crm-label-bg, #03045e) 11%, #fff) 0%,
    color-mix(in srgb, var(--crm-label-bg, #03045e) 5%, #f8fafc) 100%
  );
  color: color-mix(in srgb, var(--crm-label-bg, #03045e) 75%, #0f172a);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  vertical-align: middle;
}

.crm-label-chip-modern-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--crm-label-bg, #03045e);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.92),
    0 1px 3px rgba(15, 23, 42, 0.15);
}

.crm-label-chip-modern-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 11rem;
}

.crm-label-chip {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: color-mix(in srgb, var(--crm-label-bg, #03045e) 18%, #fff);
  color: var(--crm-label-bg, #03045e);
  border: 1px solid color-mix(in srgb, var(--crm-label-bg, #03045e) 35%, transparent);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-contact-labels {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.project-modal-field--labels label {
  display: block;
  margin-bottom: 0.35rem;
}

.crm-contact-label-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.crm-contact-label-option input {
  flex-shrink: 0;
}

.project-modal--wide {
  max-width: 520px;
}

.project-modal.crm-labels-modal {
  max-width: min(600px, 100%);
}

.crm-labels-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.crm-labels-admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding: 2px;
  margin: 0;
}

.crm-labels-empty {
  text-align: center;
  padding: 1.75rem 1rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #64748b;
}

.crm-labels-empty-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
}

.crm-labels-empty-hint {
  margin: 0;
  font-size: 0.85rem;
}

.crm-labels-admin-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.crm-labels-admin-card:hover {
  border-color: #e2e8f0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.crm-labels-admin-card-fields {
  display: grid;
  grid-template-columns: 1fr auto 5.5rem;
  gap: 0.85rem 1rem;
  align-items: end;
}

@media (max-width: 520px) {
  .crm-labels-admin-card-fields {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

.crm-labels-admin-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.crm-labels-admin-field--color {
  width: auto;
}

.crm-labels-admin-field--sort .crm-labels-input {
  text-align: center;
}

.crm-labels-field-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.crm-labels-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  font: inherit;
  font-size: 0.9rem;
  color: var(--color-text, #111827);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.crm-labels-input:hover {
  border-color: #cbd5e1;
}

.crm-labels-input:focus {
  outline: none;
  border-color: var(--color-accent, #0077b6);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.18);
}

.crm-labels-color-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.crm-labels-color-wrap:hover {
  border-color: #cbd5e1;
}

.crm-labels-color-wrap:focus-within {
  border-color: var(--color-accent, #0077b6);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.18);
}

.crm-labels-color-wrap input[type="color"] {
  display: block;
  width: 120%;
  height: 120%;
  margin: -10%;
  padding: 0;
  border: none;
  cursor: pointer;
}

.crm-labels-admin-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  padding-top: 0.25rem;
  border-top: 1px solid #f1f5f9;
}

.crm-labels-add-section {
  padding-top: 1rem;
  border-top: 1px solid rgba(3, 4, 94, 0.08);
}

.crm-labels-section-title {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary, #03045e);
}

.crm-labels-new-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem 1rem;
}

.crm-labels-new-field {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.crm-labels-new-field label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.crm-labels-new-field--color {
  flex: 0 0 auto;
  min-width: auto;
}

.crm-labels-add-btn-main {
  flex-shrink: 0;
  align-self: flex-end;
  min-height: 42px;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}

@media (max-width: 480px) {
  .crm-labels-add-btn-main {
    width: 100%;
  }
}

.crm-csv-import-hint {
  font-size: 0.9rem;
  color: var(--color-muted, #6b7280);
  margin: 0 0 0.75rem;
  line-height: 1.45;
}

.crm-csv-import-modal-body {
  gap: 0.75rem;
}

.crm-csv-import-result {
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
  padding: 0.5rem 0.65rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #111827;
}

.crm-contacts-kebab-wrap {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}

.crm-contacts-kebab-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.crm-contacts-kebab-btn:hover {
  background: #fff;
  border-color: rgba(0, 119, 182, 0.35);
  color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(3, 4, 94, 0.08);
}

.crm-contacts-row--card .crm-contacts-kebab-btn {
  background: rgba(248, 250, 252, 0.9);
}

.crm-contacts-kebab-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  min-width: 168px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
  z-index: 120;
  padding: 6px;
  display: none;
}

.crm-contacts-kebab-menu.show {
  display: block;
}

.crm-contacts-kebab-item {
  display: block;
  width: 100%;
  padding: 0.45rem 0.65rem;
  border: none;
  border-radius: 6px;
  background: none;
  font-size: 0.8125rem;
  text-align: left;
  cursor: pointer;
  color: #334155;
}

.crm-contacts-kebab-item:hover {
  background: #f1f5f9;
}

.crm-contacts-kebab-item--danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

.crm-contacts-cell {
  font-size: 0.85rem;
}

.crm-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 0.4rem;
}

.badge--crm-type {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
}

.badge--lead { background: #BBDEFB; color: #1565C0; }
.badge--prospect { background: #FFE0B2; color: #E65100; }
.badge--customer { background: #C8E6C9; color: #2E7D32; }
.badge--qualified { background: #FFE0B2; color: #E65100; }
.badge--won { background: #C8E6C9; color: #2E7D32; }
.badge--lost { background: #fecaca; color: #991b1b; }
.badge--partner { background: #E1BEE7; color: #6A1B9A; }

.crm-field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}

.crm-empty {
  font-size: 0.85rem;
  color: var(--color-muted);
  padding: 0.75rem;
}

/* CRM – Hauptbereich Hintergrund (Light-Mode Pipeline) */
/* CRM: volle verfügbare Breite für Kontakte und Übersicht */
#crm-main.main-content {
  max-width: none;
  width: 100%;
}

#crm-main.crm-main-pipeline {
  background: #f8f9fc;
}

#crm-main.crm-main-contacts {
  background: linear-gradient(180deg, #eef2f7 0%, #f4f6fb 35%, #f8f9fc 100%);
  padding-bottom: 2rem;
}

#crm-main.crm-main-companies {
  background: linear-gradient(180deg, #eef2f7 0%, #f4f6fb 35%, #f8f9fc 100%);
  padding-bottom: 2rem;
}

/* Hub: Unternehmen & Benutzer (gleiche Listen-Optik wie CRM-Kontakte) */
.main-content.hub-list-main {
  max-width: none;
  width: 100%;
  background: linear-gradient(180deg, #eef2f7 0%, #f4f6fb 35%, #f8f9fc 100%);
  padding-bottom: 2rem;
}

.hub-list-toolbar-card .hub-list-toolbar {
  margin-bottom: 0;
}

.hub-list-toolbar.crm-toolbar-contacts {
  justify-content: space-between;
}

.hub-list-toolbar .crm-contacts-search-wrap {
  flex: 1 1 260px;
  max-width: min(400px, 100%);
}

.hub-list-toolbar-right {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .hub-list-toolbar .crm-toolbar-right.hub-list-toolbar-right {
    width: 100%;
  }
}

.hub-list-grid--companies.crm-contacts-header-row,
.hub-list-grid--companies.crm-contacts-row {
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 52px);
  min-width: min(520px, 100%);
}

.hub-list-grid--crm-companies.crm-contacts-header-row,
.hub-list-grid--crm-companies.crm-contacts-row {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr) minmax(0, 1.35fr) minmax(0, 2fr) minmax(0, 52px);
  min-width: min(780px, 100%);
  align-items: start;
}

.crm-companies-hub-table .crm-contacts-table-inner.hub-list-table-inner {
  min-width: min(720px, 100%);
}

.crm-company-kontakte-cell {
  min-width: 0;
}

.crm-company-kontakte-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.crm-company-kontakte-panel--scroll {
  max-height: 220px;
  overflow-y: auto;
}

.crm-company-kontakte-details {
  width: 100%;
  border-radius: 8px;
}

.crm-company-kontakte-summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: #03045e;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: #eff0f5;
}

.crm-company-kontakte-summary::-webkit-details-marker {
  display: none;
}

.crm-company-kontakte-summary::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.35rem;
  vertical-align: middle;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #03045e;
  transition: transform 0.15s ease;
}

.crm-company-kontakte-details[open] .crm-company-kontakte-summary::after {
  transform: rotate(180deg);
}

.crm-company-kontakte-panel {
  margin-top: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.crm-company-kontakte-empty {
  margin: 0;
  font-size: 0.8125rem;
  color: #6b7280;
}

.crm-company-col-name {
  align-items: flex-start;
}

.crm-company-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.crm-company-primary-line {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.35;
  white-space: normal;
}

.crm-contact-slideover-role {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.crm-company-contact-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr) minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 0.5rem;
  align-items: center;
  padding: 0.35rem 0.25rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8125rem;
}

.crm-company-contact-row:hover {
  background: #f3f4f6;
}

.crm-company-contact-name {
  font-weight: 600;
  color: #111827;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-company-contact-meta {
  font-size: 0.75rem;
  color: #64748b;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-company-contact-email {
  color: #0077b6;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
}

.crm-company-contact-phone {
  font-size: 0.75rem;
  color: #374151;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-company-add-contact-btn {
  align-self: flex-start;
  margin-top: 0.25rem;
}

.hub-list-grid--users.crm-contacts-header-row,
.hub-list-grid--users.crm-contacts-row {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.5fr) minmax(0, 0.85fr) minmax(0, 0.75fr) minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 52px);
  min-width: min(1050px, 100%);
}

.companies-hub-list .crm-contacts-table-inner.hub-list-table-inner {
  min-width: min(520px, 100%);
}

.users-hub-list .crm-contacts-table-inner.hub-list-table-inner {
  min-width: min(1050px, 100%);
}

.hub-list-avatar {
  overflow: hidden;
}

.hub-list-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hub-list-col-users,
.hub-list-col-company,
.hub-list-col-function {
  min-width: 0;
}

.hub-list-col-projects {
  min-width: 0;
}

.hub-list-projects-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.companies-hub-list .crm-contacts-row--card,
.users-hub-list .crm-contacts-row--card {
  cursor: default;
}

/* CRM Pipeline Board – SaaS-Kanban */
.crm-pipeline {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 1rem 0;
  height: calc(100vh - 120px);
  min-height: 420px;
  align-items: flex-start;
}

/* View-Toggle: `hidden` soll gegen bestehende `display`-Styles gewinnen. */
#crm-pipeline[hidden] {
  display: none !important;
}

#crm-deals-list[hidden] {
  display: none !important;
}

#crm-forecast[hidden] {
  display: none !important;
}

.crm-pipeline-column {
  flex: 0 0 280px;
  max-width: 280px;
  margin-right: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #F8FAFC;
  border-radius: 10px;
  border: 1px solid #E5E7EB;
  overflow: hidden;
}

.crm-pipeline-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 10px 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  background: #ffffff;
  border: none;
  border-bottom: 1px solid #E5E7EB;
  position: relative;
  border-left: 3px solid transparent;
}

.crm-pipeline-column-header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.crm-stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.crm-pipeline-column-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.crm-pipeline-column-count {
  font-size: 12px;
  background: #f3f4f6;
  color: #6b7280;
  padding: 1px 7px;
  border-radius: 9999px;
  margin-left: 6px;
}

.crm-pipeline-column-value {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}

.crm-stage-menu {
  opacity: 0;
  padding: 4px 6px;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  border-radius: 4px;
  transition: opacity 0.15s ease;
}

.crm-pipeline-column-header:hover .crm-stage-menu {
  opacity: 1;
}

.crm-stage-menu:hover {
  background: #f3f4f6;
  color: #374151;
}

.crm-pipeline-dropzone {
  background: transparent;
  border-radius: 0 0 10px 10px;
  padding: 12px 8px;
  min-height: 120px;
  flex: 1;
  overflow-y: auto;
  border: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.crm-pipeline-dropzone--highlight {
  border: 2px dashed #6366f1;
  background: #eef2ff;
}

.crm-pipeline-empty {
  border: 1.5px dashed #CBD5E1;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 8px;
  background: #F8FAFC;
}

.crm-pipeline-empty-inner {
  font-size: 13px;
  color: #9CA3AF;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.crm-pipeline-empty .crm-pipeline-add-deal::first-letter {
  font-size: 22px;
  color: #CBD5E1;
  font-weight: 700;
  line-height: 1;
}

.crm-pipeline-empty .crm-pipeline-add-deal {
  opacity: 1;
}

.crm-pipeline-add-deal {
  display: block;
  width: 100%;
  padding: 8px 12px;
  margin-top: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--color-accent);
  background: transparent;
  border: 1px dashed var(--color-accent);
  border-radius: var(--radius-md);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.crm-pipeline-column:hover .crm-pipeline-add-deal,
.crm-pipeline-dropzone:hover .crm-pipeline-add-deal {
  opacity: 1;
}

.crm-pipeline-add-deal:hover {
  background: rgba(0, 119, 182, 0.08);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Stage-Farben (Spalten-Header, Dot, Deal-Akzent) */
.stage-lead { background: transparent; }
.stage-qualified { background: transparent; }
.stage-proposal { background: transparent; }
.stage-negotiation { background: transparent; }
.stage-won { background: transparent; }
.stage-partner { background: transparent; }
.stage-lost { background: transparent; }

.stage-color-lead { background-color: #60A5FA; color: #60A5FA; }
.stage-color-qualified { background-color: #FBBF24; color: #FBBF24; }
.stage-color-partner { background-color: #14b8a6; color: #14b8a6; }
.stage-color-proposal { background-color: #A78BFA; color: #A78BFA; }
.stage-color-negotiation { background-color: #34D399; color: #34D399; }
.stage-color-won { background-color: #22c55e; color: #22c55e; }
.stage-color-lost { background-color: #ef4444; color: #ef4444; }

.crm-pipeline-column-header.stage-lead { border-left-color: #60A5FA; }
.crm-pipeline-column-header.stage-qualified { border-left-color: #FBBF24; }
.crm-pipeline-column-header.stage-partner { border-left-color: #14b8a6; }
.crm-pipeline-column-header.stage-proposal { border-left-color: #A78BFA; }
.crm-pipeline-column-header.stage-negotiation { border-left-color: #34D399; }
.crm-pipeline-column-header.stage-won { border-left-color: #10B981; }
.crm-pipeline-column-header.stage-lost { border-left-color: #EF4444; }

/* Stage-Labels dürfen den Header nicht "aus Transparenz" auf Pastell/Container drücken */
.crm-pipeline-column-header.stage-won,
.crm-pipeline-column-header.stage-lost {
  background: #ffffff;
}

/* Deal-Card – SaaS-Style */
.deal-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  margin-bottom: 8px;
  cursor: grab;
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.crm-company-kanban-card {
  cursor: grab;
}

.deal-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.deal-card-accent {
  height: 3px;
  border-radius: 10px 10px 0 0;
}

.deal-card-body {
  padding: 12px;
  position: relative;
}

.deal-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #111827;
  margin-bottom: 6px;
}

.deal-card-title--clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deal-card-deal-company-line {
  font-size: 0.75rem;
  color: #6b7280;
  margin: -2px 0 8px;
  line-height: 1.35;
}

.deal-card-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.deal-card-head-row .deal-card-title {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.deal-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.deal-card-contact {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.deal-card-contact-svg {
  flex-shrink: 0;
  color: #9ca3af;
}

.deal-card-kontakte-block {
  margin-bottom: 8px;
}

.deal-card-kontakte-heading {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 6px;
}

.deal-card-kontakte-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 160px;
  overflow-y: auto;
}

.deal-card-kontakte-item {
  padding: 5px 0;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  border-radius: 4px;
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
}

.deal-card-kontakte-item:last-child {
  border-bottom: none;
}

.deal-card-kontakte-item:hover {
  background: #f9fafb;
}

.deal-card-kontakte-name {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: #111827;
  line-height: 1.25;
}

.deal-card-kontakte-role {
  display: block;
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 1px;
  line-height: 1.2;
}

.deal-card-kontakte-empty {
  font-size: 0.78rem;
  color: #9ca3af;
}

.deal-card-video {
  margin: -2px 0 8px 0;
}

.deal-card-video-link {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0077b6;
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #bae6fd;
  background: #f0f9ff;
}

.deal-card-video-link:hover {
  text-decoration: underline;
}

.deal-prob-text {
  font-size: 0.8rem;
  color: #6b7280;
}

.deal-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.deal-badge--danger {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.deal-badge--warning {
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
}

.deal-activity {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #6b7280;
  display: flex;
  gap: 8px;
  align-items: center;
}

.deal-activity-type {
  font-weight: 500;
  color: #4b5563;
}

.deal-activity-time {
  margin-left: auto;
  color: #9ca3af;
}

.deal-qa-btn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
}

.deal-qa-btn:hover {
  background: #f9fafb;
  border-color: #cbd5e1;
  color: var(--color-primary, #03045e);
}

.deal-qa-btn--danger {
  color: #9ca3af;
}

.deal-qa-btn--danger:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.deal-qa-icon {
  display: block;
  pointer-events: none;
}

.deal-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 0.8rem;
}

.deal-card-meta {
  color: #6b7280;
}

.deal-value {
  font-weight: 700;
  color: #6366f1;
}

.deal-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
}

.deal-card-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #6b7280;
}

.deal-prog-track {
  height: 4px;
  background: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
  flex: 1;
  min-width: 40px;
  max-width: 80px;
}

.deal-prog-fill {
  height: 100%;
  border-radius: 9999px;
  background: #6366f1;
  transition: width 0.15s ease;
}

.deal-prog-fill--green {
  background: linear-gradient(90deg, #22c55e, #10b981);
}

.deal-card-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: #374151;
  flex-shrink: 0;
}

/* CRM Toolbar – Stage-Pills & Suche */
.crm-toolbar-pills {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.crm-toolbar-pill {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.crm-toolbar-pill:hover {
  background: #f9fafb;
  color: #374151;
}

.crm-toolbar-pill.active {
  background: #6366f1;
  color: #fff;
  border-color: #6366f1;
}

.crm-pipeline-summary-text {
  font-size: 0.85rem;
  color: #6b7280;
  margin-left: auto;
}

.crm-toolbar-filter-btn {
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
}

.crm-toolbar-filter-btn:hover {
  background: #f9fafb;
  color: #374151;
}

/* CRM Pipeline – View Toggle & Summary Bar */
.crm-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  position: relative;
  z-index: 61;
}

.crm-view-toggle-btn {
  padding: 6px 2px;
  border: none;
  background: transparent;
  color: #6B7280;
  border-radius: 0;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 400;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.crm-view-toggle-btn:hover {
  color: #111827;
}

.crm-view-toggle-btn.active {
  background: transparent;
  color: #4F46E5;
  font-weight: 600;
  border-bottom-color: #4f46e5;
}

.crm-deals-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1rem;
}

.crm-deals-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.crm-filter-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.crm-filter-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4f46e5;
  display: none;
}

.crm-filter-wrap.has-active-filter .crm-filter-dot {
  display: block;
}

.crm-filter-panel {
  position: absolute;
  top: 44px;
  right: 0;
  width: 280px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
  padding: 12px;
  z-index: 50;
}

.crm-filter-panel-title {
  font-weight: 700;
  color: #111827;
  margin-bottom: 10px;
}

.crm-filter-panel-body {
  display: grid;
  gap: 10px;
}

.crm-filter-row label {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 4px;
}

.crm-filter-row input,
.crm-filter-row select {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  outline: none;
}

.crm-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.crm-filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 0;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.crm-filter-option:hover {
  background: #f9fafb;
}

.crm-filter-option.active {
  border-color: #4f46e5;
  background: #eef2ff;
}

.crm-filter-option small {
  color: #6b7280;
}

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

/* Metric bar polish */
.crm-summary-value {
  font-size: 22px;
  font-weight: 700;
}

.crm-summary-label {
  font-size: 12px;
  color: #6b7280;
}

.crm-summary-trend {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.crm-toolbar-right {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.crm-pipeline-summarybar {
  position: sticky;
  top: 56px; /* unter Topbar */
  z-index: 20;
  display: flex;
  align-items: stretch;
  gap: 1px;
  padding: 0;
  margin-top: 8px;
  background: #E5E7EB;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  overflow: hidden;
}

.crm-summary-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  background: #ffffff;
  padding: 20px 24px;
}

.crm-summary-label {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.crm-summary-value {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin: 4px 0;
  line-height: 1.1;
}

.crm-summary-divider {
  display: none;
}

.crm-summary-trend {
  font-size: 12px;
  color: #10B981;
  margin-top: 4px;
}

.crm-pipeline-settings-list {
  display: grid;
  gap: 10px;
}

.crm-pipeline-settings-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.crm-pipeline-settings-handle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
}

.crm-pipeline-settings-row input {
  height: 34px;
  border-radius: 0;
  border: 1px solid #e5e7eb;
  padding: 0 10px;
}

.crm-overflow-wrap {
  display: none;
}

@media (max-width: 768px) {
  .crm-view-toggle {
    display: none;
  }
  .crm-toolbar-right > .crm-filter-wrap {
    display: none;
  }
  .crm-toolbar-right > .crm-overflow-wrap {
    display: inline-flex;
  }
}

.crm-deals-list {
  margin-top: 12px;
}

.crm-forecast {
  margin-top: 12px;
}

/* CRM Slide-over */
.crm-slideover-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: stretch;
  justify-content: flex-end;
  z-index: 80;
}

.crm-slideover-overlay[aria-hidden="false"] {
  display: flex;
}

.crm-slideover {
  width: min(720px, 92vw);
  max-width: 720px;
  height: 100%;
  background: #ffffff;
  border-left: 1px solid #e5e7eb;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(24px);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.crm-slideover.open {
  transform: translateX(0);
  opacity: 1;
}

.crm-slideover-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

.crm-slideover-kicker {
  font-size: 0.75rem;
  color: #9ca3af;
}

.crm-slideover-title {
  margin: 0.15rem 0 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #111827;
}

.crm-slideover-close {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b7280;
  transition: background 0.15s ease, color 0.15s ease;
}

.crm-slideover-close:hover {
  background: #f9fafb;
  color: #374151;
}

.crm-slideover-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  margin-right: 0.5rem;
}

/* Kontakt-Slideover: modernes Layout */
.crm-contact-slideover {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 28%);
}

.crm-contact-slideover-top {
  position: relative;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(3, 4, 94, 0.08);
  background: linear-gradient(165deg, rgba(239, 246, 255, 0.65) 0%, rgba(255, 255, 255, 0.95) 55%);
}

.crm-contact-slideover-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border-radius: 10px;
  z-index: 2;
}

.crm-contact-slideover-hero {
  position: relative;
  padding: 1.1rem 3.25rem 0.85rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 520px) {
  .crm-contact-slideover-hero {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.crm-contact-slideover-hero-main {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  min-width: 0;
}

.crm-contact-slideover-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary, #03045e);
  background: linear-gradient(145deg, rgba(3, 4, 94, 0.08) 0%, rgba(0, 119, 182, 0.15) 100%);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px rgba(3, 4, 94, 0.1);
  overflow: hidden;
}

.crm-contact-slideover-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.crm-contact-slideover-hero-text {
  min-width: 0;
}

.crm-contact-slideover-kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.crm-contact-slideover-title {
  margin: 0.2rem 0 0.35rem;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.25;
}

.crm-contact-slideover-badge-wrap {
  margin-top: 0.15rem;
}

.crm-company-slideover-pipeline-row {
  margin-top: 0.45rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  max-width: 100%;
}

.crm-company-slideover-pipeline-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.crm-company-slideover-pipeline-select {
  width: 100%;
  max-width: min(100%, 22rem);
  padding: 0.45rem 2rem 0.45rem 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
}

.crm-company-slideover-pipeline-select:hover {
  border-color: rgba(0, 119, 182, 0.45);
}

.crm-company-slideover-pipeline-select:focus {
  outline: none;
  border-color: var(--color-accent, #0077b6);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.2);
}

.crm-company-about-card .crm-company-about-link {
  color: var(--color-accent, #0077b6);
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}

.crm-company-about-card .crm-company-about-link:hover {
  text-decoration: underline;
}

.crm-company-about-multiline,
.crm-company-about-text {
  line-height: 1.5;
  color: #334155;
}

.crm-company-about-text {
  margin: 0;
}

.crm-about-from-contact {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.crm-contact-slideover-badge-wrap .crm-type-pill {
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
}

.crm-contact-slideover-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

@media (min-width: 520px) {
  .crm-contact-slideover-hero-actions {
    margin-left: auto;
    justify-content: flex-end;
  }
}

.crm-contact-slideover-tabs {
  padding: 0 0.75rem;
  margin: 0;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.7);
}

.crm-contact-slideover-tabs .crm-slideover-tab {
  border-radius: 10px 10px 0 0;
  padding: 0.65rem 0.85rem;
}

.crm-contact-slideover-tabs .crm-slideover-tab.active {
  color: var(--color-primary, #03045e);
  border-bottom: 2px solid var(--color-accent, #0077b6);
  margin-bottom: -1px;
}

.crm-slideover-body.crm-contact-slideover-body {
  padding: 1rem 1.1rem 1.5rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  background: #f1f5f9;
}

.crm-slideover-body.crm-contact-slideover-body .crm-slideover-tabpanel {
  background: transparent;
}

.crm-contact-detail-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.crm-contact-detail-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.crm-contact-detail-card-title {
  margin: 0 0 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.crm-contact-detail-dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.crm-contact-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 100px) 1fr;
  gap: 0.35rem 0.75rem;
  align-items: start;
  font-size: 0.875rem;
}

.crm-contact-detail-row dt {
  margin: 0;
  color: #64748b;
  font-weight: 500;
}

.crm-contact-detail-row dd {
  margin: 0;
  color: #0f172a;
  word-break: break-word;
}

.crm-contact-detail-row dd a {
  color: #0369a1;
  text-decoration: none;
  font-weight: 500;
}

.crm-contact-detail-row dd a:hover {
  text-decoration: underline;
}

.crm-contact-detail-labels {
  line-height: 1.5;
}

.crm-contact-detail-notes {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #334155;
  white-space: pre-wrap;
}

.crm-contact-detail-footnote {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.crm-contact-slideover-footer-btn {
  margin-top: 0.75rem;
}

.crm-contact-so-overview {
  margin-bottom: 0;
}

.crm-contact-so-dl {
  margin: 0;
  font-size: 0.9rem;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.35rem 1rem;
}

.crm-contact-so-dl dt {
  color: #6b7280;
  font-weight: 500;
}

.crm-contact-so-dl dd {
  margin: 0;
}

.crm-contact-so-dl dd a {
  color: var(--color-primary, #4f46e5);
  text-decoration: none;
}

.crm-contact-so-dl dd a:hover {
  text-decoration: underline;
}

.crm-acquisition-video-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.crm-acquisition-video-meta {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #6b7280;
}

.crm-acquisition-video-empty {
  color: #6b7280;
  font-size: 0.9rem;
}

.crm-contact-so-deals-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.crm-contact-so-deal-item {
  padding: 0.6rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.crm-contact-so-deal-item:hover {
  background: #f9fafb;
}

.crm-contact-so-deal-title {
  display: block;
  font-weight: 600;
  color: #111827;
}

.crm-contact-so-deal-meta {
  display: block;
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.crm-activities-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.crm-activity-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
}

.crm-activity-item:last-child {
  border-bottom: none;
}

.crm-activity-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.crm-activity-type-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.crm-activity-type {
  display: inline-block;
  font-weight: 600;
  color: #374151;
  margin-right: 0.5rem;
}

.crm-activity-subject {
  font-weight: 500;
  color: #111827;
}

.crm-activity-meta {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.crm-activity-content {
  margin: 0.35rem 0 0;
  color: #4b5563;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.crm-slideover-tabs {
  display: flex;
  gap: 8px;
  padding: 0.75rem 1rem 0.5rem;
}

.crm-slideover-tab {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  border-radius: 0;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.crm-slideover-tab:hover {
  background: #f9fafb;
  color: #374151;
}

.crm-slideover-tab.active {
  background: #eef2ff;
  color: #4f46e5;
  border-color: #c7d2fe;
  font-weight: 600;
}

.crm-slideover-body {
  padding: 0.75rem 1rem 1rem;
  overflow: auto;
}

.crm-slideover-form label {
  display: block;
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 6px;
}

.crm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.crm-form-field input,
.crm-form-field select,
.crm-form-field textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
}

.crm-form-field input:focus,
.crm-form-field select:focus,
.crm-form-field textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.crm-deal-value-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crm-deal-value-frequency {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.crm-deal-freq-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: #374151;
  cursor: pointer;
  margin: 0;
  font-weight: 500;
}

.crm-deal-freq-label input[type='radio'] {
  width: auto;
  margin: 0;
  accent-color: #0077b6;
}

.crm-form-field--full {
  grid-column: 1 / -1;
}

.crm-slideover-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

.crm-slideover-hint {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #9ca3af;
}

.crm-slideover-hint kbd {
  border: 1px solid #e5e7eb;
  border-bottom-width: 2px;
  background: #fff;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.8rem;
  color: #6b7280;
}

.crm-activities {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crm-activity-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.crm-activity-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 4px;
}

/* Toasts */
.crm-toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 90;
}

.crm-toast {
  width: min(360px, 92vw);
  background: #111827;
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.crm-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.crm-toast-title {
  font-weight: 700;
  letter-spacing: -0.3px;
}

.crm-toast-msg {
  margin-top: 2px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.86);
}

.crm-toast-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.crm-toast-btn {
  border: 1px solid rgba(255,255,255,0.22);
  background: transparent;
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.85rem;
}

.crm-toast-btn:hover {
  background: rgba(255,255,255,0.08);
}

/* CRM Topbar – Wordmark & Nav */
.crm-wordmark {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-right: 1.5rem;
}

.crm-topbar-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.crm-topbar-nav a {
  font-size: 0.9rem;
  color: #6b7280;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.crm-topbar-nav a:hover {
  color: #374151;
}

.crm-topbar-nav a.active {
  font-weight: 600;
  color: #6366f1;
  border-bottom-color: #6366f1;
}

.topbar-user-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #6366f1;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.topbar-user-wrap .user-info {
  margin: 0;
}

@media (max-width: 768px) {
  .crm-pipeline {
    height: calc(100vh - 140px);
  }
  .crm-pipeline-column {
    flex: 0 0 260px;
    max-width: 260px;
  }
  .crm-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .crm-pipeline-summary-text {
    margin-left: 0;
    margin-top: 0.25rem;
  }
  .crm-toolbar-right {
    margin-left: 0;
    justify-content: flex-start;
  }
  .crm-pipeline-summarybar {
    top: 56px;
    flex-direction: column;
    align-items: flex-start;
  }

  .crm-form-grid {
    grid-template-columns: 1fr;
  }
}

.tasks-calendar-wrapper .fc-event .task-cal-event-flag {
  color: #dc2626;
  display: inline-flex;
}

.tasks-calendar-wrapper .fc-event .task-cal-event-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.task-card-clock-icon {
  color: var(--color-muted);
  vertical-align: middle;
}

/* Board-Ansicht (Standard) */
.tasks-board.view-board {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  align-items: flex-start;
  height: calc(100vh - 150px);
  padding-bottom: 1rem;
}

/* Listenansicht */
.tasks-board.view-list {
  flex-direction: column;
  overflow-x: hidden;
  height: auto;
  padding-bottom: 2rem;
}

.tasks-board.view-list .tasks-board-column {
  min-width: 100%;
  max-width: 100%;
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin-bottom: 2rem;
  flex-shrink: 0;
  max-height: none;
}

.tasks-board.view-list .tasks-board-column--completed {
  background: transparent;
}

.tasks-board.view-list .tasks-board-column-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.tasks-board.view-list .tasks-dropzone {
  padding: 0;
  min-height: 40px;
}

.tasks-board.view-list .tasks-dropzone .task-card {
  width: 100%;
  box-shadow: none;
  border-radius: 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0;
}

.tasks-board.view-list .tasks-dropzone .task-card:hover {
  box-shadow: none;
}

.tasks-board.view-list .task-card-inner {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.tasks-board.view-list .task-card-header {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.tasks-board.view-list .task-card-right {
  flex-shrink: 0;
  margin-left: auto;
  margin-top: 0;
  width: auto;
}

.tasks-board.view-list .task-card-meta {
  flex-shrink: 0;
  margin-left: auto;
  margin-top: 0;
  width: auto;
}

.tasks-quick-add-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 6px;
  outline: none;
}

.tasks-quick-add-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(0, 119, 182, 0.2);
}

.task-badge-link {
  text-decoration: none;
  color: inherit;
}

.task-badge-link:hover {
  text-decoration: underline;
}

/* Legacy: Listen-Ansicht (falls noch verwendet) */
.tasks-group {
  margin-bottom: 1.5rem;
}

.tasks-group-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.task-item--fade-out {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.tasks-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.task-badge-wrap {
  flex-shrink: 0;
}

/* Customer card */
.customer-card__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.customer-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.customer-card__company-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.customer-card-logo {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.customer-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.customer-card__company {
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--color-primary);
  margin: 0;
}

.customer-card__contact {
  font-size: 0.875rem;
  color: var(--color-text);
}

.customer-card__name {
  margin: 0 0 0.25rem;
}

.customer-card__email {
  color: var(--color-accent);
  text-decoration: none;
}

.customer-card__email:hover {
  text-decoration: underline;
}

/* Team card */
.team-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.team-card-header .card-title {
  margin-bottom: 0;
}

.team-card-edit-link {
  font-size: 0.875rem;
  color: var(--color-accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
  text-decoration: none;
  border-radius: 0;
}

.team-card-edit-link:hover {
  text-decoration: underline;
  color: var(--color-primary);
}

.team-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.team-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.team-list-item-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.team-list-item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-list-item-body {
  min-width: 0;
}

.team-list-item-name {
  margin: 0 0 0.2rem;
  font-weight: 600;
  color: var(--color-primary);
  font-size: 0.9375rem;
}

.team-list-item-meta {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-muted);
  line-height: 1.35;
}

.team-card-empty {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.team-avatars {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.team-avatar {
  width: 36px;
  height: 36px;
  font-size: 0.75rem;
}

/* Meetings card */
.meetings-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.meetings-card-header .card-title {
  margin-bottom: 0;
}

.meetings-card-plan-link {
  font-size: 0.8125rem;
  color: var(--color-accent);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  padding: 0;
  border-radius: 0;
}

.meetings-card-plan-link:hover {
  text-decoration: underline;
  color: var(--color-primary);
}

.meetings-card-title {
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
}

.meetings-card-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin: 0 0 1rem;
}

.meetings-card-meta-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--color-muted);
}

.meetings-card-meta-icon svg {
  display: block;
}

.meetings-card-cta {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.meetings-card-cta-icon {
  flex-shrink: 0;
}

.meetings-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.meetings-card-title-row .meetings-card-title {
  margin: 0;
}

.meetings-card-edit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  color: var(--color-muted);
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.meetings-card-edit-btn:hover {
  color: var(--color-accent);
  background: rgba(0, 119, 182, 0.08);
}

.meetings-card-edit-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .main-title {
    font-size: 1.75rem;
  }
}

/* Quick Stats KPI */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

.kpi-card {
  background: var(--color-white);
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.kpi-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.2;
}

.kpi-label {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
  display: block;
}

/* Dashboard: Aktivitäten oben, Projektliste darunter, beide volle Breite */
.dashboard-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.dashboard-left {
  min-width: 0;
}

.dashboard-right {
  min-width: 0;
}

/* Ansicht „Projekte“: nur Tabellenansicht, gleiche Daten wie Dashboard */
body.view-projekte #dashboard-kpis {
  display: none;
}

body.view-projekte #dashboard-activity {
  display: none;
}

/* Segmented control (filter switch) */
.project-list-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.filter-switch {
  display: inline-flex;
  background: var(--color-white);
  padding: 3px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
}

.filter-switch-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--color-muted);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.filter-switch-btn:hover {
  color: var(--color-primary);
}

.filter-switch-btn.active {
  background: var(--color-accent);
  color: var(--color-white);
}

/* Project list (table-like rows) */
.project-list-wrap {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: visible;
}

.project-list {
  display: flex;
  flex-direction: column;
}

.project-list-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 160px 140px 100px 90px 90px 44px;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  min-height: 56px;
  border-bottom: 1px solid rgba(3, 4, 94, 0.06);
  font-size: 0.9375rem;
}

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

.project-list-row.head {
  background: var(--color-bg);
}

/* Klickbare Zeilen: Hover und Cursor (Kopfzeile ausgenommen) */
.project-list-row:not(.head) {
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.project-list-row:not(.head):hover {
  background-color: var(--color-background-hover);
}

.project-list-head-cell {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  text-align: left;
}

/* Status-Überschrift zentriert über den Badges */
.project-list-row.head .project-list-head-cell.status-cell {
  text-align: center;
}

.project-list-name {
  display: flex;
  align-items: center;
  font-weight: 500;
  color: var(--color-primary);
}

.project-list-client {
  display: flex;
  align-items: center;
  gap: var(--gap-cell);
  color: var(--color-muted);
}

.project-list-client .client-name {
  color: var(--color-muted);
}

/* Team column: display + dropdown (same choice field as modal) */
.project-list-team-cell {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.project-list-team-display {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0.25rem 0;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  position: relative;
}

.project-list-team-display:hover {
  background: var(--color-background-hover);
}

/* Avatar stack: overlapping circles */
.project-list-team-avatars {
  display: flex;
  align-items: center;
  padding-left: 4px;
}

.project-list-team-avatars .team-avatar-sm {
  width: 24px;
  height: 24px;
  margin-left: -8px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-accent);
  flex-shrink: 0;
  border: 2px solid var(--color-white);
  box-sizing: border-box;
  overflow: hidden;
}

.project-list-team-avatars .team-avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-list-team-avatars .team-avatar-sm:first-child {
  margin-left: 0;
}

.project-list-team-avatars .team-avatar-count {
  margin-left: -8px;
  background: var(--color-muted);
  font-size: 0.625rem;
}

/* Tooltip: hidden by default, shown on hover when not empty */
.project-list-team-tooltip {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 4px;
  min-width: 140px;
  padding: 0.5rem 0.75rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-hover);
  border: 1px solid rgba(3, 4, 94, 0.08);
  z-index: 25;
  font-size: 0.8125rem;
  color: var(--color-text);
  pointer-events: none;
}

.project-list-team-display:hover .project-list-team-tooltip:not(:empty) {
  display: block;
}

.project-list-team-tooltip-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-list-team-tooltip-list li {
  padding: 0.2rem 0;
  white-space: nowrap;
}

.project-list-team-tooltip-list li + li {
  border-top: 1px solid rgba(3, 4, 94, 0.06);
}

.project-list-team-dropdown {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 4px;
  min-width: 200px;
  max-width: 240px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-hover);
  border: 1px solid rgba(3, 4, 94, 0.08);
  z-index: 20;
  overflow: hidden;
}

.project-list-team-dropdown.is-open {
  display: block;
}

.project-list-team-dropdown .project-modal-team-list {
  max-height: 220px;
  overflow-y: auto;
}

.client-avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-accent);
}

.client-avatar.avatar-1 { background: var(--color-accent); }
.client-avatar.avatar-2 { background: #0d9488; }
.client-avatar.avatar-3 { background: #7c3aed; }
.client-avatar.avatar-4 { background: #c2410c; }
.client-avatar.avatar-5 { background: #be185d; }

.client-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.progress-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--gap-cell);
}

.progress-cell .progress-bar {
  flex: 1;
  min-width: 0;
}

.progress-bar {
  height: 6px;
  background: var(--color-bg);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar--large {
  height: 10px;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  transition: width 0.5s ease-in-out;
}

.progress-pct {
  font-size: 0.8125rem;
  color: var(--color-muted);
  flex-shrink: 0;
  min-width: 2.25rem;
}

.status-cell {
  min-width: 100px;
  display: flex;
  align-items: center;
}

.sortable-header {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.sortable-header:hover {
  color: var(--color-accent);
}

.sortable-arrow {
  font-size: 0.7rem;
  opacity: 0.8;
}

.project-list-start {
  display: flex;
  align-items: center;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.kebab-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kebab-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.kebab-btn:hover {
  color: var(--color-primary);
  background: var(--color-bg);
}

.kebab-btn svg {
  width: 18px;
  height: 18px;
}

.kebab-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 140px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-hover);
  border: 1px solid rgba(3, 4, 94, 0.08);
  padding: 0.25rem;
  z-index: 10;
}

.kebab-wrap.show-dropdown .kebab-dropdown {
  display: block;
}

.kebab-dropdown-item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  text-align: left;
  border: none;
  background: none;
  color: var(--color-text);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

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

.kebab-dropdown-item.delete {
  color: #dc2626;
}

.kebab-dropdown-item.delete:hover {
  background: rgba(220, 38, 38, 0.08);
}

.project-list-deadline {
  display: flex;
  align-items: center;
  color: var(--color-muted);
  font-size: 0.875rem;
}

@media (max-width: 767px) {
  .project-list-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto;
    min-height: auto;
  }
  .project-list-row .progress-cell {
    grid-column: 1 / -1;
  }
  .project-list-row .project-list-team-cell {
    grid-column: 1 / -1;
  }
  .project-list-row .project-list-start,
  .project-list-row .project-list-deadline {
    grid-column: 1 / -1;
  }
  .project-list-row.head .project-list-head-fortschritt,
  .project-list-row.head .project-list-head-cell.project-list-team,
  .project-list-row.head .status-cell,
  .project-list-row.head .project-list-start,
  .project-list-row.head .project-list-deadline,
  .project-list-row.head .project-list-actions {
    grid-column: 1 / -1;
  }
}

.no-projects {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* Pagination */
.pagination-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(3, 4, 94, 0.06);
  background: var(--color-white);
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--color-muted);
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid rgba(3, 4, 94, 0.12);
  border-radius: var(--radius-md);
  background: var(--color-white);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--color-accent);
  background: var(--color-bg);
  color: var(--color-primary);
}

.pagination-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
  cursor: default;
}

.pagination-btn.active:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Activity feed timeline */
.activity-feed-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 1rem;
}

#activities-container {
  max-height: 20rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.activity-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}

.activity-item {
  position: relative;
  padding-left: 1.25rem;
  padding-bottom: 1.25rem;
}

.activity-item:last-child {
  padding-bottom: 0;
}

.activity-item::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.activity-item::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: rgba(3, 4, 94, 0.08);
}

.activity-item:last-child::after {
  display: none;
}

.activity-item-text {
  font-size: 0.875rem;
  color: var(--color-text);
  line-height: 1.4;
}

.activity-item-time {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 0.2rem;
}

.activity-feed-empty {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin: 0;
  padding: 0.5rem 0;
}

.activity-feed-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.25rem;
}

/* ---------- Login page ---------- */
body.login-page {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100vh;
  padding: 0;
}

body.login-page .login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: var(--color-accent);
}

body.login-page .bg-grid.login-wrap {
  background-color: var(--color-accent);
  background-image: none;
}

.login-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 22rem;
}

.login-page-logo {
  max-width: 220px;
  max-height: 100px;
  width: auto;
  height: auto;
  display: block;
}

.login-card {
  background: var(--color-white);
  padding: 2rem 2.25rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(3, 4, 94, 0.2);
  max-width: 22rem;
  width: 100%;
  text-align: left;
}

.login-card .eyebrow {
  margin-bottom: 0.25rem;
}

.login-card h1 {
  margin-bottom: 0.25rem;
}

.login-subtitle {
  margin-bottom: 1.5rem;
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.login-card label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--color-primary);
}

.login-card input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-md);
  font: inherit;
  background: var(--color-white);
}

.login-card input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.login-error {
  color: #c00;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  min-height: 1.25rem;
}

.login-card button[type="submit"] {
  width: 100%;
  padding: 0.75rem 1rem;
  min-height: 44px;
  background: var(--color-accent);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.login-card button[type="submit"]:hover:not(:disabled) {
  background: var(--color-primary);
}

.login-card button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
}

/* ---------- Dashboard: legacy project grid (optional) ---------- */
.no-projects {
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  margin: 0;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge--active {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.badge--active::before {
  background: #22c55e;
}

.badge--completed {
  background: #EFF0F5;
  color: var(--color-muted);
}

.badge--completed::before {
  background: #94a3b8;
}

.badge--pending {
  background: rgba(234, 179, 8, 0.15);
  color: #a16207;
}

.badge--pending::before {
  background: #eab308;
}

/* Benutzer: Rollen-Badges (Blau Intern, Grün Kunde) */
.badge--role-intern {
  background: rgba(0, 119, 182, 0.15);
  color: #0369a1;
}

.badge--role-intern::before {
  background: var(--color-accent);
}

.badge--role-kunde {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.badge--role-kunde::before {
  background: #22c55e;
}

/* Benutzer-Tabelle */
.users-list-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.users-list-header .topbar-search-input {
  width: 240px;
}

.companies-list-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.companies-list-header .topbar-search-input {
  width: 280px;
  min-width: 280px;
}

.users-table-wrap {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: visible;
}

.users-list {
  display: flex;
  flex-direction: column;
}

.users-list-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 100px 100px 1.2fr 1fr 80px;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  min-height: 56px;
  border-bottom: 1px solid rgba(3, 4, 94, 0.06);
  font-size: 0.9375rem;
}

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

.users-list-row.head {
  background: var(--color-bg);
}

.users-list-row:not(.head) {
  transition: background-color var(--transition-fast);
}

.users-list-row:not(.head):hover {
  background-color: var(--color-background-hover);
}

.companies-list .users-list-row {
  grid-template-columns: 1fr 1.2fr 80px;
}

.companies-list .users-list-row .users-list-name {
  font-weight: 500;
}

.users-list-users {
  font-size: 0.875rem;
  color: var(--color-muted);
  min-width: 0;
}

.users-list-head-cell {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  text-align: left;
}

.users-list-name {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  color: var(--color-primary);
}

.users-list-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-accent);
  flex-shrink: 0;
  overflow: hidden;
}

.users-list-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.users-list-email {
  color: var(--color-muted);
}

.users-list-role {
  min-width: 0;
}

.users-list-function {
  min-width: 0;
}

.users-list-projects {
  min-width: 0;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.users-list-projects-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.users-list-project-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--color-text);
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-list-projects-empty {
  color: var(--color-muted);
}

.users-list-actions {
  display: flex;
  justify-content: flex-end;
}

/* Kebab- und Dropdown-Menüs in Tabellen/Listen: nicht abschneiden, über Inhalt legen */
.users-table-wrap .kebab-dropdown,
.project-list-wrap .kebab-dropdown,
.project-list-wrap .project-list-team-dropdown,
.files-list-card .kebab-dropdown {
  z-index: 100;
}

.user-modal-role-switch {
  margin-top: 0.35rem;
}

.user-modal-admin-wrap .toggle-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--color-text);
  cursor: pointer;
}

@media (max-width: 767px) {
  .users-list-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto auto;
  }
  .users-list-row .users-list-name { grid-column: 1 / -1; grid-row: 1; }
  .users-list-row .users-list-email { grid-column: 1; grid-row: 2; }
  .users-list-row .users-list-role { grid-column: 2; grid-row: 2; }
  .users-list-row .users-list-function { grid-column: 1; grid-row: 3; }
  .users-list-row .users-list-company { grid-column: 2; grid-row: 3; }
  .users-list-row .users-list-projects { grid-column: 1 / -1; grid-row: 4; }
  .users-list-row .users-list-actions { grid-column: 2; grid-row: 5; justify-self: end; }
  .users-list-row.head .users-list-head-cell { grid-column: 1 / -1; }
  .companies-list .users-list-row {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .companies-list .users-list-row .users-list-name { grid-column: 1; grid-row: 1; }
  .companies-list .users-list-row .users-list-users { grid-column: 1; grid-row: 2; }
  .companies-list .users-list-row .users-list-actions { grid-column: 1; grid-row: 3; justify-self: end; }
  .companies-list .users-list-row.head .users-list-head-cell { grid-column: 1; }
}

/* ---------- Responsive: Sidebar drawer ---------- */
@media (max-width: 767px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.sidebar--open {
    transform: translateX(0);
  }

  .app-body {
    margin-left: 0;
  }

  .topbar-menu-btn {
    display: flex;
  }

  .main-content {
    padding: 1rem 1rem 2rem;
  }
}

/* RBAC: Kunden sehen keine admin-only Elemente */
body[data-role="client"] .admin-only {
  display: none !important;
}

/* Nur Admin/Superadmin: System-Status in der Navigation */
body:not([data-user-is-admin="true"]) .nav-admin-only {
  display: none !important;
}

/* ========== System Status (Admin) ========== */
body.page-system-status .main-content.hub-list-main {
  min-height: calc(100vh - 56px);
}

.system-status-page-hero {
  padding: 0 0 1.25rem;
}

.system-status-page-title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #03045e;
}

.system-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 1.25rem;
  align-items: start;
}

.system-status-card {
  background: #ffffff;
  border: 1px solid rgba(3, 4, 94, 0.08);
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.system-status-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 1.15rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.system-status-card-head-main {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  flex: 1 1 220px;
}

.system-status-card-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(0, 119, 182, 0.12) 0%, rgba(3, 4, 94, 0.08) 100%);
  color: #0077b6;
}

.system-status-card-titles {
  min-width: 0;
}

.system-status-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #03045e;
  margin: 0 0 0.2rem;
  letter-spacing: -0.02em;
}

.system-status-card-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.system-status-card-sync-btn {
  white-space: nowrap;
}

.system-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 9999px;
  flex-shrink: 0;
}

.system-status-pill--ok {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
  border: 1px solid rgba(22, 163, 74, 0.25);
}

.system-status-pill--warn {
  background: rgba(220, 38, 38, 0.08);
  color: #991b1b;
  border: 1px solid rgba(220, 38, 38, 0.22);
}

.system-status-pill--pending {
  background: rgba(0, 119, 182, 0.12);
  color: #075985;
  border: 1px solid rgba(0, 119, 182, 0.25);
}

.system-status-pill--muted {
  background: rgba(15, 23, 42, 0.06);
  color: #64748b;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.system-status-card-body {
  padding: 0.5rem 1.25rem 1.25rem;
}

@media (max-width: 640px) {
  .system-status-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .system-status-card-actions {
    width: 100%;
  }

  .system-status-card-sync-btn {
    width: 100%;
    justify-content: center;
  }

  .system-status-pill {
    align-self: flex-start;
  }
}

.system-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 0.9375rem;
}

.system-status-row:last-of-type {
  border-bottom: none;
}

.system-status-label {
  color: rgba(15, 23, 42, 0.65);
}

.system-status-value {
  color: #0f172a;
  text-align: right;
  font-weight: 500;
}

.system-status-alert {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: #7f1d1d;
}

.system-status-alert strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.system-status-alert p {
  margin: 0;
  line-height: 1.45;
}

.system-status-detail {
  margin: 0.65rem 0 0;
  padding: 0.65rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  border: 1px solid rgba(127, 29, 29, 0.15);
  color: #450a0a;
}

/* ========== Unternehmensstrategie (SaaS-Refresh) ========== */
body.page-strategy {
  --strategy-canvas: #eef0f5;
  --strategy-surface: #ffffff;
  --strategy-border: rgba(15, 23, 42, 0.08);
  --strategy-border-hairline: rgba(15, 23, 42, 0.06);
  --strategy-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --strategy-shadow-md: 0 4px 24px rgba(15, 23, 42, 0.06);
  --strategy-shadow-lift: 0 12px 36px rgba(15, 23, 42, 0.09);
  --strategy-radius-xl: 16px;
  --strategy-radius-lg: 14px;
  --strategy-radius-md: 12px;
  --strategy-radius-sm: 8px;
}

body.page-strategy .main-content.strategy-main {
  background: var(--strategy-canvas);
  padding: 1.75rem 1.75rem 2.5rem;
  max-width: 1160px;
}

@media (max-width: 767px) {
  body.page-strategy .main-content.strategy-main {
    padding: 1.25rem 1rem 2rem;
  }
}

body.page-strategy #strategy-error.project-list-error {
  border-radius: var(--strategy-radius-md);
  border-color: rgba(220, 38, 38, 0.2);
  background: rgba(254, 242, 242, 0.65);
}

.strategy-main .content-header {
  margin-bottom: 1.5rem;
}

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

.strategy-page-header .main-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #101828;
}

.strategy-main .strategy-page-header .btn-primary {
  border-radius: 999px;
  padding: 0.5rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  box-shadow: var(--strategy-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.04));
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}

.strategy-main .strategy-page-header .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(3, 4, 94, 0.2);
}

.strategy-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: var(--color-muted);
  max-width: 42rem;
}

.strategy-status-card {
  border-radius: var(--strategy-radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--strategy-shadow-sm);
  border: 1px solid var(--strategy-border);
  background: var(--strategy-surface);
}

body.page-strategy .strategy-status-card {
  border-color: var(--strategy-border);
}

.strategy-status-card--green {
  border-color: rgba(22, 163, 74, 0.22);
  background: linear-gradient(165deg, rgba(240, 253, 244, 0.92) 0%, #fff 72%);
}

.strategy-status-card--yellow {
  border-color: rgba(202, 138, 4, 0.26);
  background: linear-gradient(165deg, rgba(255, 251, 235, 0.88) 0%, #fff 72%);
}

.strategy-status-card--red {
  border-color: rgba(220, 38, 38, 0.22);
  background: linear-gradient(165deg, rgba(254, 242, 242, 0.92) 0%, #fff 72%);
}

.strategy-status-inner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.strategy-status-badge {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.strategy-status-card--green .strategy-status-badge {
  background: #22c55e;
}

.strategy-status-card--yellow .strategy-status-badge {
  background: #d97706;
}

.strategy-status-card--red .strategy-status-badge {
  background: #ef4444;
}

.strategy-status-label {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--color-primary);
}

.strategy-status-detail {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  color: #374151;
  line-height: 1.5;
}

.strategy-progress-outer {
  margin-bottom: 1rem;
}

.strategy-progress-wrap {
  padding: 1rem 1.25rem;
  background: var(--strategy-surface);
  border-radius: var(--strategy-radius-md);
  border: 1px solid var(--strategy-border);
  box-shadow: var(--strategy-shadow-sm);
}

.strategy-progress-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.strategy-progress-bar {
  height: 8px;
  background: #e8eaef;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.strategy-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0077b6, #03045e);
  border-radius: var(--radius-pill);
  transition: width 0.35s ease;
}

.strategy-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 1023px) {
  .strategy-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .strategy-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.strategy-kpi-card {
  background: var(--strategy-surface);
  border-radius: var(--strategy-radius-md);
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--strategy-border);
  box-shadow: var(--strategy-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.page-strategy .strategy-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--strategy-shadow-lift);
}

.strategy-kpi-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.strategy-kpi-value {
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  line-height: 1.25;
}

.strategy-kpi-sub {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 0.35rem;
}

.strategy-kpi-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0.65rem 0 0;
  line-height: 1.4;
}

.strategy-section-title {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: #101828;
}

.strategy-hint {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin: 0 0 1rem;
}

.strategy-target-panel {
  background: var(--strategy-surface);
  border-radius: var(--strategy-radius-lg);
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--strategy-border);
  margin-bottom: 1.5rem;
  max-width: 36rem;
  box-shadow: var(--strategy-shadow-sm);
}

.strategy-target-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.strategy-target-input {
  flex: 1;
  min-width: 160px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--strategy-border);
  border-radius: var(--strategy-radius-sm);
  font: inherit;
  background: #fafbfc;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.strategy-target-input:hover {
  background: #fff;
}

.strategy-target-input:focus {
  outline: none;
  border-color: rgba(0, 119, 182, 0.45);
  background: #fff;
}

.strategy-msg {
  min-height: 1.25rem;
  font-size: 0.9rem;
  color: #16a34a;
  margin: 0.75rem 0 0;
}

.strategy-definitions {
  padding: 0 0 2rem;
  max-width: 48rem;
}

.strategy-def-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.strategy-def-list li {
  margin-bottom: 0.5rem;
}

/* Strategische Ziele: KPI-Hero, Quartals-Tabs, Gantt */
.strategy-goals-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--strategy-border-hairline);
}

.strategy-goals-section .strategy-status-card {
  margin-bottom: 1rem;
}

.strategy-hero-inner {
  background: var(--strategy-surface);
  border: 1px solid var(--strategy-border);
  border-radius: var(--strategy-radius-xl);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--strategy-shadow-sm);
}

.strategy-hero-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
}

.strategy-hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.5rem;
}

.strategy-hero-values {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  font-size: 0.9rem;
  color: #475569;
}

.strategy-hero-ist strong,
.strategy-hero-ziel strong {
  color: #03045e;
  font-weight: 600;
}

.strategy-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.strategy-stat-pill {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: #f1f3f8;
  color: #334155;
  white-space: nowrap;
  border: 1px solid transparent;
}

.strategy-stat-pill--erreicht {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.strategy-stat-pill--bearbeitung {
  background: rgba(0, 119, 182, 0.1);
  color: #0c4a6e;
}

.strategy-stat-pill--offen {
  background: #f1f5f9;
  color: #475569;
}

.strategy-stat-pill--abgebrochen {
  background: rgba(220, 38, 38, 0.1);
  color: #991b1b;
}

.strategy-hero-filter-label {
  margin: 0;
}

.strategy-hero-select {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--strategy-border);
  border-radius: var(--strategy-radius-sm);
  font: inherit;
  background: #fafbfc;
  min-width: 10rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.strategy-hero-select:hover {
  background: #fff;
}

.strategy-hero-bar-wrap {
  margin-top: 0.65rem;
}

.strategy-hero-bar {
  height: 8px;
  border-radius: 999px;
  background: #e8eaef;
  overflow: hidden;
}

.strategy-hero-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0077b6 0%, #03045e 100%);
  transition: width 0.35s ease;
}

.strategy-period-tabs-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.strategy-period-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0.25rem;
  background: rgba(15, 23, 42, 0.04);
  border-radius: 999px;
  border: 1px solid var(--strategy-border-hairline);
}

.strategy-period-tab {
  padding: 0.42rem 0.95rem;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.strategy-period-tab:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.65);
}

.strategy-period-tab--active {
  background: #fff;
  color: #03045e;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.strategy-main .strategy-view-toggle {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--strategy-border);
  background: var(--strategy-surface);
  color: #475569;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.strategy-main .strategy-view-toggle:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

.strategy-goals-list-wrap {
  border: 1px solid var(--strategy-border);
  border-radius: var(--strategy-radius-md);
  background: var(--strategy-surface);
  overflow-x: auto;
  box-shadow: var(--strategy-shadow-sm);
}

.strategy-goals-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.strategy-goals-table th,
.strategy-goals-table td {
  padding: 0.75rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  vertical-align: middle;
}

.strategy-goals-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.strategy-goals-table tbody tr {
  transition: background 0.15s ease;
}

.strategy-goals-table tbody tr:hover {
  background: rgba(248, 250, 252, 0.9);
}

.strategy-goals-table tbody tr:last-child td {
  border-bottom: none;
}

.strategy-goals-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.strategy-goals-badge--offen {
  background: #f1f5f9;
  color: #475569;
}

.strategy-goals-badge--in_bearbeitung {
  background: rgba(0, 119, 182, 0.12);
  color: #0c4a6e;
}

.strategy-goals-badge--erreicht {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.strategy-goals-badge--abgebrochen {
  background: rgba(220, 38, 38, 0.1);
  color: #991b1b;
}

.strategy-goals-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.strategy-goals-actions button {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.55rem;
  border-radius: var(--strategy-radius-sm);
  border: 1px solid var(--strategy-border);
  background: var(--strategy-surface);
  cursor: pointer;
  color: #03045e;
  transition: background 0.15s ease;
}

.strategy-goals-actions button:hover {
  background: #f1f5f9;
}

.strategy-goals-actions button.strategy-goals-btn-danger {
  border-color: rgba(252, 165, 165, 0.6);
  color: #b91c1c;
}

.strategy-goals-actions button.strategy-goals-btn-danger:hover {
  background: #fef2f2;
}

.strategy-gantt-empty {
  margin: 0;
  padding: 1.25rem;
  color: #64748b;
  font-size: 0.9rem;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: var(--strategy-radius-md);
  background: rgba(248, 250, 252, 0.8);
}

/* Zeitstrahl (Gantt) – abgestimmt auf KPI-Karten */
.timeline-wrapper {
  background: #ffffff;
  border: none;
  border-radius: var(--strategy-radius-lg);
  overflow: hidden;
  box-shadow: var(--strategy-shadow-md);
}

.timeline-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.timeline-inner {
  --timeline-label-w: 220px;
  --today-left: calc(
    var(--timeline-label-w) + (100% - var(--timeline-label-w)) * var(--today-fraction, 0)
  );
  position: relative;
  min-width: min(100%, 720px);
}

.timeline-today-line-full {
  position: absolute;
  left: var(--today-left);
  top: 42px;
  bottom: 0;
  transform: translateX(-50%);
  width: 0;
  border-left: 1px dashed rgba(200, 130, 120, 0.5);
  z-index: 2;
  pointer-events: none;
}

.timeline-today-label {
  position: absolute;
  left: var(--today-left);
  top: 11px;
  transform: translateX(-50%);
  padding: 0.1rem 0.38rem;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #b87a72;
  background: rgba(250, 250, 250, 0.98);
  border-radius: 4px;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}

.timeline-header-row {
  display: flex;
  align-items: stretch;
  position: sticky;
  top: 0;
  z-index: 8;
  background: #fafbfc;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.timeline-corner {
  width: var(--timeline-label-w);
  min-width: var(--timeline-label-w);
  flex-shrink: 0;
  padding: 12px 18px;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #94a3b8;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(15, 23, 42, 0.06);
}

.timeline-header {
  display: grid;
  grid-template-columns: repeat(var(--gantt-cols, 12), minmax(2.75rem, 1fr));
  flex: 1;
  min-width: 0;
}

.timeline-header-cell {
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  padding: 12px 4px;
  text-align: center;
  border-right: 1px solid rgba(15, 23, 42, 0.04);
}

.timeline-header-cell:last-child {
  border-right: none;
}

.timeline-body {
  display: flex;
  flex-direction: column;
  background: #fff;
}

.timeline-row {
  display: flex;
  align-items: stretch;
  min-height: 58px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  transition: background 0.18s ease;
}

.timeline-row:nth-child(even) {
  background: rgba(248, 250, 252, 0.55);
}

.timeline-row:hover {
  background: #f4f6f9;
}

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

.timeline-label {
  width: var(--timeline-label-w);
  min-width: var(--timeline-label-w);
  padding: 14px 18px;
  font-size: 0.8125rem;
  font-weight: 400;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 10px;
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  background: #fafbfc;
}

.timeline-label .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.9;
}

.timeline-label-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strategy-overdue-badge {
  font-size: 0.62rem;
  padding: 0.08rem 0.32rem;
  border-radius: 4px;
  background: #fef2f2;
  color: #b45353;
  font-weight: 500;
  flex-shrink: 0;
}

.timeline-track-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
  background: #fff;
}

.timeline-track {
  position: relative;
  height: 100%;
  min-height: 58px;
  background-color: #fff;
  background-image: repeating-linear-gradient(
    to right,
    transparent,
    transparent calc(100% / var(--gantt-months, 12) - 1px),
    rgba(226, 232, 240, 0.75) calc(100% / var(--gantt-months, 12) - 1px),
    rgba(226, 232, 240, 0.75) calc(100% / var(--gantt-months, 12))
  );
}

.timeline-extend-marker {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: #94a3b8;
  pointer-events: none;
  z-index: 2;
}

.timeline-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 26px;
  border-radius: 9999px;
  border: none;
  background: var(--bar-bg, #e8eef8);
  color: var(--bar-text, #4a5d78);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  z-index: 3;
  min-width: 4px;
  box-sizing: border-box;
}

.timeline-bar:hover {
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
  z-index: 4;
}

.timeline-bar--narrow .timeline-bar-label {
  opacity: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  position: absolute;
}

.timeline-bar--overdue {
  box-shadow: 0 0 0 1px rgba(200, 130, 120, 0.45), 0 1px 2px rgba(15, 23, 42, 0.05);
}

.timeline-bar-label {
  text-decoration: inherit;
  max-width: 100%;
}

.timeline-bar--abgebrochen .timeline-bar-label {
  text-decoration: line-through;
  opacity: 0.88;
}

.strategy-gantt-tooltip.timeline-tooltip {
  position: fixed;
  display: none;
  z-index: 9999;
  max-width: 268px;
  padding: 12px 14px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #f1f5f9;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  box-shadow: var(--strategy-shadow-lift, 0 16px 48px rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.timeline-tooltip-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: #fff;
}

.timeline-tooltip-dates {
  display: block;
  font-size: 0.74rem;
  color: #94a3b8;
  margin-bottom: 8px;
}

.timeline-tooltip-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: #cbd5e1;
}

.timeline-tooltip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.timeline-tooltip-owner {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 8px;
}

/* Strategie-Modal: nur dieses Overlay */
#strategy-goal-modal-overlay {
  backdrop-filter: blur(6px);
  background: rgba(15, 23, 42, 0.38);
}

#strategy-goal-modal-overlay .project-modal {
  border-radius: 16px 0 0 16px;
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: -16px 0 48px rgba(15, 23, 42, 0.14);
}

#strategy-goal-modal-overlay .project-modal-header {
  padding: 1.35rem 1.5rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: #fafbfc;
}

#strategy-goal-modal-overlay .project-modal-title {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #101828;
}

#strategy-goal-modal-overlay .project-modal .project-modal-field input,
#strategy-goal-modal-overlay .project-modal .project-modal-field select,
#strategy-goal-modal-overlay .project-modal .project-modal-field textarea {
  border-radius: 10px;
  border-color: rgba(15, 23, 42, 0.1);
  background: #fafbfc;
}

#strategy-goal-modal-overlay .project-modal .project-modal-field input:hover,
#strategy-goal-modal-overlay .project-modal .project-modal-field select:hover,
#strategy-goal-modal-overlay .project-modal .project-modal-field textarea:hover {
  background: #fff;
}

#strategy-goal-modal-overlay .project-modal .project-modal-field input:focus,
#strategy-goal-modal-overlay .project-modal .project-modal-field select:focus,
#strategy-goal-modal-overlay .project-modal .project-modal-field textarea:focus {
  background: #fff;
}

#strategy-goal-modal-overlay .project-modal-close {
  border-radius: 10px;
}

/* Nordloom Datepicker (global; ersetzt input[type=date]) – Aufgaben-Suche nur Strategie-Modal */
.nl-date-field {
  position: relative;
}

.nl-date-control {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  background: #fafbfc;
  overflow: hidden;
}

.nl-date-display {
  flex: 1;
  text-align: left;
  padding: 0.55rem 0.85rem;
  font: inherit;
  font-size: 0.875rem;
  color: #0f172a;
  background: transparent;
  border: none;
  cursor: pointer;
  min-height: 2.5rem;
}

.nl-date-display--placeholder {
  color: #94a3b8;
}

.nl-date-clear {
  flex-shrink: 0;
  width: 2.25rem;
  border: none;
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  background: transparent;
  color: #64748b;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nl-date-clear:hover {
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
}

.nl-date-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 5000;
  min-width: 272px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
  padding: 0;
}

.nl-date-popover-inner {
  padding: 0.65rem 0.75rem 0.85rem;
}

.nl-date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.nl-date-caption {
  flex: 1;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

.nl-date-nav-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 1.1rem;
  line-height: 1;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nl-date-nav-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.nl-date-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 0.35rem;
}

.nl-date-wd {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  text-align: center;
  padding: 0.2rem 0;
}

.nl-date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.nl-date-cell {
  aspect-ratio: 1;
  min-height: 2rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  color: #334155;
  cursor: pointer;
  transition: background 0.12s ease;
}

.nl-date-cell:hover:not(.nl-date-cell--empty) {
  background: #f1f5f9;
}

.nl-date-cell--empty {
  pointer-events: none;
  visibility: hidden;
}

.nl-date-cell--today {
  text-decoration: underline;
  text-decoration-color: #cbd5e1;
  text-underline-offset: 3px;
}

.nl-date-cell--selected {
  background: #03045e;
  color: #fff;
}

.nl-date-cell--selected:hover {
  background: #03045e;
  color: #fff;
}

#strategy-goal-modal .strategy-goal-tasks-field .strategy-task-search-wrap {
  position: relative;
}

#strategy-goal-modal .strategy-goal-tasks-field input#strategy-goal-task-search {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fafbfc;
  padding: 0.55rem 0.85rem;
  font: inherit;
  font-size: 0.875rem;
}

#strategy-goal-modal .strategy-task-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 110;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
}

#strategy-goal-modal .strategy-task-dd-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.8125rem;
}

#strategy-goal-modal .strategy-task-dd-item:last-child {
  border-bottom: none;
}

#strategy-goal-modal .strategy-task-dd-item:hover {
  background: #f8fafc;
}

#strategy-goal-modal .strategy-task-dd-title {
  display: block;
  color: #0f172a;
}

#strategy-goal-modal .strategy-task-dd-sub {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

#strategy-goal-modal .strategy-task-dd-empty {
  padding: 0.65rem 0.75rem;
  font-size: 0.8125rem;
  color: #94a3b8;
}

#strategy-goal-modal .strategy-task-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

#strategy-goal-modal .strategy-task-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.28rem 0.5rem 0.28rem 0.65rem;
  background: #eef0f4;
  border-radius: 8px;
  font-size: 0.78rem;
  color: #1e293b;
}

#strategy-goal-modal .strategy-task-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#strategy-goal-modal .strategy-task-chip-remove {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}

#strategy-goal-modal .strategy-task-chip-remove:hover {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

@media (max-width: 767px) {
  .strategy-hero-row {
    flex-direction: column;
    align-items: stretch;
  }

  .timeline-inner {
    --timeline-label-w: 160px;
  }
}
/* ========== Splash Screen ========== */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

.splash-screen.splash-screen--hidden {
  opacity: 0;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.splash-logo {
  max-width: 260px;
  max-height: 120px;
  width: auto;
  height: auto;
  display: block;
}

.splash-loader {
  width: 240px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.splash-loader-bar {
  position: absolute;
  left: 0;
  top: 0;
  width: 40%;
  height: 100%;
  background: #fff;
  border-radius: var(--radius-pill);
  animation: splash-loader-run 1s ease-in-out 1 forwards;
}

@keyframes splash-loader-run {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(350%);
  }
}
