/*
 * ════════════════════════════════════════════════════════════════════
 *  AKQUIX CRM — Contact Detail V3 (Premium Redesign)
 *  Referenz: UI-Mockup Mai 2026
 *
 *  Namensraum:  .v3-*
 *  Abhängigkeiten: tokens.css → layout.css → components.css → diese Datei
 *
 *  Architektur:
 *    .v3-outer          Full-page flex-row  (nav | page-shell)
 *    .v3-nav            Linke App-Navigation (~200px)
 *    .v3-page-shell     Restbreite, flex-column  (topbar | workspace)
 *    .v3-topbar         Breadcrumb + Actions
 *    .v3-workspace      3-spaltig: info-panel | main | right-sidebar
 *    .v3-contact-header Kontakt-Header-Card (oben im main)
 *    .v3-stats-row      5 KPI-Chips
 *    .v3-tabs-nav       Tab-Navigation
 *    .v3-composer       Notiz/Aktivität-Composer
 *    .v3-timeline       Aktivitätsverlauf
 *    .v3-right          Rechte Sidebar
 *    .v3-ki-card        KI-Empfehlungs-Karte
 * ════════════════════════════════════════════════════════════════════
 */

/* ══════════════════════════════════════════════════════════════
   1. PAGE SHELL — Outer Layout
══════════════════════════════════════════════════════════════ */

.v3-outer {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

/* ══════════════════════════════════════════════════════════════
   2. LEFT APP NAVIGATION SIDEBAR
══════════════════════════════════════════════════════════════ */

.v3-nav {
  width: 200px;
  min-width: 200px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  flex-shrink: 0;
  z-index: 200;
}

/* Logo Area */
.v3-nav-logo {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border2);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.v3-nav-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.v3-nav-logo-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.v3-nav-logo-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.v3-nav-logo-version {
  font-size: 9.5px;
  color: var(--t4);
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* Nav items */
.v3-nav-items {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.v3-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--t3);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
  text-decoration: none;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.1px;
}

.v3-nav-item:hover {
  background: var(--surface3);
  color: var(--t2);
}

.v3-nav-item.active {
  background: var(--brand-dim);
  color: var(--brand);
  font-weight: 600;
}

.v3-nav-item-ic {
  width: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0.75;
}

.v3-nav-item.active .v3-nav-item-ic {
  opacity: 1;
}

.v3-nav-divider {
  height: 1px;
  background: var(--border3);
  margin: 6px 10px;
}

/* Nav bottom: user info */
.v3-nav-user {
  padding: 12px 12px 14px;
  border-top: 1px solid var(--border2);
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  transition: background 0.1s;
  border-radius: 0;
  flex-shrink: 0;
}

.v3-nav-user:hover {
  background: var(--surface3);
}

.v3-nav-user-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.v3-nav-user-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v3-nav-user-info {
  flex: 1;
  min-width: 0;
}

.v3-nav-user-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-nav-user-role {
  font-size: 10px;
  color: var(--t4);
  font-weight: 400;
}

.v3-nav-user-chevron {
  color: var(--t4);
  font-size: 10px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   3. PAGE SHELL (rechte Seite)
══════════════════════════════════════════════════════════════ */

.v3-page-shell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════
   4. TOP BAR — Breadcrumb + Actions
══════════════════════════════════════════════════════════════ */

.v3-topbar {
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  flex-shrink: 0;
  z-index: 100;
}

/* Breadcrumb */
.v3-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.v3-breadcrumb-item {
  font-size: 12px;
  color: var(--t4);
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.12s;
}

.v3-breadcrumb-item:hover {
  color: var(--brand);
}

.v3-breadcrumb-sep {
  font-size: 10px;
  color: var(--t5);
  flex-shrink: 0;
}

.v3-breadcrumb-current {
  font-size: 12px;
  font-weight: 600;
  color: var(--t2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Topbar Actions */
.v3-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.v3-tb-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  height: 32px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--t2);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
  font-family: inherit;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.v3-tb-btn:hover {
  background: var(--surface3);
  border-color: var(--border2);
  color: var(--text);
}

.v3-tb-btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 1px 4px rgba(79,99,231,.22);
}

.v3-tb-btn--primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  box-shadow: 0 3px 10px rgba(79,99,231,.32);
  transform: translateY(-1px);
}

/* Notification Bell */
.v3-notif-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--t3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.14s ease;
  flex-shrink: 0;
}

.v3-notif-btn:hover {
  background: var(--surface3);
  color: var(--t2);
  border-color: var(--border2);
}

.v3-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  background: var(--c-red-tx);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 1.5px solid var(--surface);
}

.v3-topbar-user-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: border-color 0.14s;
  overflow: hidden;
}

.v3-topbar-user-av:hover {
  border-color: var(--brand);
}

.v3-save-indicator {
  display: none;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--t4);
  white-space: nowrap;
}

.v3-save-indicator.on { display: flex; }
.v3-save-indicator.ok { display: flex; color: var(--c-emerald); }

