/* ============================================================
   Apollon – Design System
   ============================================================ */

/* Inter font loaded via <link> in index.html to avoid render-blocking @import */

/* ── Tokens ── */
:root {
  --bg-base: #080c14;
  --bg-card: #0e1420;
  --bg-card2: #121928;
  --bg-hover: #1a2236;
  --bg-input: #0d1322;
  --border: #1e2d4a;
  --border-light: #243554;

  --primary: #6366f1;
  --primary-dark: #4f52d0;
  --primary-glow: rgba(99, 102, 241, 0.35);
  --accent: #06b6d4;
  --accent-glow: rgba(6, 182, 212, 0.25);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #a78bfa;

  /* Hyperscaler */
  --aws: #ff9900;
  --azure: #0078d4;
  --gcp: #34a853;
  --ovh: #123f6d;
  --stackit: #e5007d;
  --multi: #8b5cf6;

  /* Status */
  --lead: #64748b;
  --qualification: #f59e0b;
  --proposal: #6366f1;
  --won: #10b981;
  --lost: #ef4444;
  --running: #06b6d4;

  --text-1: #f0f4ff;
  --text-2: #94a3b8;
  --text-3: #64748b;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --transition: 0.2s cubic-bezier(.4, 0, .2, 1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .4);
  --shadow: 0 4px 20px rgba(0, 0, 0, .5);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, .7);

  /* adesso Brand Colors (Ticket 5.1) */
  --adesso-blue: #006EC7;
  --adesso-lila: #461EBE;
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-1);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 99px;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.app-wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0 0 20px;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.sidebar-logo .logo-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  object-fit: contain;
}

.sidebar-logo .logo-text {
  font-family: 'Fira Sans', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.3;
}

.sidebar-logo .logo-text span {
  display: block;
  font-family: 'Fira Sans', sans-serif;
  color: var(--text-2);
  font-weight: 400;
  font-size: .72rem;
}

nav .nav-section-label {
  font-size: .65rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 14px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  margin: 2px 8px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-1);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, .18), rgba(99, 102, 241, .06));
  color: var(--primary);
  border-left: 2px solid var(--primary);
  margin-left: 8px;
  padding-left: 18px;
}

.nav-item .nav-icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 20px 0;
  border-top: 1px solid var(--border);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-logout {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 14px;
  transition: all var(--transition);
  margin-left: auto;
}

.btn-logout:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.user-info {
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.3;
}

.user-info span {
  display: block;
  font-size: .7rem;
  color: var(--text-3);
  font-weight: 400;
}

/* ── Main ── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 700;
  flex: 1;
}

.topbar-title span {
  color: var(--text-3);
  font-weight: 400;
  font-size: .85rem;
  margin-left: 8px;
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

/* ============================================================
   COMPONENTS
   ============================================================ */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 12px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-1);
  border: 1px solid var(--border-light);
}

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

.btn-ghost {
  color: var(--text-2);
  padding: 7px 12px;
}

.btn-ghost:hover {
  color: var(--text-1);
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
}

.btn-sm {
  padding: 5px 12px;
  font-size: .78rem;
}

.btn-danger {
  background: rgba(239, 68, 68, .15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, .3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, .25);
}

.btn-success {
  background: rgba(16, 185, 129, .15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, .3);
}

.btn-icon {
  padding: 7px;
  border-radius: var(--radius-sm);
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--border-light);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title {
  font-size: .95rem;
  font-weight: 700;
}

.card-subtitle {
  font-size: .78rem;
  color: var(--text-2);
  margin-top: 2px;
}

/* ── KPI Cards ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--kpi-color, var(--primary));
  border-radius: 2px 2px 0 0;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-light);
}

.kpi-icon {
  font-size: 1.4rem;
  margin-bottom: 10px;
  display: block;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
}

.kpi-label {
  font-size: .75rem;
  color: var(--text-2);
  font-weight: 500;
}

.kpi-delta {
  font-size: .72rem;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi-delta.positive {
  color: var(--success);
}

.kpi-delta.negative {
  color: var(--danger);
}

.kpi-delta.neutral {
  color: var(--text-3);
}

/* ── Badges / Tags ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 600;
}

.badge-aws {
  background: rgba(255, 153, 0, .15);
  color: var(--aws);
  border: 1px solid rgba(255, 153, 0, .3);
}

.badge-azure {
  background: rgba(0, 120, 212, .15);
  color: #4da8e8;
  border: 1px solid rgba(0, 120, 212, .3);
}

.badge-gcp {
  background: rgba(52, 168, 83, .15);
  color: #4ade80;
  border: 1px solid rgba(52, 168, 83, .3);
}

.badge-multi {
  background: rgba(139, 92, 246, .15);
  color: var(--purple);
  border: 1px solid rgba(139, 92, 246, .3);
}

.badge-ovh {
  background: rgba(18, 63, 109, .2);
  color: #5b9bd5;
  border: 1px solid rgba(18, 63, 109, .4);
}

.badge-stackit {
  background: rgba(229, 0, 125, .15);
  color: #e5007d;
  border: 1px solid rgba(229, 0, 125, .3);
}

/* Portfolio badges — CC-based color families */
.badge-pf { font-size: .72rem; padding: 2px 8px; border-radius: 10px; }
.badge-pf.cc-advisory    { background: rgba(99, 102, 241, .15); color: var(--primary); border: 1px solid rgba(99, 102, 241, .25); }
.badge-pf.cc-infra       { background: rgba(16, 185, 129, .15); color: var(--success); border: 1px solid rgba(16, 185, 129, .25); }
.badge-pf.cc-app2cloud   { background: rgba(245, 158, 11, .15); color: var(--warning); border: 1px solid rgba(245, 158, 11, .25); }
.badge-pf.cc-platforms   { background: rgba(139, 92, 246, .15); color: #a78bfa;        border: 1px solid rgba(139, 92, 246, .25); }
.badge-pf.cc-integration { background: rgba(6, 182, 212, .15);  color: var(--accent);  border: 1px solid rgba(6, 182, 212, .25); }
.badge-pf.cc-default     { background: rgba(107, 114, 128, .15); color: var(--text-2); border: 1px solid rgba(107, 114, 128, .25); }

.portfolio-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
}

.portfolio-cc-group { margin-bottom: 4px; }
.portfolio-cc-header { font-size: .78rem; font-weight: 600; color: var(--text-2); margin-bottom: 4px; padding-bottom: 2px; border-bottom: 1px solid var(--border); }
.portfolio-cc-items { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.portfolio-cc-items label { display: flex; align-items: center; gap: 6px; font-size: .82rem; cursor: pointer; }

.badge-lead {
  background: rgba(100, 116, 139, .15);
  color: var(--lead);
}

.badge-qualification {
  background: rgba(245, 158, 11, .15);
  color: var(--warning);
}

.badge-proposal {
  background: rgba(99, 102, 241, .15);
  color: var(--primary);
}

.badge-won {
  background: rgba(16, 185, 129, .15);
  color: var(--success);
}

.badge-lost {
  background: rgba(239, 68, 68, .15);
  color: var(--danger);
}

.badge-running {
  background: rgba(6, 182, 212, .15);
  color: var(--accent);
}

/* ── FTE Bar ── */
.fte-bar-wrap {
  margin-top: 6px;
}

.fte-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--text-2);
  margin-bottom: 5px;
}

.fte-bar-track {
  background: var(--border);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
}

.fte-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .5s ease;
}

.fte-bar-fill.green {
  background: linear-gradient(90deg, var(--success), #34d399);
}

.fte-bar-fill.yellow {
  background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.fte-bar-fill.red {
  background: linear-gradient(90deg, var(--danger), #f87171);
}

/* ── Consultant Matching ── */
#matching-container {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  max-height: 340px;
  overflow-y: auto;
}

.matching-placeholder {
  font-size: .78rem;
  color: var(--text-2);
  text-align: center;
  padding: 16px;
}

.match-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  margin-bottom: 6px;
  transition: border-color .2s;
}

.match-card:hover { border-color: var(--primary); }
.match-card.assigned { border-color: var(--success); }

.match-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.match-info { flex: 1; min-width: 0; }
.match-name { font-size: .82rem; font-weight: 600; }
.match-role { font-size: .7rem; color: var(--text-2); }

.match-score-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}

.match-score-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  min-width: 50px;
}

.match-score-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .4s ease;
}

