/* ============================================================
   CMA – Neue Module CSS
   Dashboard · Deals/Kanban · Projekte · Aufgaben · Kalender · Firmen · Aktivitaeten
   ============================================================ */

/* ── NAV SIDEBAR ERWEITERUNG ──────────────────────────────── */

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted, rgba(255,255,255,.3));
  padding: 16px 16px 6px;
  margin-top: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  margin: 1px 6px;
  border-radius: 8px;
  color: var(--text-secondary, rgba(255,255,255,.6));
  cursor: pointer;
  transition: background .15s, color .15s;
  font-size: 13.5px;
  font-weight: 500;
}
.nav-item:hover  { background: rgba(255,255,255,.06); color: rgba(255,255,255,.88); }
.nav-item.active { background: rgba(209,0,0,.18); color: #ff6b6b; }
.nav-item svg    { width: 16px; height: 16px; flex-shrink: 0; }

/* ── MAIN CONTENT AREA ────────────────────────────────────── */

#main-content {
  flex: 1 1 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: auto;
  padding: 24px 28px;
  min-height: 0;
}

/* ── MODULE HEADER ────────────────────────────────────────── */

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}

.module-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: rgba(255,255,255,.92);
  margin: 0;
}
.module-title svg { width: 22px; height: 22px; opacity: .7; }

.module-subtitle {
  font-size: 13px;
  color: var(--text-muted, rgba(255,255,255,.4));
}

.module-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.module-stats-bar {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted, rgba(255,255,255,.4));
  margin-bottom: 16px;
}

/* ── BUTTONS ──────────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #D00000;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.btn-primary:hover  { background: #b50000; }
.btn-primary:active { transform: scale(.97); }
.btn-primary svg    { width: 15px; height: 15px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}
.btn-secondary:hover { background: rgba(255,255,255,.12); }

.btn-danger-sm {
  padding: 7px 12px;
  background: rgba(239,68,68,.12);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
}
.btn-danger-sm:hover { background: rgba(239,68,68,.22); }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: transparent;
  color: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.btn-back:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.85); }
.btn-back svg   { width: 14px; height: 14px; }

.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s;
}
.btn-sm:hover { background: rgba(255,255,255,.12); }
.btn-sm svg   { width: 12px; height: 12px; }

.btn-link {
  background: transparent;
  border: none;
  color: #D00000;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn-link:hover { color: #ff4444; }

/* ── VIEW TOGGLE ──────────────────────────────────────────── */

.view-toggle {
  display: flex;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.view-btn {
  padding: 5px 14px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.5);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.view-btn.active {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  font-weight: 600;
}

/* ── EMPTY STATE ──────────────────────────────────────────── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  color: var(--text-muted, rgba(255,255,255,.3));
  text-align: center;
  gap: 16px;
}
.empty-state svg { width: 48px; height: 48px; opacity: .3; }
.empty-state p   { font-size: 15px; margin: 0; }

.empty-state-sm {
  padding: 20px;
  text-align: center;
  color: var(--text-muted, rgba(255,255,255,.3));
  font-size: 13px;
}

/* ── BADGES ───────────────────────────────────────────────── */

.stage-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
  letter-spacing: .02em;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
}

.priority-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: color-mix(in srgb, var(--priority-color) 15%, transparent);
  color: var(--priority-color);
}

.prob-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.7);
}

/* ── FORMS ────────────────────────────────────────────────── */

.entity-form {
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: rgba(255,255,255,.9);
  font-size: 14px;
  transition: border-color .15s, background .15s;
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(209,0,0,.6);
  background: rgba(255,255,255,.08);
}
.form-group select option { background: #1a1a2e; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.form-title {
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  margin: 0;
}

/* ── DETAIL VIEW ──────────────────────────────────────────── */

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 12px;
}
.detail-header-actions { display: flex; gap: 8px; align-items: center; }

.detail-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 900px) { .detail-body { grid-template-columns: 1fr; } }

.detail-title {
  font-size: 24px;
  font-weight: 700;
  color: rgba(255,255,255,.92);
  margin: 0 0 12px;
}
.detail-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

