/* ============================================================
   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);
}