.match-score-fill.high { background: linear-gradient(90deg, var(--success), #34d399); }
.match-score-fill.medium { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.match-score-fill.low { background: linear-gradient(90deg, var(--danger), #f87171); }

.match-score-label {
  font-size: .72rem;
  font-weight: 700;
  min-width: 32px;
  text-align: right;
}

.match-assign-btn {
  padding: 3px 10px;
  font-size: .7rem;
  border-radius: 4px;
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}

.match-assign-btn:hover { background: var(--primary); color: #fff; }

.match-assignment-fields {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 8px 50px;
  border-top: 1px solid var(--border);
  font-size: .72rem;
}
.match-assignment-fields label { color: var(--text-2); font-size: .7rem; }
.match-assignment-fields input {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-1);
  padding: 3px 7px;
  font-size: .72rem;
}
.match-role-input { width: 110px; }
.match-fte-input { width: 60px; }

.match-unassign-btn {
  padding: 3px 10px;
  font-size: .7rem;
  border-radius: 4px;
  border: 1px solid var(--success);
  background: var(--success)22;
  color: var(--success);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  transition: all .2s;
}
.match-unassign-btn:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

/* Score Breakdown (collapsible) */
.match-breakdown {
  display: none;
  padding: 8px 10px 10px 50px;
  border-top: 1px solid var(--border);
  font-size: .72rem;
}

.match-breakdown.open { display: block; }

.match-breakdown-title {
  font-weight: 700;
  color: var(--accent);
  font-size: .7rem;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.match-breakdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.match-breakdown-label {
  min-width: 120px;
  color: var(--text-2);
  font-size: .7rem;
}

.match-mini-bar-track {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.match-mini-bar-fill {
  height: 100%;
  border-radius: 99px;
}

.match-mini-bar-fill.high { background: var(--success); }
.match-mini-bar-fill.medium { background: var(--warning); }
.match-mini-bar-fill.low { background: var(--danger); }

.match-breakdown-value {
  min-width: 24px;
  text-align: right;
  font-weight: 600;
  color: var(--text-1);
}

.match-breakdown-detail {
  font-size: .65rem;
  color: var(--text-3);
  margin-bottom: 6px;
  padding-left: 128px;
}

.match-breakdown-total {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  font-size: .72rem;
  color: var(--text-1);
}

/* ── Sort Toggle Bar (HF2.4) ── */
#matching-sort-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  padding: 2px;
  background: var(--bg-base);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.match-sort-btn {
  flex: 1;
  padding: 4px 8px;
  font-size: .7rem;
  font-weight: 500;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all .2s;
}
.match-sort-btn:hover { color: var(--text-1); background: var(--border); }
.match-sort-btn.active { background: var(--primary); color: #fff; font-weight: 600; }

/* ── Dual Score Bars (HF2.4) ── */
.match-dual-scores {
  display: flex;
  gap: 12px;
  padding: 6px 10px 2px 50px;
}

.match-score-col { flex: 1; min-width: 0; }

.match-score-label-sm {
  font-size: .65rem;
  color: var(--text-3);
  margin-bottom: 2px;
  font-weight: 500;
}

.match-score-bar-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.match-score-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  min-width: 40px;
}
.match-score-bar.comp { }
.match-score-bar.avail { }

.match-score-fill-comp {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  transition: width .4s ease;
}

.match-score-fill-avail {
  height: 100%;
  border-radius: 99px;
  transition: width .4s ease;
}
.match-score-fill-avail.high { background: linear-gradient(90deg, var(--success), #34d399); }
.match-score-fill-avail.medium { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.match-score-fill-avail.low { background: linear-gradient(90deg, var(--danger), #f87171); }

.match-score-pct {
  font-size: .7rem;
  font-weight: 700;
  min-width: 28px;
  text-align: right;
  color: var(--text-1);
}

.match-avail-hint {
  font-size: .62rem;
  color: var(--text-3);
  margin-top: 1px;
}

/* ── Recommendation Badge & Text (HF2.4) ── */
.match-recommendation {
  padding: 4px 10px 6px 50px;
}

.match-rec-badge {
  display: inline-block;
  padding: 1px 8px;
  font-size: .65rem;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid;
  margin-bottom: 3px;
}

.match-rec-text {
  font-size: .7rem;
  color: var(--text-2);
  line-height: 1.35;
}

/* ── Strengths & Gaps Chips (HF2.4) ── */
.match-bd-section {
  margin-top: 6px;
  font-size: .68rem;
}
.match-bd-section-label {
  font-weight: 600;
  color: var(--text-2);
  margin-right: 4px;
}

.match-strength-chip {
  display: inline-block;
  padding: 1px 6px;
  margin: 1px 3px;
  font-size: .62rem;
  background: var(--success)18;
  color: var(--success);
  border-radius: 3px;
  border: 1px solid var(--success)33;
}

.match-gap-chip {
  display: inline-block;
  padding: 1px 6px;
  margin: 1px 3px;
  font-size: .62rem;
  background: var(--danger)18;
  color: var(--danger);
  border-radius: 3px;
  border: 1px solid var(--danger)33;
  cursor: help;
}

/* ── Star Rating ── */
.star-rating {
  display: flex;
  gap: 2px;
}

.star {
  color: var(--border-light);
  font-size: .85rem;
}

.star.filled {
  color: var(--warning);
}

/* ── Star Picker (Modal) ── */
.star-pick {
  display: inline-block;
  transition: color .15s, transform .15s;
  user-select: none;
  line-height: 1;
}

.star-pick:hover {
  transform: scale(1.25);
}

/* ── Competency Row ── */
.competency-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  padding: 4px 0;
}

.competency-label {
  width: 60px;
  font-weight: 600;
  font-size: .7rem;
}

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

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

thead tr {
  background: var(--bg-card2);
  border-bottom: 1px solid var(--border);
}

th {
  padding: 11px 14px;
  text-align: left;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-2);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--bg-hover);
  cursor: pointer;
}

td {
  padding: 11px 14px;
  vertical-align: middle;
}

/* ── Filter Bar ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-bar .search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.filter-bar .search-wrap input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-1);
  font-size: .85rem;
  width: 100%;
}

.filter-bar .search-wrap input::placeholder {
  color: var(--text-3);
}

.filter-bar select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  padding: 7px 12px;
  font-size: .82rem;
  outline: none;
  cursor: pointer;
}

.filter-bar select:focus {
  border-color: var(--primary);
}

/* ── Forms (modal) ── */
.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.form-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-2);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  padding: 8px 12px;
  font-size: .85rem;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-section-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  padding: 8px 0 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn .15s ease;
}

.modal-overlay.open {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 760px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp .2s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.modal-header {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Section Header ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-header h2 {
  font-size: 1rem;
  font-weight: 700;
}

/* ── Grid layouts ── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* ── Employee Cards ── */
.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.employee-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.employee-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-light);
}

.employee-card .availability-dot {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.availability-dot.available {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.availability-dot.partial {
  background: var(--warning);
  box-shadow: 0 0 8px var(--warning);
}

.availability-dot.busy {
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
}

.employee-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.emp-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.emp-name {
  font-size: .92rem;
  font-weight: 700;
}

.emp-role {
  font-size: .75rem;
  color: var(--text-2);
  margin-top: 1px;
}

.emp-level {
  font-size: .67rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(99, 102, 241, .15);
  color: var(--primary);
  margin-top: 3px;
  display: inline-block;
}

.competency-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

/* ── Mini Timeline (Employee Card) ── */
.mini-tl {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: .6rem;
}

.mini-tl-row {
  display: grid;
  grid-template-columns: 70px repeat(6, 1fr);
  border-bottom: 1px solid var(--border);
}

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

.mini-tl-header-row {
  background: var(--bg-card2);
}

.mini-tl-header-cell {
  padding: 3px 2px;
  text-align: center;
  font-size: .55rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
}

.mini-tl-header-cell.current {
  color: var(--accent);
}

.mini-tl-label {
  padding: 3px 6px;
  font-size: .6rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border);
}

.mini-tl-cell {
  padding: 3px 2px;
  min-height: 16px;
  border-right: 1px solid var(--border);
}

.mini-tl-cell:last-child {
  border-right: none;
}

.mini-tl-cell.mini-tl-active {
  border: 1px solid;
  border-radius: 2px;
  margin: 2px 1px;
}

/* ── Gantt / Timeline ── */
.timeline-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.timeline-grid {
  min-width: 900px;
  font-size: .78rem;
}

.timeline-header {
  display: grid;
  background: var(--bg-card2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.timeline-header-cell {
  padding: 10px 6px;
  text-align: center;
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-2);
  border-right: 1px solid var(--border);
}

.timeline-header-cell:first-child {
  text-align: left;
  padding-left: 14px;
  color: var(--text-1);
  position: sticky;
  left: 0;
  z-index: 11;
  background: var(--bg-card2);
}

.timeline-header-cell:last-child {
  border-right: none;
}

.timeline-header-cell.current-month {
  color: var(--accent);
  background: rgba(6, 182, 212, .05);
}

.timeline-row {
  display: grid;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

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

.timeline-row:hover {
  background: rgba(255, 255, 255, .02);
}

.timeline-cell {
  padding: 8px 6px;
  border-right: 1px solid var(--border);
  position: relative;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-cell:first-child {
  justify-content: flex-start;
  padding-left: 14px;
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--bg-card);
}

.timeline-row:hover .timeline-cell:first-child {
  background: rgba(255, 255, 255, .04);
}

.timeline-cell:last-child {
  border-right: none;
}

.emp-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.emp-name-clickable {
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  margin: -4px -6px;
  transition: background var(--transition);
}

.emp-name-clickable:hover {
  background: var(--bg-hover);
}

.gantt-block {
  height: 22px;
  border-radius: 4px;
  position: absolute;
  left: 2px;
  right: 2px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-size: .65rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: .9;
  transition: opacity var(--transition);
}

.gantt-block:hover {
  opacity: 1;
  z-index: 5;
}

.timeline-cell-multi {
  flex-direction: column;
  gap: 2px;
  padding: 4px 3px;
  min-height: auto;
}

.timeline-cell-free {
  background: rgba(16, 185, 129, 0.08);
  position: relative;
}

.timeline-cell-free::after {
  content: 'frei';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: .6rem;
  color: var(--success);
  opacity: 0.5;
  pointer-events: none;
}

.timeline-cell-unavail {
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 3px,
    rgba(100, 116, 139, 0.06) 3px,
    rgba(100, 116, 139, 0.06) 6px
  );
}

.gantt-block-stacked {
  width: 100%;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 5px;
  font-size: .6rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  opacity: .9;
  transition: opacity var(--transition);
  min-height: 18px;
}

.gantt-block-stacked:hover {
  opacity: 1;
}

.gantt-block-stacked .gantt-label {
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.gantt-block-stacked .gantt-fte {
  flex-shrink: 0;
  margin-left: 3px;
  font-size: .55rem;
  opacity: .8;
}

/* HF3.11: Tentative (Pre-Staffing) Allocations — gestrichelte Optik, gedämpfte Opacity */
.gantt-block-stacked.gantt-block-tentative {
  opacity: .55;
  font-style: italic;
  background-image: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 3px,
    rgba(255, 255, 255, .08) 3px,
    rgba(255, 255, 255, .08) 6px
  );
}
.gantt-block-stacked.gantt-block-tentative:hover {
  opacity: .8;
}

/* HF3.11: Tentative Mini-Timeline-Zellen — Schraffur */
.mini-tl-cell.mini-tl-active.mini-tl-tentative {
  border-style: dashed !important;
  opacity: .6;
  background-image: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, .15) 2px,
    rgba(255, 255, 255, .15) 4px
  );
}

/* HF3.11: Pre-Staffed-Suffix in Employee-FTE-Bar */
.fte-tentative {
  color: var(--text-3);
  font-weight: 500;
  font-style: italic;
  margin-left: 6px;
}

.timeline-heatmap-row {
  display: grid;
  border-top: 2px solid var(--border-light);
  background: var(--bg-card2);
}

.heatmap-cell {
  padding: 8px 6px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: .68rem;
  font-weight: 700;
}

.heatmap-cell:first-child {
  align-items: flex-start;
  padding-left: 14px;
  font-weight: 600;
  color: var(--text-2);
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--bg-card2);
}

.heatmap-cell:last-child {
  border-right: none;
}

.heatmap-bar {
  width: 100%;
  height: 5px;
  border-radius: 99px;
}

.heatmap-label {
  color: var(--text-3);
  font-size: .65rem;
  font-weight: 500;
}

/* ── Event Timeline ── */
.event-tl-block {
  cursor: pointer;
  transition: opacity var(--transition), transform 0.15s ease;
}
.event-tl-block:hover {
  opacity: 1 !important;
  transform: scale(1.04);
  z-index: 5;
}
.event-tl-overdue {
  animation: pulse-overdue 2s ease-in-out infinite;
}
@keyframes pulse-overdue {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 2px var(--danger); }
}
.event-tl-done {
  opacity: 0.45 !important;
}
.event-tl-done .gantt-label {
  text-decoration: line-through;
}
.evt-tl-gran-btn.active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}

/* ── Opportunity Kanban ── */
.kanban-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-col {
  min-width: 230px;
  flex-shrink: 0;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  transition: all var(--transition);
}

.kanban-col.drag-over {
  background: var(--bg-hover);
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kanban-col-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  font-weight: 700;
}

.kanban-count {
  background: var(--border);
  color: var(--text-2);
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition);
}

.kanban-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-light);
}

.kanban-card.dragging {
  opacity: 0.5;
  transform: scale(0.98);
  box-shadow: none;
  border-style: dashed;
}

.kanban-card:last-child {
  margin-bottom: 0;
}

.kanban-card-title {
  font-size: .83rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.kanban-card-meta {
  font-size: .7rem;
  color: var(--text-2);
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.kanban-card-meta span {
  background: var(--bg-card2);
  padding: 2px 7px;
  border-radius: 99px;
  border: 1px solid var(--border);
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  margin-bottom: 20px;
  width: fit-content;
}

.tab {
  padding: 7px 16px;
  border-radius: 7px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--transition);
}

.tab.active {
  background: var(--bg-hover);
  color: var(--text-1);
}

/* ── Charts (pure CSS) ── */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 80px;
  padding: 0 4px;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.bar-col .bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  transition: height .5s ease;
  min-height: 3px;
}

.bar-col .bar-label {
  font-size: .6rem;
  color: var(--text-3);
  font-weight: 600;
}

/* Donut chart via conic-gradient */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
}

.donut {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.donut-center {
  position: absolute;
  inset: 18px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  color: var(--text-2);
  text-align: center;
  font-weight: 600;
}

.donut-center strong {
  font-size: 1.2rem;
  color: var(--text-1);
  display: block;
  line-height: 1;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── View container ── */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* ── Chip ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px 9px;
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-2);
}

/* ── Assigned employees in table ── */
.emp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* ── Notification toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: .84rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight .25s ease;
  max-width: 360px;
}

.toast.success {
  border-color: rgba(16, 185, 129, .4);
  color: var(--success);
}

.toast.info {
  border-color: rgba(6, 182, 212, .4);
  color: var(--accent);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* ── Customer Cards ── */
.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.customer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition);
}

.customer-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow);
}

.customer-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.customer-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.customer-name {
  font-size: 1rem;
  font-weight: 700;
}

.customer-industry {
  font-size: .75rem;
  color: var(--text-2);
}

.customer-projects {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.customer-project-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .82rem;
  cursor: pointer;
  transition: all var(--transition);
}

.customer-project-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

.customer-consultants {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

/* ── Customer Stats Grid (Mini KPI Cards) ── */
.customer-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.customer-stat-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.customer-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--kpi-color, var(--primary));
  border-radius: 2px 2px 0 0;
}

.customer-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
}

.customer-stat-label {
  font-size: .65rem;
  color: var(--text-2);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Customer Timeline ── */
.customer-timeline-header {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
  margin-top: 14px;
}

.customer-timeline-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .8rem;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 4px;
}

.customer-timeline-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

.customer-timeline-date {
  font-size: .7rem;
  color: var(--text-2);
  min-width: 55px;
  flex-shrink: 0;
}

.customer-timeline-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-timeline-budget {
  font-size: .75rem;
  color: var(--success);
  white-space: nowrap;
}

.customer-timeline-staff {
  font-size: .65rem;
  color: var(--text-3);
  white-space: nowrap;
}

/* ── Customer History Modal ── */
.ch-meta {
  font-size: .8rem;
  color: var(--text-2);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.ch-section {
  margin-bottom: 20px;
}

.ch-section-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Bar chart rows (horizontal) */
.ch-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: .8rem;
}

.ch-bar-label {
  min-width: 160px;
  flex-shrink: 0;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ch-bar-track {
  flex: 1;
  height: 20px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.ch-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
  min-width: 2px;
}

.ch-bar-value {
  font-size: .7rem;
  color: var(--text-2);
  white-space: nowrap;
  min-width: 80px;
  text-align: right;
}

/* Top consultants */
.ch-consultant-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: .8rem;
  border-bottom: 1px solid var(--border);
}

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

.ch-consultant-dots {
  color: var(--primary);
  letter-spacing: 2px;
}

/* ── Gantt Chart (CC-clustered) ── */
.ch-gantt {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.ch-gantt-inner {
  min-width: 600px;
}

.ch-gantt-header {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card2);
  position: sticky;
  top: 0;
  z-index: 1;
}

.ch-gantt-header-label {
  width: 180px;
  min-width: 180px;
  padding: 6px 10px;
  font-size: .65rem;
  font-weight: 600;
  color: var(--text-2);
  border-right: 1px solid var(--border);
}

.ch-gantt-header-months {
  flex: 1;
  display: flex;
}

.ch-gantt-month {
  flex: 1;
  text-align: center;
  font-size: .6rem;
  color: var(--text-3);
  padding: 6px 2px;
  border-right: 1px solid var(--border);
}

.ch-gantt-month:last-child {
  border-right: none;
}

.ch-gantt-group-title {
  font-size: .7rem;
  font-weight: 700;
  color: var(--accent);
  padding: 8px 10px 4px;
  background: var(--bg-card2);
  border-bottom: 1px solid var(--border);
}

.ch-gantt-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  min-height: 28px;
}

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

.ch-gantt-row-label {
  width: 180px;
  min-width: 180px;
  padding: 4px 10px;
  font-size: .7rem;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.ch-gantt-bar-area {
  flex: 1;
  position: relative;
  min-height: 28px;
}

.ch-gantt-bar {
  position: absolute;
  top: 4px;
  height: 20px;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity var(--transition);
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-size: .6rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ch-gantt-bar:hover {
  opacity: 1;
  z-index: 2;
}

.ch-gantt-bar--won { background: var(--success); }
.ch-gantt-bar--running { background: var(--accent); }
.ch-gantt-bar--proposal { background: var(--primary); }
.ch-gantt-bar--lead { background: var(--lead); }
.ch-gantt-bar--lost { background: var(--danger); }

/* Customer card history button */
.customer-history-btn {
  font-size: .7rem;
  color: var(--primary);
  cursor: pointer;
  padding: 4px 8px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  background: transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

.customer-history-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .sidebar {
    width: 64px;
  }

  .sidebar-logo .logo-text,
  .nav-item>*:not(.nav-icon),
  .sidebar-footer .user-info {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 10px;
    margin: 2px 4px;
  }

  .nav-item.active {
    margin-left: 4px;
    padding-left: 10px;
    border-left: none;
  }

  .grid-2,
  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 16px;
  }

  .customer-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ch-bar-label {
    min-width: 100px;
  }

  .ch-gantt-row-label,
  .ch-gantt-header-label {
    width: 120px;
    min-width: 120px;
  }
}

/* ── Customer Autocomplete Dropdown ── */

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-card);
  border: 1px solid var(--border-light, var(--border));
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  max-height: 280px;
  overflow-y: auto;
  display: none;
  margin-top: 2px;
}

.autocomplete-dropdown.visible {
  display: block;
}

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

.autocomplete-item:last-of-type {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: var(--bg-hover, rgba(255, 255, 255, .06));
}

.autocomplete-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.autocomplete-info {
  flex: 1;
  min-width: 0;
}

.autocomplete-name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-meta {
  font-size: .72rem;
  color: var(--text-2);
}