.detail-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
.detail-field { display: flex; flex-direction: column; gap: 4px; }
.detail-field label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255,255,255,.35);
}
.detail-field span, .detail-field a {
  font-size: 14px;
  color: rgba(255,255,255,.82);
}
.detail-field a { color: #ff6b6b; text-decoration: none; }
.detail-field a:hover { text-decoration: underline; }
.detail-field--full { grid-column: 1 / -1; }
.detail-desc, .detail-notes {
  font-size: 14px;
  color: rgba(255,255,255,.7);
  line-height: 1.6;
  margin: 0;
}
.detail-sidebar { position: sticky; top: 0; }

/* ── FILTER PILLS ─────────────────────────────────────────── */

.status-filter-row,
.activity-type-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-pill {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.55);
  font-size: 12.5px;
  cursor: pointer;
  transition: all .15s;
}
.filter-pill:hover  { background: rgba(255,255,255,.1); color: rgba(255,255,255,.85); }
.filter-pill.active {
  background: color-mix(in srgb, var(--pill-color, #D00000) 18%, transparent);
  border-color: color-mix(in srgb, var(--pill-color, #D00000) 40%, transparent);
  color: var(--pill-color, #ff6b6b);
  font-weight: 600;
}

/* ── ENTITY ROW LIST ──────────────────────────────────────── */

.entity-list { display: flex; flex-direction: column; gap: 6px; }
.entity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  gap: 16px;
}
.entity-row:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.entity-row-main { display: flex; align-items: center; gap: 10px; flex: 1; }
.entity-row-title { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.88); }
.entity-row-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: rgba(255,255,255,.45); }
.entity-row-value { font-weight: 700; color: #22c55e; }
.entity-row-prob  { color: rgba(255,255,255,.5); }

/* ── DASHBOARD ────────────────────────────────────────────── */

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-left: 3px solid var(--kpi-color, #D00000);
  border-radius: 12px;
  transition: transform .2s, background .15s;
}
.kpi-card:hover { transform: translateY(-2px); background: rgba(255,255,255,.06); }

.kpi-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--kpi-color) 15%, transparent);
  border-radius: 10px;
  flex-shrink: 0;
}
.kpi-icon svg { width: 20px; height: 20px; stroke: var(--kpi-color); }

.kpi-value {
  font-size: 22px;
  font-weight: 800;
  color: rgba(255,255,255,.92);
  line-height: 1;
  margin-bottom: 2px;
}
.kpi-title { font-size: 12px; color: rgba(255,255,255,.45); font-weight: 500; }
.kpi-sub   { font-size: 11px; color: rgba(255,255,255,.3); margin-top: 2px; }

.dashboard-body { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dashboard-col  { display: flex; flex-direction: column; gap: 20px; }

@media (max-width: 1000px) { .dashboard-body { grid-template-columns: 1fr; } }
@media (max-width: 700px)  { .dashboard-kpis { grid-template-columns: repeat(2, 1fr); } }

.dash-section {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  overflow: hidden;
}
.dash-section--danger { border-color: rgba(239,68,68,.25); background: rgba(239,68,68,.04); }

.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.dash-section-header h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.65);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.dash-section-header h2 svg { width: 14px; height: 14px; }

/* Pipeline Chart */
.pipeline-chart { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.pipeline-row {
  display: grid;
  grid-template-columns: 90px 1fr 30px 80px;
  align-items: center;
  gap: 8px;
}
.pipeline-label { font-size: 12px; color: rgba(255,255,255,.55); }
.pipeline-bar-wrap { height: 6px; background: rgba(255,255,255,.06); border-radius: 3px; overflow: hidden; }
.pipeline-bar { height: 100%; border-radius: 3px; transition: width .6s ease; }
.pipeline-count { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.7); text-align: right; }
.pipeline-value { font-size: 11px; color: rgba(255,255,255,.4); text-align: right; }