/* ══════════════════════════════════════════════════════════════
   5. MAIN WORKSPACE
══════════════════════════════════════════════════════════════ */

.v3-workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 300px;
  overflow: hidden;
}
@media(max-width:1280px){.v3-workspace{grid-template-columns:245px minmax(0,1fr) 285px}}
@media(max-width:1024px){.v3-workspace{grid-template-columns:225px minmax(0,1fr) 265px}}
@media(max-width:900px){.v3-workspace{grid-template-columns:1fr}.v3-info-panel,.v3-right{display:none}}

/* ══════════════════════════════════════════════════════════════
   6. LEFT INFO PANEL (Contact Fields — SF Engine)
══════════════════════════════════════════════════════════════ */

.v3-info-panel {
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ══════════════════════════════════════════════════════════════
   7. CENTER MAIN AREA
══════════════════════════════════════════════════════════════ */

.v3-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
  overflow: hidden;
}

/* ── Contact Header Card ── */
.v3-contact-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 18px 20px 14px;
  flex-shrink: 0;
}

.v3-ch-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.v3-ch-avatar {
  width: 62px;
  height: 62px;
  border-radius: 14px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  flex-shrink: 0;
}

.v3-ch-identity {
  flex: 1;
  min-width: 0;
}

.v3-ch-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 3px;
  word-break: break-word;
}

.v3-ch-company {
  font-size: 12.5px;
  color: var(--brand);
  font-weight: 500;
  margin-bottom: 8px;
  cursor: pointer;
  text-decoration: none;
}

.v3-ch-company:hover {
  text-decoration: underline;
}

.v3-ch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-bottom: 0;
}

.v3-ch-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--c-green-bg);
  color: var(--c-green-tx);
  border: 1px solid var(--c-green-bd);
}

.v3-ch-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 5px;
  flex-shrink: 0;
}

.v3-ch-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--surface3);
  color: var(--t3);
  border: 1px solid var(--border2);
  cursor: default;
}

.v3-ch-tag-add {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px dashed var(--border2);
  background: transparent;
  color: var(--t4);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: border-color 0.12s, color 0.12s;
}

.v3-ch-tag-add:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* Contact Details (right side of header) */
.v3-ch-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  min-width: 240px;
}

.v3-ch-detail-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.v3-ch-detail-val {
  font-size: 12.5px;
  color: var(--t2);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-ch-detail-val a {
  color: var(--t2);
  text-decoration: none;
}

.v3-ch-detail-val a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.v3-ch-detail-lbl {
  font-size: 9.5px;
  color: var(--t4);
  font-weight: 500;
  width: 60px;
  flex-shrink: 0;
  text-align: right;
}

.v3-ch-detail-ic {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--surface3);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  color: var(--t3);
}

/* Action buttons row */
.v3-ch-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  row-gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border3);
}

.v3-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 13px;
  height: 34px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
  font-family: inherit;
  letter-spacing: -0.01em;
}

.v3-action-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

/* SVGs ohne explizite Dimensionen würden auf Browser-Standard 300×150px fallen.
   Explizit begrenzen, damit kein Overflow in den Composer-Bereich entsteht. */