.autocomplete-hint {
  padding: 6px 12px;
  font-size: .68rem;
  color: var(--text-3, var(--text-2));
  border-top: 1px solid var(--border);
  text-align: center;
  background: rgba(0, 0, 0, .15);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.autocomplete-duplicate-warn {
  display: none;
  margin-top: 6px;
  padding: 8px 12px;
  font-size: .78rem;
  color: var(--warning, #f59e0b);
  background: rgba(245, 158, 11, .1);
  border-left: 3px solid var(--warning, #f59e0b);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
}

.autocomplete-duplicate-warn.visible {
  display: block;
}

.autocomplete-duplicate-warn:hover {
  background: rgba(245, 158, 11, .18);
}

.autocomplete-duplicate-link {
  text-decoration: underline;
  font-weight: 600;
}

/* ============================================================
   QUALIFICATIONS MATRIX VIEW
   ============================================================ */

/* ── Matrix Table ── */
.qual-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .85rem;
}

.qual-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-card);
  color: var(--text-2);
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  text-align: center;
  white-space: nowrap;
}

.qual-table thead th:first-child {
  text-align: left;
  min-width: 180px;
}

.qual-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  transition: background .15s;
}

.qual-table tbody tr:hover td {
  background: var(--bg-hover);
}

.qual-table tbody td:first-child {
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
}

.qual-table .emp-info-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qual-table .emp-info-cell .mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .7rem;
  color: #fff;
  flex-shrink: 0;
}

.qual-table .emp-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.qual-table .emp-meta .emp-role {
  font-size: .72rem;
  color: var(--text-3);
  font-weight: 400;
}

/* ── Heatmap Competency Cells ── */
.comp-cell {
  text-align: center;
  font-weight: 700;
  font-size: .9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-width: 56px;
  position: relative;
  transition: transform .12s, box-shadow .12s;
}

.comp-cell:hover {
  transform: scale(1.08);
  z-index: 1;
}

.comp-0 { background: rgba(30, 45, 74, 0.3); color: var(--text-3); }
.comp-1 { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.comp-2 { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.comp-3 { background: rgba(234, 179, 8, 0.22); color: #facc15; }
.comp-4 { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.comp-5 { background: rgba(16, 185, 129, 0.25); color: #34d399; }

.comp-cell .comp-raw {
  font-size: .6rem;
  color: var(--text-3);
  font-weight: 400;
  display: block;
  margin-top: -2px;
}

/* ── Qual Score Badge ── */
.qual-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .95rem;
  min-width: 48px;
  justify-content: center;
}

/* ── Team Average Row ── */
.team-avg-row td {
  font-weight: 700;
  color: var(--text-2);
  border-top: 2px solid var(--border);
  background: var(--bg-card2);
  font-size: .8rem;
}

/* ── Legend ── */
.qual-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: .72rem;
  color: var(--text-3);
}

.qual-legend .legend-swatch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.qual-legend .legend-swatch .swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

/* ── Drilldown Panel ── */
.drilldown-row td {
  padding: 0 !important;
  border-bottom: 1px solid var(--border);
}

.drilldown-panel {
  background: var(--bg-card2);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  margin: 0;
  animation: slideDown .2s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }
  to { opacity: 1; max-height: 500px; }
}

.drilldown-panel .drilldown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: .85rem;
  color: var(--text-1);
}

.drilldown-panel .drilldown-header .hs-tag {
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-size: .75rem;
  font-weight: 700;
}

/* ── Sub-Competency Bars ── */
.sub-comp-bars {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.sub-comp-bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 40px;
  align-items: center;
  gap: 10px;
  font-size: .78rem;
}

.sub-comp-bar-row .bar-label {
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-comp-bar-row .bar-track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.sub-comp-bar-row .bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .3s ease;
}

.sub-comp-bar-row .bar-value {
  font-weight: 600;
  text-align: right;
  font-size: .75rem;
  color: var(--text-2);
}

/* ── Confidence Badge (HF3.12) ── */
.comp-confidence {
  display: inline-block;
  margin-left: 4px;
  font-size: .65rem;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: .02em;
  vertical-align: middle;
  white-space: nowrap;
}

/* ── Score Formula (HF3.12) ── */
.score-formula {
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: .78rem;
  color: var(--text-2);
}

.score-formula .formula-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.score-formula .formula-header strong {
  color: var(--text-1);
  font-size: .9rem;
}

.score-formula .formula-confidence {
  font-size: .72rem;
  color: var(--text-3);
}

.score-formula .formula-factors {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.score-formula .formula-row {
  display: grid;
  grid-template-columns: 150px 50px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 3px 0;
}

.score-formula .formula-row.unrated {
  opacity: .55;
  font-style: italic;
}

.score-formula .formula-label {
  color: var(--text-2);
  font-weight: 600;
}

.score-formula .formula-value {
  font-weight: 700;
  color: var(--text-1);
}

.score-formula .formula-weight {
  color: var(--text-3);
  font-size: .72rem;
}

.score-formula .formula-detail {
  grid-column: 3 / 4;
  color: var(--text-3);
  font-size: .7rem;
}

.score-formula .formula-hint {
  margin: 8px 0 0;
  font-size: .72rem;
  color: var(--text-3);
  border-top: 1px dashed var(--border);
  padding-top: 6px;
}

/* ── Score Breakdown ── */
.score-breakdown {
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: .78rem;
  color: var(--text-2);
}

.score-breakdown .breakdown-title {
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px;
  font-size: .8rem;
}

.score-breakdown .breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
}

.score-breakdown .breakdown-row .label {
  color: var(--text-2);
}

.score-breakdown .breakdown-row .value {
  font-weight: 600;
  color: var(--text-1);
}

.score-breakdown .breakdown-total {
  display: flex;
  justify-content: space-between;
  padding-top: 6px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
  font-weight: 700;
  color: var(--accent);
}

/* ── Project list in drilldown ── */
.drilldown-projects {
  margin-top: 12px;
  font-size: .75rem;
  color: var(--text-3);
}

.drilldown-projects .proj-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  margin: 2px 4px 2px 0;
}

/* ── Skill / Cert Chips ── */
.qual-skills-section {
  display: grid;
  gap: 12px;
}

.qual-skill-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.qual-skill-row .emp-name {
  font-weight: 600;
  font-size: .8rem;
  color: var(--text-1);
  min-width: 120px;
  flex-shrink: 0;
}

.skill-chip {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-size: .7rem;
  font-weight: 500;
  margin: 2px 3px;
}

.cert-chip {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border-radius: var(--radius-sm);
  font-size: .7rem;
  font-weight: 500;
  margin: 2px 3px;
}

/* ── Sub-Competency Modal Editing ── */
.sub-comp-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}

.sub-comp-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  cursor: pointer;
  background: var(--bg-card2);
  transition: background .15s;
}

.sub-comp-toggle:hover {
  background: var(--bg-hover);
}

.sub-comp-arrow {
  font-size: .7rem;
  color: var(--text-3);
  transition: transform .2s;
}

.sub-comp-group.collapsed .sub-comp-arrow {
  transform: rotate(-90deg);
}

.sub-comp-group.collapsed .sub-comp-fields {
  display: none;
}

.sub-comp-fields {
  padding: 8px 12px;
  display: grid;
  gap: 6px;
}

.sub-comp-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 8px;
}

.sub-comp-label {
  font-size: .75rem;
  color: var(--text-2);
}

.hidden {
  display: none !important;
}

/* ── Qualification View No-Data ── */
.qual-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-3);
  font-size: .9rem;
}

.qual-empty .qual-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

/* ============================================================
   Notifications (1.7)
   ============================================================ */

.notification-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 8px;
}

.notification-bell {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  position: relative;
  transition: background var(--transition);
  color: var(--text-2);
  line-height: 1;
}

.notification-bell:hover {
  background: var(--bg-hover);
  color: var(--text-1);
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-family: 'Inter', sans-serif;
  pointer-events: none;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-height: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.15s ease;
}

.notification-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.notification-dropdown-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-1);
}

.notification-list {
  overflow-y: auto;
  flex: 1;
  max-height: 400px;
}

.notification-list::-webkit-scrollbar { width: 5px; }
.notification-list::-webkit-scrollbar-track { background: transparent; }
.notification-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
  border-left: 3px solid transparent;
}

.notification-item:last-child { border-bottom: none; }
.notification-item:hover { background: var(--bg-hover); }

/* ── Type colors ── */
.notification-item.type-new-opp.unread {
  border-left-color: var(--success);
  background: rgba(16, 185, 129, 0.06);
}

.notification-item.type-status-change.unread {
  border-left-color: var(--warning);
  background: rgba(245, 158, 11, 0.06);
}

.notification-item.type-assignment.unread {
  border-left-color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
}

/* Read items — subtle */
.notification-item:not(.unread) {
  opacity: 0.65;
}

.notification-item:not(.unread):hover {
  opacity: 0.85;
}

.notification-icon {
  font-size: 1.05rem;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-card2);
}

.type-new-opp .notification-icon { background: rgba(16, 185, 129, 0.15); }
.type-status-change .notification-icon { background: rgba(245, 158, 11, 0.15); }
.type-assignment .notification-icon { background: rgba(99, 102, 241, 0.15); }

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-message {
  font-size: 0.8rem;
  color: var(--text-1);
  line-height: 1.4;
  word-break: break-word;
}

.notification-time {
  font-size: 0.68rem;
  color: var(--text-3);
  margin-top: 2px;
}

.notification-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 6px;
}

.type-new-opp .notification-dot { background: var(--success); }
.type-status-change .notification-dot { background: var(--warning); }
.type-assignment .notification-dot { background: var(--primary); }

.notification-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-3);
  font-size: 0.85rem;
}

/* ── Notification Banner (slide-in from top) ── */

.notification-banner {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  border: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
  min-width: 480px;
  max-width: 680px;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), opacity 0.3s ease;
  pointer-events: auto;
}

.notification-banner.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.notification-banner.type-new-opp {
  background: linear-gradient(135deg, #0d6b4a, #10b981);
}

.notification-banner.type-status-change {
  background: linear-gradient(135deg, #92400e, #f59e0b);
}

.notification-banner.type-assignment {
  background: linear-gradient(135deg, #3730a3, #6366f1);
}

.notification-banner-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.notification-banner-text {
  font-size: 0.92rem;
  color: #fff;
  flex: 1;
  line-height: 1.4;
  font-weight: 500;
}

.notification-banner-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}

.notification-banner-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.25);
}

/* ═══════════════════════════════════════════
   EVENT-CENTER
   ═══════════════════════════════════════════ */

.event-kpi-active { outline: 2px solid var(--primary); outline-offset: -2px; }

/* ── View Preset Bar (EC 1.6) ── */
.event-preset-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.event-preset-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.event-preset-btn:hover {
  border-color: var(--primary);
  color: var(--text-1);
  background: rgba(99, 102, 241, 0.06);
}
.event-preset-btn.event-preset-active {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}
.event-preset-icon { font-size: 1rem; }
.event-preset-label { white-space: nowrap; }

.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: border-color var(--transition);
}
.event-card:hover { border-color: var(--primary); }
.event-card.event-overdue { border-left: 3px solid var(--danger); }
.event-card.event-done { opacity: 0.6; }
.event-card.event-done .event-card-title { text-decoration: line-through; color: var(--text-secondary); }

/* HF3.04: Done-Checkbox (Task erledigt-Toggle, nicht zu verwechseln mit Bulk-Selection) */
.event-done-checkbox {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
}
.event-done-checkbox input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--success);
}

.event-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.event-type-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }

.event-card-title-wrap { flex: 1; min-width: 0; }
.event-card-title { font-weight: 600; font-size: 0.95rem; color: var(--text-1); }
.event-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.78rem;
}

.event-opp-link {
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
}
.event-opp-link:hover { color: var(--primary); }