/* Dashboard Tasks */
.dash-task-list { list-style: none; margin: 0; padding: 8px 16px; display: flex; flex-direction: column; gap: 8px; }
.dash-task-item { display: flex; align-items: center; gap: 10px; }
.dash-task-check {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: all .15s;
}
.dash-task-check.done { background: #22c55e; border-color: #22c55e; }
.dash-task-check svg  { width: 10px; height: 10px; stroke: #fff; }
.dash-task-check:not(.done):hover { border-color: rgba(255,255,255,.5); }
.dash-task-title { font-size: 13px; color: rgba(255,255,255,.75); flex: 1; }
.dash-task-date  { font-size: 11px; color: rgba(255,255,255,.35); white-space: nowrap; }
.dash-task--overdue .dash-task-title { color: #ef4444; }

/* Activity Feed */
.activity-feed { list-style: none; margin: 0; padding: 8px 16px; display: flex; flex-direction: column; gap: 12px; }
.activity-item { display: flex; gap: 12px; align-items: flex-start; }
.activity-type-dot {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 5px;
  flex-shrink: 0; background: rgba(255,255,255,.2);
}
.activity-type-dot[data-type="anruf"]   { background: #22c55e; }
.activity-type-dot[data-type="email"]   { background: #3b82f6; }
.activity-type-dot[data-type="meeting"] { background: #a855f7; }
.activity-type-dot[data-type="notiz"]   { background: rgba(255,255,255,.3); }
.activity-text { font-size: 13px; color: rgba(255,255,255,.75); margin: 0 0 3px; }
.activity-meta { display: flex; gap: 8px; align-items: center; }
.activity-type-label { font-size: 11px; color: rgba(255,255,255,.35); }
.activity-time       { font-size: 11px; color: rgba(255,255,255,.3); }

/* ── KANBAN BOARD ─────────────────────────────────────────── */

.kanban-board {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 16px;
  min-height: 60vh;
  align-items: flex-start;
}

.kanban-col {
  flex: 0 0 240px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 2px solid var(--stage-color, #D00000);
  background: color-mix(in srgb, var(--stage-color) 8%, transparent);
}
.kanban-col-title { font-size: 12px; font-weight: 700; color: var(--stage-color); text-transform: uppercase; letter-spacing: .07em; }
.kanban-col-count {
  font-size: 11px; font-weight: 700;
  background: color-mix(in srgb, var(--stage-color) 20%, transparent);
  color: var(--stage-color);
  padding: 2px 8px; border-radius: 12px;
}

.kanban-cards { padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }

.kanban-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 14px;
  cursor: grab;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.kanban-card:hover {
  background: rgba(255,255,255,.09);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.kanban-card:active { cursor: grabbing; }

.kanban-card-title   { font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,.9); margin-bottom: 8px; }
.kanban-card-contact {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: rgba(255,255,255,.45);
  margin-bottom: 10px;
}
.kanban-card-contact svg { width: 12px; height: 12px; }
.kanban-card-footer  { display: flex; justify-content: space-between; align-items: center; }
.kanban-card-value   { font-size: 13px; font-weight: 700; color: #22c55e; }
.kanban-card-prob    { font-size: 11px; color: rgba(255,255,255,.4); }

.kanban-add-btn {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px;
  background: transparent; border: none;
  color: rgba(255,255,255,.25);
  font-size: 12px; cursor: pointer;
  border-top: 1px solid rgba(255,255,255,.05);
  transition: color .15s, background .15s;
}
.kanban-add-btn:hover { background: rgba(255,255,255,.05); color: rgba(255,255,255,.6); }
.kanban-add-btn svg   { width: 13px; height: 13px; }

/* Stage Selector */
.stage-selector { margin-top: 28px; }
.stage-selector label { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .07em; display: block; margin-bottom: 10px; }
.stage-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.stage-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--sc) 30%, transparent);
  background: transparent;
  color: color-mix(in srgb, var(--sc) 80%, rgba(255,255,255,.7));
  font-size: 12.5px; cursor: pointer;
  transition: all .15s;
}
.stage-pill.active,
.stage-pill:hover {
  background: color-mix(in srgb, var(--sc) 20%, transparent);
  color: var(--sc);
  font-weight: 600;
}

.deal-value-big { font-size: 24px; font-weight: 800; color: #22c55e; }

/* ── PROJEKTE ─────────────────────────────────────────────── */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.project-card {
  padding: 20px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s, transform .15s, border-color .15s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  position: relative;
}
.project-card:hover { background: rgba(255,255,255,.06); transform: translateY(-2px); border-color: rgba(255,255,255,.14); }

.project-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.project-card-title  { font-size: 15px; font-weight: 700; color: rgba(255,255,255,.9); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.project-card-desc   { font-size: 13px; color: rgba(255,255,255,.45); line-height: 1.5; margin: 0; }
.project-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.project-contact     { font-size: 12px; color: rgba(255,255,255,.4); }
.project-due         { display: flex; align-items: center; gap: 4px; font-size: 12px; color: rgba(255,255,255,.4); }
.project-due svg     { width: 12px; height: 12px; }

.progress-bar { height: 6px; background: rgba(255,255,255,.07); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width .5s ease; }
.progress-label { font-size: 11.5px; color: rgba(255,255,255,.35); margin-top: 5px; }
.project-progress { display: flex; flex-direction: column; gap: 5px; }

/* ── AUFGABEN ─────────────────────────────────────────────── */

.task-group { margin-bottom: 28px; }
.task-group-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: rgba(255,255,255,.5);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 12px; margin-top: 0;
}
.task-group-title svg { width: 14px; height: 14px; }
.task-group--overdue .task-group-title { color: #ef4444; }
.task-group--today   .task-group-title { color: #f59e0b; }
.task-group--done    .task-group-title { color: rgba(255,255,255,.3); }

.task-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  transition: background .15s;
}
.task-item:hover { background: rgba(255,255,255,.055); }
.task-item.task-done    { opacity: .5; }
.task-item.task-overdue { border-color: rgba(239,68,68,.25); background: rgba(239,68,68,.04); }

.task-checkbox {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.2);
  background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; flex-shrink: 0;
}
.task-checkbox.checked { background: #22c55e; border-color: #22c55e; }
.task-checkbox svg     { width: 10px; height: 10px; stroke: #fff; }
.task-checkbox:not(.checked):hover { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.08); }

.task-body { flex: 1; min-width: 0; }
.task-title { font-size: 13.5px; color: rgba(255,255,255,.85); font-weight: 500; display: block; }
.task-meta  { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.task-due {
  display: flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: rgba(255,255,255,.4);
}
.task-due svg    { width: 11px; height: 11px; }
.task-due.overdue { color: #ef4444; }

.task-actions    { display: flex; gap: 4px; }
.task-action-btn {
  width: 28px; height: 28px; border-radius: 7px;
  border: none; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.3); transition: all .15s;
}
.task-action-btn:hover     { background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); }
.task-action-del:hover     { background: rgba(239,68,68,.15); color: #ef4444; }
.task-action-btn svg       { width: 13px; height: 13px; }

.tasks-section { margin-top: 28px; }
.tasks-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.tasks-header h2 { font-size: 15px; font-weight: 700; color: rgba(255,255,255,.75); margin: 0; }

/* ── KALENDER ─────────────────────────────────────────────── */

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav-btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.6); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.cal-nav-btn:hover { background: rgba(255,255,255,.1); color: rgba(255,255,255,.9); }
.cal-nav-btn svg   { width: 16px; height: 16px; }
.cal-today-btn {
  padding: 5px 14px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.6); font-size: 13px; cursor: pointer;
  transition: all .15s;
}
.cal-today-btn:hover { background: rgba(255,255,255,.1); color: rgba(255,255,255,.9); }
.cal-title { font-size: 18px; font-weight: 700; color: rgba(255,255,255,.85); margin: 0; }

/* Monatsansicht */
.cal-month {}
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.cal-weekday {
  padding: 6px 0; text-align: center;
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,.3);
  text-transform: uppercase; letter-spacing: .08em;
}
.cal-grid { display: flex; flex-direction: column; gap: 2px; }
.cal-grid > div { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }

.cal-cell {
  min-height: 96px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: background .15s;
  display: flex; flex-direction: column; gap: 3px;
}
.cal-cell:hover        { background: rgba(255,255,255,.05); }
.cal-other-month       { opacity: .3; }
.cal-weekend           { background: rgba(255,255,255,.015); }
.cal-today             { border-color: rgba(209,0,0,.5) !important; background: rgba(209,0,0,.07) !important; }

.cal-day-num {
  font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.65);
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.cal-today .cal-day-num { background: #D00000; color: #fff; }

.cal-cell-tasks { display: flex; flex-direction: column; gap: 2px; }
.cal-task-dot {
  padding: 2px 6px; border-radius: 4px;
  font-size: 10.5px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(99,102,241,.2); color: #a5b4fc;
  cursor: pointer;
}
.cal-task-dot.priority-hoch   { background: rgba(239,68,68,.2);  color: #fca5a5; }
.cal-task-dot.priority-mittel { background: rgba(245,158,11,.2); color: #fcd34d; }
.cal-task-dot.priority-niedrig{ background: rgba(99,102,241,.2); color: #a5b4fc; }
.cal-task-dot.done            { opacity: .4; text-decoration: line-through; }
.cal-task-more { font-size: 10px; color: rgba(255,255,255,.3); padding-left: 4px; }

/* Wochenansicht */
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-week-col {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  overflow: hidden;
  min-height: 400px;
  display: flex; flex-direction: column;
}
.cal-week-col.cal-today { border-color: rgba(209,0,0,.4); background: rgba(209,0,0,.05); }

.cal-week-header {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-align: center;
}
.cal-week-dayname { display: block; font-size: 10px; font-weight: 700; color: rgba(255,255,255,.3); text-transform: uppercase; letter-spacing: .1em; }
.cal-week-daynum {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 15px; font-weight: 700; color: rgba(255,255,255,.75);
  margin-top: 4px;
}
.today-circle { background: #D00000; color: #fff !important; }

.cal-week-tasks { padding: 6px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.cal-week-task {
  padding: 5px 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 500;
  background: rgba(99,102,241,.18); color: #c7d2fe;
  cursor: pointer; transition: background .15s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-week-task:hover { background: rgba(99,102,241,.3); }
.cal-week-task.priority-hoch    { background: rgba(239,68,68,.18);  color: #fca5a5; }
.cal-week-task.priority-mittel  { background: rgba(245,158,11,.18); color: #fcd34d; }
.cal-week-task.done             { opacity: .4; text-decoration: line-through; }

.cal-add-task {
  width: 100%; padding: 5px; background: transparent; border: none;
  color: rgba(255,255,255,.2); cursor: pointer; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.cal-add-task:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.5); }
.cal-add-task svg   { width: 14px; height: 14px; }

/* ── AKTIVITAETEN TIMELINE ────────────────────────────────── */

.activity-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.timeline-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  position: relative;
  transition: background .15s;
}
.timeline-item:hover { background: rgba(255,255,255,.05); }

.timeline-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: rgba(255,255,255,.07);
}
.timeline-icon[data-type="anruf"]   { background: rgba(34,197,94,.12);   }
.timeline-icon[data-type="email"]   { background: rgba(59,130,246,.12);  }
.timeline-icon[data-type="meeting"] { background: rgba(168,85,247,.12);  }
.timeline-icon[data-type="aufgabe"] { background: rgba(245,158,11,.12);  }
.timeline-icon svg { width: 16px; height: 16px; }

.timeline-content { flex: 1; min-width: 0; }
.timeline-header  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.timeline-type    { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .06em; }
.timeline-time    { font-size: 11px; color: rgba(255,255,255,.3); }
.timeline-text    { font-size: 13.5px; color: rgba(255,255,255,.8); margin: 0 0 6px; line-height: 1.5; }
.timeline-ref {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: rgba(255,255,255,.35);
}
.timeline-ref svg { width: 11px; height: 11px; }

.timeline-del {
  position: absolute; right: 10px; top: 10px;
  width: 24px; height: 24px; border-radius: 6px;
  border: none; background: transparent; cursor: pointer;
  color: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: all .15s;
}
.timeline-item:hover .timeline-del { opacity: 1; }
.timeline-del:hover { background: rgba(239,68,68,.15); color: #ef4444; }
.timeline-del svg { width: 12px; height: 12px; }

/* Activity Panel (sidebar) */
.activity-panel {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  overflow: hidden;
}
.activity-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.activity-panel-header h3 { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.55); margin: 0; }
.activity-panel-list { list-style: none; margin: 0; padding: 8px 12px; display: flex; flex-direction: column; gap: 10px; }
.activity-panel-item { display: flex; gap: 10px; align-items: flex-start; position: relative; }
.ap-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ap-icon svg { width: 13px; height: 13px; }
.ap-body     { flex: 1; min-width: 0; }
.ap-text     { font-size: 12.5px; color: rgba(255,255,255,.75); margin: 0 0 2px; line-height: 1.4; }
.ap-time     { font-size: 11px; color: rgba(255,255,255,.3); }
.ap-del {
  width: 22px; height: 22px; border-radius: 5px;
  border: none; background: transparent; cursor: pointer;
  color: rgba(255,255,255,.2); opacity: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; flex-shrink: 0;
}
.activity-panel-item:hover .ap-del { opacity: 1; }
.ap-del:hover { background: rgba(239,68,68,.15); color: #ef4444; }
.ap-del svg   { width: 11px; height: 11px; }

/* Activity Type Picker */
.activity-type-picker {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.activity-type-option { cursor: pointer; }
.activity-type-option input { display: none; }
.activity-type-option span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.55); font-size: 13px;
  transition: all .15s;
}
.activity-type-option input:checked + span {
  background: rgba(209,0,0,.18);
  border-color: rgba(209,0,0,.4);
  color: #ff6b6b; font-weight: 600;
}
.activity-type-option span svg { width: 14px; height: 14px; }

/* ── FIRMEN ───────────────────────────────────────────────── */

.search-bar-wrap { margin-bottom: 16px; }
.search-bar-wrap .search-input {
  width: 100%; max-width: 400px;
  padding: 10px 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: rgba(255,255,255,.85); font-size: 14px;
  transition: border-color .15s;
}
.search-bar-wrap .search-input:focus { outline: none; border-color: rgba(209,0,0,.5); }

.company-list { display: flex; flex-direction: column; gap: 6px; }
.company-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.company-row:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }

.company-avatar {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(209,0,0,.18); color: #ff6b6b;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.company-avatar-lg {
  width: 64px; height: 64px; border-radius: 14px;
  background: rgba(209,0,0,.18); color: #ff6b6b;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
}

.company-row-body { flex: 1; min-width: 0; }
.company-row-name { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.88); display: block; }
.company-row-type { font-size: 12px; color: rgba(255,255,255,.4); }
.company-row-meta { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; font-size: 12px; color: rgba(255,255,255,.4); }
.company-row-meta span { display: flex; align-items: center; gap: 4px; }
.company-row-meta svg  { width: 11px; height: 11px; }

.company-detail-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.company-type-label  { font-size: 14px; color: rgba(255,255,255,.45); }

/* ── AUTO-PIPELINE HEALTH WIDGET ─────────────────────────── */

.dash-health-widget {
  padding: 0;
}

.dash-health-loading {
  padding: 20px;
  text-align: center;
  color: rgba(255,255,255,.3);
  font-size: 13px;
  font-style: italic;
}

.dash-health-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.dash-health-stat {
  padding: 16px 14px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.05);
  transition: background .15s;
}
.dash-health-stat:last-child { border-right: none; }
.dash-health-stat:hover { background: rgba(255,255,255,.03); }

.dash-health-stat-val {
  font-size: 22px;
  font-weight: 800;
  color: rgba(255,255,255,.92);
  line-height: 1;
  margin-bottom: 5px;
  font-variant-numeric: tabular-nums;
}

.dash-health-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,.35);
  font-weight: 500;
}

.dash-health-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 11.5px;
  color: rgba(255,255,255,.35);
  flex-wrap: wrap;
  gap: 8px;
}

.dash-health-running {
  display: inline-block;
  padding: 1px 7px;
  background: rgba(34,197,94,.18);
  color: #22c55e;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  animation: healthPulse 1.5s infinite;
}

@keyframes healthPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}

.dash-health-enroll-btn {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(99,102,241,.35);
  background: rgba(99,102,241,.12);
  color: #818cf8;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.dash-health-enroll-btn:hover {
  background: rgba(99,102,241,.22);
  color: #a5b4fc;
  border-color: rgba(99,102,241,.5);
}

/* ── KONVERSIONS-FUNNEL ───────────────────────────────────── */

.dash-funnel {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-funnel-step {
  display: grid;
  grid-template-columns: 100px 1fr 60px;
  align-items: center;
  gap: 10px;
}

.dash-funnel-bar-wrap {
  height: 8px;
  background: rgba(255,255,255,.06);
  border-radius: 4px;
  overflow: hidden;
}

.dash-funnel-bar {
  height: 100%;
  border-radius: 4px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
  min-width: 4px;
}

.dash-funnel-label {
  font-size: 11.5px;
  color: rgba(255,255,255,.5);
  font-weight: 500;
}

.dash-funnel-val {
  font-size: 13px;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ── 1-CLICK IMPORT → SEQUENCE MODAL ────────────────────────── */

.cr-seq-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.04);
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.cr-seq-option:hover {
  background: rgba(99,102,241,.1);
  border-color: rgba(99,102,241,.3);
}
.cr-seq-option.selected {
  background: rgba(99,102,241,.18);
  border-color: rgba(99,102,241,.55);
  box-shadow: 0 0 0 2px rgba(99,102,241,.15);
}

.cr-seq-option-body { flex: 1; min-width: 0; }
.cr-seq-option-name {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cr-seq-option-meta { font-size: 11.5px; color: rgba(255,255,255,.4); }

.cr-seq-option-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: transparent;
  transition: all .15s;
  flex-shrink: 0;
}
.cr-seq-option.selected .cr-seq-option-check {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

/* ── CONVERSION REPORT DASHBOARD ────────────────────────────── */

.conv-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.conv-kpi-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  transition: border-color .15s;
}
.conv-kpi-card:hover { border-color: rgba(99,102,241,.3); }
.conv-kpi-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.conv-kpi-val {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.conv-kpi-label {
  font-size: 11.5px;
  color: rgba(255,255,255,.45);
  font-weight: 500;
}

.conv-seq-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: border-color .15s;
}
.conv-seq-card:hover { border-color: rgba(99,102,241,.25); }

.conv-seq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.conv-seq-name {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,.9);
}
.conv-deal-value {
  font-size: 15px;
  font-weight: 800;
  color: #f59e0b;
}

.conv-funnel-bars { display: flex; flex-direction: column; gap: 7px; }

.conv-funnel-row {
  display: grid;
  grid-template-columns: 110px 1fr 80px;
  align-items: center;
  gap: 10px;
}
.conv-funnel-label {
  font-size: 12px;
  color: rgba(255,255,255,.45);
  white-space: nowrap;
}
.conv-funnel-track {
  height: 7px;
  background: rgba(255,255,255,.07);
  border-radius: 99px;
  overflow: hidden;
}
.conv-funnel-bar {
  height: 100%;
  border-radius: 99px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.conv-funnel-count {
  font-size: 12px;
  color: rgba(255,255,255,.6);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.conv-funnel-count em {
  font-style: normal;
  color: rgba(255,255,255,.3);
  margin-left: 4px;
}

/* ── A/B TESTING ────────────────────────────────────────────── */

.seq-ab-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(139, 92, 246, .18);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, .3);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  letter-spacing: .02em;
}

.seq-step-variant-b {
  color: #a78bfa !important;
  font-size: 12.5px !important;
  opacity: .7;
  margin-top: 2px;
}

/* A/B Toggle Switch */
.ab-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.ab-toggle-label input[type="checkbox"] { display: none; }
.ab-toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  background: rgba(255,255,255,.12);
  border-radius: 10px;
  transition: background .2s;
  flex-shrink: 0;
}
.ab-toggle-switch::after {
  content: '';
  position: absolute;
  left: 2px; top: 2px;
  width: 16px; height: 16px;
  background: rgba(255,255,255,.6);
  border-radius: 50%;
  transition: transform .2s, background .2s;
}
.ab-toggle-label input:checked + .ab-toggle-switch {
  background: #8b5cf6;
}
.ab-toggle-label input:checked + .ab-toggle-switch::after {
  transform: translateX(16px);
  background: #fff;
}