.v3-action-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.v3-action-btn--call {
  background: linear-gradient(145deg,#eff6ff,#dbeafe);
  border-color: #93c5fd;
  color: #1e40af;
}
.v3-action-btn--call:hover:not(:disabled) {
  background: linear-gradient(145deg,#dbeafe,#bfdbfe);
  border-color: #60a5fa;
  box-shadow: 0 3px 10px rgba(37,99,235,.18);
  transform: translateY(-1px);
}

.v3-action-btn--email {
  background: linear-gradient(145deg,#f5f3ff,#ede9fe);
  border-color: #c4b5fd;
  color: #3730a3;
}
.v3-action-btn--email:hover:not(:disabled) {
  background: linear-gradient(145deg,#ede9fe,#ddd6fe);
  border-color: #a78bfa;
  box-shadow: 0 3px 10px rgba(99,102,241,.18);
  transform: translateY(-1px);
}

.v3-action-btn--offer {
  background: linear-gradient(145deg,#fffbeb,#fef3c7);
  border-color: #fcd34d;
  color: #92400e;
}
.v3-action-btn--offer:hover:not(:disabled) {
  background: linear-gradient(145deg,#fef3c7,#fde68a);
  border-color: #f59e0b;
  box-shadow: 0 3px 10px rgba(217,119,6,.18);
  transform: translateY(-1px);
}

.v3-action-btn--reminder {
  background: linear-gradient(145deg,#fff7ed,#ffedd5);
  border-color: #fdba74;
  color: #c2410c;
}
.v3-action-btn--reminder:hover:not(:disabled) {
  background: linear-gradient(145deg,#ffedd5,#fed7aa);
  border-color: #fb923c;
  box-shadow: 0 3px 10px rgba(234,88,12,.18);
  transform: translateY(-1px);
}

.v3-action-btn--more {
  background: var(--surface3);
  border-color: var(--border);
  color: var(--t2);
}
.v3-action-btn--more:hover:not(:disabled) {
  background: var(--surface3);
  border-color: var(--border2);
}

/* ── Stats Row ── */
.v3-stats-row {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.v3-stat-chip {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 11px 16px 11px;
  border-right: 1px solid var(--border2);
  gap: 1px;
  cursor: default;
  transition: background 0.1s;
  min-width: 0;
}

.v3-stat-chip:last-child {
  border-right: none;
}

.v3-stat-chip:hover {
  background: var(--surface3);
}

.v3-stat-ic {
  font-size: 15px;
  margin-bottom: 2px;
  opacity: 0.7;
}

.v3-stat-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
}

.v3-stat-lbl {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--t3);
  line-height: 1.3;
}

.v3-stat-sub {
  font-size: 9.5px;
  color: var(--t4);
  line-height: 1.3;
}

/* ── Tab Navigation ── */
.v3-tabs-nav {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  gap: 0;
  flex-shrink: 0;
}

.v3-tab {
  padding: 11px 14px;
  border: none;
  border-bottom: 2.5px solid transparent;
  background: transparent;
  color: var(--t3);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
  white-space: nowrap;
  letter-spacing: -0.01em;
  font-family: inherit;
}

.v3-tab:hover {
  color: var(--t2);
}

.v3-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

/* ── Composer ── */
.v3-composer {
  padding: 14px 16px 0;
  flex-shrink: 0;
}

.v3-composer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.16s, box-shadow 0.16s;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.v3-composer-card:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.v3-composer-placeholder {
  padding: 12px 14px 4px;
  font-size: 13px;
  color: var(--t4);
  pointer-events: none;
}

.v3-composer-textarea {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  resize: none;
  outline: none;
  font-family: inherit;
  line-height: 1.65;
  min-height: 48px;
  max-height: 130px;
  overflow: auto;
  padding: 4px 14px 8px;
  display: block;
}

.v3-composer-textarea::placeholder {
  color: var(--t4);
}

.v3-composer-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-top: 1px solid var(--border3);
  background: var(--surface2);
}

.v3-ctbtn {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: var(--t3);
  font-size: 13px;
  cursor: pointer;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, color 0.1s;
  flex-shrink: 0;
  font-family: inherit;
}

.v3-ctbtn:hover {
  background: var(--surface3);
  color: var(--t2);
}

.v3-ctbtn-sep {
  width: 1px;
  height: 14px;
  background: var(--border);
  margin: 0 3px;
  flex-shrink: 0;
}

.v3-composer-save {
  margin-left: auto;
  padding: 6px 16px;
  border-radius: 7px;
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s, box-shadow 0.14s, transform 0.1s;
  font-family: inherit;
}

.v3-composer-save:hover {
  background: var(--brand-hover);
  box-shadow: 0 2px 8px rgba(79,99,231,.28);
  transform: translateY(-1px);
}

.v3-composer-save:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Timeline ── */
.v3-timeline-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.v3-tl-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 10px;
  flex-shrink: 0;
}

.v3-tl-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--t2);
  display: flex;
  align-items: center;
  gap: 7px;
}

.v3-tl-cnt {
  font-size: 11px;
  color: var(--t4);
  background: var(--surface);
  padding: 1px 8px;
  border-radius: 99px;
  border: 1px solid var(--border);
}

.v3-tl-sort {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--t3);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}

.v3-tl-sort:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* Timeline scroll container */
.v3-tl-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px 24px;
}

/* Event cards */
.v3-ev {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  margin-bottom: 5px;
  transition: border-color 0.12s, box-shadow 0.12s;
  position: relative;
}

.v3-ev:hover {
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
  border-color: var(--border);
}

.v3-ev:hover .v3-ev-acts {
  opacity: 1;
}

.v3-ev--call     { background: #eff6ff; border-color: #dbeafe; }
.v3-ev--email    { background: #f5f3ff; border-color: #ede9fe; }
.v3-ev--note     { background: #fafafa; border-color: #f1f5f9; }
.v3-ev--followup { background: #fdf4ff; border-color: #f3e8ff; }
.v3-ev--meeting  { background: #fff7ed; border-color: #ffedd5; }
.v3-ev--status   { background: #fffbeb; border-color: #fef3c7; }
.v3-ev--created  { background: #f0fdf4; border-color: #dcfce7; }
.v3-ev--default  { background: #f8fafc; border-color: #f1f5f9; }

/* Event icon badge */
.v3-ev-ic {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

.v3-ev--call .v3-ev-ic     { background: #dbeafe; }
.v3-ev--email .v3-ev-ic    { background: #ede9fe; }
.v3-ev--note .v3-ev-ic     { background: #e2e8f0; }
.v3-ev--followup .v3-ev-ic { background: #f3e8ff; }
.v3-ev--meeting .v3-ev-ic  { background: #ffedd5; }
.v3-ev--status .v3-ev-ic   { background: #fef3c7; }
.v3-ev--created .v3-ev-ic  { background: #dcfce7; }
.v3-ev--default .v3-ev-ic  { background: #f1f5f9; }

/* Event content */
.v3-ev-body {
  flex: 1;
  min-width: 0;
}

.v3-ev-row1 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.v3-ev-type {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--t2);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-ev-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.v3-ev-time {
  font-size: 10.5px;
  color: var(--t4);
  white-space: nowrap;
}

.v3-ev-user {
  font-size: 10.5px;
  color: var(--brand);
  font-weight: 600;
  white-space: nowrap;
  opacity: 0.8;
}

.v3-ev-desc {
  font-size: 12.5px;
  color: var(--t2);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Edit/Delete actions */
.v3-ev-acts {
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.14s;
  flex-shrink: 0;
  padding-top: 1px;
}

.v3-ev-act-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
  color: var(--t4);
  font-size: 12px;
}

.v3-ev-act-btn--edit:hover {
  background: var(--brand-dim);
  border-color: var(--brand-ring);
  color: var(--brand);
}

.v3-ev-act-btn--delete:hover {
  background: var(--c-red-bg);
  border-color: var(--c-red-bd);
  color: var(--c-red-tx);
}

/* Load more button */
.v3-tl-load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 1.5px dashed var(--border2);
  border-radius: 10px;
  background: transparent;
  color: var(--t3);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s;
  width: 100%;
  margin-top: 4px;
  font-family: inherit;
}

.v3-tl-load-more:hover {
  background: var(--surface);
  border-color: var(--brand);
  color: var(--brand);
}

/* Empty state */
.v3-tl-zero {
  padding: 40px 0;
  text-align: center;
  color: var(--t4);
}

.v3-tl-zero-ic {
  font-size: 32px;
  display: block;
  margin-bottom: 10px;
  opacity: 0.3;
}

.v3-tl-zero-t {
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin-bottom: 3px;
}

.v3-tl-zero-s {
  font-size: 11.5px;
  opacity: 0.7;
}

/* ══════════════════════════════════════════════════════════════
   8. RIGHT SIDEBAR
══════════════════════════════════════════════════════════════ */

.v3-right {
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ── Rechte Sidebar: Tab-Leiste ── */
.v3-rs-tabs {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 2;
}

.v3-rs-tab {
  flex: 1;
  padding: 0 6px;
  height: 38px;
  border: none;
  background: transparent;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--t3);
  cursor: pointer;
  letter-spacing: -0.1px;
  border-bottom: 2px solid transparent;
  transition: color 0.13s, border-color 0.13s;
  white-space: nowrap;
  font-family: inherit;
  margin-bottom: -1px;
}

.v3-rs-tab:hover {
  color: var(--text);
  background: var(--surface3);
}

.v3-rs-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  background: transparent;
}

/* Panel je Tab */
.v3-rs-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.v3-rs-panel-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 6px;
  border-bottom: 1px solid var(--border3);
  font-size: 10.5px;
}

.v3-rs-panel-status-lbl {
  font-size: 10px;
  color: var(--t4);
  font-weight: 500;
}

/* Sidebar Section (Legacy-Kompatibilität) */
.v3-rs {
  border-bottom: 1px solid var(--border2);
  flex-shrink: 0;
}

.v3-rs:last-child {
  border-bottom: none;
}

.v3-rs-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--border3);
}

.v3-rs-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--t2);
  letter-spacing: -0.1px;
}

.v3-rs-action {
  font-size: 10.5px;
  color: var(--brand);
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}

.v3-rs-action:hover {
  text-decoration: underline;
}

.v3-rs-body {
  padding: 8px 10px 12px;
}

/* ── Pipeline stages ── */
.v3-pip {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.v3-pi {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  color: var(--t3);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
  width: 100%;
  background: var(--surface);
  text-align: left;
  font-family: inherit;
}

.v3-pi:hover {
  background: var(--surface3);
  color: var(--t2);
}

.v3-pi-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.v3-pi-lbl {
  flex: 1;
}

.v3-pi-ck {
  font-size: 10px;
  color: currentColor;
  opacity: 0;
  transition: opacity 0.14s;
}

.v3-pi.active .v3-pi-ck {
  opacity: 1;
}

/* Pipeline color variants — same data-s values as existing */
.v3-pi[data-s="1x erreicht"]:hover,
.v3-pi[data-s="1x erreicht"].active {
  background: var(--c-blue-bg);
  border-color: var(--c-blue-bd);
  color: var(--c-blue-tx);
}
.v3-pi[data-s="1x erreicht"] .v3-pi-dot { background: #3b82f6; }

.v3-pi[data-s="2x nicht erreicht"]:hover,
.v3-pi[data-s="2x nicht erreicht"].active {
  background: var(--c-amber-bg);
  border-color: var(--c-amber-bd);
  color: var(--c-amber-tx);
}
.v3-pi[data-s="2x nicht erreicht"] .v3-pi-dot { background: #f59e0b; }

.v3-pi[data-s="3x nicht erreicht"]:hover,
.v3-pi[data-s="3x nicht erreicht"].active {
  background: var(--c-orange-bg);
  border-color: var(--c-orange-bd);
  color: var(--c-orange-tx);
}
.v3-pi[data-s="3x nicht erreicht"] .v3-pi-dot { background: #f97316; }

.v3-pi[data-s="Rückruf angeboten"]:hover,
.v3-pi[data-s="Rückruf angeboten"].active {
  background: var(--c-violet-bg);
  border-color: var(--c-violet-bd);
  color: var(--c-violet-tx);
}
.v3-pi[data-s="Rückruf angeboten"] .v3-pi-dot { background: #8b5cf6; }

.v3-pi[data-s="Wiedervorlage"]:hover,
.v3-pi[data-s="Wiedervorlage"].active {
  background: var(--c-pink-bg);
  border-color: var(--c-pink-bd);
  color: var(--c-pink-tx);
}
.v3-pi[data-s="Wiedervorlage"] .v3-pi-dot { background: #ec4899; }

.v3-pi[data-s="Infomail"]:hover,
.v3-pi[data-s="Infomail"].active {
  background: var(--c-slate-bg);
  border-color: var(--c-slate-bd);
  color: var(--c-slate-tx);
}
.v3-pi[data-s="Infomail"] .v3-pi-dot { background: #64748b; }

.v3-pi[data-s="Termin"]:hover,
.v3-pi[data-s="Termin"].active {
  background: var(--c-green-bg);
  border-color: var(--c-green-bd);
  color: var(--c-green-tx);
}
.v3-pi[data-s="Termin"] .v3-pi-dot { background: #10b981; }

.v3-pi[data-s="Kein Interesse"]:hover,
.v3-pi[data-s="Kein Interesse"].active {
  background: var(--c-red-bg);
  border-color: var(--c-red-bd);
  color: var(--c-red-tx);
}
.v3-pi[data-s="Kein Interesse"] .v3-pi-dot { background: #ef4444; }

.v3-pi[data-s="Nicht relevant"]:hover,
.v3-pi[data-s="Nicht relevant"].active {
  background: var(--surface3);
  border-color: var(--border2);
  color: var(--t4);
}
.v3-pi[data-s="Nicht relevant"] .v3-pi-dot { background: #94a3b8; }

/* ── Next Steps ── */
.v3-next-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v3-next-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.v3-next-step-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
  margin-top: 5px;
}

.v3-next-step-body {
  flex: 1;
  min-width: 0;
}

.v3-next-step-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--t2);
  margin-bottom: 1px;
}

.v3-next-step-due {
  font-size: 10.5px;
  color: var(--t4);
}

.v3-next-step-due.overdue {
  color: var(--c-red-tx);
  font-weight: 600;
}

.v3-all-tasks-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 2px;
  font-size: 11px;
  color: var(--brand);
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  border: none;
  background: transparent;
  font-family: inherit;
  width: 100%;
}

.v3-all-tasks-link:hover {
  text-decoration: underline;
}

/* ── KI Card ── */
.v3-ki-card {
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin: 0;
  color: var(--text);
  display: flex;
  flex-direction: column;
}

.v3-ki-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.1px;
  border-bottom: 1px solid var(--border3);
}

.v3-ki-icon {
  font-size: 15px;
  flex-shrink: 0;
}

.v3-ki-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.1px;
}

.v3-ki-text {
  font-size: 12.5px;
  color: var(--t2);
  line-height: 1.6;
  padding: 12px 16px 10px;
  margin: 0;
}

.v3-ki-highlight {
  font-weight: 700;
  color: var(--text);
}

.v3-ki-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--brand-dim);
  border: 1.5px solid var(--brand-ring);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
  font-family: inherit;
  width: calc(100% - 32px);
  margin: 4px 16px 14px;
  justify-content: center;
}

.v3-ki-cta:hover {
  background: rgba(79,99,231,.14);
  border-color: var(--brand);
}

/* ── Quick Actions ── */
.v3-qa-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.v3-qa-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--t2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.v3-qa-btn:hover {
  background: var(--surface3);
  color: var(--brand);
}

.v3-qa-btn-arrow {
  color: var(--t4);
  font-size: 12px;
  flex-shrink: 0;
  transition: color 0.1s, transform 0.12s;
}

.v3-qa-btn:hover .v3-qa-btn-arrow {
  color: var(--brand);
  transform: translateX(2px);
}

/* ══════════════════════════════════════════════════════════════
   9. CONTEXT STRIP (mini KPIs below composer)
══════════════════════════════════════════════════════════════ */

/* Keep existing .cctx-* classes for JS compatibility */
.cctx-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0;
  padding: 0;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border2);
  background: var(--surface);
}

.cctx-chip {
  padding: 9px 14px;
  border-right: 1px solid var(--border2);
  cursor: default;
}

.cctx-chip:last-child {
  border-right: none;
}

.cctx-lbl {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--t4);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 2px;
}

.cctx-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.cctx-sub {
  font-size: 9.5px;
  color: var(--t4);
  margin-top: 1px;
}

.cctx-chip.ki-rec {
  background: linear-gradient(145deg, var(--c-violet-bg), #f0eeff);
}

/* ══════════════════════════════════════════════════════════════
   10. RESPONSIVE
══════════════════════════════════════════════════════════════ */

@media (max-width: 1440px) {
  .v3-workspace { grid-template-columns: 210px minmax(0, 1fr) 270px; }
  .v3-nav { width: 185px; min-width: 185px; }
}

@media (max-width: 1280px) {
  .v3-workspace { grid-template-columns: 200px minmax(0, 1fr) 250px; }
  .v3-nav { width: 175px; min-width: 175px; }
  .v3-ch-details { min-width: 200px; }
}

@media (max-width: 1100px) {
  .v3-workspace { grid-template-columns: minmax(0, 1fr) 240px; }
  .v3-info-panel { display: none; }
  .v3-nav { width: 160px; min-width: 160px; }
}

@media (max-width: 900px) {
  .v3-workspace { grid-template-columns: 1fr; }
  .v3-right { display: none; }
  .v3-nav { display: none; }
  .v3-ch-top { flex-wrap: wrap; }
  .v3-ch-details { min-width: 0; width: 100%; }
}

@media (max-width: 640px) {
  .v3-contact-header { padding: 14px 14px 10px; }
  .v3-stats-row { overflow-x: auto; }
  .v3-stat-chip { min-width: 90px; }
  .v3-topbar { padding: 0 12px; }
  .v3-topbar .v3-breadcrumb { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   11. TOAST
══════════════════════════════════════════════════════════════ */

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 9999;
  padding: 10px 20px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--text);
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  animation: toastIn 0.2s cubic-bezier(.34,1.4,.64,1);
}

@keyframes toastIn {
  from { transform: translateX(-50%) translateY(12px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}

.toast.success { background: var(--c-green-tx); }
.toast.error   { background: var(--c-red-tx); }
.toast.info    { background: var(--brand); }
.toast.warning { background: var(--c-amber-tx); }

/* ══════════════════════════════════════════════════════════════
   12. IMPERSONATION BANNER (veraltet — ersetzt durch imp-badge.js)
══════════════════════════════════════════════════════════════ */

/* #cdImpersonationBanner Regeln entfernt — kein Layout-Shift mehr */

/* ══════════════════════════════════════════════════════════════
   13. TIMELINE GROUP HEADERS (V3 override)
══════════════════════════════════════════════════════════════ */

.v3-tl-group-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px 5px;
  cursor: pointer;
  user-select: none;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  margin-bottom: 4px;
  border-radius: 6px;
  transition: background 0.1s;
}

.v3-tl-group-hdr:hover {
  background: rgba(0,0,0,.03);
}

.v3-tl-group-arrow {
  font-size: 8px;
  color: var(--t4);
  transition: transform 0.2s;
  flex-shrink: 0;
  width: 10px;
  text-align: center;
}

.v3-tl-group-hdr.open .v3-tl-group-arrow {
  transform: rotate(90deg);
}

.v3-tl-group-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  flex: 1;
}

.v3-tl-group-cnt {
  font-size: 10px;
  color: var(--t4);
  background: var(--bg);
  padding: 1px 7px;
  border-radius: 9px;
  border: 1px solid var(--border);
  font-weight: 500;
}

.v3-tl-group-body {
  overflow: hidden;
  transition: max-height 0.25s cubic-bezier(.4,0,.2,1), opacity 0.2s;
  max-height: 0;
  opacity: 0;
}

.v3-tl-group-body.open {
  max-height: 8000px;
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════════
   14. WIEDERVORLAGE POPUP (unchanged class names for JS compat)
══════════════════════════════════════════════════════════════ */

/* Already defined in contact-detail.html, keeping here
   as a reference anchor. Override only if needed. */

/* ══════════════════════════════════════════════════════════════
   15. STATUS BADGE VARIANTS (v3 header)
══════════════════════════════════════════════════════════════ */

.v3-ch-status--neu              { background: var(--surface3);     color: var(--t3);          border-color: var(--border); }
.v3-ch-status--neu::before      { background: var(--t4); }
.v3-ch-status--1x               { background: var(--c-blue-bg);   color: var(--c-blue-tx);   border-color: var(--c-blue-bd); }
.v3-ch-status--1x::before       { background: #3b82f6; }
.v3-ch-status--2x               { background: var(--c-amber-bg);  color: var(--c-amber-tx);  border-color: var(--c-amber-bd); }
.v3-ch-status--2x::before       { background: #f59e0b; }
.v3-ch-status--3x               { background: var(--c-orange-bg); color: var(--c-orange-tx); border-color: var(--c-orange-bd); }
.v3-ch-status--3x::before       { background: #f97316; }
.v3-ch-status--rueckruf         { background: var(--c-violet-bg); color: var(--c-violet-tx); border-color: var(--c-violet-bd); }
.v3-ch-status--rueckruf::before { background: #8b5cf6; }
.v3-ch-status--wiedervorlage    { background: var(--c-pink-bg);   color: var(--c-pink-tx);   border-color: var(--c-pink-bd); }
.v3-ch-status--wiedervorlage::before { background: #ec4899; }
.v3-ch-status--infomail         { background: var(--c-slate-bg);  color: var(--c-slate-tx);  border-color: var(--c-slate-bd); }
.v3-ch-status--infomail::before { background: #64748b; }
.v3-ch-status--termin           { background: var(--c-green-bg);  color: var(--c-green-tx);  border-color: var(--c-green-bd); }
.v3-ch-status--termin::before   { background: #10b981; }
.v3-ch-status--kein-interesse   { background: var(--c-red-bg);    color: var(--c-red-tx);    border-color: var(--c-red-bd); }
.v3-ch-status--kein-interesse::before { background: #ef4444; }
.v3-ch-status--nicht-relevant   { background: var(--surface3);    color: var(--t4);          border-color: var(--border2); }
.v3-ch-status--nicht-relevant::before { background: #94a3b8; }

/* ══════════════════════════════════════════════════════════════
   16. FEATURE LOCK OVERLAY
══════════════════════════════════════════════════════════════ */

.cd-feature-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(242,244,248,0.85);
  backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 10;
  border-radius: inherit;
}

.cd-feature-lock-icon {
  font-size: 24px;
  opacity: 0.5;
}

.cd-feature-lock-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--t3);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   V3 TEMPLATE ALIASES & ADDITIONS
   Klassen die im contact-detail-v3.html verwendet werden
   und im ursprünglichen crm-contact-v2.css fehlten.
═══════════════════════════════════════════════════════════ */

/* Body class */
.v3-body { overflow: hidden; height: 100vh; }

/* Breadcrumb aliases (.v3-bc-*) */
.v3-bc-ic { width: 14px; height: 14px; flex-shrink: 0; color: var(--t4); }
.v3-bc-link { font-size: 12px; color: var(--t3); text-decoration: none; transition: color .15s; }
.v3-bc-link:hover { color: var(--brand); }
.v3-bc-sep { font-size: 12px; color: var(--t4); }
.v3-bc-cur { font-size: 12px; color: var(--text); font-weight: 600; }

/* Topbar actions + nav */
.v3-tb-actions { display: flex; align-items: center; gap: 8px; }
.v3-tb-nav { display: flex; align-items: center; gap: 4px; }
.v3-tb-nav-btn { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface2); color: var(--t3); font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--t); }
.v3-tb-nav-btn:hover:not(:disabled) { background: var(--surface3); color: var(--text); }
.v3-tb-nav-btn:disabled { opacity: .4; cursor: not-allowed; }
.v3-tb-nav-pos { font-size: 11px; color: var(--t4); min-width: 28px; text-align: center; }
.v3-topbar-user { display: flex; align-items: center; gap: 6px; padding: 0 8px; height: 32px; border-radius: 8px; text-decoration: none; color: var(--text); transition: background .15s; cursor: pointer; }
.v3-topbar-user:hover { background: var(--surface3); }
.v3-topbar-user-name { font-size: 12px; color: var(--t2); font-weight: 500; }

/* Nav brand */
.v3-nav-brand { display: flex; align-items: center; gap: 10px; padding: 16px 14px 12px; flex-shrink: 0; }
.v3-nav-brand-name { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.2; }
.v3-nav-brand-ver { font-size: 10px; color: var(--t4); margin-top: 1px; }

/* Nav item icon and label aliases */
.v3-nav-ic { width: 18px; height: 18px; flex-shrink: 0; }
.v3-nav-lbl { font-size: 12.5px; font-weight: 500; }

/* Nav user chevron alias */
.v3-nav-user-chev { width: 14px; height: 14px; color: var(--t4); margin-left: auto; flex-shrink: 0; }

/* Contact header badges */
.v3-ch-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.v3-ch-tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px; background: var(--surface3); border: 1px solid var(--border); font-size: 10.5px; color: var(--t2); }

/* Stats body */
.v3-stat-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* Right sidebar header meta */
.v3-rs-hdr-meta { font-size: 11px; color: var(--t3); font-weight: 500; }

/* Next steps */
.v3-next-steps-empty { font-size: 11.5px; color: var(--t4); padding: 8px 0; text-align: center; }
.v3-ns-ic { font-size: 13px; flex-shrink: 0; }
.v3-ns-txt { font-size: 12px; color: var(--t2); flex: 1; min-width: 0; line-height: 1.4; }
.v3-next-step { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border2); }
.v3-next-step:last-child { border-bottom: none; }
.v3-next-step--overdue .v3-ns-txt { color: var(--c-red-tx); }

/* Composer tabs and toolbar */
.v3-composer-tabs { display: flex; gap: 4px; padding: 10px 12px 0; flex-wrap: wrap; }
.v3-ctool-group { display: flex; align-items: center; gap: 2px; }
.v3-ctool-sep { width: 1px; height: 14px; background: var(--border); margin: 0 4px; flex-shrink: 0; }
.v3-ctool-spacer { flex: 1; }

/* Timeline sort button */
.v3-tl-sort-btn { padding: 3px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface2); font-size: 11px; color: var(--t3); cursor: pointer; transition: var(--t); flex-shrink: 0; }
.v3-tl-sort-btn:hover { background: var(--surface3); color: var(--text); }

/* KI section id targets */
#v3KiSection .v3-ki-card { display: flex; flex-direction: column; gap: 0; }
#v3RsPanel-ki .v3-rs-body { padding: 0; }

/* Stat chip overdue state */
.v3-stat-chip--overdue { border-color: var(--c-red-bd) !important; background: var(--c-red-bg) !important; }
.v3-stat-chip--overdue .v3-stat-val { color: var(--c-red-tx) !important; }

/* ═════════════════════════════════════════════════════════════════
   Sprint 14 – Premium Color & Visual Depth
   Ziel: Attio/Linear-Optik – lebendig, fokussiert, vertrauenswürdig
═════════════════════════════════════════════════════════════════ */

/* V3 stat chips — hover elevation + pointer cursor */
.v3-stat-chip {
  transition: background 0.14s ease, transform 0.12s ease, box-shadow 0.12s ease;
  cursor: pointer;
}
.v3-stat-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(0,0,0,.09);
}

/* Chip 1: Letzter Kontakt → Sky Blue */
.v3-stats-row > .v3-stat-chip:nth-child(1) {
  background: linear-gradient(160deg, #f0f9ff 0%, #e0f2fe 100%);
  border-right-color: #bae6fd;
}
.v3-stats-row > .v3-stat-chip:nth-child(1) .v3-stat-ic { color: #0284c7; opacity: 1; }
.v3-stats-row > .v3-stat-chip:nth-child(1) .v3-stat-val { color: #075985; }
.v3-stats-row > .v3-stat-chip:nth-child(1):hover { background: linear-gradient(160deg, #e0f2fe 0%, #bae6fd 100%); }

/* Chip 2: E-Mails → Violet */
.v3-stats-row > .v3-stat-chip:nth-child(2) {
  background: linear-gradient(160deg, #faf5ff 0%, #f5f3ff 100%);
  border-right-color: #e9d5ff;
}
.v3-stats-row > .v3-stat-chip:nth-child(2) .v3-stat-ic { color: #7c3aed; opacity: 1; }
.v3-stats-row > .v3-stat-chip:nth-child(2) .v3-stat-val { color: #6d28d9; }
.v3-stats-row > .v3-stat-chip:nth-child(2):hover { background: linear-gradient(160deg, #f5f3ff 0%, #ede9fe 100%); }

/* Chip 3: Anrufe → Indigo Blue */
.v3-stats-row > .v3-stat-chip:nth-child(3) {
  background: linear-gradient(160deg, #eff6ff 0%, #dbeafe 100%);
  border-right-color: #bfdbfe;
}
.v3-stats-row > .v3-stat-chip:nth-child(3) .v3-stat-ic { color: #2563eb; opacity: 1; }
.v3-stats-row > .v3-stat-chip:nth-child(3) .v3-stat-val { color: #1d4ed8; }
.v3-stats-row > .v3-stat-chip:nth-child(3):hover { background: linear-gradient(160deg, #dbeafe 0%, #bfdbfe 100%); }

/* Chip 4: Aktivitäten → Emerald */
.v3-stats-row > .v3-stat-chip:nth-child(4) {
  background: linear-gradient(160deg, #f0fdf4 0%, #dcfce7 100%);
  border-right-color: #bbf7d0;
}
.v3-stats-row > .v3-stat-chip:nth-child(4) .v3-stat-ic { color: #059669; opacity: 1; }
.v3-stats-row > .v3-stat-chip:nth-child(4) .v3-stat-val { color: #065f46; }
.v3-stats-row > .v3-stat-chip:nth-child(4):hover { background: linear-gradient(160deg, #dcfce7 0%, #bbf7d0 100%); }

/* Contact header — subtle depth elevation */
.v3-contact-header { box-shadow: 0 2px 10px rgba(0,0,0,.04); }

/* Pipeline active stage — stronger visual pop */
.v3-pi.active { font-weight: 700; box-shadow: 0 1px 8px rgba(0,0,0,.1); }

/* Quick-action buttons — brand accent on hover */
.v3-qa-btn:hover { background: var(--brand-dim); }

/* Timeline group headers — subtle surface tint */
.v3-tl-title { font-size: 12px; font-weight: 700; color: var(--t2); }

/* Composer card — slightly richer shadow */
.v3-composer-card { box-shadow: 0 2px 10px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04); }