.event-phase-badge, .event-cluster-badge {
  background: rgba(99, 102, 241, 0.12);
  color: var(--text-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.event-card-actions { display: flex; gap: 4px; flex-shrink: 0; }

.event-card-body { margin-top: 8px; }

.event-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.event-status-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.event-status-open { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.event-status-in_progress { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
.event-status-in_review { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.event-status-blocked { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.event-status-escalated { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.event-status-done { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.event-status-cancelled { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }

.event-prio-badge {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid;
}

.event-mgmt-flag, .event-escalation-flag {
  font-size: 0.85rem;
  cursor: help;
}

.event-card-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-3);
  margin-bottom: 6px;
}

.event-date { color: var(--text-3); }
.event-date-overdue { color: var(--danger); font-weight: 600; }
.event-owner, .event-owner-role { color: var(--text-2); }
.event-auto-badge {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-3);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
}

/* EC 1.7: Aging badges */
.event-aging-badge {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}
.aging-1 { background: rgba(251, 191, 36, 0.15); color: var(--warning); }
.aging-2 { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.aging-3 { background: rgba(239, 68, 68, 0.25); color: var(--danger); border: 1px solid var(--danger); }

/* EC 1.7: Completion note on closed events */
.event-completion-note {
  color: var(--text-3);
  font-size: 0.78rem;
  font-style: italic;
  margin-top: 6px;
  padding: 4px 8px;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 4px;
  border-left: 2px solid var(--primary);
}

.event-card-status-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Notification → Event button */
.notification-event-btn {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  font-size: 0.7rem;
  padding: 2px 6px;
  cursor: pointer;
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
  transition: background var(--transition);
}
.notification-event-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* Kanban event badges */
.kanban-event-badge { font-size:.7rem; color:var(--text-2); margin-top:4px; }
.kanban-event-badge-overdue { color:var(--danger); font-weight:600; }

/* ── Event Kanban Cards ── */
.event-kanban-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.event-kanban-done { opacity: 0.5; }
.event-kanban-done .kanban-card-title { text-decoration: line-through; }
.event-kanban-overdue { border-left: 3px solid var(--danger); }
.event-kanban-date-overdue { color: var(--danger); font-weight: 600; }
.event-kanban-empty {
  text-align: center;
  padding: 20px 8px;
  color: var(--text-3);
  font-size: .78rem;
}

/* Opportunity Modal: Events section */
.opp-event-done { opacity: 0.5; }

/* ── Bulk Actions (OH 1.3) ── */
.event-bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-top: 12px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 8px;
  flex-wrap: wrap;
}
.event-bulk-count {
  font-weight: 600;
  font-size: .85rem;
  color: var(--primary);
  white-space: nowrap;
}
.event-bulk-select {
  padding: 4px 8px;
  font-size: .8rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-1);
}
.event-bulk-checkbox {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.event-bulk-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
.event-card.event-selected {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.35);
}
.kanban-card.event-selected {
  background: rgba(99, 102, 241, 0.08);
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* ── Validation ── */
.field-error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, .15);
}
.field-valid {
  border-color: var(--success) !important;
}
.field-error-msg {
  color: var(--danger);
  font-size: .8rem;
  margin-top: 4px;
  display: block;
}
.toast.error {
  background: linear-gradient(135deg, var(--danger), #dc2626);
}

/* ═══════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════ */

/* On-screen: print elements hidden */
.print-header { display: none; }

@media print {
  /* Hide UI chrome */
  .sidebar,
  .topbar,
  .filter-bar,
  .notification-wrapper,
  .notification-dropdown,
  .modal-overlay,
  .toast,
  .tabs,
  .availability-dot,
  .event-card-actions,
  .event-card-status-buttons,
  .event-bulk-toolbar,
  .event-bulk-checkbox,
  .customer-history-btn,
  #event-kanban-wrap { display: none !important; }
  #event-list-wrap { display: block !important; }

  /* Hide all buttons except we need to be thorough */
  .btn,
  button {
    display: none !important;
  }

  /* White theme overrides */
  :root {
    --bg-base: #fff;
    --bg-card: #fff;
    --bg-card2: #f8f9fa;
    --text-1: #1a1a1a;
    --text-2: #444;
    --text-3: #666;
    --border: #ddd;
  }

  /* CRITICAL: Break flex layout for print — make everything block + full width */
  body {
    background: #fff !important;
    color: #1a1a1a !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .app-wrapper {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
  }

  .main {
    display: block !important;
    width: 100% !important;
    overflow: visible !important;
    background: #fff !important;
  }

  .content {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 10px !important;
    overflow: visible !important;
    background: #fff !important;
    height: auto !important;
  }

  /* Show print header */
  .print-header {
    display: flex !important;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #333;
  }

  .print-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
  }

  .print-date {
    font-size: 0.85rem;
    color: #666;
  }

  /* Only active view visible */
  .view { display: none !important; }
  .view.active { display: block !important; overflow: visible !important; }

  /* KPI cards print-friendly */
  .kpi-card {
    background: #fff !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
  }

  .kpi-card .kpi-icon { filter: grayscale(0); }

  .kpi-value,
  .kpi-label,
  .kpi-delta {
    color: #1a1a1a !important;
  }

  .kpi-grid {
    gap: 12px;
  }

  /* Tables */
  table {
    width: 100%;
    border-collapse: collapse;
  }

  th, td {
    border: 1px solid #ccc;
    padding: 6px 8px;
    font-size: 0.8rem;
    color: #1a1a1a;
  }

  th {
    background: #f0f0f0 !important;
    font-weight: 600;
  }

  /* Opportunities: hide Kanban, show Table */
  #kanban-board-wrap { display: none !important; }
  #opp-table-wrap { display: block !important; }

  /* Employee cards */
  .employee-grid {
    gap: 12px;
  }

  .employee-card {
    background: #fff !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .emp-name,
  .emp-role,
  .emp-level {
    color: #1a1a1a !important;
  }

  /* Customer cards */
  .customer-card {
    background: #fff !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .customer-name,
  .customer-industry {
    color: #1a1a1a !important;
  }

  .customer-stat-card {
    background: #f8f9fa !important;
    border: 1px solid #ddd !important;
  }

  .customer-stat-value,
  .customer-stat-label {
    color: #1a1a1a !important;
  }

  /* Event cards */
  .event-card {
    background: #fff !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  .event-card-title {
    color: #1a1a1a !important;
  }

  /* Badges */
  .badge {
    border: 1px solid #999 !important;
    background: #f5f5f5 !important;
    color: #333 !important;
  }

  /* Chips */
  .chip {
    border-color: #ccc !important;
    color: #333 !important;
  }

  /* Cards (generic) */
  .card {
    background: #fff !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
  }

  /* Timeline (capacity) */
  .timeline-wrap {
    overflow: visible !important;
  }

  .timeline-cell,
  .timeline-header-cell,
  .heatmap-cell {
    color: #1a1a1a !important;
    border-color: #ddd !important;
  }

  /* Qualifications matrix */
  .qual-matrix-table th,
  .qual-matrix-table td {
    color: #1a1a1a !important;
  }

  /* Star ratings in print */
  .star-rating {
    filter: grayscale(0.3);
  }

  /* Dashboard print button row */
  #view-dashboard > div:first-child {
    display: none !important;
  }

  /* Ensure grid layouts remain visible */
  .grid-2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  /* Dashboard sections — all visible, no overflow clips */
  #view-dashboard .card,
  #view-dashboard .kpi-grid,
  #view-dashboard .grid-2 {
    overflow: visible !important;
  }

  /* Dashboard card headers & text */
  .card-header,
  .card-title {
    color: #1a1a1a !important;
  }

  .card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* All text should be dark */
  * {
    color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Canvas charts (donut, bars) — ensure they print */
  canvas {
    max-width: 100% !important;
  }

  /* Emp chips in table */
  .emp-chips .chip {
    display: inline-block !important;
    border: 1px solid #ccc !important;
    color: #333 !important;
    font-size: 0.7rem !important;
  }

  /* Table wrapper — no scroll, show all */
  .table-wrap {
    overflow: visible !important;
    max-height: none !important;
  }

  /* Page settings */
  @page {
    margin: 12mm;
    size: A4 landscape;
  }
}

/* ════════════════════════════════════════════
   KI-MATCHING — Document Upload & AI Results (HF2.5b)
   ════════════════════════════════════════════ */

/* Upload area */
.ki-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: var(--bg-card);
}

.ki-upload-area:hover {
  border-color: var(--accent);
  background: rgba(6, 182, 212, 0.05);
}

.ki-upload-area.dragover {
  border-color: var(--accent);
  background: rgba(6, 182, 212, 0.1);
}

.ki-upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* Upload status */
.ki-upload-status {
  font-size: .85rem;
  color: var(--text-2);
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ki-analyzing-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ki-spin 0.8s linear infinite;
}

@keyframes ki-spin {
  to { transform: rotate(360deg); }
}

/* Analysis results */
.ki-analysis-results {
  margin-top: 10px;
}

.ki-analysis-section {
  margin-bottom: 8px;
}

.ki-section-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

/* Fallback banner */
.ki-fallback-banner {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: .8rem;
  color: var(--warning);
  margin-bottom: 10px;
}

/* Skill chips */
.ki-skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.ki-skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: .8rem;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.ki-chip-remove {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: .9rem;
  padding: 0 2px;
  line-height: 1;
  transition: color var(--transition);
}

.ki-chip-remove:hover {
  color: var(--danger);
}

.ki-tech-chip {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: .8rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.ki-role-tag {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: .8rem;
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}

.ki-skill-add-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px dashed var(--border);
  background: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.ki-skill-add-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ki-skill-input {
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: var(--bg-card);
  color: var(--text-1);
  font-size: .8rem;
  width: 120px;
  outline: none;
}

/* Requirements list */
.ki-requirements-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ki-requirements-list li {
  font-size: .8rem;
  color: var(--text-2);
  padding: 2px 0;
}

.ki-requirements-list li::before {
  content: "→ ";
  color: var(--text-3);
}

/* Match cards */
.ki-match-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
}

.ki-match-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ki-match-info {
  flex: 1;
}

.ki-match-name {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-1);
}

.ki-match-meta {
  font-size: .75rem;
  color: var(--text-3);
}

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* Total score */
.ki-total-score {
  font-size: 1.4rem;
  font-weight: 800;
  width: 44px;
  text-align: center;
  flex-shrink: 0;
}

.ki-total-score.high { color: var(--success); }
.ki-total-score.medium { color: var(--warning); }
.ki-total-score.low { color: var(--danger); }

/* Score bars */
.ki-match-scores {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.ki-score-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ki-score-label {
  font-size: .75rem;
  color: var(--text-3);
  width: 90px;
  flex-shrink: 0;
}

.ki-score-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-sidebar);
  border-radius: 3px;
  overflow: hidden;
}

.ki-score-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.ki-score-fill.high { background: var(--success); }
.ki-score-fill.medium { background: var(--warning); }
.ki-score-fill.low { background: var(--danger); }

.ki-score-value {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-2);
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

/* Matched skill badges */
.ki-matched-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.ki-matched-skill-badge {
  font-size: .65rem;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Assign button */
.ki-match-actions {
  display: flex;
  justify-content: flex-end;
}

.ki-assign-btn {
  padding: 4px 14px;
  border-radius: 6px;
  border: none;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--accent);
  color: #fff;
}

.ki-assign-btn:hover {
  filter: brightness(1.1);
}

.ki-assign-btn.assigned {
  background: var(--success);
  cursor: default;
  opacity: 0.7;
}

/* Show all toggle */
.ki-show-all-btn {
  display: block;
  width: 100%;
  padding: 6px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: none;
  color: var(--text-3);
  font-size: .8rem;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
}

.ki-show-all-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   GAP ANALYSIS (HF2.5c)
   ═══════════════════════════════════════════ */

.match-gap-actions {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.gap-btn {
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: var(--radius);
  font-size: .75rem;
  cursor: pointer;
  transition: all var(--transition);
}

.gap-btn:hover,
.gap-btn.active {
  background: var(--accent);
  color: #fff;
}

.gap-panel-container {
  margin-top: 4px;
}

.gap-panel {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-top: 8px;
}

.gap-panel.open {
  display: block;
}

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

.gap-panel-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-1);
}

.gap-fit-badge {
  padding: 3px 10px;
  border-radius: var(--radius);
  font-size: .8rem;
  font-weight: 700;
  border: 1px solid;
}

.gap-verdict-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.gap-verdict-badge {
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: .72rem;
  font-weight: 600;
  border: 1px solid;
}

.gap-fallback-banner {
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: .7rem;
  background: rgba(251, 191, 36, .12);
  color: var(--warning);
  border: 1px solid rgba(251, 191, 36, .3);
}

.gap-section-group {
  margin-bottom: 12px;
}

.gap-section-title {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* Dimension rows */
.gap-dimension-row {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}

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

.gap-dimension-label {
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 4px;
}

.gap-dimension-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.gap-dimension-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.gap-dimension-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .3s ease;
}

.gap-dimension-fill.high {
  background: linear-gradient(90deg, var(--success), #34d399);
}

.gap-dimension-fill.medium {
  background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.gap-dimension-fill.low {
  background: linear-gradient(90deg, var(--danger), #f87171);
}

.gap-dimension-pct {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-2);
  min-width: 32px;
  text-align: right;
}

.gap-dimension-detail {
  font-size: .73rem;
  color: var(--text-3);
}

.gap-dimension-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}

.gap-dim-item {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: .7rem;
}

.gap-dim-item.ok {
  background: rgba(16, 185, 129, .12);
  color: var(--success);
}

.gap-dim-item.gap {
  background: rgba(239, 68, 68, .12);
  color: var(--danger);
}

/* Gap cards */
.gap-card {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
}

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

.gap-card-area {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-1);
  flex: 1;
}

.gap-card-pct {
  font-size: .72rem;
  font-weight: 600;
  color: var(--danger);
}

.gap-priority-badge {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.gap-card-levels {
  font-size: .72rem;
  color: var(--text-3);
  margin-bottom: 4px;
}

.gap-card-impact {
  font-size: .73rem;
  color: var(--text-2);
  margin-bottom: 6px;
  font-style: italic;
}

.gap-card-actions {
  margin-top: 6px;
}

.gap-card-actions-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 2px;
}

.gap-card-actions ul {
  margin: 0;
  padding-left: 16px;
  list-style: disc;
}

.gap-card-actions li {
  font-size: .72rem;
  color: var(--text-2);
  line-height: 1.5;
}

/* Strengths */
.gap-strengths-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.gap-strength-chip {
  background: rgba(16, 185, 129, .12);
  color: var(--success);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: .72rem;
}

/* Verdict text */
.gap-verdict-text {
  font-size: .78rem;
  color: var(--text-2);
  line-height: 1.6;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: rgba(99, 102, 241, .06);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Certification chips */
.gap-cert-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gap-cert-chip {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 500;
}

.gap-cert-chip.high {
  background: rgba(239, 68, 68, .12);
  color: var(--danger);
}

.gap-cert-chip.medium {
  background: rgba(251, 191, 36, .12);
  color: var(--warning);
}

.gap-cert-chip.low {
  background: rgba(148, 163, 184, .12);
  color: var(--text-3);
}

/* Loading spinner */
.gap-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  font-size: .8rem;
  color: var(--text-3);
}

.gap-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: gap-spin .7s linear infinite;
}

@keyframes gap-spin {
  to { transform: rotate(360deg); }
}

/* ─── EC 1.8: Expansion event highlighting ─── */
.event-card.event-expansion {
  border-left: 3px solid #06b6d4;
}
.expansion-type-badge {
  color: #06b6d4;
  border-color: #06b6d4;
  font-weight: 600;
}
/* ─── HF3.01b: AI Banner ─── */
.ai-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #7c2d12, #b45309);
  color: #fff7ed;
  border-bottom: 1px solid #92400e;
  padding: 10px 16px;
  font-size: .9rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.ai-banner__content {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}
.ai-banner__icon {
  font-size: 1.1rem;
  line-height: 1;
}
.ai-banner__message {
  flex: 1;
}
.ai-banner__label {
  font-weight: 600;
}
.ai-banner__category {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem;
  opacity: .85;
  margin-left: 4px;
}
.ai-banner__close {
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.2);
  color: inherit;
  font-size: .85rem;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
}
.ai-banner__close:hover {
  background: rgba(0,0,0,.5);
}

/* ═══════════════════════════════════════════════════════════════
   HF3.03b — Kundenansicht: Tabelle, Toolbar, Query-Builder, Pivot, Import
   ═══════════════════════════════════════════════════════════════ */

/* --- Toolbar --- */
.customer-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
  position: relative;
}
.customer-view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.customer-view-toggle .tab-btn {
  background: transparent;
  color: var(--text-2);
  border: none;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  border-right: 1px solid var(--border);
  transition: background .15s, color .15s;
}
.customer-view-toggle .tab-btn:last-child { border-right: none; }
.customer-view-toggle .tab-btn:hover { background: rgba(99,102,241,.08); color: var(--text-1); }
.customer-view-toggle .tab-btn.active { background: var(--primary); color: #fff; }
.customer-count-badge {
  margin-left: auto;
  color: var(--text-2);
  font-size: 12px;
  padding: 4px 10px;
  background: rgba(255,255,255,.03);
  border-radius: 999px;
}
#customer-qb-btn.qb-active { outline: 2px solid var(--primary); }

/* --- Customer Table --- */
.customer-table-scroll {
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  max-width: 100%;
}
table.customer-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  min-width: 100%;
  color: var(--text-1);
}
table.customer-table thead tr.col-groups-row th {
  position: sticky;
  top: 0;
  background: rgba(99,102,241,.12);
  color: var(--text-1);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 6px 10px;
  z-index: 3;
  border-bottom: 1px solid var(--border);
  border-right: 2px solid rgba(99,102,241,.25);
  cursor: pointer;
  user-select: none;
}
table.customer-table thead tr.col-heads-row th {
  position: sticky;
  top: 28px; /* below col-groups */
  background: var(--bg-card);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  z-index: 2;
  cursor: pointer;
  user-select: none;
}
table.customer-table thead tr.col-heads-row th[data-sortable="false"] { cursor: default; }
table.customer-table thead tr.col-heads-row th:hover[data-sortable="true"] { background: rgba(99,102,241,.08); }
.sort-idx {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  font-size: 10px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  vertical-align: middle;
}
table.customer-table tbody tr {
  height: 44px;
}
table.customer-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,.02);
}
table.customer-table tbody tr:hover {
  background: rgba(99,102,241,.05);
}
table.customer-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.03);
  vertical-align: middle;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.customer-table td.is-empty {
  background: rgba(239,68,68,.06);
}
.cell-empty { color: var(--danger); font-weight: 600; }
.cell-bool-yes { color: var(--success); font-weight: 700; }
.cell-bool-no { color: var(--text-3); }
.cell-link { color: var(--primary); text-decoration: none; }
.cell-link:hover { text-decoration: underline; }

/* Sticky Kundenname + Sticky Action-Spalte */
.customer-table .col-sticky-name {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bg-card);
  box-shadow: 2px 0 4px rgba(0,0,0,0.3);
  font-weight: 600;
}
table.customer-table thead tr th.col-sticky-name {
  z-index: 4;
}
.customer-table .col-rownum {
  color: var(--text-3);
  font-size: 11px;
  text-align: right;
  width: 40px;
}
.customer-table .col-action button { white-space: nowrap; }

/* Inline-Edit */
.is-editable { cursor: pointer; transition: background .1s; }
.is-editable:hover { background: rgba(99,102,241,.04); }
.is-editing {
  background: rgba(99,102,241,.12) !important;
  outline: 1px solid var(--primary);
  padding: 0 !important;
}
.inline-edit-input,
.inline-edit-select,
.inline-edit-multi {
  width: 100%;
  background: var(--bg);
  color: var(--text-1);
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 13px;
}
.inline-edit-checkbox { width: 18px; height: 18px; cursor: pointer; }

/* Priority Dot */
.priority-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.priority-dot.low { background: var(--success); }
.priority-dot.med { background: var(--warning); }
.priority-dot.high { background: var(--danger); }
.priority-label { font-size: 13px; color: var(--text-1); vertical-align: middle; }

/* Progress Bar */
.progress-bar {
  position: relative;
  width: 100%;
  min-width: 120px;
  height: 18px;
  background: rgba(255,255,255,.05);
  border-radius: 9px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--success);
  transition: width .2s;
}
.progress-bar.low .progress-bar-fill  { background: var(--danger); }
.progress-bar.med .progress-bar-fill  { background: var(--warning); }
.progress-bar.high .progress-bar-fill { background: var(--success); }
.progress-bar-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-1);
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}

/* Col-Group collapsed (header only) */
.col-group-collapsed {
  background: rgba(99,102,241,.18) !important;
  writing-mode: vertical-lr;
  min-height: 80px;
}

/* Chips in multi-select cells */
.chip.chip-sm { font-size: 11px; padding: 1px 6px; margin: 1px; }

/* Badge extensions */
.badge-active { background: rgba(99,102,241,.18); color: var(--primary); border: 1px solid rgba(99,102,241,.35); }
.badge-reference { background: rgba(245,158,11,.18); color: var(--warning); border: 1px solid rgba(245,158,11,.35); }

/* Confidence badges (import dialog) */
.confidence-badge {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  border-radius: 999px;
  font-weight: 600;
  margin-left: 6px;
}
.confidence-badge.conf-high { background: rgba(16,185,129,.2); color: var(--success); }
.confidence-badge.conf-med  { background: rgba(234,179,8,.2);   color: var(--warning); }
.confidence-badge.conf-low  { background: rgba(239,68,68,.2);   color: var(--danger); }

/* --- Pivot View --- */
.pivot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 8px 0;
}
.pivot-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 260px;
}
.pivot-tile-wide { grid-column: 1 / -1; }
.pivot-title { margin: 0 0 12px 0; font-size: 14px; color: var(--text-1); font-weight: 600; }
.pivot-empty { color: var(--text-3); text-align: center; padding: 40px; font-style: italic; }
.pivot-donut-pair { display: flex; gap: 24px; flex-wrap: wrap; }
.pivot-donut { display: flex; align-items: center; gap: 12px; }
.pivot-legend { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.pivot-legend-item { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.pivot-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.pivot-arc { cursor: pointer; transition: stroke-width .15s; }
.pivot-arc:hover { stroke-width: 26 !important; }
.pivot-bar { cursor: pointer; transition: opacity .15s; }
.pivot-bar:hover { opacity: .8; }
.pivot-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-2);
}
.pivot-controls select {
  background: var(--bg);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  margin-left: 6px;
}
table.pivot-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.pivot-table th, table.pivot-table td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  text-align: right;
}
table.pivot-table th:first-child, table.pivot-table td:first-child { text-align: left; }
table.pivot-table thead th { background: rgba(99,102,241,.1); color: var(--text-1); font-weight: 600; }
table.pivot-table .pivot-row-total, table.pivot-table tfoot td { background: rgba(99,102,241,.05); }

/* --- Query Builder Popover --- */
.qb-popover {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  margin-top: 6px;
  max-width: 900px;
}
.qb-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.qb-op-toggle { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); }
.qb-op-toggle label { cursor: pointer; }
.qb-children { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.qb-cond-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: rgba(255,255,255,.02);
  border-radius: 6px;
}
.qb-cond-row select,
.qb-cond-row input {
  background: var(--bg);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
}
.qb-cond-row .qb-field    { flex: 0 0 180px; }
.qb-cond-row .qb-operator { flex: 0 0 160px; }
.qb-cond-row .qb-value, .qb-cond-row .qb-value2 { flex: 1; }
.qb-remove {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--danger);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 700;
}
.qb-remove:hover { background: rgba(239,68,68,.1); }
.qb-no-value { flex: 1; color: var(--text-3); font-style: italic; padding: 6px 10px; }
.qb-actions { display: flex; gap: 8px; align-items: center; padding-top: 12px; border-top: 1px solid var(--border); }

/* --- Import Dialog --- */
.customer-import-overlay .modal { max-width: 900px; }
.customer-import-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  color: var(--text-2);
}
.customer-import-dropzone:hover,
.customer-import-dropzone.dz-hover {
  border-color: var(--primary);
  background: rgba(99,102,241,.05);
}
.dropzone-icon { font-size: 48px; margin-bottom: 8px; }
.dropzone-hint { color: var(--text-3); font-size: 12px; margin-top: 8px; }
.customer-import-status {
  margin-top: 16px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
}
.customer-import-status.status-info    { background: rgba(6,182,212,.12);  color: var(--info); }
.customer-import-status.status-success { background: rgba(16,185,129,.12); color: var(--success); }
.customer-import-status.status-warning { background: rgba(234,179,8,.12);  color: var(--warning); }
.customer-import-status.status-error   { background: rgba(239,68,68,.12);  color: var(--danger); }
.customer-import-preview { margin-top: 16px; }
.import-mapping-table, .import-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 12px;
}
.import-mapping-table th, .import-mapping-table td,
.import-preview-table th, .import-preview-table td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  text-align: left;
}
.import-mapping-table select {
  background: var(--bg);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
}
.map-col-head { font-weight: 600; }
.map-col-sample { color: var(--text-3); font-size: 11px; }
.import-preview-scroll { max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: 6px; }
.import-preview-table thead th { position: sticky; top: 0; background: rgba(99,102,241,.1); }
.import-diff-summary { padding: 10px; background: rgba(255,255,255,.03); border-radius: 6px; font-size: 13px; color: var(--text-2); }
.import-missing { padding: 8px 12px; background: rgba(239,68,68,.08); color: var(--warning); font-size: 12px; margin-bottom: 12px; border-radius: 6px; }
.confidence-cell { text-align: center; }

/* Import-Dialog-Modal — scope-spezifisch, damit die globale .modal-overlay-Regel
   (display: none / .open → display: flex) NICHT ueberschrieben wird.
   Der Import-Dialog wird immer mit open-Klasse angezeigt (kein Toggle).
   Hintergrund + Sizing werden hier nur fuer diesen einen Overlay gesetzt. */
.customer-import-overlay {
  display: flex;
  position: fixed; inset: 0;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.6);
  z-index: 1000;
}
.customer-import-overlay .modal.modal-lg {
  width: 92%; max-width: 960px; max-height: 90vh; overflow: auto;
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 0; border: 1px solid var(--border);
}
.customer-import-overlay .modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.customer-import-overlay .modal-header h2 { margin: 0; font-size: 18px; color: var(--text-1); }
.customer-import-overlay .modal-close {
  background: transparent; border: none; color: var(--text-2);
  font-size: 24px; cursor: pointer; line-height: 1;
}
.customer-import-overlay .modal-close:hover { color: var(--danger); }
.customer-import-overlay .modal-body { padding: 20px; }
.customer-import-overlay .modal-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 12px 20px; border-top: 1px solid var(--border);
}

/* Responsive: Pivot single-column on narrow screens */
@media (max-width: 900px) {
  .pivot-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   HF3.07a — MA-Import-Dialog (CSV/PPTX)
   Struktur angelehnt an .customer-import-overlay (HF3.03b).
   ═══════════════════════════════════════════════════════════ */
.employee-import-overlay {
  display: flex;
  position: fixed; inset: 0;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.6);
  z-index: 1000;
}
.employee-import-overlay .modal.modal-lg {
  width: 92%; max-width: 1040px; max-height: 90vh; overflow: auto;
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 0; border: 1px solid var(--border);
}
.employee-import-overlay .modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.employee-import-overlay .modal-header h2 { margin: 0; font-size: 18px; color: var(--text-1); }
.employee-import-overlay .modal-close {
  background: transparent; border: none; color: var(--text-2);
  font-size: 24px; cursor: pointer; line-height: 1;
}
.employee-import-overlay .modal-close:hover { color: var(--danger); }
.employee-import-overlay .modal-body { padding: 20px; }
.employee-import-overlay .modal-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 12px 20px; border-top: 1px solid var(--border);
}

.employee-import-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  color: var(--text-2);
}
.employee-import-dropzone:hover,
.employee-import-dropzone.dz-hover {
  border-color: var(--primary);
  background: rgba(99,102,241,.05);
}
.employee-import-dropzone code {
  background: rgba(255,255,255,.05);
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 90%;
}

.employee-import-status {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  min-height: 0;
}
.employee-import-status:empty { display: none; }
.employee-import-status.status-info    { background: rgba(6,182,212,.12);  color: var(--info); }
.employee-import-status.status-success { background: rgba(16,185,129,.12); color: var(--success); }
.employee-import-status.status-warning { background: rgba(234,179,8,.12);  color: var(--warning); }
.employee-import-status.status-error   { background: rgba(239,68,68,.12);  color: var(--danger); }

.employee-import-files { margin-top: 14px; }
.import-file-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.import-file-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; border-radius: 6px;
  background: rgba(255,255,255,.03);
  font-size: 13px;
}
.import-file-item.ready   { border-left: 3px solid var(--success); }
.import-file-item.error   { border-left: 3px solid var(--danger); }
.import-file-item.deferred{ border-left: 3px solid var(--info); }
.import-file-item.queued  { border-left: 3px solid var(--border); }
.import-file-icon { width: 18px; text-align: center; }
.import-file-name { flex: 1; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-file-size { font-size: 11px; min-width: 60px; text-align: right; }
.import-file-error { color: var(--danger); font-size: 11px; margin-left: 8px; }
.import-file-remove {
  background: transparent; border: none; color: var(--text-3);
  cursor: pointer; padding: 2px 6px; border-radius: 4px; font-size: 13px;
}
.import-file-remove:hover { background: rgba(239,68,68,.12); color: var(--danger); }

.import-progress {
  margin: 6px 0 8px;
  padding: 6px 10px;
  background: rgba(6,182,212,.08);
  color: var(--info);
  border-radius: 6px;
  font-size: 12px;
}

.employee-import-preview { margin-top: 16px; }
.import-empty {
  padding: 24px; text-align: center; color: var(--text-3); font-size: 13px;
  border: 1px dashed var(--border); border-radius: 8px;
}

.import-review-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.import-review-table thead th {
  position: sticky; top: 0;
  background: rgba(99,102,241,.12);
  color: var(--text-1);
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.import-review-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}
.import-review-table tbody tr:hover { background: rgba(255,255,255,.03); }
.import-review-table .muted { color: var(--text-3); font-size: 11px; }
.import-review-table tr.row-deferred td { opacity: .55; }
.import-review-table tr.row-error td { background: rgba(239,68,68,.05); }
.import-review-table tr.row-duplicate td { background: rgba(234,179,8,.05); }
.import-review-table .form-control-sm {
  background: var(--bg);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 12px;
  min-width: 120px;
}
.btn-xs {
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════
   HF3.07b — KI-Konfidenz, Skill-Rating, Cost-Footer, AI-CSV-Toggle
   ═══════════════════════════════════════════════════════════ */
.employee-import-options {
  margin-top: 10px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.employee-import-toggle {
  display: inline-flex; gap: 6px; align-items: center;
  font-size: 12px; color: var(--text-2); cursor: pointer;
}
.employee-import-toggle input { margin: 0; }

.badge.badge-conf {
  font-size: 11px; padding: 2px 7px; border-radius: 6px; margin-left: 6px;
  border: 1px solid transparent;
}
.badge-conf-high {
  background: rgba(16,185,129,.18); color: var(--success); border-color: rgba(16,185,129,.35);
}
.badge-conf-low {
  background: rgba(245,158,11,.18); color: var(--warning); border-color: rgba(245,158,11,.40);
}
.badge-conf-mini {
  display: inline-block; min-width: 14px; padding: 0 4px;
  font-size: 10px; line-height: 14px; border-radius: 7px; margin-left: 4px;
  text-align: center; font-weight: 700;
}
.badge-conf-mini.badge-conf-high { background: rgba(16,185,129,.28); color: var(--success); }
.badge-conf-mini.badge-conf-low  { background: rgba(245,158,11,.28); color: var(--warning); }

.import-review-table .badge.skill-rating {
  font-size: 11px; padding: 1px 6px; margin: 1px 2px;
  background: rgba(99,102,241,.12); color: var(--text-1); border: 1px solid rgba(99,102,241,.20);
  border-radius: 6px; display: inline-block;
}
.import-review-table .badge.skill-rating strong { color: var(--primary); margin-left: 3px; font-weight: 700; }

.employee-import-cost { margin-top: 8px; }
.import-cost-footer {
  display: flex; gap: 14px; justify-content: flex-end; align-items: center;
  font-size: 12px; color: var(--text-2);
  padding: 8px 12px; background: rgba(99,102,241,.06); border-radius: 8px;
  border: 1px solid rgba(99,102,241,.18);
}
.import-cost-footer .cost-eur { color: var(--text-1); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   HF3.06 — Opportunity Detail View + Extended Modal Fields
   ═══════════════════════════════════════════════════════════ */

#view-opportunity-detail { padding: 0; }

.opp-detail-empty { padding: 40px; }

.opp-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-base) 100%);
}
.opp-hero-back { cursor: pointer; }
.opp-hero-icon { font-size: 1.8rem; }
.opp-hero-title { flex: 1; min-width: 0; }
.opp-hero-title h1 {
  font-size: 1.25rem; margin: 0 0 4px; font-weight: 700;
  color: var(--text-1); overflow: hidden; text-overflow: ellipsis;
}
.opp-hero-id {
  font-size: .85rem; color: var(--text-3); font-weight: 400; margin-left: 8px;
}
.opp-hero-meta { display: flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--text-2); flex-wrap: wrap; }
.opp-hero-sep { color: var(--text-3); opacity: .5; }
.opp-hero-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.opp-detail-3col {
  display: grid;
  grid-template-columns: 260px minmax(400px, 1fr) 300px;
  gap: 16px; padding: 20px 24px;
  align-items: start;
}

.opp-col { min-width: 0; }
.opp-col-left, .opp-col-middle {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px;
}
.opp-col-middle { padding: 20px; }
.opp-col-right { display: flex; flex-direction: column; gap: 12px; }
.opp-col-section + .opp-col-section { margin-top: 16px; }

.opp-sb-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 4px 0; font-size: .8rem;
}
.opp-sb-label { color: var(--text-2); }
.opp-sb-value { color: var(--text-1); font-weight: 500; text-align: right; word-break: break-word; }
.opp-sb-value a { color: var(--accent); text-decoration: none; }
.opp-sb-value a:hover { text-decoration: underline; }

.opp-flag-row {
  display: flex; justify-content: space-between;
  padding: 5px 0; font-size: .82rem;
  border-bottom: 1px dashed var(--border);
}
.opp-flag-row:last-child { border-bottom: none; }
.flag-yes { color: var(--success); }
.flag-no { color: var(--danger); opacity: .6; }

.opp-main-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.opp-main-customer { display: flex; gap: 10px; align-items: center; }
.opp-main-customer-icon { font-size: 1.5rem; }
.opp-main-customer-name { font-weight: 700; font-size: 1rem; color: var(--text-1); }
.opp-main-customer-industry { font-size: .78rem; color: var(--text-3); }
.opp-main-head-right { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.opp-skills-box, .opp-languages-box, .opp-portfolio-box {
  display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px;
}
.skill-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(245, 158, 11, 0.12); color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 4px 10px; border-radius: var(--radius-sm);
  font-size: .78rem; font-weight: 600;
}
.skill-stars { color: var(--warning); letter-spacing: 1px; font-size: .7rem; }
.lang-badge {
  background: var(--primary-glow); color: var(--primary);
  padding: 3px 8px; border-radius: var(--radius-sm);
  font-size: .72rem; text-transform: uppercase; font-weight: 600;
}
.badge-level {
  background: rgba(99, 102, 241, 0.15); color: var(--primary);
  padding: 2px 8px; border-radius: var(--radius-sm); font-size: .72rem; font-weight: 600;
}

.opp-main-timeline {
  display: flex; gap: 16px; margin: 12px 0;
  padding: 8px 12px; background: var(--bg-base); border-radius: var(--radius-sm);
  font-size: .8rem; color: var(--text-2); flex-wrap: wrap;
}
.opp-description-box {
  padding: 10px 12px; background: var(--bg-base);
  border-radius: var(--radius-sm); font-size: .88rem;
  color: var(--text-1); line-height: 1.5; white-space: normal;
}

.opp-col-right .card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; }
.opp-col-right .card-title { font-weight: 700; font-size: .85rem; margin-bottom: 10px; color: var(--text-1); padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.opp-contact-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: .82rem; gap: 8px; }
.opp-contact-label { color: var(--text-3); flex-shrink: 0; }

.opp-cand-row {
  display: flex; gap: 10px; align-items: center;
  padding: 6px 0; font-size: .82rem;
  border-bottom: 1px solid var(--border);
}
.opp-cand-row:last-child { border-bottom: none; }
.opp-cand-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.opp-cand-score {
  background: var(--primary-glow); color: var(--primary);
  padding: 2px 8px; border-radius: var(--radius-sm);
  font-size: .72rem; font-weight: 700;
}

.opp-history-item {
  display: flex; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--border); font-size: .82rem;
}
.opp-history-item:last-child { border-bottom: none; }
.opp-history-icon { font-size: 1rem; flex-shrink: 0; }
.opp-history-body { flex: 1; min-width: 0; }
.opp-history-title { color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opp-history-meta { font-size: .72rem; color: var(--text-3); margin-top: 2px; }

.opp-team-section {
  padding: 0 24px 20px;
}
.staffing-group {
  padding: 12px 16px; border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.staffing-tentative {
  border: 2px dashed var(--border-light); background: var(--bg-base);
}
.staffing-final {
  border: 2px solid var(--border-light); background: var(--bg-card);
}
.staffing-header { font-weight: 700; font-size: .82rem; margin-bottom: 8px; color: var(--text-1); }
.staffing-hint { font-weight: 400; color: var(--text-3); font-size: .72rem; margin-left: 6px; }
.staffing-member {
  display: flex; gap: 10px; align-items: center;
  padding: 4px 0; font-size: .84rem;
}
.staffing-member-name { flex: 1; }
.staffing-member-fte { color: var(--text-3); font-size: .78rem; }
.staffing-empty { color: var(--text-3); font-size: .78rem; font-style: italic; }

.opp-footer-section { padding: 0 24px; margin-bottom: 20px; }
.opp-footer-box {
  padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: .88rem; color: var(--text-1);
  line-height: 1.5;
}
.opp-tasks-list { margin: 0; padding-left: 20px; }
.opp-tasks-list li { margin-bottom: 4px; }

/* Sourcing-Badges (auch Kanban-Card + Detail) */
.sourcing-badge-onshore   { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.4); padding: 2px 8px; border-radius: var(--radius-sm); font-size: .72rem; font-weight: 600; }
.sourcing-badge-nearshore { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.4); padding: 2px 8px; border-radius: var(--radius-sm); font-size: .72rem; font-weight: 600; }
.sourcing-badge-offshore  { background: rgba(249, 115, 22, 0.15); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.4); padding: 2px 8px; border-radius: var(--radius-sm); font-size: .72rem; font-weight: 600; }
.badge-freelancer { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; border: 1px solid rgba(139, 92, 246, 0.4); padding: 2px 8px; border-radius: var(--radius-sm); font-size: .72rem; font-weight: 600; }

/* Modal: dynamische Skill- / Language-Rows */
.opp-skills-list, .opp-languages-list {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px;
}
.opp-dynrow {
  display: grid; grid-template-columns: 1fr 120px 40px; gap: 8px; align-items: center;
}
.opp-dynrow input, .opp-dynrow select {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 10px; color: var(--text-1);
  font-size: .82rem;
}
.form-checkbox-group { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; }
.form-checkbox-group label { display: flex; gap: 6px; align-items: center; cursor: pointer; }

/* Attachments */
.attachment-dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius-md);
  padding: 18px; text-align: center; color: var(--text-3);
  cursor: pointer; transition: border-color .15s ease, background .15s ease;
  margin-bottom: 10px;
}
.attachment-dropzone:hover, .attachment-dropzone:focus {
  border-color: var(--primary); background: var(--primary-glow); outline: none;
}
.attachment-dropzone.drag-over { border-color: var(--primary); background: var(--primary-glow); }
.attachment-list { display: flex; flex-direction: column; }
.attachment-item {
  display: grid; grid-template-columns: 24px 1fr auto 32px 32px;
  gap: 10px; align-items: center; padding: 8px 0;
  border-bottom: 1px solid var(--border); font-size: .82rem;
}
.attachment-item:last-child { border-bottom: none; }
.att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-meta { color: var(--text-3); font-size: .72rem; white-space: nowrap; }

.opp-jira-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.opp-jira-link:hover { text-decoration: underline; }

/* Responsive: Detail-View < 1024px → stacked */
@media (max-width: 1024px) {
  .opp-detail-3col { grid-template-columns: 1fr; }
  .opp-hero { flex-wrap: wrap; }
  .opp-dynrow { grid-template-columns: 1fr 100px 36px; }
}



/* ─────────────────────────────────────────
   HF3.26 — Jira-Upload-Dialog
   ───────────────────────────────────────── */
/* Scope-spezifisches Overlay (analog zu .customer-import-overlay aus HF3.03b) —
   wird immer mit display:flex sichtbar (kein .open-Toggle). */
.jira-upload-overlay {
    display: flex;
    position: fixed; inset: 0;
    align-items: center; justify-content: center;
    background: rgba(0,0,0,.6);
    z-index: 1000;
}
.jira-upload-overlay .modal {
    background: var(--bg-card); border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 0; overflow: auto;
}
.jira-upload-overlay .modal.modal-xl {
    width: 96vw; max-width: 1400px; max-height: 92vh;
}
.jira-upload-overlay .modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.jira-upload-overlay .modal-header h2 { margin: 0; font-size: 18px; color: var(--text-1); }
.jira-upload-overlay .modal-close {
    background: transparent; border: none; font-size: 24px;
    color: var(--text-2); cursor: pointer; padding: 0 8px;
}
.jira-upload-overlay .modal-body { padding: 16px; }
.jira-upload-overlay .modal-footer {
    display: flex; align-items: center; justify-content: flex-end; gap: 8px;
    padding: 12px 16px; border-top: 1px solid var(--border);
}
.jira-upload-hint {
    font-size: 0.82rem;
    color: var(--text-2);
    margin: 0 0 10px 0;
    line-height: 1.4;
}
.jira-upload-dropzone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    background: var(--bg-card-alt, rgba(255,255,255,0.02));
    transition: all 0.15s;
    margin-bottom: 12px;
}
.jira-upload-dropzone:hover,
.jira-upload-dropzone.dz-hover {
    border-color: var(--accent);
    background: rgba(78, 162, 255, 0.08);
}
.jira-upload-dropzone .dropzone-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}
.jira-paste-block {
    margin: 12px 0;
    padding: 10px;
    background: var(--bg-card-alt, rgba(255,255,255,0.02));
    border-radius: 6px;
}
.jira-paste-header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85rem;
}
.jira-paste-header label {
    color: var(--text-2);
}
.jira-paste-header input[type="text"],
.jira-paste-header input[type="url"] {
    flex: 1 1 180px;
    padding: 4px 8px;
    font-size: 0.8rem;
}
#ju-paste-text {
    width: 100%;
    font-family: monospace;
    font-size: 0.82rem;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-input);
    color: var(--text);
    resize: vertical;
}
.jira-upload-queue {
    margin: 12px 0;
    padding: 10px;
    background: var(--bg-card-alt, rgba(255,255,255,0.02));
    border-radius: 6px;
}
.jira-upload-queue h4,
.jira-upload-review h4 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-2);
}
.jira-queue-table,
.jira-review-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}
.jira-queue-table th,
.jira-review-table th {
    background: var(--bg-table-head, rgba(0,0,0,0.2));
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 0.72rem;
    color: var(--text-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.jira-queue-table td,
.jira-review-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.jira-review-scroll {
    max-height: 50vh;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 4px;
}
.jira-review-table .ju-edit {
    padding: 3px 6px;
    font-size: 0.78rem;
    width: 100%;
    min-width: 80px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text);
}
.jira-review-table .ju-num {
    max-width: 80px;
    text-align: right;
}
.jira-review-table .badge-sm {
    display: inline-block;
    font-size: 0.68rem;
    padding: 2px 5px;
    background: var(--primary);
    color: white;
    border-radius: 3px;
    margin-right: 3px;
    white-space: nowrap;
}
.jira-review-table .badge-warning-sm {
    display: inline-block;
    font-size: 0.68rem;
    padding: 2px 5px;
    background: var(--warning, #d97706);
    color: white;
    border-radius: 10px;
}
.ju-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.ju-status-dot.queued { background: var(--text-3); }
.ju-status-dot.running { background: var(--primary); animation: pulse 1.5s ease-in-out infinite; }
.ju-status-dot.ok { background: var(--success); }
.ju-status-dot.err { background: var(--danger); }
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.ju-error {
    color: var(--danger);
    font-size: 0.7rem;
}
.ju-dup-warn,
.ju-rel-warn {
    display: block;
    margin-top: 4px;
    padding: 4px 6px;
    background: rgba(217, 119, 6, 0.12);
    border-left: 3px solid var(--warning, #d97706);
    font-size: 0.7rem;
    border-radius: 3px;
}
.ju-dup-warn label { display: block; margin-top: 2px; }
.jira-upload-footer-status {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-2);
    padding: 0 8px;
}
.confidence-badge.conf-high { background: var(--success); color: white; padding: 2px 6px; border-radius: 3px; font-size: 0.7rem; }
.confidence-badge.conf-med { background: var(--warning, #d97706); color: white; padding: 2px 6px; border-radius: 3px; font-size: 0.7rem; }
.confidence-badge.conf-low { background: var(--danger); color: white; padding: 2px 6px; border-radius: 3px; font-size: 0.7rem; }

/* Skill-Rating-Editor */
.skill-rating-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 200px;
}
.skill-rating-row {
    display: flex;
    gap: 4px;
    align-items: center;
}
.skill-rating-name {
    flex: 1;
    padding: 2px 5px;
    font-size: 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text);
}
.skill-rating-level {
    font-size: 0.75rem;
    padding: 2px 4px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text);
}
.skill-rating-level.skill-rating-unknown {
    font-style: italic;
    color: var(--text-2);
    border-color: var(--warning, #d97706);
}
.skill-rating-remove {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 1rem;
    cursor: pointer;
    padding: 0 4px;
}
.skill-rating-add {
    align-self: flex-start;
    background: var(--bg-card-alt, rgba(255,255,255,0.05));
    border: 1px dashed var(--border);
    border-radius: 3px;
    padding: 3px 8px;
    font-size: 0.72rem;
    color: var(--text-2);
    cursor: pointer;
    margin-top: 2px;
}
.skill-rating-add:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   HF3.09a — Dashboard-Widgets (5 State-Widgets)
   ============================================================ */

.dash-widgets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 18px 0;
}

@media (max-width: 1200px) {
    .dash-widgets-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .dash-widgets-grid { grid-template-columns: 1fr; }
}

.dash-widget-card {
    display: flex;
    flex-direction: column;
    min-height: 260px;
}

.dash-empty {
    color: var(--text-3);
    font-size: .82rem;
    padding: 12px 0;
    text-align: center;
}

.dash-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background-color 120ms ease;
}
.dash-row:hover { background-color: rgba(255,255,255,0.03); }
.dash-row:last-child { border-bottom: none; }

.dash-row-main { flex: 1; min-width: 0; }
.dash-row-title {
    font-size: .87rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-1);
}
.dash-row-sub {
    font-size: .72rem;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-row-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.dash-row-right-col {
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.dash-rank {
    font-size: .72rem;
    font-weight: 800;
    color: var(--text-3);
    width: 28px;
    text-align: right;
}

.dash-metric {
    font-size: .92rem;
    font-weight: 700;
    color: var(--accent);
}
.dash-metric-sub {
    font-size: .68rem;
    color: var(--text-3);
}

/* Staffing-Badges */
.staffing-badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: .02em;
    white-space: nowrap;
}
.staffing-badge-voll  { background: rgba(16, 185, 129, .18); color: var(--success); border: 1px solid rgba(16, 185, 129, .4); }
.staffing-badge-teil  { background: rgba(234, 179, 8, .18);  color: var(--warning); border: 1px solid rgba(234, 179, 8, .4); }
.staffing-badge-fehlt { background: rgba(239, 68, 68, .18);  color: var(--danger);  border: 1px solid rgba(239, 68, 68, .4); }

.dash-fte-pill {
    display: inline-block;
    font-size: .68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    background: var(--bg-card-alt, rgba(255,255,255,.04));
    color: var(--text-2);
    border: 1px solid var(--border);
    white-space: nowrap;
}

.event-count-pill {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(99, 102, 241, .18);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, .4);
    cursor: pointer;
    white-space: nowrap;
}
.event-count-pill:hover { background: rgba(99, 102, 241, .3); }

.dash-new-pill {
    display: inline-block;
    font-size: .62rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    letter-spacing: .05em;
}
.dash-free-pill {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(16, 185, 129, .18);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, .4);
}

.dash-status-won  { font-size: .7rem; font-weight: 800; color: var(--success); padding: 2px 7px; border-radius: 10px; background: rgba(16, 185, 129, .18); border: 1px solid rgba(16, 185, 129, .4); }
.dash-status-lost { font-size: .7rem; font-weight: 800; color: var(--danger);  padding: 2px 7px; border-radius: 10px; background: rgba(239, 68, 68, .18); border: 1px solid rgba(239, 68, 68, .4); }

/* Range + Toggle Buttons in Widget-Header */
.dash-range-switch, .dash-top-switch {
    display: inline-flex;
    gap: 2px;
    background: var(--bg-card-alt, rgba(255,255,255,.04));
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2px;
}
.dash-range-btn, .dash-top-btn {
    border: none;
    background: transparent;
    color: var(--text-2);
    font-size: .72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease;
}
.dash-range-btn:hover, .dash-top-btn:hover { color: var(--text-1); }
.dash-range-btn.active, .dash-top-btn.active {
    background: var(--primary);
    color: #fff;
}


/* ══════════════════════════════════════════════
 * HF3.07c — Enrich-Employee-Dialog (MA-Anreicherung via KI)
 * ══════════════════════════════════════════════ */

.enrich-employee-overlay .modal { max-width: 860px; }
.enrich-intro { color: var(--text-2); font-size: .9rem; margin: 0 0 16px; line-height: 1.4; }
.enrich-intro strong { color: var(--text-1); }

.enrich-dropzone {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 160px; padding: 24px; border: 2px dashed var(--border, #334155);
    border-radius: 12px; background: var(--bg-subtle, rgba(255,255,255,.03));
    cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease;
}
.enrich-dropzone:hover, .enrich-dropzone.is-dragover {
    border-color: var(--primary);
    background: rgba(99,102,241,.05);
}
.enrich-dropzone__icon { font-size: 2.4rem; margin-bottom: 8px; opacity: .75; }
.enrich-dropzone__label { color: var(--text-2); font-size: .95rem; }

.enrich-loading { margin-top: 16px; padding: 12px; background: rgba(99,102,241,.1); border-radius: 8px; color: var(--text-1); }
.enrich-loading .spinner { display: inline-block; animation: spin 1.4s linear infinite; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.enrich-error { color: var(--danger); margin-top: 12px; font-size: .9rem; min-height: 1.2em; }

.enrich-stage-upload.is-loading .enrich-dropzone { pointer-events: none; opacity: .5; }

.enrich-summary { color: var(--text-2); font-size: .9rem; margin: 0 0 6px; }
.enrich-summary em { color: var(--text-3); font-style: normal; margin-left: 8px; }
.enrich-summary strong { color: var(--text-1); }
.enrich-note {
    color: var(--text-3); font-size: .8rem; margin: 0 0 16px;
    padding: 8px 12px; background: rgba(0,0,0,.12); border-radius: 6px;
    border-left: 3px solid var(--primary);
}
.enrich-debug { margin: 0 0 16px; font-size: .85rem; color: var(--text-2); }
.enrich-debug summary { cursor: pointer; padding: 6px 0; user-select: none; color: var(--text-2); }
.enrich-debug-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 4px 12px; padding: 8px 12px; background: rgba(0,0,0,.15); border-radius: 6px;
    margin: 4px 0 8px;
}
.enrich-debug-grid strong { color: var(--text-1); }
.enrich-debug-note { margin: 6px 0; color: var(--text-3); font-size: .8rem; }
.enrich-debug-hint { margin: 6px 0; color: var(--primary); font-size: .85rem; }

.diff-table {
    width: 100%; border-collapse: collapse; font-size: .88rem;
}
.diff-table thead th {
    text-align: left; padding: 8px 10px; background: var(--bg-subtle, rgba(255,255,255,.04));
    border-bottom: 1px solid var(--border, #334155); color: var(--text-2); font-weight: 600;
}
.diff-table tbody td {
    padding: 10px; vertical-align: top; border-bottom: 1px solid var(--border-light, rgba(255,255,255,.05));
}
.diff-row-autofill { background: rgba(16,185,129,.06); }
.diff-row-conflict { background: rgba(234,179,8,.08); }
.diff-field strong { display: block; }
.diff-existing, .diff-suggestion { word-break: break-word; }
.diff-empty { color: var(--text-3); font-style: italic; }

.diff-radio-group { display: flex; flex-direction: column; gap: 4px; white-space: nowrap; }
.diff-radio-group label { cursor: pointer; font-size: .85rem; color: var(--text-2); }
.diff-radio-group input[type=radio] { margin-right: 6px; }

.chip__rating {
    display: inline-block; margin-left: 6px; padding: 1px 6px;
    background: rgba(99,102,241,.2); color: var(--primary);
    border-radius: 10px; font-size: .72rem; font-weight: 600;
}

/* Sub-Chip für Phase-4-Hook (HF3.27): Portfolio-Element-Tags pro Skill */
.chip--sub {
    margin-left: 4px; padding: 1px 8px; font-size: .7rem;
    background: rgba(255,255,255,.06); color: var(--text-3);
    border: 1px dashed var(--border-light, rgba(255,255,255,.1));
}

/* HF3.07c Confidence-Klassen (rekursiv, auch für Sub-Chips) */
.confidence-badge.confidence-high { background: rgba(16,185,129,.22); color: var(--success); padding: 2px 6px; border-radius: 10px; font-size: .72rem; }
.confidence-badge.confidence-med  { background: rgba(234,179,8,.22);   color: var(--warning); padding: 2px 6px; border-radius: 10px; font-size: .72rem; }
.confidence-badge.confidence-low  { background: rgba(239,68,68,.22);   color: var(--danger);  padding: 2px 6px; border-radius: 10px; font-size: .72rem; }

/* ══════════════════════════════════════════════
 * HF3.29 — Employee-Detail-View
 * ══════════════════════════════════════════════ */

.emp-detail-empty { padding: 40px; text-align: center; }

.emp-hero {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(236,72,153,.08));
    border-bottom: 1px solid var(--border, rgba(255,255,255,.1));
    margin-bottom: 14px;
}
.emp-hero-back { font-size: 12px; padding: 4px 10px; }
.emp-hero-avatar .emp-avatar { width: 88px; height: 88px; }
.emp-hero-title h1 { margin: 0; font-size: 22px; display: inline-block; }
.emp-hero-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.emp-hero-level { padding: 2px 10px; background: rgba(99,102,241,.25); color: var(--primary, #a5b4fc); border-radius: 10px; font-size: 11px; font-weight: 600; }
.emp-hero-meta { font-size: 12px; opacity: .7; margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.emp-hero-sep { opacity: .3; }
.emp-hero-chips { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.emp-hero-chip { padding: 3px 10px; border-radius: 12px; font-size: 11px; color: var(--text-1, #e5e7eb); }
.emp-hero-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.emp-detail-3col {
    display: grid;
    grid-template-columns: 260px 1fr 280px;
    gap: 14px;
    padding: 0 14px;
}

.emp-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.emp-card {
    background: var(--bg-card, rgba(255,255,255,.04));
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 12px;
}
.emp-card-title { font-size: 11px; letter-spacing: .5px; color: var(--text-2, #a5b4fc); margin-bottom: 10px; text-transform: uppercase; }
.emp-card-sub { font-size: 9px; font-weight: 400; opacity: .5; margin-left: 8px; text-transform: none; }
.emp-card-confidential { border-left: 2px solid rgba(245,158,11,.5); }
.emp-card-more { font-size: 10px; opacity: .55; margin-top: 6px; text-align: right; font-style: italic; }
.emp-empty { color: var(--text-3, #64748b); font-style: italic; font-size: 11px; }
.emp-empty-panel { text-align: center; padding: 40px 20px; color: var(--text-3); font-style: italic; }

.emp-kv { display: flex; justify-content: space-between; padding: 3px 0; gap: 10px; font-size: 11px; border-bottom: 1px solid rgba(255,255,255,.04); }
.emp-kv:last-child { border-bottom: none; }
.emp-kv-label { color: var(--text-3, #64748b); }
.emp-kv-value { text-align: right; word-break: break-word; }

.emp-summary-text { margin: 0; line-height: 1.5; font-size: 12px; opacity: .9; }

/* Tabs */
.emp-tabs-header {
    display: flex; gap: 2px; border-bottom: 2px solid rgba(99,102,241,.35);
    overflow-x: auto; margin-bottom: 12px;
}
.emp-tab-btn {
    padding: 10px 14px; background: transparent; border: none;
    color: var(--text-2, #94a3b8); font-size: 12px; font-weight: 500;
    cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
    white-space: nowrap; transition: color 150ms;
}
.emp-tab-btn:hover { color: var(--text-1, #e5e7eb); }
.emp-tab-btn.emp-tab-active { color: var(--primary, #a5b4fc); border-bottom-color: var(--primary, #a5b4fc); font-weight: 600; }

/* Projects list */
.emp-proj-list { background: var(--bg-card, rgba(255,255,255,.03)); border-radius: 10px; overflow: hidden; }
.emp-proj-header, .emp-proj-row {
    display: grid; grid-template-columns: 90px 1fr 120px 60px 80px 30px;
    gap: 8px; padding: 9px 14px; align-items: center; font-size: 12px;
}
.emp-proj-header { color: var(--text-3, #64748b); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border, rgba(255,255,255,.1)); background: rgba(255,255,255,.02); }
.emp-proj-row { border-bottom: 1px solid rgba(255,255,255,.04); }
.emp-proj-row:last-child { border-bottom: none; }
.emp-proj-range { opacity: .75; font-size: 11px; white-space: nowrap; }
.emp-proj-name { font-weight: 600; word-break: break-word; }
.emp-proj-customer { opacity: .8; font-size: 11px; }
.emp-proj-link { text-decoration: none; }
.emp-proj-warn { color: var(--warning, #fbbf24); }
.emp-proj-history-badge {
    display: inline-block; margin-left: 8px; padding: 2px 6px; border-radius: 4px;
    font-size: 10px; background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3);
    font-weight: 500; vertical-align: middle;
}
.emp-proj-history-icon { color: #a78bfa; font-size: 14px; }
.emp-proj-legend { padding: 8px 14px; font-size: 10px; opacity: .55; text-align: right; border-top: 1px solid rgba(255,255,255,.04); }
.linking-hint { display: block; margin-top: 4px; font-size: .85em; opacity: .7; }
.emp-allocations-editor { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.emp-allocations-empty { padding: 14px; text-align: center; color: var(--text-3); font-size: .9rem; background: rgba(0,0,0,.12); border-radius: 6px; }
.emp-alloc-row { padding: 10px 12px; background: rgba(0,0,0,.18); border-radius: 8px; border-left: 3px solid var(--primary, #818cf8); }
.emp-alloc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.emp-alloc-badge { font-size: .88rem; color: var(--text-2); }
.emp-alloc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.emp-alloc-grid label { display: flex; flex-direction: column; gap: 4px; font-size: .75rem; color: var(--text-3); }
.emp-alloc-grid input { padding: 6px 8px; font-size: .85rem; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.08); border-radius: 4px; color: var(--text-1); }
.emp-alloc-grid input:read-only { opacity: .6; cursor: not-allowed; }

/* Skills panel */
.emp-skills-panel, .emp-cert-panel, .emp-dev-panel { display: flex; flex-direction: column; gap: 10px; }
.emp-comp-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 12px; }
.emp-comp-label { opacity: .9; }
.emp-comp-stars { color: var(--warning, #fbbf24); letter-spacing: 2px; }

/* Heatmap */
.emp-heatmap { display: flex; flex-direction: column; gap: 2px; font-size: 9px; }
.emp-heatmap-row { display: grid; grid-template-columns: 70px repeat(8, 1fr); gap: 2px; align-items: center; }
.emp-heatmap-header { color: var(--text-3, #64748b); font-size: 9px; }
.emp-heatmap-axis { padding: 4px 0; font-weight: 600; font-size: 10px; }
.emp-heatmap-cell { padding: 6px 0; text-align: center; border-radius: 3px; color: var(--text-1, #fff); font-weight: 600; font-size: 10px; min-height: 18px; }

/* Cert mini/full entries */
.emp-cert-entry { padding: 7px 9px; background: rgba(255,255,255,.04); border-radius: 5px; margin-bottom: 5px; }
.emp-cert-entry:last-child { margin-bottom: 0; }
.emp-cert-expired-row { border-left: 2px solid var(--danger, #ef4444); }
.emp-cert-expiring-row { border-left: 2px solid var(--warning, #fbbf24); }
.emp-cert-meta { font-size: 10px; opacity: .7; }
.emp-cert-name { font-weight: 600; font-size: 11px; margin-top: 2px; }
.emp-cert-sub { font-size: 10px; opacity: .65; margin-top: 2px; }
.emp-cert-badge { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; font-size: 9px; }
.emp-cert-expired { background: rgba(239,68,68,.22); color: var(--danger, #fca5a5); }
.emp-cert-expiring { background: rgba(245,158,11,.22); color: var(--warning, #fbbf24); }

/* Languages */
.emp-lang-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 11px; }
.emp-lang-level { opacity: .7; }

/* Matching-fit */
.emp-match-panel { display: flex; flex-direction: column; gap: 10px; }
.emp-match-intro { font-size: 11px; opacity: .75; padding: 0 4px; }
.emp-match-row {
    display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 10px 14px;
    background: var(--bg-card, rgba(255,255,255,.04)); border-radius: 8px; align-items: center;
    border-left: 3px solid transparent;
}
.emp-match-high { border-left-color: var(--success, #10b981); }
.emp-match-med { border-left-color: var(--warning, #fbbf24); }
.emp-match-low { border-left-color: var(--text-3, #64748b); }
.emp-match-name { font-weight: 600; font-size: 12px; color: var(--text-1); text-decoration: none; }
.emp-match-name:hover { text-decoration: underline; }
.emp-match-sub { font-size: 10px; opacity: .7; margin-top: 2px; }
.emp-match-score { font-size: 20px; font-weight: 700; color: var(--primary, #a5b4fc); }

/* Development */
.emp-gap-list { margin: 0; padding-left: 20px; font-size: 11px; line-height: 1.6; }
.emp-next-level { }
.emp-next-label { font-size: 10px; opacity: .6; text-transform: uppercase; letter-spacing: .5px; }
.emp-next-name { font-size: 14px; font-weight: 600; color: var(--primary, #a5b4fc); margin: 4px 0; }
.emp-next-hint { font-size: 11px; opacity: .8; line-height: 1.5; margin: 0; }

/* Coaching */
.emp-coaching-entry { padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.emp-coaching-entry:last-child { border-bottom: none; }
.emp-coaching-meta { font-size: 9px; opacity: .55; }
.emp-coaching-note { font-size: 11px; line-height: 1.4; margin-top: 3px; font-style: italic; }

/* AI-Status */
.emp-ai-line { font-size: 11px; opacity: .85; padding: 2px 0; }

/* Footer */
.emp-detail-footer {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
    padding: 14px;
}
.emp-tl-row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; height: 28px; }
.emp-tl-cell { border-radius: 3px; min-width: 6px; }
.emp-tl-labels { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; margin-top: 4px; font-size: 9px; opacity: .6; text-align: center; }

/* Chip Cloud */
.chip-cloud { display: flex; gap: 4px; flex-wrap: wrap; }

/* Avatar */
.emp-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; position: relative; overflow: hidden;
    color: #fff; font-weight: 700;
    vertical-align: middle;
    flex-shrink: 0;
}
.emp-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.emp-avatar-edit {
    position: absolute; bottom: -2px; right: -2px;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--primary, #6366f1); color: #fff; border: 2px solid var(--bg-1, #1a1d2e);
    cursor: pointer; font-size: 10px; display: flex; align-items: center; justify-content: center;
    padding: 0;
}

/* Career log */
.career-log-list { list-style: none; padding: 0; margin: 0; font-size: 11px; }
.career-log-entry { display: grid; grid-template-columns: 22px 60px 1fr; gap: 6px; padding: 4px 0; align-items: start; }
.career-log-icon { text-align: center; }
.career-log-date { opacity: .7; font-size: 10px; }
.career-log-desc { line-height: 1.4; }
.career-log-more { font-size: 10px; opacity: .55; margin-top: 6px; font-style: italic; }
.career-log-empty { font-size: 11px; opacity: .55; font-style: italic; padding: 4px 0; }

/* Responsive */
@media (max-width: 1200px) {
    .emp-detail-3col { grid-template-columns: 240px 1fr; }
    .emp-col-right { grid-column: 1 / -1; order: 3; }
    .emp-detail-footer { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
    .emp-detail-3col { grid-template-columns: 1fr; }
    .emp-col-right { order: 2; }
    .emp-col-mid { order: 3; }
    .emp-hero { grid-template-columns: 1fr; gap: 10px; }
    .emp-hero-actions { justify-content: flex-start; }
}

/* HF3.29 — Kleiner Edit-Shortcut im Card-Corner (überspringt Detail-View) */
.employee-card { position: relative; }
.emp-card-edit-btn {
    position: absolute; top: 6px; right: 34px;
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(99,102,241,.15); color: var(--text-2, #a5b4fc);
    border: none; cursor: pointer; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    transition: background 150ms, transform 150ms;
    z-index: 2;
}
.emp-card-edit-btn:hover { background: rgba(99,102,241,.35); transform: scale(1.1); }

/* HF3.29 — Photo-Upload-Section im Edit-Modal */
.emp-photo-preview {
    width: 96px; height: 96px; border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 28px;
    overflow: hidden; flex-shrink: 0;
    border: 2px solid rgba(255,255,255,.12);
}
.emp-photo-preview-img { width: 100%; height: 100%; object-fit: cover; }
.emp-photo-drop {
    display: flex; align-items: center; justify-content: center;
    min-height: 64px; padding: 12px;
    border: 2px dashed var(--border, rgba(255,255,255,.18));
    border-radius: 10px;
    background: rgba(255,255,255,.03);
    cursor: pointer; transition: border-color 150ms, background 150ms;
}
.emp-photo-drop:hover { border-color: var(--primary, #6366f1); background: rgba(99,102,241,.05); }
.emp-photo-drop-label { color: var(--text-2, #94a3b8); font-size: 11px; text-align: center; }
.emp-photo-status { font-size: 11px; opacity: .85; }
.emp-photo-status-ok { color: var(--success, #10b981); }
.emp-photo-status-err { color: var(--danger, #ef4444); }

/* HF3.29 — Project-Linking-Dialog (Stage 2.5) */
.linking-intro { color: var(--text-2, #a5b4fc); font-size: 12px; margin-bottom: 14px; line-height: 1.5; }
.linking-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.linking-table th {
    text-align: left; padding: 8px 10px; background: rgba(255,255,255,.04);
    color: var(--text-3, #64748b); font-size: 10px; text-transform: uppercase;
    letter-spacing: .5px; border-bottom: 1px solid var(--border, rgba(255,255,255,.1));
}
.linking-row td { padding: 10px; vertical-align: top; border-bottom: 1px solid rgba(255,255,255,.04); }
.linking-input strong { display: block; font-weight: 600; }
.linking-input-sub { font-size: 10px; opacity: .7; margin-top: 2px; }
.linking-cand-preview { }
.linking-cand-reason { display: block; font-size: 10px; opacity: .65; margin-top: 3px; line-height: 1.4; }
.linking-cand-empty { font-style: italic; opacity: .55; }
.linking-select { width: 100%; padding: 6px 8px; font-size: 11px; }

/* ───────────────────────────────────────── */
/*  HF3.27 — Scoring-Card + Review-Dialog     */
/* ───────────────────────────────────────── */

.hf327-scoring-card { border-left: 3px solid var(--primary); }

.hf327-scoring-actions {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

.hf327-scoring-actions .btn-mini,
.sr-actions .btn-mini,
.score-review-modal .btn-mini {
    background: var(--bg-card, #2a2d3a);
    color: var(--text-primary, #fff);
    border: 1px solid var(--border, #3b3f4d);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background 120ms, border-color 120ms;
}
.hf327-scoring-actions .btn-mini:hover,
.sr-actions .btn-mini:hover {
    background: var(--bg-hover, #363947);
    border-color: var(--primary, #6366f1);
}
.hf327-scoring-actions .btn-mini.active,
.sr-actions .btn-mini.active {
    background: var(--primary, #6366f1);
    color: #fff;
    border-color: var(--primary, #6366f1);
}

.hf327-tag-row {
    color: var(--text-secondary, #cbd5e1);
    font-size: 0.95em;
}

.hyperscaler-tag-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(99,102,241,0.18);
    color: var(--text-primary, #fff);
    font-weight: 500;
    font-size: 0.9em;
    cursor: help;
}
.hyperscaler-tag-badge.override-active {
    background: rgba(245,158,11,0.22);
    border: 1px solid rgba(245,158,11,0.55);
}

.hf327-score-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.hf327-score-row {
    display: grid;
    grid-template-columns: 1.4fr auto 1.2fr;
    gap: 10px;
    align-items: center;
    padding: 6px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 4px;
    border-left: 2px solid rgba(255,255,255,0.08);
}

.hf327-score-label {
    font-weight: 500;
    color: var(--text-primary, #fff);
}
.hf327-score-value {
    font-family: monospace;
    color: var(--text-secondary, #cbd5e1);
    white-space: nowrap;
}

.hf327-hs-drilldown {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.hf327-hs-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(99,102,241,0.12);
    color: var(--text-secondary, #cbd5e1);
    font-size: 0.78em;
    font-family: monospace;
    cursor: help;
}

@media (max-width: 900px) {
    .hf327-score-row {
        grid-template-columns: 1fr;
    }
    .hf327-hs-drilldown {
        justify-content: flex-start;
    }
}

/* Score-Review-Dialog */
.score-review-overlay .score-review-modal {
    background: var(--bg-card, #1c1e28);
    color: var(--text-primary, #fff);
    border-radius: 6px;
    border: 1px solid var(--border, #3b3f4d);
}
.score-review-modal h2 { color: var(--text-primary, #fff); margin: 0; }
.sr-sub { color: var(--text-secondary, #cbd5e1); }

.sr-table th,
.sr-table td {
    color: var(--text-primary, #fff);
}
.sr-row-conflict {
    background: rgba(245,158,11,0.08);
}

.sr-score {
    font-family: monospace;
    padding: 1px 6px;
    border-radius: 3px;
    display: inline-block;
    min-width: 28px;
    text-align: center;
}
.sr-score-current { background: rgba(255,255,255,0.05); color: var(--text-primary, #fff); }
.sr-score-ki      { background: rgba(99,102,241,0.20); color: #c7d2fe; cursor: help; }
.sr-score-det     { background: rgba(16,185,129,0.20); color: #a7f3d0; cursor: help; }

.sr-manual-value,
.sr-manual-note {
    background: var(--bg-input, #2a2d3a);
    color: var(--text-primary, #fff);
    border: 1px solid var(--border, #3b3f4d);
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 4px;
}

.sr-banner {
    color: var(--text-primary, #fff);
    font-size: 0.9em;
}

/* ─────────────────────────────────────────── */
/*  HF3.27 — Hyperscaler × Portfolio-Matrix     */
/* ─────────────────────────────────────────── */
.hf327-matrix {
    display: grid;
    gap: 1px;
    background: var(--border);
    padding: 1px;
    border-radius: 4px;
    font-size: 0.85em;
    overflow-x: auto;
}
.hf327-matrix-row {
    display: grid;
    grid-template-columns: 140px repeat(calc(var(--hf327-matrix-cols, 7) - 1), minmax(90px, 1fr));
    gap: 1px;
    background: var(--border);
}
.hf327-matrix-header > div,
.hf327-matrix-row > div.hf327-matrix-axis {
    background: var(--bg-card, #1e2131);
    color: var(--text-primary, #fff);
    padding: 6px 8px;
    font-weight: 600;
    text-align: center;
}
.hf327-matrix-axis {
    text-align: left !important;
    font-size: 0.92em;
}
.hf327-matrix-cell {
    background: rgba(99,102,241,0.08);
    color: var(--text-primary, #fff);
    padding: 6px 8px;
    text-align: center;
    cursor: pointer;
    transition: background 120ms;
    font-family: monospace;
    font-weight: 500;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hf327-matrix-cell:hover {
    outline: 1px solid var(--primary, #6366f1);
    outline-offset: -1px;
}
.hf327-matrix-cell-seeded {
    opacity: 0.72;
    font-style: italic;
}
.hf327-matrix-cell-editing {
    background: var(--bg-input, #2a2d3a) !important;
    outline: 2px solid var(--primary, #6366f1);
    outline-offset: -2px;
    cursor: text;
}
.hf327-matrix-cell-editing input {
    background: transparent;
    color: var(--text-primary, #fff);
    border: none;
    outline: none;
    padding: 0;
    font: inherit;
}

/* Below-Threshold-Kandidaten-Legende */
.opp-cand-row-fallback {
    opacity: 0.72;
}
.opp-cand-row-fallback .opp-cand-score {
    color: var(--text-3);
    font-style: italic;
}
.opp-cand-legend {
    margin-top: 4px;
    font-size: 0.7em;
    color: var(--text-3);
    line-height: 1.3;
}
